/[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.24 by akim, Sat Oct 19 14:38:06 2002 UTC revision 1.25 by eggert, Fri Nov 8 05:19:30 2002 UTC
# Line 97  braced_code_t current_braced_code = acti Line 97  braced_code_t current_braced_code = acti
97  /* Define the tokens together with their human representation.  */  /* Define the tokens together with their human representation.  */
98  %token GRAM_EOF 0 "end of file"  %token GRAM_EOF 0 "end of file"
99  %token STRING     "string"  %token STRING     "string"
 %token CHARACTER  "character"  
100  %token INT        "integer"  %token INT        "integer"
101    
102  %token PERCENT_TOKEN       "%token"  %token PERCENT_TOKEN       "%token"
# Line 157  braced_code_t current_braced_code = acti Line 156  braced_code_t current_braced_code = acti
156  %token BRACED_CODE     "{...}"  %token BRACED_CODE     "{...}"
157    
158    
159  %type <string> CHARACTER TYPE STRING string_content  %type <string> TYPE STRING string_content
160                 BRACED_CODE PROLOGUE EPILOGUE epilogue.opt action                 BRACED_CODE PROLOGUE EPILOGUE epilogue.opt action
161  %type <integer> INT  %type <integer> INT
162  %type <symbol> ID symbol string_as_id  %type <symbol> ID symbol string_as_id
# Line 285  precedence_declarator: Line 284  precedence_declarator:
284  ;  ;
285    
286  type.opt:  type.opt:
287    /* Nothing. */ { current_type = NULL;}    /* Nothing. */ { current_type = NULL; }
288  | TYPE           { current_type = $1; }  | TYPE           { current_type = $1; }
289  ;  ;
290    
# Line 390  rhs: Line 389  rhs:
389  symbol:  symbol:
390    ID              { $$ = $1; }    ID              { $$ = $1; }
391  | string_as_id    { $$ = $1; }  | string_as_id    { $$ = $1; }
 | CHARACTER       { $$ = symbol_get ($1, @1); }  
392  ;  ;
393    
394  action:  action:
# Line 443  yyprint (FILE *file, Line 441  yyprint (FILE *file,
441    fputc (' ', file);    fputc (' ', file);
442    switch (type)    switch (type)
443      {      {
     case CHARACTER:  
       fprintf (file, " = '%s'", value->string);  
       break;  
   
444      case ID:      case ID:
445        fprintf (file, " = %s", value->symbol->tag);        fprintf (file, " = %s", value->symbol->tag);
446        break;        break;

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

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