63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
## -------------- ## |
67 |
|
## %pure-parser. ## |
68 |
|
## -------------- ## |
69 |
|
|
70 |
|
# b4_pure_if(IF-TRUE, IF-FALSE) |
71 |
|
# ----------------------------- |
72 |
|
# Expand IF-TRUE, if %pure-parser, IF-FALSE otherwise. |
73 |
|
m4_define([b4_pure_if], |
74 |
|
[m4_if(b4_pure, [1], |
75 |
|
[$1], |
76 |
|
[$2])]) |
77 |
|
|
78 |
|
|
79 |
## ------------------- ## |
## ------------------- ## |
80 |
## Output file names. ## |
## Output file names. ## |
81 |
## ------------------- ## |
## ------------------- ## |
535 |
|
|
536 |
/* YYLEX -- calling `yylex' with the right arguments. */ |
/* YYLEX -- calling `yylex' with the right arguments. */ |
537 |
|
|
538 |
#if YYPURE |
b4_pure_if( |
539 |
# ifdef YYLEX_PARAM |
[#ifdef YYLEX_PARAM |
540 |
# define YYLEX yylex (&yylval, b4_location_if([&yylloc, ])YYLEX_PARAM) |
# define YYLEX yylex (&yylval, b4_location_if([&yylloc, ])YYLEX_PARAM) |
541 |
# else |
#else |
542 |
# define YYLEX yylex (&yylval, b4_location_if([&yylloc, ])) |
# define YYLEX yylex (&yylval, b4_location_if([&yylloc, ])) |
543 |
# endif |
#endif], |
544 |
#else /* !YYPURE */ |
[#define YYLEX yylex ()]) |
|
# define YYLEX yylex () |
|
|
#endif /* !YYPURE */ |
|
545 |
|
|
546 |
/* Enable debugging if requested. */ |
/* Enable debugging if requested. */ |
547 |
#if YYDEBUG |
#if YYDEBUG |
669 |
#endif |
#endif |
670 |
static void yydestructor (int symbol_type, YYSTYPE symbol_value); |
static void yydestructor (int symbol_type, YYSTYPE symbol_value); |
671 |
|
|
672 |
/* YY_DECL_VARIABLES -- depending whether we use a pure parser, |
m4_divert_push([KILL])# ======================== M4 code. |
673 |
variables are global, or local to YYPARSE. */ |
# b4_declare_parser_variables |
674 |
|
# --------------------------- |
675 |
#define YY_DECL_VARIABLES \ |
# Declare the variables that are global, or local to YYPARSE if |
676 |
/* The lookahead symbol. */ \ |
# pure-parser |
677 |
int yychar; \ |
m4_define([b4_declare_parser_variables], |
678 |
\ |
[/* The lookahead symbol. */ |
679 |
/* The semantic value of the lookahead symbol. */ \ |
int yychar; |
680 |
YYSTYPE yylval; \ |
|
681 |
\ |
/* The semantic value of the lookahead symbol. */ |
682 |
/* Number of parse errors so far. */ \ |
YYSTYPE yylval; |
683 |
int yynerrs;b4_location_if([ \ |
|
684 |
/* Location data for the lookahead symbol. */ \ |
/* Number of parse errors so far. */ |
685 |
|
int yynerrs;b4_location_if([ |
686 |
|
/* Location data for the lookahead symbol. */ |
687 |
YYLTYPE yylloc;]) |
YYLTYPE yylloc;]) |
688 |
|
]) |
689 |
|
m4_divert_pop([KILL])dnl# ====================== End of M4 code. |
690 |
|
|
691 |
|
b4_pure_if([], |
692 |
/* If nonreentrant, generate the variables here. */ |
[b4_declare_parser_variables]) |
|
|
|
|
#if !YYPURE |
|
|
YY_DECL_VARIABLES |
|
|
#endif /* !YYPURE */ |
|
693 |
|
|
694 |
int |
int |
695 |
yyparse (YYPARSE_PARAM_ARG) |
yyparse (YYPARSE_PARAM_ARG) |
696 |
YYPARSE_PARAM_DECL |
YYPARSE_PARAM_DECL |
697 |
{[ |
{[ |
698 |
/* If reentrant, generate the variables here. */ |
]b4_pure_if([b4_declare_parser_variables])[ |
|
#if YYPURE |
|
|
YY_DECL_VARIABLES |
|
|
#endif /* !YYPURE */ |
|
|
|
|
699 |
register int yystate; |
register int yystate; |
700 |
register int yyn; |
register int yyn; |
701 |
int yyresult; |
int yyresult; |
1291 |
# define YYSTYPE yystype |
# define YYSTYPE yystype |
1292 |
#endif |
#endif |
1293 |
|
|
1294 |
m4_if(b4_pure, [0], |
b4_pure_if([], |
1295 |
[extern YYSTYPE b4_prefix[]lval;]) |
[extern YYSTYPE b4_prefix[]lval;]) |
1296 |
|
|
1297 |
b4_location_if( |
b4_location_if( |