If you are using the `@n'-feature (see section Special Features for Use in Actions) in
actions to keep track of the textual locations of tokens and groupings,
then you must provide this information in yylex
. The function
yyparse
expects to find the textual location of a token just parsed
in the global variable yylloc
. So yylex
must store the
proper data in that variable. The value of yylloc
is a structure
and you need only initialize the members that are going to be used by the
actions. The four members are called first_line
,
first_column
, last_line
and last_column
. Note that
the use of this feature makes the parser noticeably slower.
The data type of yylloc
has the name YYLTYPE
.
Go to the first, previous, next, last section, table of contents.