/[bison]/bison/src/parse-gram.y
ViewVC logotype

Diff of /bison/src/parse-gram.y

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

revision 1.2 by akim, Tue Jun 11 21:45:49 2002 UTC revision 1.3 by akim, Fri Jun 14 17:35:45 2002 UTC
# Line 38  Line 38 
38  #include "reader.h"  #include "reader.h"
39  #include "conflicts.h"  #include "conflicts.h"
40    
41    /* Produce verbose parse errors.  */
42  #define YYERROR_VERBOSE 1  #define YYERROR_VERBOSE 1
43    
44  /* Pass the control structure to YYPARSE and YYLEX. */  /* Pass the control structure to YYPARSE and YYLEX. */
# Line 57  Line 58 
58     of the tokens.  */     of the tokens.  */
59  #define YYPRINT(File, Type, Value) \  #define YYPRINT(File, Type, Value) \
60          yyprint (File, &yylloc, Type, &Value)          yyprint (File, &yylloc, Type, &Value)
61  static void yyprint (FILE *file, const yyltype *loc,  static void yyprint (FILE *file, const location_t *loc,
62                       int type, const yystype *value);                       int type, const yystype *value);
63    
64  symbol_class current_class = unknown_sym;  symbol_class current_class = unknown_sym;
# Line 132  input: { LOCATION_RESET (yylloc); } Line 133  input: { LOCATION_RESET (yylloc); }
133    directives "%%" gram epilogue.opt    directives "%%" gram epilogue.opt
134      {      {
135        yycontrol->errcode = 0;        yycontrol->errcode = 0;
136        epilogue_set ($5, @5.first_line);        epilogue_set ($5, @5);
137      }      }
138  ;  ;
139    
# Line 145  directive: Line 146  directive:
146    grammar_directives    grammar_directives
147  | PROLOGUE  | PROLOGUE
148     {     {
149       prologue_augment ($1, @1.first_line);       prologue_augment ($1, @1);
150     }     }
151  | "%debug"                                 { debug_flag = 1; }  | "%debug"                                 { debug_flag = 1; }
152  | "%define" string_content string_content  { muscle_insert ($2, $3); }  | "%define" string_content string_content  { muscle_insert ($2, $3); }
# Line 348  semi_colon_opt: Line 349  semi_colon_opt:
349    
350  static void  static void
351  yyprint (FILE *file,  yyprint (FILE *file,
352           const yyltype *loc, int type, const yystype *value)           const location_t *loc, int type, const yystype *value)
353  {  {
354    fputs (" (", file);    fputs (" (", file);
355    LOCATION_PRINT (file, *loc);    LOCATION_PRINT (file, *loc);
# Line 385  yyprint (FILE *file, Line 386  yyprint (FILE *file,
386    
387  void  void
388  gram_error (gram_control_t *control ATTRIBUTE_UNUSED,  gram_error (gram_control_t *control ATTRIBUTE_UNUSED,
389              yyltype *yylloc, const char *msg)              location_t *yylloc, const char *msg)
390  {  {
391    LOCATION_PRINT (stderr, *yylloc);    LOCATION_PRINT (stderr, *yylloc);
392    fprintf (stderr, ": %s\n", msg);    fprintf (stderr, ": %s\n", msg);

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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