The manual doesn't make clear whether YYLTYPE should represent the location_type or the position_type. It is inferred that YYLTYPE refers to the position_type, because the position of atoken should be returned by the scanner. The terminology and macros seem to indicate a location rather than a position. I wonder if in future versions of the manual it can be made clear that there is a distinction between the position_type and the location_type, and that the location_type is a calculated quantity within the parser and that location_type is used exclusively with the scanner. And in the same light, maybe change the terminology to reflect this understanding, such as using plocp instead of llocp, et alia. The alternative is to change the classes, structures, and manual so that location means position and position means location. As it stands now, oftentimes location seems to mean position.
This all leads up to the question of "who's on first". The flex manual always uses location to refer to position, and in consequence, all terminology and names reflect location. This terminology is carried over into Bison but here, location means position. The manual should at least describe what is going on if not make the terminology, classes, and macros consistent. _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison