Next: C++ Scanner Interface, Previous: C++ Semantic Values, Up: C++ Parsers [Contents][Index]
When the directive %locations is used, the C++ parser supports
location tracking, see Tracking Locations.
By default, two auxiliary classes define a position, a single point
in a file, and a location, a range composed of a pair of
positions (possibly spanning several files). If the %define
variable api.location.type is defined, then these classes will not be
generated, and the user defined type will be used.
| • C++ position | One point in the source file | |
| • C++ location | Two points in the source file | |
| • Exposing the Location Classes | Using the Bison location class in your project | |
| • User Defined Location Type | Required interface for locations |