/[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.20 by akim, Tue Nov 12 09:44:41 2002 UTC revision 1.21 by eggert, Wed Nov 27 18:30:50 2002 UTC
# Line 339  m4_popdef([b4_dollar_dollar])dnl Line 339  m4_popdef([b4_dollar_dollar])dnl
339  ])  ])
340    
341    
342  # b4_yydestruct_generate(FUNTION-DECLARATOR)  # b4_yydestruct_generate(FUNCTION-DECLARATOR)
343  # ------------------------------------------  # -------------------------------------------
344  # Generate the "yydestruct" function, which declaration is issued using  # Generate the "yydestruct" function, which declaration is issued using
345  # FUNTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C  # FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
346  # or "b4_c_function_def" for K&R.  # or "b4_c_function_def" for K&R.
347  m4_define([b4_yydestruct_generate],  m4_define([b4_yydestruct_generate],
348  [[/*-----------------------------------------------.  [[/*-----------------------------------------------.
# Line 369  m4_define([b4_yydestruct_generate], Line 369  m4_define([b4_yydestruct_generate],
369  ])  ])
370    
371    
372  # b4_yysymprint_generate(FUNTION-DECLARATOR)  # b4_yysymprint_generate(FUNCTION-DECLARATOR)
373  # ------------------------------------------  # -------------------------------------------
374  # Generate the "yysymprint" function, which declaration is issued using  # Generate the "yysymprint" function, which declaration is issued using
375  # FUNTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C  # FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
376  # or "b4_c_function_def" for K&R.  # or "b4_c_function_def" for K&R.
377  m4_define([b4_yysymprint_generate],  m4_define([b4_yysymprint_generate],
378  [[/*-----------------------------.  [[/*--------------------------------.
379  | Print this symbol on YYOUT.  |  | Print this symbol on YYOUTPUT.  |
380  `-----------------------------*/  `--------------------------------*/
381    
382  ]$1([yysymprint],  ]$1([yysymprint],
383      [static void],      [static void],
384      [[FILE *yyout],          [yyout]],      [[FILE *yyoutput],       [yyoutput]],
385      [[int yytype],           [yytype]],      [[int yytype],           [yytype]],
386      [[YYSTYPE *yyvaluep],    [yyvaluep]]b4_location_if([,      [[YYSTYPE *yyvaluep],    [yyvaluep]]b4_location_if([,
387      [[YYLTYPE *yylocationp], [yylocationp]]]))      [[YYLTYPE *yylocationp], [yylocationp]]]))
# Line 393  b4_location_if([  (void) yylocationp; Line 393  b4_location_if([  (void) yylocationp;
393    
394    if (yytype < YYNTOKENS)    if (yytype < YYNTOKENS)
395      {      {
396        YYFPRINTF (yyout, "token %s (", yytname[[yytype]]);        YYFPRINTF (yyoutput, "token %s (", yytname[[yytype]]);
397  # ifdef YYPRINT  # ifdef YYPRINT
398        YYPRINT (yyout, yytoknum[[yytype]], *yyvaluep);        YYPRINT (yyoutput, yytoknum[[yytype]], *yyvaluep);
399  # endif  # endif
400      }      }
401    else    else
402      YYFPRINTF (yyout, "nterm %s (", yytname[[yytype]]);      YYFPRINTF (yyoutput, "nterm %s (", yytname[[yytype]]);
403    
404    switch (yytype)    switch (yytype)
405      {      {
# Line 407  m4_map([b4_symbol_actions], m4_defn([b4_ Line 407  m4_map([b4_symbol_actions], m4_defn([b4_
407        default:        default:
408          break;          break;
409      }      }
410    YYFPRINTF (yyout, ")");    YYFPRINTF (yyoutput, ")");
411  }  }
412  ])  ])

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

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