Lines Matching refs:yylex
248 * Lexical:: You must supply a function @code{yylex}
255 The Lexical Analyzer Function @code{yylex}
257 * Calling Convention:: How @code{yyparse} calls @code{yylex}.
258 * Token Values:: How @code{yylex} must return the semantic value
260 * Token Locations:: How @code{yylex} must return the text location
319 * Yacc Library:: Yacc-compatible @code{yylex} and @code{main}.
332 * C++ Scanner Interface:: Exchanges between yylex and parse
994 int yylex (void);
1283 @xref{Lexical, ,The Lexical Analyzer Function @code{yylex}}.
1298 functions such as the lexical analyzer function @code{yylex}, the
1336 Lexical Analyzer Function @code{yylex}}). It could also be produced
1390 You need to declare the lexical analyzer @code{yylex} and the error
1469 int yylex (void);
1492 The forward declarations for @code{yylex} and @code{yyerror} are
1696 Analyzer Function @code{yylex}}.
1713 therefore, @code{NUM} becomes a macro for @code{yylex} to use.
1738 yylex (void)
1823 the grammar file. The definitions of @code{yylex}, @code{yyerror} and
1843 in the grammar file (@code{yylex}, @code{yyerror} and @code{main}) are
1910 int yylex (void);
1955 The functions @code{yylex}, @code{yyerror} and @code{main} can be the
2067 int yylex (void);
2172 yylex (void)
2262 only single-character literals. The lexical analyzer @code{yylex} passes
2312 int yylex (void);
2559 The function @code{yylex} must now recognize variables, numeric values, and
2572 operators in @code{yylex}.
2582 yylex (void)
3160 of @code{yylex} and @code{yyerror} often go here. Because C requires
3162 functions like @code{yylex} and @code{yyerror} in the Prologue, even
3187 represented in the Bison parser by a numeric code, and the @code{yylex}
3235 for @code{yylex}}). Also, unlike standard C, trigraphs have no
3275 The value returned by @code{yylex} is always one of the terminal
3278 it the same way in the definition of @code{yylex}. The numeric code
3280 character, so @code{yylex} can use the identical value to generate the
3284 file, so @code{yylex} can use the name to stand for the code. (This
3286 Convention, ,Calling Convention for @code{yylex}}.
3288 If @code{yylex} is defined in a separate file, you need to arrange for the
3304 The @code{yylex} function and Bison must use a consistent character set
3318 In particular, @code{yylex} should never return this value. The default
4418 the parser, so that the function @code{yylex} (if it is in this file)
4478 @code{yylex} function can use the token name or the literal string to
4994 statically allocated variables for communication with @code{yylex},
5008 @code{yylex}. @xref{Pure Calling, ,Calling Conventions for Pure
5074 status = yypush_parse (ps, yylex (), NULL);
5091 yychar = yylex ();
5239 definition of @code{yylex} in a separate source file, because
5240 @code{yylex} typically needs to be able to refer to the
5494 changes the signature for @code{yylex} (@pxref{Pure Calling}), and also that of
5644 The parser namespace is @code{foo} and @code{yylex} is referenced as
5799 The renamed symbols include @code{yyparse}, @code{yylex}, @code{yyerror},
5826 implementation file, thus the ``original'' names (@code{yylex},
5885 * Lexical:: You must supply a function @code{yylex}
6059 @section The Lexical Analyzer Function @code{yylex}
6060 @findex yylex
6063 The @dfn{lexical analyzer} function, @code{yylex}, recognizes tokens from
6068 In simple programs, @code{yylex} is often defined at the end of the
6069 Bison grammar file. If @code{yylex} is defined in a separate source
6078 * Calling Convention:: How @code{yyparse} calls @code{yylex}.
6079 * Token Values:: How @code{yylex} must return the semantic value
6081 * Token Locations:: How @code{yylex} must return the text location
6089 @subsection Calling Convention for @code{yylex}
6091 The value that @code{yylex} returns must be the positive numeric code
6097 is the proper numeric code for that token type. So @code{yylex} can
6102 So @code{yylex} can simply return that character code, possibly converted
6111 yylex (void)
6127 utility can be used without change as the definition of @code{yylex}.
6130 @code{yylex} can determine the token type codes for them:
6135 literal string tokens, @code{yylex} can use these symbolic names like
6137 the grammar file has no effect on @code{yylex}.
6140 @code{yylex} can find the multicharacter token in the @code{yytname}
6177 @code{yylex}:
6205 then the code in @code{yylex} might look like this:
6222 then you must provide this information in @code{yylex}. The function
6224 in the global variable @code{yylloc}. So @code{yylex} must store the proper
6243 pointers passed as arguments to @code{yylex}. You must declare them as
6249 yylex (YYSTYPE *lvalp, YYLTYPE *llocp)
6260 this case, omit the second argument; @code{yylex} will be called with
6264 If you wish to pass the additional parameter data to @code{yylex}, use
6271 additional @code{yylex} argument declaration.
6285 int yylex (int *nastiness);
6292 int yylex (YYSTYPE *lvalp, int *nastiness);
6520 @c you must make @code{yylex} supply this information about each token.
6521 @c If you need only certain members, then @code{yylex} need only fill in
7403 As long as the token @code{"bogus"} is never generated by @code{yylex},
7596 @item Delayed @code{yylex} invocations.
7598 @cindex delayed yylex invocations
7605 invoke @code{yylex} to fetch the next token before performing the reduction.
7607 determines how soon a Bison-generated parser invokes @code{yylex} for a
7614 designing @code{yylex} and the grammar file. That is, if the behavior of
7615 @code{yylex} can influence or be influenced by the semantic actions
7617 next @code{yylex} invocation until after those reductions is significant.
7618 For example, the semantic actions might pop a scope stack that @code{yylex}
7620 to ensure that @code{yylex} does not look up the next token in a scope that
7626 When the parser fetches a new token by invoking @code{yylex}, it checks
7650 action does not delay any @code{yylex} invocation or syntax error detection
8124 @code{IDENTIFIER} and @code{TYPENAME}. When @code{yylex} finds an
8210 int yylex (void);
8236 Here we assume that @code{yylex} looks at the value of @code{hexflag}; when
8242 ,The Prologue}). You must also write the code in @code{yylex} to obey
8992 Each time the parser calls @code{yylex}, what kind of token was read.
9275 * Yacc Library:: Yacc-compatible @code{yylex} and @code{main}.
9662 * C++ Scanner Interface:: Exchanges between yylex and parse
9986 @c - prefix for yylex.
9987 @c - Pure interface to yylex
9990 The parser invokes the scanner by calling @code{yylex}. Contrary to C
9994 @deftypemethod {parser} {int} yylex (semantic_type* @var{yylval}, location_type* @var{yylloc}, @var…
10067 the signature of @code{yylex} to be defined in the macro
10076 yylex (yy::calcxx_parser::semantic_type* yylval, \
10380 /* By default yylex returns int, we use token_type.
10410 time @code{yylex} is invoked, the begin position is moved onto the end
10787 @deftypemethod {Lexer} {int} yylex ()
10799 @code{yylex} returned, and the first position beyond it. These
10807 Return the semantic value of the last token that yylex returned.
11042 The exceptions thrown by the @code{yylex} method of the lexer, a
11181 yylex ();
11267 char *fst = (yylex (), yylval);
11268 char *snd = (yylex (), yylval);
11362 @code{yylex} function. Make sure a variable @code{start_token} is
11701 @code{yylex} should accept. @xref{Pure Calling,, Calling Conventions
11721 @code{yylex}, @code{yyerror}, @code{yynerrs}, @code{yylval}, @code{yychar},
11808 @code{yylex} are mapped. It cannot be used in the grammar, rather, use
11905 @deffn {Function} yylex
11908 @code{yylex}}.
11913 arguments) for @code{yyparse} to pass to @code{yylex}. The use of this
11919 External variable in which @code{yylex} should place the line and column
11922 @code{yylex}.)
11936 External variable in which @code{yylex} should place the semantic
11939 @code{yylex}.)
12151 @xref{Lexical, ,The Lexical Analyzer Function @code{yylex}}.
12307 @c LocalWords: rpcalc Lexer Expr ltcalc mfcalc yylex defaultprec Donnelly Gotos