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

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

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

revision 1.3 by akim, Sun Dec 30 21:06:22 2001 UTC revision 1.4 by akim, Sun Dec 30 21:06:36 2001 UTC
# Line 50  static int yyerror PARAMS ((const char* Line 50  static int yyerror PARAMS ((const char*
50  {  {
51    char *muscle;    char *muscle;
52    char *string;    char *string;
53      char *literal;
54    char character;    char character;
55    int yacc;    int yacc;
56  }  }
57    
58    /* Name of a muscle. */
59  %token <muscle> MUSCLE  %token <muscle> MUSCLE
60    /* A string dedicated to Bison (%%"foo").  */
61  %token <string> STRING  %token <string> STRING
62    /* Raw data, to output directly. */
63    %token <literal> RAW
64    /* Spaces. */
65    %token <literal> BLANKS
66    /* Raw data, but char by char. */
67  %token <character> CHARACTER  %token <character> CHARACTER
68    
69  %token LINE  %token LINE
# Line 81  skeleton : /* Empty.  */    { } Line 89  skeleton : /* Empty.  */    { }
89  section : section.header section.body { }  section : section.header section.body { }
90  ;  ;
91    
92  section.header : SECTION gb MUSCLE gb STRING gb section.yacc gb '\n'  section.header : SECTION BLANKS MUSCLE BLANKS STRING BLANKS section.yacc '\n'
93  {  {
94    char *name = 0;    char *name = 0;
95    char *limit = 0;    char *limit = 0;
# Line 140  section.body Line 148  section.body
148  | section.body TOKENS { token_definitions_output (parser, &output_line); }  | section.body TOKENS { token_definitions_output (parser, &output_line); }
149  | section.body ACTIONS { actions_output (parser, &output_line); }  | section.body ACTIONS { actions_output (parser, &output_line); }
150  | section.body CHARACTER { fputc ($2, parser); }  | section.body CHARACTER { fputc ($2, parser); }
151    | section.body RAW       { fputs ($2, parser); }
152    | section.body BLANKS    { fputs ($2, parser); }
153  | section.body MUSCLE {  | section.body MUSCLE {
154    const char* value = muscle_find ($2);    const char* value = muscle_find ($2);
155    if (value)    if (value)
# Line 154  section.body Line 164  section.body
164      }      }
165  }  }
166  ;  ;
   
 gb : /* Empty.  */ { }  
    | gb CHARACTER  { /* Do not echo garbage characters.  */ }  
 ;  
   
167  %%  %%
168    
169  static int  static int

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

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