39 |
## ------------------------ ## |
## ------------------------ ## |
40 |
|
|
41 |
|
|
42 |
# b4_Pure_if(IF-TRUE, IF-FALSE) |
# b4_pure_if(IF-TRUE, IF-FALSE) |
43 |
# ----------------------------- |
# ----------------------------- |
44 |
# Expand IF-TRUE, if %pure-parser and %parse-param, IF-FALSE otherwise. |
# Expand IF-TRUE, if %pure-parser and %parse-param, IF-FALSE otherwise. |
45 |
m4_define([b4_Pure_if], |
m4_define([b4_Pure_if], |
105 |
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH |
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH |
106 |
# symbols on RHS. |
# symbols on RHS. |
107 |
m4_define([b4_rhs_value], |
m4_define([b4_rhs_value], |
108 |
[yyvsp@<:@m4_eval([$2 - $1])@:>@m4_ifval([$3], [.$3])]) |
[yyvsp@{m4_eval([$2 - $1])@}m4_ifval([$3], [.$3])]) |
109 |
|
|
110 |
|
|
111 |
|
|
125 |
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols |
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols |
126 |
# on RHS. |
# on RHS. |
127 |
m4_define([b4_rhs_location], |
m4_define([b4_rhs_location], |
128 |
[yylsp@<:@m4_eval([$2 - $1])@:>@]) |
[yylsp@{m4_eval([$2 - $1])@}]) |
|
|
|
|
|
|
|
|
|
|
## ------------------- ## |
|
|
## Output file names. ## |
|
|
## ------------------- ## |
|
|
|
|
|
m4_define_default([b4_input_suffix], [.y]) |
|
|
|
|
|
m4_define_default([b4_output_parser_suffix], |
|
|
[m4_translit(b4_input_suffix, [yY], [cC])]) |
|
|
|
|
|
m4_define_default([b4_output_parser_name], |
|
|
[b4_output_prefix[]b4_output_infix[]b4_output_parser_suffix[]]) |
|
|
|
|
|
|
|
|
m4_define_default([b4_output_header_suffix], |
|
|
[m4_translit(b4_input_suffix, [yY], [hH])]) |
|
|
|
|
|
m4_define_default([b4_output_header_name], |
|
|
[b4_output_prefix[]b4_output_infix[]b4_output_header_suffix[]]) |
|
|
|
|
|
m4_define_default([b4_header_guard], |
|
|
[m4_bpatsubst(m4_toupper([BISON_]b4_output_header_name), |
|
|
[[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])]) |
|
129 |
|
|
130 |
|
|
131 |
|
|
143 |
case $4: /* $3 */ |
case $4: /* $3 */ |
144 |
b4_syncline([$2], [$1]) |
b4_syncline([$2], [$1]) |
145 |
$5; |
$5; |
146 |
b4_syncline([__oline__], [__ofile__]) |
b4_syncline([@oline@], [@ofile@]) |
147 |
break; |
break; |
148 |
m4_popdef([b4_at_dollar])dnl |
m4_popdef([b4_at_dollar])dnl |
149 |
m4_popdef([b4_dollar_dollar])dnl |
m4_popdef([b4_dollar_dollar])dnl |
153 |
# We do want M4 expansion after # for CPP macros. |
# We do want M4 expansion after # for CPP macros. |
154 |
m4_changecom() |
m4_changecom() |
155 |
m4_divert(0)dnl |
m4_divert(0)dnl |
156 |
#output "b4_output_parser_name" |
@output @output_parser_name@ |
157 |
b4_copyright([Skeleton parser for Yacc-like parsing with Bison], |
b4_copyright([Skeleton parser for Yacc-like parsing with Bison], |
158 |
[1984, 1989, 1990, 2000, 2001, 2002]) |
[1984, 1989, 1990, 2000, 2001, 2002]) |
159 |
|
|
208 |
[b4_syncline([b4_stype_line], [b4_filename]) |
[b4_syncline([b4_stype_line], [b4_filename]) |
209 |
typedef union b4_stype yystype; |
typedef union b4_stype yystype; |
210 |
/* Line __line__ of __file__. */ |
/* Line __line__ of __file__. */ |
211 |
b4_syncline([__oline__], [__ofile__])], |
b4_syncline([@oline@], [@ofile@])], |
212 |
[typedef int yystype;]) |
[typedef int yystype;]) |
213 |
# define YYSTYPE yystype |
# define YYSTYPE yystype |
214 |
# define YYSTYPE_IS_TRIVIAL 1 |
# define YYSTYPE_IS_TRIVIAL 1 |
230 |
b4_post_prologue |
b4_post_prologue |
231 |
|
|
232 |
/* Line __line__ of __file__. */ |
/* Line __line__ of __file__. */ |
233 |
b4_syncline([__oline__], [__ofile__]) |
b4_syncline([@oline@], [@ofile@]) |
234 |
|
|
235 |
#if ! defined (yyoverflow) || YYERROR_VERBOSE |
#if ! defined (yyoverflow) || YYERROR_VERBOSE |
236 |
|
|
1029 |
} |
} |
1030 |
|
|
1031 |
/* Line __line__ of __file__. */ |
/* Line __line__ of __file__. */ |
1032 |
b4_syncline([__oline__], [__ofile__]) |
b4_syncline([@oline@], [@ofile@]) |
1033 |
|
|
1034 |
[ yyvsp -= yylen; |
[ yyvsp -= yylen; |
1035 |
yyssp -= yylen; |
yyssp -= yylen; |
1250 |
|
|
1251 |
b4_epilogue |
b4_epilogue |
1252 |
m4_if(b4_defines_flag, 0, [], |
m4_if(b4_defines_flag, 0, [], |
1253 |
[#output "b4_output_header_name" |
[@output @output_header_name@ |
1254 |
b4_copyright([Skeleton parser for Yacc-like parsing with Bison], |
b4_copyright([Skeleton parser for Yacc-like parsing with Bison], |
1255 |
[1984, 1989, 1990, 2000, 2001, 2002]) |
[1984, 1989, 1990, 2000, 2001, 2002]) |
1256 |
|
|
1259 |
This special exception was added by the Free Software Foundation |
This special exception was added by the Free Software Foundation |
1260 |
in version 1.24 of Bison. */ |
in version 1.24 of Bison. */ |
1261 |
|
|
|
#ifndef b4_header_guard |
|
|
# define b4_header_guard |
|
|
|
|
1262 |
b4_token_defines(b4_tokens) |
b4_token_defines(b4_tokens) |
1263 |
|
|
1264 |
#ifndef YYSTYPE |
#ifndef YYSTYPE |
1266 |
[b4_syncline([b4_stype_line], [b4_filename]) |
[b4_syncline([b4_stype_line], [b4_filename]) |
1267 |
typedef union b4_stype yystype; |
typedef union b4_stype yystype; |
1268 |
/* Line __line__ of __file__. */ |
/* Line __line__ of __file__. */ |
1269 |
b4_syncline([__oline__], [__ofile__])], |
b4_syncline([@oline@], [@ofile@])], |
1270 |
[typedef int yystype;]) |
[typedef int yystype;]) |
1271 |
# define YYSTYPE yystype |
# define YYSTYPE yystype |
1272 |
|
# define YYSTYPE_IS_TRIVIAL 1 |
1273 |
#endif |
#endif |
1274 |
|
|
1275 |
b4_pure_if([], |
b4_pure_if([], |
1290 |
m4_if(b4_pure, [0], |
m4_if(b4_pure, [0], |
1291 |
[extern YYLTYPE b4_prefix[]lloc;]) |
[extern YYLTYPE b4_prefix[]lloc;]) |
1292 |
]) |
]) |
|
#endif /* not b4_header_guard */ |
|
1293 |
]) |
]) |