15 |
#define yyrestart gram_restart |
#define yyrestart gram_restart |
16 |
#define yytext gram_text |
#define yytext gram_text |
17 |
|
|
18 |
#line 19 "scan-gram.c" |
#line 19 "lex.yy.c" |
19 |
/* A lexical scanner generated by flex */ |
/* A lexical scanner generated by flex */ |
20 |
|
|
21 |
/* Scanner skeleton version: |
/* Scanner skeleton version: |
686 |
|
|
687 |
static yyconst short int yy_rule_linenum[92] = |
static yyconst short int yy_rule_linenum[92] = |
688 |
{ 0, |
{ 0, |
689 |
117, 118, 119, 120, 121, 122, 123, 124, 125, 126, |
121, 122, 123, 124, 125, 126, 127, 128, 129, 130, |
690 |
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, |
131, 132, 133, 134, 135, 136, 137, 138, 139, 140, |
691 |
137, 138, 139, 140, 141, 142, 143, 145, 146, 147, |
141, 142, 143, 144, 145, 146, 147, 149, 150, 151, |
692 |
148, 150, 151, 152, 157, 160, 163, 166, 167, 170, |
152, 154, 155, 156, 161, 164, 167, 170, 171, 174, |
693 |
173, 176, 184, 190, 206, 207, 218, 230, 231, 232, |
177, 180, 188, 194, 210, 211, 222, 234, 235, 236, |
694 |
249, 258, 260, 280, 294, 296, 316, 328, 332, 333, |
253, 262, 264, 284, 298, 300, 320, 332, 336, 337, |
695 |
334, 335, 336, 337, 338, 339, 340, 355, 361, 362, |
338, 339, 340, 341, 342, 343, 344, 359, 365, 366, |
696 |
364, 382, 388, 389, 391, 409, 412, 415, 416, 427, |
368, 386, 392, 393, 395, 413, 416, 419, 420, 431, |
697 |
438, 440, 441, 443, 444, 447, 467, 474, 475, 476, |
442, 444, 445, 447, 448, 451, 471, 478, 479, 480, |
698 |
497 |
501 |
699 |
|
|
700 |
} ; |
} ; |
701 |
|
|
741 |
#include "reader.h" |
#include "reader.h" |
742 |
|
|
743 |
/* Each time we match a string, move the end cursor to its end. */ |
/* Each time we match a string, move the end cursor to its end. */ |
744 |
|
#define YY_USER_INIT \ |
745 |
|
do { \ |
746 |
|
LOCATION_RESET (*yylloc); \ |
747 |
|
/* This is only to avoid GCC warnings. */ \ |
748 |
|
if (yycontrol) {;}; \ |
749 |
|
} while (0) |
750 |
|
|
751 |
#define YY_USER_ACTION LOCATION_COLUMNS (*yylloc, yyleng) |
#define YY_USER_ACTION LOCATION_COLUMNS (*yylloc, yyleng) |
752 |
#define YY_LINES LOCATION_LINES (*yylloc, yyleng); lineno += yyleng; |
#define YY_LINES LOCATION_LINES (*yylloc, yyleng); lineno += yyleng; |
753 |
#define YY_STEP LOCATION_STEP (*yylloc) |
#define YY_STEP LOCATION_STEP (*yylloc) |
786 |
} |
} |
787 |
|
|
788 |
|
|
|
/* This is only to avoid GCC warnings. */ |
|
|
#define YY_USER_INIT if (yycontrol) {;}; |
|
|
|
|
789 |
|
|
790 |
static int braces_level = 0; |
static int braces_level = 0; |
791 |
static int percent_percent_count = 0; |
static int percent_percent_count = 0; |
805 |
#define SC_PROLOGUE 7 |
#define SC_PROLOGUE 7 |
806 |
#define SC_EPILOGUE 8 |
#define SC_EPILOGUE 8 |
807 |
|
|
808 |
#line 805 "scan-gram.c" |
#line 809 "lex.yy.c" |
809 |
|
|
810 |
/* Macros after this point can all be overridden by user definitions in |
/* Macros after this point can all be overridden by user definitions in |
811 |
* section 1. |
* section 1. |
967 |
register char *yy_cp, *yy_bp; |
register char *yy_cp, *yy_bp; |
968 |
register int yy_act; |
register int yy_act; |
969 |
|
|
970 |
#line 93 "scan-gram.l" |
#line 97 "scan-gram.l" |
971 |
|
|
972 |
|
|
973 |
/* At each yylex invocation, mark the current position as the |
/* At each yylex invocation, mark the current position as the |
974 |
start of the next token. */ |
start of the next token. */ |
975 |
#define TR_POS 0 |
#define TR_POS 0 |
976 |
#if TR_POS |
#if TR_POS |
977 |
fprintf (stderr, "FOO1: "); |
fprintf (stderr, "FOO1: %p: ", yylloc); |
978 |
LOCATION_PRINT (stderr, *yylloc); |
LOCATION_PRINT (stderr, *yylloc); |
979 |
fprintf (stderr, "\n"); |
fprintf (stderr, "\n"); |
980 |
#endif |
#endif |
990 |
/*----------------------------. |
/*----------------------------. |
991 |
| Scanning Bison directives. | |
| Scanning Bison directives. | |
992 |
`----------------------------*/ |
`----------------------------*/ |
993 |
#line 990 "scan-gram.c" |
#line 994 "lex.yy.c" |
994 |
|
|
995 |
if ( yy_init ) |
if ( yy_init ) |
996 |
{ |
{ |
1092 |
|
|
1093 |
case 1: |
case 1: |
1094 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1095 |
#line 117 "scan-gram.l" |
#line 121 "scan-gram.l" |
1096 |
return PERCENT_NONASSOC; |
return PERCENT_NONASSOC; |
1097 |
YY_BREAK |
YY_BREAK |
1098 |
case 2: |
case 2: |
1099 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1100 |
#line 118 "scan-gram.l" |
#line 122 "scan-gram.l" |
1101 |
return PERCENT_DEBUG; |
return PERCENT_DEBUG; |
1102 |
YY_BREAK |
YY_BREAK |
1103 |
case 3: |
case 3: |
1104 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1105 |
#line 119 "scan-gram.l" |
#line 123 "scan-gram.l" |
1106 |
return PERCENT_DEFINE; |
return PERCENT_DEFINE; |
1107 |
YY_BREAK |
YY_BREAK |
1108 |
case 4: |
case 4: |
1109 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1110 |
#line 120 "scan-gram.l" |
#line 124 "scan-gram.l" |
1111 |
return PERCENT_DEFINES; |
return PERCENT_DEFINES; |
1112 |
YY_BREAK |
YY_BREAK |
1113 |
case 5: |
case 5: |
1114 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1115 |
#line 121 "scan-gram.l" |
#line 125 "scan-gram.l" |
1116 |
return PERCENT_ERROR_VERBOSE; |
return PERCENT_ERROR_VERBOSE; |
1117 |
YY_BREAK |
YY_BREAK |
1118 |
case 6: |
case 6: |
1119 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1120 |
#line 122 "scan-gram.l" |
#line 126 "scan-gram.l" |
1121 |
return PERCENT_EXPECT; |
return PERCENT_EXPECT; |
1122 |
YY_BREAK |
YY_BREAK |
1123 |
case 7: |
case 7: |
1124 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1125 |
#line 123 "scan-gram.l" |
#line 127 "scan-gram.l" |
1126 |
return PERCENT_FILE_PREFIX; |
return PERCENT_FILE_PREFIX; |
1127 |
YY_BREAK |
YY_BREAK |
1128 |
case 8: |
case 8: |
1129 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1130 |
#line 124 "scan-gram.l" |
#line 128 "scan-gram.l" |
1131 |
return PERCENT_YACC; |
return PERCENT_YACC; |
1132 |
YY_BREAK |
YY_BREAK |
1133 |
case 9: |
case 9: |
1134 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1135 |
#line 125 "scan-gram.l" |
#line 129 "scan-gram.l" |
1136 |
return PERCENT_LEFT; |
return PERCENT_LEFT; |
1137 |
YY_BREAK |
YY_BREAK |
1138 |
case 10: |
case 10: |
1139 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1140 |
#line 126 "scan-gram.l" |
#line 130 "scan-gram.l" |
1141 |
return PERCENT_LOCATIONS; |
return PERCENT_LOCATIONS; |
1142 |
YY_BREAK |
YY_BREAK |
1143 |
case 11: |
case 11: |
1144 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1145 |
#line 127 "scan-gram.l" |
#line 131 "scan-gram.l" |
1146 |
return PERCENT_NAME_PREFIX; |
return PERCENT_NAME_PREFIX; |
1147 |
YY_BREAK |
YY_BREAK |
1148 |
case 12: |
case 12: |
1149 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1150 |
#line 128 "scan-gram.l" |
#line 132 "scan-gram.l" |
1151 |
return PERCENT_NO_LINES; |
return PERCENT_NO_LINES; |
1152 |
YY_BREAK |
YY_BREAK |
1153 |
case 13: |
case 13: |
1154 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1155 |
#line 129 "scan-gram.l" |
#line 133 "scan-gram.l" |
1156 |
return PERCENT_NONASSOC; |
return PERCENT_NONASSOC; |
1157 |
YY_BREAK |
YY_BREAK |
1158 |
case 14: |
case 14: |
1159 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1160 |
#line 130 "scan-gram.l" |
#line 134 "scan-gram.l" |
1161 |
return PERCENT_NTERM; |
return PERCENT_NTERM; |
1162 |
YY_BREAK |
YY_BREAK |
1163 |
case 15: |
case 15: |
1164 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1165 |
#line 131 "scan-gram.l" |
#line 135 "scan-gram.l" |
1166 |
return PERCENT_OUTPUT; |
return PERCENT_OUTPUT; |
1167 |
YY_BREAK |
YY_BREAK |
1168 |
case 16: |
case 16: |
1169 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1170 |
#line 132 "scan-gram.l" |
#line 136 "scan-gram.l" |
1171 |
return PERCENT_PREC; |
return PERCENT_PREC; |
1172 |
YY_BREAK |
YY_BREAK |
1173 |
case 17: |
case 17: |
1174 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1175 |
#line 133 "scan-gram.l" |
#line 137 "scan-gram.l" |
1176 |
return PERCENT_PURE_PARSER; |
return PERCENT_PURE_PARSER; |
1177 |
YY_BREAK |
YY_BREAK |
1178 |
case 18: |
case 18: |
1179 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1180 |
#line 134 "scan-gram.l" |
#line 138 "scan-gram.l" |
1181 |
return PERCENT_RIGHT; |
return PERCENT_RIGHT; |
1182 |
YY_BREAK |
YY_BREAK |
1183 |
case 19: |
case 19: |
1184 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1185 |
#line 135 "scan-gram.l" |
#line 139 "scan-gram.l" |
1186 |
return PERCENT_SKELETON; |
return PERCENT_SKELETON; |
1187 |
YY_BREAK |
YY_BREAK |
1188 |
case 20: |
case 20: |
1189 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1190 |
#line 136 "scan-gram.l" |
#line 140 "scan-gram.l" |
1191 |
return PERCENT_START; |
return PERCENT_START; |
1192 |
YY_BREAK |
YY_BREAK |
1193 |
case 21: |
case 21: |
1194 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1195 |
#line 137 "scan-gram.l" |
#line 141 "scan-gram.l" |
1196 |
return PERCENT_TOKEN; |
return PERCENT_TOKEN; |
1197 |
YY_BREAK |
YY_BREAK |
1198 |
case 22: |
case 22: |
1199 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1200 |
#line 138 "scan-gram.l" |
#line 142 "scan-gram.l" |
1201 |
return PERCENT_TOKEN; |
return PERCENT_TOKEN; |
1202 |
YY_BREAK |
YY_BREAK |
1203 |
case 23: |
case 23: |
1204 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1205 |
#line 139 "scan-gram.l" |
#line 143 "scan-gram.l" |
1206 |
return PERCENT_TOKEN_TABLE; |
return PERCENT_TOKEN_TABLE; |
1207 |
YY_BREAK |
YY_BREAK |
1208 |
case 24: |
case 24: |
1209 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1210 |
#line 140 "scan-gram.l" |
#line 144 "scan-gram.l" |
1211 |
return PERCENT_TYPE; |
return PERCENT_TYPE; |
1212 |
YY_BREAK |
YY_BREAK |
1213 |
case 25: |
case 25: |
1214 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1215 |
#line 141 "scan-gram.l" |
#line 145 "scan-gram.l" |
1216 |
return PERCENT_UNION; |
return PERCENT_UNION; |
1217 |
YY_BREAK |
YY_BREAK |
1218 |
case 26: |
case 26: |
1219 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1220 |
#line 142 "scan-gram.l" |
#line 146 "scan-gram.l" |
1221 |
return PERCENT_VERBOSE; |
return PERCENT_VERBOSE; |
1222 |
YY_BREAK |
YY_BREAK |
1223 |
case 27: |
case 27: |
1224 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1225 |
#line 143 "scan-gram.l" |
#line 147 "scan-gram.l" |
1226 |
return PERCENT_YACC; |
return PERCENT_YACC; |
1227 |
YY_BREAK |
YY_BREAK |
1228 |
case 28: |
case 28: |
1229 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1230 |
#line 145 "scan-gram.l" |
#line 149 "scan-gram.l" |
1231 |
return EQUAL; |
return EQUAL; |
1232 |
YY_BREAK |
YY_BREAK |
1233 |
case 29: |
case 29: |
1234 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1235 |
#line 146 "scan-gram.l" |
#line 150 "scan-gram.l" |
1236 |
return COLON; |
return COLON; |
1237 |
YY_BREAK |
YY_BREAK |
1238 |
case 30: |
case 30: |
1239 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1240 |
#line 147 "scan-gram.l" |
#line 151 "scan-gram.l" |
1241 |
return PIPE; |
return PIPE; |
1242 |
YY_BREAK |
YY_BREAK |
1243 |
case 31: |
case 31: |
1244 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1245 |
#line 148 "scan-gram.l" |
#line 152 "scan-gram.l" |
1246 |
return SEMICOLON; |
return SEMICOLON; |
1247 |
YY_BREAK |
YY_BREAK |
1248 |
case 32: |
case 32: |
1249 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1250 |
#line 150 "scan-gram.l" |
#line 154 "scan-gram.l" |
1251 |
YY_LINES; YY_STEP; |
YY_LINES; YY_STEP; |
1252 |
YY_BREAK |
YY_BREAK |
1253 |
case 33: |
case 33: |
1254 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1255 |
#line 151 "scan-gram.l" |
#line 155 "scan-gram.l" |
1256 |
YY_STEP; |
YY_STEP; |
1257 |
YY_BREAK |
YY_BREAK |
1258 |
case 34: |
case 34: |
1259 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1260 |
#line 152 "scan-gram.l" |
#line 156 "scan-gram.l" |
1261 |
{ |
{ |
1262 |
yylval->symbol = getsym (yytext); |
yylval->symbol = getsym (yytext); |
1263 |
return ID; |
return ID; |
1265 |
YY_BREAK |
YY_BREAK |
1266 |
case 35: |
case 35: |
1267 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1268 |
#line 157 "scan-gram.l" |
#line 161 "scan-gram.l" |
1269 |
yylval->integer = strtol (yytext, 0, 10); return INT; |
yylval->integer = strtol (yytext, 0, 10); return INT; |
1270 |
YY_BREAK |
YY_BREAK |
1271 |
/* Characters. We don't check there is only one. */ |
/* Characters. We don't check there is only one. */ |
1272 |
case 36: |
case 36: |
1273 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1274 |
#line 160 "scan-gram.l" |
#line 164 "scan-gram.l" |
1275 |
YY_OBS_GROW; yy_push_state (SC_ESCAPED_CHARACTER); |
YY_OBS_GROW; yy_push_state (SC_ESCAPED_CHARACTER); |
1276 |
YY_BREAK |
YY_BREAK |
1277 |
/* Strings. */ |
/* Strings. */ |
1278 |
case 37: |
case 37: |
1279 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1280 |
#line 163 "scan-gram.l" |
#line 167 "scan-gram.l" |
1281 |
YY_OBS_GROW; yy_push_state (SC_ESCAPED_STRING); |
YY_OBS_GROW; yy_push_state (SC_ESCAPED_STRING); |
1282 |
YY_BREAK |
YY_BREAK |
1283 |
/* Comments. */ |
/* Comments. */ |
1284 |
case 38: |
case 38: |
1285 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1286 |
#line 166 "scan-gram.l" |
#line 170 "scan-gram.l" |
1287 |
yy_push_state (SC_COMMENT); |
yy_push_state (SC_COMMENT); |
1288 |
YY_BREAK |
YY_BREAK |
1289 |
case 39: |
case 39: |
1290 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1291 |
#line 167 "scan-gram.l" |
#line 171 "scan-gram.l" |
1292 |
YY_STEP; |
YY_STEP; |
1293 |
YY_BREAK |
YY_BREAK |
1294 |
/* Prologue. */ |
/* Prologue. */ |
1295 |
case 40: |
case 40: |
1296 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1297 |
#line 170 "scan-gram.l" |
#line 174 "scan-gram.l" |
1298 |
yy_push_state (SC_PROLOGUE); |
yy_push_state (SC_PROLOGUE); |
1299 |
YY_BREAK |
YY_BREAK |
1300 |
/* Code in between braces. */ |
/* Code in between braces. */ |
1301 |
case 41: |
case 41: |
1302 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1303 |
#line 173 "scan-gram.l" |
#line 177 "scan-gram.l" |
1304 |
YY_OBS_GROW; ++braces_level; yy_push_state (SC_BRACED_CODE); |
YY_OBS_GROW; ++braces_level; yy_push_state (SC_BRACED_CODE); |
1305 |
YY_BREAK |
YY_BREAK |
1306 |
/* A type. */ |
/* A type. */ |
1307 |
case 42: |
case 42: |
1308 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1309 |
#line 176 "scan-gram.l" |
#line 180 "scan-gram.l" |
1310 |
{ |
{ |
1311 |
obstack_grow (&string_obstack, yytext + 1, yyleng - 2); |
obstack_grow (&string_obstack, yytext + 1, yyleng - 2); |
1312 |
YY_OBS_FINISH; |
YY_OBS_FINISH; |
1316 |
YY_BREAK |
YY_BREAK |
1317 |
case 43: |
case 43: |
1318 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1319 |
#line 184 "scan-gram.l" |
#line 188 "scan-gram.l" |
1320 |
{ |
{ |
1321 |
if (++percent_percent_count == 2) |
if (++percent_percent_count == 2) |
1322 |
yy_push_state (SC_EPILOGUE); |
yy_push_state (SC_EPILOGUE); |
1325 |
YY_BREAK |
YY_BREAK |
1326 |
case 44: |
case 44: |
1327 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1328 |
#line 190 "scan-gram.l" |
#line 194 "scan-gram.l" |
1329 |
{ |
{ |
1330 |
LOCATION_PRINT (stderr, *yylloc); |
LOCATION_PRINT (stderr, *yylloc); |
1331 |
fprintf (stderr, ": invalid character: `%c'\n", *yytext); |
fprintf (stderr, ": invalid character: `%c'\n", *yytext); |
1342 |
|
|
1343 |
case 45: |
case 45: |
1344 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1345 |
#line 206 "scan-gram.l" |
#line 210 "scan-gram.l" |
1346 |
if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@<:@"); |
if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@<:@"); |
1347 |
YY_BREAK |
YY_BREAK |
1348 |
case 46: |
case 46: |
1349 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1350 |
#line 207 "scan-gram.l" |
#line 211 "scan-gram.l" |
1351 |
if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@:>@"); |
if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@:>@"); |
1352 |
YY_BREAK |
YY_BREAK |
1353 |
|
|
1358 |
|
|
1359 |
case 47: |
case 47: |
1360 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1361 |
#line 218 "scan-gram.l" |
#line 222 "scan-gram.l" |
1362 |
{ /* End of the comment. */ |
{ /* End of the comment. */ |
1363 |
if (yy_top_state () == INITIAL) |
if (yy_top_state () == INITIAL) |
1364 |
{ |
{ |
1373 |
YY_BREAK |
YY_BREAK |
1374 |
case 48: |
case 48: |
1375 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1376 |
#line 230 "scan-gram.l" |
#line 234 "scan-gram.l" |
1377 |
if (yy_top_state () != INITIAL) YY_OBS_GROW; |
if (yy_top_state () != INITIAL) YY_OBS_GROW; |
1378 |
YY_BREAK |
YY_BREAK |
1379 |
case 49: |
case 49: |
1380 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1381 |
#line 231 "scan-gram.l" |
#line 235 "scan-gram.l" |
1382 |
if (yy_top_state () != INITIAL) YY_OBS_GROW; YY_LINES; |
if (yy_top_state () != INITIAL) YY_OBS_GROW; YY_LINES; |
1383 |
YY_BREAK |
YY_BREAK |
1384 |
case 50: |
case 50: |
1385 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1386 |
#line 232 "scan-gram.l" |
#line 236 "scan-gram.l" |
1387 |
/* Stray `*'. */if (yy_top_state () != INITIAL) YY_OBS_GROW; |
/* Stray `*'. */if (yy_top_state () != INITIAL) YY_OBS_GROW; |
1388 |
YY_BREAK |
YY_BREAK |
1389 |
case YY_STATE_EOF(SC_COMMENT): |
case YY_STATE_EOF(SC_COMMENT): |
1390 |
#line 234 "scan-gram.l" |
#line 238 "scan-gram.l" |
1391 |
{ |
{ |
1392 |
LOCATION_PRINT (stderr, *yylloc); |
LOCATION_PRINT (stderr, *yylloc); |
1393 |
fprintf (stderr, ": unexpected end of file in a comment\n"); |
fprintf (stderr, ": unexpected end of file in a comment\n"); |
1403 |
|
|
1404 |
case 51: |
case 51: |
1405 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1406 |
#line 249 "scan-gram.l" |
#line 253 "scan-gram.l" |
1407 |
{ |
{ |
1408 |
assert (yy_top_state () == INITIAL); |
assert (yy_top_state () == INITIAL); |
1409 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1415 |
YY_BREAK |
YY_BREAK |
1416 |
case 52: |
case 52: |
1417 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1418 |
#line 258 "scan-gram.l" |
#line 262 "scan-gram.l" |
1419 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1420 |
YY_BREAK |
YY_BREAK |
1421 |
case 53: |
case 53: |
1422 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1423 |
#line 260 "scan-gram.l" |
#line 264 "scan-gram.l" |
1424 |
obstack_1grow (&string_obstack, '\n'); YY_LINES; |
obstack_1grow (&string_obstack, '\n'); YY_LINES; |
1425 |
YY_BREAK |
YY_BREAK |
1426 |
case YY_STATE_EOF(SC_ESCAPED_STRING): |
case YY_STATE_EOF(SC_ESCAPED_STRING): |
1427 |
#line 262 "scan-gram.l" |
#line 266 "scan-gram.l" |
1428 |
{ |
{ |
1429 |
LOCATION_PRINT (stderr, *yylloc); |
LOCATION_PRINT (stderr, *yylloc); |
1430 |
fprintf (stderr, ": unexpected end of file in a string\n"); |
fprintf (stderr, ": unexpected end of file in a string\n"); |
1444 |
|
|
1445 |
case 54: |
case 54: |
1446 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1447 |
#line 280 "scan-gram.l" |
#line 284 "scan-gram.l" |
1448 |
{ |
{ |
1449 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1450 |
assert (yy_top_state () == INITIAL); |
assert (yy_top_state () == INITIAL); |
1461 |
YY_BREAK |
YY_BREAK |
1462 |
case 55: |
case 55: |
1463 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1464 |
#line 294 "scan-gram.l" |
#line 298 "scan-gram.l" |
1465 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1466 |
YY_BREAK |
YY_BREAK |
1467 |
case 56: |
case 56: |
1468 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1469 |
#line 296 "scan-gram.l" |
#line 300 "scan-gram.l" |
1470 |
obstack_1grow (&string_obstack, '\n'); YY_LINES; |
obstack_1grow (&string_obstack, '\n'); YY_LINES; |
1471 |
YY_BREAK |
YY_BREAK |
1472 |
case YY_STATE_EOF(SC_ESCAPED_CHARACTER): |
case YY_STATE_EOF(SC_ESCAPED_CHARACTER): |
1473 |
#line 298 "scan-gram.l" |
#line 302 "scan-gram.l" |
1474 |
{ |
{ |
1475 |
LOCATION_PRINT (stderr, *yylloc); |
LOCATION_PRINT (stderr, *yylloc); |
1476 |
fprintf (stderr, ": unexpected end of file in a character\n"); |
fprintf (stderr, ": unexpected end of file in a character\n"); |
1489 |
|
|
1490 |
case 57: |
case 57: |
1491 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1492 |
#line 316 "scan-gram.l" |
#line 320 "scan-gram.l" |
1493 |
{ |
{ |
1494 |
long c = strtol (yytext + 1, 0, 8); |
long c = strtol (yytext + 1, 0, 8); |
1495 |
if (c > 255) |
if (c > 255) |
1504 |
YY_BREAK |
YY_BREAK |
1505 |
case 58: |
case 58: |
1506 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1507 |
#line 328 "scan-gram.l" |
#line 332 "scan-gram.l" |
1508 |
{ |
{ |
1509 |
obstack_1grow (&string_obstack, strtol (yytext + 2, 0, 16)); |
obstack_1grow (&string_obstack, strtol (yytext + 2, 0, 16)); |
1510 |
} |
} |
1511 |
YY_BREAK |
YY_BREAK |
1512 |
case 59: |
case 59: |
1513 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1514 |
#line 332 "scan-gram.l" |
#line 336 "scan-gram.l" |
1515 |
obstack_1grow (&string_obstack, '\a'); |
obstack_1grow (&string_obstack, '\a'); |
1516 |
YY_BREAK |
YY_BREAK |
1517 |
case 60: |
case 60: |
1518 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1519 |
#line 333 "scan-gram.l" |
#line 337 "scan-gram.l" |
1520 |
obstack_1grow (&string_obstack, '\b'); |
obstack_1grow (&string_obstack, '\b'); |
1521 |
YY_BREAK |
YY_BREAK |
1522 |
case 61: |
case 61: |
1523 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1524 |
#line 334 "scan-gram.l" |
#line 338 "scan-gram.l" |
1525 |
obstack_1grow (&string_obstack, '\f'); |
obstack_1grow (&string_obstack, '\f'); |
1526 |
YY_BREAK |
YY_BREAK |
1527 |
case 62: |
case 62: |
1528 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1529 |
#line 335 "scan-gram.l" |
#line 339 "scan-gram.l" |
1530 |
obstack_1grow (&string_obstack, '\n'); |
obstack_1grow (&string_obstack, '\n'); |
1531 |
YY_BREAK |
YY_BREAK |
1532 |
case 63: |
case 63: |
1533 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1534 |
#line 336 "scan-gram.l" |
#line 340 "scan-gram.l" |
1535 |
obstack_1grow (&string_obstack, '\r'); |
obstack_1grow (&string_obstack, '\r'); |
1536 |
YY_BREAK |
YY_BREAK |
1537 |
case 64: |
case 64: |
1538 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1539 |
#line 337 "scan-gram.l" |
#line 341 "scan-gram.l" |
1540 |
obstack_1grow (&string_obstack, '\t'); |
obstack_1grow (&string_obstack, '\t'); |
1541 |
YY_BREAK |
YY_BREAK |
1542 |
case 65: |
case 65: |
1543 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1544 |
#line 338 "scan-gram.l" |
#line 342 "scan-gram.l" |
1545 |
obstack_1grow (&string_obstack, '\v'); |
obstack_1grow (&string_obstack, '\v'); |
1546 |
YY_BREAK |
YY_BREAK |
1547 |
case 66: |
case 66: |
1548 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1549 |
#line 339 "scan-gram.l" |
#line 343 "scan-gram.l" |
1550 |
obstack_1grow (&string_obstack, yytext[1]); |
obstack_1grow (&string_obstack, yytext[1]); |
1551 |
YY_BREAK |
YY_BREAK |
1552 |
case 67: |
case 67: |
1553 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1554 |
#line 340 "scan-gram.l" |
#line 344 "scan-gram.l" |
1555 |
{ |
{ |
1556 |
LOCATION_PRINT (stderr, *yylloc); |
LOCATION_PRINT (stderr, *yylloc); |
1557 |
fprintf (stderr, ": unrecognized escape: %s\n", yytext); |
fprintf (stderr, ": unrecognized escape: %s\n", yytext); |
1567 |
|
|
1568 |
case 68: |
case 68: |
1569 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1570 |
#line 355 "scan-gram.l" |
#line 359 "scan-gram.l" |
1571 |
{ |
{ |
1572 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1573 |
assert (yy_top_state () != INITIAL); |
assert (yy_top_state () != INITIAL); |
1576 |
YY_BREAK |
YY_BREAK |
1577 |
case 69: |
case 69: |
1578 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1579 |
#line 361 "scan-gram.l" |
#line 365 "scan-gram.l" |
1580 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1581 |
YY_BREAK |
YY_BREAK |
1582 |
case 70: |
case 70: |
1583 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1584 |
#line 362 "scan-gram.l" |
#line 366 "scan-gram.l" |
1585 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1586 |
YY_BREAK |
YY_BREAK |
1587 |
case 71: |
case 71: |
1588 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1589 |
#line 364 "scan-gram.l" |
#line 368 "scan-gram.l" |
1590 |
YY_OBS_GROW; YY_LINES; |
YY_OBS_GROW; YY_LINES; |
1591 |
YY_BREAK |
YY_BREAK |
1592 |
case YY_STATE_EOF(SC_CHARACTER): |
case YY_STATE_EOF(SC_CHARACTER): |
1593 |
#line 366 "scan-gram.l" |
#line 370 "scan-gram.l" |
1594 |
{ |
{ |
1595 |
LOCATION_PRINT (stderr, *yylloc); |
LOCATION_PRINT (stderr, *yylloc); |
1596 |
fprintf (stderr, ": unexpected end of file in a character\n"); |
fprintf (stderr, ": unexpected end of file in a character\n"); |
1607 |
|
|
1608 |
case 72: |
case 72: |
1609 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1610 |
#line 382 "scan-gram.l" |
#line 386 "scan-gram.l" |
1611 |
{ |
{ |
1612 |
assert (yy_top_state () != INITIAL); |
assert (yy_top_state () != INITIAL); |
1613 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1616 |
YY_BREAK |
YY_BREAK |
1617 |
case 73: |
case 73: |
1618 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1619 |
#line 388 "scan-gram.l" |
#line 392 "scan-gram.l" |
1620 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1621 |
YY_BREAK |
YY_BREAK |
1622 |
case 74: |
case 74: |
1623 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1624 |
#line 389 "scan-gram.l" |
#line 393 "scan-gram.l" |
1625 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1626 |
YY_BREAK |
YY_BREAK |
1627 |
case 75: |
case 75: |
1628 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1629 |
#line 391 "scan-gram.l" |
#line 395 "scan-gram.l" |
1630 |
YY_OBS_GROW; YY_LINES; |
YY_OBS_GROW; YY_LINES; |
1631 |
YY_BREAK |
YY_BREAK |
1632 |
case YY_STATE_EOF(SC_STRING): |
case YY_STATE_EOF(SC_STRING): |
1633 |
#line 393 "scan-gram.l" |
#line 397 "scan-gram.l" |
1634 |
{ |
{ |
1635 |
LOCATION_PRINT (stderr, *yylloc); |
LOCATION_PRINT (stderr, *yylloc); |
1636 |
fprintf (stderr, ": unexpected end of file in a string\n"); |
fprintf (stderr, ": unexpected end of file in a string\n"); |
1647 |
/* Characters. We don't check there is only one. */ |
/* Characters. We don't check there is only one. */ |
1648 |
case 76: |
case 76: |
1649 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1650 |
#line 409 "scan-gram.l" |
#line 413 "scan-gram.l" |
1651 |
YY_OBS_GROW; yy_push_state (SC_CHARACTER); |
YY_OBS_GROW; yy_push_state (SC_CHARACTER); |
1652 |
YY_BREAK |
YY_BREAK |
1653 |
/* Strings. */ |
/* Strings. */ |
1654 |
case 77: |
case 77: |
1655 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1656 |
#line 412 "scan-gram.l" |
#line 416 "scan-gram.l" |
1657 |
YY_OBS_GROW; yy_push_state (SC_STRING); |
YY_OBS_GROW; yy_push_state (SC_STRING); |
1658 |
YY_BREAK |
YY_BREAK |
1659 |
/* Comments. */ |
/* Comments. */ |
1660 |
case 78: |
case 78: |
1661 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1662 |
#line 415 "scan-gram.l" |
#line 419 "scan-gram.l" |
1663 |
YY_OBS_GROW; yy_push_state (SC_COMMENT); |
YY_OBS_GROW; yy_push_state (SC_COMMENT); |
1664 |
YY_BREAK |
YY_BREAK |
1665 |
case 79: |
case 79: |
1666 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1667 |
#line 416 "scan-gram.l" |
#line 420 "scan-gram.l" |
1668 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1669 |
YY_BREAK |
YY_BREAK |
1670 |
|
|
1676 |
|
|
1677 |
case 80: |
case 80: |
1678 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1679 |
#line 427 "scan-gram.l" |
#line 431 "scan-gram.l" |
1680 |
{ |
{ |
1681 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1682 |
if (--braces_level == 0) |
if (--braces_level == 0) |
1690 |
YY_BREAK |
YY_BREAK |
1691 |
case 81: |
case 81: |
1692 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1693 |
#line 438 "scan-gram.l" |
#line 442 "scan-gram.l" |
1694 |
YY_OBS_GROW; braces_level++; |
YY_OBS_GROW; braces_level++; |
1695 |
YY_BREAK |
YY_BREAK |
1696 |
case 82: |
case 82: |
1697 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1698 |
#line 440 "scan-gram.l" |
#line 444 "scan-gram.l" |
1699 |
{ handle_dollar (yytext); } |
{ handle_dollar (yytext); } |
1700 |
YY_BREAK |
YY_BREAK |
1701 |
case 83: |
case 83: |
1702 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1703 |
#line 441 "scan-gram.l" |
#line 445 "scan-gram.l" |
1704 |
{ handle_at (yytext); } |
{ handle_at (yytext); } |
1705 |
YY_BREAK |
YY_BREAK |
1706 |
case 84: |
case 84: |
1707 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1708 |
#line 443 "scan-gram.l" |
#line 447 "scan-gram.l" |
1709 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1710 |
YY_BREAK |
YY_BREAK |
1711 |
case 85: |
case 85: |
1712 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1713 |
#line 444 "scan-gram.l" |
#line 448 "scan-gram.l" |
1714 |
YY_OBS_GROW; YY_LINES; |
YY_OBS_GROW; YY_LINES; |
1715 |
YY_BREAK |
YY_BREAK |
1716 |
/* A lose $, or /, or etc. */ |
/* A lose $, or /, or etc. */ |
1717 |
case 86: |
case 86: |
1718 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1719 |
#line 447 "scan-gram.l" |
#line 451 "scan-gram.l" |
1720 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1721 |
YY_BREAK |
YY_BREAK |
1722 |
case YY_STATE_EOF(SC_BRACED_CODE): |
case YY_STATE_EOF(SC_BRACED_CODE): |
1723 |
#line 449 "scan-gram.l" |
#line 453 "scan-gram.l" |
1724 |
{ |
{ |
1725 |
LOCATION_PRINT (stderr, *yylloc); |
LOCATION_PRINT (stderr, *yylloc); |
1726 |
fprintf (stderr, ": unexpected end of file in a braced code\n"); |
fprintf (stderr, ": unexpected end of file in a braced code\n"); |
1738 |
|
|
1739 |
case 87: |
case 87: |
1740 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1741 |
#line 467 "scan-gram.l" |
#line 471 "scan-gram.l" |
1742 |
{ |
{ |
1743 |
yy_pop_state (); |
yy_pop_state (); |
1744 |
YY_OBS_FINISH; |
YY_OBS_FINISH; |
1748 |
YY_BREAK |
YY_BREAK |
1749 |
case 88: |
case 88: |
1750 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1751 |
#line 474 "scan-gram.l" |
#line 478 "scan-gram.l" |
1752 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1753 |
YY_BREAK |
YY_BREAK |
1754 |
case 89: |
case 89: |
1755 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1756 |
#line 475 "scan-gram.l" |
#line 479 "scan-gram.l" |
1757 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1758 |
YY_BREAK |
YY_BREAK |
1759 |
case 90: |
case 90: |
1760 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1761 |
#line 476 "scan-gram.l" |
#line 480 "scan-gram.l" |
1762 |
YY_OBS_GROW; YY_LINES; |
YY_OBS_GROW; YY_LINES; |
1763 |
YY_BREAK |
YY_BREAK |
1764 |
case YY_STATE_EOF(SC_PROLOGUE): |
case YY_STATE_EOF(SC_PROLOGUE): |
1765 |
#line 478 "scan-gram.l" |
#line 482 "scan-gram.l" |
1766 |
{ |
{ |
1767 |
LOCATION_PRINT (stderr, *yylloc); |
LOCATION_PRINT (stderr, *yylloc); |
1768 |
fprintf (stderr, ": unexpected end of file in a prologue\n"); |
fprintf (stderr, ": unexpected end of file in a prologue\n"); |
1781 |
|
|
1782 |
case 91: |
case 91: |
1783 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1784 |
#line 497 "scan-gram.l" |
#line 501 "scan-gram.l" |
1785 |
YY_OBS_GROW; |
YY_OBS_GROW; |
1786 |
YY_BREAK |
YY_BREAK |
1787 |
case YY_STATE_EOF(SC_EPILOGUE): |
case YY_STATE_EOF(SC_EPILOGUE): |
1788 |
#line 499 "scan-gram.l" |
#line 503 "scan-gram.l" |
1789 |
{ |
{ |
1790 |
yy_pop_state (); |
yy_pop_state (); |
1791 |
YY_OBS_FINISH; |
YY_OBS_FINISH; |
1796 |
|
|
1797 |
case 92: |
case 92: |
1798 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1799 |
#line 508 "scan-gram.l" |
#line 512 "scan-gram.l" |
1800 |
YY_FATAL_ERROR( "flex scanner jammed" ); |
YY_FATAL_ERROR( "flex scanner jammed" ); |
1801 |
YY_BREAK |
YY_BREAK |
1802 |
#line 1799 "scan-gram.c" |
#line 1803 "lex.yy.c" |
1803 |
case YY_STATE_EOF(INITIAL): |
case YY_STATE_EOF(INITIAL): |
1804 |
yyterminate(); |
yyterminate(); |
1805 |
|
|
2689 |
return 0; |
return 0; |
2690 |
} |
} |
2691 |
#endif |
#endif |
2692 |
#line 508 "scan-gram.l" |
#line 512 "scan-gram.l" |
2693 |
|
|
2694 |
|
|
2695 |
/*------------------------------------------------------------------. |
/*------------------------------------------------------------------. |