For instance, if your locations use a file name, you may use
@example
-%parse-param @{ const char *file @};
+%parse-param @{ char const *file_name @};
%initial-action
@{
- @@$.begin.file = @@$.end.file = file;
+ @@$.begin.file_name = @@$.end.file_name = file_name;
+ @@$.begin.file_name = @@$.end.file_name = file_name;
@};
@end example
@c - %locations
@c - class Position
@c - class Location
-@c - %define "file_type" "const symbol::Symbol"
+@c - %define "file_name_type" "const symbol::Symbol"
When the directive @code{%locations} is used, the C++ parser supports
location tracking, see @ref{Locations, , Locations Overview}. Two
The name of the file. It will always be handled as a pointer, the
parser will never duplicate nor deallocate it. As an experimental
feature you may change it to @samp{@var{type}*} using @samp{%define
-"file_type" "@var{type}"}.
+"file_name_type" "@var{type}"}.
@end deftypemethod
@deftypemethod {position} {unsigned int} line
%initial-action
@{
// Initialize the initial location.
- @@$.begin.file = @@$.end.file = &driver.file;
+ @@$.begin.file_name = @@$.end.file_name = &driver.file;
@};
@end example