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

Diff of /bison/data/yacc.c

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

revision 1.22 by akim, Sun Oct 20 11:16:01 2002 UTC revision 1.23 by akim, Sun Oct 20 11:17:20 2002 UTC
# Line 33  m4_define_default([b4_stack_depth_init], Line 33  m4_define_default([b4_stack_depth_init],
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  ## ----------------- ##  ## ----------------- ##
# Line 61  m4_define([b4_rhs_value], Line 66  m4_define([b4_rhs_value],
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 @$.
# Line 86  m4_define([b4_rhs_location], Line 82  m4_define([b4_rhs_location],
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  ## ------------------- ##  ## ------------------- ##
# Line 530  while (0) Line 513  while (0)
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.  */

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

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