/[bison]/bison/src/scan-gram.c
ViewVC logotype

Diff of /bison/src/scan-gram.c

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

revision 1.42 by akim, Wed Nov 6 08:08:46 2002 UTC revision 1.43 by akim, Thu Nov 7 12:50:34 2002 UTC
# Line 734  int yy_flex_debug = 1; Line 734  int yy_flex_debug = 1;
734    
735  static yyconst short int yy_rule_linenum[104] =  static yyconst short int yy_rule_linenum[104] =
736      {   0,      {   0,
737        218,  219,  220,  221,  222,  223,  224,  225,  226,  227,        231,  232,  233,  234,  235,  236,  237,  238,  239,  240,
738        228,  229,  230,  231,  232,  233,  234,  235,  236,  237,        241,  242,  243,  244,  245,  246,  247,  248,  249,  250,
739        238,  239,  240,  241,  242,  243,  244,  245,  246,  247,        251,  252,  253,  254,  255,  256,  257,  258,  259,  260,
740        248,  249,  250,  251,  253,  258,  260,  261,  262,  263,        261,  262,  263,  264,  266,  271,  273,  274,  275,  276,
741        264,  266,  268,  274,  288,  291,  294,  295,  298,  301,        277,  279,  281,  287,  301,  304,  307,  308,  311,  314,
742        304,  312,  318,  333,  334,  344,  349,  364,  365,  380,        317,  325,  331,  346,  347,  357,  362,  377,  378,  393,
743        381,  393,  403,  422,  438,  457,  469,  483,  484,  485,        394,  406,  416,  435,  451,  470,  482,  496,  497,  498,
744        486,  487,  488,  489,  490,  491,  502,  508,  519,  525,        499,  500,  501,  502,  503,  504,  515,  521,  532,  538,
745        526,  527,  529,  546,  552,  553,  554,  556,  573,  576,        539,  540,  542,  559,  565,  566,  567,  569,  586,  589,
746        579,  580,  583,  594,  595,  596,  609,  611,  616,  635,        592,  593,  596,  607,  608,  609,  622,  624,  629,  648,
747    
748        642,  643,  662        655,  656,  675
749      } ;      } ;
750    
751  /* The intent behind this definition is that it'll catch  /* The intent behind this definition is that it'll catch
# Line 888  extend_location (location_t *loc, char c Line 888  extend_location (location_t *loc, char c
888  }  }
889    
890    
891    /* Report an unexpected end of file at LOC.  A token or comment began
892       with TOKEN_START, but an end of file was encountered and the
893       expected TOKEN_END was missing.  */
894    
895    static void
896    unexpected_end_of_file (location_t loc,
897                            char const *token_start, char const *token_end)
898    {
899      complain_at (loc, _("unexpected end of file in `%s ... %s'"),
900                   token_start, token_end);
901    }
902    
903    
904    
905  /* STRING_OBSTACK -- Used to store all the characters that we need to  /* STRING_OBSTACK -- Used to store all the characters that we need to
906     keep (to construct ID, STRINGS etc.).  Use the following macros to     keep (to construct ID, STRINGS etc.).  Use the following macros to
# Line 958  static int convert_ucn_to_byte (char con Line 971  static int convert_ucn_to_byte (char con
971     NUL and newline, as this simplifies our implementation.  */     NUL and newline, as this simplifies our implementation.  */
972  /* Zero or more instances of backslash-newline.  Following GCC, allow  /* Zero or more instances of backslash-newline.  Following GCC, allow
973     white space between the backslash and the newline.  */     white space between the backslash and the newline.  */
974  #line 962 "scan-gram.c"  #line 975 "scan-gram.c"
975    
976  /* Macros after this point can all be overridden by user definitions in  /* Macros after this point can all be overridden by user definitions in
977   * section 1.   * section 1.
# Line 1123  YY_DECL Line 1136  YY_DECL
1136          register char *yy_cp, *yy_bp;          register char *yy_cp, *yy_bp;
1137          register int yy_act;          register int yy_act;
1138    
1139  #line 203 "scan-gram.l"  #line 216 "scan-gram.l"
1140    
1141    
1142    int braces_level IF_LINT (= 0);    int braces_level IF_LINT (= 0);
# Line 1137  YY_DECL Line 1150  YY_DECL
1150    /*----------------------------.    /*----------------------------.
1151    | Scanning Bison directives.  |    | Scanning Bison directives.  |
1152    `----------------------------*/    `----------------------------*/
1153  #line 1141 "scan-gram.c"  #line 1154 "scan-gram.c"
1154    
1155          if ( yy_init )          if ( yy_init )
1156                  {                  {
# Line 1240  do_action:     /* This label is used only to Line 1253  do_action:     /* This label is used only to
1253    
1254  case 1:  case 1:
1255  YY_RULE_SETUP  YY_RULE_SETUP
1256  #line 218 "scan-gram.l"  #line 231 "scan-gram.l"
1257  return PERCENT_NONASSOC;  return PERCENT_NONASSOC;
1258          YY_BREAK          YY_BREAK
1259  case 2:  case 2:
1260  YY_RULE_SETUP  YY_RULE_SETUP
1261  #line 219 "scan-gram.l"  #line 232 "scan-gram.l"
1262  return PERCENT_DEBUG;  return PERCENT_DEBUG;
1263          YY_BREAK          YY_BREAK
1264  case 3:  case 3:
1265  YY_RULE_SETUP  YY_RULE_SETUP
1266  #line 220 "scan-gram.l"  #line 233 "scan-gram.l"
1267  return PERCENT_DEFINE;  return PERCENT_DEFINE;
1268          YY_BREAK          YY_BREAK
1269  case 4:  case 4:
1270  YY_RULE_SETUP  YY_RULE_SETUP
1271  #line 221 "scan-gram.l"  #line 234 "scan-gram.l"
1272  return PERCENT_DEFINES;  return PERCENT_DEFINES;
1273          YY_BREAK          YY_BREAK
1274  case 5:  case 5:
1275  YY_RULE_SETUP  YY_RULE_SETUP
1276  #line 222 "scan-gram.l"  #line 235 "scan-gram.l"
1277  return PERCENT_DESTRUCTOR;  return PERCENT_DESTRUCTOR;
1278          YY_BREAK          YY_BREAK
1279  case 6:  case 6:
1280  YY_RULE_SETUP  YY_RULE_SETUP
1281  #line 223 "scan-gram.l"  #line 236 "scan-gram.l"
1282  return PERCENT_DPREC;  return PERCENT_DPREC;
1283          YY_BREAK          YY_BREAK
1284  case 7:  case 7:
1285  YY_RULE_SETUP  YY_RULE_SETUP
1286  #line 224 "scan-gram.l"  #line 237 "scan-gram.l"
1287  return PERCENT_ERROR_VERBOSE;  return PERCENT_ERROR_VERBOSE;
1288          YY_BREAK          YY_BREAK
1289  case 8:  case 8:
1290  YY_RULE_SETUP  YY_RULE_SETUP
1291  #line 225 "scan-gram.l"  #line 238 "scan-gram.l"
1292  return PERCENT_EXPECT;  return PERCENT_EXPECT;
1293          YY_BREAK          YY_BREAK
1294  case 9:  case 9:
1295  YY_RULE_SETUP  YY_RULE_SETUP
1296  #line 226 "scan-gram.l"  #line 239 "scan-gram.l"
1297  return PERCENT_FILE_PREFIX;  return PERCENT_FILE_PREFIX;
1298          YY_BREAK          YY_BREAK
1299  case 10:  case 10:
1300  YY_RULE_SETUP  YY_RULE_SETUP
1301  #line 227 "scan-gram.l"  #line 240 "scan-gram.l"
1302  return PERCENT_YACC;  return PERCENT_YACC;
1303          YY_BREAK          YY_BREAK
1304  case 11:  case 11:
1305  YY_RULE_SETUP  YY_RULE_SETUP
1306  #line 228 "scan-gram.l"  #line 241 "scan-gram.l"
1307  return PERCENT_GLR_PARSER;  return PERCENT_GLR_PARSER;
1308          YY_BREAK          YY_BREAK
1309  case 12:  case 12:
1310  YY_RULE_SETUP  YY_RULE_SETUP
1311  #line 229 "scan-gram.l"  #line 242 "scan-gram.l"
1312  return PERCENT_LEFT;  return PERCENT_LEFT;
1313          YY_BREAK          YY_BREAK
1314  case 13:  case 13:
1315  YY_RULE_SETUP  YY_RULE_SETUP
1316  #line 230 "scan-gram.l"  #line 243 "scan-gram.l"
1317  return PERCENT_LOCATIONS;  return PERCENT_LOCATIONS;
1318          YY_BREAK          YY_BREAK
1319  case 14:  case 14:
1320  YY_RULE_SETUP  YY_RULE_SETUP
1321  #line 231 "scan-gram.l"  #line 244 "scan-gram.l"
1322  return PERCENT_MERGE;  return PERCENT_MERGE;
1323          YY_BREAK          YY_BREAK
1324  case 15:  case 15:
1325  YY_RULE_SETUP  YY_RULE_SETUP
1326  #line 232 "scan-gram.l"  #line 245 "scan-gram.l"
1327  return PERCENT_NAME_PREFIX;  return PERCENT_NAME_PREFIX;
1328          YY_BREAK          YY_BREAK
1329  case 16:  case 16:
1330  YY_RULE_SETUP  YY_RULE_SETUP
1331  #line 233 "scan-gram.l"  #line 246 "scan-gram.l"
1332  return PERCENT_NO_LINES;  return PERCENT_NO_LINES;
1333          YY_BREAK          YY_BREAK
1334  case 17:  case 17:
1335  YY_RULE_SETUP  YY_RULE_SETUP
1336  #line 234 "scan-gram.l"  #line 247 "scan-gram.l"
1337  return PERCENT_NONASSOC;  return PERCENT_NONASSOC;
1338          YY_BREAK          YY_BREAK
1339  case 18:  case 18:
1340  YY_RULE_SETUP  YY_RULE_SETUP
1341  #line 235 "scan-gram.l"  #line 248 "scan-gram.l"
1342  return PERCENT_NTERM;  return PERCENT_NTERM;
1343          YY_BREAK          YY_BREAK
1344  case 19:  case 19:
1345  YY_RULE_SETUP  YY_RULE_SETUP
1346  #line 236 "scan-gram.l"  #line 249 "scan-gram.l"
1347  return PERCENT_OUTPUT;  return PERCENT_OUTPUT;
1348          YY_BREAK          YY_BREAK
1349  case 20:  case 20:
1350  YY_RULE_SETUP  YY_RULE_SETUP
1351  #line 237 "scan-gram.l"  #line 250 "scan-gram.l"
1352  return PERCENT_PARSE_PARAM;  return PERCENT_PARSE_PARAM;
1353          YY_BREAK          YY_BREAK
1354  case 21:  case 21:
1355  YY_RULE_SETUP  YY_RULE_SETUP
1356  #line 238 "scan-gram.l"  #line 251 "scan-gram.l"
1357  rule_length--; return PERCENT_PREC;  rule_length--; return PERCENT_PREC;
1358          YY_BREAK          YY_BREAK
1359  case 22:  case 22:
1360  YY_RULE_SETUP  YY_RULE_SETUP
1361  #line 239 "scan-gram.l"  #line 252 "scan-gram.l"
1362  return PERCENT_PRINTER;  return PERCENT_PRINTER;
1363          YY_BREAK          YY_BREAK
1364  case 23:  case 23:
1365  YY_RULE_SETUP  YY_RULE_SETUP
1366  #line 240 "scan-gram.l"  #line 253 "scan-gram.l"
1367  return PERCENT_PURE_PARSER;  return PERCENT_PURE_PARSER;
1368          YY_BREAK          YY_BREAK
1369  case 24:  case 24:
1370  YY_RULE_SETUP  YY_RULE_SETUP
1371  #line 241 "scan-gram.l"  #line 254 "scan-gram.l"
1372  return PERCENT_RIGHT;  return PERCENT_RIGHT;
1373          YY_BREAK          YY_BREAK
1374  case 25:  case 25:
1375  YY_RULE_SETUP  YY_RULE_SETUP
1376  #line 242 "scan-gram.l"  #line 255 "scan-gram.l"
1377  return PERCENT_LEX_PARAM;  return PERCENT_LEX_PARAM;
1378          YY_BREAK          YY_BREAK
1379  case 26:  case 26:
1380  YY_RULE_SETUP  YY_RULE_SETUP
1381  #line 243 "scan-gram.l"  #line 256 "scan-gram.l"
1382  return PERCENT_SKELETON;  return PERCENT_SKELETON;
1383          YY_BREAK          YY_BREAK
1384  case 27:  case 27:
1385  YY_RULE_SETUP  YY_RULE_SETUP
1386  #line 244 "scan-gram.l"  #line 257 "scan-gram.l"
1387  return PERCENT_START;  return PERCENT_START;
1388          YY_BREAK          YY_BREAK
1389  case 28:  case 28:
1390  YY_RULE_SETUP  YY_RULE_SETUP
1391  #line 245 "scan-gram.l"  #line 258 "scan-gram.l"
1392  return PERCENT_TOKEN;  return PERCENT_TOKEN;
1393          YY_BREAK          YY_BREAK
1394  case 29:  case 29:
1395  YY_RULE_SETUP  YY_RULE_SETUP
1396  #line 246 "scan-gram.l"  #line 259 "scan-gram.l"
1397  return PERCENT_TOKEN;  return PERCENT_TOKEN;
1398          YY_BREAK          YY_BREAK
1399  case 30:  case 30:
1400  YY_RULE_SETUP  YY_RULE_SETUP
1401  #line 247 "scan-gram.l"  #line 260 "scan-gram.l"
1402  return PERCENT_TOKEN_TABLE;  return PERCENT_TOKEN_TABLE;
1403          YY_BREAK          YY_BREAK
1404  case 31:  case 31:
1405  YY_RULE_SETUP  YY_RULE_SETUP
1406  #line 248 "scan-gram.l"  #line 261 "scan-gram.l"
1407  return PERCENT_TYPE;  return PERCENT_TYPE;
1408          YY_BREAK          YY_BREAK
1409  case 32:  case 32:
1410  YY_RULE_SETUP  YY_RULE_SETUP
1411  #line 249 "scan-gram.l"  #line 262 "scan-gram.l"
1412  return PERCENT_UNION;  return PERCENT_UNION;
1413          YY_BREAK          YY_BREAK
1414  case 33:  case 33:
1415  YY_RULE_SETUP  YY_RULE_SETUP
1416  #line 250 "scan-gram.l"  #line 263 "scan-gram.l"
1417  return PERCENT_VERBOSE;  return PERCENT_VERBOSE;
1418          YY_BREAK          YY_BREAK
1419  case 34:  case 34:
1420  YY_RULE_SETUP  YY_RULE_SETUP
1421  #line 251 "scan-gram.l"  #line 264 "scan-gram.l"
1422  return PERCENT_YACC;  return PERCENT_YACC;
1423          YY_BREAK          YY_BREAK
1424  case 35:  case 35:
1425  YY_RULE_SETUP  YY_RULE_SETUP
1426  #line 253 "scan-gram.l"  #line 266 "scan-gram.l"
1427  {  {
1428      complain_at (*yylloc, _("invalid directive: %s"), quote (yytext));      complain_at (*yylloc, _("invalid directive: %s"), quote (yytext));
1429      YY_STEP;      YY_STEP;
# Line 1418  YY_RULE_SETUP Line 1431  YY_RULE_SETUP
1431          YY_BREAK          YY_BREAK
1432  case 36:  case 36:
1433  YY_RULE_SETUP  YY_RULE_SETUP
1434  #line 258 "scan-gram.l"  #line 271 "scan-gram.l"
1435  handle_syncline (yytext + strlen ("#line "), yylloc); YY_STEP;  handle_syncline (yytext + strlen ("#line "), yylloc); YY_STEP;
1436          YY_BREAK          YY_BREAK
1437  case 37:  case 37:
1438  YY_RULE_SETUP  YY_RULE_SETUP
1439  #line 260 "scan-gram.l"  #line 273 "scan-gram.l"
1440  return EQUAL;  return EQUAL;
1441          YY_BREAK          YY_BREAK
1442  case 38:  case 38:
1443  YY_RULE_SETUP  YY_RULE_SETUP
1444  #line 261 "scan-gram.l"  #line 274 "scan-gram.l"
1445  rule_length = 0; return COLON;  rule_length = 0; return COLON;
1446          YY_BREAK          YY_BREAK
1447  case 39:  case 39:
1448  YY_RULE_SETUP  YY_RULE_SETUP
1449  #line 262 "scan-gram.l"  #line 275 "scan-gram.l"
1450  rule_length = 0; return PIPE;  rule_length = 0; return PIPE;
1451          YY_BREAK          YY_BREAK
1452  case 40:  case 40:
1453  YY_RULE_SETUP  YY_RULE_SETUP
1454  #line 263 "scan-gram.l"  #line 276 "scan-gram.l"
1455  return COMMA;  return COMMA;
1456          YY_BREAK          YY_BREAK
1457  case 41:  case 41:
1458  YY_RULE_SETUP  YY_RULE_SETUP
1459  #line 264 "scan-gram.l"  #line 277 "scan-gram.l"
1460  return SEMICOLON;  return SEMICOLON;
1461          YY_BREAK          YY_BREAK
1462  case 42:  case 42:
1463  YY_RULE_SETUP  YY_RULE_SETUP
1464  #line 266 "scan-gram.l"  #line 279 "scan-gram.l"
1465  YY_STEP;  YY_STEP;
1466          YY_BREAK          YY_BREAK
1467  case 43:  case 43:
1468  YY_RULE_SETUP  YY_RULE_SETUP
1469  #line 268 "scan-gram.l"  #line 281 "scan-gram.l"
1470  {  {
1471      yylval->symbol = symbol_get (yytext, *yylloc);      yylval->symbol = symbol_get (yytext, *yylloc);
1472      rule_length++;      rule_length++;
# Line 1462  YY_RULE_SETUP Line 1475  YY_RULE_SETUP
1475          YY_BREAK          YY_BREAK
1476  case 44:  case 44:
1477  YY_RULE_SETUP  YY_RULE_SETUP
1478  #line 274 "scan-gram.l"  #line 287 "scan-gram.l"
1479  {  {
1480      unsigned long num;      unsigned long num;
1481      errno = 0;      errno = 0;
# Line 1479  YY_RULE_SETUP Line 1492  YY_RULE_SETUP
1492  /* Characters.  We don't check there is only one.  */  /* Characters.  We don't check there is only one.  */
1493  case 45:  case 45:
1494  YY_RULE_SETUP  YY_RULE_SETUP
1495  #line 288 "scan-gram.l"  #line 301 "scan-gram.l"
1496  YY_OBS_GROW; yy_push_state (SC_ESCAPED_CHARACTER);  YY_OBS_GROW; yy_push_state (SC_ESCAPED_CHARACTER);
1497          YY_BREAK          YY_BREAK
1498  /* Strings. */  /* Strings. */
1499  case 46:  case 46:
1500  YY_RULE_SETUP  YY_RULE_SETUP
1501  #line 291 "scan-gram.l"  #line 304 "scan-gram.l"
1502  YY_OBS_GROW; yy_push_state (SC_ESCAPED_STRING);  YY_OBS_GROW; yy_push_state (SC_ESCAPED_STRING);
1503          YY_BREAK          YY_BREAK
1504  /* Comments. */  /* Comments. */
1505  case 47:  case 47:
1506  YY_RULE_SETUP  YY_RULE_SETUP
1507  #line 294 "scan-gram.l"  #line 307 "scan-gram.l"
1508  BEGIN SC_YACC_COMMENT;  BEGIN SC_YACC_COMMENT;
1509          YY_BREAK          YY_BREAK
1510  case 48:  case 48:
1511  YY_RULE_SETUP  YY_RULE_SETUP
1512  #line 295 "scan-gram.l"  #line 308 "scan-gram.l"
1513  YY_STEP;  YY_STEP;
1514          YY_BREAK          YY_BREAK
1515  /* Prologue. */  /* Prologue. */
1516  case 49:  case 49:
1517  YY_RULE_SETUP  YY_RULE_SETUP
1518  #line 298 "scan-gram.l"  #line 311 "scan-gram.l"
1519  yy_push_state (SC_PROLOGUE);  yy_push_state (SC_PROLOGUE);
1520          YY_BREAK          YY_BREAK
1521  /* Code in between braces.  */  /* Code in between braces.  */
1522  case 50:  case 50:
1523  YY_RULE_SETUP  YY_RULE_SETUP
1524  #line 301 "scan-gram.l"  #line 314 "scan-gram.l"
1525  YY_OBS_GROW; braces_level = 0; yy_push_state (SC_BRACED_CODE);  YY_OBS_GROW; braces_level = 0; yy_push_state (SC_BRACED_CODE);
1526          YY_BREAK          YY_BREAK
1527  /* A type. */  /* A type. */
1528  case 51:  case 51:
1529  YY_RULE_SETUP  YY_RULE_SETUP
1530  #line 304 "scan-gram.l"  #line 317 "scan-gram.l"
1531  {  {
1532      obstack_grow (&string_obstack, yytext + 1, yyleng - 2);      obstack_grow (&string_obstack, yytext + 1, yyleng - 2);
1533      YY_OBS_FINISH;      YY_OBS_FINISH;
# Line 1524  YY_RULE_SETUP Line 1537  YY_RULE_SETUP
1537          YY_BREAK          YY_BREAK
1538  case 52:  case 52:
1539  YY_RULE_SETUP  YY_RULE_SETUP
1540  #line 312 "scan-gram.l"  #line 325 "scan-gram.l"
1541  {  {
1542      if (++percent_percent_count == 2)      if (++percent_percent_count == 2)
1543        yy_push_state (SC_EPILOGUE);        yy_push_state (SC_EPILOGUE);
# Line 1533  YY_RULE_SETUP Line 1546  YY_RULE_SETUP
1546          YY_BREAK          YY_BREAK
1547  case 53:  case 53:
1548  YY_RULE_SETUP  YY_RULE_SETUP
1549  #line 318 "scan-gram.l"  #line 331 "scan-gram.l"
1550  {  {
1551      complain_at (*yylloc, _("invalid character: %s"), quote (yytext));      complain_at (*yylloc, _("invalid character: %s"), quote (yytext));
1552      YY_STEP;      YY_STEP;
# Line 1549  YY_RULE_SETUP Line 1562  YY_RULE_SETUP
1562    
1563  case 54:  case 54:
1564  YY_RULE_SETUP  YY_RULE_SETUP
1565  #line 333 "scan-gram.l"  #line 346 "scan-gram.l"
1566  obstack_sgrow (&string_obstack, "@<:@");  obstack_sgrow (&string_obstack, "@<:@");
1567          YY_BREAK          YY_BREAK
1568  case 55:  case 55:
1569  YY_RULE_SETUP  YY_RULE_SETUP
1570  #line 334 "scan-gram.l"  #line 347 "scan-gram.l"
1571  obstack_sgrow (&string_obstack, "@:>@");  obstack_sgrow (&string_obstack, "@:>@");
1572          YY_BREAK          YY_BREAK
1573    
# Line 1565  obstack_sgrow (&string_obstack, "@:>@"); Line 1578  obstack_sgrow (&string_obstack, "@:>@");
1578    
1579  case 56:  case 56:
1580  YY_RULE_SETUP  YY_RULE_SETUP
1581  #line 344 "scan-gram.l"  #line 357 "scan-gram.l"
1582  {  {
1583      YY_STEP;      YY_STEP;
1584      BEGIN INITIAL;      BEGIN INITIAL;
# Line 1573  YY_RULE_SETUP Line 1586  YY_RULE_SETUP
1586          YY_BREAK          YY_BREAK
1587  case 57:  case 57:
1588  YY_RULE_SETUP  YY_RULE_SETUP
1589  #line 349 "scan-gram.l"  #line 362 "scan-gram.l"
1590  ;  ;
1591          YY_BREAK          YY_BREAK
1592  case YY_STATE_EOF(SC_YACC_COMMENT):  case YY_STATE_EOF(SC_YACC_COMMENT):
1593  #line 351 "scan-gram.l"  #line 364 "scan-gram.l"
1594  {  {
1595      complain_at (*yylloc, _("unexpected end of file in a comment"));      unexpected_end_of_file (*yylloc, "/*", "*/");
1596      BEGIN INITIAL;      BEGIN INITIAL;
1597    }    }
1598          YY_BREAK          YY_BREAK
# Line 1591  case YY_STATE_EOF(SC_YACC_COMMENT): Line 1604  case YY_STATE_EOF(SC_YACC_COMMENT):
1604    
1605  case 58:  case 58:
1606  YY_RULE_SETUP  YY_RULE_SETUP
1607  #line 364 "scan-gram.l"  #line 377 "scan-gram.l"
1608  YY_OBS_GROW; yy_pop_state ();  YY_OBS_GROW; yy_pop_state ();
1609          YY_BREAK          YY_BREAK
1610  case 59:  case 59:
1611  YY_RULE_SETUP  YY_RULE_SETUP
1612  #line 365 "scan-gram.l"  #line 378 "scan-gram.l"
1613  YY_OBS_GROW;  YY_OBS_GROW;
1614          YY_BREAK          YY_BREAK
1615  case YY_STATE_EOF(SC_COMMENT):  case YY_STATE_EOF(SC_COMMENT):
1616  #line 367 "scan-gram.l"  #line 380 "scan-gram.l"
1617  {  {
1618      complain_at (*yylloc, _("unexpected end of file in a comment"));      unexpected_end_of_file (*yylloc, "/*", "*/");
1619      yy_pop_state ();      yy_pop_state ();
1620    }    }
1621          YY_BREAK          YY_BREAK
# Line 1614  case YY_STATE_EOF(SC_COMMENT): Line 1627  case YY_STATE_EOF(SC_COMMENT):
1627    
1628  case 60:  case 60:
1629  YY_RULE_SETUP  YY_RULE_SETUP
1630  #line 380 "scan-gram.l"  #line 393 "scan-gram.l"
1631  YY_OBS_GROW; yy_pop_state ();  YY_OBS_GROW; yy_pop_state ();
1632          YY_BREAK          YY_BREAK
1633  case 61:  case 61:
1634  YY_RULE_SETUP  YY_RULE_SETUP
1635  #line 381 "scan-gram.l"  #line 394 "scan-gram.l"
1636  YY_OBS_GROW;  YY_OBS_GROW;
1637          YY_BREAK          YY_BREAK
1638  case YY_STATE_EOF(SC_LINE_COMMENT):  case YY_STATE_EOF(SC_LINE_COMMENT):
1639  #line 382 "scan-gram.l"  #line 395 "scan-gram.l"
1640  yy_pop_state ();  yy_pop_state ();
1641          YY_BREAK          YY_BREAK
1642    
# Line 1635  yy_pop_state (); Line 1648  yy_pop_state ();
1648    
1649  case 62:  case 62:
1650  YY_RULE_SETUP  YY_RULE_SETUP
1651  #line 393 "scan-gram.l"  #line 406 "scan-gram.l"
1652  {  {
1653      assert (yy_top_state () == INITIAL);      assert (yy_top_state () == INITIAL);
1654      YY_OBS_GROW;      YY_OBS_GROW;
# Line 1648  YY_RULE_SETUP Line 1661  YY_RULE_SETUP
1661          YY_BREAK          YY_BREAK
1662  case 63:  case 63:
1663  YY_RULE_SETUP  YY_RULE_SETUP
1664  #line 403 "scan-gram.l"  #line 416 "scan-gram.l"
1665  YY_OBS_GROW;  YY_OBS_GROW;
1666          YY_BREAK          YY_BREAK
1667  case YY_STATE_EOF(SC_ESCAPED_STRING):  case YY_STATE_EOF(SC_ESCAPED_STRING):
1668  #line 405 "scan-gram.l"  #line 418 "scan-gram.l"
1669  {  {
1670      complain_at (*yylloc, _("unexpected end of file in a string"));      unexpected_end_of_file (*yylloc, "\"", "\"");
1671      assert (yy_top_state () == INITIAL);      assert (yy_top_state () == INITIAL);
1672      YY_OBS_FINISH;      YY_OBS_FINISH;
1673      yylval->string = last_string;      yylval->string = last_string;
# Line 1671  case YY_STATE_EOF(SC_ESCAPED_STRING): Line 1684  case YY_STATE_EOF(SC_ESCAPED_STRING):
1684    
1685  case 64:  case 64:
1686  YY_RULE_SETUP  YY_RULE_SETUP
1687  #line 422 "scan-gram.l"  #line 435 "scan-gram.l"
1688  {  {
1689      YY_OBS_GROW;      YY_OBS_GROW;
1690      assert (yy_top_state () == INITIAL);      assert (yy_top_state () == INITIAL);
# Line 1690  YY_RULE_SETUP Line 1703  YY_RULE_SETUP
1703          YY_BREAK          YY_BREAK
1704  case 65:  case 65:
1705  YY_RULE_SETUP  YY_RULE_SETUP
1706  #line 438 "scan-gram.l"  #line 451 "scan-gram.l"
1707  YY_OBS_GROW;  YY_OBS_GROW;
1708          YY_BREAK          YY_BREAK
1709  case YY_STATE_EOF(SC_ESCAPED_CHARACTER):  case YY_STATE_EOF(SC_ESCAPED_CHARACTER):
1710  #line 440 "scan-gram.l"  #line 453 "scan-gram.l"
1711  {  {
1712      complain_at (*yylloc, _("unexpected end of file in a character literal"));      unexpected_end_of_file (*yylloc, "'", "'");
1713      assert (yy_top_state () == INITIAL);      assert (yy_top_state () == INITIAL);
1714      YY_OBS_FINISH;      YY_OBS_FINISH;
1715      yylval->string = last_string;      yylval->string = last_string;
# Line 1712  case YY_STATE_EOF(SC_ESCAPED_CHARACTER): Line 1725  case YY_STATE_EOF(SC_ESCAPED_CHARACTER):
1725    
1726  case 66:  case 66:
1727  YY_RULE_SETUP  YY_RULE_SETUP
1728  #line 457 "scan-gram.l"  #line 470 "scan-gram.l"
1729  {  {
1730      unsigned long c = strtoul (yytext + 1, 0, 8);      unsigned long c = strtoul (yytext + 1, 0, 8);
1731      if (UCHAR_MAX < c)      if (UCHAR_MAX < c)
# Line 1727  YY_RULE_SETUP Line 1740  YY_RULE_SETUP
1740          YY_BREAK          YY_BREAK
1741  case 67:  case 67:
1742  YY_RULE_SETUP  YY_RULE_SETUP
1743  #line 469 "scan-gram.l"  #line 482 "scan-gram.l"
1744  {  {
1745      unsigned long c;      unsigned long c;
1746      errno = 0;      errno = 0;
# Line 1744  YY_RULE_SETUP Line 1757  YY_RULE_SETUP
1757          YY_BREAK          YY_BREAK
1758  case 68:  case 68:
1759  YY_RULE_SETUP  YY_RULE_SETUP
1760  #line 483 "scan-gram.l"  #line 496 "scan-gram.l"
1761  obstack_1grow (&string_obstack, '\a');  obstack_1grow (&string_obstack, '\a');
1762          YY_BREAK          YY_BREAK
1763  case 69:  case 69:
1764  YY_RULE_SETUP  YY_RULE_SETUP
1765  #line 484 "scan-gram.l"  #line 497 "scan-gram.l"
1766  obstack_1grow (&string_obstack, '\b');  obstack_1grow (&string_obstack, '\b');
1767          YY_BREAK          YY_BREAK
1768  case 70:  case 70:
1769  YY_RULE_SETUP  YY_RULE_SETUP
1770  #line 485 "scan-gram.l"  #line 498 "scan-gram.l"
1771  obstack_1grow (&string_obstack, '\f');  obstack_1grow (&string_obstack, '\f');
1772          YY_BREAK          YY_BREAK
1773  case 71:  case 71:
1774  YY_RULE_SETUP  YY_RULE_SETUP
1775  #line 486 "scan-gram.l"  #line 499 "scan-gram.l"
1776  obstack_1grow (&string_obstack, '\n');  obstack_1grow (&string_obstack, '\n');
1777          YY_BREAK          YY_BREAK
1778  case 72:  case 72:
1779  YY_RULE_SETUP  YY_RULE_SETUP
1780  #line 487 "scan-gram.l"  #line 500 "scan-gram.l"
1781  obstack_1grow (&string_obstack, '\r');  obstack_1grow (&string_obstack, '\r');
1782          YY_BREAK          YY_BREAK
1783  case 73:  case 73:
1784  YY_RULE_SETUP  YY_RULE_SETUP
1785  #line 488 "scan-gram.l"  #line 501 "scan-gram.l"
1786  obstack_1grow (&string_obstack, '\t');  obstack_1grow (&string_obstack, '\t');
1787          YY_BREAK          YY_BREAK
1788  case 74:  case 74:
1789  YY_RULE_SETUP  YY_RULE_SETUP
1790  #line 489 "scan-gram.l"  #line 502 "scan-gram.l"
1791  obstack_1grow (&string_obstack, '\v');  obstack_1grow (&string_obstack, '\v');
1792          YY_BREAK          YY_BREAK
1793  case 75:  case 75:
1794  YY_RULE_SETUP  YY_RULE_SETUP
1795  #line 490 "scan-gram.l"  #line 503 "scan-gram.l"
1796  obstack_1grow (&string_obstack, yytext[1]);  obstack_1grow (&string_obstack, yytext[1]);
1797          YY_BREAK          YY_BREAK
1798  case 76:  case 76:
1799  YY_RULE_SETUP  YY_RULE_SETUP
1800  #line 491 "scan-gram.l"  #line 504 "scan-gram.l"
1801  {  {
1802      int c = convert_ucn_to_byte (yytext);      int c = convert_ucn_to_byte (yytext);
1803      if (c < 0)      if (c < 0)
# Line 1799  YY_RULE_SETUP Line 1812  YY_RULE_SETUP
1812          YY_BREAK          YY_BREAK
1813  case 77:  case 77:
1814  YY_RULE_SETUP  YY_RULE_SETUP
1815  #line 502 "scan-gram.l"  #line 515 "scan-gram.l"
1816  {  {
1817      complain_at (*yylloc, _("unrecognized escape sequence: %s"),      complain_at (*yylloc, _("unrecognized escape sequence: %s"),
1818                   quote (yytext));                   quote (yytext));
# Line 1809  YY_RULE_SETUP Line 1822  YY_RULE_SETUP
1822  /* FLex wants this rule, in case of a `\<<EOF>>'. */  /* FLex wants this rule, in case of a `\<<EOF>>'. */
1823  case 78:  case 78:
1824  YY_RULE_SETUP  YY_RULE_SETUP
1825  #line 508 "scan-gram.l"  #line 521 "scan-gram.l"
1826  YY_OBS_GROW;  YY_OBS_GROW;
1827          YY_BREAK          YY_BREAK
1828    
# Line 1821  YY_OBS_GROW; Line 1834  YY_OBS_GROW;
1834    
1835  case 79:  case 79:
1836  YY_RULE_SETUP  YY_RULE_SETUP
1837  #line 519 "scan-gram.l"  #line 532 "scan-gram.l"
1838  {  {
1839      YY_OBS_GROW;      YY_OBS_GROW;
1840      assert (yy_top_state () != INITIAL);      assert (yy_top_state () != INITIAL);
# Line 1830  YY_RULE_SETUP Line 1843  YY_RULE_SETUP
1843          YY_BREAK          YY_BREAK
1844  case 80:  case 80:
1845  YY_RULE_SETUP  YY_RULE_SETUP
1846  #line 525 "scan-gram.l"  #line 538 "scan-gram.l"
1847  YY_OBS_GROW;  YY_OBS_GROW;
1848          YY_BREAK          YY_BREAK
1849  case 81:  case 81:
1850  YY_RULE_SETUP  YY_RULE_SETUP
1851  #line 526 "scan-gram.l"  #line 539 "scan-gram.l"
1852  YY_OBS_GROW;  YY_OBS_GROW;
1853          YY_BREAK          YY_BREAK
1854  case 82:  case 82:
1855  YY_RULE_SETUP  YY_RULE_SETUP
1856  #line 527 "scan-gram.l"  #line 540 "scan-gram.l"
1857  YY_OBS_GROW;  YY_OBS_GROW;
1858          YY_BREAK          YY_BREAK
1859  /* Needed for `\<<EOF>>', `\\<<newline>>[', and `\\<<newline>>]'.  */  /* Needed for `\<<EOF>>', `\\<<newline>>[', and `\\<<newline>>]'.  */
1860  case 83:  case 83:
1861  YY_RULE_SETUP  YY_RULE_SETUP
1862  #line 529 "scan-gram.l"  #line 542 "scan-gram.l"
1863  YY_OBS_GROW;  YY_OBS_GROW;
1864          YY_BREAK          YY_BREAK
1865  case YY_STATE_EOF(SC_CHARACTER):  case YY_STATE_EOF(SC_CHARACTER):
1866  #line 531 "scan-gram.l"  #line 544 "scan-gram.l"
1867  {  {
1868      complain_at (*yylloc, _("unexpected end of file in a character literal"));      unexpected_end_of_file (*yylloc, "'", "'");
1869      assert (yy_top_state () != INITIAL);      assert (yy_top_state () != INITIAL);
1870      yy_pop_state ();      yy_pop_state ();
1871    }    }
# Line 1866  case YY_STATE_EOF(SC_CHARACTER): Line 1879  case YY_STATE_EOF(SC_CHARACTER):
1879    
1880  case 84:  case 84:
1881  YY_RULE_SETUP  YY_RULE_SETUP
1882  #line 546 "scan-gram.l"  #line 559 "scan-gram.l"
1883  {  {
1884      assert (yy_top_state () != INITIAL);      assert (yy_top_state () != INITIAL);
1885      YY_OBS_GROW;      YY_OBS_GROW;
# Line 1875  YY_RULE_SETUP Line 1888  YY_RULE_SETUP
1888          YY_BREAK          YY_BREAK
1889  case 85:  case 85:
1890  YY_RULE_SETUP  YY_RULE_SETUP
1891  #line 552 "scan-gram.l"  #line 565 "scan-gram.l"
1892  YY_OBS_GROW;  YY_OBS_GROW;
1893          YY_BREAK          YY_BREAK
1894  case 86:  case 86:
1895  YY_RULE_SETUP  YY_RULE_SETUP
1896  #line 553 "scan-gram.l"  #line 566 "scan-gram.l"
1897  YY_OBS_GROW;  YY_OBS_GROW;
1898          YY_BREAK          YY_BREAK
1899  case 87:  case 87:
1900  YY_RULE_SETUP  YY_RULE_SETUP
1901  #line 554 "scan-gram.l"  #line 567 "scan-gram.l"
1902  YY_OBS_GROW;  YY_OBS_GROW;
1903          YY_BREAK          YY_BREAK
1904  /* Needed for `\<<EOF>>', `\\<<newline>>[', and `\\<<newline>>]'.  */  /* Needed for `\<<EOF>>', `\\<<newline>>[', and `\\<<newline>>]'.  */
1905  case 88:  case 88:
1906  YY_RULE_SETUP  YY_RULE_SETUP
1907  #line 556 "scan-gram.l"  #line 569 "scan-gram.l"
1908  YY_OBS_GROW;  YY_OBS_GROW;
1909          YY_BREAK          YY_BREAK
1910  case YY_STATE_EOF(SC_STRING):  case YY_STATE_EOF(SC_STRING):
1911  #line 558 "scan-gram.l"  #line 571 "scan-gram.l"
1912  {  {
1913      complain_at (*yylloc, _("unexpected end of file in a string"));      unexpected_end_of_file (*yylloc, "\"", "\"");
1914      assert (yy_top_state () != INITIAL);      assert (yy_top_state () != INITIAL);
1915      yy_pop_state ();      yy_pop_state ();
1916    }    }
# Line 1911  case YY_STATE_EOF(SC_STRING): Line 1924  case YY_STATE_EOF(SC_STRING):
1924  /* Characters.  We don't check there is only one.  */  /* Characters.  We don't check there is only one.  */
1925  case 89:  case 89:
1926  YY_RULE_SETUP  YY_RULE_SETUP
1927  #line 573 "scan-gram.l"  #line 586 "scan-gram.l"
1928  YY_OBS_GROW; yy_push_state (SC_CHARACTER);  YY_OBS_GROW; yy_push_state (SC_CHARACTER);
1929          YY_BREAK          YY_BREAK
1930  /* Strings. */  /* Strings. */
1931  case 90:  case 90:
1932  YY_RULE_SETUP  YY_RULE_SETUP
1933  #line 576 "scan-gram.l"  #line 589 "scan-gram.l"
1934  YY_OBS_GROW; yy_push_state (SC_STRING);  YY_OBS_GROW; yy_push_state (SC_STRING);
1935          YY_BREAK          YY_BREAK
1936  /* Comments. */  /* Comments. */
1937  case 91:  case 91:
1938  YY_RULE_SETUP  YY_RULE_SETUP
1939  #line 579 "scan-gram.l"  #line 592 "scan-gram.l"
1940  YY_OBS_GROW; yy_push_state (SC_COMMENT);  YY_OBS_GROW; yy_push_state (SC_COMMENT);
1941          YY_BREAK          YY_BREAK
1942  case 92:  case 92:
1943  YY_RULE_SETUP  YY_RULE_SETUP
1944  #line 580 "scan-gram.l"  #line 593 "scan-gram.l"
1945  YY_OBS_GROW; yy_push_state (SC_LINE_COMMENT);  YY_OBS_GROW; yy_push_state (SC_LINE_COMMENT);
1946          YY_BREAK          YY_BREAK
1947  /* Not comments. */  /* Not comments. */
1948  case 93:  case 93:
1949  YY_RULE_SETUP  YY_RULE_SETUP
1950  #line 583 "scan-gram.l"  #line 596 "scan-gram.l"
1951  YY_OBS_GROW;  YY_OBS_GROW;
1952          YY_BREAK          YY_BREAK
1953    
# Line 1946  YY_OBS_GROW; Line 1959  YY_OBS_GROW;
1959    
1960  case 94:  case 94:
1961  YY_RULE_SETUP  YY_RULE_SETUP
1962  #line 594 "scan-gram.l"  #line 607 "scan-gram.l"
1963  YY_OBS_GROW; braces_level++;  YY_OBS_GROW; braces_level++;
1964          YY_BREAK          YY_BREAK
1965  case 95:  case 95:
1966  YY_RULE_SETUP  YY_RULE_SETUP
1967  #line 595 "scan-gram.l"  #line 608 "scan-gram.l"
1968  YY_OBS_GROW; braces_level--;  YY_OBS_GROW; braces_level--;
1969          YY_BREAK          YY_BREAK
1970  case 96:  case 96:
1971  YY_RULE_SETUP  YY_RULE_SETUP
1972  #line 596 "scan-gram.l"  #line 609 "scan-gram.l"
1973  {  {
1974      YY_OBS_GROW;      YY_OBS_GROW;
1975      braces_level--;      braces_level--;
# Line 1972  YY_RULE_SETUP Line 1985  YY_RULE_SETUP
1985          YY_BREAK          YY_BREAK
1986  case 97:  case 97:
1987  YY_RULE_SETUP  YY_RULE_SETUP
1988  #line 609 "scan-gram.l"  #line 622 "scan-gram.l"
1989  { handle_dollar (current_braced_code,  { handle_dollar (current_braced_code,
1990                                                     yytext, *yylloc); }                                                     yytext, *yylloc); }
1991          YY_BREAK          YY_BREAK
1992  case 98:  case 98:
1993  YY_RULE_SETUP  YY_RULE_SETUP
1994  #line 611 "scan-gram.l"  #line 624 "scan-gram.l"
1995  { handle_at (current_braced_code,  { handle_at (current_braced_code,
1996                                                 yytext, *yylloc); }                                                 yytext, *yylloc); }
1997          YY_BREAK          YY_BREAK
# Line 1986  YY_RULE_SETUP Line 1999  YY_RULE_SETUP
1999       than incorrrectly (as `<' `<%').  */       than incorrrectly (as `<' `<%').  */
2000  case 99:  case 99:
2001  YY_RULE_SETUP  YY_RULE_SETUP
2002  #line 616 "scan-gram.l"  #line 629 "scan-gram.l"
2003  YY_OBS_GROW;  YY_OBS_GROW;
2004          YY_BREAK          YY_BREAK
2005  case YY_STATE_EOF(SC_BRACED_CODE):  case YY_STATE_EOF(SC_BRACED_CODE):
2006  #line 618 "scan-gram.l"  #line 631 "scan-gram.l"
2007  {  {
2008      complain_at (*yylloc, _("unexpected end of file in `{ ... }'"));      unexpected_end_of_file (*yylloc, "{", "}");
2009      yy_pop_state ();      yy_pop_state ();
2010      YY_OBS_FINISH;      YY_OBS_FINISH;
2011      yylval->string = last_string;      yylval->string = last_string;
# Line 2007  case YY_STATE_EOF(SC_BRACED_CODE): Line 2020  case YY_STATE_EOF(SC_BRACED_CODE):
2020    
2021  case 100:  case 100:
2022  YY_RULE_SETUP  YY_RULE_SETUP
2023  #line 635 "scan-gram.l"  #line 648 "scan-gram.l"
2024  {  {
2025      yy_pop_state ();      yy_pop_state ();
2026      YY_OBS_FINISH;      YY_OBS_FINISH;
# Line 2017  YY_RULE_SETUP Line 2030  YY_RULE_SETUP
2030          YY_BREAK          YY_BREAK
2031  case 101:  case 101:
2032  YY_RULE_SETUP  YY_RULE_SETUP
2033  #line 642 "scan-gram.l"  #line 655 "scan-gram.l"
2034  YY_OBS_GROW;  YY_OBS_GROW;
2035          YY_BREAK          YY_BREAK
2036  case 102:  case 102:
2037  YY_RULE_SETUP  YY_RULE_SETUP
2038  #line 643 "scan-gram.l"  #line 656 "scan-gram.l"
2039  YY_OBS_GROW;  YY_OBS_GROW;
2040          YY_BREAK          YY_BREAK
2041  case YY_STATE_EOF(SC_PROLOGUE):  case YY_STATE_EOF(SC_PROLOGUE):
2042  #line 645 "scan-gram.l"  #line 658 "scan-gram.l"
2043  {  {
2044      complain_at (*yylloc, _("unexpected end of file in `%%{ ... %%}'"));      unexpected_end_of_file (*yylloc, "%{", "%}");
2045      yy_pop_state ();      yy_pop_state ();
2046      YY_OBS_FINISH;      YY_OBS_FINISH;
2047      yylval->string = last_string;      yylval->string = last_string;
# Line 2044  case YY_STATE_EOF(SC_PROLOGUE): Line 2057  case YY_STATE_EOF(SC_PROLOGUE):
2057    
2058  case 103:  case 103:
2059  YY_RULE_SETUP  YY_RULE_SETUP
2060  #line 662 "scan-gram.l"  #line 675 "scan-gram.l"
2061  YY_OBS_GROW;  YY_OBS_GROW;
2062          YY_BREAK          YY_BREAK
2063  case YY_STATE_EOF(SC_EPILOGUE):  case YY_STATE_EOF(SC_EPILOGUE):
2064  #line 664 "scan-gram.l"  #line 677 "scan-gram.l"
2065  {  {
2066      yy_pop_state ();      yy_pop_state ();
2067      YY_OBS_FINISH;      YY_OBS_FINISH;
# Line 2059  case YY_STATE_EOF(SC_EPILOGUE): Line 2072  case YY_STATE_EOF(SC_EPILOGUE):
2072    
2073  case 104:  case 104:
2074  YY_RULE_SETUP  YY_RULE_SETUP
2075  #line 673 "scan-gram.l"  #line 686 "scan-gram.l"
2076  YY_FATAL_ERROR( "flex scanner jammed" );  YY_FATAL_ERROR( "flex scanner jammed" );
2077          YY_BREAK          YY_BREAK
2078  #line 2066 "scan-gram.c"  #line 2079 "scan-gram.c"
2079  case YY_STATE_EOF(INITIAL):  case YY_STATE_EOF(INITIAL):
2080          yyterminate();          yyterminate();
2081    
# Line 2954  int main() Line 2967  int main()
2967          return 0;          return 0;
2968          }          }
2969  #endif  #endif
2970  #line 673 "scan-gram.l"  #line 686 "scan-gram.l"
2971    
2972    
2973  /*------------------------------------------------------------------.  /*------------------------------------------------------------------.
# Line 3156  convert_ucn_to_byte (char const *ucn) Line 3169  convert_ucn_to_byte (char const *ucn)
3169      /* A non-ASCII host.  Use CODE to index into a table of the C      /* A non-ASCII host.  Use CODE to index into a table of the C
3170         basic execution character set, which is guaranteed to exist on         basic execution character set, which is guaranteed to exist on
3171         all Standard C platforms.  This table also includes '$', '@',         all Standard C platforms.  This table also includes '$', '@',
3172         and '`', which not in the basic execution character set but         and '`', which are not in the basic execution character set but
3173         which are unibyte characters on all the platforms that we know         which are unibyte characters on all the platforms that we know
3174         about.  */         about.  */
3175      static signed char const table[] =      static signed char const table[] =

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

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