33 |
# Location type. |
# Location type. |
34 |
m4_define_default([b4_location_type], [yyltype]) |
m4_define_default([b4_location_type], [yyltype]) |
35 |
|
|
36 |
|
# Accumule in b4_lex_param all the yylex arguments. |
37 |
|
# Yes, this is quite ugly... |
38 |
|
m4_define([b4_lex_param], |
39 |
|
m4_dquote(b4_pure_if([[[[YYSTYPE *]], [[&yylval]]][]dnl |
40 |
|
b4_location_if([, [[YYLTYPE *], [&yylloc]]])])dnl |
41 |
|
m4_ifdef([b4_lex_param], [, ]b4_lex_param))) |
42 |
|
|
43 |
|
|
44 |
## ----------------- ## |
## ----------------- ## |
66 |
## Locations. ## |
## Locations. ## |
67 |
## ----------- ## |
## ----------- ## |
68 |
|
|
|
# b4_location_if(IF-TRUE, IF-FALSE) |
|
|
# --------------------------------- |
|
|
# Expand IF-TRUE, if locations are used, IF-FALSE otherwise. |
|
|
m4_define([b4_location_if], |
|
|
[m4_if(b4_locations_flag, [1], |
|
|
[$1], |
|
|
[$2])]) |
|
|
|
|
|
|
|
69 |
# b4_lhs_location() |
# b4_lhs_location() |
70 |
# ----------------- |
# ----------------- |
71 |
# Expansion of @$. |
# Expansion of @$. |
82 |
|
|
83 |
|
|
84 |
|
|
|
## -------------- ## |
|
|
## %pure-parser. ## |
|
|
## -------------- ## |
|
|
|
|
|
# b4_pure_if(IF-TRUE, IF-FALSE) |
|
|
# ----------------------------- |
|
|
# Expand IF-TRUE, if %pure-parser, IF-FALSE otherwise. |
|
|
m4_define([b4_pure_if], |
|
|
[m4_if(b4_pure, [1], |
|
|
[$1], |
|
|
[$2])]) |
|
|
|
|
|
|
|
85 |
## ------------------- ## |
## ------------------- ## |
86 |
## Output file names. ## |
## Output file names. ## |
87 |
## ------------------- ## |
## ------------------- ## |
513 |
#ifdef YYLEX_PARAM |
#ifdef YYLEX_PARAM |
514 |
# define YYLEX yylex (b4_pure_if([&yylval[]b4_location_if([, &yylloc]), ])YYLEX_PARAM) |
# define YYLEX yylex (b4_pure_if([&yylval[]b4_location_if([, &yylloc]), ])YYLEX_PARAM) |
515 |
#else |
#else |
516 |
# define YYLEX b4_c_function_call([yylex], [int], |
# define YYLEX b4_c_function_call([yylex], [int], b4_lex_param) |
|
b4_pure_if([[[[]], [[&yylval]]], |
|
|
b4_location_if([[[], [&yylloc]],])]) |
|
|
m4_fst(b4_lex_param)) |
|
517 |
#endif |
#endif |
518 |
|
|
519 |
/* Enable debugging if requested. */ |
/* Enable debugging if requested. */ |