320 |
m4_define([b4_syncline], |
m4_define([b4_syncline], |
321 |
[m4_if(b4_synclines_flag, 1, |
[m4_if(b4_synclines_flag, 1, |
322 |
[[#]line $1 $2])]) |
[[#]line $1 $2])]) |
323 |
|
|
324 |
|
|
325 |
|
# b4_symbol_actions(FILENAME, LINENO, |
326 |
|
# SYMBOL-TAG, SYMBOL-NUM, |
327 |
|
# SYMBOL-ACTION, SYMBOL-TYPENAME) |
328 |
|
# ------------------------------------------------- |
329 |
|
m4_define([b4_symbol_actions], |
330 |
|
[m4_pushdef([b4_dollar_dollar], [yyvalue.$6])dnl |
331 |
|
m4_pushdef([b4_at_dollar], [yylocation])dnl |
332 |
|
case $4: /* $3 */ |
333 |
|
b4_syncline([$2], [$1]) |
334 |
|
$5; |
335 |
|
b4_syncline([@oline@], [@ofile@]) |
336 |
|
break; |
337 |
|
m4_popdef([b4_at_dollar])dnl |
338 |
|
m4_popdef([b4_dollar_dollar])dnl |
339 |
|
]) |
340 |
|
|
341 |
|
|
342 |
|
# b4_yydestruct_generate(FUNTION-DECLARATOR) |
343 |
|
# ------------------------------------------ |
344 |
|
# Generate the "yydestruct" function, which declaration is issued using |
345 |
|
# FUNTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C |
346 |
|
# or "b4_c_function_def" for K&R. |
347 |
|
m4_define([b4_yydestruct_generate], |
348 |
|
[[/*-----------------------------------------------. |
349 |
|
| Release the memory associated to this symbol. | |
350 |
|
`-----------------------------------------------*/ |
351 |
|
|
352 |
|
]$1([yydestruct], |
353 |
|
[static void], |
354 |
|
[[int yytype], [yytype]], |
355 |
|
[[YYSTYPE yyvalue], [yyvalue]]b4_location_if([, |
356 |
|
[[YYLTYPE yylocation], [yylocation]]]))[ |
357 |
|
{ |
358 |
|
/* Pacify ``unused variable'' warnings. */ |
359 |
|
(void) yyvalue; |
360 |
|
]b4_location_if([ (void) yylocation; |
361 |
|
])[ |
362 |
|
switch (yytype) |
363 |
|
{ |
364 |
|
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[ |
365 |
|
default: |
366 |
|
break; |
367 |
|
} |
368 |
|
}]dnl |
369 |
|
]) |