/[bison]/bison/data/c.m4
ViewVC logotype

Diff of /bison/data/c.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by akim, Tue Nov 12 08:26:38 2002 UTC revision 1.18 by akim, Tue Nov 12 08:45:40 2002 UTC
# Line 320  m4_define([b4_c_arg], Line 320  m4_define([b4_c_arg],
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    ])

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26