24 |
%defines |
%defines |
25 |
%locations |
%locations |
26 |
%pure-parser |
%pure-parser |
27 |
%error-verbose |
// %error-verbose |
28 |
%defines |
%defines |
29 |
%name-prefix="gram_" |
%name-prefix="gram_" |
30 |
|
|
38 |
#include "reader.h" |
#include "reader.h" |
39 |
#include "conflicts.h" |
#include "conflicts.h" |
40 |
|
|
41 |
|
#define YYERROR_VERBOSE 1 |
42 |
|
|
43 |
/* Pass the control structure to YYPARSE and YYLEX. */ |
/* Pass the control structure to YYPARSE and YYLEX. */ |
44 |
#define YYPARSE_PARAM gram_control |
#define YYPARSE_PARAM gram_control |
45 |
#define YYLEX_PARAM gram_control |
#define YYLEX_PARAM gram_control |
122 |
%token PROLOGUE EPILOGUE |
%token PROLOGUE EPILOGUE |
123 |
%token BRACED_CODE |
%token BRACED_CODE |
124 |
|
|
125 |
%type <string> CHARACTER TYPE BRACED_CODE PROLOGUE EPILOGUE epilogue.opt action STRING string_content |
%type <string> CHARACTER TYPE STRING string_content |
126 |
|
BRACED_CODE PROLOGUE EPILOGUE epilogue.opt action |
127 |
%type <integer> INT |
%type <integer> INT |
128 |
%type <symbol> ID symbol string_as_id |
%type <symbol> ID symbol string_as_id |
129 |
%type <assoc> precedence_directive |
%type <assoc> precedence_directive |
143 |
|
|
144 |
directive: |
directive: |
145 |
grammar_directives |
grammar_directives |
146 |
| PROLOGUE { prologue_augment ($1, @1.first_line); } |
| PROLOGUE |
147 |
|
{ |
148 |
|
prologue_augment ($1, @1.first_line); |
149 |
|
} |
150 |
| "%debug" { debug_flag = 1; } |
| "%debug" { debug_flag = 1; } |
151 |
| "%define" string_content string_content { muscle_insert ($2, $3); } |
| "%define" string_content string_content { muscle_insert ($2, $3); } |
152 |
| "%defines" { defines_flag = 1; } |
| "%defines" { defines_flag = 1; } |