From: drl7x Date: Thu, 1 Mar 2001 22:50:26 +0000 (+0000) Subject: Added files X-Git-Tag: cvsWorks0302_2001~15 X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/commitdiff_plain/3aaedf88e9f7831799d4ec7a3b71599f188661e4 Added files --- diff --git a/src/cgrammar.c b/src/cgrammar.c new file mode 100644 index 0000000..0ceb23a --- /dev/null +++ b/src/cgrammar.c @@ -0,0 +1,5809 @@ +/* +** Inserted at beginning of c files generated by bison +** REMEMBER: Change bison.reset too. +*/ + +/*@-allmacros@*/ +/*@+boolint@*/ +/*@+charint@*/ +/*@-macroparams@*/ +/*@-macroundef@*/ +/*@-unreachable@*/ +/*@-macrospec@*/ +/*@-varuse@*/ +/*@+ignorequals@*/ +/*@-macrostmt@*/ +/*@-noeffect@*/ +/*@-shadow@*/ +/*@-exitarg@*/ +/*@-macroredef@*/ +/*@-uniondef@*/ +/*@-compdef@*/ +/*@-matchfields@*/ +/*@-exportlocal@*/ +/*@-evalorderuncon@*/ +/*@-exportheader@*/ +/*@-typeuse@*/ +/*@-redecl@*/ +/*@-redef@*/ +/*@-noparams@*/ +/*@-ansireserved@*/ +/*@-fielduse@*/ +/*@-ifblock@*/ +/*@-elseifcomplete@*/ +/*@-whileblock@*/ +/*@-forblock@*/ +/*@-branchstate@*/ +/*@-readonlytrans@*/ +/*@-namechecks@*/ +/*@-usedef@*/ +/*@-systemunrecog@*/ +/*@-dependenttrans@*/ +/*@-unqualifiedtrans@*/ +/*@-nullassign@*/ + +/* < end of bison.head > */ + + +/* A Bison parser, made from cgrammar.y + by GNU Bison version 1.25 + */ + +#define YYBISON 1 /* Identify Bison output. */ + +#define BADTOK 258 +#define SKIPTOK 259 +#define CTOK_ELIPSIS 260 +#define CASE 261 +#define DEFAULT 262 +#define CIF 263 +#define CELSE 264 +#define SWITCH 265 +#define WHILE 266 +#define DO 267 +#define CFOR 268 +#define GOTO 269 +#define CONTINUE 270 +#define BREAK 271 +#define RETURN 272 +#define TSEMI 273 +#define TLBRACE 274 +#define TRBRACE 275 +#define TCOMMA 276 +#define TCOLON 277 +#define TASSIGN 278 +#define TLPAREN 279 +#define TRPAREN 280 +#define TLSQBR 281 +#define TRSQBR 282 +#define TDOT 283 +#define TAMPERSAND 284 +#define TEXCL 285 +#define TTILDE 286 +#define TMINUS 287 +#define TPLUS 288 +#define TMULT 289 +#define TDIV 290 +#define TPERCENT 291 +#define TLT 292 +#define TGT 293 +#define TCIRC 294 +#define TBAR 295 +#define TQUEST 296 +#define CSIZEOF 297 +#define CALIGNOF 298 +#define ARROW_OP 299 +#define CTYPEDEF 300 +#define COFFSETOF 301 +#define INC_OP 302 +#define DEC_OP 303 +#define LEFT_OP 304 +#define RIGHT_OP 305 +#define LE_OP 306 +#define GE_OP 307 +#define EQ_OP 308 +#define NE_OP 309 +#define AND_OP 310 +#define OR_OP 311 +#define MUL_ASSIGN 312 +#define DIV_ASSIGN 313 +#define MOD_ASSIGN 314 +#define ADD_ASSIGN 315 +#define SUB_ASSIGN 316 +#define LEFT_ASSIGN 317 +#define RIGHT_ASSIGN 318 +#define AND_ASSIGN 319 +#define XOR_ASSIGN 320 +#define OR_ASSIGN 321 +#define CSTRUCT 322 +#define CUNION 323 +#define CENUM 324 +#define VA_ARG 325 +#define VA_DCL 326 +#define QGLOBALS 327 +#define QMODIFIES 328 +#define QNOMODS 329 +#define QCONSTANT 330 +#define QFUNCTION 331 +#define QITER 332 +#define QDEFINES 333 +#define QUSES 334 +#define QALLOCATES 335 +#define QSETS 336 +#define QRELEASES 337 +#define QPRECLAUSE 338 +#define QPOSTCLAUSE 339 +#define QALT 340 +#define QUNDEF 341 +#define QKILLED 342 +#define QENDMACRO 343 +#define LLMACRO 344 +#define LLMACROITER 345 +#define LLMACROEND 346 +#define TENDMACRO 347 +#define QSWITCHBREAK 348 +#define QLOOPBREAK 349 +#define QINNERBREAK 350 +#define QSAFEBREAK 351 +#define QINNERCONTINUE 352 +#define QFALLTHROUGH 353 +#define QLINTNOTREACHED 354 +#define QLINTFALLTHROUGH 355 +#define QLINTFALLTHRU 356 +#define QARGSUSED 357 +#define QPRINTFLIKE 358 +#define QLINTPRINTFLIKE 359 +#define QSCANFLIKE 360 +#define QMESSAGELIKE 361 +#define QNOTREACHED 362 +#define QCONST 363 +#define QVOLATILE 364 +#define QINLINE 365 +#define QEXTENSION 366 +#define QEXTERN 367 +#define QSTATIC 368 +#define QAUTO 369 +#define QREGISTER 370 +#define QOUT 371 +#define QIN 372 +#define QYIELD 373 +#define QONLY 374 +#define QTEMP 375 +#define QSHARED 376 +#define QREF 377 +#define QUNIQUE 378 +#define QCHECKED 379 +#define QUNCHECKED 380 +#define QCHECKEDSTRICT 381 +#define QCHECKMOD 382 +#define QKEEP 383 +#define QKEPT 384 +#define QPARTIAL 385 +#define QSPECIAL 386 +#define QOWNED 387 +#define QDEPENDENT 388 +#define QRETURNED 389 +#define QEXPOSED 390 +#define QNULL 391 +#define QOBSERVER 392 +#define QISNULL 393 +#define QEXITS 394 +#define QMAYEXIT 395 +#define QNEVEREXIT 396 +#define QTRUEEXIT 397 +#define QFALSEEXIT 398 +#define QLONG 399 +#define QSIGNED 400 +#define QUNSIGNED 401 +#define QSHORT 402 +#define QUNUSED 403 +#define QSEF 404 +#define QNOTNULL 405 +#define QRELNULL 406 +#define QABSTRACT 407 +#define QCONCRETE 408 +#define QMUTABLE 409 +#define QIMMUTABLE 410 +#define QTRUENULL 411 +#define QFALSENULL 412 +#define QEXTERNAL 413 +#define QREFCOUNTED 414 +#define QREFS 415 +#define QNEWREF 416 +#define QTEMPREF 417 +#define QKILLREF 418 +#define QRELDEF 419 +#define CGCHAR 420 +#define CBOOL 421 +#define CINT 422 +#define CGFLOAT 423 +#define CDOUBLE 424 +#define CVOID 425 +#define QANYTYPE 426 +#define QINTEGRALTYPE 427 +#define QUNSIGNEDINTEGRALTYPE 428 +#define QSIGNEDINTEGRALTYPE 429 +#define QNULLTERMINATED 430 +#define QSETBUFFERSIZE 431 +#define QBUFFERCONSTRAINT 432 +#define QENSURESCONSTRAINT 433 +#define QSETSTRINGLENGTH 434 +#define QMAXSET 435 +#define QMAXREAD 436 +#define QTESTINRANGE 437 +#define IDENTIFIER 438 +#define NEW_IDENTIFIER 439 +#define TYPE_NAME_OR_ID 440 +#define CCONSTANT 441 +#define ITER_NAME 442 +#define ITER_ENDNAME 443 +#define TYPE_NAME 444 + +#line 19 "cgrammar.y" + +/* +** +** cgrammar.y +** +** Yacc/Bison grammar for extended ANSI C used by LCLint. +** +** original grammar by Nate Osgood --- +** hacrat@catfish.lcs.mit.edu Mon Jun 14 13:06:32 1993 +** +** changes for LCLint --- handle typedef names correctly +** fix struct/union parsing bug (empty struct is accepted) +** add productions to handle macros --- require +** error correction --- main source of conflicts in grammar. +** need to process initializations sequentially, L->R +** +** production names are cryptic, so more productions fit on one line +** +** conflicts: 87 shift/reduce, 18 reduce/reduce +** most of these are due to handling macros +** a few are due to handling type expressions +*/ + +/*@=allmacros@*/ + +extern int yylex (); +extern void swallowMacro (void); + +# include "lclintMacros.nf" +# include "basic.h" +# include "cgrammar.h" +# include "exprChecks.h" + +/*@-allmacros@*/ +/*@-matchfields@*/ + +# define SHOWCSYM FALSE +void yyerror (char *s); + +/* +** This is necessary, or else when the bison-generated code #include's malloc.h, +** there will be a parse error. +** +** Unfortunately, it means the error checking on malloc, etc. is lost for allocations +** in bison-generated files under Win32. +*/ + +# ifdef WIN32 +# undef malloc +# undef calloc +# undef realloc +# endif + +void checkandsetBufState(idDecl id, exprNode is); + +#line 75 "cgrammar.y" +typedef union +{ + lltok tok; + int count; + specialClauseKind sck; + qual typequal; + qualList tquallist; + ctype ctyp; + sRef sr; + /*@only@*/ qtype qtyp; + /*@only@*/ cstring cname; + /*@only@*/ idDecl ntyp; + /*@only@*/ idDeclList ntyplist; + /*@only@*/ uentryList flist; + /*@owned@*/ uentryList entrylist; + /*@observer@*/ /*@dependent@*/ uentry entry; + /*@only@*/ uentry oentry; + /*@only@*/ exprNode expr; + /*@only@*/ enumNameList enumnamelist; + /*@only@*/ exprNodeList alist; + /*@only@*/ sRefSet srset; + /*@only@*/ cstringList cstringlist; + /*drl + added 1/19/2001 + */ + constraint con; + constraintList conL; + constraintExpr conE; + /* drl */ +} YYSTYPE; +#ifndef YYDEBUG +#define YYDEBUG 1 +#endif + +#include + +#ifndef __cplusplus +#ifndef __STDC__ +#define const +#endif +#endif + + + +#define YYFINAL 1229 +#define YYFLAG -32768 +#define YYNTBASE 190 + +#define YYTRANSLATE(x) ((unsigned)(x) <= 444 ? yytranslate[x] : 434) + +static const short yytranslate[] = { 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189 +}; + +#if YYDEBUG != 0 +static const short yyprhs[] = { 0, + 0, 1, 3, 5, 8, 11, 13, 15, 17, 19, + 21, 23, 32, 44, 45, 51, 53, 57, 59, 62, + 64, 71, 75, 82, 83, 91, 92, 101, 103, 110, + 114, 121, 122, 129, 130, 138, 139, 140, 151, 155, + 159, 163, 166, 168, 169, 172, 173, 176, 179, 180, + 185, 186, 187, 192, 193, 196, 198, 203, 205, 207, + 209, 211, 213, 215, 220, 226, 228, 230, 232, 234, + 238, 243, 246, 250, 254, 258, 260, 262, 264, 265, + 268, 269, 272, 274, 277, 279, 282, 284, 287, 289, + 293, 296, 298, 300, 302, 304, 306, 308, 310, 311, + 314, 315, 322, 323, 330, 332, 334, 335, 336, 342, + 343, 349, 351, 353, 354, 356, 357, 358, 362, 363, + 367, 369, 371, 373, 375, 377, 379, 381, 383, 385, + 387, 389, 391, 393, 395, 397, 399, 401, 402, 410, + 411, 420, 422, 426, 427, 431, 432, 436, 439, 443, + 446, 449, 451, 453, 455, 459, 464, 467, 471, 475, + 479, 481, 483, 485, 489, 491, 493, 497, 502, 505, + 509, 513, 517, 519, 523, 525, 527, 529, 533, 535, + 537, 539, 544, 548, 553, 560, 566, 572, 575, 578, + 580, 584, 586, 589, 592, 595, 598, 601, 604, 607, + 610, 612, 614, 618, 620, 630, 631, 635, 640, 643, + 648, 651, 653, 658, 660, 664, 668, 672, 674, 678, + 682, 684, 688, 692, 694, 698, 702, 706, 710, 712, + 716, 720, 722, 726, 728, 732, 734, 738, 740, 741, + 746, 748, 749, 754, 756, 757, 758, 766, 768, 772, + 776, 780, 784, 788, 792, 796, 800, 804, 808, 812, + 814, 818, 819, 821, 823, 825, 827, 829, 833, 834, + 844, 845, 857, 860, 861, 868, 869, 877, 882, 887, + 888, 889, 892, 894, 899, 900, 905, 907, 911, 916, + 918, 922, 924, 926, 928, 930, 932, 935, 938, 941, + 944, 947, 950, 953, 956, 959, 962, 965, 968, 971, + 974, 977, 980, 983, 986, 989, 992, 995, 998, 1001, + 1004, 1007, 1010, 1013, 1016, 1019, 1022, 1025, 1028, 1031, + 1034, 1037, 1040, 1043, 1046, 1049, 1052, 1055, 1058, 1061, + 1064, 1067, 1070, 1072, 1074, 1076, 1078, 1081, 1084, 1087, + 1090, 1093, 1096, 1099, 1102, 1105, 1108, 1111, 1114, 1117, + 1120, 1124, 1126, 1131, 1133, 1137, 1140, 1143, 1146, 1147, + 1149, 1150, 1151, 1163, 1164, 1165, 1177, 1184, 1191, 1192, + 1193, 1204, 1205, 1206, 1217, 1223, 1229, 1234, 1239, 1240, + 1242, 1244, 1247, 1253, 1257, 1260, 1265, 1267, 1271, 1276, + 1283, 1284, 1293, 1298, 1300, 1304, 1307, 1309, 1314, 1316, + 1318, 1321, 1324, 1326, 1329, 1331, 1334, 1336, 1338, 1340, + 1343, 1345, 1348, 1351, 1355, 1357, 1361, 1363, 1367, 1369, + 1371, 1375, 1376, 1379, 1380, 1385, 1390, 1392, 1394, 1397, + 1399, 1401, 1404, 1405, 1407, 1413, 1416, 1420, 1424, 1429, + 1433, 1438, 1443, 1449, 1451, 1453, 1455, 1457, 1459, 1461, + 1463, 1465, 1467, 1469, 1474, 1479, 1484, 1487, 1489, 1491, + 1493, 1496, 1499, 1507, 1514, 1517, 1518, 1519, 1530, 1531, + 1538, 1540, 1542, 1544, 1546, 1549, 1551, 1553, 1555, 1557, + 1559, 1561, 1563, 1567, 1569, 1572, 1575, 1578, 1580, 1582, + 1584, 1586, 1588, 1590, 1592, 1594, 1596, 1598, 1602, 1604, + 1606, 1609, 1612, 1613, 1618, 1619, 1625, 1626, 1630, 1631, + 1636, 1640, 1643, 1647, 1648, 1649, 1650, 1651, 1652, 1654, + 1657, 1660, 1664, 1667, 1671, 1675, 1680, 1683, 1686, 1690, + 1694, 1699, 1701, 1704, 1706, 1709, 1711, 1714, 1716, 1719, + 1721, 1724, 1726, 1731, 1734, 1735, 1741, 1742, 1749, 1754, + 1759, 1760, 1761, 1772, 1774, 1775, 1780, 1782, 1784, 1786, + 1788, 1790, 1794, 1796, 1801, 1805, 1810, 1817, 1823, 1829, + 1832, 1835, 1837, 1840, 1843, 1846, 1849, 1852, 1855, 1858, + 1861, 1863, 1865, 1870, 1872, 1876, 1880, 1884, 1886, 1890, + 1894, 1896, 1900, 1904, 1906, 1910, 1914, 1918, 1922, 1924, + 1928, 1932, 1934, 1938, 1940, 1944, 1946, 1950, 1952, 1956, + 1958, 1962, 1964, 1965, 1966, 1974, 1976, 1980, 1984, 1988, + 1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020, 2022, 2023, + 2025, 2028, 2036, 2039, 2042, 2050, 2057, 2060, 2064, 2067, + 2071, 2074, 2078, 2082, 2086, 2090, 2093, 2097, 2098, 2100, + 2102, 2104, 2106, 2108, 2110, 2112, 2114 +}; + +static const short yyrhs[] = { -1, + 191, 0, 192, 0, 191, 192, 0, 260, 430, 0, + 193, 0, 194, 0, 204, 0, 207, 0, 297, 0, + 1, 0, 75, 317, 330, 340, 330, 430, 305, 88, + 0, 75, 317, 330, 340, 330, 23, 305, 310, 309, + 430, 88, 0, 0, 76, 195, 196, 430, 88, 0, + 197, 0, 317, 330, 197, 0, 201, 0, 344, 201, + 0, 432, 0, 305, 24, 330, 340, 305, 25, 0, + 198, 26, 27, 0, 198, 26, 305, 296, 27, 330, + 0, 0, 198, 306, 24, 25, 199, 209, 211, 0, + 0, 198, 306, 24, 341, 25, 200, 209, 211, 0, + 432, 0, 305, 24, 330, 197, 305, 25, 0, 201, + 26, 27, 0, 201, 26, 305, 296, 27, 330, 0, + 0, 201, 306, 24, 25, 202, 227, 0, 0, 201, + 306, 24, 341, 25, 203, 227, 0, 0, 0, 77, + 432, 24, 341, 25, 205, 227, 206, 430, 88, 0, + 89, 371, 92, 0, 90, 358, 92, 0, 91, 359, + 92, 0, 89, 92, 0, 256, 0, 0, 210, 229, + 0, 0, 212, 213, 0, 216, 214, 0, 0, 215, + 178, 218, 88, 0, 0, 0, 217, 177, 218, 88, + 0, 0, 219, 218, 0, 219, 0, 222, 221, 222, + 18, 0, 180, 0, 181, 0, 52, 0, 51, 0, + 53, 0, 223, 0, 225, 24, 222, 25, 0, 24, + 222, 226, 222, 25, 0, 224, 0, 186, 0, 431, + 0, 184, 0, 224, 26, 27, 0, 224, 26, 186, + 27, 0, 34, 224, 0, 24, 224, 25, 0, 224, + 28, 432, 0, 224, 44, 432, 0, 220, 0, 33, + 0, 32, 0, 0, 0, 230, 0, 0, 228, 230, + 0, 237, 0, 231, 237, 0, 240, 0, 231, 240, + 0, 253, 0, 253, 231, 0, 233, 0, 232, 21, + 233, 0, 236, 234, 0, 431, 0, 184, 0, 86, + 0, 87, 0, 116, 0, 117, 0, 130, 0, 0, + 235, 236, 0, 0, 72, 238, 391, 430, 88, 243, + 0, 0, 72, 239, 232, 430, 88, 243, 0, 74, + 0, 244, 0, 0, 0, 72, 241, 391, 430, 243, + 0, 0, 72, 242, 232, 430, 243, 0, 74, 0, + 246, 0, 0, 244, 0, 0, 0, 73, 245, 261, + 0, 0, 73, 247, 262, 0, 78, 0, 79, 0, + 80, 0, 81, 0, 82, 0, 88, 0, 88, 0, + 83, 0, 84, 0, 119, 0, 137, 0, 135, 0, + 133, 0, 132, 0, 121, 0, 138, 0, 150, 0, + 0, 248, 330, 254, 267, 430, 250, 305, 0, 0, + 251, 330, 252, 255, 267, 430, 249, 305, 0, 340, + 0, 317, 330, 340, 0, 0, 19, 258, 387, 0, + 0, 391, 259, 380, 0, 208, 257, 0, 265, 430, + 88, 0, 430, 88, 0, 265, 430, 0, 430, 0, + 431, 0, 184, 0, 263, 26, 27, 0, 263, 26, + 264, 27, 0, 34, 263, 0, 24, 263, 25, 0, + 263, 28, 432, 0, 263, 44, 432, 0, 263, 0, + 186, 0, 263, 0, 265, 21, 263, 0, 431, 0, + 184, 0, 266, 26, 27, 0, 266, 26, 264, 27, + 0, 34, 266, 0, 24, 266, 25, 0, 266, 28, + 432, 0, 266, 44, 432, 0, 266, 0, 267, 21, + 266, 0, 431, 0, 184, 0, 186, 0, 24, 294, + 25, 0, 185, 0, 111, 0, 268, 0, 269, 26, + 294, 27, 0, 269, 24, 25, 0, 269, 24, 270, + 25, 0, 70, 24, 293, 21, 352, 25, 0, 269, + 330, 28, 432, 305, 0, 269, 330, 44, 432, 305, + 0, 269, 47, 0, 269, 48, 0, 293, 0, 270, + 21, 293, 0, 269, 0, 47, 271, 0, 48, 271, + 0, 29, 277, 0, 34, 277, 0, 33, 277, 0, + 32, 277, 0, 31, 277, 0, 30, 277, 0, 274, + 0, 273, 0, 272, 28, 432, 0, 432, 0, 46, + 305, 24, 352, 330, 21, 272, 25, 305, 0, 0, + 305, 275, 276, 0, 42, 24, 352, 25, 0, 42, + 271, 0, 43, 24, 352, 25, 0, 43, 271, 0, + 271, 0, 24, 352, 25, 277, 0, 277, 0, 278, + 34, 277, 0, 278, 35, 277, 0, 278, 36, 277, + 0, 278, 0, 279, 33, 278, 0, 279, 32, 278, + 0, 279, 0, 280, 49, 279, 0, 280, 50, 279, + 0, 280, 0, 281, 37, 280, 0, 281, 38, 280, + 0, 281, 51, 280, 0, 281, 52, 280, 0, 281, + 0, 282, 53, 281, 0, 282, 54, 281, 0, 282, + 0, 283, 29, 282, 0, 283, 0, 284, 39, 283, + 0, 284, 0, 285, 40, 284, 0, 285, 0, 0, + 286, 55, 287, 285, 0, 286, 0, 0, 288, 56, + 289, 286, 0, 288, 0, 0, 0, 288, 41, 291, + 294, 22, 292, 290, 0, 290, 0, 271, 23, 293, + 0, 271, 57, 293, 0, 271, 58, 293, 0, 271, + 59, 293, 0, 271, 60, 293, 0, 271, 61, 293, + 0, 271, 62, 293, 0, 271, 63, 293, 0, 271, + 64, 293, 0, 271, 65, 293, 0, 271, 66, 293, + 0, 293, 0, 294, 21, 293, 0, 0, 294, 0, + 290, 0, 298, 0, 71, 0, 303, 0, 317, 305, + 18, 0, 0, 317, 330, 340, 330, 299, 305, 309, + 18, 305, 0, 0, 317, 330, 340, 330, 23, 300, + 305, 310, 309, 18, 305, 0, 340, 330, 0, 0, + 340, 330, 23, 302, 305, 310, 0, 0, 45, 317, + 304, 330, 307, 305, 18, 0, 45, 317, 305, 18, + 0, 45, 307, 305, 18, 0, 0, 0, 308, 305, + 0, 301, 0, 307, 21, 330, 301, 0, 0, 309, + 21, 330, 301, 0, 293, 0, 19, 311, 20, 0, + 19, 311, 21, 20, 0, 310, 0, 311, 21, 310, + 0, 112, 0, 110, 0, 113, 0, 114, 0, 115, + 0, 108, 305, 0, 109, 305, 0, 116, 305, 0, + 117, 305, 0, 130, 305, 0, 131, 305, 0, 132, + 305, 0, 133, 305, 0, 118, 305, 0, 120, 305, + 0, 119, 305, 0, 128, 305, 0, 129, 305, 0, + 121, 305, 0, 123, 305, 0, 139, 305, 0, 140, + 305, 0, 142, 305, 0, 143, 305, 0, 141, 305, + 0, 136, 305, 0, 151, 305, 0, 134, 305, 0, + 135, 305, 0, 137, 305, 0, 124, 305, 0, 127, + 305, 0, 125, 305, 0, 126, 305, 0, 156, 305, + 0, 157, 305, 0, 148, 305, 0, 158, 305, 0, + 149, 305, 0, 152, 305, 0, 153, 305, 0, 154, + 305, 0, 155, 305, 0, 150, 305, 0, 159, 305, + 0, 160, 305, 0, 163, 305, 0, 164, 305, 0, + 161, 305, 0, 162, 305, 0, 175, 305, 0, 147, + 0, 144, 0, 145, 0, 146, 0, 165, 330, 0, + 167, 330, 0, 166, 330, 0, 168, 330, 0, 169, + 330, 0, 170, 330, 0, 171, 330, 0, 172, 330, + 0, 173, 330, 0, 174, 330, 0, 433, 330, 0, + 321, 330, 0, 335, 330, 0, 314, 330, 0, 305, + 317, 305, 0, 319, 0, 319, 85, 318, 88, 0, + 352, 0, 352, 21, 318, 0, 312, 320, 0, 313, + 320, 0, 315, 320, 0, 0, 317, 0, 0, 0, + 330, 67, 432, 305, 19, 322, 384, 331, 385, 323, + 20, 0, 0, 0, 330, 68, 432, 305, 19, 324, + 384, 331, 385, 325, 20, 0, 330, 67, 432, 305, + 19, 20, 0, 330, 68, 432, 305, 19, 20, 0, + 0, 0, 330, 67, 305, 19, 326, 384, 331, 385, + 327, 20, 0, 0, 0, 330, 68, 305, 19, 328, + 384, 331, 385, 329, 20, 0, 330, 67, 305, 19, + 20, 0, 330, 68, 305, 19, 20, 0, 330, 67, + 432, 330, 0, 330, 68, 432, 330, 0, 0, 332, + 0, 207, 0, 331, 332, 0, 317, 330, 333, 305, + 18, 0, 317, 305, 18, 0, 334, 330, 0, 333, + 21, 334, 330, 0, 340, 0, 22, 305, 296, 0, + 340, 22, 305, 296, 0, 330, 69, 19, 337, 20, + 305, 0, 0, 330, 69, 432, 19, 336, 337, 20, + 305, 0, 330, 69, 432, 305, 0, 338, 0, 337, + 21, 338, 0, 337, 21, 0, 432, 0, 432, 23, + 305, 296, 0, 198, 0, 354, 0, 344, 189, 0, + 344, 339, 0, 198, 0, 344, 198, 0, 347, 0, + 330, 345, 0, 108, 0, 109, 0, 342, 0, 343, + 342, 0, 34, 0, 34, 343, 0, 34, 344, 0, + 34, 343, 344, 0, 346, 0, 346, 21, 5, 0, + 432, 0, 346, 21, 432, 0, 5, 0, 348, 0, + 348, 21, 5, 0, 0, 349, 351, 0, 0, 348, + 21, 350, 351, 0, 305, 317, 339, 305, 0, 432, + 0, 316, 0, 316, 353, 0, 344, 0, 355, 0, + 344, 355, 0, 0, 355, 0, 305, 24, 330, 353, + 25, 0, 26, 27, 0, 26, 296, 27, 0, 355, + 26, 27, 0, 355, 26, 296, 27, 0, 305, 24, + 25, 0, 305, 24, 347, 25, 0, 355, 305, 24, + 25, 0, 355, 305, 24, 347, 25, 0, 373, 0, + 374, 0, 377, 0, 380, 0, 393, 0, 396, 0, + 427, 0, 401, 0, 429, 0, 357, 0, 176, 431, + 186, 88, 0, 179, 431, 186, 88, 0, 182, 431, + 186, 88, 0, 22, 432, 0, 360, 0, 358, 0, + 367, 0, 360, 367, 0, 400, 360, 0, 426, 372, + 11, 24, 294, 25, 18, 0, 426, 372, 11, 24, + 294, 25, 0, 362, 367, 0, 0, 0, 13, 24, + 295, 18, 295, 18, 363, 295, 364, 25, 0, 0, + 187, 382, 24, 366, 404, 25, 0, 188, 0, 373, + 0, 374, 0, 377, 0, 369, 391, 0, 369, 0, + 370, 0, 393, 0, 368, 0, 361, 0, 365, 0, + 429, 0, 24, 367, 25, 0, 1, 0, 395, 367, + 0, 382, 19, 0, 386, 20, 0, 372, 0, 390, + 0, 373, 0, 374, 0, 377, 0, 381, 0, 394, + 0, 396, 0, 401, 0, 428, 0, 24, 372, 25, + 0, 429, 0, 1, 0, 432, 22, 0, 107, 356, + 0, 0, 6, 296, 375, 22, 0, 0, 98, 6, + 296, 376, 22, 0, 0, 7, 378, 22, 0, 0, + 98, 7, 379, 22, 0, 24, 380, 25, 0, 382, + 388, 0, 382, 389, 383, 0, 0, 0, 0, 0, + 0, 20, 0, 107, 20, 0, 392, 20, 0, 392, + 107, 20, 0, 391, 20, 0, 391, 107, 20, 0, + 391, 392, 20, 0, 391, 392, 107, 20, 0, 19, + 387, 0, 19, 20, 0, 19, 390, 20, 0, 19, + 391, 20, 0, 19, 391, 392, 20, 0, 372, 0, + 390, 372, 0, 297, 0, 391, 297, 0, 356, 0, + 392, 356, 0, 18, 0, 294, 18, 0, 18, 0, + 294, 18, 0, 294, 0, 8, 24, 294, 25, 0, + 395, 356, 0, 0, 395, 356, 9, 397, 356, 0, + 0, 10, 24, 294, 398, 25, 356, 0, 11, 24, + 294, 25, 0, 11, 24, 294, 25, 0, 0, 0, + 187, 402, 382, 24, 403, 404, 25, 380, 425, 383, + 0, 406, 0, 0, 404, 405, 21, 406, 0, 424, + 0, 431, 0, 185, 0, 184, 0, 186, 0, 24, + 294, 25, 0, 407, 0, 269, 26, 294, 27, 0, + 269, 24, 25, 0, 269, 24, 270, 25, 0, 70, + 24, 293, 21, 352, 25, 0, 269, 330, 28, 432, + 305, 0, 269, 330, 44, 432, 305, 0, 269, 47, + 0, 269, 48, 0, 408, 0, 47, 271, 0, 48, + 271, 0, 29, 277, 0, 34, 277, 0, 33, 277, + 0, 32, 277, 0, 31, 277, 0, 30, 277, 0, + 274, 0, 409, 0, 24, 352, 25, 277, 0, 410, + 0, 278, 34, 277, 0, 278, 35, 277, 0, 278, + 36, 277, 0, 411, 0, 279, 33, 278, 0, 279, + 32, 278, 0, 412, 0, 280, 49, 279, 0, 280, + 50, 279, 0, 413, 0, 281, 37, 280, 0, 281, + 38, 280, 0, 281, 51, 280, 0, 281, 52, 280, + 0, 414, 0, 282, 53, 281, 0, 282, 54, 281, + 0, 415, 0, 283, 29, 282, 0, 416, 0, 284, + 39, 283, 0, 417, 0, 285, 40, 284, 0, 418, + 0, 286, 55, 285, 0, 419, 0, 288, 56, 286, + 0, 420, 0, 0, 0, 288, 41, 422, 294, 22, + 423, 290, 0, 421, 0, 271, 23, 293, 0, 271, + 57, 293, 0, 271, 58, 293, 0, 271, 59, 293, + 0, 271, 60, 293, 0, 271, 61, 293, 0, 271, + 62, 293, 0, 271, 63, 293, 0, 271, 64, 293, + 0, 271, 65, 293, 0, 271, 66, 293, 0, 188, + 0, 0, 12, 0, 399, 356, 0, 426, 356, 11, + 24, 294, 25, 18, 0, 362, 356, 0, 399, 372, + 0, 426, 372, 11, 24, 294, 25, 18, 0, 426, + 372, 11, 24, 294, 25, 0, 362, 372, 0, 14, + 432, 18, 0, 15, 18, 0, 97, 15, 18, 0, + 16, 18, 0, 93, 16, 18, 0, 94, 16, 18, + 0, 95, 16, 18, 0, 96, 16, 18, 0, 17, + 18, 0, 17, 294, 18, 0, 0, 18, 0, 183, + 0, 184, 0, 187, 0, 188, 0, 431, 0, 185, + 0, 189, 0, 185, 0 +}; + +#endif + +#if YYDEBUG != 0 +static const short yyrline[] = { 0, + 269, 270, 273, 274, 277, 278, 279, 280, 281, 282, + 283, 286, 288, 292, 292, 297, 303, 307, 308, 312, + 313, 315, 317, 321, 324, 332, 335, 344, 345, 347, + 349, 365, 369, 376, 380, 386, 388, 388, 392, 393, + 394, 395, 398, 401, 402, 408, 409, 413, 417, 422, + 429, 433, 438, 445, 448, 449, 452, 457, 458, 461, + 462, 463, 466, 467, 468, 473, 474, 482, 485, 487, + 488, 493, 494, 495, 497, 513, 517, 518, 523, 524, + 534, 535, 538, 539, 542, 543, 546, 547, 550, 551, + 554, 557, 558, 561, 562, 563, 564, 565, 568, 569, + 572, 572, 575, 575, 578, 582, 583, 586, 586, 589, + 589, 592, 596, 597, 600, 601, 604, 610, 617, 623, + 630, 631, 632, 633, 634, 637, 640, 643, 644, 647, + 648, 649, 650, 651, 652, 653, 654, 657, 663, 670, + 676, 685, 691, 695, 697, 701, 704, 711, 721, 722, + 725, 726, 729, 730, 731, 732, 733, 734, 735, 736, + 740, 741, 745, 746, 749, 751, 753, 754, 755, 756, + 757, 759, 763, 767, 779, 780, 781, 782, 783, 784, + 787, 788, 789, 790, 791, 792, 793, 794, 795, 798, + 799, 802, 803, 804, 805, 806, 807, 808, 809, 810, + 811, 812, 815, 816, 819, 823, 824, 827, 828, 829, + 830, 833, 834, 838, 839, 840, 841, 844, 845, 846, + 849, 850, 851, 854, 855, 856, 857, 858, 861, 862, + 863, 866, 867, 870, 871, 875, 876, 879, 880, 885, + 891, 892, 898, 904, 905, 905, 907, 910, 911, 912, + 913, 914, 915, 916, 917, 918, 919, 920, 921, 924, + 925, 928, 929, 932, 937, 938, 939, 942, 955, 959, + 960, 963, 968, 969, 969, 974, 975, 976, 977, 980, + 983, 986, 989, 990, 993, 994, 997, 998, 999, 1003, + 1005, 1014, 1015, 1016, 1017, 1018, 1021, 1022, 1023, 1024, + 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, + 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, + 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, + 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, + 1065, 1066, 1072, 1073, 1074, 1075, 1078, 1079, 1080, 1081, + 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, + 1094, 1098, 1099, 1103, 1104, 1108, 1109, 1110, 1113, 1114, + 1117, 1119, 1121, 1122, 1124, 1126, 1127, 1129, 1131, 1133, + 1135, 1136, 1138, 1140, 1141, 1143, 1145, 1146, 1149, 1152, + 1153, 1154, 1157, 1159, 1163, 1165, 1169, 1170, 1171, 1175, + 1177, 1177, 1179, 1182, 1184, 1186, 1189, 1194, 1201, 1202, + 1203, 1210, 1214, 1215, 1219, 1220, 1223, 1224, 1227, 1228, + 1231, 1232, 1233, 1234, 1237, 1238, 1241, 1242, 1245, 1246, + 1247, 1250, 1250, 1251, 1252, 1255, 1267, 1283, 1284, 1287, + 1288, 1289, 1292, 1293, 1296, 1298, 1299, 1301, 1302, 1304, + 1306, 1308, 1310, 1316, 1317, 1318, 1319, 1320, 1321, 1322, + 1323, 1324, 1326, 1330, 1332, 1334, 1340, 1345, 1348, 1351, + 1352, 1356, 1358, 1360, 1362, 1366, 1367, 1369, 1373, 1375, + 1377, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, + 1389, 1390, 1391, 1392, 1395, 1401, 1404, 1407, 1408, 1411, + 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, + 1424, 1425, 1431, 1432, 1433, 1434, 1437, 1438, 1439, 1440, + 1443, 1444, 1448, 1451, 1454, 1457, 1460, 1463, 1466, 1467, + 1468, 1469, 1471, 1472, 1474, 1476, 1483, 1487, 1489, 1491, + 1493, 1497, 1498, 1501, 1502, 1505, 1506, 1509, 1510, 1513, + 1514, 1515, 1518, 1526, 1531, 1532, 1536, 1537, 1540, 1545, + 1548, 1549, 1550, 1558, 1559, 1559, 1563, 1564, 1565, 1576, + 1583, 1584, 1587, 1588, 1589, 1590, 1591, 1593, 1594, 1595, + 1596, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, + 1608, 1611, 1612, 1615, 1616, 1617, 1618, 1621, 1622, 1623, + 1626, 1627, 1628, 1631, 1632, 1633, 1634, 1635, 1638, 1639, + 1640, 1643, 1644, 1647, 1648, 1652, 1653, 1656, 1657, 1660, + 1661, 1664, 1665, 1666, 1667, 1670, 1671, 1672, 1673, 1674, + 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1684, 1685, 1688, + 1691, 1693, 1695, 1699, 1700, 1702, 1704, 1707, 1708, 1709, + 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1720, 1721, 1724, + 1727, 1728, 1729, 1730, 1731, 1734, 1735 +}; +#endif + + +#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) + +static const char * const yytname[] = { "$","error","$undefined.","BADTOK", +"SKIPTOK","CTOK_ELIPSIS","CASE","DEFAULT","CIF","CELSE","SWITCH","WHILE","DO", +"CFOR","GOTO","CONTINUE","BREAK","RETURN","TSEMI","TLBRACE","TRBRACE","TCOMMA", +"TCOLON","TASSIGN","TLPAREN","TRPAREN","TLSQBR","TRSQBR","TDOT","TAMPERSAND", +"TEXCL","TTILDE","TMINUS","TPLUS","TMULT","TDIV","TPERCENT","TLT","TGT","TCIRC", +"TBAR","TQUEST","CSIZEOF","CALIGNOF","ARROW_OP","CTYPEDEF","COFFSETOF","INC_OP", +"DEC_OP","LEFT_OP","RIGHT_OP","LE_OP","GE_OP","EQ_OP","NE_OP","AND_OP","OR_OP", +"MUL_ASSIGN","DIV_ASSIGN","MOD_ASSIGN","ADD_ASSIGN","SUB_ASSIGN","LEFT_ASSIGN", +"RIGHT_ASSIGN","AND_ASSIGN","XOR_ASSIGN","OR_ASSIGN","CSTRUCT","CUNION","CENUM", +"VA_ARG","VA_DCL","QGLOBALS","QMODIFIES","QNOMODS","QCONSTANT","QFUNCTION","QITER", +"QDEFINES","QUSES","QALLOCATES","QSETS","QRELEASES","QPRECLAUSE","QPOSTCLAUSE", +"QALT","QUNDEF","QKILLED","QENDMACRO","LLMACRO","LLMACROITER","LLMACROEND","TENDMACRO", +"QSWITCHBREAK","QLOOPBREAK","QINNERBREAK","QSAFEBREAK","QINNERCONTINUE","QFALLTHROUGH", +"QLINTNOTREACHED","QLINTFALLTHROUGH","QLINTFALLTHRU","QARGSUSED","QPRINTFLIKE", +"QLINTPRINTFLIKE","QSCANFLIKE","QMESSAGELIKE","QNOTREACHED","QCONST","QVOLATILE", +"QINLINE","QEXTENSION","QEXTERN","QSTATIC","QAUTO","QREGISTER","QOUT","QIN", +"QYIELD","QONLY","QTEMP","QSHARED","QREF","QUNIQUE","QCHECKED","QUNCHECKED", +"QCHECKEDSTRICT","QCHECKMOD","QKEEP","QKEPT","QPARTIAL","QSPECIAL","QOWNED", +"QDEPENDENT","QRETURNED","QEXPOSED","QNULL","QOBSERVER","QISNULL","QEXITS","QMAYEXIT", +"QNEVEREXIT","QTRUEEXIT","QFALSEEXIT","QLONG","QSIGNED","QUNSIGNED","QSHORT", +"QUNUSED","QSEF","QNOTNULL","QRELNULL","QABSTRACT","QCONCRETE","QMUTABLE","QIMMUTABLE", +"QTRUENULL","QFALSENULL","QEXTERNAL","QREFCOUNTED","QREFS","QNEWREF","QTEMPREF", +"QKILLREF","QRELDEF","CGCHAR","CBOOL","CINT","CGFLOAT","CDOUBLE","CVOID","QANYTYPE", +"QINTEGRALTYPE","QUNSIGNEDINTEGRALTYPE","QSIGNEDINTEGRALTYPE","QNULLTERMINATED", +"QSETBUFFERSIZE","QBUFFERCONSTRAINT","QENSURESCONSTRAINT","QSETSTRINGLENGTH", +"QMAXSET","QMAXREAD","QTESTINRANGE","IDENTIFIER","NEW_IDENTIFIER","TYPE_NAME_OR_ID", +"CCONSTANT","ITER_NAME","ITER_ENDNAME","TYPE_NAME","file","externalDefs","externalDef", +"constantDecl","fcnDecl","@1","plainFcn","plainNamedDecl","namedDeclBase","@2", +"@3","plainNamedDeclBase","@4","@5","iterDecl","@6","@7","macroDef","fcnDefHdr", +"optGlobMods","@8","optGlobBufConstraints","@9","optGlobBufConstraintsRest", +"optGlobEnsuresConstraintsAux","@10","optGlobBufConstraintsAux","@11","BufConstraintList", +"BufConstraint","bufferModifier","relationalOp","BufConstraintExpr","BufConstraintTerm", +"BufConstraintSrefExpr","BufUnaryOp","BufBinaryOp","optPlainGlobMods","@13", +"optGlobModsRest","optPlainGlobModsRest","specialClauses","globIdList","globIdListExpr", +"globId","globQual","optGlobQuals","optGlobModsAux","@14","@15","optPlainGlobModsAux", +"@16","@17","optMods","fcnMods","@18","fcnPlainMods","@19","specialTag","endStateTag", +"endSpecialTag","stateSpecialClause","specialClauseType","specialClause","@20", +"@21","fcnDefHdrAux","fcnBody","@22","@23","fcnDef","locModifies","locPlainModifies", +"modListExpr","mExpr","modList","specClauseListExpr","specClauseList","primaryExpr", +"postfixExpr","argumentExprList","unaryExpr","fieldDesignator","offsetofExpr", +"sizeofExpr","@24","sizeofExprAux","castExpr","timesExpr","plusExpr","shiftExpr", +"relationalExpr","equalityExpr","bitandExpr","xorExpr","bitorExpr","andExpr", +"@25","orExpr","@26","conditionalExpr","@27","@28","assignExpr","expr","optExpr", +"constantExpr","initializer","instanceDecl","@29","@30","namedInitializer","@31", +"typeDecl","@32","IsType","PushType","namedInitializerList","namedInitializerListAux", +"optDeclarators","init","initList","storageSpecifier","typeQualifier","typeModifier", +"typeSpecifier","completeType","completeTypeSpecifier","altType","completeTypeSpecifierAux", +"optCompleteType","suSpc","@33","@34","@35","@36","@37","@38","@39","@40","NotType", +"structDeclList","structDecl","structNamedDeclList","structNamedDecl","enumSpc", +"@41","enumeratorList","enumerator","optNamedDecl","namedDecl","genericParamList", +"innerMods","innerModsList","pointers","paramIdList","idList","paramTypeList", +"paramList","@42","@43","paramDecl","typeExpression","abstractDecl","optAbstractDeclBase", +"abstractDeclBase","stmt","lclintassertion","iterBody","endBody","iterDefStmtList", +"iterDefIterationStmt","forPred","@44","@45","partialIterStmt","@46","iterDefStmt", +"iterSelectionStmt","openScope","closeScope","macroBody","stmtErr","labeledStmt", +"caseStmt","@47","@48","defaultStmt","@49","@50","compoundStmt","compoundStmtErr", +"CreateInnerScope","DeleteInnerScope","CreateStructInnerScope","DeleteStructInnerScope", +"DeleteInnerScopeSafe","compoundStmtRest","compoundStmtAux","compoundStmtAuxErr", +"stmtListErr","initializerList","stmtList","expressionStmt","expressionStmtErr", +"ifPred","selectionStmt","@51","@52","whilePred","iterWhilePred","iterStmt", +"@53","@54","iterArgList","@55","iterArgExpr","primaryIterExpr","postfixIterExpr", +"unaryIterExpr","castIterExpr","timesIterExpr","plusIterExpr","shiftIterExpr", +"relationalIterExpr","equalityIterExpr","bitandIterExpr","xorIterExpr","bitorIterExpr", +"andIterExpr","orIterExpr","conditionalIterExpr","@56","@57","assignIterExpr", +"endIter","doHeader","iterationStmt","iterationStmtErr","jumpStmt","optSemi", +"id","newId","typeName", NULL +}; +#endif + +static const short yyr1[] = { 0, + 190, 190, 191, 191, 192, 192, 192, 192, 192, 192, + 192, 193, 193, 195, 194, 196, 196, 197, 197, 198, + 198, 198, 198, 199, 198, 200, 198, 201, 201, 201, + 201, 202, 201, 203, 201, 205, 206, 204, 207, 207, + 207, 207, 208, 210, 209, 212, 211, 213, 215, 214, + 214, 217, 216, 216, 218, 218, 219, 220, 220, 221, + 221, 221, 222, 222, 222, 223, 223, 224, 224, 224, + 224, 224, 224, 224, 224, 225, 226, 226, -1, -1, + 228, 227, 229, 229, 230, 230, 231, 231, 232, 232, + 233, 234, 234, 235, 235, 235, 235, 235, 236, 236, + 238, 237, 239, 237, 237, 237, 237, 241, 240, 242, + 240, 240, 240, 240, 243, 243, 245, 244, 247, 246, + 248, 248, 248, 248, 248, 249, 250, 251, 251, 252, + 252, 252, 252, 252, 252, 252, 252, 254, 253, 255, + 253, 256, 256, 258, 257, 259, 257, 260, 261, 261, + 262, 262, 263, 263, 263, 263, 263, 263, 263, 263, + 264, 264, 265, 265, 266, 266, 266, 266, 266, 266, + 266, 266, 267, 267, 268, 268, 268, 268, 268, 268, + 269, 269, 269, 269, 269, 269, 269, 269, 269, 270, + 270, 271, 271, 271, 271, 271, 271, 271, 271, 271, + 271, 271, 272, 272, 273, 275, 274, 276, 276, 276, + 276, 277, 277, 278, 278, 278, 278, 279, 279, 279, + 280, 280, 280, 281, 281, 281, 281, 281, 282, 282, + 282, 283, 283, 284, 284, 285, 285, 286, 287, 286, + 288, 289, 288, 290, 291, 292, 290, 293, 293, 293, + 293, 293, 293, 293, 293, 293, 293, 293, 293, 294, + 294, 295, 295, 296, 297, 297, 297, 298, 299, 298, + 300, 298, 301, 302, 301, 304, 303, 303, 303, 305, + 306, 307, 308, 308, 309, 309, 310, 310, 310, 311, + 311, 312, 312, 312, 312, 312, 313, 313, 313, 313, + 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, + 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, + 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, + 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, + 313, 313, 314, 314, 314, 314, 315, 315, 315, 315, + 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, + 316, 317, 317, 318, 318, 319, 319, 319, 320, 320, + 322, 323, 321, 324, 325, 321, 321, 321, 326, 327, + 321, 328, 329, 321, 321, 321, 321, 321, 330, 331, + 331, 331, 332, 332, 333, 333, 334, 334, 334, 335, + 336, 335, 335, 337, 337, 337, 338, 338, 339, 339, + 339, 339, 340, 340, 341, 341, 342, 342, 343, 343, + 344, 344, 344, 344, 345, 345, 346, 346, 347, 347, + 347, 349, 348, 350, 348, 351, 351, 352, 352, 353, + 353, 353, 354, 354, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 357, 357, 357, -1, 358, 359, 360, + 360, 361, 361, 361, 361, 363, 364, 362, 366, 365, + 365, 367, 367, 367, 367, 367, 367, 367, 367, 367, + 367, 367, 367, 367, 368, 369, 370, 371, 371, 372, + 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, + 373, 373, 375, 374, 376, 374, 378, 377, 379, 377, + 380, 380, 381, 382, 383, 384, 385, 386, 387, 387, + 387, 387, 387, 387, 387, 387, 388, 389, 389, 389, + 389, 390, 390, 391, 391, 392, 392, 393, 393, 394, + 394, 394, 395, 396, 397, 396, 398, 396, 399, 400, + 402, 403, 401, 404, 405, 404, 406, 406, 406, 406, + 407, 407, 408, 408, 408, 408, 408, 408, 408, 408, + 408, 409, 409, 409, 409, 409, 409, 409, 409, 409, + 409, 410, 410, 411, 411, 411, 411, 412, 412, 412, + 413, 413, 413, 414, 414, 414, 414, 414, 415, 415, + 415, 416, 416, 417, 417, 418, 418, 419, 419, 420, + 420, 421, 422, 423, 421, 424, 424, 424, 424, 424, + 424, 424, 424, 424, 424, 424, 424, 425, 425, 426, + 427, 427, 427, 428, 428, 428, 428, 429, 429, 429, + 429, 429, 429, 429, 429, 429, 429, 430, 430, 431, + 432, 432, 432, 432, 432, 433, 433 +}; + +static const short yyr2[] = { 0, + 0, 1, 1, 2, 2, 1, 1, 1, 1, 1, + 1, 8, 11, 0, 5, 1, 3, 1, 2, 1, + 6, 3, 6, 0, 7, 0, 8, 1, 6, 3, + 6, 0, 6, 0, 7, 0, 0, 10, 3, 3, + 3, 2, 1, 0, 2, 0, 2, 2, 0, 4, + 0, 0, 4, 0, 2, 1, 4, 1, 1, 1, + 1, 1, 1, 4, 5, 1, 1, 1, 1, 3, + 4, 2, 3, 3, 3, 1, 1, 1, 0, 2, + 0, 2, 1, 2, 1, 2, 1, 2, 1, 3, + 2, 1, 1, 1, 1, 1, 1, 1, 0, 2, + 0, 6, 0, 6, 1, 1, 0, 0, 5, 0, + 5, 1, 1, 0, 1, 0, 0, 3, 0, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 7, 0, + 8, 1, 3, 0, 3, 0, 3, 2, 3, 2, + 2, 1, 1, 1, 3, 4, 2, 3, 3, 3, + 1, 1, 1, 3, 1, 1, 3, 4, 2, 3, + 3, 3, 1, 3, 1, 1, 1, 3, 1, 1, + 1, 4, 3, 4, 6, 5, 5, 2, 2, 1, + 3, 1, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 3, 1, 9, 0, 3, 4, 2, 4, + 2, 1, 4, 1, 3, 3, 3, 1, 3, 3, + 1, 3, 3, 1, 3, 3, 3, 3, 1, 3, + 3, 1, 3, 1, 3, 1, 3, 1, 0, 4, + 1, 0, 4, 1, 0, 0, 7, 1, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, + 3, 0, 1, 1, 1, 1, 1, 3, 0, 9, + 0, 11, 2, 0, 6, 0, 7, 4, 4, 0, + 0, 2, 1, 4, 0, 4, 1, 3, 4, 1, + 3, 1, 1, 1, 1, 1, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 3, 1, 4, 1, 3, 2, 2, 2, 0, 1, + 0, 0, 11, 0, 0, 11, 6, 6, 0, 0, + 10, 0, 0, 10, 5, 5, 4, 4, 0, 1, + 1, 2, 5, 3, 2, 4, 1, 3, 4, 6, + 0, 8, 4, 1, 3, 2, 1, 4, 1, 1, + 2, 2, 1, 2, 1, 2, 1, 1, 1, 2, + 1, 2, 2, 3, 1, 3, 1, 3, 1, 1, + 3, 0, 2, 0, 4, 4, 1, 1, 2, 1, + 1, 2, 0, 1, 5, 2, 3, 3, 4, 3, + 4, 4, 5, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 4, 4, 4, 2, 1, 1, 1, + 2, 2, 7, 6, 2, 0, 0, 10, 0, 6, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 2, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, + 2, 2, 0, 4, 0, 5, 0, 3, 0, 4, + 3, 2, 3, 0, 0, 0, 0, 0, 1, 2, + 2, 3, 2, 3, 3, 4, 2, 2, 3, 3, + 4, 1, 2, 1, 2, 1, 2, 1, 2, 1, + 2, 1, 4, 2, 0, 5, 0, 6, 4, 4, + 0, 0, 10, 1, 0, 4, 1, 1, 1, 1, + 1, 3, 1, 4, 3, 4, 6, 5, 5, 2, + 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 4, 1, 3, 3, 3, 1, 3, 3, + 1, 3, 3, 1, 3, 3, 3, 3, 1, 3, + 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, + 3, 1, 0, 0, 7, 1, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 1, 0, 1, + 2, 7, 2, 2, 7, 6, 2, 3, 2, 3, + 2, 3, 3, 3, 3, 2, 3, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1 +}; + +static const short yydefact[] = { 0, + 11, 421, 389, 266, 389, 14, 0, 0, 0, 0, + 280, 280, 293, 292, 294, 295, 296, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 344, 345, 346, 343, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 389, 389, 389, 389, 389, 389, + 389, 389, 389, 389, 280, 660, 661, 665, 662, 663, + 666, 0, 3, 6, 7, 413, 8, 9, 389, 43, + 658, 10, 265, 267, 0, 369, 369, 389, 369, 389, + 362, 389, 0, 389, 142, 280, 664, 20, 389, 417, + 418, 419, 422, 423, 283, 280, 280, 276, 389, 667, + 389, 389, 665, 0, 510, 280, 517, 0, 0, 0, + 640, 0, 0, 0, 0, 280, 550, 0, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 0, 42, 0, + 0, 0, 0, 0, 0, 280, 180, 176, 179, 177, + 561, 181, 192, 212, 202, 201, 214, 218, 221, 224, + 229, 232, 234, 236, 238, 241, 244, 248, 260, 552, + 206, 0, 0, 542, 500, 501, 502, 503, 0, 0, + 504, 280, 505, 0, 506, 0, 507, 509, 175, 0, + 494, 0, 548, 0, 524, 481, 0, 0, 0, 490, + 0, 491, 470, 489, 486, 487, 482, 483, 484, 0, + 0, 488, 0, 0, 0, 492, 469, 0, 297, 298, + 299, 300, 305, 307, 306, 310, 311, 322, 324, 325, + 323, 308, 309, 301, 302, 303, 304, 319, 320, 317, + 321, 312, 313, 316, 314, 315, 328, 330, 335, 318, + 331, 332, 333, 334, 326, 327, 329, 336, 337, 340, + 341, 338, 339, 347, 349, 348, 350, 351, 352, 353, + 354, 355, 356, 342, 4, 280, 0, 144, 148, 544, + 389, 389, 659, 5, 389, 370, 366, 367, 360, 368, + 0, 280, 280, 358, 280, 280, 0, 359, 414, 357, + 420, 424, 389, 0, 282, 389, 0, 273, 280, 658, + 16, 18, 0, 389, 280, 28, 432, 280, 176, 179, + 212, 264, 513, 175, 0, 280, 280, 280, 280, 0, + 649, 651, 656, 0, 0, 389, 438, 0, 0, 195, + 200, 199, 198, 197, 196, 0, 280, 193, 194, 280, + 0, 0, 0, 0, 0, 280, 519, 280, 0, 0, + 0, 512, 463, 280, 454, 455, 456, 457, 0, 458, + 459, 280, 461, 280, 460, 462, 524, 280, 280, 188, + 189, 0, 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, 280, 239, + 245, 242, 551, 280, 0, 647, 39, 0, 525, 543, + 554, 644, 0, 511, 280, 0, 0, 0, 549, 40, + 471, 475, 485, 496, 497, 495, 0, 0, 41, 22, + 280, 432, 389, 280, 524, 545, 280, 268, 143, 389, + 0, 364, 0, 389, 0, 389, 0, 280, 280, 279, + 280, 278, 274, 389, 0, 280, 0, 389, 280, 19, + 429, 0, 0, 415, 430, 280, 0, 0, 518, 0, + 557, 0, 263, 0, 648, 657, 178, 280, 280, 0, + 440, 439, 441, 280, 508, 280, 0, 652, 653, 654, + 655, 650, 515, 0, 0, 0, 0, 0, 643, 389, + 522, 641, 0, 0, 183, 0, 190, 0, 0, 0, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 215, 216, 217, 220, 219, 222, 223, 225, 226, + 227, 228, 230, 231, 233, 235, 237, 280, 280, 280, + 261, 280, 280, 207, 538, 179, 542, 0, 389, 523, + 555, 0, 0, 493, 479, 0, 0, 24, 0, 529, + 280, 546, 145, 389, 280, 389, 524, 147, 280, 269, + 363, 280, 379, 0, 387, 382, 0, 388, 0, 404, + 407, 401, 403, 284, 280, 280, 658, 15, 30, 280, + 432, 280, 17, 416, 425, 427, 36, 434, 389, 433, + 437, 514, 553, 0, 559, 280, 361, 446, 0, 432, + 442, 280, 0, 213, 389, 280, 0, 520, 521, 0, + 0, 0, 537, 0, 562, 280, 184, 182, 280, 280, + 240, 0, 243, 280, 209, 280, 211, 539, 540, 280, + 280, 280, 560, 280, 280, 389, 44, 26, 530, 533, + 280, 280, 531, 280, 547, 0, 271, 280, 365, 385, + 526, 371, 386, 526, 374, 280, 406, 280, 0, 0, + 280, 280, 280, 0, 32, 0, 280, 0, 81, 431, + 280, 443, 280, 0, 447, 450, 280, 0, 448, 0, + 432, 0, 0, 516, 464, 465, 466, 280, 280, 191, + 186, 187, 246, 0, 0, 541, 556, 0, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 0, 176, 179, + 177, 192, 212, 201, 218, 221, 224, 229, 232, 234, + 236, 238, 241, 0, 565, 564, 573, 582, 592, 594, + 598, 601, 604, 609, 612, 614, 616, 618, 620, 622, + 626, 567, 175, 0, 23, 46, 107, 44, 534, 535, + 280, 532, 21, 280, 285, 389, 377, 526, 389, 378, + 526, 400, 405, 280, 0, 277, 280, 287, 275, 280, + 0, 389, 81, 34, 0, 426, 428, 37, 114, 435, + 409, 0, 280, 443, 410, 444, 558, 476, 0, 451, + 449, 452, 0, 0, 185, 0, 565, 280, 208, 210, + 646, 0, 0, 195, 200, 199, 198, 197, 196, 193, + 194, 280, 280, 280, 188, 189, 0, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 239, 623, 242, 480, 0, 474, + 25, 54, 101, 117, 105, 121, 122, 123, 124, 125, + 128, 129, 45, 107, 83, 106, 389, 389, 87, 46, + 536, 280, 0, 391, 389, 389, 390, 389, 389, 389, + 408, 280, 290, 0, 285, 12, 31, 33, 81, 29, + 658, 108, 119, 112, 82, 114, 85, 113, 432, 436, + 411, 412, 280, 445, 453, 0, 204, 0, 524, 247, + 645, 178, 280, 0, 183, 0, 0, 0, 0, 627, + 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, + 215, 216, 217, 220, 219, 222, 223, 225, 226, 227, + 228, 230, 231, 233, 235, 237, 619, 280, 621, 280, + 473, 47, 51, 0, 389, 99, 658, 84, 138, 0, + 88, 27, 285, 280, 389, 0, 280, 392, 380, 389, + 383, 389, 402, 288, 280, 658, 35, 0, 389, 99, + 658, 86, 280, 477, 280, 0, 642, 639, 213, 280, + 184, 182, 280, 280, 0, 566, 48, 0, 0, 389, + 94, 95, 96, 97, 98, 658, 89, 99, 0, 0, + 0, 154, 118, 163, 658, 0, 153, 0, 130, 135, + 134, 133, 132, 131, 136, 137, 140, 0, 270, 280, + 394, 280, 280, 389, 397, 0, 372, 0, 375, 289, + 291, 0, 38, 658, 658, 120, 658, 152, 280, 0, + 205, 203, 638, 525, 0, 186, 187, 624, 0, 0, + 0, 58, 59, 69, 67, 0, 56, 76, 0, 63, + 66, 0, 68, 0, 99, 0, 100, 93, 91, 92, + 0, 157, 0, 0, 0, 0, 0, 150, 0, 0, + 166, 173, 658, 165, 0, 280, 286, 280, 280, 0, + 395, 280, 381, 0, 384, 0, 13, 116, 116, 151, + 478, 563, 185, 280, 0, 0, 66, 0, 72, 53, + 55, 61, 60, 62, 0, 0, 0, 0, 0, 116, + 90, 116, 158, 155, 162, 161, 0, 159, 160, 164, + 149, 0, 169, 0, 0, 0, 0, 0, 658, 272, + 398, 389, 393, 280, 373, 376, 109, 115, 111, 625, + 50, 78, 77, 0, 73, 0, 0, 70, 0, 74, + 75, 0, 102, 104, 156, 170, 167, 0, 171, 172, + 174, 127, 280, 0, 396, 399, 0, 57, 71, 64, + 168, 139, 126, 280, 65, 141, 0, 0, 0 +}; + +static const short yydefgoto[] = { 1227, + 82, 83, 84, 85, 122, 320, 321, 86, 667, 778, + 322, 803, 919, 87, 699, 921, 904, 89, 776, 777, + 881, 882, 982, 1027, 1028, 983, 984, 1096, 1097, 1098, + 1155, 1099, 1100, 1101, 1102, 1194, 808, 809, 893, 925, + 894, 1036, 1037, 1109, 1038, 1039, 895, 985, 986, 927, + 1009, 1010, 1187, 1188, 987, 928, 1011, 897, 1224, 1213, + 898, 1057, 899, 1048, 1125, 90, 289, 453, 455, 91, + 1043, 1076, 1044, 1167, 1045, 1122, 1123, 162, 163, 526, + 164, 936, 165, 166, 425, 564, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 558, 177, 560, 178, + 559, 828, 179, 207, 494, 333, 290, 93, 678, 784, + 115, 606, 94, 316, 181, 287, 116, 117, 903, 799, + 914, 96, 97, 98, 99, 347, 291, 461, 101, 297, + 102, 788, 1134, 791, 1136, 681, 1066, 684, 1068, 103, + 906, 907, 1063, 1064, 104, 689, 599, 600, 813, 119, + 483, 112, 113, 106, 614, 615, 484, 485, 486, 701, + 620, 348, 819, 815, 503, 372, 373, 208, 228, 209, + 210, 374, 933, 1080, 212, 664, 213, 214, 215, 216, + 183, 430, 375, 376, 488, 637, 377, 335, 514, 378, + 188, 379, 570, 786, 999, 221, 583, 521, 429, 190, + 584, 585, 380, 191, 192, 381, 661, 624, 382, 224, + 383, 387, 719, 755, 879, 756, 757, 758, 759, 760, + 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 978, 1144, 772, 1084, 384, 385, 197, 386, 294, + 334, 200, 109 +}; + +static const short yypact[] = { 2240, +-32768, 108, 6007,-32768, 6677,-32768, 697, 3211, 3591, 3591, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768, 431,-32768,-32768, +-32768, 2416,-32768,-32768,-32768, 355,-32768,-32768, 5623,-32768, + 114,-32768,-32768,-32768, 74, 6512, 6512,-32768, 6512, 140, + 149,-32768, 766,-32768,-32768, 697,-32768,-32768,-32768,-32768, +-32768,-32768, 108,-32768,-32768, 191,-32768, 140,-32768,-32768, +-32768, 6007,-32768, 217,-32768, 4477,-32768, 225, 234, 253, +-32768, 268, 697, 306, 319, 762,-32768, 2790, 4477, 4477, + 4477, 4477, 4477, 4477,-32768, 4703, 4703, 398,-32768, 393, + 425, 434, 445, 413, 219, 5070,-32768, 450, 456,-32768, + 486,-32768, 905, 898,-32768,-32768,-32768, 1049, 423, 577, + 723, 752, 488, 508, 487, 521, 67,-32768,-32768, 325, +-32768, 3738, 468, 502,-32768,-32768,-32768,-32768, 615, 3358, +-32768, 5070,-32768, 3738,-32768, 3738,-32768,-32768, 580, 636, +-32768, 620,-32768, 2979, 486, 647, 344, 599, 3401,-32768, + 3591,-32768,-32768,-32768, 6272,-32768,-32768,-32768,-32768, 656, + 676,-32768, 3591, 3591, 3738,-32768,-32768, 629,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768, 687, 708,-32768,-32768,-32768, + 140, 5466,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + 722, 477,-32768,-32768, 697, 697, 59,-32768, 355,-32768, +-32768,-32768,-32768, 749,-32768,-32768, 758, 724, 477, 114, +-32768, 540, 759,-32768, 697,-32768, 255, 4477,-32768,-32768, +-32768,-32768,-32768,-32768, 768, 4477, 4477, 4477, 797, 770, +-32768,-32768,-32768, 516, 464, 6141, 296, 786, 800,-32768, +-32768,-32768,-32768,-32768,-32768, 816, 4477,-32768,-32768, 4477, + 828, 838, 879, 886, 891, 4477,-32768, 1718, 693, 693, + 693,-32768,-32768, 5070,-32768,-32768,-32768,-32768, 892,-32768, +-32768, 5070,-32768, 5070,-32768,-32768,-32768, 1451, 4477,-32768, +-32768, 96, 4477, 4477, 4477, 4477, 4477, 4477, 4477, 4477, + 4477, 4477, 4477, 4477, 4477, 4477, 4477, 4477, 4477, 4477, + 4477, 4477, 4477, 4477, 4477, 4477, 4477, 4477, 4477,-32768, +-32768,-32768,-32768, 4477, 716,-32768,-32768, 2601,-32768,-32768, + 910,-32768, 913,-32768, 4477, 505, 901, 920,-32768,-32768, +-32768,-32768, 6272,-32768,-32768,-32768, 3168, 954,-32768,-32768, + 4477, 68, 3840, 477, 949,-32768, 477,-32768, 570, 6677, + 896, 972, 992, 998, 1006, 998, 697, 1035, 477,-32768, + 477,-32768,-32768,-32768, 912, 1025, 1037,-32768, 477, 540, +-32768, 697, 1047,-32768, 1045, 697, 279, 1059,-32768, 333, + 1079, 385, 1079, 1069,-32768,-32768,-32768,-32768, 2008, 1078, + 587,-32768, 627, 4477,-32768,-32768, 1085,-32768,-32768,-32768, +-32768,-32768,-32768, 1109, 1116, 948, 957, 963,-32768, 3840, +-32768,-32768, 1139, 1134,-32768, 412,-32768, 99, 697, 697, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768, 1049, 1049, 423, 423, 577, 577, + 577, 577, 723, 723, 752, 488, 508, 4477, 4477, 4477, +-32768, 4929, 4940,-32768,-32768, 5855,-32768, 3548, 4024,-32768, +-32768, 1137, 426,-32768,-32768, 1138, 1140,-32768, 1141,-32768, + 2110,-32768,-32768, 4208, 4392,-32768, 949,-32768,-32768, 1146, +-32768,-32768, 1144, 1151,-32768, 1152, 1157,-32768, 843,-32768, + 1148,-32768,-32768,-32768, 191,-32768, 406,-32768,-32768, 4477, + 358, 477,-32768,-32768, 1156,-32768,-32768, 1176, 6677,-32768, +-32768,-32768,-32768, 1158,-32768, 797,-32768,-32768, 1155, 556, + 627, 2412, 1160,-32768,-32768,-32768, 1164,-32768,-32768, 1099, + 1100, 1102,-32768, 1165,-32768, 4477,-32768,-32768,-32768,-32768, + 487, 914, 521, 4477,-32768, 4477,-32768,-32768,-32768, 4435, + 5070, 4477,-32768, 5178, 4477,-32768,-32768,-32768,-32768,-32768, + 4618, 4661,-32768, 4844,-32768, 1166,-32768,-32768,-32768,-32768, +-32768, 1175,-32768,-32768, 1177,-32768, 697,-32768, 697, 1178, + 2040,-32768,-32768, 1171,-32768, 1180,-32768, 348,-32768,-32768, + 697, 614, 5070, 1182,-32768,-32768, 137, 1181,-32768, 1183, + 109, 1186, 1184,-32768,-32768,-32768,-32768, 4477, 5178,-32768, +-32768,-32768,-32768, 1187, 1189,-32768,-32768, 452, 4477, 4477, + 4477, 4477, 4477, 4477, 4477, 4703, 4703, 1179, 504, 575, + 582, 1077, 1033, 604, 1081, 918, 981, 850, 1024, 1173, + 1169, 1185, 1161, 90, 1190,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768, 612, 660,-32768,-32768, 1326,-32768,-32768,-32768, + 4887,-32768,-32768,-32768,-32768, 6599,-32768,-32768, 6599,-32768, +-32768,-32768,-32768, 4477, 1054,-32768, 2040,-32768,-32768, 2040, + 1123,-32768,-32768,-32768, 1193,-32768,-32768,-32768, 1429,-32768, + 355, 1195,-32768, 539,-32768, 627,-32768,-32768, 1196,-32768, +-32768,-32768, 1197, 697,-32768, 695, 1201, 4477,-32768,-32768, + 1202, 729, 1205, 782, 798, 830, 853, 874, 885, 893, + 895, 4477, 1633, 4477, 902, 909, 155, 4477, 4477, 4477, + 4477, 4477, 4477, 4477, 4477, 4477, 4477, 4477, 4477, 4477, + 4477, 4477, 4477, 4477, 4477, 4477, 4477, 4477, 4477, 4477, + 4477, 4477, 4477, 4477, 4477,-32768, 4477,-32768, 1211, 1215, +-32768, 1057, 24,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768, 1066,-32768,-32768,-32768,-32768, 1030,-32768, +-32768, 2040, 583,-32768, 140, 5701,-32768, 6599, 5701, 6599, +-32768,-32768,-32768, 1098,-32768,-32768,-32768,-32768,-32768,-32768, + 114, 300,-32768,-32768,-32768, 1080,-32768,-32768, 189,-32768, +-32768,-32768, 3694,-32768,-32768, 638,-32768, 1220, 949,-32768, +-32768, 916, 4477, 1221, 945, 946, 240, 697, 697,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + 947, 970, 971, 858, 993, 523, 673, 410, 489, 622, + 662, 467, 652, 427, 254, 336, 487, 4477, 521, 5178, +-32768,-32768, 1065, 1067, 6403, 57, 81,-32768,-32768, 866, +-32768,-32768,-32768,-32768,-32768, 1228, 366,-32768,-32768, 5701, +-32768, 5701,-32768,-32768, 1979, 764,-32768, 1159, 6403, 57, + 81,-32768, 755,-32768,-32768, 697,-32768, 1061, 1021,-32768, + 1022, 1023,-32768,-32768, 1101,-32768,-32768, 1073, 101, 5309, +-32768,-32768,-32768,-32768,-32768, 840,-32768, 57, 944, 55, + 55,-32768,-32768, 285, 987, 1167,-32768, 151,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768, 1001,-32768, 477, +-32768,-32768, 1232,-32768, 1235, 1236,-32768, 1239,-32768,-32768, +-32768, 1188,-32768, 5151, 840,-32768, 987,-32768, 654, 1229, +-32768,-32768,-32768,-32768, 1238, 1032, 1034,-32768, 101, 101, + 156,-32768,-32768,-32768,-32768, 1194, 101,-32768, 1104,-32768, + 370, 1237,-32768, 1198, 57, 1199,-32768,-32768,-32768,-32768, + 705, 285, 85, 697, 697, 55, 1204,-32768, 151, 151, +-32768, 543, 1052,-32768, 151,-32768,-32768, 4477, 366, 1250, +-32768,-32768,-32768, 1249,-32768, 1251,-32768, 1200, 1200,-32768, +-32768,-32768, 1043, 4477, 1207, 1113, 711, 156, 370,-32768, +-32768,-32768,-32768,-32768, 101, 41, 697, 697, 101, 1200, +-32768, 1200,-32768,-32768,-32768, 285, 1245,-32768,-32768, 285, +-32768, 792, 543, 823, 697, 697, 151, 1208, 1052,-32768, +-32768,-32768,-32768, 4477,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768, 101,-32768, 711, 1256,-32768, 1248,-32768, +-32768, 1259,-32768,-32768,-32768,-32768,-32768, 1254,-32768,-32768, + 543,-32768,-32768, 1209,-32768,-32768, 1264,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768, 1290, 1293,-32768 +}; + +static const short yypgoto[] = {-32768, +-32768, 1216,-32768,-32768,-32768,-32768, -391, -105,-32768,-32768, + 974,-32768,-32768,-32768,-32768,-32768, 107,-32768, 522,-32768, + 405,-32768,-32768,-32768,-32768,-32768,-32768, -897,-32768,-32768, +-32768, -931,-32768, -943,-32768,-32768, -709,-32768,-32768,-32768, + -696, 299, 201,-32768,-32768, 272, 417,-32768,-32768, 386, +-32768,-32768, -863, -674,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768, -884, 141, 303, -959, 194,-32768, -647, 475, + 1234,-32768,-32768, -590,-32768,-32768, 11, -363, -402, -245, + -350, -348, -371, -352, -471, -483,-32768, -578,-32768, -24, +-32768,-32768, 928, 1332, -610, -360, 15,-32768,-32768,-32768, + -465,-32768,-32768,-32768, 0, -226, 849,-32768, -811, -716, +-32768,-32768,-32768,-32768,-32768,-32768, 80, 740,-32768, 585, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 967, + -699, -611,-32768, 204,-32768,-32768, 645, 648, 524, 13, + -376, 1224,-32768, 8,-32768,-32768, -584,-32768,-32768,-32768, + 640, -233, 995,-32768, -496, 193,-32768, 1329,-32768, 1120, +-32768, 1041,-32768,-32768,-32768,-32768, -39,-32768,-32768,-32768, +-32768, 63, 1231, 1362,-32768,-32768, 1616,-32768,-32768, -354, +-32768, 969, 264, -551, -582,-32768, 829,-32768,-32768, 922, + -87, -420, 127,-32768, 221, 84,-32768,-32768, 170,-32768, + 211,-32768,-32768, 632,-32768, 373,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768, 1686,-32768,-32768, 1731, -311, + 188, 446,-32768 +}; + + +#define YYLAST 6866 + + +static const short yytable[] = { 95, + 309, 292, 95, 604, 631, 513, 547, 548, 475, 114, + 229, 230, 105, 515, 92, 704, 742, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 545, 546, 708, 556, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 553, 554, 557, 1198, 555, 462, + 184, 742, 481, 744, 284, 579, 653, 467, 1040, 100, + 913, 95, 118, 915, 121, 754, 651, 613, 1041, 909, + 577, 193, 578, 918, 105, 477, 92, 295, 293, 301, + 588, 332, 896, 1006, 1040, 95, 88, 421, 1040, -103, + -103, 1164, 926, 481, 1041, 314, 315, 317, 1041, 424, + 312, 323, 422, 529, 1090, 648, 823, 443, 744, 325, + 876, 293, 789, 822, 1091, 222, 222, 346, 629, 530, + 754, 2, 1031, 1032, 356, 877, 1147, 1149, 660, 350, + 351, 352, 353, 354, 355, 1111, 1112, -280, 1146, 1172, + 1173, 100, 499, 672, 437, 549, 550, 551, 552, 441, + 2, 442, 1033, 1034, 1119, 296, 296, 194, 296, 1148, + 753, 1058, 948, 446, 1120, 993, 1035, 107, 88, 1091, + 107, 1145, 752, 481, 107, 199, 199, 199, 949, 1151, + 349, 324, 991, 346, 1196, 816, -103, -103, 1000, 1007, + 1002, 313, -389, 706, -389, 110, 111, 1211, 195, 896, + 697, 193, -389, 1197, 366, 367, 1199, 1202, 1166, 223, + 223, 1170, 515, 303, 696, 753, 908, 76, 1042, 910, + 327, 76, 77, 123, 426, 79, 80, 752, 336, 694, + -389, -389, -389, 477, -389, -389, 432, 337, 433, 481, + 424, 746, 1217, 76, 1042, 193, 1022, 76, 1042, 107, + 1165, 710, 635, 193, -615, 1189, 338, 193, -615, 193, + 1092, 1093, 417, 76, 1094, 451, 1095, 448, 1071, 1166, + 301, 339, 750, 107, 998, 693, 1203, 998, 1204, 424, + 745, 95, 460, 497, 463, 465, 456, 194, 193, 107, + 1113, 751, 1114, 748, 459, 749, 746, 816, 95, -280, + 107, 499, 1014, 341, 323, 199, 1001, 346, 1115, 2, + 222, 474, 742, 76, 1121, 222, 342, 222, 76, 1094, + 569, 332, 423, 199, 708, 424, 500, 750, 195, 222, + 222, 194, 806, 424, 501, 745, -617, 623, 462, 194, + -617, 439, 481, 194, 424, 194, 751, 346, 748, 199, + 749, -389, -389, -389, 418, -389, -389, 199, -281, 199, + 286, 199, 695, 199, 431, -110, -110, 1062, 998, 744, + 998, 199, 195, 979, 194, 1156, 199, 1157, 199, 2, + 195, 754, 713, 977, 195, 424, 195, 441, 361, 625, + 199, 199, 199, 1158, 542, 543, 544, 1067, 747, 1069, + 724, 360, 725, 293, 223, 498, 332, 365, 692, 223, + -605, 223, 646, 911, -605, 195, 647, -389, -389, -389, + 362, -389, -389, 223, 223, 108, 424, -613, 108, 363, + 663, -613, 124, 95, 407, 408, 95, 456, 409, 410, + 364, 966, 967, 594, -667, 597, 586, 603, 95, 589, + 95, -661, 424, 747, 332, 610, 831, -665, 323, 415, + 416, 423, -110, -110, 424, 619, 325, -610, 497, 107, + 567, -610, 107, 107, 107, 833, 753, 627, 964, 965, + 500, 975, 633, 411, 412, 460, 107, -662, 752, -606, + 2, 193, 107, -606, 634, -667, 417, 413, 414, 972, + 973, 976, 439, 974, -570, 424, 419, 108, -570, 497, + 76, 77, 123, 496, 79, 80, 424, 409, 410, 498, + -389, -389, -389, -602, -389, -389, 418, -602, 76, 77, + 123, 108, 79, 80, 407, 408, 516, 517, 518, 427, + 481, 199, -280, -281, 499, 476, 519, 326, 1174, 199, + 1175, 199, 2, 222, 522, 420, 523, 746, 340, -389, + 706, -389, 631, 456, 1018, 332, 1176, -389, 676, -389, + -389, 460, -389, -498, 1127, -569, 811, 194, 456, -569, + 994, -664, -571, 995, 690, 691, -571, 332, 750, 1008, + -280, 323, 499, -667, -667, 199, 745, -667, -667, 325, + 968, 969, 970, 971, -591, 409, 410, 751, -591, 748, + 633, 749, -568, 428, 199, 460, -568, -280, 195, 499, + 199, 107, -607, 435, 107, 582, -607, 2, 721, 722, + -280, 193, 632, 346, 107, 346, 107, 434, 107, 76, + 77, 123, 1015, 79, 80, 1016, 107, 223, -663, 107, + 409, 410, -611, 107, 444, 1046, -611, 785, -440, 499, + 424, 298, -608, 300, 880, 792, -608, 794, 411, 412, + 440, 800, 801, -603, 1072, 445, 805, -603, 702, 1078, + 619, 812, 413, 414, 407, 408, 500, 199, 811, 814, + 409, 410, 582, 450, 501, 424, 107, 107, 1104, 938, + 449, 76, 77, 123, 1106, 79, 80, 931, 346, 1163, + 1113, 452, 1114, 1117, 747, 1195, 1156, 194, 1157, 458, + 834, 835, 836, 837, 838, 839, 473, 108, 1115, 424, + 464, 466, 468, 942, 1158, 199, 199, 562, 563, 411, + 412, 582, 1138, 1139, 108, 1140, 470, 1181, 199, 332, + 326, 199, 199, 413, 414, 472, 582, 675, 195, 343, + 499, 293, 478, 902, 995, 328, 1085, 495, 2, 489, + 139, 140, 141, 142, 143, 144, 76, 77, 123, 107, + 79, 80, -585, 940, 415, 416, -585, 145, 146, 147, + 504, 1178, 930, 812, -262, 633, 1206, 1174, -590, 1175, + 328, 814, -590, 1216, 505, 139, 140, 141, 142, 143, + 144, 148, 305, 306, 307, 1176, 76, 77, 123, 506, + 79, 80, 145, 146, 147, 508, 1040, 199, 199, 1207, + -589, 773, 675, 727, -589, 509, 1041, 293, 199, 199, + 1105, 199, 686, 687, 675, 905, 148, 1214, 905, 961, + 962, 963, 157, -588, 107, 76, 107, -588, -600, 76, + 77, 123, -600, 79, 80, 107, 866, 867, 107, 107, + 199, 404, 405, 406, -587, 817, 510, 1030, -587, 108, + 868, 869, 108, 511, 996, -586, 773, 157, 512, -586, + 520, 1003, 601, -583, 108, -584, 108, -583, 571, -584, + 393, 1074, -580, 572, 326, 574, -580, 616, 388, -581, + 389, 621, -389, -581, 424, 723, -572, 76, 77, 123, + -572, 79, 80, 575, 76, 329, 330, 160, -389, 862, + 863, 390, 391, 1019, 394, 395, 396, 397, 398, 399, + 400, 401, 402, 403, 576, -575, 646, -595, 199, -575, + 1021, -595, 587, 309, 649, 650, 189, 220, 220, 76, + 329, 330, 160, 591, 1049, 905, 1050, 905, 905, 905, + -596, -597, 592, 1059, -596, -597, 95, 1051, 1052, 608, + 1053, 107, 1054, 1055, 293, 76, 1042, 1116, 1165, 1065, + 593, 107, 812, -599, 1081, 1056, -280, -599, 1126, 460, + 1079, 995, 1086, 1087, 596, 589, 404, 405, 406, 864, + 865, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, -593, -576, -574, 456, -593, -576, -574, 182, 211, + 211, 609, -578, 602, -579, 848, -578, 326, -579, 95, + 611, 1128, 1130, -577, 299, 618, 302, -577, 304, 293, + 308, 617, 1177, 912, 687, 310, 870, 871, 812, 905, + 622, 905, 404, 405, 406, 318, 626, 319, 456, 849, + 850, 851, 852, 853, 854, 855, 856, 857, 858, 424, + 843, 630, 844, 332, -389, 636, 189, 886, 887, 888, + 889, 890, 891, 892, 859, 860, 861, 1004, 1005, 1190, + -389, 424, 1088, 845, 846, 1180, 76, 1108, 95, 392, + 638, 1184, 601, 640, 601, 107, 107, 883, 884, 885, + 639, 1065, 641, 807, 1192, 1193, 621, 108, 642, 644, + 189, 922, 923, 924, 1152, 1153, 1154, 645, 189, 332, + 662, 665, 189, 680, 189, 668, 666, 773, 677, 682, + 688, 683, 220, 438, 1047, 685, 698, 220, 182, 220, + 700, 705, 703, 711, 107, 714, 715, 716, 718, 717, + 783, 220, 220, 189, 787, 796, 790, 802, 1047, 818, + 107, 872, 842, 107, 804, 820, 824, 873, 825, 821, + 916, 829, 1222, 830, 878, 875, 1103, 920, 929, 941, + 934, 935, 182, 1226, 874, 939, 1110, 1047, 1047, 943, + 182, 980, 981, -52, 182, 1124, 182, 1017, 185, 217, + 217, 1020, -49, 1029, 211, 1061, 1073, 107, 1083, 211, + 1089, 211, 1129, 1141, 1118, 1133, 1132, 454, 1135, 108, + 1159, 457, 1143, 211, 211, 182, 107, 1183, 1185, 937, + 1186, 1205, 884, 1218, 1219, 1137, 1103, 1103, 1103, 469, + 1221, 1150, 471, 1220, 1103, 1160, 1162, 507, 1225, 1228, + 479, 1171, 1229, 482, 1191, 1212, 1223, 285, 480, 900, + 1047, 107, 107, 1047, 992, 1161, 1124, 1124, 1075, 1107, + 988, 1012, 1124, 1077, 1208, 527, 107, 946, 1179, 605, + 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, + 541, 679, 1182, 795, 793, 1103, 311, 932, 227, 180, + 810, 502, 1103, 447, 107, 107, 1103, 1142, 643, 568, + 827, 561, 1026, 0, 0, 524, 0, 0, 0, 331, + 0, 1047, 107, 107, 1124, 0, 0, 0, 185, 186, + 218, 218, 331, 331, 331, 331, 331, 331, 0, 358, + 359, 1103, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1023, 1024, 0, 189, 883, 884, 885, + 0, 0, 0, 886, 887, 888, 889, 890, 891, 892, + 0, 0, 185, 0, 0, 220, 0, 0, 482, 0, + 185, 0, 0, 0, 185, 590, 185, 0, 0, 0, + 595, 0, 598, 0, 217, 0, 0, 0, 0, 217, + 607, 217, 108, 0, 612, 0, 0, 0, 0, 0, + 0, 0, 0, 217, 217, 185, 0, 0, 108, 0, + 0, 1082, 0, 0, 0, 0, 0, 344, 182, 345, + 0, 0, 0, 0, 328, 525, 0, 0, 0, 139, + 140, 141, 142, 143, 144, 0, 0, 211, 0, 0, + 0, 0, 0, 0, 0, 0, 145, 146, 147, 186, + 922, 923, 924, 0, 0, 108, 886, 887, 888, 889, + 890, 891, 892, 180, 0, 0, 0, 0, 0, 0, + 148, 180, 0, 0, 108, 180, 0, 180, 0, 0, + 0, 0, 0, 0, 0, 436, 189, 0, 0, 0, + 0, 0, 0, 186, 0, 0, 0, 0, 0, 0, + 0, 186, 590, 0, 0, 186, 180, 186, 0, 1168, + 1169, 157, 0, 0, 0, 218, 0, 0, 0, 0, + 218, 0, 218, 720, 108, 0, 0, 482, 0, 0, + 0, 0, 0, 0, 218, 218, 186, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 707, 0, 0, 331, + 0, 712, 1200, 1201, 0, 0, 0, 0, 182, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 798, 0, + 1209, 1210, 0, 187, 219, 219, 0, 0, 0, 0, + 0, 0, 775, 76, 329, 330, 160, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 0, 0, 0, 328, 945, 185, 487, + 0, 139, 140, 141, 142, 143, 144, 490, 491, 492, + 493, 0, 0, 0, 0, 0, 0, 217, 145, 146, + 147, 0, 0, 0, 331, 0, 0, 0, 487, 0, + 0, 0, 0, 196, 225, 225, 0, 0, 0, 487, + 0, 0, 148, 0, 0, 0, 0, 0, 847, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 528, 0, 0, 0, 798, 0, 0, 798, 0, 0, + 0, 0, 331, 0, 0, 0, -524, 331, 198, 226, + 226, 368, 0, 157, 0, 0, 139, 140, 141, 142, + 143, 144, 0, 187, 0, 0, 0, 0, 0, 180, + 0, 0, 0, 145, 146, 147, 573, 0, 917, 944, + 527, 0, 0, 0, 0, 950, 951, 952, 953, 954, + 955, 956, 957, 958, 959, 960, 0, 148, 0, 186, + 0, 331, 0, 331, 0, 655, 657, 187, 185, 0, + 0, 0, 0, 0, 0, 187, 0, 0, 218, 187, + 0, 187, 0, 0, 0, 76, 329, 330, 160, 219, + 0, 0, 0, 196, 219, 0, 219, 0, 157, 798, + 0, 0, 0, 0, 0, 0, 0, 0, 219, 219, + 187, 0, 0, 331, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 989, 990, 331, 0, 196, 198, 0, + 0, 997, 0, 0, 0, 196, 0, 0, 0, 196, + 0, 196, 0, 0, 0, 0, 0, 0, 0, 225, + 652, 0, 0, 0, 225, 1013, 225, 743, 0, 180, + 76, 329, 330, 160, 0, 0, 0, 0, 225, 225, + 196, 0, 198, 0, 0, 0, 0, 0, 0, 0, + 198, 0, 0, 0, 198, 0, 198, 0, 0, 186, + 0, 0, 798, 0, 226, 0, 0, 0, 0, 226, + 0, 226, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 743, 226, 226, 198, 0, 493, 0, 0, + 0, 1060, 0, 331, 331, 331, 331, 331, 331, 840, + 841, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 487, 0, 487, 0, 0, + 0, 0, 0, 728, 0, 0, 774, 797, 1070, 0, + 0, 0, 328, 0, 0, 0, 0, 139, 140, 141, + 142, 143, 144, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 145, 146, 147, 331, 0, 0, + 1131, 328, 0, 0, 628, 0, 139, 140, 141, 142, + 143, 144, 0, 187, 0, 0, 0, 0, 148, 826, + 0, 0, 0, 145, 146, 147, 0, 0, 797, 0, + 832, 331, 219, 328, 0, 0, 0, 0, 139, 140, + 141, 142, 143, 144, 0, 0, 0, 148, 0, 0, + 0, 0, 0, 0, 0, 145, 146, 147, 0, 157, + 0, 0, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 148, + 331, 0, 0, 196, 0, 126, 127, 128, 157, 129, + 130, 131, 132, 133, 134, 135, 136, 203, -524, 669, + 0, 0, 225, 368, 0, 0, 0, 0, 139, 140, + 141, 142, 143, 144, 0, 0, 0, 0, 1215, 0, + 157, 0, 0, 0, 0, 145, 146, 147, 198, 0, + 0, 76, 329, 330, 160, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 947, 331, 226, 0, 148, + 0, 0, 0, 187, 0, 0, 0, 0, 0, 0, + 76, 329, 330, 160, 0, 0, 0, 0, 0, 0, + 0, 0, 150, 151, 152, 153, 154, 155, 0, 0, + 0, 0, 0, 743, 0, 0, 156, 0, 0, 0, + 157, 0, 76, 329, 330, 160, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -280, 493, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 369, 0, 0, 370, 0, + 0, 371, 76, 158, 159, 160, 161, 80, 198, 0, + 0, 0, 0, 0, 0, 0, -389, -389, -389, 1025, + 4, 0, 0, 0, 5, 6, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8, 9, + 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 11, 12, 13, + 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 331, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 331, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -2, 1, 331, 0, 0, + 0, 0, 76, 77, 78, 0, 79, 80, 81, 0, + 0, 0, 0, 0, 0, 328, 0, 0, 709, -280, + 139, 140, 141, 142, 143, 144, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 145, 146, 147, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 148, -389, -389, -389, 0, 4, 0, 0, 0, + 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 8, 9, 10, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 157, 11, 12, 13, 0, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 0, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 0, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 0, 0, 0, 76, 329, 330, 160, 76, 77, + 78, 125, 79, 80, 81, 0, 126, 127, 128, 0, + 129, 130, 131, 132, 133, 134, 135, 136, 137, -524, + 565, 0, 0, 0, 138, 0, 0, 0, 0, 139, + 140, 141, 142, 143, 144, 0, 0, 0, 0, 0, + 0, 0, -280, -280, 0, 3, 145, 146, 147, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -389, -389, -389, + 148, 4, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 150, 151, 152, 153, 154, 155, 0, + 0, 0, 0, 0, 0, 0, 0, 156, 11, 12, + 13, 157, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 0, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 0, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, + 0, 0, 0, 76, 158, 566, 160, 161, 80, 81, + 125, 0, 0, 0, 0, 126, 127, 128, 0, 129, + 130, 131, 132, 133, 134, 135, 136, 137, -524, 0, + 0, 0, 0, 138, 0, 0, 0, 0, 139, 140, + 141, 142, 143, 144, 0, 0, 0, 0, 0, 0, + 0, -280, -280, 0, 0, 145, 146, 147, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -280, -280, -280, 148, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 150, 151, 152, 153, 154, 155, 0, 0, + 0, 0, 0, 0, 0, 0, 156, -280, -280, -280, + 157, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, 0, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, -280, -280, -280, 0, -280, -280, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, -280, 0, 0, 0, 0, 0, + 0, 0, 76, 158, 159, 160, 161, 80, -280, 201, + 0, 0, 0, 0, 126, 127, 128, 0, 0, 202, + 131, 132, 133, 134, 135, 136, 203, -524, -528, 0, + 0, 0, 204, 0, 0, 0, 0, 139, 140, 141, + 142, 143, 144, 0, 0, 0, 0, 0, 0, 0, + -280, -280, 0, 0, 145, 146, 147, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -280, -280, -280, 148, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 150, 151, 152, 153, 154, 155, 0, 0, 0, + 0, 0, 0, 0, 0, 156, -280, -280, -280, 157, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + 0, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, -280, -280, 0, -280, -280, -280, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, 0, 0, 0, 0, 0, 0, + 0, 76, 158, 159, 160, 205, 206, -280, 201, 0, + 0, 0, 0, 126, 127, 128, 0, 0, 202, 131, + 132, 133, 134, 135, 136, 203, -472, -472, 0, 0, + 0, 204, -472, 0, 0, 0, 139, 140, 141, 142, + 143, 144, 0, 0, 0, 0, 0, 0, 0, -280, + -280, 125, 0, 145, 146, 147, 126, 127, 128, 0, + 129, 130, 131, 132, 133, 134, 135, 136, 137, -524, + 0, 0, 0, 0, 138, 0, 0, 148, 0, 139, + 140, 141, 142, 143, 144, 0, 0, 0, 0, 0, + 0, 0, -280, -280, 0, 0, 145, 146, 147, -472, + 150, 151, 152, 153, 154, 155, 0, 0, 0, 0, + 0, 0, 0, 0, 156, 0, 0, 0, 157, 0, + 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 149, 150, 151, 152, 153, 154, 155, 0, + 0, 0, 0, 0, 0, 0, 0, 156, 0, 0, + 0, 157, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 76, 158, 159, 160, 205, 206, 0, 0, 125, 0, + 0, 0, 0, 126, 127, 128, 0, 129, 130, 131, + 132, 133, 134, 135, 136, 137, -524, 0, 0, 0, + 0, 138, 0, 0, 0, 0, 139, 140, 141, 142, + 143, 144, 0, 76, 158, 159, 160, 161, 80, -280, + -280, 201, 0, 145, 146, 147, 126, 127, 128, 0, + 0, 202, 131, 132, 133, 134, 135, 136, 203, -524, + -528, 0, 0, 0, 204, 0, 0, 148, 0, 139, + 140, 141, 142, 143, 144, 0, 0, 0, 0, 0, + 0, 0, -280, -280, 0, 0, 145, 146, 147, -499, + 150, 151, 152, 153, 154, 155, 0, 0, 0, 0, + 0, 0, 0, 0, 156, 0, 0, 0, 157, 0, + 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -468, 150, 151, 152, 153, 154, 155, 0, + 0, 0, 0, 0, 0, 0, 0, 156, 0, 0, + 0, 157, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 76, 158, 159, 160, 161, 80, 0, 0, 125, 0, + 0, 0, 0, 126, 127, 128, 0, 129, 130, 131, + 132, 133, 134, 135, 136, 137, -524, 658, 0, 0, + 0, 138, 0, 0, 0, 0, 139, 140, 141, 142, + 143, 144, 0, 76, 158, 159, 160, 205, 206, -280, + -280, 201, 0, 145, 146, 147, 126, 127, 128, 0, + 0, 202, 131, 132, 133, 134, 135, 136, 203, -524, + -528, 0, 0, 0, 204, 0, 0, 148, 0, 139, + 140, 141, 142, 143, 144, 0, 0, 0, 0, 0, + 0, 0, -280, -280, 0, 0, 145, 146, 147, 0, + 150, 151, 152, 153, 154, 155, 0, 0, 0, 0, + 0, 0, 0, 0, 156, 0, 0, 0, 157, 0, + 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 150, 151, 152, 153, 154, 155, 0, + 0, 0, 0, 0, 0, 0, 0, 156, 0, 0, + 0, 157, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 328, -262, 0, + 0, 0, 139, 140, 141, 142, 143, 144, 0, 0, + 76, 158, 159, 160, 161, 80, 0, 0, 125, 145, + 146, 147, 0, 126, 127, 128, 0, 129, 130, 131, + 132, 133, 134, 135, 136, 137, -524, 0, 0, 0, + 0, 138, 0, 148, 0, 0, 139, 140, 141, 142, + 143, 144, 0, 76, 158, 159, 160, 205, 206, -280, + -280, 0, 0, 145, 146, 147, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 157, 0, 0, 148, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 150, 151, 152, 153, 154, 155, 0, 0, 0, 0, + 0, 0, 0, 0, 156, 126, 127, 128, 157, 129, + 130, 131, 132, 133, 134, 135, 136, 203, -524, 580, + 0, 0, 0, 368, 0, 0, 0, 0, 139, 140, + 141, 142, 143, 144, 0, 0, 76, 329, 330, 160, + 0, -280, -280, 0, 3, 145, 146, 147, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, + 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 76, 158, 159, 160, 161, 80, 0, 0, 0, 0, + 0, 0, 150, 151, 152, 153, 154, 155, 0, 0, + 0, 0, 0, 0, 0, 0, 581, 11, 12, 13, + 157, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 0, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 0, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 369, 0, 0, 370, 0, + 0, 371, 76, 158, 566, 160, 161, 80, 81, 126, + 127, 128, 0, 129, 130, 131, 132, 133, 134, 135, + 136, 203, -524, 659, 0, 0, 0, 368, 0, 0, + 0, 0, 139, 140, 141, 142, 143, 144, 0, 0, + 0, 0, 0, 0, 0, -280, -280, 0, 3, 145, + 146, 147, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 148, 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 150, 151, 152, 153, + 154, 155, 0, 0, 0, 0, 0, 0, 0, 0, + 156, 11, 12, 13, 157, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 0, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 0, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 369, + 0, 0, 370, 0, 0, 371, 76, 158, 566, 160, + 161, 80, 81, 126, 127, 128, 0, 129, 130, 131, + 132, 133, 134, 135, 136, 203, -524, 670, 0, 0, + 0, 368, 0, 0, 0, 0, 139, 140, 141, 142, + 143, 144, 0, 0, 0, 0, 0, 0, 0, -280, + -280, 0, 3, 145, 146, 147, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 148, 4, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 150, 151, 152, 153, 154, 155, 0, 0, 0, 0, + 0, 0, 0, 0, 671, 11, 12, 13, 157, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 0, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 369, 0, 0, 370, 0, 0, 371, + 76, 158, 566, 160, 161, 80, 81, 126, 127, 128, + 0, 129, 130, 131, 132, 133, 134, 135, 136, 203, + -524, 673, 0, 0, 0, 368, 0, 0, 0, 0, + 139, 140, 141, 142, 143, 144, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 145, 146, 147, + 126, 127, 128, 0, 129, 130, 131, 132, 133, 134, + 135, 136, 203, -524, 726, 0, 0, 0, 368, 0, + 0, 148, 0, 139, 140, 141, 142, 143, 144, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 145, 146, 147, 0, 150, 151, 152, 153, 154, 155, + 0, 0, 0, 0, 0, 0, 0, 0, 674, 0, + 328, 0, 157, 0, 148, 139, 140, 141, 142, 143, + 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 145, 146, 147, 0, 0, 150, 151, 152, + 153, 154, 155, 0, 0, 0, 0, 0, 0, 0, + 0, 156, 0, 0, 0, 157, 148, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 369, 0, 0, + 370, 0, 0, 371, 76, 158, 159, 160, 161, 80, + 0, 0, 0, 0, 0, 0, 0, 157, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 369, 0, 0, 370, 0, 0, 371, 76, 158, 159, + 160, 161, 80, 126, 127, 128, 0, 129, 130, 131, + 132, 133, 134, 135, 136, 203, -524, 779, 0, 0, + 0, 368, 0, 0, 0, 0, 139, 140, 141, 142, + 143, 144, 0, 0, 0, 0, 0, 0, 0, 76, + 329, 330, 160, 145, 146, 147, 126, 127, 128, 0, + 129, 130, 131, 132, 133, 134, 135, 136, 203, -524, + 780, 0, 0, 0, 368, 0, 0, 148, 0, 139, + 140, 141, 142, 143, 144, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 145, 146, 147, 0, + 150, 151, 152, 153, 154, 155, 0, 0, 0, 0, + 0, 0, 0, 0, 156, 0, 357, 0, 157, 0, + 148, 139, 140, 141, 142, 143, 144, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 145, 146, + 147, 0, 0, 150, 151, 152, 153, 154, 155, 0, + 0, 0, 0, 0, 0, 0, 0, 781, 0, 0, + 0, 157, 148, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 369, 0, 0, 370, 0, 0, 371, + 76, 158, 159, 160, 161, 80, 0, 0, 0, 0, + 0, 0, 0, 157, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 369, 0, 0, 370, + 0, 0, 371, 76, 158, 159, 160, 161, 80, 126, + 127, 128, 0, 129, 130, 131, 132, 133, 134, 135, + 136, 203, -524, 782, 0, 0, 0, 368, 0, 0, + 0, 0, 139, 140, 141, 142, 143, 144, 0, 0, + 0, 0, 0, 0, 0, 76, 329, 330, 160, 145, + 146, 147, 126, 127, 128, 0, 129, 130, 131, 132, + 133, 134, 135, 136, 203, -524, 901, 0, 0, 0, + 368, 0, 0, 148, 0, 139, 140, 141, 142, 143, + 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 145, 146, 147, 0, 150, 151, 152, 153, + 154, 155, 0, 0, 0, 0, 0, 0, 0, 0, + 156, 0, 654, 0, 157, 0, 148, 139, 140, 141, + 142, 143, 144, 656, 0, 0, 0, 0, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 0, 0, 150, + 151, 152, 153, 154, 155, 145, 146, 147, 0, 0, + 0, 0, 0, 156, 0, 0, 0, 157, 148, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 369, + 0, 0, 370, 0, 0, 371, 76, 158, 159, 160, + 161, 80, 0, 0, 0, 0, 0, 0, 0, 157, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 369, 0, 0, 370, 0, 0, 371, 76, + 158, 159, 160, 161, 80, 126, 127, 128, 0, 129, + 130, 131, 132, 133, 134, 135, 136, 203, -524, 0, + 0, 0, 0, 368, 0, 0, 0, 0, 139, 140, + 141, 142, 143, 144, 0, 0, 0, 0, 0, 0, + 0, 76, 329, 330, 160, 145, 146, 147, 0, 0, + 0, 0, 76, 329, 330, 160, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 150, 151, 152, 153, 154, 155, 293, 0, + 0, 0, 0, 0, 0, 0, 156, 0, 0, 0, + 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 729, 0, 0, 0, 0, 730, 731, 732, 733, + 734, 735, 0, 0, 0, 0, 0, -389, -389, -389, + 0, 4, 0, 145, 736, 737, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 369, 0, 738, 370, 0, + 0, 371, 76, 158, 159, 160, 161, 80, 11, 12, + 13, 0, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 0, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 157, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 293, 0, 0, 0, + 0, 0, 0, 0, 0, 120, 0, 0, 0, 81, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, + 76, 739, 740, 741, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -658, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 11, 12, 13, 0, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 0, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 0, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, -146, 0, 0, 0, 0, -146, + 0, 0, 0, 120, 0, 0, 0, 81, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 11, 12, 13, 0, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 0, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 0, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 288, 0, 0, 0, 0, 0, 0, 0, 0, + 120, 0, 0, 0, 81, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -527, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 11, 12, 13, 0, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 0, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 120, 11, 12, + 13, 81, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 0, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 0, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, -665, 0, 0, 0, + 0, 0, 0, 0, 0, 120, 0, 0, 0, 81, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -667, -667, -667, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -667, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -667, -667, -667, 0, -667, -667, -667, -667, + -667, -667, -667, -667, -667, -667, 0, -667, -667, -667, + -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, + -667, -667, 0, -667, -667, -667, -667, -667, -667, -667, + -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, + -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, + -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, + -280, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, -667, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 11, 12, 13, 0, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 0, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 0, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, -206, -206, 0, 0, 0, 0, 0, 76, + 77, 78, 0, 79, 80, 81, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, + 13, 0, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 0, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 0, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 120, 0, 0, 0, 81, + 0, 0, 0, 0, 0, 0, 0, 0, -389, -389, + -389, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, + 12, 13, 0, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 0, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 0, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, + 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 11, 12, 13, 0, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 0, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, -389, -389, + -389, 0, 0, 0, 0, 0, 0, 120, 0, 0, + 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, + 12, 13, 0, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 0, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 0, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 8, 9, 10, + 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, + 81, 0, 0, 0, 0, 0, 11, 12, 13, 0, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 0, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 0, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 120, 11, 12, 13, 81, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 0, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 0, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 120, 0, 0, 0, 81 +}; + +static const short yycheck[] = { 0, + 106, 89, 3, 469, 501, 366, 409, 410, 320, 2, + 11, 12, 0, 368, 0, 626, 664, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 407, 408, 630, 418, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 415, 416, 419, 27, 417, 303, + 8, 719, 5, 664, 75, 452, 560, 19, 24, 0, + 797, 82, 3, 800, 5, 664, 558, 479, 34, 789, + 451, 8, 25, 803, 82, 322, 82, 24, 18, 100, + 455, 126, 777, 915, 24, 106, 0, 41, 24, 86, + 87, 27, 809, 5, 34, 116, 117, 118, 34, 21, + 113, 122, 56, 28, 24, 27, 711, 215, 719, 122, + 41, 18, 684, 25, 34, 9, 10, 138, 499, 44, + 719, 34, 86, 87, 145, 56, 1090, 1091, 569, 139, + 140, 141, 142, 143, 144, 1040, 1041, 18, 1090, 1119, + 1120, 82, 26, 584, 204, 411, 412, 413, 414, 209, + 34, 211, 116, 117, 24, 96, 97, 8, 99, 24, + 664, 993, 28, 223, 34, 902, 130, 0, 82, 34, + 3, 1089, 664, 5, 7, 8, 9, 10, 44, 1097, + 138, 122, 899, 204, 1148, 702, 183, 184, 908, 919, + 910, 21, 24, 25, 26, 108, 109, 1177, 8, 894, + 612, 138, 34, 1155, 6, 7, 186, 1159, 1113, 9, + 10, 1116, 587, 85, 611, 719, 788, 183, 184, 791, + 24, 183, 184, 185, 182, 187, 188, 719, 24, 610, + 183, 184, 185, 480, 187, 188, 194, 24, 196, 5, + 21, 664, 1194, 183, 184, 182, 27, 183, 184, 82, + 186, 632, 506, 190, 21, 1139, 24, 194, 25, 196, + 180, 181, 29, 183, 184, 286, 186, 225, 1005, 1174, + 291, 24, 664, 106, 906, 607, 1160, 909, 1162, 21, + 664, 302, 303, 25, 305, 306, 292, 138, 225, 122, + 26, 664, 28, 664, 302, 664, 719, 814, 319, 24, + 133, 26, 933, 18, 325, 138, 909, 328, 44, 34, + 204, 319, 980, 183, 184, 209, 18, 211, 183, 184, + 428, 366, 18, 156, 929, 21, 347, 719, 138, 223, + 224, 182, 5, 21, 347, 719, 21, 25, 592, 190, + 25, 18, 5, 194, 21, 196, 719, 368, 719, 182, + 719, 183, 184, 185, 39, 187, 188, 190, 24, 192, + 26, 194, 25, 196, 192, 86, 87, 22, 1000, 980, + 1002, 204, 182, 877, 225, 26, 209, 28, 211, 34, + 190, 980, 636, 875, 194, 21, 196, 447, 16, 25, + 223, 224, 225, 44, 404, 405, 406, 1000, 664, 1002, + 654, 24, 656, 18, 204, 346, 451, 15, 23, 209, + 21, 211, 21, 794, 25, 225, 25, 183, 184, 185, + 16, 187, 188, 223, 224, 0, 21, 21, 3, 16, + 25, 25, 7, 454, 32, 33, 457, 443, 49, 50, + 16, 864, 865, 464, 34, 466, 454, 468, 469, 457, + 471, 22, 21, 719, 499, 476, 25, 22, 479, 53, + 54, 18, 183, 184, 21, 486, 479, 21, 25, 302, + 428, 25, 305, 306, 307, 729, 980, 498, 862, 863, + 501, 873, 503, 37, 38, 506, 319, 22, 980, 21, + 34, 428, 325, 25, 504, 85, 29, 51, 52, 870, + 871, 874, 18, 872, 21, 21, 40, 82, 25, 25, + 183, 184, 185, 18, 187, 188, 21, 49, 50, 460, + 183, 184, 185, 21, 187, 188, 39, 25, 183, 184, + 185, 106, 187, 188, 32, 33, 369, 370, 371, 92, + 5, 374, 24, 24, 26, 26, 374, 122, 26, 382, + 28, 384, 34, 447, 382, 55, 384, 980, 133, 24, + 25, 26, 1079, 569, 939, 610, 44, 18, 589, 34, + 21, 592, 23, 92, 1060, 21, 702, 428, 584, 25, + 18, 22, 21, 21, 605, 606, 25, 632, 980, 921, + 24, 612, 26, 183, 184, 428, 980, 187, 188, 612, + 866, 867, 868, 869, 21, 49, 50, 980, 25, 980, + 631, 980, 21, 19, 447, 636, 25, 24, 428, 26, + 453, 454, 21, 24, 457, 453, 25, 34, 649, 650, + 24, 568, 26, 654, 467, 656, 469, 22, 471, 183, + 184, 185, 25, 187, 188, 28, 479, 447, 22, 482, + 49, 50, 21, 486, 19, 987, 25, 678, 25, 26, + 21, 97, 21, 99, 25, 686, 25, 688, 37, 38, + 92, 692, 693, 21, 1006, 20, 697, 25, 619, 1011, + 701, 702, 51, 52, 32, 33, 707, 520, 814, 702, + 49, 50, 520, 27, 707, 21, 529, 530, 1030, 25, + 92, 183, 184, 185, 1036, 187, 188, 189, 729, 25, + 26, 24, 28, 1045, 980, 25, 26, 568, 28, 18, + 730, 731, 732, 733, 734, 735, 23, 302, 44, 21, + 305, 306, 307, 25, 44, 568, 569, 42, 43, 37, + 38, 569, 1074, 1075, 319, 1077, 18, 1128, 581, 794, + 325, 584, 585, 51, 52, 18, 584, 585, 568, 18, + 26, 18, 24, 784, 21, 24, 1020, 18, 34, 22, + 29, 30, 31, 32, 33, 34, 183, 184, 185, 612, + 187, 188, 21, 828, 53, 54, 25, 46, 47, 48, + 25, 1123, 813, 814, 18, 816, 25, 26, 21, 28, + 24, 814, 25, 1184, 25, 29, 30, 31, 32, 33, + 34, 70, 67, 68, 69, 44, 183, 184, 185, 24, + 187, 188, 46, 47, 48, 18, 24, 660, 661, 27, + 21, 664, 660, 661, 25, 18, 34, 18, 671, 672, + 21, 674, 20, 21, 672, 786, 70, 1179, 789, 859, + 860, 861, 111, 21, 687, 183, 689, 25, 21, 183, + 184, 185, 25, 187, 188, 698, 37, 38, 701, 702, + 703, 34, 35, 36, 21, 703, 18, 985, 25, 454, + 51, 52, 457, 18, 905, 21, 719, 111, 18, 25, + 19, 912, 467, 21, 469, 21, 471, 25, 9, 25, + 23, 1009, 21, 11, 479, 25, 25, 482, 24, 21, + 26, 486, 28, 25, 21, 22, 21, 183, 184, 185, + 25, 187, 188, 24, 183, 184, 185, 186, 44, 32, + 33, 47, 48, 943, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 11, 21, 21, 21, 781, 25, + 25, 25, 24, 1079, 529, 530, 8, 9, 10, 183, + 184, 185, 186, 88, 119, 906, 121, 908, 909, 910, + 21, 21, 21, 994, 25, 25, 997, 132, 133, 88, + 135, 814, 137, 138, 18, 183, 184, 21, 186, 997, + 19, 824, 1013, 21, 1015, 150, 19, 25, 18, 1020, + 1013, 21, 1023, 1024, 19, 1013, 34, 35, 36, 49, + 50, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 21, 21, 21, 1030, 25, 25, 25, 8, 9, + 10, 27, 21, 19, 21, 23, 25, 612, 25, 1060, + 24, 1062, 1063, 21, 98, 21, 100, 25, 102, 18, + 104, 25, 21, 20, 21, 109, 53, 54, 1079, 1000, + 22, 1002, 34, 35, 36, 119, 18, 121, 1074, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 21, + 24, 24, 26, 1128, 28, 21, 138, 78, 79, 80, + 81, 82, 83, 84, 34, 35, 36, 20, 21, 1144, + 44, 21, 22, 47, 48, 1126, 183, 184, 1129, 163, + 22, 1132, 687, 186, 689, 948, 949, 72, 73, 74, + 25, 1129, 186, 698, 32, 33, 701, 702, 186, 11, + 182, 72, 73, 74, 51, 52, 53, 24, 190, 1184, + 24, 24, 194, 20, 196, 25, 27, 980, 23, 19, + 23, 20, 204, 205, 987, 19, 21, 209, 138, 211, + 5, 27, 25, 24, 997, 22, 88, 88, 24, 88, + 25, 223, 224, 225, 20, 18, 20, 27, 1011, 18, + 1013, 29, 24, 1016, 25, 25, 21, 39, 25, 27, + 88, 25, 1213, 25, 25, 55, 1029, 25, 24, 18, + 25, 25, 182, 1224, 40, 25, 1039, 1040, 1041, 25, + 190, 21, 18, 177, 194, 1048, 196, 18, 8, 9, + 10, 21, 178, 177, 204, 18, 88, 1060, 188, 209, + 178, 211, 21, 25, 88, 20, 22, 291, 20, 814, + 24, 295, 25, 223, 224, 225, 1079, 18, 20, 824, + 20, 27, 73, 18, 27, 88, 1089, 1090, 1091, 313, + 27, 88, 316, 25, 1097, 88, 88, 360, 25, 0, + 324, 88, 0, 327, 88, 88, 88, 82, 325, 778, + 1113, 1114, 1115, 1116, 900, 1105, 1119, 1120, 1010, 1038, + 894, 926, 1125, 1011, 1174, 388, 1129, 843, 1125, 471, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 592, 1129, 689, 687, 1148, 113, 814, 10, 8, + 701, 347, 1155, 224, 1157, 1158, 1159, 1084, 520, 428, + 719, 424, 980, -1, -1, 387, -1, -1, -1, 126, + -1, 1174, 1175, 1176, 1177, -1, -1, -1, 138, 8, + 9, 10, 139, 140, 141, 142, 143, 144, -1, 146, + 147, 1194, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 948, 949, -1, 428, 72, 73, 74, + -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, + -1, -1, 182, -1, -1, 447, -1, -1, 452, -1, + 190, -1, -1, -1, 194, 459, 196, -1, -1, -1, + 464, -1, 466, -1, 204, -1, -1, -1, -1, 209, + 474, 211, 997, -1, 478, -1, -1, -1, -1, -1, + -1, -1, -1, 223, 224, 225, -1, -1, 1013, -1, + -1, 1016, -1, -1, -1, -1, -1, 136, 428, 138, + -1, -1, -1, -1, 24, 25, -1, -1, -1, 29, + 30, 31, 32, 33, 34, -1, -1, 447, -1, -1, + -1, -1, -1, -1, -1, -1, 46, 47, 48, 138, + 72, 73, 74, -1, -1, 1060, 78, 79, 80, 81, + 82, 83, 84, 182, -1, -1, -1, -1, -1, -1, + 70, 190, -1, -1, 1079, 194, -1, 196, -1, -1, + -1, -1, -1, -1, -1, 204, 568, -1, -1, -1, + -1, -1, -1, 182, -1, -1, -1, -1, -1, -1, + -1, 190, 586, -1, -1, 194, 225, 196, -1, 1114, + 1115, 111, -1, -1, -1, 204, -1, -1, -1, -1, + 209, -1, 211, 646, 1129, -1, -1, 611, -1, -1, + -1, -1, -1, -1, 223, 224, 225, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 630, -1, -1, 366, + -1, 635, 1157, 1158, -1, -1, -1, -1, 568, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 691, -1, + 1175, 1176, -1, 8, 9, 10, -1, -1, -1, -1, + -1, -1, 666, 183, 184, 185, 186, 404, 405, 406, + 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, -1, -1, -1, 24, 25, 428, 328, + -1, 29, 30, 31, 32, 33, 34, 336, 337, 338, + 339, -1, -1, -1, -1, -1, -1, 447, 46, 47, + 48, -1, -1, -1, 451, -1, -1, -1, 357, -1, + -1, -1, -1, 8, 9, 10, -1, -1, -1, 368, + -1, -1, 70, -1, -1, -1, -1, -1, 742, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 389, -1, -1, -1, 797, -1, -1, 800, -1, -1, + -1, -1, 499, -1, -1, -1, 19, 504, 8, 9, + 10, 24, -1, 111, -1, -1, 29, 30, 31, 32, + 33, 34, -1, 138, -1, -1, -1, -1, -1, 428, + -1, -1, -1, 46, 47, 48, 435, -1, 802, 842, + 843, -1, -1, -1, -1, 848, 849, 850, 851, 852, + 853, 854, 855, 856, 857, 858, -1, 70, -1, 428, + -1, 558, -1, 560, -1, 562, 563, 182, 568, -1, + -1, -1, -1, -1, -1, 190, -1, -1, 447, 194, + -1, 196, -1, -1, -1, 183, 184, 185, 186, 204, + -1, -1, -1, 138, 209, -1, 211, -1, 111, 902, + -1, -1, -1, -1, -1, -1, -1, -1, 223, 224, + 225, -1, -1, 610, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 897, 898, 632, -1, 182, 138, -1, + -1, 905, -1, -1, -1, 190, -1, -1, -1, 194, + -1, 196, -1, -1, -1, -1, -1, -1, -1, 204, + 559, -1, -1, -1, 209, 929, 211, 664, -1, 568, + 183, 184, 185, 186, -1, -1, -1, -1, 223, 224, + 225, -1, 182, -1, -1, -1, -1, -1, -1, -1, + 190, -1, -1, -1, 194, -1, 196, -1, -1, 568, + -1, -1, 1005, -1, 204, -1, -1, -1, -1, 209, + -1, 211, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 719, 223, 224, 225, -1, 626, -1, -1, + -1, 995, -1, 730, 731, 732, 733, 734, 735, 736, + 737, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 654, -1, 656, -1, -1, + -1, -1, -1, 662, -1, -1, 665, 19, 20, -1, + -1, -1, 24, -1, -1, -1, -1, 29, 30, 31, + 32, 33, 34, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 46, 47, 48, 794, -1, -1, + 1064, 24, -1, -1, 27, -1, 29, 30, 31, 32, + 33, 34, -1, 428, -1, -1, -1, -1, 70, 718, + -1, -1, -1, 46, 47, 48, -1, -1, 19, -1, + 729, 828, 447, 24, -1, -1, -1, -1, 29, 30, + 31, 32, 33, 34, -1, -1, -1, 70, -1, -1, + -1, -1, -1, -1, -1, 46, 47, 48, -1, 111, + -1, -1, 859, 860, 861, 862, 863, 864, 865, 866, + 867, 868, 869, 870, 871, 872, 873, 874, 875, 70, + 877, -1, -1, 428, -1, 6, 7, 8, 111, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + -1, -1, 447, 24, -1, -1, -1, -1, 29, 30, + 31, 32, 33, 34, -1, -1, -1, -1, 1182, -1, + 111, -1, -1, -1, -1, 46, 47, 48, 428, -1, + -1, 183, 184, 185, 186, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 844, 943, 447, -1, 70, + -1, -1, -1, 568, -1, -1, -1, -1, -1, -1, + 183, 184, 185, 186, -1, -1, -1, -1, -1, -1, + -1, -1, 93, 94, 95, 96, 97, 98, -1, -1, + -1, -1, -1, 980, -1, -1, 107, -1, -1, -1, + 111, -1, 183, 184, 185, 186, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 568, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 24, 933, -1, -1, -1, -1, -1, + -1, -1, -1, 34, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 45, 176, -1, -1, 179, -1, + -1, 182, 183, 184, 185, 186, 187, 188, 568, -1, + -1, -1, -1, -1, -1, -1, 67, 68, 69, 978, + 71, -1, -1, -1, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 89, 90, + 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 108, 109, 110, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 1128, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 1144, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 0, 1, 1184, -1, -1, + -1, -1, 183, 184, 185, -1, 187, 188, 189, -1, + -1, -1, -1, -1, -1, 24, -1, -1, 27, 24, + 29, 30, 31, 32, 33, 34, -1, -1, -1, 34, + -1, -1, -1, -1, -1, -1, -1, 46, 47, 48, + 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 70, 67, 68, 69, -1, 71, -1, -1, -1, + 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 89, 90, 91, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 111, 108, 109, 110, -1, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, -1, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, -1, -1, -1, 183, 184, 185, 186, 183, 184, + 185, 1, 187, 188, 189, -1, 6, 7, 8, -1, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, -1, -1, -1, 24, -1, -1, -1, -1, 29, + 30, 31, 32, 33, 34, -1, -1, -1, -1, -1, + -1, -1, 42, 43, -1, 45, 46, 47, 48, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, + 70, 71, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 93, 94, 95, 96, 97, 98, -1, + -1, -1, -1, -1, -1, -1, -1, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, -1, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, -1, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, -1, -1, -1, -1, + -1, -1, -1, 183, 184, 185, 186, 187, 188, 189, + 1, -1, -1, -1, -1, 6, 7, 8, -1, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, -1, + -1, -1, -1, 24, -1, -1, -1, -1, 29, 30, + 31, 32, 33, 34, -1, -1, -1, -1, -1, -1, + -1, 42, 43, -1, -1, 46, 47, 48, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 67, 68, 69, 70, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 93, 94, 95, 96, 97, 98, -1, -1, + -1, -1, -1, -1, -1, -1, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, -1, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, -1, -1, -1, -1, -1, + -1, -1, 183, 184, 185, 186, 187, 188, 189, 1, + -1, -1, -1, -1, 6, 7, 8, -1, -1, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, -1, + -1, -1, 24, -1, -1, -1, -1, 29, 30, 31, + 32, 33, 34, -1, -1, -1, -1, -1, -1, -1, + 42, 43, -1, -1, 46, 47, 48, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 67, 68, 69, 70, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 93, 94, 95, 96, 97, 98, -1, -1, -1, + -1, -1, -1, -1, -1, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + -1, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, -1, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, -1, -1, -1, -1, -1, -1, + -1, 183, 184, 185, 186, 187, 188, 189, 1, -1, + -1, -1, -1, 6, 7, 8, -1, -1, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, + -1, 24, 25, -1, -1, -1, 29, 30, 31, 32, + 33, 34, -1, -1, -1, -1, -1, -1, -1, 42, + 43, 1, -1, 46, 47, 48, 6, 7, 8, -1, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + -1, -1, -1, -1, 24, -1, -1, 70, -1, 29, + 30, 31, 32, 33, 34, -1, -1, -1, -1, -1, + -1, -1, 42, 43, -1, -1, 46, 47, 48, 92, + 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, + -1, -1, -1, -1, 107, -1, -1, -1, 111, -1, + 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 92, 93, 94, 95, 96, 97, 98, -1, + -1, -1, -1, -1, -1, -1, -1, 107, -1, -1, + -1, 111, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 183, 184, 185, 186, 187, 188, -1, -1, 1, -1, + -1, -1, -1, 6, 7, 8, -1, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, -1, -1, -1, + -1, 24, -1, -1, -1, -1, 29, 30, 31, 32, + 33, 34, -1, 183, 184, 185, 186, 187, 188, 42, + 43, 1, -1, 46, 47, 48, 6, 7, 8, -1, + -1, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, -1, -1, -1, 24, -1, -1, 70, -1, 29, + 30, 31, 32, 33, 34, -1, -1, -1, -1, -1, + -1, -1, 42, 43, -1, -1, 46, 47, 48, 92, + 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, + -1, -1, -1, -1, 107, -1, -1, -1, 111, -1, + 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 92, 93, 94, 95, 96, 97, 98, -1, + -1, -1, -1, -1, -1, -1, -1, 107, -1, -1, + -1, 111, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 183, 184, 185, 186, 187, 188, -1, -1, 1, -1, + -1, -1, -1, 6, 7, 8, -1, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, + -1, 24, -1, -1, -1, -1, 29, 30, 31, 32, + 33, 34, -1, 183, 184, 185, 186, 187, 188, 42, + 43, 1, -1, 46, 47, 48, 6, 7, 8, -1, + -1, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, -1, -1, -1, 24, -1, -1, 70, -1, 29, + 30, 31, 32, 33, 34, -1, -1, -1, -1, -1, + -1, -1, 42, 43, -1, -1, 46, 47, 48, -1, + 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, + -1, -1, -1, -1, 107, -1, -1, -1, 111, -1, + 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 93, 94, 95, 96, 97, 98, -1, + -1, -1, -1, -1, -1, -1, -1, 107, -1, -1, + -1, 111, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 24, 25, -1, + -1, -1, 29, 30, 31, 32, 33, 34, -1, -1, + 183, 184, 185, 186, 187, 188, -1, -1, 1, 46, + 47, 48, -1, 6, 7, 8, -1, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, -1, -1, -1, + -1, 24, -1, 70, -1, -1, 29, 30, 31, 32, + 33, 34, -1, 183, 184, 185, 186, 187, 188, 42, + 43, -1, -1, 46, 47, 48, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 111, -1, -1, 70, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, + -1, -1, -1, -1, 107, 6, 7, 8, 111, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + -1, -1, -1, 24, -1, -1, -1, -1, 29, 30, + 31, 32, 33, 34, -1, -1, 183, 184, 185, 186, + -1, 42, 43, -1, 45, 46, 47, 48, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, + 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 183, 184, 185, 186, 187, 188, -1, -1, -1, -1, + -1, -1, 93, 94, 95, 96, 97, 98, -1, -1, + -1, -1, -1, -1, -1, -1, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, -1, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, -1, -1, 179, -1, + -1, 182, 183, 184, 185, 186, 187, 188, 189, 6, + 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, -1, -1, -1, 24, -1, -1, + -1, -1, 29, 30, 31, 32, 33, 34, -1, -1, + -1, -1, -1, -1, -1, 42, 43, -1, 45, 46, + 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 70, 71, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 93, 94, 95, 96, + 97, 98, -1, -1, -1, -1, -1, -1, -1, -1, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, -1, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, -1, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + -1, -1, 179, -1, -1, 182, 183, 184, 185, 186, + 187, 188, 189, 6, 7, 8, -1, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, + -1, 24, -1, -1, -1, -1, 29, 30, 31, 32, + 33, 34, -1, -1, -1, -1, -1, -1, -1, 42, + 43, -1, 45, 46, 47, 48, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 70, 71, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, + -1, -1, -1, -1, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, -1, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, -1, -1, 179, -1, -1, 182, + 183, 184, 185, 186, 187, 188, 189, 6, 7, 8, + -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, -1, -1, -1, 24, -1, -1, -1, -1, + 29, 30, 31, 32, 33, 34, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 46, 47, 48, + 6, 7, 8, -1, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, -1, -1, -1, 24, -1, + -1, 70, -1, 29, 30, 31, 32, 33, 34, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 46, 47, 48, -1, 93, 94, 95, 96, 97, 98, + -1, -1, -1, -1, -1, -1, -1, -1, 107, -1, + 24, -1, 111, -1, 70, 29, 30, 31, 32, 33, + 34, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 46, 47, 48, -1, -1, 93, 94, 95, + 96, 97, 98, -1, -1, -1, -1, -1, -1, -1, + -1, 107, -1, -1, -1, 111, 70, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 176, -1, -1, + 179, -1, -1, 182, 183, 184, 185, 186, 187, 188, + -1, -1, -1, -1, -1, -1, -1, 111, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 176, -1, -1, 179, -1, -1, 182, 183, 184, 185, + 186, 187, 188, 6, 7, 8, -1, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, + -1, 24, -1, -1, -1, -1, 29, 30, 31, 32, + 33, 34, -1, -1, -1, -1, -1, -1, -1, 183, + 184, 185, 186, 46, 47, 48, 6, 7, 8, -1, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, -1, -1, -1, 24, -1, -1, 70, -1, 29, + 30, 31, 32, 33, 34, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 46, 47, 48, -1, + 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, + -1, -1, -1, -1, 107, -1, 24, -1, 111, -1, + 70, 29, 30, 31, 32, 33, 34, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 46, 47, + 48, -1, -1, 93, 94, 95, 96, 97, 98, -1, + -1, -1, -1, -1, -1, -1, -1, 107, -1, -1, + -1, 111, 70, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 176, -1, -1, 179, -1, -1, 182, + 183, 184, 185, 186, 187, 188, -1, -1, -1, -1, + -1, -1, -1, 111, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 176, -1, -1, 179, + -1, -1, 182, 183, 184, 185, 186, 187, 188, 6, + 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, -1, -1, -1, 24, -1, -1, + -1, -1, 29, 30, 31, 32, 33, 34, -1, -1, + -1, -1, -1, -1, -1, 183, 184, 185, 186, 46, + 47, 48, 6, 7, 8, -1, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, + 24, -1, -1, 70, -1, 29, 30, 31, 32, 33, + 34, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 46, 47, 48, -1, 93, 94, 95, 96, + 97, 98, -1, -1, -1, -1, -1, -1, -1, -1, + 107, -1, 24, -1, 111, -1, 70, 29, 30, 31, + 32, 33, 34, 24, -1, -1, -1, -1, 29, 30, + 31, 32, 33, 34, 46, 47, 48, -1, -1, 93, + 94, 95, 96, 97, 98, 46, 47, 48, -1, -1, + -1, -1, -1, 107, -1, -1, -1, 111, 70, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 176, + -1, -1, 179, -1, -1, 182, 183, 184, 185, 186, + 187, 188, -1, -1, -1, -1, -1, -1, -1, 111, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 111, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 176, -1, -1, 179, -1, -1, 182, 183, + 184, 185, 186, 187, 188, 6, 7, 8, -1, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, -1, + -1, -1, -1, 24, -1, -1, -1, -1, 29, 30, + 31, 32, 33, 34, -1, -1, -1, -1, -1, -1, + -1, 183, 184, 185, 186, 46, 47, 48, -1, -1, + -1, -1, 183, 184, 185, 186, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 93, 94, 95, 96, 97, 98, 18, -1, + -1, -1, -1, -1, -1, -1, 107, -1, -1, -1, + 111, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 45, -1, -1, -1, -1, + -1, 24, -1, -1, -1, -1, 29, 30, 31, 32, + 33, 34, -1, -1, -1, -1, -1, 67, 68, 69, + -1, 71, -1, 46, 47, 48, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 176, -1, 70, 179, -1, + -1, 182, 183, 184, 185, 186, 187, 188, 108, 109, + 110, -1, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, -1, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 111, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 18, -1, -1, -1, + -1, -1, -1, -1, -1, 185, -1, -1, -1, 189, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 45, -1, -1, -1, -1, -1, -1, + 183, 184, 185, 186, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 88, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 108, 109, 110, -1, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + -1, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, -1, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 19, -1, -1, -1, -1, 24, + -1, -1, -1, 185, -1, -1, -1, 189, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 71, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 108, 109, 110, -1, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, -1, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 19, -1, -1, -1, -1, -1, -1, -1, -1, + 185, -1, -1, -1, 189, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 45, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 71, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 108, 109, 110, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, -1, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + -1, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 185, 108, 109, + 110, 189, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, -1, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, -1, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 22, -1, -1, -1, + -1, -1, -1, -1, -1, 185, -1, -1, -1, 189, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 67, 68, 69, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 85, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 108, 109, 110, -1, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, -1, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, -1, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 34, -1, -1, 189, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 108, 109, 110, -1, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, -1, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 42, 43, -1, -1, -1, -1, -1, 183, + 184, 185, -1, 187, 188, 189, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 108, 109, + 110, -1, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, -1, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, -1, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 45, -1, -1, -1, + -1, -1, -1, -1, -1, 185, -1, -1, -1, 189, + -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, + 69, -1, 71, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 108, + 109, 110, -1, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, -1, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, -1, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 45, -1, -1, + -1, -1, -1, -1, -1, -1, 185, -1, -1, -1, + 189, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 71, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 108, 109, 110, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, -1, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + -1, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 67, 68, + 69, -1, -1, -1, -1, -1, -1, 185, -1, -1, + -1, 189, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 108, + 109, 110, -1, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, -1, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, -1, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 89, 90, 91, + -1, -1, -1, -1, -1, -1, 185, -1, -1, -1, + 189, -1, -1, -1, -1, -1, 108, 109, 110, -1, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + -1, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, -1, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 185, 108, 109, 110, 189, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, -1, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 185, -1, -1, -1, 189 +}; +/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ +#line 3 "/usr/share/misc/bison.simple" + +/* Skeleton output parser for bison, + Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +#ifndef alloca +#ifdef __GNUC__ +#define alloca __builtin_alloca +#else /* not GNU C. */ +#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) +#include +#else /* not sparc */ +#if defined (MSDOS) && !defined (__TURBOC__) +#include +#else /* not MSDOS, or __TURBOC__ */ +#if defined(_AIX) +#include + #pragma alloca +#else /* not MSDOS, __TURBOC__, or _AIX */ +#ifdef __hpux +#ifdef __cplusplus +extern "C" { +void *alloca (unsigned int); +}; +#else /* not __cplusplus */ +void *alloca (); +#endif /* not __cplusplus */ +#endif /* __hpux */ +#endif /* not _AIX */ +#endif /* not MSDOS, or __TURBOC__ */ +#endif /* not sparc. */ +#endif /* not GNU C. */ +#endif /* alloca not defined. */ + +/* This is the parser code that is written into each bison parser + when the %semantic_parser declaration is not specified in the grammar. + It was written by Richard Stallman by simplifying the hairy parser + used when %semantic_parser is specified. */ + +/* Note: there must be only one dollar sign in this file. + It is replaced by the list of actions, each action + as one case of the switch. */ + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY -2 +#define YYEOF 0 +#define YYACCEPT return(0) +#define YYABORT return(1) +#define YYERROR goto yyerrlab1 +/* Like YYERROR except do call yyerror. + This remains here temporarily to ease the + transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ +#define YYFAIL goto yyerrlab +#define YYRECOVERING() (!!yyerrstatus) +#define YYBACKUP(token, value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { yychar = (token), yylval = (value); \ + yychar1 = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { yyerror ("syntax error: cannot back up"); YYERROR; } \ +while (0) + +#define YYTERROR 1 +#define YYERRCODE 256 + +#ifndef YYPURE +#define YYLEX yylex() +#endif + +#ifdef YYPURE +#ifdef YYLSP_NEEDED +#ifdef YYLEX_PARAM +#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +#else +#define YYLEX yylex(&yylval, &yylloc) +#endif +#else /* not YYLSP_NEEDED */ +#ifdef YYLEX_PARAM +#define YYLEX yylex(&yylval, YYLEX_PARAM) +#else +#define YYLEX yylex(&yylval) +#endif +#endif /* not YYLSP_NEEDED */ +#endif + +/* If nonreentrant, generate the variables here */ + +#ifndef YYPURE + +int yychar; /* the lookahead symbol */ +YYSTYPE yylval; /* the semantic value of the */ + /* lookahead symbol */ + +#ifdef YYLSP_NEEDED +YYLTYPE yylloc; /* location data for the lookahead */ + /* symbol */ +#endif + +int yynerrs; /* number of parse errors so far */ +#endif /* not YYPURE */ + +#if YYDEBUG != 0 +int yydebug; /* nonzero means print parse trace */ +/* Since this is uninitialized, it does not stop multiple parsers + from coexisting. */ +#endif + +/* YYINITDEPTH indicates the initial size of the parser's stacks */ + +#ifndef YYINITDEPTH +#define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH is the maximum size the stacks can grow to + (effective only if the built-in stack extension method is used). */ + +#if YYMAXDEPTH == 0 +#undef YYMAXDEPTH +#endif + +#ifndef YYMAXDEPTH +#define YYMAXDEPTH 10000 +#endif + +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +int yyparse (void); +#endif + +#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) +#else /* not GNU C or C++ */ +#ifndef __cplusplus + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__yy_memcpy (to, from, count) + char *to; + char *from; + int count; +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#else /* __cplusplus */ + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__yy_memcpy (char *to, char *from, int count) +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#endif +#endif + +#line 196 "/usr/share/misc/bison.simple" + +/* The user can define YYPARSE_PARAM as the name of an argument to be passed + into yyparse. The argument should have type void *. + It should actually point to an object. + Grammar actions can access the variable by casting it + to the proper pointer type. */ + +#ifdef YYPARSE_PARAM +#ifdef __cplusplus +#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +#define YYPARSE_PARAM_DECL +#else /* not __cplusplus */ +#define YYPARSE_PARAM_ARG YYPARSE_PARAM +#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +#endif /* not __cplusplus */ +#else /* not YYPARSE_PARAM */ +#define YYPARSE_PARAM_ARG +#define YYPARSE_PARAM_DECL +#endif /* not YYPARSE_PARAM */ + +int +yyparse(YYPARSE_PARAM_ARG) + YYPARSE_PARAM_DECL +{ + register int yystate; + register int yyn; + register short *yyssp; + register YYSTYPE *yyvsp; + int yyerrstatus; /* number of tokens to shift before error messages enabled */ + int yychar1 = 0; /* lookahead token as an internal (translated) token number */ + + short yyssa[YYINITDEPTH]; /* the state stack */ + YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ + + short *yyss = yyssa; /* refer to the stacks thru separate pointers */ + YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ + +#ifdef YYLSP_NEEDED + YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + +#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +#else +#define YYPOPSTACK (yyvsp--, yyssp--) +#endif + + int yystacksize = YYINITDEPTH; + +#ifdef YYPURE + int yychar; + YYSTYPE yylval; + int yynerrs; +#ifdef YYLSP_NEEDED + YYLTYPE yylloc; +#endif +#endif + + YYSTYPE yyval; /* the variable used to return */ + /* semantic values from the action */ + /* routines */ + + int yylen; + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Starting parse\n"); +#endif + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss - 1; + yyvsp = yyvs; +#ifdef YYLSP_NEEDED + yylsp = yyls; +#endif + +/* Push a new state, which is found in yystate . */ +/* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. */ +yynewstate: + + *++yyssp = yystate; + + if (yyssp >= yyss + yystacksize - 1) + { + /* Give user a chance to reallocate the stack */ + /* Use copies of these so that the &'s don't force the real ones into memory. */ + YYSTYPE *yyvs1 = yyvs; + short *yyss1 = yyss; +#ifdef YYLSP_NEEDED + YYLTYPE *yyls1 = yyls; +#endif + + /* Get the current used size of the three stacks, in elements. */ + int size = yyssp - yyss + 1; + +#ifdef yyoverflow + /* Each stack pointer address is followed by the size of + the data in use in that stack, in bytes. */ +#ifdef YYLSP_NEEDED + /* This used to be a conditional around just the two extra args, + but that might be undefined if yyoverflow is a macro. */ + yyoverflow("parser stack overflow", + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yyls1, size * sizeof (*yylsp), + &yystacksize); +#else + yyoverflow("parser stack overflow", + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yystacksize); +#endif + + yyss = yyss1; yyvs = yyvs1; +#ifdef YYLSP_NEEDED + yyls = yyls1; +#endif +#else /* no yyoverflow */ + /* Extend the stack our own way. */ + if (yystacksize >= YYMAXDEPTH) + { + yyerror("parser stack overflow"); + return 2; + } + yystacksize *= 2; + if (yystacksize > YYMAXDEPTH) + yystacksize = YYMAXDEPTH; + yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); + __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); + yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); + __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); +#ifdef YYLSP_NEEDED + yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); + __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); +#endif +#endif /* no yyoverflow */ + + yyssp = yyss + size - 1; + yyvsp = yyvs + size - 1; +#ifdef YYLSP_NEEDED + yylsp = yyls + size - 1; +#endif + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Stack size increased to %d\n", yystacksize); +#endif + + if (yyssp >= yyss + yystacksize - 1) + YYABORT; + } + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Entering state %d\n", yystate); +#endif + + goto yybackup; + yybackup: + +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to lookahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYFLAG) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* yychar is either YYEMPTY or YYEOF + or a valid token in external form. */ + + if (yychar == YYEMPTY) + { +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Reading a token: "); +#endif + yychar = YYLEX; + } + + /* Convert token to internal form (in yychar1) for indexing tables with */ + + if (yychar <= 0) /* This means end of input. */ + { + yychar1 = 0; + yychar = YYEOF; /* Don't call YYLEX any more */ + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Now at end of input.\n"); +#endif + } + else + { + yychar1 = YYTRANSLATE(yychar); + +#if YYDEBUG != 0 + if (yydebug) + { + fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); + /* Give the individual parser a way to print the precise meaning + of a token, for further debugging info. */ +#ifdef YYPRINT + YYPRINT (stderr, yychar, yylval); +#endif + fprintf (stderr, ")\n"); + } +#endif + } + + yyn += yychar1; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) + goto yydefault; + + yyn = yytable[yyn]; + + /* yyn is what to do for this token type in this state. + Negative => reduce, -yyn is rule number. + Positive => shift, yyn is new state. + New state is final state => don't bother to shift, + just return success. + 0, or most negative number => error. */ + + if (yyn < 0) + { + if (yyn == YYFLAG) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + else if (yyn == 0) + goto yyerrlab; + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the lookahead token. */ + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); +#endif + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif + + /* count tokens shifted since error; after three, turn off error status. */ + if (yyerrstatus) yyerrstatus--; + + yystate = yyn; + goto yynewstate; + +/* Do the default action for the current state. */ +yydefault: + + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + +/* Do a reduction. yyn is the number of a rule to reduce with. */ +yyreduce: + yylen = yyr2[yyn]; + if (yylen > 0) + yyval = yyvsp[1-yylen]; /* implement default value of the action */ + +#if YYDEBUG != 0 + if (yydebug) + { + int i; + + fprintf (stderr, "Reducing via rule %d (line %d), ", + yyn, yyrline[yyn]); + + /* Print the symbols being reduced, and their result. */ + for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) + fprintf (stderr, "%s ", yytname[yyrhs[i]]); + fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); + } +#endif + + + switch (yyn) { + +case 5: +#line 277 "cgrammar.y" +{ uentry_clearDecl (); ; + break;} +case 6: +#line 278 "cgrammar.y" +{ uentry_clearDecl (); ; + break;} +case 7: +#line 279 "cgrammar.y" +{ uentry_clearDecl (); ; + break;} +case 8: +#line 280 "cgrammar.y" +{ uentry_clearDecl (); ; + break;} +case 9: +#line 281 "cgrammar.y" +{ uentry_clearDecl (); ; + break;} +case 10: +#line 282 "cgrammar.y" +{ uentry_checkDecl (); exprNode_free (yyvsp[0].expr); ; + break;} +case 11: +#line 283 "cgrammar.y" +{ uentry_clearDecl (); ; + break;} +case 12: +#line 287 "cgrammar.y" +{ checkConstant (yyvsp[-6].qtyp, yyvsp[-4].ntyp); ; + break;} +case 13: +#line 289 "cgrammar.y" +{ checkValueConstant (yyvsp[-9].qtyp, yyvsp[-7].ntyp, yyvsp[-3].expr) ; ; + break;} +case 14: +#line 292 "cgrammar.y" +{ context_enterFunctionDecl (); ; + break;} +case 15: +#line 293 "cgrammar.y" +{ declareStaticFunction (yyvsp[-2].ntyp); context_quietExitFunction (); + context_exitFunctionDecl (); ; + break;} +case 16: +#line 298 "cgrammar.y" +{ + qtype qint = qtype_create (ctype_int); + yyval.ntyp = idDecl_fixBase (yyvsp[0].ntyp, qint); + qtype_free (qint); + ; + break;} +case 17: +#line 304 "cgrammar.y" +{ yyval.ntyp = idDecl_fixBase (yyvsp[0].ntyp, yyvsp[-2].qtyp); ; + break;} +case 19: +#line 309 "cgrammar.y" +{ yyval.ntyp = yyvsp[0].ntyp; qtype_adjustPointers (yyvsp[-1].count, idDecl_getTyp (yyval.ntyp)); ; + break;} +case 20: +#line 312 "cgrammar.y" +{ yyval.ntyp = idDecl_create (yyvsp[0].cname, qtype_unknown ()); ; + break;} +case 21: +#line 314 "cgrammar.y" +{ yyval.ntyp = idDecl_expectFunction (yyvsp[-2].ntyp); ; + break;} +case 22: +#line 316 "cgrammar.y" +{ yyval.ntyp = idDecl_replaceCtype (yyvsp[-2].ntyp, ctype_makeArray (idDecl_getCtype (yyvsp[-2].ntyp))); ; + break;} +case 23: +#line 318 "cgrammar.y" +{ + yyval.ntyp = idDecl_replaceCtype (yyvsp[-5].ntyp, ctype_makeFixedArray (idDecl_getCtype (yyvsp[-5].ntyp), exprNode_getLongValue (yyvsp[-2].expr))); + ; + break;} +case 24: +#line 322 "cgrammar.y" +{ setCurrentParams (uentryList_missingParams); + ; + break;} +case 25: +#line 325 "cgrammar.y" +{ /* need to support globals and modifies here! */ + ctype ct = ctype_makeFunction (idDecl_getCtype (yyvsp[-6].ntyp), + uentryList_makeMissingParams ()); + + yyval.ntyp = idDecl_replaceCtype (yyvsp[-6].ntyp, ct); + context_popLoc (); + ; + break;} +case 26: +#line 333 "cgrammar.y" +{ setCurrentParams (yyvsp[-1].entrylist); + ; + break;} +case 27: +#line 336 "cgrammar.y" +{ clearCurrentParams (); + yyval.ntyp = idDecl_replaceCtype (yyvsp[-7].ntyp, ctype_makeFunction (idDecl_getCtype (yyvsp[-7].ntyp), yyvsp[-4].entrylist)); + context_popLoc (); + + // printf("Done nameDeclBase\n"); + ; + break;} +case 28: +#line 344 "cgrammar.y" +{ yyval.ntyp = idDecl_create (yyvsp[0].cname, qtype_unknown ()); ; + break;} +case 29: +#line 346 "cgrammar.y" +{ yyval.ntyp = idDecl_expectFunction (yyvsp[-2].ntyp); ; + break;} +case 30: +#line 348 "cgrammar.y" +{ yyval.ntyp = idDecl_replaceCtype (yyvsp[-2].ntyp, ctype_makeArray (idDecl_getCtype (yyvsp[-2].ntyp))); ; + break;} +case 31: +#line 350 "cgrammar.y" +{ + int value; + + if (exprNode_hasValue (yyvsp[-2].expr) + && multiVal_isInt (exprNode_getValue (yyvsp[-2].expr))) + { + value = (int) multiVal_forceInt (exprNode_getValue (yyvsp[-2].expr)); + } + else + { + value = 0; + } + + yyval.ntyp = idDecl_replaceCtype (yyvsp[-5].ntyp, ctype_makeFixedArray (idDecl_getCtype (yyvsp[-5].ntyp), value)); + ; + break;} +case 32: +#line 366 "cgrammar.y" +{ setCurrentParams (uentryList_missingParams); + ; + break;} +case 33: +#line 369 "cgrammar.y" +{ /* need to support globals and modifies here! */ + ctype ct = ctype_makeFunction (idDecl_getCtype (yyvsp[-5].ntyp), + uentryList_makeMissingParams ()); + + yyval.ntyp = idDecl_replaceCtype (yyvsp[-5].ntyp, ct); + context_popLoc (); + ; + break;} +case 34: +#line 377 "cgrammar.y" +{ setCurrentParams (yyvsp[-1].entrylist); + ; + break;} +case 35: +#line 380 "cgrammar.y" +{ clearCurrentParams (); + yyval.ntyp = idDecl_replaceCtype (yyvsp[-6].ntyp, ctype_makeFunction (idDecl_getCtype (yyvsp[-6].ntyp), yyvsp[-3].entrylist)); + context_popLoc (); + ; + break;} +case 36: +#line 387 "cgrammar.y" +{ setCurrentParams (yyvsp[-1].entrylist); ; + break;} +case 37: +#line 388 "cgrammar.y" +{ clearCurrentParams (); ; + break;} +case 38: +#line 389 "cgrammar.y" +{ declareCIter (yyvsp[-8].cname, yyvsp[-6].entrylist); ; + break;} +case 39: +#line 392 "cgrammar.y" +{ exprNode_checkMacroBody (yyvsp[-1].expr); ; + break;} +case 40: +#line 393 "cgrammar.y" +{ exprNode_checkIterBody (yyvsp[-1].expr); ; + break;} +case 41: +#line 394 "cgrammar.y" +{ exprNode_checkIterEnd (yyvsp[-1].expr); ; + break;} +case 42: +#line 395 "cgrammar.y" +{ exprChecks_checkEmptyMacroBody (); ; + break;} +case 43: +#line 398 "cgrammar.y" +{ declareFunction (yyvsp[0].ntyp); ; + break;} +case 44: +#line 401 "cgrammar.y" +{ setProcessingGlobMods (); ; + break;} +case 45: +#line 402 "cgrammar.y" +{ clearProcessingGlobMods (); ; + break;} +case 46: +#line 408 "cgrammar.y" +{ setProcessingGlobMods (); ; + break;} +case 47: +#line 409 "cgrammar.y" +{ clearProcessingGlobMods (); ; + break;} +case 49: +#line 417 "cgrammar.y" +{ + DPRINTF ( ("doing optGlobEnsuresConstraintsAux\n") ); +context_setProtectVars (); enterParamsTemp (); + sRef_setGlobalScopeSafe (); + +; + break;} +case 50: +#line 423 "cgrammar.y" +{ + setEnsuresConstraints (yyvsp[-1].conL); + exitParamsTemp (); + sRef_clearGlobalScopeSafe (); + context_releaseVars (); + DPRINTF (("done optGlobBufConstraintsAux\n"));; + break;} +case 52: +#line 433 "cgrammar.y" +{ + DPRINTF ( ("doing optGlobBufConstraintsAux\n") ); +context_setProtectVars (); enterParamsTemp (); + sRef_setGlobalScopeSafe (); + +; + break;} +case 53: +#line 439 "cgrammar.y" +{ + setFunctionConstraints (yyvsp[-1].conL); + exitParamsTemp (); + sRef_clearGlobalScopeSafe (); + context_releaseVars (); + DPRINTF (("done optGlobBufConstraintsAux\n"));; + break;} +case 55: +#line 448 "cgrammar.y" +{ yyval.conL = constraintList_add (yyvsp[0].conL, yyvsp[-1].con); ; + break;} +case 56: +#line 449 "cgrammar.y" +{constraintList c; c = constraintList_new(); c = constraintList_add (c, yyvsp[0].con); yyval.conL = c; + break;} +case 57: +#line 452 "cgrammar.y" +{ + yyval.con = makeConstraintParse3 (yyvsp[-3].conE, yyvsp[-2].tok, yyvsp[-1].conE); + DPRINTF(("Done BufConstraint1\n")); ; + break;} +case 64: +#line 467 "cgrammar.y" +{yyval.conE = constraintExpr_parseMakeUnaryOp (yyvsp[-3].tok, yyvsp[-1].conE); DPRINTF( ("Got BufConstraintExpr UNary Op ") ); ; + break;} +case 65: +#line 468 "cgrammar.y" +{ + DPRINTF( ("Got BufConstraintExpr BINary Op ") ); + yyval.conE = constraintExpr_parseMakeBinaryOp (yyvsp[-3].conE, yyvsp[-2].tok, yyvsp[-1].conE); ; + break;} +case 66: +#line 473 "cgrammar.y" +{ yyval.conE = constraintExpr_makeTermsRef(yyvsp[0].sr);; + break;} +case 67: +#line 474 "cgrammar.y" +{ char *t; int c; + t = cstring_toCharsSafe (exprNode_unparse(yyvsp[0].expr)); + c = atoi( t ); + yyval.conE = constraintExpr_makeIntLiteral (c); +; + break;} +case 68: +#line 482 "cgrammar.y" +{ + yyval.sr = + checkbufferConstraintClausesId (yyvsp[0].entry);; + break;} +case 69: +#line 485 "cgrammar.y" +{ yyval.sr = fixSpecClausesId (yyvsp[0].cname); ; + break;} +case 70: +#line 487 "cgrammar.y" +{ yyval.sr = sRef_makeAnyArrayFetch (yyvsp[-2].sr); ; + break;} +case 71: +#line 488 "cgrammar.y" +{ + char *t; int c; + t = cstring_toCharsSafe (exprNode_unparse(yyvsp[-1].expr)); + c = atoi( t ); + yyval.sr = sRef_makeArrayFetchKnown(yyvsp[-3].sr, c); ; + break;} +case 72: +#line 493 "cgrammar.y" +{ yyval.sr = sRef_constructPointer (yyvsp[0].sr); ; + break;} +case 73: +#line 494 "cgrammar.y" +{ yyval.sr = yyvsp[-1].sr; ; + break;} +case 74: +#line 495 "cgrammar.y" +{ cstring_markOwned (yyvsp[0].cname); + yyval.sr = sRef_buildField (yyvsp[-2].sr, yyvsp[0].cname); ; + break;} +case 75: +#line 497 "cgrammar.y" +{ cstring_markOwned (yyvsp[0].cname); + yyval.sr = sRef_makeArrow (yyvsp[-2].sr, yyvsp[0].cname); ; + break;} +case 79: +#line 523 "cgrammar.y" +{ setProcessingGlobMods (); ; + break;} +case 80: +#line 524 "cgrammar.y" +{ clearProcessingGlobMods (); ; + break;} +case 81: +#line 534 "cgrammar.y" +{ setProcessingGlobMods (); ; + break;} +case 82: +#line 535 "cgrammar.y" +{ clearProcessingGlobMods (); ; + break;} +case 89: +#line 550 "cgrammar.y" +{ ; ; + break;} +case 90: +#line 551 "cgrammar.y" +{ ; ; + break;} +case 91: +#line 554 "cgrammar.y" +{ globListAdd (yyvsp[0].sr, yyvsp[-1].tquallist); ; + break;} +case 92: +#line 557 "cgrammar.y" +{ yyval.sr = uentry_getSref (yyvsp[0].entry); ; + break;} +case 93: +#line 558 "cgrammar.y" +{ yyval.sr = globListUnrecognized (yyvsp[0].cname); ; + break;} +case 94: +#line 561 "cgrammar.y" +{ yyval.typequal = qual_createUndef (); ; + break;} +case 95: +#line 562 "cgrammar.y" +{ yyval.typequal = qual_createKilled (); ; + break;} +case 96: +#line 563 "cgrammar.y" +{ yyval.typequal = qual_createOut (); ; + break;} +case 97: +#line 564 "cgrammar.y" +{ yyval.typequal = qual_createIn (); ; + break;} +case 98: +#line 565 "cgrammar.y" +{ yyval.typequal = qual_createPartial (); ; + break;} +case 99: +#line 568 "cgrammar.y" +{ yyval.tquallist = qualList_undefined; ; + break;} +case 100: +#line 569 "cgrammar.y" +{ yyval.tquallist = qualList_add (yyvsp[0].tquallist, yyvsp[-1].typequal); ; + break;} +case 101: +#line 572 "cgrammar.y" +{ setProcessingGlobalsList (); ; + break;} +case 102: +#line 574 "cgrammar.y" +{ unsetProcessingGlobals (); ; + break;} +case 103: +#line 575 "cgrammar.y" +{ setProcessingGlobalsList (); ; + break;} +case 104: +#line 577 "cgrammar.y" +{ unsetProcessingGlobals (); ; + break;} +case 105: +#line 579 "cgrammar.y" +{ setFunctionNoGlobals (); + setFunctionModifies (sRefSet_single (sRef_makeNothing ())); + ; + break;} +case 108: +#line 586 "cgrammar.y" +{ setProcessingGlobalsList (); ; + break;} +case 109: +#line 588 "cgrammar.y" +{ unsetProcessingGlobals (); ; + break;} +case 110: +#line 589 "cgrammar.y" +{ setProcessingGlobalsList (); ; + break;} +case 111: +#line 591 "cgrammar.y" +{ unsetProcessingGlobals (); ; + break;} +case 112: +#line 593 "cgrammar.y" +{ setFunctionNoGlobals (); + setFunctionModifies (sRefSet_single (sRef_makeNothing ())); + ; + break;} +case 117: +#line 605 "cgrammar.y" +{ + context_setProtectVars (); enterParamsTemp (); + sRef_setGlobalScopeSafe (); + ; + break;} +case 118: +#line 610 "cgrammar.y" +{ + setFunctionModifies (yyvsp[0].srset); exitParamsTemp (); + sRef_clearGlobalScopeSafe (); + context_releaseVars (); + ; + break;} +case 119: +#line 618 "cgrammar.y" +{ + context_setProtectVars (); enterParamsTemp (); + sRef_setGlobalScopeSafe (); + ; + break;} +case 120: +#line 623 "cgrammar.y" +{ + setFunctionModifies (yyvsp[0].srset); exitParamsTemp (); + sRef_clearGlobalScopeSafe (); + context_releaseVars (); + ; + break;} +case 130: +#line 647 "cgrammar.y" +{ yyval.sck = SP_ISONLY; ; + break;} +case 131: +#line 648 "cgrammar.y" +{ yyval.sck = SP_ISOBSERVER; ; + break;} +case 132: +#line 649 "cgrammar.y" +{ yyval.sck = SP_ISEXPOSED; ; + break;} +case 133: +#line 650 "cgrammar.y" +{ yyval.sck = SP_ISDEPENDENT; ; + break;} +case 134: +#line 651 "cgrammar.y" +{ yyval.sck = SP_ISOWNED; ; + break;} +case 135: +#line 652 "cgrammar.y" +{ yyval.sck = SP_ISSHARED; ; + break;} +case 136: +#line 653 "cgrammar.y" +{ yyval.sck = SP_ISNULL; ; + break;} +case 137: +#line 654 "cgrammar.y" +{ yyval.sck = SP_ISNOTNULL; ; + break;} +case 138: +#line 658 "cgrammar.y" +{ + context_setProtectVars (); + enterParamsTemp (); + sRef_setGlobalScopeSafe (); + ; + break;} +case 139: +#line 664 "cgrammar.y" +{ + setFunctionSpecialClause (yyvsp[-6].tok, yyvsp[-3].srset, yyvsp[-1].tok); + exitParamsTemp (); + sRef_clearGlobalScopeSafe (); + context_releaseVars (); + ; + break;} +case 140: +#line 671 "cgrammar.y" +{ + context_setProtectVars (); + enterParamsTemp (); + sRef_setGlobalScopeSafe (); + ; + break;} +case 141: +#line 677 "cgrammar.y" +{ + setFunctionStateSpecialClause (yyvsp[-7].tok, yyvsp[-5].sck, yyvsp[-3].srset, yyvsp[-1].tok); + exitParamsTemp (); + sRef_clearGlobalScopeSafe (); + context_releaseVars (); + ; + break;} +case 142: +#line 686 "cgrammar.y" +{ + qtype qint = qtype_create (ctype_int); + yyval.ntyp = idDecl_fixBase (yyvsp[0].ntyp, qint); + qtype_free (qint); + ; + break;} +case 143: +#line 692 "cgrammar.y" +{ yyval.ntyp = idDecl_fixBase (yyvsp[0].ntyp, yyvsp[-2].qtyp); ; + break;} +case 144: +#line 695 "cgrammar.y" +{ checkDoneParams (); context_enterInnerContext (); ; + break;} +case 145: +#line 697 "cgrammar.y" +{ + exprNode_checkFunctionBody (yyvsp[0].expr); yyval.expr = yyvsp[0].expr; + context_exitInner (yyvsp[0].expr); + ; + break;} +case 146: +#line 702 "cgrammar.y" +{ doneParams (); context_enterInnerContext (); ; + break;} +case 147: +#line 704 "cgrammar.y" +{ + context_exitInner (yyvsp[0].expr); + exprNode_checkFunctionBody (yyvsp[0].expr); + yyval.expr = yyvsp[0].expr; /* old style */ + ; + break;} +case 148: +#line 712 "cgrammar.y" +{ + context_setFunctionDefined (exprNode_loc (yyvsp[0].expr)); + /* exprNode_checkFunction (context_getHeader (), $2); */ + /* DRL 8 8 2000 */ + + context_exitFunction (); + ; + break;} +case 149: +#line 721 "cgrammar.y" +{ yyval.srset = yyvsp[-2].srset; ; + break;} +case 150: +#line 722 "cgrammar.y" +{ yyval.srset = sRefSet_new (); ; + break;} +case 151: +#line 725 "cgrammar.y" +{ yyval.srset = yyvsp[-1].srset; ; + break;} +case 152: +#line 726 "cgrammar.y" +{ yyval.srset = sRefSet_new (); ; + break;} +case 153: +#line 729 "cgrammar.y" +{ yyval.sr = uentry_getSref (yyvsp[0].entry); checkModifiesId (yyvsp[0].entry); ; + break;} +case 154: +#line 730 "cgrammar.y" +{ yyval.sr = fixModifiesId (yyvsp[0].cname); ; + break;} +case 155: +#line 731 "cgrammar.y" +{ yyval.sr = modListArrayFetch (yyvsp[-2].sr, sRef_undefined); ; + break;} +case 156: +#line 732 "cgrammar.y" +{ yyval.sr = modListArrayFetch (yyvsp[-3].sr, yyvsp[-1].sr); ; + break;} +case 157: +#line 733 "cgrammar.y" +{ yyval.sr = modListPointer (yyvsp[0].sr); ; + break;} +case 158: +#line 734 "cgrammar.y" +{ yyval.sr = yyvsp[-1].sr; ; + break;} +case 159: +#line 735 "cgrammar.y" +{ yyval.sr = modListFieldAccess (yyvsp[-2].sr, yyvsp[0].cname); ; + break;} +case 160: +#line 736 "cgrammar.y" +{ yyval.sr = modListArrowAccess (yyvsp[-2].sr, yyvsp[0].cname); ; + break;} +case 161: +#line 740 "cgrammar.y" +{ yyval.sr = yyvsp[0].sr; ; + break;} +case 162: +#line 741 "cgrammar.y" +{ yyval.sr = sRef_makeUnknown (); /* sRef_makeConstant ($1); ? */ ; + break;} +case 163: +#line 745 "cgrammar.y" +{ yyval.srset = sRefSet_single (yyvsp[0].sr); ; + break;} +case 164: +#line 746 "cgrammar.y" +{ yyval.srset = sRefSet_insert (yyvsp[-2].srset, yyvsp[0].sr); ; + break;} +case 165: +#line 750 "cgrammar.y" +{ yyval.sr = checkSpecClausesId (yyvsp[0].entry); ; + break;} +case 166: +#line 752 "cgrammar.y" +{ yyval.sr = fixSpecClausesId (yyvsp[0].cname); ; + break;} +case 167: +#line 753 "cgrammar.y" +{ yyval.sr = sRef_makeAnyArrayFetch (yyvsp[-2].sr); ; + break;} +case 168: +#line 754 "cgrammar.y" +{ yyval.sr = sRef_makeAnyArrayFetch (yyvsp[-3].sr); ; + break;} +case 169: +#line 755 "cgrammar.y" +{ yyval.sr = sRef_constructPointer (yyvsp[0].sr); ; + break;} +case 170: +#line 756 "cgrammar.y" +{ yyval.sr = yyvsp[-1].sr; ; + break;} +case 171: +#line 757 "cgrammar.y" +{ cstring_markOwned (yyvsp[0].cname); + yyval.sr = sRef_buildField (yyvsp[-2].sr, yyvsp[0].cname); ; + break;} +case 172: +#line 759 "cgrammar.y" +{ cstring_markOwned (yyvsp[0].cname); + yyval.sr = sRef_makeArrow (yyvsp[-2].sr, yyvsp[0].cname); ; + break;} +case 173: +#line 764 "cgrammar.y" +{ if (sRef_isValid (yyvsp[0].sr)) { yyval.srset = sRefSet_single (yyvsp[0].sr); } + else { yyval.srset = sRefSet_undefined; } + ; + break;} +case 174: +#line 768 "cgrammar.y" +{ if (sRef_isValid (yyvsp[0].sr)) + { + yyval.srset = sRefSet_insert (yyvsp[-2].srset, yyvsp[0].sr); + } + else + { + yyval.srset = yyvsp[-2].srset; + } + ; + break;} +case 175: +#line 779 "cgrammar.y" +{ yyval.expr = exprNode_fromIdentifier (yyvsp[0].entry); ; + break;} +case 176: +#line 780 "cgrammar.y" +{ yyval.expr = exprNode_fromUIO (yyvsp[0].cname); ; + break;} +case 177: +#line 781 "cgrammar.y" +{ yyval.expr = yyvsp[0].expr; ; + break;} +case 178: +#line 782 "cgrammar.y" +{ yyval.expr = exprNode_addParens (yyvsp[-2].tok, yyvsp[-1].expr); ; + break;} +case 179: +#line 783 "cgrammar.y" +{ yyval.expr = exprNode_fromIdentifier (coerceId (yyvsp[0].cname)); ; + break;} +case 180: +#line 784 "cgrammar.y" +{ yyval.expr = exprNode_makeError (); ; + break;} +case 182: +#line 788 "cgrammar.y" +{ yyval.expr = exprNode_arrayFetch (yyvsp[-3].expr, yyvsp[-1].expr); ; + break;} +case 183: +#line 789 "cgrammar.y" +{ yyval.expr = exprNode_functionCall (yyvsp[-2].expr, exprNodeList_new ()); ; + break;} +case 184: +#line 790 "cgrammar.y" +{ yyval.expr = exprNode_functionCall (yyvsp[-3].expr, yyvsp[-1].alist); ; + break;} +case 185: +#line 791 "cgrammar.y" +{ yyval.expr = exprNode_vaArg (yyvsp[-5].tok, yyvsp[-3].expr, yyvsp[-1].qtyp); ; + break;} +case 186: +#line 792 "cgrammar.y" +{ yyval.expr = exprNode_fieldAccess (yyvsp[-4].expr, yyvsp[-1].cname); ; + break;} +case 187: +#line 793 "cgrammar.y" +{ yyval.expr = exprNode_arrowAccess (yyvsp[-4].expr, yyvsp[-1].cname); ; + break;} +case 188: +#line 794 "cgrammar.y" +{ yyval.expr = exprNode_postOp (yyvsp[-1].expr, yyvsp[0].tok); ; + break;} +case 189: +#line 795 "cgrammar.y" +{ yyval.expr = exprNode_postOp (yyvsp[-1].expr, yyvsp[0].tok); ; + break;} +case 190: +#line 798 "cgrammar.y" +{ yyval.alist = exprNodeList_singleton (yyvsp[0].expr); ; + break;} +case 191: +#line 799 "cgrammar.y" +{ yyval.alist = exprNodeList_push (yyvsp[-2].alist, yyvsp[0].expr); ; + break;} +case 193: +#line 803 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 194: +#line 804 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 195: +#line 805 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 196: +#line 806 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 197: +#line 807 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 198: +#line 808 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 199: +#line 809 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 200: +#line 810 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 201: +#line 811 "cgrammar.y" +{ yyval.expr = yyvsp[0].expr; ; + break;} +case 202: +#line 812 "cgrammar.y" +{ yyval.expr = yyvsp[0].expr; ; + break;} +case 203: +#line 815 "cgrammar.y" +{ yyval.cstringlist = cstringList_add (yyvsp[-2].cstringlist, yyvsp[0].cname); ; + break;} +case 204: +#line 816 "cgrammar.y" +{ yyval.cstringlist = cstringList_single (yyvsp[0].cname); ; + break;} +case 205: +#line 820 "cgrammar.y" +{ yyval.expr = exprNode_offsetof (yyvsp[-5].qtyp, yyvsp[-2].cstringlist); ; + break;} +case 206: +#line 823 "cgrammar.y" +{ context_setProtectVars (); ; + break;} +case 207: +#line 824 "cgrammar.y" +{ context_sizeofReleaseVars (); yyval.expr = yyvsp[0].expr; ; + break;} +case 208: +#line 827 "cgrammar.y" +{ yyval.expr = exprNode_sizeofType (yyvsp[-1].qtyp); ; + break;} +case 209: +#line 828 "cgrammar.y" +{ yyval.expr = exprNode_sizeofExpr (yyvsp[0].expr); ; + break;} +case 210: +#line 829 "cgrammar.y" +{ yyval.expr = exprNode_alignofType (yyvsp[-1].qtyp); ; + break;} +case 211: +#line 830 "cgrammar.y" +{ yyval.expr = exprNode_alignofExpr (yyvsp[0].expr); ; + break;} +case 213: +#line 835 "cgrammar.y" +{ yyval.expr = exprNode_cast (yyvsp[-3].tok, yyvsp[0].expr, yyvsp[-2].qtyp); ; + break;} +case 215: +#line 839 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 216: +#line 840 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 217: +#line 841 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 219: +#line 845 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 220: +#line 846 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 222: +#line 850 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 223: +#line 851 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 225: +#line 855 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 226: +#line 856 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 227: +#line 857 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 228: +#line 858 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 230: +#line 862 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 231: +#line 863 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 233: +#line 867 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 235: +#line 871 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 237: +#line 876 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 239: +#line 881 "cgrammar.y" +{ exprNode_produceGuards (yyvsp[-1].expr); + context_enterAndClause (yyvsp[-1].expr); + ; + break;} +case 240: +#line 885 "cgrammar.y" +{ + yyval.expr = exprNode_op (yyvsp[-3].expr, yyvsp[0].expr, yyvsp[-2].tok); + context_exitAndClause (yyval.expr, yyvsp[0].expr); + ; + break;} +case 242: +#line 893 "cgrammar.y" +{ + exprNode_produceGuards (yyvsp[-1].expr); + context_enterOrClause (yyvsp[-1].expr); + ; + break;} +case 243: +#line 898 "cgrammar.y" +{ + yyval.expr = exprNode_op (yyvsp[-3].expr, yyvsp[0].expr, yyvsp[-2].tok); + context_exitOrClause (yyval.expr, yyvsp[0].expr); + ; + break;} +case 245: +#line 905 "cgrammar.y" +{ exprNode_produceGuards (yyvsp[-1].expr); context_enterTrueClause (yyvsp[-1].expr); ; + break;} +case 246: +#line 906 "cgrammar.y" +{ context_enterFalseClause (yyvsp[-4].expr); ; + break;} +case 247: +#line 907 "cgrammar.y" +{ yyval.expr = exprNode_cond (yyvsp[-6].expr, yyvsp[-3].expr, yyvsp[0].expr); context_exitClause (yyvsp[-6].expr, yyvsp[-3].expr, yyvsp[0].expr); ; + break;} +case 249: +#line 911 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 250: +#line 912 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 251: +#line 913 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 252: +#line 914 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 253: +#line 915 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 254: +#line 916 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 255: +#line 917 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 256: +#line 918 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 257: +#line 919 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 258: +#line 920 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 259: +#line 921 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 261: +#line 925 "cgrammar.y" +{ yyval.expr = exprNode_comma (yyvsp[-2].expr, yyvsp[0].expr); ; + break;} +case 262: +#line 928 "cgrammar.y" +{ yyval.expr = exprNode_undefined; ; + break;} +case 265: +#line 937 "cgrammar.y" +{ yyval.expr = yyvsp[0].expr; ; + break;} +case 266: +#line 938 "cgrammar.y" +{ doVaDcl (); yyval.expr = exprNode_makeError (); ; + break;} +case 267: +#line 939 "cgrammar.y" +{ yyval.expr = exprNode_makeError (); ; + break;} +case 268: +#line 942 "cgrammar.y" +{ yyval.expr = exprNode_makeError (); ; + break;} +case 269: +#line 956 "cgrammar.y" +{ + setProcessingVars (yyvsp[-3].qtyp); + processNamedDecl (yyvsp[-1].ntyp); ; + break;} +case 270: +#line 959 "cgrammar.y" +{ unsetProcessingVars (); yyval.expr = yyvsp[-2].expr; ; + break;} +case 271: +#line 961 "cgrammar.y" +{ setProcessingVars (yyvsp[-4].qtyp); processNamedDecl (yyvsp[-2].ntyp); + ; + break;} +case 272: +#line 964 "cgrammar.y" +{ yyval.expr = exprNode_concat (yyvsp[-2].expr, exprNode_makeInitialization (yyvsp[-8].ntyp, yyvsp[-3].expr)); + unsetProcessingVars (); + ; + break;} +case 273: +#line 968 "cgrammar.y" +{ processNamedDecl (yyvsp[-1].ntyp); yyval.expr = exprNode_makeError (); ; + break;} +case 274: +#line 969 "cgrammar.y" +{ processNamedDecl (yyvsp[-2].ntyp); ; + break;} +case 275: +#line 970 "cgrammar.y" +{ yyval.expr = exprNode_makeInitialization (yyvsp[-5].ntyp, yyvsp[0].expr); ; + break;} +case 276: +#line 974 "cgrammar.y" +{ setProcessingTypedef (yyvsp[0].qtyp); ; + break;} +case 277: +#line 975 "cgrammar.y" +{ unsetProcessingTypedef (); ; + break;} +case 278: +#line 976 "cgrammar.y" +{ /* in the ANSI grammar, semantics unclear */ ; + break;} +case 279: +#line 977 "cgrammar.y" +{ /* in the ANSI grammar, semantics unclear */ ; + break;} +case 280: +#line 980 "cgrammar.y" +{ g_expectingTypeName = TRUE; ; + break;} +case 281: +#line 983 "cgrammar.y" +{ g_expectingTypeName = TRUE; context_pushLoc (); ; + break;} +case 282: +#line 986 "cgrammar.y" +{ ; ; + break;} +case 283: +#line 989 "cgrammar.y" +{ ; ; + break;} +case 284: +#line 990 "cgrammar.y" +{ ; ; + break;} +case 285: +#line 993 "cgrammar.y" +{ yyval.expr = exprNode_makeError (); ; + break;} +case 286: +#line 994 "cgrammar.y" +{ yyval.expr = exprNode_concat (yyvsp[-3].expr, yyvsp[0].expr); ; + break;} +case 287: +#line 997 "cgrammar.y" +{ yyval.expr = yyvsp[0].expr; ; + break;} +case 288: +#line 998 "cgrammar.y" +{ yyval.expr = exprNode_makeInitBlock (yyvsp[-2].tok, yyvsp[-1].alist); ; + break;} +case 289: +#line 999 "cgrammar.y" +{ yyval.expr = exprNode_makeInitBlock (yyvsp[-3].tok, yyvsp[-2].alist); ; + break;} +case 290: +#line 1004 "cgrammar.y" +{ yyval.alist = exprNodeList_singleton (yyvsp[0].expr); ; + break;} +case 291: +#line 1006 "cgrammar.y" +{ yyval.alist = exprNodeList_push (yyvsp[-2].alist, yyvsp[0].expr); ; + break;} +case 292: +#line 1014 "cgrammar.y" +{ setStorageClass (SCEXTERN); yyval.typequal = qual_createExtern (); ; + break;} +case 293: +#line 1015 "cgrammar.y" +{ yyval.typequal = qual_createInline (); ; + break;} +case 294: +#line 1016 "cgrammar.y" +{ setStorageClass (SCSTATIC); yyval.typequal = qual_createStatic (); ; + break;} +case 295: +#line 1017 "cgrammar.y" +{ yyval.typequal = qual_createAuto (); ; + break;} +case 296: +#line 1018 "cgrammar.y" +{ yyval.typequal = qual_createRegister (); ; + break;} +case 297: +#line 1021 "cgrammar.y" +{ yyval.typequal = qual_createConst (); ; + break;} +case 298: +#line 1022 "cgrammar.y" +{ yyval.typequal = qual_createVolatile (); ; + break;} +case 299: +#line 1023 "cgrammar.y" +{ yyval.typequal = qual_createOut (); ; + break;} +case 300: +#line 1024 "cgrammar.y" +{ yyval.typequal = qual_createIn (); ; + break;} +case 301: +#line 1025 "cgrammar.y" +{ yyval.typequal = qual_createPartial (); ; + break;} +case 302: +#line 1026 "cgrammar.y" +{ yyval.typequal = qual_createSpecial (); ; + break;} +case 303: +#line 1027 "cgrammar.y" +{ yyval.typequal = qual_createOwned (); ; + break;} +case 304: +#line 1028 "cgrammar.y" +{ yyval.typequal = qual_createDependent (); ; + break;} +case 305: +#line 1029 "cgrammar.y" +{ yyval.typequal = qual_createYield (); ; + break;} +case 306: +#line 1030 "cgrammar.y" +{ yyval.typequal = qual_createTemp (); ; + break;} +case 307: +#line 1031 "cgrammar.y" +{ yyval.typequal = qual_createOnly (); ; + break;} +case 308: +#line 1032 "cgrammar.y" +{ yyval.typequal = qual_createKeep (); ; + break;} +case 309: +#line 1033 "cgrammar.y" +{ yyval.typequal = qual_createKept (); ; + break;} +case 310: +#line 1034 "cgrammar.y" +{ yyval.typequal = qual_createShared (); ; + break;} +case 311: +#line 1035 "cgrammar.y" +{ yyval.typequal = qual_createUnique (); ; + break;} +case 312: +#line 1036 "cgrammar.y" +{ yyval.typequal = qual_createExits (); ; + break;} +case 313: +#line 1037 "cgrammar.y" +{ yyval.typequal = qual_createMayExit (); ; + break;} +case 314: +#line 1038 "cgrammar.y" +{ yyval.typequal = qual_createTrueExit (); ; + break;} +case 315: +#line 1039 "cgrammar.y" +{ yyval.typequal = qual_createFalseExit (); ; + break;} +case 316: +#line 1040 "cgrammar.y" +{ yyval.typequal = qual_createNeverExit (); ; + break;} +case 317: +#line 1041 "cgrammar.y" +{ yyval.typequal = qual_createNull (); ; + break;} +case 318: +#line 1042 "cgrammar.y" +{ yyval.typequal = qual_createRelNull (); ; + break;} +case 319: +#line 1043 "cgrammar.y" +{ yyval.typequal = qual_createReturned (); ; + break;} +case 320: +#line 1044 "cgrammar.y" +{ yyval.typequal = qual_createExposed (); ; + break;} +case 321: +#line 1045 "cgrammar.y" +{ yyval.typequal = qual_createObserver (); ; + break;} +case 322: +#line 1046 "cgrammar.y" +{ yyval.typequal = qual_createChecked (); ; + break;} +case 323: +#line 1047 "cgrammar.y" +{ yyval.typequal = qual_createCheckMod (); ; + break;} +case 324: +#line 1048 "cgrammar.y" +{ yyval.typequal = qual_createUnchecked (); ; + break;} +case 325: +#line 1049 "cgrammar.y" +{ yyval.typequal = qual_createCheckedStrict (); ; + break;} +case 326: +#line 1050 "cgrammar.y" +{ yyval.typequal = qual_createTrueNull (); ; + break;} +case 327: +#line 1051 "cgrammar.y" +{ yyval.typequal = qual_createFalseNull (); ; + break;} +case 328: +#line 1052 "cgrammar.y" +{ yyval.typequal = qual_createUnused (); ; + break;} +case 329: +#line 1053 "cgrammar.y" +{ yyval.typequal = qual_createExternal (); ; + break;} +case 330: +#line 1054 "cgrammar.y" +{ yyval.typequal = qual_createSef (); ; + break;} +case 331: +#line 1055 "cgrammar.y" +{ yyval.typequal = qual_createAbstract (); ; + break;} +case 332: +#line 1056 "cgrammar.y" +{ yyval.typequal = qual_createConcrete (); ; + break;} +case 333: +#line 1057 "cgrammar.y" +{ yyval.typequal = qual_createMutable (); ; + break;} +case 334: +#line 1058 "cgrammar.y" +{ yyval.typequal = qual_createImmutable (); ; + break;} +case 335: +#line 1059 "cgrammar.y" +{ yyval.typequal = qual_createNotNull (); ; + break;} +case 336: +#line 1060 "cgrammar.y" +{ yyval.typequal = qual_createRefCounted (); ; + break;} +case 337: +#line 1061 "cgrammar.y" +{ yyval.typequal = qual_createRefs (); ; + break;} +case 338: +#line 1062 "cgrammar.y" +{ yyval.typequal = qual_createKillRef (); ; + break;} +case 339: +#line 1063 "cgrammar.y" +{ yyval.typequal = qual_createRelDef (); ; + break;} +case 340: +#line 1064 "cgrammar.y" +{ yyval.typequal = qual_createNewRef (); ; + break;} +case 341: +#line 1065 "cgrammar.y" +{ yyval.typequal = qual_createTempRef (); ; + break;} +case 342: +#line 1066 "cgrammar.y" +{ yyval.typequal = qual_createNullTerminated (); ; + break;} +case 343: +#line 1072 "cgrammar.y" +{ yyval.typequal = qual_createShort (); ; + break;} +case 344: +#line 1073 "cgrammar.y" +{ yyval.typequal = qual_createLong (); ; + break;} +case 345: +#line 1074 "cgrammar.y" +{ yyval.typequal = qual_createSigned (); ; + break;} +case 346: +#line 1075 "cgrammar.y" +{ yyval.typequal = qual_createUnsigned (); ; + break;} +case 353: +#line 1084 "cgrammar.y" +{ yyval.ctyp = ctype_unknown; ; + break;} +case 354: +#line 1085 "cgrammar.y" +{ yyval.ctyp = ctype_anyintegral; ; + break;} +case 355: +#line 1086 "cgrammar.y" +{ yyval.ctyp = ctype_unsignedintegral; ; + break;} +case 356: +#line 1087 "cgrammar.y" +{ yyval.ctyp = ctype_signedintegral; ; + break;} +case 360: +#line 1091 "cgrammar.y" +{ yyval.ctyp = ctype_fromQual (yyvsp[-1].typequal); ; + break;} +case 361: +#line 1095 "cgrammar.y" +{ yyval.qtyp = qtype_resolve (yyvsp[-1].qtyp); ; + break;} +case 362: +#line 1098 "cgrammar.y" +{ yyval.qtyp = yyvsp[0].qtyp; ; + break;} +case 363: +#line 1100 "cgrammar.y" +{ yyval.qtyp = qtype_mergeAlt (yyvsp[-3].qtyp, yyvsp[-1].qtyp); ; + break;} +case 365: +#line 1105 "cgrammar.y" +{ yyval.qtyp = qtype_mergeAlt (yyvsp[-2].qtyp, yyvsp[0].qtyp); ; + break;} +case 366: +#line 1108 "cgrammar.y" +{ yyval.qtyp = qtype_addQual (yyvsp[0].qtyp, yyvsp[-1].typequal); ; + break;} +case 367: +#line 1109 "cgrammar.y" +{ yyval.qtyp = qtype_addQual (yyvsp[0].qtyp, yyvsp[-1].typequal); ; + break;} +case 368: +#line 1110 "cgrammar.y" +{ yyval.qtyp = qtype_combine (yyvsp[0].qtyp, yyvsp[-1].ctyp); ; + break;} +case 369: +#line 1113 "cgrammar.y" +{ yyval.qtyp = qtype_unknown (); ; + break;} +case 370: +#line 1114 "cgrammar.y" +{ yyval.qtyp = yyvsp[0].qtyp; ; + break;} +case 371: +#line 1117 "cgrammar.y" +{ sRef_setGlobalScopeSafe (); ; + break;} +case 372: +#line 1119 "cgrammar.y" +{ sRef_clearGlobalScopeSafe (); ; + break;} +case 373: +#line 1121 "cgrammar.y" +{ yyval.ctyp = declareStruct (yyvsp[-8].cname, yyvsp[-3].flist); ; + break;} +case 374: +#line 1122 "cgrammar.y" +{ sRef_setGlobalScopeSafe (); ; + break;} +case 375: +#line 1124 "cgrammar.y" +{ sRef_clearGlobalScopeSafe (); ; + break;} +case 376: +#line 1126 "cgrammar.y" +{ yyval.ctyp = declareUnion (yyvsp[-8].cname, yyvsp[-3].flist); ; + break;} +case 377: +#line 1128 "cgrammar.y" +{ yyval.ctyp = declareStruct (yyvsp[-3].cname, uentryList_new ()); ; + break;} +case 378: +#line 1130 "cgrammar.y" +{ yyval.ctyp = declareUnion (yyvsp[-3].cname, uentryList_new ()); ; + break;} +case 379: +#line 1131 "cgrammar.y" +{ sRef_setGlobalScopeSafe (); ; + break;} +case 380: +#line 1133 "cgrammar.y" +{ sRef_clearGlobalScopeSafe (); ; + break;} +case 381: +#line 1135 "cgrammar.y" +{ yyval.ctyp = declareUnnamedStruct (yyvsp[-3].flist); ; + break;} +case 382: +#line 1136 "cgrammar.y" +{ sRef_setGlobalScopeSafe (); ; + break;} +case 383: +#line 1138 "cgrammar.y" +{ sRef_clearGlobalScopeSafe (); ; + break;} +case 384: +#line 1140 "cgrammar.y" +{ yyval.ctyp = declareUnnamedUnion (yyvsp[-3].flist); ; + break;} +case 385: +#line 1142 "cgrammar.y" +{ yyval.ctyp = ctype_createUnnamedStruct (uentryList_new ()); ; + break;} +case 386: +#line 1144 "cgrammar.y" +{ yyval.ctyp = ctype_createUnnamedUnion (uentryList_new ()); ; + break;} +case 387: +#line 1145 "cgrammar.y" +{ yyval.ctyp = handleStruct (yyvsp[-1].cname); ; + break;} +case 388: +#line 1146 "cgrammar.y" +{ yyval.ctyp = handleUnion (yyvsp[-1].cname); ; + break;} +case 389: +#line 1149 "cgrammar.y" +{ g_expectingTypeName = FALSE; ; + break;} +case 391: +#line 1153 "cgrammar.y" +{ yyval.flist = uentryList_undefined; /* bogus! */ ; + break;} +case 392: +#line 1154 "cgrammar.y" +{ yyval.flist = uentryList_mergeFields (yyvsp[-1].flist, yyvsp[0].flist); ; + break;} +case 393: +#line 1158 "cgrammar.y" +{ yyval.flist = fixUentryList (yyvsp[-2].ntyplist, yyvsp[-4].qtyp); ; + break;} +case 394: +#line 1160 "cgrammar.y" +{ yyval.flist = fixUnnamedDecl (yyvsp[-2].qtyp); ; + break;} +case 395: +#line 1164 "cgrammar.y" +{ yyval.ntyplist = idDeclList_singleton (yyvsp[-1].ntyp); ; + break;} +case 396: +#line 1166 "cgrammar.y" +{ yyval.ntyplist = idDeclList_add (yyvsp[-3].ntyplist, yyvsp[-1].ntyp); ; + break;} +case 397: +#line 1169 "cgrammar.y" +{ yyval.ntyp = yyvsp[0].ntyp; ; + break;} +case 398: +#line 1170 "cgrammar.y" +{ yyval.ntyp = idDecl_undefined; ; + break;} +case 399: +#line 1171 "cgrammar.y" +{ yyval.ntyp = yyvsp[-3].ntyp; ; + break;} +case 400: +#line 1176 "cgrammar.y" +{ yyval.ctyp = declareUnnamedEnum (yyvsp[-2].enumnamelist); ; + break;} +case 401: +#line 1177 "cgrammar.y" +{ context_pushLoc (); ; + break;} +case 402: +#line 1178 "cgrammar.y" +{ context_popLoc (); yyval.ctyp = declareEnum (yyvsp[-5].cname, yyvsp[-2].enumnamelist); ; + break;} +case 403: +#line 1179 "cgrammar.y" +{ yyval.ctyp = handleEnum (yyvsp[-1].cname); ; + break;} +case 404: +#line 1183 "cgrammar.y" +{ yyval.enumnamelist = enumNameList_single (yyvsp[0].cname); ; + break;} +case 405: +#line 1185 "cgrammar.y" +{ yyval.enumnamelist = enumNameList_push (yyvsp[-2].enumnamelist, yyvsp[0].cname); ; + break;} +case 407: +#line 1190 "cgrammar.y" +{ uentry ue = uentry_makeEnumConstant (yyvsp[0].cname, ctype_unknown); + usymtab_supGlobalEntry (ue); + yyval.cname = yyvsp[0].cname; + ; + break;} +case 408: +#line 1195 "cgrammar.y" +{ uentry ue = uentry_makeEnumInitializedConstant (yyvsp[-3].cname, ctype_unknown, yyvsp[0].expr); + usymtab_supGlobalEntry (ue); + yyval.cname = yyvsp[-3].cname; + ; + break;} +case 410: +#line 1202 "cgrammar.y" +{ yyval.ntyp = idDecl_create (cstring_undefined, qtype_create (yyvsp[0].ctyp)); ; + break;} +case 411: +#line 1204 "cgrammar.y" +{ + qtype qt = qtype_unknown (); + + qtype_adjustPointers (yyvsp[-1].count, qt); + yyval.ntyp = idDecl_create (cstring_copy (LastIdentifier ()), qt); + ; + break;} +case 412: +#line 1211 "cgrammar.y" +{ yyval.ntyp = yyvsp[0].ntyp; qtype_adjustPointers (yyvsp[-1].count, idDecl_getTyp (yyval.ntyp)); ; + break;} +case 414: +#line 1216 "cgrammar.y" +{ yyval.ntyp = yyvsp[0].ntyp; qtype_adjustPointers (yyvsp[-1].count, idDecl_getTyp (yyval.ntyp)); ; + break;} +case 415: +#line 1219 "cgrammar.y" +{ yyval.entrylist = handleParamTypeList (yyvsp[0].entrylist); ; + break;} +case 416: +#line 1220 "cgrammar.y" +{ yyval.entrylist = handleParamIdList (yyvsp[0].entrylist); ; + break;} +case 417: +#line 1223 "cgrammar.y" +{ /* ignored for now */; ; + break;} +case 418: +#line 1224 "cgrammar.y" +{ ; ; + break;} +case 419: +#line 1227 "cgrammar.y" +{ ; ; + break;} +case 420: +#line 1228 "cgrammar.y" +{ ; ; + break;} +case 421: +#line 1231 "cgrammar.y" +{ yyval.count = 1; ; + break;} +case 422: +#line 1232 "cgrammar.y" +{ yyval.count = 1; ; + break;} +case 423: +#line 1233 "cgrammar.y" +{ yyval.count = 1 + yyvsp[0].count; ; + break;} +case 424: +#line 1234 "cgrammar.y" +{ yyval.count = 1 + yyvsp[0].count; ; + break;} +case 426: +#line 1238 "cgrammar.y" +{ yyval.entrylist = uentryList_add (yyvsp[-2].entrylist, uentry_makeElipsisMarker ()); ; + break;} +case 427: +#line 1241 "cgrammar.y" +{ yyval.entrylist = uentryList_single (uentry_makeVariableLoc (yyvsp[0].cname, ctype_int)); ; + break;} +case 428: +#line 1242 "cgrammar.y" +{ yyval.entrylist = uentryList_add (yyvsp[-2].entrylist, uentry_makeVariableLoc (yyvsp[0].cname, ctype_int)); ; + break;} +case 429: +#line 1245 "cgrammar.y" +{ yyval.entrylist = uentryList_single (uentry_makeElipsisMarker ()); ; + break;} +case 431: +#line 1247 "cgrammar.y" +{ yyval.entrylist = uentryList_add (yyvsp[-2].entrylist, uentry_makeElipsisMarker ()); ; + break;} +case 432: +#line 1250 "cgrammar.y" +{ storeLoc (); ; + break;} +case 433: +#line 1250 "cgrammar.y" +{ yyval.entrylist = uentryList_single (yyvsp[0].oentry); ; + break;} +case 434: +#line 1251 "cgrammar.y" +{ storeLoc (); ; + break;} +case 435: +#line 1252 "cgrammar.y" +{ yyval.entrylist = uentryList_add (yyvsp[-3].entrylist, yyvsp[0].oentry); ; + break;} +case 436: +#line 1256 "cgrammar.y" +{ + if (isFlipOldStyle ()) + { + llparseerror (cstring_makeLiteral ("Inconsistent function parameter syntax (mixing old and new style declaration)")); + } + else + { + setNewStyle (); + } + yyval.oentry = makeCurrentParam (idDecl_fixParamBase (yyvsp[-1].ntyp, yyvsp[-2].qtyp)); + ; + break;} +case 437: +#line 1268 "cgrammar.y" +{ + idDecl tparam = idDecl_create (yyvsp[0].cname, qtype_unknown ()); + + if (isNewStyle ()) + { + llparseerror (message ("Inconsistent function parameter syntax: %q", + idDecl_unparse (tparam))); + } + + setFlipOldStyle (); + yyval.oentry = makeCurrentParam (tparam); + idDecl_free (tparam); + ; + break;} +case 439: +#line 1284 "cgrammar.y" +{ yyval.qtyp = qtype_newBase (yyvsp[-1].qtyp, yyvsp[0].ctyp); ; + break;} +case 440: +#line 1287 "cgrammar.y" +{ yyval.ctyp = ctype_adjustPointers (yyvsp[0].count, ctype_unknown); ; + break;} +case 442: +#line 1289 "cgrammar.y" +{ yyval.ctyp = ctype_adjustPointers (yyvsp[-1].count, yyvsp[0].ctyp); ; + break;} +case 443: +#line 1292 "cgrammar.y" +{ yyval.ctyp = ctype_unknown; ; + break;} +case 445: +#line 1297 "cgrammar.y" +{ yyval.ctyp = ctype_expectFunction (yyvsp[-1].ctyp); ; + break;} +case 446: +#line 1298 "cgrammar.y" +{ yyval.ctyp = ctype_makeArray (ctype_unknown); ; + break;} +case 447: +#line 1300 "cgrammar.y" +{ yyval.ctyp = ctype_makeFixedArray (ctype_unknown, exprNode_getLongValue (yyvsp[-1].expr)); ; + break;} +case 448: +#line 1301 "cgrammar.y" +{ yyval.ctyp = ctype_makeArray (yyvsp[-2].ctyp); ; + break;} +case 449: +#line 1303 "cgrammar.y" +{ yyval.ctyp = ctype_makeFixedArray (yyvsp[-3].ctyp, exprNode_getLongValue (yyvsp[-1].expr)); ; + break;} +case 450: +#line 1305 "cgrammar.y" +{ yyval.ctyp = ctype_makeFunction (ctype_unknown, uentryList_makeMissingParams ()); ; + break;} +case 451: +#line 1307 "cgrammar.y" +{ yyval.ctyp = ctype_makeParamsFunction (ctype_unknown, yyvsp[-1].entrylist); ; + break;} +case 452: +#line 1309 "cgrammar.y" +{ yyval.ctyp = ctype_makeFunction (yyvsp[-3].ctyp, uentryList_makeMissingParams ()); ; + break;} +case 453: +#line 1311 "cgrammar.y" +{ yyval.ctyp = ctype_makeParamsFunction (yyvsp[-4].ctyp, yyvsp[-1].entrylist); ; + break;} +case 463: +#line 1326 "cgrammar.y" +{yyval.expr = yyvsp[0].expr; printf ("Doing stmt lclintassertion\n"); ; + break;} +case 464: +#line 1330 "cgrammar.y" +{ printf(" QSETBUFFERSIZE id CCONSTANT HEllo World\n"); uentry_setBufferSize(yyvsp[-2].entry, yyvsp[-1].expr); yyval.expr = exprNode_createTok (yyvsp[0].tok); + ; + break;} +case 465: +#line 1332 "cgrammar.y" +{ printf(" QSETSTRINGLENGTH id CCONSTANT HEllo World\n"); uentry_setStringLength(yyvsp[-2].entry, yyvsp[-1].expr); yyval.expr = exprNode_createTok (yyvsp[0].tok); + ; + break;} +case 466: +#line 1334 "cgrammar.y" +{printf(" QTESTINRANGE\n"); uentry_testInRange(yyvsp[-2].entry, yyvsp[-1].expr); yyval.expr = exprNode_createTok (yyvsp[0].tok); + ; + break;} +case 467: +#line 1340 "cgrammar.y" +{ yyval.expr = exprNode_labelMarker (yyvsp[0].cname); ; + break;} +case 468: +#line 1345 "cgrammar.y" +{ yyval.expr = yyvsp[0].expr; ; + break;} +case 471: +#line 1353 "cgrammar.y" +{ yyval.expr = exprNode_concat (yyvsp[-1].expr, yyvsp[0].expr); ; + break;} +case 472: +#line 1357 "cgrammar.y" +{ yyval.expr = exprNode_while (yyvsp[-1].expr, yyvsp[0].expr); ; + break;} +case 473: +#line 1359 "cgrammar.y" +{ yyval.expr = exprNode_doWhile (yyvsp[-5].expr, yyvsp[-2].expr); ; + break;} +case 474: +#line 1361 "cgrammar.y" +{ yyval.expr = exprNode_doWhile (yyvsp[-4].expr, yyvsp[-1].expr); ; + break;} +case 475: +#line 1363 "cgrammar.y" +{ yyval.expr = exprNode_for (yyvsp[-1].expr, yyvsp[0].expr); ; + break;} +case 476: +#line 1367 "cgrammar.y" +{ context_setProtectVars (); ; + break;} +case 477: +#line 1367 "cgrammar.y" +{ context_sizeofReleaseVars (); ; + break;} +case 478: +#line 1369 "cgrammar.y" +{ yyval.expr = exprNode_forPred (yyvsp[-7].expr, yyvsp[-5].expr, yyvsp[-2].expr); + context_enterForClause (yyvsp[-5].expr); ; + break;} +case 479: +#line 1374 "cgrammar.y" +{ setProcessingIterVars (yyvsp[-2].entry); ; + break;} +case 480: +#line 1376 "cgrammar.y" +{ yyval.expr = exprNode_iterStart (yyvsp[-5].entry, yyvsp[-1].alist); ; + break;} +case 481: +#line 1377 "cgrammar.y" +{ yyval.expr = exprNode_createId (yyvsp[0].entry); ; + break;} +case 485: +#line 1383 "cgrammar.y" +{ yyval.expr = yyvsp[0].expr; ; + break;} +case 493: +#line 1391 "cgrammar.y" +{ yyval.expr = yyvsp[-1].expr; ; + break;} +case 494: +#line 1392 "cgrammar.y" +{ yyval.expr = exprNode_makeError (); ; + break;} +case 495: +#line 1396 "cgrammar.y" +{ /* don't: context_exitTrueClause ($1, $2); */ + yyval.expr = exprNode_if (yyvsp[-1].expr, yyvsp[0].expr); + ; + break;} +case 496: +#line 1401 "cgrammar.y" +{ yyval.expr = exprNode_createTok (yyvsp[0].tok); ; + break;} +case 497: +#line 1404 "cgrammar.y" +{ yyval.expr = exprNode_createTok (yyvsp[0].tok); ; + break;} +case 508: +#line 1419 "cgrammar.y" +{ yyval.expr = exprNode_addParens (yyvsp[-2].tok, yyvsp[-1].expr); ; + break;} +case 510: +#line 1421 "cgrammar.y" +{ yyval.expr = exprNode_makeError (); ; + break;} +case 511: +#line 1424 "cgrammar.y" +{ yyval.expr = exprNode_labelMarker (yyvsp[-1].cname); ; + break;} +case 512: +#line 1425 "cgrammar.y" +{ yyval.expr = exprNode_notReached (yyvsp[0].expr); ; + break;} +case 513: +#line 1431 "cgrammar.y" +{ context_enterCaseClause (yyvsp[0].expr); ; + break;} +case 514: +#line 1432 "cgrammar.y" +{ yyval.expr = exprNode_caseMarker (yyvsp[-2].expr, FALSE); ; + break;} +case 515: +#line 1433 "cgrammar.y" +{ context_enterCaseClause (yyvsp[0].expr); ; + break;} +case 516: +#line 1434 "cgrammar.y" +{ yyval.expr = exprNode_caseMarker (yyvsp[-2].expr, TRUE); ; + break;} +case 517: +#line 1437 "cgrammar.y" +{ context_enterCaseClause (exprNode_undefined); ; + break;} +case 518: +#line 1438 "cgrammar.y" +{ yyval.expr = exprNode_defaultMarker (yyvsp[-2].tok, FALSE); ; + break;} +case 519: +#line 1439 "cgrammar.y" +{ context_enterCaseClause (exprNode_undefined); ; + break;} +case 520: +#line 1440 "cgrammar.y" +{ yyval.expr = exprNode_defaultMarker (yyvsp[-2].tok, TRUE); ; + break;} +case 521: +#line 1443 "cgrammar.y" +{ yyval.expr = yyvsp[-1].expr; ; + break;} +case 522: +#line 1445 "cgrammar.y" +{ yyval.expr = yyvsp[0].expr; context_exitInner (yyvsp[0].expr); ; + break;} +case 523: +#line 1448 "cgrammar.y" +{ yyval.expr = yyvsp[-1].expr; ; + break;} +case 524: +#line 1451 "cgrammar.y" +{ context_enterInnerContext (); ; + break;} +case 525: +#line 1454 "cgrammar.y" +{ context_exitInnerPlain (); ; + break;} +case 526: +#line 1457 "cgrammar.y" +{ context_enterStructInnerContext (); ; + break;} +case 527: +#line 1460 "cgrammar.y" +{ context_exitStructInnerContext (); ; + break;} +case 528: +#line 1463 "cgrammar.y" +{ context_exitInnerSafe (); ; + break;} +case 529: +#line 1466 "cgrammar.y" +{ yyval.expr = exprNode_createTok (yyvsp[0].tok); ; + break;} +case 530: +#line 1467 "cgrammar.y" +{ yyval.expr = exprNode_notReached (exprNode_createTok (yyvsp[0].tok)); ; + break;} +case 531: +#line 1468 "cgrammar.y" +{ yyval.expr = exprNode_updateLocation (yyvsp[-1].expr, lltok_getLoc (yyvsp[0].tok)); ; + break;} +case 532: +#line 1470 "cgrammar.y" +{ yyval.expr = exprNode_notReached (exprNode_updateLocation (yyvsp[-2].expr, lltok_getLoc (yyvsp[0].tok))); ; + break;} +case 533: +#line 1471 "cgrammar.y" +{ yyval.expr = exprNode_updateLocation (yyvsp[-1].expr, lltok_getLoc (yyvsp[0].tok)); ; + break;} +case 534: +#line 1473 "cgrammar.y" +{ yyval.expr = exprNode_notReached (exprNode_updateLocation (yyvsp[-2].expr, lltok_getLoc (yyvsp[0].tok))); ; + break;} +case 535: +#line 1475 "cgrammar.y" +{ yyval.expr = exprNode_updateLocation (exprNode_concat (yyvsp[-2].expr, yyvsp[-1].expr), lltok_getLoc (yyvsp[0].tok)); ; + break;} +case 536: +#line 1477 "cgrammar.y" +{ yyval.expr = exprNode_notReached (exprNode_updateLocation (exprNode_concat (yyvsp[-3].expr, yyvsp[-2].expr), + lltok_getLoc (yyvsp[-1].tok))); + ; + break;} +case 537: +#line 1484 "cgrammar.y" +{ yyval.expr = exprNode_makeBlock (yyvsp[0].expr); ; + break;} +case 538: +#line 1488 "cgrammar.y" +{ yyval.expr = exprNode_createTok (yyvsp[0].tok); ; + break;} +case 539: +#line 1490 "cgrammar.y" +{ yyval.expr = exprNode_updateLocation (yyvsp[-1].expr, lltok_getLoc (yyvsp[0].tok)); ; + break;} +case 540: +#line 1492 "cgrammar.y" +{ yyval.expr = exprNode_updateLocation (yyvsp[-1].expr, lltok_getLoc (yyvsp[0].tok)); ; + break;} +case 541: +#line 1494 "cgrammar.y" +{ yyval.expr = exprNode_updateLocation (exprNode_concat (yyvsp[-2].expr, yyvsp[-1].expr), lltok_getLoc (yyvsp[0].tok)); ; + break;} +case 543: +#line 1498 "cgrammar.y" +{ yyval.expr = exprNode_concat (yyvsp[-1].expr, yyvsp[0].expr); ; + break;} +case 544: +#line 1501 "cgrammar.y" +{ yyval.expr = yyvsp[0].expr; ; + break;} +case 545: +#line 1502 "cgrammar.y" +{ yyval.expr = exprNode_concat (yyvsp[-1].expr, yyvsp[0].expr); ; + break;} +case 546: +#line 1505 "cgrammar.y" +{ yyval.expr = yyvsp[0].expr; ; + break;} +case 547: +#line 1506 "cgrammar.y" +{ yyval.expr = exprNode_concat (yyvsp[-1].expr, yyvsp[0].expr); ; + break;} +case 548: +#line 1509 "cgrammar.y" +{ yyval.expr = exprNode_createTok (yyvsp[0].tok); ; + break;} +case 549: +#line 1510 "cgrammar.y" +{ yyval.expr = exprNode_statement (yyvsp[-1].expr, yyvsp[0].tok); ; + break;} +case 550: +#line 1513 "cgrammar.y" +{ yyval.expr = exprNode_createTok (yyvsp[0].tok); ; + break;} +case 551: +#line 1514 "cgrammar.y" +{ yyval.expr = exprNode_statement (yyvsp[-1].expr, yyvsp[0].tok); ; + break;} +case 552: +#line 1515 "cgrammar.y" +{ yyval.expr = exprNode_checkExpr (yyvsp[0].expr); ; + break;} +case 553: +#line 1519 "cgrammar.y" +{ yyval.expr = yyvsp[-1].expr; exprNode_produceGuards (yyvsp[-1].expr); context_enterTrueClause (yyvsp[-1].expr); ; + break;} +case 554: +#line 1527 "cgrammar.y" +{ + context_exitTrueClause (yyvsp[-1].expr, yyvsp[0].expr); + yyval.expr = exprNode_if (yyvsp[-1].expr, yyvsp[0].expr); + ; + break;} +case 555: +#line 1531 "cgrammar.y" +{ context_enterFalseClause (yyvsp[-2].expr); ; + break;} +case 556: +#line 1532 "cgrammar.y" +{ + context_exitClause (yyvsp[-4].expr, yyvsp[-3].expr, yyvsp[0].expr); + yyval.expr = exprNode_ifelse (yyvsp[-4].expr, yyvsp[-3].expr, yyvsp[0].expr); + ; + break;} +case 557: +#line 1536 "cgrammar.y" +{ context_enterSwitch (yyvsp[0].expr); ; + break;} +case 558: +#line 1537 "cgrammar.y" +{ yyval.expr = exprNode_switch (yyvsp[-3].expr, yyvsp[0].expr); ; + break;} +case 559: +#line 1541 "cgrammar.y" +{ yyval.expr = exprNode_whilePred (yyvsp[-1].expr); context_enterWhileClause (yyvsp[-1].expr); ; + break;} +case 560: +#line 1545 "cgrammar.y" +{ yyval.expr = exprNode_whilePred(yyvsp[-1].expr); ; + break;} +case 561: +#line 1548 "cgrammar.y" +{ context_enterIterClause (); ; + break;} +case 562: +#line 1549 "cgrammar.y" +{ setProcessingIterVars (yyvsp[-3].entry); ; + break;} +case 563: +#line 1552 "cgrammar.y" +{ + yyval.expr = exprNode_iter (yyvsp[-9].entry, yyvsp[-4].alist, yyvsp[-2].expr, yyvsp[-1].entry); + + ; + break;} +case 564: +#line 1558 "cgrammar.y" +{ yyval.alist = exprNodeList_singleton (yyvsp[0].expr); ; + break;} +case 565: +#line 1559 "cgrammar.y" +{ nextIterParam (); ; + break;} +case 566: +#line 1560 "cgrammar.y" +{ yyval.alist = exprNodeList_push (yyvsp[-3].alist, yyvsp[0].expr); ; + break;} +case 567: +#line 1563 "cgrammar.y" +{ yyval.expr = exprNode_iterExpr (yyvsp[0].expr); ; + break;} +case 568: +#line 1564 "cgrammar.y" +{ yyval.expr = exprNode_iterId (yyvsp[0].entry); ; + break;} +case 569: +#line 1565 "cgrammar.y" +{ uentry ue = coerceIterId (yyvsp[0].cname); + + if (uentry_isValid (ue)) + { + yyval.expr = exprNode_iterId (ue); + } + else + { + yyval.expr = exprNode_iterNewId (cstring_copy (LastIdentifier ())); + } + ; + break;} +case 570: +#line 1576 "cgrammar.y" +{ yyval.expr = exprNode_iterNewId (yyvsp[0].cname); ; + break;} +case 572: +#line 1584 "cgrammar.y" +{ yyval.expr = exprNode_addParens (yyvsp[-2].tok, yyvsp[-1].expr); ; + break;} +case 574: +#line 1588 "cgrammar.y" +{ yyval.expr = exprNode_arrayFetch (yyvsp[-3].expr, yyvsp[-1].expr); ; + break;} +case 575: +#line 1589 "cgrammar.y" +{ yyval.expr = exprNode_functionCall (yyvsp[-2].expr, exprNodeList_new ()); ; + break;} +case 576: +#line 1590 "cgrammar.y" +{ yyval.expr = exprNode_functionCall (yyvsp[-3].expr, yyvsp[-1].alist); ; + break;} +case 577: +#line 1592 "cgrammar.y" +{ yyval.expr = exprNode_vaArg (yyvsp[-5].tok, yyvsp[-3].expr, yyvsp[-1].qtyp); ; + break;} +case 578: +#line 1593 "cgrammar.y" +{ yyval.expr = exprNode_fieldAccess (yyvsp[-4].expr, yyvsp[-1].cname); ; + break;} +case 579: +#line 1594 "cgrammar.y" +{ yyval.expr = exprNode_arrowAccess (yyvsp[-4].expr, yyvsp[-1].cname); ; + break;} +case 580: +#line 1595 "cgrammar.y" +{ yyval.expr = exprNode_postOp (yyvsp[-1].expr, yyvsp[0].tok); ; + break;} +case 581: +#line 1596 "cgrammar.y" +{ yyval.expr = exprNode_postOp (yyvsp[-1].expr, yyvsp[0].tok); ; + break;} +case 583: +#line 1600 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 584: +#line 1601 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 585: +#line 1602 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 586: +#line 1603 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 587: +#line 1604 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 588: +#line 1605 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 589: +#line 1606 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 590: +#line 1607 "cgrammar.y" +{ yyval.expr = exprNode_preOp (yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 591: +#line 1608 "cgrammar.y" +{ yyval.expr = yyvsp[0].expr; ; + break;} +case 593: +#line 1612 "cgrammar.y" +{ yyval.expr = exprNode_cast (yyvsp[-3].tok, yyvsp[0].expr, yyvsp[-2].qtyp); ; + break;} +case 595: +#line 1616 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 596: +#line 1617 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 597: +#line 1618 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 599: +#line 1622 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 600: +#line 1623 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 602: +#line 1627 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 603: +#line 1628 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 605: +#line 1632 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 606: +#line 1633 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 607: +#line 1634 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 608: +#line 1635 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 610: +#line 1639 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 611: +#line 1640 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 613: +#line 1644 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 615: +#line 1648 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 617: +#line 1653 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 619: +#line 1657 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 621: +#line 1661 "cgrammar.y" +{ yyval.expr = exprNode_op (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 623: +#line 1665 "cgrammar.y" +{ context_enterTrueClause (yyvsp[-1].expr); ; + break;} +case 624: +#line 1666 "cgrammar.y" +{ context_enterFalseClause (yyvsp[-4].expr); ; + break;} +case 625: +#line 1667 "cgrammar.y" +{ yyval.expr = exprNode_cond (yyvsp[-6].expr, yyvsp[-3].expr, yyvsp[0].expr); ; + break;} +case 627: +#line 1671 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 628: +#line 1672 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 629: +#line 1673 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 630: +#line 1674 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 631: +#line 1675 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 632: +#line 1676 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 633: +#line 1677 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 634: +#line 1678 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 635: +#line 1679 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 636: +#line 1680 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 637: +#line 1681 "cgrammar.y" +{ yyval.expr = exprNode_assign (yyvsp[-2].expr, yyvsp[0].expr, yyvsp[-1].tok); ; + break;} +case 638: +#line 1684 "cgrammar.y" +{ yyval.entry = yyvsp[0].entry; ; + break;} +case 639: +#line 1685 "cgrammar.y" +{ yyval.entry = uentry_undefined; ; + break;} +case 640: +#line 1688 "cgrammar.y" +{ context_enterDoWhileClause (); yyval.tok = yyvsp[0].tok; ; + break;} +case 641: +#line 1692 "cgrammar.y" +{ yyval.expr = exprNode_while (yyvsp[-1].expr, yyvsp[0].expr); context_exitWhileClause (yyvsp[-1].expr, yyvsp[0].expr); ; + break;} +case 642: +#line 1694 "cgrammar.y" +{ yyval.expr = exprNode_statement (exprNode_doWhile (yyvsp[-5].expr, yyvsp[-2].expr), yyvsp[0].tok); ; + break;} +case 643: +#line 1696 "cgrammar.y" +{ yyval.expr = exprNode_for (yyvsp[-1].expr, yyvsp[0].expr); context_exitForClause (yyvsp[-1].expr, yyvsp[0].expr); ; + break;} +case 644: +#line 1699 "cgrammar.y" +{ yyval.expr = exprNode_while (yyvsp[-1].expr, yyvsp[0].expr); context_exitWhileClause (yyvsp[-1].expr, yyvsp[0].expr); ; + break;} +case 645: +#line 1701 "cgrammar.y" +{ yyval.expr = exprNode_statement (exprNode_doWhile (yyvsp[-5].expr, yyvsp[-2].expr), yyvsp[0].tok); ; + break;} +case 646: +#line 1703 "cgrammar.y" +{ yyval.expr = exprNode_doWhile (yyvsp[-4].expr, yyvsp[-1].expr); ; + break;} +case 647: +#line 1704 "cgrammar.y" +{ yyval.expr = exprNode_for (yyvsp[-1].expr, yyvsp[0].expr); context_exitForClause (yyvsp[-1].expr, yyvsp[0].expr); ; + break;} +case 648: +#line 1707 "cgrammar.y" +{ yyval.expr = exprNode_goto (yyvsp[-1].cname); ; + break;} +case 649: +#line 1708 "cgrammar.y" +{ yyval.expr = exprNode_continue (yyvsp[-1].tok, BADTOK); ; + break;} +case 650: +#line 1710 "cgrammar.y" +{ yyval.expr = exprNode_continue (yyvsp[-2].tok, QINNERCONTINUE); ; + break;} +case 651: +#line 1711 "cgrammar.y" +{ yyval.expr = exprNode_break (yyvsp[-1].tok, BADTOK); ; + break;} +case 652: +#line 1712 "cgrammar.y" +{ yyval.expr = exprNode_break (yyvsp[-1].tok, QSWITCHBREAK); ; + break;} +case 653: +#line 1713 "cgrammar.y" +{ yyval.expr = exprNode_break (yyvsp[-1].tok, QLOOPBREAK); ; + break;} +case 654: +#line 1714 "cgrammar.y" +{ yyval.expr = exprNode_break (yyvsp[-1].tok, QINNERBREAK); ; + break;} +case 655: +#line 1715 "cgrammar.y" +{ yyval.expr = exprNode_break (yyvsp[-1].tok, QSAFEBREAK); ; + break;} +case 656: +#line 1716 "cgrammar.y" +{ yyval.expr = exprNode_nullReturn (yyvsp[-1].tok); ; + break;} +case 657: +#line 1717 "cgrammar.y" +{ yyval.expr = exprNode_return (yyvsp[-1].expr); ; + break;} +case 659: +#line 1721 "cgrammar.y" +{ ; ; + break;} +case 662: +#line 1728 "cgrammar.y" +{ yyval.cname = uentry_getName (yyvsp[0].entry); ; + break;} +case 663: +#line 1729 "cgrammar.y" +{ yyval.cname = uentry_getName (yyvsp[0].entry); ; + break;} +case 664: +#line 1730 "cgrammar.y" +{ yyval.cname = uentry_getName (yyvsp[0].entry); ; + break;} +case 665: +#line 1731 "cgrammar.y" +{ yyval.cname = yyvsp[0].cname; ; + break;} +case 667: +#line 1735 "cgrammar.y" +{ yyval.ctyp = ctype_unknown; ; + break;} +} + /* the action file gets copied in in place of this dollarsign */ +#line 498 "/usr/share/misc/bison.simple" + + yyvsp -= yylen; + yyssp -= yylen; +#ifdef YYLSP_NEEDED + yylsp -= yylen; +#endif + +#if YYDEBUG != 0 + if (yydebug) + { + short *ssp1 = yyss - 1; + fprintf (stderr, "state stack now"); + while (ssp1 != yyssp) + fprintf (stderr, " %d", *++ssp1); + fprintf (stderr, "\n"); + } +#endif + + *++yyvsp = yyval; + +#ifdef YYLSP_NEEDED + yylsp++; + if (yylen == 0) + { + yylsp->first_line = yylloc.first_line; + yylsp->first_column = yylloc.first_column; + yylsp->last_line = (yylsp-1)->last_line; + yylsp->last_column = (yylsp-1)->last_column; + yylsp->text = 0; + } + else + { + yylsp->last_line = (yylsp+yylen-1)->last_line; + yylsp->last_column = (yylsp+yylen-1)->last_column; + } +#endif + + /* Now "shift" the result of the reduction. + Determine what state that goes to, + based on the state we popped back to + and the rule number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTBASE] + *yyssp; + if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTBASE]; + + goto yynewstate; + +yyerrlab: /* here on detecting error */ + + if (! yyerrstatus) + /* If not already recovering from an error, report this error. */ + { + ++yynerrs; + +#ifdef YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (yyn > YYFLAG && yyn < YYLAST) + { + int size = 0; + char *msg; + int x, count; + + count = 0; + /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + size += strlen(yytname[x]) + 15, count++; + msg = (char *) malloc(size + 15); + if (msg != 0) + { + strcpy(msg, "parse error"); + + if (count < 5) + { + count = 0; + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + { + strcat(msg, count == 0 ? ", expecting `" : " or `"); + strcat(msg, yytname[x]); + strcat(msg, "'"); + count++; + } + } + yyerror(msg); + free(msg); + } + else + yyerror ("parse error; also virtual memory exceeded"); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror("parse error"); + } + + goto yyerrlab1; +yyerrlab1: /* here on error raised explicitly by an action */ + + if (yyerrstatus == 3) + { + /* if just tried and failed to reuse lookahead token after an error, discard it. */ + + /* return failure if at end of input */ + if (yychar == YYEOF) + YYABORT; + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); +#endif + + yychar = YYEMPTY; + } + + /* Else will try to reuse lookahead token + after shifting the error token. */ + + yyerrstatus = 3; /* Each real token shifted decrements this */ + + goto yyerrhandle; + +yyerrdefault: /* current state does not do anything special for the error token. */ + +#if 0 + /* This is wrong; only states that explicitly want error tokens + should shift them. */ + yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ + if (yyn) goto yydefault; +#endif + +yyerrpop: /* pop the current state because it cannot handle the error token */ + + if (yyssp == yyss) YYABORT; + yyvsp--; + yystate = *--yyssp; +#ifdef YYLSP_NEEDED + yylsp--; +#endif + +#if YYDEBUG != 0 + if (yydebug) + { + short *ssp1 = yyss - 1; + fprintf (stderr, "Error: state stack now"); + while (ssp1 != yyssp) + fprintf (stderr, " %d", *++ssp1); + fprintf (stderr, "\n"); + } +#endif + +yyerrhandle: + + yyn = yypact[yystate]; + if (yyn == YYFLAG) + goto yyerrdefault; + + yyn += YYTERROR; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) + goto yyerrdefault; + + yyn = yytable[yyn]; + if (yyn < 0) + { + if (yyn == YYFLAG) + goto yyerrpop; + yyn = -yyn; + goto yyreduce; + } + else if (yyn == 0) + goto yyerrpop; + + if (yyn == YYFINAL) + YYACCEPT; + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Shifting error token, "); +#endif + + *++yyvsp = yylval; +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif + + yystate = yyn; + goto yynewstate; +} +#line 1737 "cgrammar.y" + + +/*@-redecl@*/ +extern char *yytext; +/*@=redecl@*/ + +# include "bison.reset" + +void yyerror (/*@unused@*/ char *s) +{ + static bool givehint = FALSE; + + if (context_inIterDef ()) + { + llerror (FLG_SYNTAX, message ("Iter syntax not parseable: %s", + context_inFunctionName ())); + } + else if (context_inIterEnd ()) + { + llerror (FLG_SYNTAX, message ("Iter finalizer syntax not parseable: %s", + context_inFunctionName ())); + } + else if (context_inMacro ()) + { + llerror (FLG_SYNTAX, message ("Macro syntax not parseable: %s", + context_inFunctionName ())); + + if (context_inMacroUnknown ()) + { + if (!givehint) + { + llhint (cstring_makeLiteral + ("Precede macro definition with /*@notfunction@*/ " + "to suppress checking and force expansion")); + givehint = TRUE; + } + } + + swallowMacro (); + } + else + { + llparseerror (cstring_undefined); + } +} + +void printState (idDecl t) { + cstring id = idDecl_getName (t); + uentry ue = usymtab_lookupSafe (id); + + sRef s = uentry_getSref (ue); + + printf("State = %d\n", s->bufinfo.bufstate); +} + + +/*take this out soon */ +/* void testassert1 (cstring id, icstring cons ) { */ + /* uentry ue =usymtab_lookupSafe (id); */ +/* sRef s = uentry_getSref (ue); */ +/* printf ("Doing testassert1 with setbuffersize\n"); */ +/* printf("State = %d\n", s->bufinfo.bufstate); */ +/* } */ +/* void testassert2 (cstring id) { */ +/* uentry ue =usymtab_lookupSafe (id); */ +/* sRef s = uentry_getSref (ue); */ +/* printf ("Doing testassert2 with setbuffersize\n"); */ +/* printf("State = %d\n", s->bufinfo.bufstate); */ +/* } */ + + + + + + diff --git a/src/constraintExpr.c b/src/constraintExpr.c new file mode 100644 index 0000000..91187a8 --- /dev/null +++ b/src/constraintExpr.c @@ -0,0 +1,1257 @@ +/* +** constraintExpr.c +*/ + +//#define DEBUGPRINT 1 + +# include "lclintMacros.nf" +# include "basic.h" +# include "cgrammar.h" +# include "cgrammar_tokens.h" + +# include "exprChecks.h" +# include "aliasChecks.h" +# include "exprNodeSList.h" + + +# include "exprData.i" +# include "exprDataQuite.i" + + +/*@-czechfcns@*/ + +#include "constraintExpr.h" + + + + +constraintExpr constraintExpr_parseMakeBinaryOp (constraintExpr expr1, lltok op, constraintExpr expr2); + +constraintExpr constraintExpr_makeMaxSetConstraintExpr (constraintExpr c); + +bool constraintExpr_isLit (constraintExpr expr) +{ + llassert (expr); + + if (expr->kind == term) + { + constraintTerm term = constraintExprData_termGetTerm (expr->data); + if (constraintTerm_isIntLiteral (term) ) + { + return TRUE; + } + + } + return FALSE; +} + + +constraintExpr constraintExpr_propagateConstants (constraintExpr expr, + /*@out@*/ bool * propagate, + /*@out@*/ int *literal) +{ + constraintExpr expr1; + constraintExpr expr2; + bool propagate1, propagate2; + int literal1, literal2; + + propagate1 = FALSE; + propagate2 = FALSE; + + literal1 = 0; + literal2 = 0; + + *propagate = FALSE; + *literal = 0; + + llassert (expr); + + // we simplify unaryExpr else where + if (expr->kind == unaryExpr) + return expr; + + if (expr->kind == term) + return expr; + + if (constraintExpr_isLit (expr) ) + return expr; + + BPRINTF( (message("constraintExpr_propagateConstants: binaryexpr: %s", constraintExpr_unparse(expr) ) ) ); + + expr1 = constraintExprData_binaryExprGetExpr1(expr->data); + expr2 = constraintExprData_binaryExprGetExpr2(expr->data); + + expr1 = constraintExpr_propagateConstants (expr1, &propagate1, &literal1); + expr2 = constraintExpr_propagateConstants (expr2, &propagate2, &literal2); + + expr->data = constraintExprData_binaryExprSetExpr1 (expr->data, expr1); + expr->data = constraintExprData_binaryExprSetExpr2 (expr->data, expr2); + + *propagate = propagate1 || propagate2; + *literal = literal1 + literal2; + + if ( constraintExpr_isLit (expr1) && constraintExpr_isLit (expr2) ) + { + int t1, t2; + t1 = constraintExpr_getValue (expr1); + t2 = constraintExpr_getValue (expr2); + *propagate = FALSE; + if (constraintExprData_binaryExprGetOp (expr->data) == PLUS ) + return (constraintExpr_makeIntLiteral ( (t1+t2) )); + else if (constraintExprData_binaryExprGetOp (expr->data) == MINUS) + return (constraintExpr_makeIntLiteral ( (t1-t2) )); + else + llassert(FALSE); + } + + if (constraintExpr_isLit (expr1) ) + { + /*@i334*/ + /*handle MINUS case right */ + *propagate = TRUE; + *literal += constraintExpr_getValue (expr1); + return expr2; + } + + + if (constraintExpr_isLit (expr2) ) + { + *propagate = TRUE; + + if (constraintExprData_binaryExprGetOp (expr->data) == PLUS ) + *literal += constraintExpr_getValue (expr2); + else + *literal -= constraintExpr_getValue (expr2); + return expr1; + } + + + + BPRINTF( (message("constraintExpr_propagateConstants returning: %s", constraintExpr_unparse(expr) ) ) ); + + return expr; +} + +constraintExpr constraintExpr_combineConstants (constraintExpr expr ) +{ + bool propagate; + int literal; + + BPRINTF ( (message ("Before combine %s", constraintExpr_unparse(expr) ) ) ); + expr = constraintExpr_propagateConstants (expr, &propagate, &literal); + + + if (propagate) + { + constraintExpr ret; + + if (literal != 0) + { + ret = constraintExpr_makeBinaryOpConstraintExprIntLiteral (expr, literal); + expr = ret; + } + } + BPRINTF ( (message ("After combine %s", constraintExpr_unparse(expr) ) ) ); + return expr; +} + +constraintExpr constraintExpr_alloc (void) +{ + constraintExpr ret; + ret = dmalloc (sizeof (*ret) ); + ret->kind = term; + ret->data = NULL; + return ret; +} + + +constraintExpr constraintExpr_copy (constraintExpr expr) +{ + constraintExpr ret; + ret = constraintExpr_alloc(); + ret->kind = expr->kind; + ret->data = constraintExprData_copy (expr->data, expr->kind); + return ret; +} + + +constraintExpr oldconstraintExpr_makeTermExprNode (exprNode e) +{ + constraintExpr ret; + constraintTerm t; + ret = constraintExpr_alloc(); + ret->kind = term; + ret->data = dmalloc (sizeof *(ret->data) ); + t = constraintTerm_makeExprNode (e); + ret->data = constraintExprData_termSetTerm (ret->data, t); + return ret; +} + +constraintExpr constraintExpr_makeExprNode (exprNode e) +{ + sRef s; + constraintExpr ret, ce1, ce2; + exprData data; + exprNode t, t1, t2; + lltok tok; + + + llassert (e); + + data = e->edata; + + switch (e->kind) + { + case XPR_SIZEOF: + t = exprData_getSingle (data); + s = exprNode_getSref (t); + if (sRef_isFixedArray(s) ) + { + int size; + + size = sRef_getArraySize(s); + ret = constraintExpr_makeIntLiteral (size); + } + else + { + BPRINTF ((message ("could not determine the size of %s", exprNode_unparse (e) ) ) ); + ret = oldconstraintExpr_makeTermExprNode (e); + } + break; + + case XPR_OP: + BPRINTF ((message ("Examining operation %s", exprNode_unparse (e) ) ) ); + t1 = exprData_getOpA (data); + t2 = exprData_getOpB (data); + tok = exprData_getOpTok (data); + + if (lltok_isPlus_Op (tok) || lltok_isMinus_Op (tok) ) + { + ce1 = constraintExpr_makeExprNode (t1); + ce2 = constraintExpr_makeExprNode (t2); + ret = constraintExpr_parseMakeBinaryOp (ce1, tok, ce2); + } + else + { + ret = oldconstraintExpr_makeTermExprNode (e); + } + break; + case XPR_PARENS: + t = exprData_getUopNode (data); + ret = constraintExpr_makeExprNode (t); + break; + + case XPR_PREOP: + t = exprData_getUopNode (data); + tok = exprData_getUopTok (data); + if (lltok_isInc_Op (tok) ) + { + constraintExpr temp; + temp = constraintExpr_makeExprNode(t); + ret = constraintExpr_makeIncConstraintExpr(temp); + } + else if (lltok_isDec_Op (tok) ) + { + constraintExpr temp; + temp = constraintExpr_makeExprNode(t); + ret = constraintExpr_makeDecConstraintExpr(temp); + } + else + ret = oldconstraintExpr_makeTermExprNode (e); + break; + + case XPR_POSTOP: + t = exprData_getUopNode (data); + ret = constraintExpr_makeExprNode (t); + break; + default: + ret = oldconstraintExpr_makeTermExprNode (e); + + } + return ret; +} + + +constraintExpr constraintExpr_makeTermExprNode (exprNode e) +{ + return oldconstraintExpr_makeTermExprNode(e); //constraintExpr_makeExprNode (e); +} + + +constraintExpr constraintExpr_makeTermsRef (sRef s) +{ + constraintExpr ret; + constraintTerm t; + ret = constraintExpr_alloc(); + ret->kind = term; + ret->data = dmalloc (sizeof *(ret->data) ); + t = constraintTerm_makesRef (s); + ret->data = constraintExprData_termSetTerm (ret->data, t); + return ret; +} + +constraintExpr constraintExpr_makeUnaryOp (void) +{ + constraintExpr ret; + ret = constraintExpr_alloc(); + ret->kind = unaryExpr; + ret->data = dmalloc ( sizeof *(ret->data) ); + return ret; +} + +constraintExpr constraintExpr_makeUnaryOpConstraintExpr (constraintExpr cexpr) +{ + constraintExpr ret; + ret = constraintExpr_makeUnaryOp(); + ret->data = constraintExprData_unaryExprSetExpr (ret->data, cexpr); + return ret; +} + +constraintExpr constraintExpr_makeMaxSetConstraintExpr (constraintExpr c) +{ + constraintExpr ret; + ret = constraintExpr_makeUnaryOpConstraintExpr (c); + ret->data = constraintExprData_unaryExprSetOp (ret->data, MAXSET); + return ret; +} + +constraintExpr constraintExpr_makeUnaryOpExprNode (exprNode expr) +{ + constraintExpr ret; + constraintExpr sub; + sub = constraintExpr_makeExprNode (expr); + ret = constraintExpr_makeUnaryOpConstraintExpr(sub); + return ret; +} + + + +constraintExpr constraintExpr_makeSRefUnaryOp (sRef s, constraintExprUnaryOpKind op) +{ + constraintExpr ret; + constraintExpr t; + + t = constraintExpr_makeTermsRef (s); + ret = constraintExpr_makeUnaryOpConstraintExpr (t); + ret->data = constraintExprData_unaryExprSetOp (ret->data, op); + return ret; +} + +constraintExpr constraintExpr_makeSRefMaxset (sRef s) +{ + return (constraintExpr_makeSRefUnaryOp (s, MAXSET) ); +} + +constraintExpr constraintExpr_parseMakeUnaryOp (lltok op, constraintExpr cexpr) +{ + constraintExpr ret; + ret = constraintExpr_makeUnaryOpConstraintExpr ( cexpr); + + switch (op.tok) + { + case QMAXSET: + ret->data = constraintExprData_unaryExprSetOp (ret->data, MAXSET); + break; + case QMAXREAD: + ret->data = constraintExprData_unaryExprSetOp (ret->data, MAXREAD); + break; + default: + llfatalbug("Unhandled Operation in Constraint"); + } + return ret; +} + +constraintExpr constraintExpr_makeMaxSetExpr (exprNode expr) +{ + constraintExpr ret; + ret = constraintExpr_makeExprNode (expr); + + ret = constraintExpr_makeMaxSetConstraintExpr (ret); + + llassert (ret); + return ret; +} + +constraintExpr constraintExpr_makeMaxReadExpr (exprNode expr) +{ + constraintExpr ret; + ret = constraintExpr_makeUnaryOpExprNode(expr); + ret->data = constraintExprData_unaryExprSetOp (ret->data, MAXREAD); + return ret; +} + +constraintExpr constraintExpr_makeMinSetExpr (exprNode expr) +{ + constraintExpr ret; + ret = constraintExpr_makeUnaryOpExprNode(expr); + ret->data = constraintExprData_unaryExprSetOp (ret->data, MINSET); + return ret; +} + +constraintExpr constraintExpr_makeMinReadExpr (exprNode expr) +{ + constraintExpr ret; + ret = constraintExpr_makeUnaryOpExprNode(expr); + ret->data = constraintExprData_unaryExprSetOp (ret->data, MINREAD); + return ret; +} + + +constraintExpr constraintExpr_makeValueExpr (exprNode expr) +{ + constraintExpr ret; + ret = constraintExpr_makeExprNode (expr); + return ret; +} + +constraintExpr constraintExpr_makeIntLiteral (int i) +{ + constraintExpr ret; + constraintTerm t; + ret = constraintExpr_alloc(); + ret->kind = term; + ret->data = dmalloc (sizeof *(ret->data) ); + t = constraintTerm_makeIntLiteral (i); + ret->data = constraintExprData_termSetTerm (ret->data, t); + return ret; +} + + +constraintExpr constraintExpr_makeValueInt (int i) +{ + return constraintExpr_makeIntLiteral (i); +} + +static constraintExpr constraintExpr_makeBinaryOp (void) +{ + constraintExpr ret; + ret = constraintExpr_alloc(); + ret->kind = binaryexpr; + ret->data = dmalloc ( sizeof *(ret->data) ); + ret->data = constraintExprData_binaryExprSetOp (ret->data, PLUS); + return ret; +} + + +constraintExpr constraintExpr_makeBinaryOpConstraintExpr (constraintExpr expr1,constraintExpr expr2) + +{ + constraintExpr ret; + ret = constraintExpr_makeBinaryOp(); + ret->data = constraintExprData_binaryExprSetExpr1 (ret->data, expr1); + ret->data = constraintExprData_binaryExprSetExpr2 (ret->data, expr2); + return ret; +} + +constraintExpr constraintExpr_parseMakeBinaryOp (constraintExpr expr1, lltok op, constraintExpr expr2) +{ + constraintExpr ret; + ret = constraintExpr_makeBinaryOpConstraintExpr (expr1, expr2); + if (op.tok == TPLUS) + ret->data = constraintExprData_binaryExprSetOp(ret->data, PLUS); + else if (op.tok == TMINUS) + ret->data = constraintExprData_binaryExprSetOp(ret->data, MINUS); + else + { + llassert(FALSE); + } + return ret; +} + +constraintExpr constraintExpr_makeBinaryOpExprNode (exprNode expr1, exprNode expr2) +{ + constraintExpr ret; + constraintExpr sub1, sub2; + sub1 = constraintExpr_makeTermExprNode (expr1); + sub2 = constraintExpr_makeTermExprNode (expr2); + ret = constraintExpr_makeBinaryOpConstraintExpr(sub1, sub2); + return ret; +} + +constraintExpr constraintExpr_makeBinaryOpConstraintExprIntLiteral (constraintExpr expr, int literal) +{ + constraintExpr ret; + constraintExpr constExpr; + + constExpr = constraintExpr_makeIntLiteral (literal); + ret = constraintExpr_makeBinaryOpConstraintExpr (expr, constExpr); + ret->data = constraintExprData_binaryExprSetOp(ret->data, PLUS); + return ret; +} + +constraintExpr constraintExpr_makeDecConstraintExpr (constraintExpr expr) +{ + constraintExpr ret; + constraintExpr inc; + + inc = constraintExpr_makeIntLiteral (1); + ret = constraintExpr_makeBinaryOpConstraintExpr (expr, inc); + ret->data = constraintExprData_binaryExprSetOp(ret->data, MINUS); + return ret; +} + +constraintExpr constraintExpr_makeAddConstraintExpr (constraintExpr expr, constraintExpr add) +{ + constraintExpr ret; + + ret = constraintExpr_makeBinaryOpConstraintExpr (expr, add); + + ret->data = constraintExprData_binaryExprSetOp(ret->data, PLUS); + + return ret; +} + +constraintExpr constraintExpr_makeIncConstraintExpr (constraintExpr expr) +{ + constraintExpr ret; + constraintExpr inc; + + inc = constraintExpr_makeIntLiteral (1); + ret = constraintExpr_makeBinaryOpConstraintExpr (expr, inc); + ret->data = constraintExprData_binaryExprSetOp(ret->data, PLUS); + return ret; +} + +cstring constraintExprUnaryOpKind_print (constraintExprUnaryOpKind op) +{ + switch (op) + { + case MAXSET: + return message("MAXSET"); + case MINSET: + return message("MINSET"); + case MAXREAD: + return message("MAXREAD"); + case MINREAD: + return message("MINREAD"); + default: + llassert(FALSE); + return message ("<(Unary OP OTHER>"); + } +} + + +cstring constraintExprBinaryOpKind_print (constraintExprBinaryOpKind op) +{ + + switch (op) + { + case PLUS: + return message("+"); + case MINUS: + return message("-"); + } + llassert(FALSE); + return message (""); +} + +bool constraintExpr_similar (constraintExpr expr1, constraintExpr expr2) +{ + constraintExprKind kind; + + llassert (expr1 != NULL); + llassert (expr2 != NULL); + if (expr1->kind != expr2->kind) + return FALSE; + + kind = expr1->kind; + + switch (kind) + { + case term: + return constraintTerm_similar (constraintExprData_termGetTerm(expr1->data), + constraintExprData_termGetTerm(expr2->data) ); + break; + + case unaryExpr: + if (constraintExprData_unaryExprGetOp (expr1->data) != constraintExprData_unaryExprGetOp (expr2->data) ) + return FALSE; + + return (constraintExpr_similar ( + constraintExprData_unaryExprGetExpr (expr1->data), + constraintExprData_unaryExprGetExpr (expr2->data) + )); + + case binaryexpr: + if (constraintExprData_binaryExprGetOp (expr1->data) != constraintExprData_binaryExprGetOp (expr2->data) ) + return FALSE; + + if (! constraintExpr_similar (constraintExprData_binaryExprGetExpr1 (expr1->data), + constraintExprData_binaryExprGetExpr1 (expr2->data)) ) + return FALSE; + + if (! constraintExpr_similar (constraintExprData_binaryExprGetExpr2 (expr1->data), + constraintExprData_binaryExprGetExpr2 (expr2->data)) ) + return FALSE; + else + return TRUE; + /*@notreached@*/ + break; + + default: + llassert(FALSE); + return FALSE; + } + /*@notreached@*/ + return FALSE; +} + +bool constraintExpr_same (constraintExpr expr1, constraintExpr expr2) +{ + constraintExprKind kind; + + llassert (expr1 != NULL); + llassert (expr2 != NULL); + if (expr1->kind != expr2->kind) + return FALSE; + + kind = expr1->kind; + + switch (kind) + { + case term: + return constraintTerm_similar (constraintExprData_termGetTerm(expr1->data), + constraintExprData_termGetTerm(expr2->data) ); + break; + + case unaryExpr: + if (constraintExprData_unaryExprGetOp (expr1->data) != constraintExprData_unaryExprGetOp (expr2->data) ) + return FALSE; + + return (constraintExpr_same ( + constraintExprData_unaryExprGetExpr (expr1->data), + constraintExprData_unaryExprGetExpr (expr2->data) + )); + + + case binaryexpr: + if (constraintExprData_binaryExprGetOp (expr1->data) != constraintExprData_binaryExprGetOp (expr2->data) ) + return FALSE; + + if (! constraintExpr_same (constraintExprData_binaryExprGetExpr1 (expr1->data), + constraintExprData_binaryExprGetExpr1 (expr2->data)) ) + return FALSE; + + if (! constraintExpr_same (constraintExprData_binaryExprGetExpr2 (expr1->data), + constraintExprData_binaryExprGetExpr2 (expr2->data)) ) + return FALSE; + else + return TRUE; + break; + + default: + llassert(FALSE); + return FALSE; + } + + /*@notreached@*/ + BADEXIT; +} + +bool constraintExpr_search (constraintExpr c, constraintExpr old) +{ + bool ret = FALSE; + constraintExprKind kind; + constraintExpr temp; + + if ( constraintExpr_similar (c, old) ) + { + #warning mem leak + DPRINTF((message ("Found %s", + constraintExpr_unparse(old) + ))); + return TRUE; + } + + kind = c->kind; + + switch (kind) + { + case term: + break; + case unaryExpr: + temp = constraintExprData_unaryExprGetExpr (c->data); + ret = ret || constraintExpr_search (temp, old); + break; + case binaryexpr: + + temp = constraintExprData_binaryExprGetExpr1 (c->data); + ret = ret || constraintExpr_search(temp, old); + + temp = constraintExprData_binaryExprGetExpr2 (c->data); + ret = ret || constraintExpr_search(temp, old); + break; + default: + llassert(FALSE); + } + return ret; + +} + + +constraintExpr constraintExpr_searchandreplace (constraintExpr c, constraintExpr old, constraintExpr new ) +{ + constraintExprKind kind; + constraintExpr temp; + + if ( constraintExpr_similar (c, old) ) + { + #warning mem leak + BPRINTF((message ("Replacing %s with %s", + constraintExpr_unparse(old), constraintExpr_unparse(new) + ))); + return constraintExpr_copy (new); + } + + kind = c->kind; + + switch (kind) + { + case term: + break; + case unaryExpr: + temp = constraintExprData_unaryExprGetExpr (c->data); + temp = constraintExpr_searchandreplace (temp, old, new); + c->data = constraintExprData_unaryExprSetExpr (c->data, temp); + break; + case binaryexpr: + + temp = constraintExprData_binaryExprGetExpr1 (c->data); + temp = constraintExpr_searchandreplace (temp, old, new); + c->data = constraintExprData_binaryExprSetExpr1 (c->data, temp); + + temp = constraintExprData_binaryExprGetExpr2 (c->data); + temp = constraintExpr_searchandreplace (temp, old, new); + c->data = constraintExprData_binaryExprSetExpr2 (c->data, temp); + break; + default: + llassert(FALSE); + } + return c; + +} + +constraintExpr constraintExpr_simplifyChildren (constraintExpr c) +{ + constraintExprKind kind; + constraintExpr temp; + + kind = c->kind; + + switch (kind) + { + case term: + break; + case unaryExpr: + temp = constraintExprData_unaryExprGetExpr (c->data); + temp = constraintExpr_simplify (temp); + c->data = constraintExprData_unaryExprSetExpr (c->data, temp); + break; + case binaryexpr: + BPRINTF((message("constraintExpr_simplfiyChildren: simplify binary expression: %s",constraintExpr_unparse(c) ) ) ); + temp = constraintExprData_binaryExprGetExpr1 (c->data); + temp = constraintExpr_simplify (temp); + + c->data = constraintExprData_binaryExprSetExpr1 (c->data, temp); + + temp = constraintExprData_binaryExprGetExpr2 (c->data); + temp = constraintExpr_simplify (temp); + + c->data = constraintExprData_binaryExprSetExpr2 (c->data, temp); + break; + default: + llassert(FALSE); + } + return c; + +} + + +constraintExpr constraintExpr_setFileloc (constraintExpr c, fileloc loc) +{ + constraintTerm t; + constraintExpr temp; + + llassert(c); + + switch (c->kind) + { + case term: + t = constraintExprData_termGetTerm (c->data); + t = constraintTerm_setFileloc (t, loc); + c->data = constraintExprData_termSetTerm (c->data, t); + break; + case binaryexpr: + + temp = constraintExprData_binaryExprGetExpr1 (c->data); + temp = constraintExpr_setFileloc (temp, loc); + c->data = constraintExprData_binaryExprSetExpr1 (c->data, temp); + + temp = constraintExprData_binaryExprGetExpr2 (c->data); + temp = constraintExpr_setFileloc (temp, loc); + c->data = constraintExprData_binaryExprSetExpr2 (c->data, temp); + break; + case unaryExpr: + temp = constraintExprData_unaryExprGetExpr (c->data); + temp = constraintExpr_setFileloc (temp, loc); + c->data = constraintExprData_unaryExprSetExpr (c->data, temp); + break; + } + return c; +} + +constraintExpr constraintExpr_simplifybinaryExpr (constraintExpr c) +{ + constraintExpr e1, e2; + + e1 = constraintExprData_binaryExprGetExpr1 (c->data); + e2 = constraintExprData_binaryExprGetExpr2 (c->data); + + if (constraintExpr_canGetValue (e1) && constraintExpr_canGetValue(e2) ) + { + int i; + + i = constraintExpr_getValue(e1) + constraintExpr_getValue (e2); + + c = constraintExpr_makeIntLiteral (i); + + } + return c; +} + + +constraintExpr constraintExpr_subtractExpr (constraintExpr expr, constraintExpr addent) +{ + constraintExpr new; + + BPRINTF ( (message ("Doing subtraceTerm simplification") ) ); + + new = constraintExpr_makeBinaryOpConstraintExpr (expr, addent); + new->data = constraintExprData_binaryExprSetOp (new->data, MINUS); + return new; +} + +constraintExpr constraintExpr_addExpr (constraintExpr expr, constraintExpr addent) +{ + constraintExpr new; + + BPRINTF ( (message ("Doing addTerm simplification") ) ); + + new = constraintExpr_makeBinaryOpConstraintExpr (expr, addent); + new->data = constraintExprData_binaryExprSetOp (new->data, PLUS); + return new; +} + +constraintExpr constraintExpr_solveBinaryExpr (constraintExpr lexpr, constraintExpr expr) +{ + constraintExpr expr1, expr2; + constraintExprBinaryOpKind op; + + if (lexpr->kind != binaryexpr) + return expr; + + expr2 = constraintExprData_binaryExprGetExpr2 (lexpr->data); + expr1 = constraintExprData_binaryExprGetExpr1 (lexpr->data); + op = constraintExprData_binaryExprGetOp (lexpr->data); + + + // if (constraintExpr_canGetValue (expr2) ) + { + #warning make sure this works + + lexpr->kind = expr1->kind; + lexpr->data = constraintExprData_copy (expr1->data, expr1->kind); + + + if (op == PLUS) + expr = constraintExpr_subtractExpr (expr, expr2); + else + expr = constraintExpr_addExpr (expr, expr2); + + return expr; + } + expr = constraintExpr_solveBinaryExpr (expr1, expr); + + expr = constraintExpr_solveBinaryExpr (expr2, expr); + return expr; +} + +constraintExpr constraintExpr_simplifyunaryExpr (constraintExpr c) +{ + constraintExpr exp; + + llassert (c->kind == unaryExpr); + + BPRINTF ( (message ("Doing constraintExpr_simplifyunaryExpr:%s", constraintExpr_unparse (c) ) ) ); + + if ( (constraintExprData_unaryExprGetOp (c->data) != MAXSET) && + (constraintExprData_unaryExprGetOp (c->data) != MAXREAD) ) + { + return c; + } + // pattern mxr ( var + const) = mxr(var) - const + + exp = constraintExprData_unaryExprGetExpr (c->data); + + if (exp->kind == term) + { + constraintTerm cterm; + + cterm = constraintExprData_termGetTerm (exp->data); + + if (constraintTerm_isStringLiteral(cterm) ) + { + cstring val; + val = constraintTerm_getStringLiteral (cterm); + if (constraintExprData_unaryExprGetOp (c->data) == MAXSET) + { + return constraintExpr_makeIntLiteral (strlen (val) ); + } + if (constraintExprData_unaryExprGetOp (c->data) == MAXREAD) + { + return constraintExpr_makeIntLiteral (strlen (val) ); + } + BADEXIT; + } + return c; + } + + if (exp->kind != binaryexpr) + return c; + + if (constraintExprData_binaryExprGetOp (exp->data) == PLUS ) + { + + // if (constraintExpr_canGetValue (constraintExprData_binaryExprGetExpr2 (exp->data) ) ) + { + + constraintExpr temp, temp2, new; + + DPRINTF ( (message ("Doing fancy simplification") ) ); + + temp = constraintExprData_binaryExprGetExpr2 (exp->data); + + temp2 = constraintExprData_binaryExprGetExpr1 (exp->data); + c->data = constraintExprData_unaryExprSetExpr (c->data, temp2); + + + + new = constraintExpr_subtractExpr (c, temp); + + DPRINTF ( (message ("Done fancy simplification:%s", constraintExpr_unparse (new) ) ) ); + + c = new; + } + } + + DPRINTF ( (message ("Done simplification:%s", constraintExpr_unparse (c) ) ) ); + return c; +} + + +constraintExpr constraintExpr_simplify (constraintExpr c) +{ + constraintExprKind kind; + constraintTerm t; + + + BPRINTF ( (message ("Doing constraintExpr_simplify:%s", constraintExpr_unparse (c) ) ) ); + + c = constraintExpr_simplifyChildren (c); + c = constraintExpr_combineConstants (c); + c = constraintExpr_simplifyChildren (c); + + kind = c->kind; + + switch (kind) + { + case term: + t = constraintExprData_termGetTerm (c->data); + t = constraintTerm_simplify (t); + c->data = constraintExprData_termSetTerm (c->data, t); + break; + case unaryExpr: + c = constraintExpr_simplifyunaryExpr (c); + break; + case binaryexpr: + c = constraintExpr_simplifybinaryExpr (c); + break; + default: + llassert(FALSE); + } + return c; + +} + +cstring constraintExpr_unparse (constraintExpr ex) +{ + cstring st; + constraintExprKind kind; + + llassert (ex != NULL); + + kind = ex->kind; + + switch (kind) + { + case term: + st = message ("(%s) ", constraintTerm_print (constraintExprData_termGetTerm(ex->data) ) ); + break; + case unaryExpr: + st = message ("%s (%s)", + constraintExprUnaryOpKind_print (constraintExprData_unaryExprGetOp (ex->data) + ), + constraintExpr_unparse (constraintExprData_unaryExprGetExpr (ex->data) ) + ); + break; + case binaryexpr: + st = message ("(%s) %s (%s)", + constraintExpr_unparse (constraintExprData_binaryExprGetExpr1 (ex->data) ), + constraintExprBinaryOpKind_print (constraintExprData_binaryExprGetOp (ex->data) + ), + constraintExpr_unparse (constraintExprData_binaryExprGetExpr2 (ex->data) ) + ); + break; + default: + llassert(FALSE); + st = message ("error"); + + } + + DPRINTF((message ("constraintExpr_unparse: '%s'",st) ) ); + return st; +} + +constraintExpr constraintExpr_doSRefFixBaseParam (/*@returned@*/ constraintExpr expr, exprNodeList arglist) +{ + constraintTerm Term; + constraintExprKind kind; + constraintExpr expr1, expr2; + constraintExprData data; + llassert (expr != NULL); + + data = expr->data; + + kind = expr->kind; + + switch (kind) + { + case term: + Term = constraintExprData_termGetTerm(data); + Term = constraintTerm_doSRefFixBaseParam (Term, arglist); + data = constraintExprData_termSetTerm(data, Term); + break; + case unaryExpr: + expr1 = constraintExprData_unaryExprGetExpr (data); + expr1 = constraintExpr_doSRefFixBaseParam (expr1, arglist); + data = constraintExprData_unaryExprSetExpr (data, expr1); + break; + case binaryexpr: + expr1 = constraintExprData_binaryExprGetExpr1 (data); + expr2 = constraintExprData_binaryExprGetExpr2 (data); + + expr1 = constraintExpr_doSRefFixBaseParam (expr1, arglist); + data = constraintExprData_binaryExprSetExpr1 (data, expr1); + expr2 = constraintExpr_doSRefFixBaseParam (expr2, arglist); + data = constraintExprData_binaryExprSetExpr2 (data, expr2); + + break; + default: + llassert(FALSE); + data = NULL; + } + return expr; +} + +constraintExpr constraintExpr_doSRefFixConstraintParam (/*@returned@*/ constraintExpr expr, exprNodeList arglist) +{ + constraintExprKind kind; + constraintExpr expr1, expr2; + constraintExprData data; + llassert (expr != NULL); + + data = expr->data; + + kind = expr->kind; + + switch (kind) + { + case term: + expr = constraintTerm_doSRefFixConstraintParam (expr, arglist); + break; + case unaryExpr: + expr1 = constraintExprData_unaryExprGetExpr (data); + expr1 = constraintExpr_doSRefFixConstraintParam (expr1, arglist); + data = constraintExprData_unaryExprSetExpr (data, expr1); + break; + case binaryexpr: + expr1 = constraintExprData_binaryExprGetExpr1 (data); + expr2 = constraintExprData_binaryExprGetExpr2 (data); + + expr1 = constraintExpr_doSRefFixConstraintParam (expr1, arglist); + data = constraintExprData_binaryExprSetExpr1 (data, expr1); + expr2 = constraintExpr_doSRefFixConstraintParam (expr2, arglist); + data = constraintExprData_binaryExprSetExpr2 (data, expr2); + + break; + default: + llassert(FALSE); + data = NULL; + } + return expr; +} + +constraintExpr constraintExpr_doFixResult (/*@returned@*/ constraintExpr expr, exprNode fcnCall) +{ + constraintExprKind kind; + constraintExpr expr1, expr2; + constraintExprData data; + llassert (expr != NULL); + + data = expr->data; + + kind = expr->kind; + + switch (kind) + { + case term: + expr = constraintTerm_doFixResult (expr, fcnCall); + break; + case unaryExpr: + expr1 = constraintExprData_unaryExprGetExpr (data); + expr1 = constraintExpr_doFixResult (expr1, fcnCall); + data = constraintExprData_unaryExprSetExpr (data, expr1); + break; + case binaryexpr: + expr1 = constraintExprData_binaryExprGetExpr1 (data); + expr2 = constraintExprData_binaryExprGetExpr2 (data); + + expr1 = constraintExpr_doFixResult (expr1, fcnCall); + data = constraintExprData_binaryExprSetExpr1 (data, expr1); + expr2 = constraintExpr_doFixResult (expr2, fcnCall); + data = constraintExprData_binaryExprSetExpr2 (data, expr2); + + break; + default: + llassert(FALSE); + data = NULL; + } + return expr; +} + +cstring constraintExpr_print (constraintExpr expr) +{ + return constraintExpr_unparse(expr); +} + +bool constraintExpr_hasMaxSet (constraintExpr expr) +{ + cstring t; + + t = constraintExpr_unparse(expr); + + return (strstr (t, "MAXSET") ); +} + + + + /*returns 1 0 -1 like strcmp + 1 => expr1 > expr2 + 0 => expr1 == expr2 + -1 => expr1 < expr2 + */ +int constraintExpr_compare (constraintExpr expr1, constraintExpr expr2) +{ + int value1, value2; + + if (constraintExpr_similar (expr1, expr2) ) + { + return 0; + } + value1 = constraintExpr_getValue(expr1); + value2 = constraintExpr_getValue(expr2); + + if (value1 > value2) + return 1; + + if (value1 == value2) + return 0; + + else + return -1; +} + +int constraintExpr_getValue (constraintExpr expr) +{ + llassert (expr->kind == term); + return (constraintTerm_getValue (constraintExprData_termGetTerm (expr->data) ) ); +} + +bool constraintExpr_canGetValue (constraintExpr expr) +{ + switch (expr->kind) + { + case term: + return constraintTerm_canGetValue (constraintExprData_termGetTerm (expr->data) ); + default: + return FALSE; + + } + llassert(FALSE); +} + +bool constraintExpr_canCompare (constraintExpr expr1, constraintExpr expr2) +{ + + llassert(expr1 && expr2); + return ( constraintExpr_canGetValue(expr1) && + constraintExpr_canGetValue(expr2) + ); +} + + +fileloc constraintExpr_getFileloc (constraintExpr expr) +{ + constraintExpr e; +constraintTerm t; + constraintExprKind kind; + + kind = expr->kind; + + switch (kind) + { + case term: + t = constraintExprData_termGetTerm (expr->data); + return (constraintTerm_getFileloc (t) ); + break; + case unaryExpr: + e = constraintExprData_unaryExprGetExpr (expr->data); + return (constraintExpr_getFileloc (e) ); + break; + case binaryexpr: + e = constraintExprData_binaryExprGetExpr1 (expr->data); + return (constraintExpr_getFileloc (e) ); + } + llassert (FALSE); + // llfatalbug("Code should be reached"); + return (fileloc_undefined); +} + + + +/* bool constraintExpr_includesTerm (constraintExpr expr, constraintTerm term) */ +/* { */ +/* if (constraintTerm_hasTerm (expr->term, term) ) */ +/* return TRUE; */ + +/* if ( (expr->expr) != NULL) */ +/* { */ +/* return ( constraintExpr_includesTerm (expr->expr, term) ); */ +/* } */ +/* return FALSE; */ + +/* } */ + + + + diff --git a/src/constraintExprData.c b/src/constraintExprData.c new file mode 100644 index 0000000..4391b87 --- /dev/null +++ b/src/constraintExprData.c @@ -0,0 +1,132 @@ +#/* +** constraintExpr.c +*/ + +# include /* for isdigit */ +# include "lclintMacros.nf" +# include "basic.h" +# include "cgrammar.h" +# include "cgrammar_tokens.h" + +# include "exprChecks.h" +# include "aliasChecks.h" +# include "exprNodeSList.h" +//# include "exprData.i" + + + +#include "constraintExpr.h" + +constraintExprData constraintExprData_copy (constraintExprData data, constraintExprKind kind) +{ + constraintExprData ret; + llassert(data); + ret = dmalloc (sizeof (*ret) ); + switch (kind) + { + case binaryexpr: + ret->binaryOp.binaryOp = data->binaryOp.binaryOp; + ret->binaryOp.expr1 = constraintExpr_copy (data->binaryOp.expr1); + ret->binaryOp.expr2 = constraintExpr_copy (data->binaryOp.expr2); + break; + case unaryExpr: + ret->unaryOp.unaryOp = data->unaryOp.unaryOp; + ret->unaryOp.expr = constraintExpr_copy (data->unaryOp.expr); + break; + case term: + ret->term = constraintTerm_copy (data->term); + } + + return ret; +} + +constraintExprData constraintExprData_termSetTerm (/*@out@*/ constraintExprData data, constraintTerm term) +{ + llassert (data); + data->term = constraintTerm_copy(term); + return data; +} + + + +constraintTerm constraintExprData_termGetTerm (constraintExprData data) +{ + llassert (data); + return data->term; +} + + +constraintExprUnaryOpKind constraintExprData_unaryExprGetOp (constraintExprData data) +{ + llassert (data); + return (data->unaryOp.unaryOp); +} + + +constraintExpr constraintExprData_unaryExprGetExpr (constraintExprData data) +{ + llassert (data); + return (data->unaryOp.expr); +} + + + +constraintExprData constraintExprData_unaryExprSetOp (constraintExprData data, constraintExprUnaryOpKind op) +{ + llassert (data); + data->unaryOp.unaryOp = op; + return data; +} + +constraintExprData constraintExprData_unaryExprSetExpr (constraintExprData data, constraintExpr expr) +{ + llassert (data); + data->unaryOp.expr = constraintExpr_copy(expr); + return data; +} + +// binaryExpr stuff + + +constraintExprBinaryOpKind constraintExprData_binaryExprGetOp (constraintExprData data) +{ + llassert (data); + return (data->binaryOp.binaryOp); +} + + +constraintExpr constraintExprData_binaryExprGetExpr1 (constraintExprData data) +{ + llassert (data); + return (data->binaryOp.expr1); +} + + +constraintExpr constraintExprData_binaryExprGetExpr2 (constraintExprData data) +{ + llassert (data); + return (data->binaryOp.expr2); +} + + +constraintExprData constraintExprData_binaryExprSetExpr1 (constraintExprData data, constraintExpr expr) +{ + llassert (data); + data->binaryOp.expr1 = constraintExpr_copy(expr); + return data; +} + +constraintExprData constraintExprData_binaryExprSetExpr2 (constraintExprData data, constraintExpr expr) +{ + llassert (data); + data->binaryOp.expr2 = constraintExpr_copy(expr); + return data; +} + + +constraintExprData constraintExprData_binaryExprSetOp (/*@returned@*/ constraintExprData data, constraintExprBinaryOpKind op) +{ + llassert (data); + data->binaryOp.binaryOp = op; + return data; +} diff --git a/src/constraintOutput.c b/src/constraintOutput.c new file mode 100644 index 0000000..6b89d15 --- /dev/null +++ b/src/constraintOutput.c @@ -0,0 +1,28 @@ +/* +** constraintOutput.c +*/ + +# include "lclintMacros.nf" +# include "basic.h" +# include "portab.h" + +#define testingFlag FLG_BUFFEROVERFLOW +//FLG_BUFF +//FLG_NULLTERMINATED + +void ConPrint (char * string, fileloc loc) +{ + if (context_getFlag (testingFlag ) ) + { + voptgenerror (testingFlag, string, loc); + } + +} + +void BPRINTF (char * string) +{ + if (context_getFlag (testingFlag ) ) + { + DPRINTF( (message ("%s", string) ) ); + } +} diff --git a/src/cscanner.c b/src/cscanner.c new file mode 100644 index 0000000..19d871d --- /dev/null +++ b/src/cscanner.c @@ -0,0 +1,5483 @@ +/* +** Inserted at beginning of c files generated by flex +** REMEMBER: Change flex.reset too. +*/ + +/*@-allmacros@*/ +/*@-pred@*/ +/*@-globstate@*/ +/*@-null@*/ +/*@+boolint@*/ +/*@+charint@*/ +/*@-macrospec@*/ +/*@-macroredef@*/ +/*@-exitarg@*/ +/*@-compdef@*/ +/*@-uniondef@*/ +/*@+ignorequals@*/ +/*@-noreturn@*/ +/*@-mustfree@*/ +/*@-compdestroy@*/ +/*@-branchstate@*/ +/*@-unreachable@*/ +/*@-varuse@*/ +/*@-fcnuse@*/ +/*@-exportlocal@*/ +/*@-evalorderuncon@*/ +/*@-exportheader@*/ +/*@-redecl@*/ +/*@-loopswitchbreak@*/ +/*@-switchswitchbreak@*/ +/*@-sizeoftype@*/ +/*@-czechfcns@*/ +/*@-noparams@*/ +/*@-ansireserved@*/ +/*@-ifblock@*/ +/*@-whileblock@*/ +/*@-forblock@*/ +/*@-elseifcomplete@*/ +/*@+ptrnegate@*/ +/*@-onlytrans@*/ +/*@-temptrans@*/ +/*@-immediatetrans@*/ +/*@-namechecks@*/ +/*@+matchanyintegral@*/ +/*@-statictrans@*/ +/*@-compmempass@*/ +/*@-forempty@*/ +/*@-evalorder@*/ +/*@-retalias@*/ +/*@-dependenttrans@*/ +/*@-noeffect@*/ +/*@-protoparammatch@*/ +/*@-casebreak@*/ +/*@-retvalother@*/ + +# ifdef __LCLINT__ +/*@-redecl@*/ /*@-type@*/ +extern int lsllex (void); +/*@=redecl@*/ /*@=type@*/ + +/* +** Need to do this because ECHO is defined by the Posix library. +** flex shouldn't use it. +*/ + +/*@notfunction@*/ +# define ECHO \ + fwrite (yytext, yyleng, 1, yyout) + +# ifndef DEFFILENO +extern /*@external@*/ int fileno (/* FILE *stream */); +# define DEFFILENO +# endif +# endif + +# ifdef OSF +# undef __GNUC__ +# endif + +/*@-redecl@*/ + +/* < end of flex.head > */ + +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header$ + */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#include + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include +#include + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + }; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO(( FILE *input_file )); + +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 180 +#define YY_END_OF_BUFFER 181 +static yyconst short int yy_accept[529] = + { 0, + 0, 0, 181, 179, 159, 160, 147, 179, 3, 82, + 153, 146, 179, 141, 142, 151, 150, 138, 149, 145, + 152, 97, 97, 139, 135, 154, 140, 155, 158, 179, + 82, 143, 178, 144, 156, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 136, 157, 137, 148, + 134, 0, 42, 0, 2, 82, 120, 176, 177, 129, + 121, 0, 0, 118, 126, 116, 127, 117, 128, 0, + 110, 1, 119, 113, 90, 0, 99, 98, 0, 97, + 125, 131, 133, 132, 124, 0, 0, 0, 82, 122, + + 82, 82, 82, 82, 82, 82, 82, 82, 9, 82, + 82, 82, 82, 82, 82, 82, 13, 44, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 123, 130, 0, 0, + 2, 104, 4, 0, 108, 109, 110, 0, 111, 112, + 92, 91, 0, 107, 100, 101, 101, 83, 115, 114, + 166, 167, 164, 169, 174, 165, 175, 170, 173, 168, + 171, 172, 0, 0, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + + 82, 82, 11, 82, 82, 27, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 43, 82, 82, 82, + 82, 82, 82, 74, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 0, 42, 0, 0, 110, + 0, 108, 109, 0, 113, 93, 94, 94, 105, 106, + 103, 102, 84, 86, 163, 0, 0, 82, 82, 82, + 82, 39, 82, 6, 29, 82, 82, 82, 82, 82, + 82, 10, 25, 82, 82, 82, 82, 12, 82, 82, + 82, 51, 82, 31, 82, 82, 52, 82, 82, 68, + + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 26, 82, 82, 82, 0, + 110, 96, 95, 85, 87, 87, 0, 162, 82, 82, + 82, 82, 5, 82, 36, 82, 82, 82, 82, 82, + 82, 82, 30, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 69, 82, 82, 82, 82, 82, 82, + 82, 32, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 77, 24, 82, 82, 82, 82, 82, 18, + 76, 89, 88, 161, 82, 80, 82, 82, 82, 82, + + 82, 82, 82, 28, 82, 38, 82, 21, 82, 54, + 78, 82, 60, 82, 82, 82, 82, 82, 82, 82, + 58, 82, 14, 75, 34, 15, 82, 41, 22, 17, + 82, 82, 82, 82, 82, 72, 19, 20, 82, 81, + 37, 47, 64, 82, 82, 8, 82, 59, 82, 82, + 82, 62, 53, 82, 82, 82, 45, 82, 82, 57, + 82, 46, 61, 82, 23, 82, 82, 82, 82, 65, + 7, 82, 73, 82, 82, 82, 70, 16, 82, 40, + 82, 55, 82, 33, 35, 82, 71, 56, 82, 82, + 82, 82, 67, 82, 82, 82, 82, 63, 82, 82, + + 82, 82, 82, 82, 82, 82, 48, 82, 82, 82, + 66, 82, 82, 82, 79, 82, 82, 82, 82, 82, + 82, 82, 82, 50, 82, 82, 49, 0 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 30, 32, 33, + 34, 8, 8, 8, 35, 36, 37, 8, 8, 8, + 38, 39, 40, 41, 42, 8, 43, 44, 8, 45, + 46, 47, 48, 49, 50, 1, 51, 52, 53, 54, + + 55, 56, 57, 58, 59, 8, 60, 61, 62, 63, + 64, 65, 8, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[79] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 4, 1, 1, 1, 1, 1, 1, 1, 5, 5, + 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, + 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 1, 1, 1, 1 + } ; + +static yyconst short int yy_base[536] = + { 0, + 0, 0, 678, 679, 679, 679, 652, 73, 0, 0, + 55, 71, 629, 679, 679, 650, 67, 679, 68, 66, + 74, 80, 85, 679, 679, 65, 649, 82, 679, 91, + 622, 679, 679, 679, 647, 621, 28, 604, 67, 40, + 65, 72, 605, 88, 55, 604, 79, 101, 616, 611, + 103, 90, 602, 51, 606, 604, 679, 113, 679, 679, + 679, 133, 163, 659, 0, 0, 679, 679, 679, 679, + 679, 100, 139, 679, 679, 679, 679, 679, 679, 643, + 155, 679, 679, 162, 172, 164, 160, 142, 0, 204, + 635, 679, 679, 679, 634, 245, 621, 621, 584, 679, + + 602, 581, 585, 597, 584, 122, 587, 141, 580, 581, + 578, 144, 585, 581, 578, 575, 0, 99, 579, 586, + 579, 576, 567, 569, 575, 568, 578, 572, 564, 568, + 564, 174, 573, 135, 158, 573, 154, 568, 564, 556, + 559, 184, 573, 167, 563, 566, 679, 679, 242, 153, + 0, 679, 679, 235, 679, 679, 251, 243, 679, 679, + 233, 230, 241, 272, 165, 679, 234, 261, 679, 679, + 679, 579, 679, 679, 679, 679, 679, 679, 679, 679, + 679, 679, 580, 581, 228, 553, 548, 551, 563, 558, + 546, 558, 231, 559, 554, 556, 552, 544, 541, 549, + + 536, 551, 0, 537, 541, 544, 529, 532, 535, 538, + 528, 530, 531, 536, 523, 516, 0, 533, 519, 533, + 526, 246, 515, 0, 517, 516, 518, 525, 526, 510, + 508, 508, 510, 519, 518, 514, 516, 506, 510, 501, + 203, 513, 515, 504, 503, 271, 308, 560, 295, 299, + 306, 679, 679, 304, 316, 262, 679, 277, 679, 679, + 679, 679, 298, 281, 679, 534, 522, 505, 504, 495, + 484, 0, 496, 0, 0, 495, 486, 494, 483, 488, + 489, 0, 0, 482, 482, 492, 478, 0, 482, 487, + 482, 0, 284, 0, 487, 472, 472, 473, 483, 0, + + 483, 477, 471, 467, 478, 463, 465, 475, 461, 473, + 463, 467, 466, 471, 470, 456, 458, 466, 464, 462, + 454, 459, 460, 448, 460, 0, 444, 456, 456, 323, + 325, 679, 679, 287, 679, 305, 481, 679, 457, 439, + 439, 440, 0, 292, 0, 441, 442, 448, 446, 445, + 436, 435, 0, 442, 430, 434, 440, 438, 436, 430, + 435, 419, 420, 0, 436, 417, 417, 428, 422, 419, + 427, 0, 426, 423, 427, 424, 408, 417, 419, 404, + 417, 418, 0, 0, 407, 415, 411, 406, 407, 0, + 0, 679, 679, 679, 411, 0, 396, 408, 408, 397, + + 391, 391, 403, 0, 403, 405, 386, 0, 403, 0, + 0, 397, 0, 391, 385, 395, 385, 387, 384, 391, + 0, 384, 0, 0, 385, 0, 382, 0, 0, 0, + 386, 380, 384, 379, 383, 0, 0, 0, 376, 0, + 0, 0, 369, 381, 379, 0, 370, 0, 371, 370, + 369, 0, 0, 367, 362, 371, 0, 358, 359, 0, + 361, 0, 0, 362, 0, 367, 367, 365, 351, 0, + 0, 350, 0, 356, 348, 347, 0, 0, 347, 0, + 329, 0, 340, 334, 0, 319, 0, 0, 311, 320, + 328, 325, 0, 316, 319, 311, 324, 0, 317, 305, + + 318, 315, 301, 302, 310, 296, 0, 308, 311, 300, + 0, 299, 290, 282, 0, 233, 245, 176, 186, 174, + 151, 158, 128, 0, 48, 28, 0, 679, 386, 390, + 394, 399, 403, 405, 410 + } ; + +static yyconst short int yy_def[536] = + { 0, + 528, 1, 528, 528, 528, 528, 528, 529, 530, 531, + 528, 528, 532, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 531, 528, 528, 528, 528, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 528, 528, 528, 528, + 528, 529, 528, 529, 533, 531, 528, 528, 528, 528, + 528, 532, 532, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 534, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 531, 528, + + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 528, 528, 528, 535, + 533, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 534, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 535, 528, 535, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 528, 528, 528, 531, 531, 531, 531, 531, 531, + + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 0, 528, 528, + 528, 528, 528, 528, 528 + } ; + +static yyconst short int yy_nxt[758] = + { 0, + 4, 5, 6, 5, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 10, 10, + 10, 10, 10, 10, 10, 10, 31, 10, 10, 10, + 10, 10, 10, 10, 10, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 10, 44, 45, + 46, 10, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 10, 56, 10, 57, 58, 59, 60, 63, 67, + 70, 75, 527, 80, 77, 81, 81, 82, 91, 92, + 102, 76, 78, 79, 108, 71, 103, 84, 83, 85, + + 85, 143, 84, 109, 90, 90, 94, 95, 96, 120, + 152, 86, 526, 121, 144, 87, 86, 105, 97, 64, + 87, 88, 113, 89, 106, 110, 88, 111, 98, 68, + 107, 69, 114, 123, 86, 115, 112, 147, 63, 86, + 87, 528, 124, 117, 139, 87, 73, 125, 88, 72, + 118, 89, 126, 88, 119, 140, 127, 133, 247, 205, + 134, 135, 141, 128, 149, 149, 206, 136, 150, 129, + 137, 130, 191, 138, 81, 81, 192, 167, 163, 64, + 163, 157, 157, 164, 164, 225, 154, 155, 148, 84, + 156, 85, 85, 158, 159, 165, 194, 160, 226, 248, + + 525, 166, 167, 86, 230, 195, 261, 161, 199, 154, + 155, 200, 524, 162, 227, 156, 158, 159, 523, 231, + 165, 84, 160, 90, 90, 242, 86, 243, 166, 220, + 221, 228, 161, 261, 222, 86, 236, 237, 522, 87, + 162, 223, 238, 149, 149, 88, 521, 150, 520, 249, + 239, 249, 240, 324, 250, 250, 325, 254, 86, 254, + 164, 164, 255, 255, 87, 258, 268, 269, 256, 262, + 157, 157, 88, 171, 257, 172, 247, 173, 174, 175, + 176, 177, 251, 252, 178, 179, 253, 180, 181, 182, + 258, 164, 164, 256, 262, 519, 263, 277, 278, 305, + + 518, 257, 264, 332, 259, 251, 252, 260, 306, 149, + 149, 253, 333, 150, 250, 250, 336, 248, 250, 250, + 330, 263, 330, 255, 255, 331, 331, 259, 392, 264, + 332, 155, 260, 334, 156, 255, 255, 333, 357, 335, + 393, 336, 331, 331, 331, 331, 399, 517, 159, 358, + 516, 160, 515, 400, 155, 392, 514, 252, 334, 156, + 253, 513, 512, 511, 510, 393, 335, 509, 508, 507, + 506, 159, 505, 504, 503, 502, 160, 501, 500, 499, + 252, 498, 497, 496, 495, 253, 62, 62, 62, 62, + 62, 65, 494, 493, 65, 66, 492, 66, 66, 72, + + 72, 491, 72, 72, 151, 490, 151, 151, 168, 168, + 246, 246, 246, 246, 246, 489, 488, 487, 486, 485, + 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, + 474, 473, 472, 471, 470, 469, 468, 467, 466, 465, + 464, 463, 462, 461, 460, 459, 458, 457, 456, 455, + 454, 453, 452, 451, 450, 449, 448, 447, 446, 445, + 444, 443, 442, 441, 440, 439, 438, 437, 436, 435, + 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, + 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, + 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, + + 404, 403, 402, 401, 398, 397, 396, 395, 394, 391, + 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, + 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, + 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, + 360, 359, 356, 355, 354, 353, 352, 351, 350, 349, + 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, + 338, 337, 528, 329, 328, 327, 326, 323, 322, 321, + 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, + 310, 309, 308, 307, 304, 303, 302, 301, 300, 299, + 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, + + 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, + 276, 275, 274, 273, 272, 271, 270, 267, 266, 265, + 245, 244, 241, 235, 234, 233, 232, 229, 224, 219, + 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, + 208, 207, 204, 203, 202, 201, 198, 197, 196, 193, + 190, 189, 188, 187, 186, 185, 184, 183, 170, 169, + 153, 528, 146, 145, 142, 132, 131, 122, 116, 104, + 101, 100, 99, 93, 74, 73, 61, 528, 3, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528 + } ; + +static yyconst short int yy_chk[758] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 8, 11, + 12, 17, 526, 20, 19, 20, 20, 21, 26, 26, + 37, 17, 19, 19, 40, 12, 37, 22, 21, 22, + + 22, 54, 23, 40, 23, 23, 28, 28, 30, 45, + 72, 22, 525, 45, 54, 22, 23, 39, 30, 8, + 23, 22, 42, 22, 39, 41, 23, 41, 30, 11, + 39, 11, 42, 47, 22, 42, 41, 58, 62, 23, + 22, 73, 47, 44, 52, 23, 72, 47, 22, 73, + 44, 22, 48, 23, 44, 52, 48, 51, 150, 118, + 51, 51, 52, 48, 63, 63, 118, 51, 63, 48, + 51, 48, 106, 51, 81, 81, 106, 88, 86, 62, + 86, 84, 84, 86, 86, 134, 81, 81, 58, 85, + 81, 85, 85, 84, 84, 87, 108, 84, 134, 150, + + 523, 87, 88, 85, 137, 108, 165, 85, 112, 81, + 81, 112, 522, 85, 135, 81, 84, 84, 521, 137, + 87, 90, 84, 90, 90, 144, 85, 144, 87, 132, + 132, 135, 85, 165, 132, 90, 142, 142, 520, 90, + 85, 132, 142, 149, 149, 90, 519, 149, 518, 154, + 142, 154, 142, 241, 154, 154, 241, 158, 90, 158, + 163, 163, 158, 158, 90, 162, 185, 185, 161, 167, + 157, 157, 90, 96, 161, 96, 246, 96, 96, 96, + 96, 96, 157, 157, 96, 96, 157, 96, 96, 96, + 162, 164, 164, 161, 167, 517, 168, 193, 193, 222, + + 516, 161, 168, 256, 164, 157, 157, 164, 222, 247, + 247, 157, 258, 247, 249, 249, 264, 246, 250, 250, + 251, 168, 251, 254, 254, 251, 251, 164, 334, 168, + 256, 250, 164, 263, 250, 255, 255, 258, 293, 263, + 336, 264, 330, 330, 331, 331, 344, 514, 255, 293, + 513, 255, 512, 344, 250, 334, 510, 331, 263, 250, + 331, 509, 508, 506, 505, 336, 263, 504, 503, 502, + 501, 255, 500, 499, 497, 496, 255, 495, 494, 492, + 331, 491, 490, 489, 486, 331, 529, 529, 529, 529, + 529, 530, 484, 483, 530, 531, 481, 531, 531, 532, + + 532, 479, 532, 532, 533, 476, 533, 533, 534, 534, + 535, 535, 535, 535, 535, 475, 474, 472, 469, 468, + 467, 466, 464, 461, 459, 458, 456, 455, 454, 451, + 450, 449, 447, 445, 444, 443, 439, 435, 434, 433, + 432, 431, 427, 425, 422, 420, 419, 418, 417, 416, + 415, 414, 412, 409, 407, 406, 405, 403, 402, 401, + 400, 399, 398, 397, 395, 389, 388, 387, 386, 385, + 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, + 371, 370, 369, 368, 367, 366, 365, 363, 362, 361, + 360, 359, 358, 357, 356, 355, 354, 352, 351, 350, + + 349, 348, 347, 346, 342, 341, 340, 339, 337, 329, + 328, 327, 325, 324, 323, 322, 321, 320, 319, 318, + 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, + 307, 306, 305, 304, 303, 302, 301, 299, 298, 297, + 296, 295, 291, 290, 289, 287, 286, 285, 284, 281, + 280, 279, 278, 277, 276, 273, 271, 270, 269, 268, + 267, 266, 248, 245, 244, 243, 242, 240, 239, 238, + 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, + 227, 226, 225, 223, 221, 220, 219, 218, 216, 215, + 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, + + 204, 202, 201, 200, 199, 198, 197, 196, 195, 194, + 192, 191, 190, 189, 188, 187, 186, 184, 183, 172, + 146, 145, 143, 141, 140, 139, 138, 136, 133, 131, + 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, + 120, 119, 116, 115, 114, 113, 111, 110, 109, 107, + 105, 104, 103, 102, 101, 99, 98, 97, 95, 91, + 80, 64, 56, 55, 53, 50, 49, 46, 43, 38, + 36, 35, 31, 27, 16, 13, 7, 3, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 528 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "cscanner.l" +#define INITIAL 0 +/*;-*-C-*-; +** Copyright (c) Massachusetts Institute of Technology 1994-1998. +** All Rights Reserved. +** Unpublished rights reserved under the copyright laws of +** the United States. +** +** THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED +** OR IMPLIED. ANY USE IS AT YOUR OWN RISK. +** +** This code is distributed freely and may be used freely under the +** following conditions: +** +** 1. This notice may not be removed or altered. +** +** 2. Works derived from this code are not distributed for +** commercial gain without explicit permission from MIT +** (for permission contact lclint-request@sds.lcs.mit.edu). +*/ +/* + * Modified by Herbert 08/19/97: + * - added #include for IBM's OS/2 compiler. + * - fixed weird bug with lookup of tmp files (OS/2 and MSDOS only). + */ +/* + * Modified by Mike Smith + * Corrected missing 'line' in scanf() calls in handleSpecial(). + * Without this, I get an error when LCLint hits a '#line' directive + * in the pre-pre-processed source files. For safety, I have made these + * conditional on OS2 and MSDOS because I don't understand why noone else + * has seen this problem. + * + * Modified by Mike Smith, 4th June 1997 + * Finally resolved the #line problem. The scanf() calls have been fixed to + * allow the following #line forms:- + * + * #line 123 "filename" + * #line 123 + * # 123 "filename" + * # 123 + * + * The last two are generated by the GNU pre-processor, apparently + */ +#line 56 "cscanner.l" +/* +** based on original C lexer by Nate Osgood +** from hacrat@catfish.lcs.mit.edu Mon Jun 14 13:06:32 1993 +** +*/ + +# include "lclintMacros.nf" +# include "basic.h" + +# include "cgrammar.h" +# include "cgrammar_tokens.h" + +# include "fileIdList.h" +# include "portab.h" + +# if defined(OS2) && defined(__IBMC__) + /* needed for isatty()... */ +# include +# endif + +static bool lastWasString = FALSE; +static char savechar = '\0'; + +/*@notfunction@*/ +# define yyinput() (incColumn (), getc (yyin)) + +/*@-noparams@*/ +/*@-incondefs@*/ +extern /*@external@*/ int read (); +/*@=incondefs@*/ +/*@=noparams@*/ + +static /*@owned@*/ cstring lastidprocessed = cstring_undefined; + +static int lminput (void); +static int tokLength = 0; +static bool inSpecPart = FALSE; +static bool continueLine = FALSE; + +static int ninput (void); +static char processChar (void); +static double processFloat (void); +static /*@only@*/ exprNode processString (void); +static long processDec (void); +static long processHex (void); +static long processOctal (void); +static int processIdentifier (/*@only@*/ cstring) + /*@globals undef lastidprocessed@*/ ; +static bool processHashIdentifier (/*@only@*/ cstring) + /*@globals undef lastidprocessed@*/ ; + +static int processSpec (int); +static bool handleSpecial (char *); +static int handleLlSpecial (void); +static void handleMacro (void); +static bool processMacro (void); +static /*@only@*/ cstring makeIdentifier (char *); + +/* yes, this is exported! */ +bool g_expectingTypeName = TRUE; /* beginning of file can be type name! */ + +static int returnInt (ctype, long); +static int returnFloat (ctype, double); +static int returnChar (char); +static void setTokLength (int) /*@modifies g_currentloc@*/ ; +static void setTokLengthT (size_t) /*@modifies g_currentloc@*/ ; + +static void advanceLine (void) +{ + tokLength = 0; + beginLine (); +} + +/*@-allmacros@*/ +# define RETURN_INT(c,i) \ + do { lastWasString = FALSE; \ + return (returnInt (c, i)); } while (FALSE) + +# define RETURN_FLOAT(c,f) \ + do { lastWasString = FALSE; \ + return (returnFloat (c, f)); \ + } while (FALSE) + +# define RETURN_CHAR(c) \ + do { lastWasString = FALSE; \ + return (returnChar (c)); \ + } while (FALSE) + +# define RETURN_TOK(t) \ + do { yylval.tok = lltok_create (t, fileloc_decColumn (g_currentloc, tokLength)); \ + tokLength = 0; \ + lastWasString = FALSE; \ + return (t); } while (FALSE) + +# define RETURN_TYPE(t, ct) \ + do { yylval.ctyp = ct; tokLength = 0; return (t); } while (FALSE) + +/* don't fileloc_decColumn (g_currentloc, tokLength)); + the string could have \n's in it! +*/ + +# define RETURN_STRING(c) \ + do { yylval.expr = exprNode_stringLiteral (c, fileloc_decColumn (g_currentloc, tokLength)); \ + tokLength = 0; \ + lastWasString = TRUE; \ + return (CCONSTANT); } while (FALSE) + +# define RETURN_EXPR(e) \ + do { yylval.expr = e; \ + tokLength = 0; \ + lastWasString = TRUE; \ + return (CCONSTANT); } while (FALSE) + +/*@=allmacros@*/ + +static void setTokLength (int len) +{ + addColumn (len); + tokLength = len; +} + +static void setTokLengthT (size_t len) +{ + setTokLength (size_toInt (len)); +} + +# include "flex.head" +#line 877 "lex.yy.c" + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO(( yyconst char * )); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO(( void )); +#else +static int input YY_PROTO(( void )); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 185 "cscanner.l" + + +#line 1031 "lex.yy.c" + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 529 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 679 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yy_last_accepting_cpos; + yy_current_state = yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yy_hold_char; + yy_cp = yy_last_accepting_cpos; + yy_current_state = yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 187 "cscanner.l" +{ llfatalbug (cstring_makeLiteral ("Comment in pre-processor output")); } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 189 "cscanner.l" +{ + context_saveLocation (); + setTokLength (longUnsigned_toInt (mstring_length (yytext))); + + if (processHashIdentifier (makeIdentifier (yytext + 1))) + { + if (lastWasString) + { + ; + } + else + { + RETURN_STRING (cstring_makeLiteral ("\"\"")); + } + } + else + { + if (handleSpecial (yytext)) + { + setTokLength (1); + RETURN_TOK (0); + } + } + } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 213 "cscanner.l" +{ if (handleSpecial (yytext)) + { + setTokLength (1); RETURN_TOK (0); + } + } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 218 "cscanner.l" +{ setTokLength (3); RETURN_TOK (CTOK_ELIPSIS); } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 219 "cscanner.l" +{ setTokLength (5); RETURN_TOK (BREAK); } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 220 "cscanner.l" +{ setTokLength (4); RETURN_TOK (CASE); } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 221 "cscanner.l" +{ setTokLength (8); RETURN_TOK (CONTINUE); } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 222 "cscanner.l" +{ setTokLength (7); RETURN_TOK (DEFAULT); } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 223 "cscanner.l" +{ setTokLength (2); RETURN_TOK (DO); } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 224 "cscanner.l" +{ setTokLength (4); RETURN_TOK (CELSE); } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 225 "cscanner.l" +{ setTokLength (3); RETURN_TOK (CFOR); } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 226 "cscanner.l" +{ setTokLength (4); RETURN_TOK (GOTO); } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 227 "cscanner.l" +{ setTokLength (2); RETURN_TOK (CIF); } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 228 "cscanner.l" +{ setTokLength (6); RETURN_TOK (RETURN); } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 229 "cscanner.l" +{ setTokLength (6); RETURN_TOK (CSIZEOF); } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 230 "cscanner.l" +{ setTokLength (8); RETURN_TOK (COFFSETOF); } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 231 "cscanner.l" +{ setTokLength (6); RETURN_TOK (SWITCH); } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 232 "cscanner.l" +{ setTokLength (5); RETURN_TOK (WHILE); } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 233 "cscanner.l" +{ setTokLength (6); RETURN_TOK (VA_ARG); } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 234 "cscanner.l" +{ setTokLength (6); RETURN_TOK (VA_DCL); } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 235 "cscanner.l" +{ + /* gcc extension...this might not be appropriate */ + setTokLength (6); RETURN_TOK (QINLINE); } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 239 "cscanner.l" +{ setTokLength (6); RETURN_TOK (CSTRUCT); } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 240 "cscanner.l" +{ setTokLength (7); RETURN_TOK (CTYPEDEF); } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 242 "cscanner.l" +{ setTokLength (5); RETURN_TOK (CUNION); } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 243 "cscanner.l" +{ setTokLength (4); RETURN_TOK (CENUM); } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 245 "cscanner.l" +{ setTokLength (4); RETURN_TYPE (CVOID, ctype_void); } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 246 "cscanner.l" +{ setTokLength (3); RETURN_TYPE (CINT, ctype_int); } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 247 "cscanner.l" +{ setTokLength (6); RETURN_TYPE (CDOUBLE, ctype_double); } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 248 "cscanner.l" +{ setTokLength (4); RETURN_TYPE (CGCHAR, ctype_char); } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 249 "cscanner.l" +{ setTokLength (5); RETURN_TYPE (CGFLOAT, ctype_float); } + YY_BREAK +case 31: +YY_RULE_SETUP +#line 251 "cscanner.l" +{ setTokLength (4); RETURN_TOK (QLONG); } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 252 "cscanner.l" +{ setTokLength (5); RETURN_TOK (QSHORT); } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 253 "cscanner.l" +{ setTokLength (8); RETURN_TOK (QUNSIGNED); } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 254 "cscanner.l" +{ setTokLength (6); RETURN_TOK (QSIGNED); } + YY_BREAK +case 35: +YY_RULE_SETUP +#line 256 "cscanner.l" +{ setTokLength (8); RETURN_TOK (QVOLATILE); } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 257 "cscanner.l" +{ setTokLength (5); RETURN_TOK (QCONST); } + YY_BREAK +/* some systems expect this! [gack!] */ +case 37: +YY_RULE_SETUP +#line 260 "cscanner.l" +{ setTokLength (7); RETURN_TOK (QCONST); } + YY_BREAK +case 38: +YY_RULE_SETUP +#line 262 "cscanner.l" +{ setTokLength (6); RETURN_TOK (QEXTERN); } + YY_BREAK +case 39: +YY_RULE_SETUP +#line 263 "cscanner.l" +{ setTokLength (4); RETURN_TOK (QAUTO); } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 264 "cscanner.l" +{ setTokLength (8); RETURN_TOK (QREGISTER); } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 265 "cscanner.l" +{ setTokLength (6); RETURN_TOK (QSTATIC); } + YY_BREAK +case 42: +YY_RULE_SETUP +#line 267 "cscanner.l" +{ RETURN_EXPR (processString ()); } + YY_BREAK +case 43: +YY_RULE_SETUP +#line 268 "cscanner.l" +{ return (processSpec (QOUT)); } + YY_BREAK +case 44: +YY_RULE_SETUP +#line 269 "cscanner.l" +{ return (processSpec (QIN)); } + YY_BREAK +case 45: +YY_RULE_SETUP +#line 270 "cscanner.l" +{ return (processSpec (QPARTIAL)); } + YY_BREAK +case 46: +YY_RULE_SETUP +#line 271 "cscanner.l" +{ return (processSpec (QSPECIAL)); } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 272 "cscanner.l" +{ return (processSpec (QANYTYPE)); } + YY_BREAK +case 48: +YY_RULE_SETUP +#line 273 "cscanner.l" +{ return (processSpec (QINTEGRALTYPE)); } + YY_BREAK +case 49: +YY_RULE_SETUP +#line 274 "cscanner.l" +{ return (processSpec (QUNSIGNEDINTEGRALTYPE)); } + YY_BREAK +case 50: +YY_RULE_SETUP +#line 275 "cscanner.l" +{ return (processSpec (QSIGNEDINTEGRALTYPE)); } + YY_BREAK +case 51: +YY_RULE_SETUP +#line 276 "cscanner.l" +{ return (processSpec (QKEEP)); } + YY_BREAK +case 52: +YY_RULE_SETUP +#line 277 "cscanner.l" +{ return (processSpec (QNULL)); } + YY_BREAK +case 53: +YY_RULE_SETUP +#line 278 "cscanner.l" +{ return (processSpec (QNOTNULL)); } + YY_BREAK +case 54: +YY_RULE_SETUP +#line 279 "cscanner.l" +{ return (processSpec (QISNULL)); } + YY_BREAK +case 55: +YY_RULE_SETUP +#line 280 "cscanner.l" +{ return (processSpec (QTRUENULL)); } + YY_BREAK +case 56: +YY_RULE_SETUP +#line 281 "cscanner.l" +{ return (processSpec (QFALSENULL)); } + YY_BREAK +case 57: +YY_RULE_SETUP +#line 282 "cscanner.l" +{ return (processSpec (QRELNULL)); } + YY_BREAK +case 58: +YY_RULE_SETUP +#line 283 "cscanner.l" +{ return (processSpec (QRELDEF)); } + YY_BREAK +case 59: +YY_RULE_SETUP +#line 284 "cscanner.l" +{ return (processSpec (QEXPOSED)); } + YY_BREAK +case 60: +YY_RULE_SETUP +#line 285 "cscanner.l" +{ return (processSpec (QNEWREF)); } + YY_BREAK +case 61: +YY_RULE_SETUP +#line 286 "cscanner.l" +{ return (processSpec (QTEMPREF)); } + YY_BREAK +case 62: +YY_RULE_SETUP +#line 287 "cscanner.l" +{ return (processSpec (QKILLREF)); } + YY_BREAK +case 63: +YY_RULE_SETUP +#line 288 "cscanner.l" +{ return (processSpec (QREFCOUNTED)); } + YY_BREAK +case 64: +YY_RULE_SETUP +#line 289 "cscanner.l" +{ return (processSpec (QCHECKED)); } + YY_BREAK +case 65: +YY_RULE_SETUP +#line 290 "cscanner.l" +{ return (processSpec (QCHECKMOD)); } + YY_BREAK +case 66: +YY_RULE_SETUP +#line 291 "cscanner.l" +{ return (processSpec (QCHECKEDSTRICT)); } + YY_BREAK +case 67: +YY_RULE_SETUP +#line 292 "cscanner.l" +{ return (processSpec (QUNCHECKED)); } + YY_BREAK +case 68: +YY_RULE_SETUP +#line 293 "cscanner.l" +{ return (processSpec (QONLY)); } + YY_BREAK +case 69: +YY_RULE_SETUP +#line 294 "cscanner.l" +{ return (processSpec (QOWNED)); } + YY_BREAK +case 70: +YY_RULE_SETUP +#line 295 "cscanner.l" +{ return (processSpec (QOBSERVER)); } + YY_BREAK +case 71: +YY_RULE_SETUP +#line 296 "cscanner.l" +{ return (processSpec (QDEPENDENT)); } + YY_BREAK +case 72: +YY_RULE_SETUP +#line 297 "cscanner.l" +{ return (processSpec (QUNUSED)); } + YY_BREAK +case 73: +YY_RULE_SETUP +#line 298 "cscanner.l" +{ return (processSpec (QEXTERNAL)); } + YY_BREAK +case 74: +YY_RULE_SETUP +#line 299 "cscanner.l" +{ return (processSpec (QSEF)); } + YY_BREAK +case 75: +YY_RULE_SETUP +#line 300 "cscanner.l" +{ return (processSpec (QSHARED)); } + YY_BREAK +case 76: +YY_RULE_SETUP +#line 301 "cscanner.l" +{ return (processSpec (QYIELD)); } + YY_BREAK +case 77: +YY_RULE_SETUP +#line 302 "cscanner.l" +{ return (processSpec (QUNDEF)); } + YY_BREAK +case 78: +YY_RULE_SETUP +#line 303 "cscanner.l" +{ return (processSpec (QKILLED)); } + YY_BREAK +case 79: +YY_RULE_SETUP +#line 304 "cscanner.l" +{ return (processSpec (QNULLTERMINATED));} + YY_BREAK +case 80: +YY_RULE_SETUP +#line 305 "cscanner.l" +{ return (processSpec (QMAXSET));} + YY_BREAK +case 81: +YY_RULE_SETUP +#line 306 "cscanner.l" +{ return (processSpec (QMAXREAD));} + YY_BREAK +case 82: +YY_RULE_SETUP +#line 308 "cscanner.l" +{ int tok; + context_saveLocation (); + setTokLength (longUnsigned_toInt (mstring_length (yytext))); + tok = processIdentifier (makeIdentifier (yytext)); + if (tok != BADTOK) + { + return (tok); + } + } + YY_BREAK +case 83: +YY_RULE_SETUP +#line 317 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_int, processHex ()); /* evs 2000-05-17 was ctype_uint */ + } + YY_BREAK +case 84: +YY_RULE_SETUP +#line 320 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_lint, processHex ()); } + YY_BREAK +case 85: +YY_RULE_SETUP +#line 322 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_llint, processHex ()); } + YY_BREAK +case 86: +YY_RULE_SETUP +#line 324 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_uint, processHex ()); } + YY_BREAK +case 87: +YY_RULE_SETUP +#line 326 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_ulint, processHex ()); } + YY_BREAK +case 88: +YY_RULE_SETUP +#line 328 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_ullint, processHex ()); } + YY_BREAK +case 89: +YY_RULE_SETUP +#line 330 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_ullint, processHex ()); } + YY_BREAK +case 90: +YY_RULE_SETUP +#line 332 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_int, processOctal ()); } + YY_BREAK +case 91: +YY_RULE_SETUP +#line 334 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_uint, processOctal ()); } + YY_BREAK +case 92: +YY_RULE_SETUP +#line 336 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_lint, processOctal ()); } + YY_BREAK +case 93: +YY_RULE_SETUP +#line 338 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_llint, processOctal ()); } + YY_BREAK +case 94: +YY_RULE_SETUP +#line 340 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_ulint, processOctal ()); } + YY_BREAK +case 95: +YY_RULE_SETUP +#line 342 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_ullint, processOctal ()); } + YY_BREAK +case 96: +YY_RULE_SETUP +#line 344 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_ullint, processOctal ()); } + YY_BREAK +case 97: +YY_RULE_SETUP +#line 346 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_int, processDec ()); } + YY_BREAK +case 98: +YY_RULE_SETUP +#line 348 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_uint, processDec ()); } + YY_BREAK +case 99: +YY_RULE_SETUP +#line 350 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_lint, processDec ()); } + YY_BREAK +case 100: +YY_RULE_SETUP +#line 352 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_llint, processDec ()); } + YY_BREAK +case 101: +YY_RULE_SETUP +#line 354 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_ulint, processDec ()); } + YY_BREAK +case 102: +YY_RULE_SETUP +#line 356 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_ullint, processDec ()); } + YY_BREAK +case 103: +YY_RULE_SETUP +#line 358 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_INT (ctype_ullint, processDec ()); } + YY_BREAK +case 104: +YY_RULE_SETUP +#line 360 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_CHAR (processChar ()); } + YY_BREAK +case 105: +YY_RULE_SETUP +#line 362 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_FLOAT (ctype_float, processFloat ()); } + YY_BREAK +case 106: +YY_RULE_SETUP +#line 364 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_FLOAT (ctype_ldouble, processFloat ()); } + YY_BREAK +case 107: +YY_RULE_SETUP +#line 366 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_FLOAT (ctype_double, processFloat ()); } + YY_BREAK +case 108: +YY_RULE_SETUP +#line 369 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_FLOAT (ctype_float, processFloat ()); } + YY_BREAK +case 109: +YY_RULE_SETUP +#line 371 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_FLOAT (ctype_ldouble, processFloat ()); } + YY_BREAK +case 110: +YY_RULE_SETUP +#line 373 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_FLOAT (ctype_double, processFloat ()); } + YY_BREAK +case 111: +YY_RULE_SETUP +#line 376 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_FLOAT (ctype_float, processFloat ()); } + YY_BREAK +case 112: +YY_RULE_SETUP +#line 378 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_FLOAT (ctype_ldouble, processFloat ()); } + YY_BREAK +case 113: +YY_RULE_SETUP +#line 380 "cscanner.l" +{ setTokLengthT (mstring_length (yytext)); + RETURN_FLOAT (ctype_double, processFloat ()); } + YY_BREAK +case 114: +YY_RULE_SETUP +#line 383 "cscanner.l" +{ setTokLength (3); RETURN_TOK (RIGHT_ASSIGN); } + YY_BREAK +case 115: +YY_RULE_SETUP +#line 384 "cscanner.l" +{ setTokLength (3); RETURN_TOK (LEFT_ASSIGN); } + YY_BREAK +case 116: +YY_RULE_SETUP +#line 385 "cscanner.l" +{ setTokLength (2); RETURN_TOK (ADD_ASSIGN); } + YY_BREAK +case 117: +YY_RULE_SETUP +#line 386 "cscanner.l" +{ setTokLength (2); RETURN_TOK (SUB_ASSIGN); } + YY_BREAK +case 118: +YY_RULE_SETUP +#line 387 "cscanner.l" +{ setTokLength (2); RETURN_TOK (MUL_ASSIGN); } + YY_BREAK +case 119: +YY_RULE_SETUP +#line 388 "cscanner.l" +{ setTokLength (2); RETURN_TOK (DIV_ASSIGN); } + YY_BREAK +case 120: +YY_RULE_SETUP +#line 389 "cscanner.l" +{ setTokLength (2); RETURN_TOK (MOD_ASSIGN); } + YY_BREAK +case 121: +YY_RULE_SETUP +#line 390 "cscanner.l" +{ setTokLength (2); RETURN_TOK (AND_ASSIGN); } + YY_BREAK +case 122: +YY_RULE_SETUP +#line 391 "cscanner.l" +{ setTokLength (2); RETURN_TOK (XOR_ASSIGN); } + YY_BREAK +case 123: +YY_RULE_SETUP +#line 392 "cscanner.l" +{ setTokLength (2); RETURN_TOK (OR_ASSIGN); } + YY_BREAK +case 124: +YY_RULE_SETUP +#line 393 "cscanner.l" +{ setTokLength (2); RETURN_TOK (RIGHT_OP); } + YY_BREAK +case 125: +YY_RULE_SETUP +#line 394 "cscanner.l" +{ setTokLength (2); RETURN_TOK (LEFT_OP); } + YY_BREAK +case 126: +YY_RULE_SETUP +#line 395 "cscanner.l" +{ setTokLength (2); RETURN_TOK (INC_OP); } + YY_BREAK +case 127: +YY_RULE_SETUP +#line 396 "cscanner.l" +{ setTokLength (2); RETURN_TOK (DEC_OP); } + YY_BREAK +case 128: +YY_RULE_SETUP +#line 397 "cscanner.l" +{ setTokLength (2); RETURN_TOK (ARROW_OP); } + YY_BREAK +case 129: +YY_RULE_SETUP +#line 398 "cscanner.l" +{ setTokLength (2); RETURN_TOK (AND_OP); } + YY_BREAK +case 130: +YY_RULE_SETUP +#line 399 "cscanner.l" +{ setTokLength (2); RETURN_TOK (OR_OP); } + YY_BREAK +case 131: +YY_RULE_SETUP +#line 400 "cscanner.l" +{ setTokLength (2); RETURN_TOK (LE_OP); } + YY_BREAK +case 132: +YY_RULE_SETUP +#line 401 "cscanner.l" +{ setTokLength (2); RETURN_TOK (GE_OP); } + YY_BREAK +case 133: +YY_RULE_SETUP +#line 402 "cscanner.l" +{ setTokLength (2); RETURN_TOK (EQ_OP); } + YY_BREAK +case 134: +YY_RULE_SETUP +#line 403 "cscanner.l" +{ setTokLength (2); RETURN_TOK (NE_OP); } + YY_BREAK +case 135: +YY_RULE_SETUP +#line 404 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TSEMI); } + YY_BREAK +case 136: +YY_RULE_SETUP +#line 405 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TLBRACE); } + YY_BREAK +case 137: +YY_RULE_SETUP +#line 406 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TRBRACE); } + YY_BREAK +case 138: +YY_RULE_SETUP +#line 407 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TCOMMA); } + YY_BREAK +case 139: +YY_RULE_SETUP +#line 408 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TCOLON); } + YY_BREAK +case 140: +YY_RULE_SETUP +#line 409 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TASSIGN); } + YY_BREAK +case 141: +YY_RULE_SETUP +#line 410 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TLPAREN); } + YY_BREAK +case 142: +YY_RULE_SETUP +#line 411 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TRPAREN); } + YY_BREAK +case 143: +YY_RULE_SETUP +#line 412 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TLSQBR); } + YY_BREAK +case 144: +YY_RULE_SETUP +#line 413 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TRSQBR); } + YY_BREAK +case 145: +YY_RULE_SETUP +#line 414 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TDOT); } + YY_BREAK +case 146: +YY_RULE_SETUP +#line 415 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TAMPERSAND); } + YY_BREAK +case 147: +YY_RULE_SETUP +#line 416 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TEXCL); } + YY_BREAK +case 148: +YY_RULE_SETUP +#line 419 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TTILDE); } + YY_BREAK +case 149: +YY_RULE_SETUP +#line 420 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TMINUS); } + YY_BREAK +case 150: +YY_RULE_SETUP +#line 421 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TPLUS); } + YY_BREAK +case 151: +YY_RULE_SETUP +#line 422 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TMULT); } + YY_BREAK +case 152: +YY_RULE_SETUP +#line 423 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TDIV); } + YY_BREAK +case 153: +YY_RULE_SETUP +#line 424 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TPERCENT); } + YY_BREAK +case 154: +YY_RULE_SETUP +#line 425 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TLT); } + YY_BREAK +case 155: +YY_RULE_SETUP +#line 426 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TGT); } + YY_BREAK +case 156: +YY_RULE_SETUP +#line 427 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TCIRC); } + YY_BREAK +case 157: +YY_RULE_SETUP +#line 428 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TBAR); } + YY_BREAK +case 158: +YY_RULE_SETUP +#line 429 "cscanner.l" +{ setTokLength (1); RETURN_TOK (TQUEST); } + YY_BREAK +case 159: +YY_RULE_SETUP +#line 431 "cscanner.l" +{ incColumn (); } + YY_BREAK +case 160: +YY_RULE_SETUP +#line 432 "cscanner.l" +{ context_incLineno (); + if (continueLine) + { + continueLine = FALSE; + } + else + { + if (context_inMacro ()) + { + /* Don't use RETURN_TOK */ + yylval.tok = lltok_create (TENDMACRO, g_currentloc); + lastWasString = FALSE; + return (TENDMACRO); + } + } + } + YY_BREAK +case 161: +YY_RULE_SETUP +#line 448 "cscanner.l" +{ setTokLength (6); + + if (processMacro ()) { + if (context_inIterDef ()) + { + RETURN_TOK (LLMACROITER); + } + if (context_inIterEnd ()) + { + RETURN_TOK (LLMACROEND); + } + if (context_inMacro ()) + { + RETURN_TOK (LLMACRO); + } + } + } + YY_BREAK +case 162: +YY_RULE_SETUP +#line 465 "cscanner.l" +{ if (context_inHeader () || context_inFunction ()) + { + handleMacro (); + } + else + { + int nspchar = ninput (); + int nspaces; + + /* + ** This is a hack to get the column number correct. + */ + + llassert (nspchar >= '0' && nspchar <= '9'); + + nspaces = nspchar - '0'; + + setTokLength (5 + nspaces); + + if (processMacro ()) + { + if (context_inIterDef ()) + { + RETURN_TOK (LLMACROITER); + } + if (context_inIterEnd ()) + { + RETURN_TOK (LLMACROEND); + } + if (context_inMacro ()) + { + RETURN_TOK (LLMACRO); + } + } + } + } + YY_BREAK +case 163: +YY_RULE_SETUP +#line 501 "cscanner.l" +{ setTokLength (4); lldiagmsg (ctype_unparseTable ()); } + YY_BREAK +case 164: +YY_RULE_SETUP +#line 502 "cscanner.l" +{ setTokLength (3); + lldiagmsg (message ("%q: *** marker ***", fileloc_unparse (g_currentloc))); + } + YY_BREAK +case 165: +YY_RULE_SETUP +#line 505 "cscanner.l" +{ setTokLength (3); usymtab_printLocal (); } + YY_BREAK +case 166: +YY_RULE_SETUP +#line 506 "cscanner.l" +{ setTokLength (3); lldiagmsg (usymtab_unparseAliases ()); } + YY_BREAK +case 167: +YY_RULE_SETUP +#line 507 "cscanner.l" +{ setTokLength (3); lldiagmsg (context_unparse ()); } + YY_BREAK +case 168: +YY_RULE_SETUP +#line 508 "cscanner.l" +{ setTokLength (3); lldiagmsg (context_unparseClauses ()); } + YY_BREAK +case 169: +YY_RULE_SETUP +#line 509 "cscanner.l" +{ setTokLength (3); usymtab_printGuards (); } + YY_BREAK +case 170: +YY_RULE_SETUP +#line 510 "cscanner.l" +{ setTokLength (3); usymtab_printOut (); } + YY_BREAK +case 171: +YY_RULE_SETUP +#line 511 "cscanner.l" +{ setTokLength (3); usymtab_printAll (); } + YY_BREAK +case 172: +YY_RULE_SETUP +#line 512 "cscanner.l" +{ setTokLength (3); usymtab_printComplete (); } + YY_BREAK +case 173: +YY_RULE_SETUP +#line 513 "cscanner.l" +{ setTokLength (3); usymtab_printTypes (); } + YY_BREAK +case 174: +YY_RULE_SETUP +#line 514 "cscanner.l" +{ setTokLength (3); lldiagmsg (usymtab_unparseStack ()); } + YY_BREAK +case 175: +YY_RULE_SETUP +#line 515 "cscanner.l" +{ setTokLength (3); + lldiagmsg (message ("Can modify: %q", + sRefSet_unparse (context_modList ()))); + } + YY_BREAK +case 176: +YY_RULE_SETUP +#line 519 "cscanner.l" +{ /* BEFORE_COMMENT_MARKER */ + int tok; + incColumn (); incColumn (); + tok = handleLlSpecial (); + if (tok != BADTOK) + { + RETURN_TOK (tok); + } + } + YY_BREAK +case 177: +YY_RULE_SETUP +#line 528 "cscanner.l" +{ /* AFTER_COMMENT_MARKER */ + setTokLength (2); + inSpecPart = FALSE; + RETURN_TOK (QENDMACRO); } + YY_BREAK +case 178: +YY_RULE_SETUP +#line 532 "cscanner.l" +{ incColumn (); continueLine = TRUE; } + YY_BREAK +case 179: +YY_RULE_SETUP +#line 533 "cscanner.l" +{ incColumn (); + voptgenerror + (FLG_SYNTAX, + message ("Invalid character (ascii: %d), skipping character", + (int)(*yytext)), + g_currentloc); + } + YY_BREAK +case 180: +YY_RULE_SETUP +#line 540 "cscanner.l" +ECHO; + YY_BREAK +#line 2172 "lex.yy.c" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ + + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; + } + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type yy_get_previous_state() + { + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 529 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; + } + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { + register int yy_is_jam; + register char *yy_cp = yy_c_buf_p; + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 529 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 528); + + return yy_is_jam ? 0 : yy_current_state; + } + + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif + { + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + return EOF; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + + return c; + } + + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } + + +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) + return; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } + + +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; + } + + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); + } + + +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } + + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } + + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); + } +#endif + + +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif + + +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) +#else +static void yy_fatal_error( msg ) +char msg[]; +#endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } + + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { + return (void *) malloc( size ); + } + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } + +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif +#line 540 "cscanner.l" + + +struct skeyword +{ + /*@null@*/ /*@observer@*/ char *name; + int token; +} ; + +/* +** These tokens are followed by syntax that is parsed by the +** grammar proper. +*/ + +struct skeyword s_parsetable[] = { + { "modifies", QMODIFIES } , + { "globals", QGLOBALS } , + { "alt", QALT } , + { "constant", QCONSTANT } , + { "function", QFUNCTION } , + { "iter", QITER } , + { "defines", QDEFINES } , + { "uses", QUSES } , + { "allocates", QALLOCATES } , + { "sets", QSETS } , + { "releases", QRELEASES } , + { "pre", QPRECLAUSE } , + { "post", QPOSTCLAUSE } , + {"setBufferSize", QSETBUFFERSIZE}, + {"bufferConstraint", QBUFFERCONSTRAINT}, + {"ensuresConstraint", QENSURESCONSTRAINT}, + {"setStringLength", QSETSTRINGLENGTH}, + {"testinRange", QTESTINRANGE}, + { NULL, BADTOK } +} ; + +/* +** These tokens are either stand-alone tokens, or followed by +** token-specific text. +*/ + +struct skeyword s_keytable[] = { + { "anytype", QANYTYPE } , + { "integraltype", QINTEGRALTYPE } , + { "unsignedintegraltype", QUNSIGNEDINTEGRALTYPE } , + { "signedintegraltype", QSIGNEDINTEGRALTYPE } , + { "out", QOUT } , + { "in", QIN } , + { "only", QONLY } , + { "owned", QOWNED } , + { "dependent", QDEPENDENT } , + { "partial", QPARTIAL } , + { "special", QSPECIAL } , + { "truenull", QTRUENULL } , + { "falsenull", QFALSENULL } , + { "keep", QKEEP } , + { "kept", QKEPT } , + { "notnull", QNOTNULL } , + { "abstract", QABSTRACT } , + { "concrete", QCONCRETE } , + { "mutable", QMUTABLE } , + { "immutable", QIMMUTABLE } , + { "unused", QUNUSED } , + { "external", QEXTERNAL } , + { "sef", QSEF } , + { "unique", QUNIQUE } , + { "returned", QRETURNED } , + { "exposed", QEXPOSED } , + { "refcounted", QREFCOUNTED } , + { "refs", QREFS } , + { "newref", QNEWREF } , + { "tempref", QTEMPREF } , + { "killref", QKILLREF } , + { "null", QNULL } , + { "relnull", QRELNULL } , + { "nullterminated", QNULLTERMINATED }, + { "setBufferSize", QSETBUFFERSIZE }, + { "bufferConstraint", QBUFFERCONSTRAINT }, + { "ensuresConstraint", QENSURESCONSTRAINT }, + { "testInRange", QTESTINRANGE}, + { "MaxSet", QMAXSET}, + { "MaxRead", QMAXREAD}, + { "reldef", QRELDEF } , + { "observer", QOBSERVER } , + { "exits", QEXITS } , + { "mayexit", QMAYEXIT } , + { "trueexit", QTRUEEXIT } , + { "falseexit", QFALSEEXIT } , + { "neverexit", QNEVEREXIT } , + { "temp", QTEMP } , + { "shared", QSHARED } , + { "ref", QREF } , + { "unchecked", QUNCHECKED } , + { "checked", QCHECKED } , + { "checkmod", QCHECKMOD } , + { "checkedstrict", QCHECKEDSTRICT } , + { "innercontinue", QINNERCONTINUE } , + { "innerbreak", QINNERBREAK } , + { "loopbreak", QLOOPBREAK } , + { "switchbreak", QSWITCHBREAK } , + { "safebreak", QSAFEBREAK } , + { "fallthrough", QFALLTHROUGH } , + { "l_fallthrou", QLINTFALLTHROUGH } , + { "l_fallth", QLINTFALLTHRU } , + { "notreached", QNOTREACHED } , + { "l_notreach", QLINTNOTREACHED } , + { "printflike", QPRINTFLIKE } , + { "l_printfli", QLINTPRINTFLIKE } , + { "scanflike", QSCANFLIKE } , + { "messagelike", QMESSAGELIKE } , + { "l_argsus", QARGSUSED } , + { NULL, BADTOK } +} ; + +/* +** would be better if these weren't hard coded... +*/ + +static bool isArtificial (cstring s) +{ + return (cstring_equalLit (s, "modifies") + || cstring_equalLit (s, "globals") + || cstring_equalLit (s, "alt")); +} + +void swallowMacro (void) +{ + int i; + bool skipnext = FALSE; + + while ((i = lminput ()) != EOF) + { + char c = (char) i; + + + if (c == '\\') + { + skipnext = TRUE; + } + else if (c == '\n') + { + if (skipnext) + { + skipnext = FALSE; + } + else + { + checkUngetc (i, yyin); + return; + } + } + } + + if (i != EOF) + { + checkUngetc (i, yyin); + } +} + +static int commentMarkerToken (cstring s) +{ + int i = 0; + + while (s_parsetable[i].name != NULL) + { + if (cstring_equalLit (s, s_parsetable[i].name)) + { + return s_parsetable[i].token; + } + + i++; + } + + return BADTOK; +} + +static int tokenMacroCode (cstring s) +{ + int i = 0; + + while (s_keytable[i].name != NULL) + { + if (cstring_equalLit (s, s_keytable[i].name)) + { + if (s_keytable[i].token == QLINTFALLTHROUGH) + { + voptgenerror + (FLG_WARNLINTCOMMENTS, + cstring_makeLiteral + ("Traditional lint comment /*FALLTHROUGH*/ used. " + "This is interpreted by " + "LCLint in the same way as most Unix lints, but it is " + "preferable to replace it with the /*@fallthrough@*/ " + "stylized comment"), + g_currentloc); + return QFALLTHROUGH; + } + else if (s_keytable[i].token == QLINTFALLTHRU) + { + voptgenerror + (FLG_WARNLINTCOMMENTS, + cstring_makeLiteral + ("Traditional lint comment /*FALLTHRU*/ used. " + "This is interpreted by " + "LCLint in the same way as most Unix lints, but it is " + "preferable to replace it with the /*@fallthrough@*/ " + "stylized comment"), + g_currentloc); + return QFALLTHROUGH; + } + else if (s_keytable[i].token == QLINTNOTREACHED) + { + voptgenerror + (FLG_WARNLINTCOMMENTS, + cstring_makeLiteral + ("Traditional lint comment /*NOTREACHED*/ used. " + "This is interpreted by " + "LCLint in the same way as most Unix lints, but it is " + "preferable to replace it with the /*@notreached@*/ " + "stylized comment."), + g_currentloc); + + return QNOTREACHED; + } + else if (s_keytable[i].token == QPRINTFLIKE) + { + setSpecialFunction (QU_PRINTFLIKE); + return SKIPTOK; + } + else if (s_keytable[i].token == QLINTPRINTFLIKE) + { + voptgenerror + (FLG_WARNLINTCOMMENTS, + cstring_makeLiteral + ("Traditional lint comment /*PRINTFLIKE*/ used. " + "This is interpreted by " + "LCLint in the same way as most Unix lints, but it is " + "preferable to replace it with either /*@printflike@*/, " + "/*@scanflike@*/ or /*@messagelike@*/."), + g_currentloc); + + setSpecialFunction (QU_PRINTFLIKE); + return SKIPTOK; + } + else if (s_keytable[i].token == QSCANFLIKE) + { + setSpecialFunction (QU_SCANFLIKE); + return SKIPTOK; + } + else if (s_keytable[i].token == QMESSAGELIKE) + { + setSpecialFunction (QU_MESSAGELIKE); + return SKIPTOK; + } + else if (s_keytable[i].token == QARGSUSED) + { + voptgenerror + (FLG_WARNLINTCOMMENTS, + cstring_makeLiteral + ("Traditional lint comment /*ARGSUSED*/ used. " + "This is interpreted by " + "LCLint in the same way as most Unix lints, but it is " + "preferable to use /*@unused@*/ annotations on " + "the unused parameters."), + g_currentloc); + + setArgsUsed (); + return SKIPTOK; + } + + return s_keytable[i].token; + } + + i++; + } + + return BADTOK; +} + +static int lminput () +{ + if (savechar == '\0') + { + incColumn (); + return (input ()); + } + else + { + int save = (int) savechar; + savechar = '\0'; + return save; + } +} + +static void lmsavechar (char c) +{ + if (savechar == '\0') savechar = c; + else + { + llbuglit ("lmsavechar: override"); + } +} + +static int returnFloat (ctype ct, double f) +{ + yylval.expr = exprNode_floatLiteral (f, ct, cstring_fromChars (yytext), + fileloc_decColumn (g_currentloc, tokLength)); + tokLength = 0; + return (CCONSTANT); +} + +static int returnInt (ctype ct, long i) +{ + ctype c = ct; + + if (ctype_equal (ct, ctype_int)) + { + if (i == 0) + { + c = context_typeofZero (); + } + else if (i == 1) + { + c = context_typeofOne (); + } + } + + yylval.expr = exprNode_numLiteral (c, cstring_fromChars (yytext), + fileloc_decColumn (g_currentloc, tokLength), i); + tokLength = 0; + return (CCONSTANT); +} + +static int returnChar (char c) +{ + yylval.expr = exprNode_charLiteral (c, cstring_fromChars (yytext), + fileloc_decColumn (g_currentloc, tokLength)); + tokLength = 0; + return (CCONSTANT); +} + +static int ninput () +{ + int c = lminput (); + + if (c != EOF && ((char)c == '\n')) + { + context_incLineno (); + } + + return c; +} + +static char macro_nextChar () +{ + static bool in_quote = FALSE, in_escape = FALSE, in_char = FALSE; + int ic; + char c; + + ic = lminput (); + c = char_fromInt (ic); + + if (!in_quote && !in_char && (c == '\\' || c == BEFORE_COMMENT_MARKER[0])) + { + if (c == '\\') + { + while ((c = char_fromInt (lminput ())) != '\0' && c != '\n') + { + ; /* skip to newline */ + } + + context_incLineno (); + + if (c != '\0') + { + return macro_nextChar (); + } + else + { + return c; + } + } + else /* if (c == '@') */ + { + if (handleLlSpecial () != BADTOK) + { + llerrorlit (FLG_SYNTAX, "Macro cannot use special syntax"); + } + + return macro_nextChar (); + } + } + else if (!in_escape && c == '\"') + { + in_quote = !in_quote; + } + else if (!in_escape && c == '\'') + { + in_char = !in_char; + } + else if ((in_quote || in_char) && c == '\\') + { + in_escape = !in_escape; + } + else if ((in_quote || in_char) && in_escape) + { + in_escape = FALSE; + } + else if (!in_quote && c == '/') + { + char c2; + + if ((c2 = char_fromInt (lminput ())) == '*') + { + while (c2 != '\0') + { + while ((c2 = char_fromInt (lminput ())) != '\0' + && c2 != '\n' && c2 != '*') + { + ; + } + + if (c2 == '*') + { + while ((c2 = char_fromInt (lminput ())) != '\0' + && c2 == '*') + { + ; + } + + if (c2 == '/') + { + goto outofcomment; + } + } + else + { + llfatalerror (cstring_makeLiteral ("Macro: bad comment!")); + } + } + outofcomment: + return macro_nextChar (); + } + else + { + /*** putchar does not work! why? puts to stdio...??! ***/ + lmsavechar (c2); + } + } + return c; +} + +/* +** keeps stylized comments +*/ + +static char macro_nextCharC () +{ + static bool in_quote = FALSE, in_escape = FALSE, in_char = FALSE; + char c; + + c = char_fromInt (lminput ()); + + if (!in_quote && !in_char && c == '\\') + { + while ((c = char_fromInt (lminput ())) != '\0' && c != '\n') + { + ; /* skip to newline */ + } + + context_incLineno (); + + if (c != '\0') + { + return macro_nextCharC (); + } + else + { + return c; + } + } + else if (!in_escape && c == '\"') + { + in_quote = !in_quote; + } + else if (!in_escape && c == '\'') + { + in_char = !in_char; + } + else if ((in_quote || in_char) && c == '\\') + { + in_escape = !in_escape; + } + else if ((in_quote || in_char) && in_escape) + { + in_escape = FALSE; + } + else if (!in_quote && c == '/') + { + char c2; + + if ((c2 = char_fromInt (lminput ())) == '*') + { + while (c2 != '\0') + { + while ((c2 = char_fromInt (lminput ())) != '\0' + && c2 != '\n' && c2 != '*') + { + ; + } + + if (c2 == '*') + { + while ((c2 = char_fromInt (lminput ())) != '\0' + && c2 == '*') + { + ; + } + + if (c2 == '/') + { + goto outofcomment; + } + } + else + { + llfatalerror (cstring_makeLiteral ("Macro: bad comment!")); + } + } + outofcomment: + return macro_nextCharC (); + } + else + { + lmsavechar (c2); + } + } + return c; +} + +/* +** skips whitespace (handles line continuations) +** returns first non-whitespace character +*/ + +static char skip_whitespace () +{ + char c; + + while ((c = macro_nextChar ()) == ' ' || c == '\t') + { + ; + } + + return c; +} + +static void handleMacro () +{ + cstring mac = cstring_undefined; + int macrocode; + char c; + + while (currentColumn () > 2) + { + mac = cstring_appendChar (mac, ' '); + setTokLength (-1); + } + + c = macro_nextCharC (); + + if (c >= '0' && c <= '9') + { + int i; + + for (i = 0; i < ((c - '0') + 1); i++) + { + mac = cstring_appendChar (mac, ' '); + } + } + else + { + BADBRANCH; + } + + while (((c = macro_nextCharC ()) != '\0') && (c != '\n')) + { + mac = cstring_appendChar (mac, c); + } + + + macrocode = tokenMacroCode (mac); + + if (macrocode == BADTOK && !isArtificial (mac)) + { + DPRINTF (("Add macro: %s", mac)); + context_addMacroCache (mac); + } + else + { + cstring_free (mac); + } + + if (c == '\n') + { + context_incLineno (); + } +} + +static bool processMacro (void) +{ + uentry e2; + ctype ct; + int noparams = 0; + cstring fname = cstring_undefined; + bool res = TRUE; + bool isspecfcn = FALSE; + bool isiter = FALSE; + bool skipparam = FALSE; + bool isenditer = FALSE; + bool unknownm = FALSE; + bool hasParams = FALSE; + bool emptyMacro = FALSE; + char c = skip_whitespace (); + fileloc loc = fileloc_noColumn (g_currentloc); + + /* are both of these necessary? what do they mean? */ + uentryList specparams = uentryList_undefined; + uentryList pn = uentryList_undefined; + + context_resetMacroMissingParams (); + + if (c == '\0' || c == '\n') + { + llcontbug (cstring_makeLiteral ("Bad macro")); + fileloc_free (loc); + return FALSE; + } + + fname = cstring_appendChar (fname, c); + + while ((c = macro_nextChar ()) != '(' && c != '\0' + && c != ' ' && c != '\t' && c != '\n') + { + fname = cstring_appendChar (fname, c); + } + + if (c == ' ' || c == '\t' || c == '\n') + { + char oldc = c; + + if (c != '\n') + { + while (c == ' ' || c == '\t') + { + c = macro_nextChar (); + } + unput (c); + } + + if (c == '\n') + { + emptyMacro = TRUE; + unput (c); + } + + c = oldc; + } + + hasParams = (c == '('); + + + if (usymtab_exists (fname)) + { + e2 = usymtab_lookupExpose (fname); + ct = uentry_getType (e2); + + + if (uentry_isCodeDefined (e2) + && fileloc_isUser (uentry_whereDefined (e2))) + { + if (optgenerror + (FLG_MACROREDEF, + message ("Macro %s already defined", fname), + loc)) + { + uentry_showWhereDefined (e2); + uentry_clearDefined (e2); + } + + if (uentry_isFunction (e2)) + { + uentry_setType (e2, ctype_unknown); + ct = ctype_unknown; + unknownm = TRUE; + context_enterUnknownMacro (e2); + } + else + { + context_enterConstantMacro (e2); + } + } + else + { + if (uentry_isForward (e2) && uentry_isFunction (e2)) + { + unknownm = TRUE; + + voptgenerror + (FLG_MACROFCNDECL, + message + ("Parameterized macro has no prototype or specification: %s ", + fname), + loc); + + ct = ctype_unknown; + uentry_setType (e2, ctype_unknown); + uentry_setFunctionDefined (e2, loc); + uentry_setUsed (e2, fileloc_undefined); + context_enterUnknownMacro (e2); + } + else + { + if (uentry_isIter (e2)) + { + isiter = TRUE; + specparams = uentry_getParams (e2); + noparams = uentryList_size (specparams); + uentry_setDefined (e2, loc); + context_enterIterDef (e2); + } + else if (uentry_isEndIter (e2)) + { + isenditer = TRUE; + uentry_setDefined (e2, loc); + context_enterIterEnd (e2); /* don't care about it now */ + /* but should parse like an iter! */ + } + else if (uentry_isConstant (e2)) + { + if (hasParams) + { + voptgenerror + (FLG_INCONDEFS, + message ("Constant %s implemented as parameterized macro", + fname), + g_currentloc); + + uentry_showWhereSpecified (e2); + uentry_setType (e2, ctype_unknown); + uentry_makeVarFunction (e2); + uentry_setDefined (e2, g_currentloc); + uentry_setFunctionDefined (e2, g_currentloc); + context_enterUnknownMacro (e2); + } + else + { + if (!uentry_isSpecified (e2)) + { + fileloc oloc = uentry_whereDeclared (e2); + + if (fileloc_isLib (oloc)) + { + ; + } + else if (fileloc_isUndefined (oloc) + || fileloc_isPreproc (oloc)) + { + if (!emptyMacro) + { + voptgenerror + (FLG_MACROCONSTDECL, + message + ("Macro constant %q not declared", + uentry_getName (e2)), + loc); + } + } + else if (!fileloc_withinLines (oloc, loc, 2)) + { /* bogus! will give errors if there is too much whitespace */ + voptgenerror + (FLG_SYNTAX, + message + ("Macro constant name %s does not match name in " + "previous constant declaration. This constant " + "is declared at %q", fname, + fileloc_unparse (oloc)), + loc); + } + } + + context_enterConstantMacro (e2); + cstring_free (fname); + fileloc_free (loc); + return res; + } + + } + else if (ctype_isFunction (ct)) + { + isspecfcn = TRUE; + specparams = ctype_argsFunction (ct); + noparams = uentryList_size (specparams); + + uentry_setFunctionDefined (e2, loc); + context_enterMacro (e2); + } + else if (uentry_isVar (e2)) + { + if (hasParams) + { + voptgenerror + (FLG_INCONDEFS, + message ("Variable %s implemented as parameterized macro", + fname), + loc); + + uentry_showWhereSpecified (e2); + uentry_setType (e2, ctype_unknown); + uentry_makeVarFunction (e2); + uentry_setDefined (e2, g_currentloc); + uentry_setFunctionDefined (e2, g_currentloc); + context_enterUnknownMacro (e2); + } + else + { + uentry ucons = uentry_makeConstant (fname, + ctype_unknown, + loc); + if (uentry_isExpandedMacro (e2)) + { + ; /* okay */ + } + else + { + if (optgenerror + (FLG_INCONDEFS, + message ("Variable %s implemented by a macro", + fname), + loc)) + { + uentry_showWhereSpecified (e2); + } + } + + uentry_setDefined (e2, loc); + uentry_setUsed (ucons, loc); + + context_enterConstantMacro (ucons); + uentry_markOwned (ucons); + cstring_free (fname); + return res; + } + } + else + { + if (uentry_isDatatype (e2)) + { + vgenhinterror + (FLG_SYNTAX, + message ("Type implemented as macro: %x", + uentry_getName (e2)), + message ("A type is implemented using a macro definition. A " + "typedef should be used instead."), + g_currentloc); + + swallowMacro (); + /* Must exit scope (not sure why a new scope was entered?) */ + usymtab_quietExitScope (g_currentloc); + uentry_setDefined (e2, g_currentloc); + res = FALSE; + } + else + { + llcontbug + (message ("Unexpanded macro not function or constant: %q", + uentry_unparse (e2))); + uentry_setType (e2, ctype_unknown); + + if (hasParams) + { + uentry_makeVarFunction (e2); + uentry_setDefined (e2, g_currentloc); + uentry_setFunctionDefined (e2, g_currentloc); + context_enterUnknownMacro (e2); + } + } + } + } + } + } + else + { + uentry ce; + + voptgenerror + (FLG_MACROMATCHNAME, + message ("Unexpanded macro %s does not match name of a constant " + "or iter declaration. The name used in the control " + "comment on the previous line should match. " + "(Assuming macro defines a constant.)", + fname), + loc); + + + ce = uentry_makeConstant (fname, ctype_unknown, fileloc_undefined); + uentry_setUsed (ce, loc); /* perhaps bogus? */ + e2 = usymtab_supEntryReturn (ce); + + context_enterConstantMacro (e2); + cstring_free (fname); + fileloc_free (loc); + return res; + } + + /* in macros, ( must follow immediatetly after name */ + + if (hasParams) + { + int paramno = 0; + + c = skip_whitespace (); + + while (c != ')' && c != '\0') + { + uentry param; + bool suppress = context_inSuppressRegion (); + cstring paramname = cstring_undefined; + + /* + ** save the parameter location + */ + + decColumn (); + context_saveLocation (); + incColumn (); + + while (c != ' ' && c != '\t' && c != ',' && c != '\0' && c != ')') + { + paramname = cstring_appendChar (paramname, c); + c = macro_nextChar (); + } + + if (c == ' ' || c == '\t') c = skip_whitespace (); + + if (c == ',') + { + c = macro_nextChar (); + if (c == ' ' || c == '\t') c = skip_whitespace (); + } + + if (c == '\0') + { + llfatalerror (cstring_makeLiteral + ("Bad macro syntax: uentryList")); + } + + if ((isspecfcn || isiter) && (paramno < noparams) + && !uentry_isElipsisMarker (uentryList_getN + (specparams, paramno))) + { + uentry decl = uentryList_getN (specparams, paramno); + sRef sr; + + param = uentry_nameCopy (paramname, decl); + + + uentry_setParam (param); + sr = sRef_makeParam (paramno, uentry_getType (param)); + + if (sRef_getNullState (sr) == NS_ABSNULL) + { + ctype pt = ctype_realType (uentry_getType (param)); + + if (ctype_isUser (pt)) + { + uentry te = usymtab_getTypeEntrySafe (ctype_typeId (pt)); + + if (uentry_isValid (te)) + { + sRef_setStateFromUentry (sr, te); + } + } + else + { + sRef_setNullState (sr, NS_UNKNOWN, g_currentloc); + } + } + + uentry_setSref (param, sr); + uentry_setDeclaredForceOnly (param, context_getSaveLocation ()); + + skipparam = isiter && uentry_isOut (uentryList_getN (specparams, paramno)); + } + else + { + fileloc sloc = context_getSaveLocation (); + + param = uentry_makeVariableSrefParam + (paramname, ctype_unknown, sRef_makeParam (paramno, ctype_unknown)); + cstring_free (paramname); + + sRef_setPosNull (uentry_getSref (param), sloc); + + uentry_setDeclaredForce (param, sloc); + + skipparam = FALSE; + fileloc_free (sloc); + } + + if (!skipparam) + { + llassert (!uentry_isElipsisMarker (param)); + + if (!suppress) + { + sRef_makeUnsafe (uentry_getSref (param)); + } + + pn = uentryList_add (pn, uentry_copy (param)); + usymtab_supEntry (param); + } + else + { + /* don't add param */ + uentry_free (param); + } + + if (c == ',') + { + (void) macro_nextChar (); + c = skip_whitespace (); + } + + paramno++; + } + + if (c == ')') + { + if (isspecfcn || isiter) + { + if (paramno != noparams && noparams >= 0) + { + advanceLine (); + + voptgenerror + (FLG_INCONDEFS, + message ("Macro %s specified with %d args, defined with %d", + fname, noparams, paramno), + g_currentloc); + + uentry_showWhereSpecified (e2); + uentry_resetParams (e2, pn); + } + } + else + { + uentry_resetParams (e2, pn); + } + } + } + else + { + /* + ** the form should be: + ** + ** # define newname oldname + ** where oldname refers to a function matching the specification + ** of newname. + */ + + if (unknownm) + { + sRef_setGlobalScope (); + usymtab_supGlobalEntry (uentry_makeVariableLoc (fname, ctype_unknown)); + sRef_clearGlobalScope (); + } + else + { + context_setMacroMissingParams (); + } + } + + + /* context_setuentryList (pn); */ + usymtab_enterScope (); + + fileloc_free (loc); + cstring_free (fname); + + return res; +} + +static bool handleSpecial (char *yyt) +{ + char *l = mstring_create (MAX_NAME_LENGTH); + static bool reportcpp = FALSE; + int lineno = 0; + char c; + char *ol; + cstring olc; + + strcpy (l, yyt + 1); + + /* Need to safe original l for deallocating. */ + ol = l; + + l += strlen (yyt) - 1; + + while ((c = char_fromInt (lminput ())) != '\n' && c != '\0') + { + *l++ = c; + } + + *l = '\0'; + olc = cstring_fromChars (ol); + + if (cstring_equalPrefix (olc, "pragma")) + { + char *pname = mstring_create (longUnsigned_fromInt (MAX_PRAGMA_LEN)); + char *opname = pname; + char *ptr = ol + 6; /* pragma is six characters, plus space */ + int len = 0; + + + /* skip whitespace */ + while (((c = *ptr) != '\0') && isspace (c)) + { + ptr++; + } + + + while (((c = *ptr) != '\0') && !isspace (c)) + { + len++; + + if (len > MAX_PRAGMA_LEN) + { + break; + } + + ptr++; + *pname++ = c; + } + + *pname = '\0'; + + if (len == PRAGMA_LEN_EXPAND + && mstring_equal (opname, PRAGMA_EXPAND)) + { + cstring exname = cstring_undefined; + uentry ue; + + ptr++; + while (((c = *ptr) != '\0') && !isspace (c)) + { + exname = cstring_appendChar (exname, c); + ptr++; + } + + + ue = usymtab_lookupExposeGlob (exname); + + if (uentry_isExpandedMacro (ue)) + { + if (fileloc_isPreproc (uentry_whereDefined (ue))) + { + fileloc_setColumn (g_currentloc, 1); + uentry_setDefined (ue, g_currentloc); + } + } + + cstring_free (exname); + } + } + else if (cstring_equalPrefix (olc, "ident")) + { + /* Some pre-processors will leave these in the code. Ignore rest of line */ + } + /* + ** Yuk...Win32 filenames can have spaces in them...we need to read + ** to the matching end quote. + */ + else if ((sscanf (ol, "line %d \"", &lineno) == 1) + || (sscanf (ol, " %d \"", &lineno) == 1)) + { + char *tmp = ol; + char *fname; + fileId fid; + + while (*tmp != '\"' && *tmp != '\0') + { + tmp++; + } + + llassert (*tmp == '\"'); + + tmp++; + fname = tmp; + + while (*tmp != '\"' && *tmp != '\0') + { + tmp++; + } + + llassert (*tmp == '\"'); + + *tmp = '\0'; + + DPRINTF (("fname: %s", fname)); + +# if defined(OS2) || defined(MSDOS) || defined(WIN32) + + /* + ** DOS-like path delimiters get delivered in pairs, something like + ** \"..\\\\file.h\", so we have to make it normal again. We do NOT + ** remove the pre dirs yet as we usually specify tmp paths relative + ** to the current directory, so tmp files would not get found in + ** the hash table. If this method fails we try it again later. + */ + + { + char *stmp = fname; + + /* + ** Skip past the drive marker. + */ + + DPRINTF (("stmp: %s / %s", stmp, fname)); + + if (strchr (stmp, ':') != NULL) + { + stmp = strchr (stmp, ':') + 1; + } + + DPRINTF (("stmp: %s / %s", stmp, fname)); + + while ((stmp = strchr (stmp, CONNECTCHAR)) != NULL ) + { + if (*(stmp+1) == CONNECTCHAR) + { + memmove (stmp, stmp+1, strlen (stmp)); + } + + stmp++; + DPRINTF (("stmp: %s / %s", stmp, fname)); + } + + DPRINTF (("Now: base = %s", fname)); + + fid = fileTable_lookupBase (context_fileTable (), + cstring_fromChars (fname)); + if (!(fileId_isValid (fid))) + { + fname = removePreDirs (fname); + fid = fileTable_lookupBase (context_fileTable (), + cstring_fromChars (fname)); + } + } +# else /* !defined(OS2) && !defined(MSDOS) */ + fname = removePreDirs (fname); + fid = fileTable_lookupBase (context_fileTable (), + cstring_fromChars (fname)); +# endif /* !defined(OS2) && !defined(MSDOS) */ + + if (!(fileId_isValid (fid))) + { + if (isHeaderFile (cstring_fromChars (fname))) + { + fid = fileTable_addHeaderFile (context_fileTable (), + cstring_fromChars (fname)); + } + else + { + fid = fileTable_addFile (context_fileTable (), + cstring_fromChars (fname)); + } + } + + setFileLine (fid, lineno); + } + else if ((sscanf (ol, "line %d", &lineno) == 1) + || (sscanf (ol, " %d", &lineno) == 1)) + { + setLine (lineno); /* next line is */ + } + else + { + if (mstring_equal (ol, "")) { + DPRINTF (("Empty pp command!")); + /* + ** evs 2000-05-16: This is a horrible kludge, to get around a bug (well, difficulty) in the pre-processor. + ** We handle a plain # in the input file, by echoing it, and ignoring it in the post-pp-file. + */ + mstring_free (ol); + return FALSE; + } else { + if (!reportcpp) + { + + } else { + llbug (message ("File contains preprocessor command: #%s", + cstring_fromChars (ol))); + reportcpp = TRUE; + } + } + + sfree (ol); + return TRUE; + } + + sfree (ol); + return FALSE; +} + +static int handleLlSpecial () +{ + int ic; + char c; + char *s = mstring_createEmpty (); + char *os; + int tok; + int charsread = 0; + + while (((ic = ninput ()) != 0) && isalpha (ic)) + { + c = (char) ic; + s = mstring_append (s, c); + charsread++; + } + + os = s; + + if (charsread == 0 && ic == (int) AFTER_COMMENT_MARKER[0]) + { + ic = ninput (); + + llassert (ic == AFTER_COMMENT_MARKER[1]); + + + if (isProcessingGlobMods () && (*s == '\0')) + { + sfree (os); + return QNOMODS; /* special token no modifications token */ + } + else + { + ; + } + } + + tok = commentMarkerToken (cstring_fromChars (os)); + + if (tok != BADTOK) + { + tokLength = charsread; + sfree (os); + inSpecPart = TRUE; + return tok; + } + + /* Add rest of the comment */ + + if (ic != 0 && ic != EOF) + { + c = (char) ic; + + + s = mstring_append (s, c); + charsread++; + + while (((ic = ninput ()) != 0) && (ic != EOF) + && (ic != AFTER_COMMENT_MARKER[0])) + { + c = (char) ic; + s = mstring_append (s, c); + charsread++; + } + } + + if (ic == AFTER_COMMENT_MARKER[0]) + { + int nc = ninput (); + llassert ((char) nc == AFTER_COMMENT_MARKER[1]); + charsread++; + } + + + os = s; + + while (*s == ' ' || *s == '\t' || *s == '\n') + { + s++; + } + + if (*s == '-' || *s == '+' || *s == '=') /* setting flags */ + { + c = *s; + + while (c == '-' || c == '+' || c == '=') + { + ynm set = ynm_fromCodeChar (c); + cstring thisflag; + + s++; + + thisflag = cstring_fromChars (s); + + while ((c = *s) != '\0' && (c != '-') && (c != '=') + && (c != '+') && (c != ' ') && (c != '\t') && (c != '\n')) + { + s++; + } + + *s = '\0'; + + if (!context_getFlag (FLG_NOCOMMENTS)) + { + cstring flagname = thisflag; + flagcode fflag = identifyFlag (flagname); + + if (flagcode_isSkip (fflag)) + { + ; + } + else if (flagcode_isInvalid (fflag)) + { + if (isMode (flagname)) + { + if (ynm_isMaybe (set)) + { + llerror + (FLG_BADFLAG, + message + ("Stylized comment attempts to restore flag %s. " + "A mode flag cannot be restored.", + flagname)); + } + else + { + context_setMode (flagname); + } + } + else + { + llerror + (FLG_BADFLAG, + message ("Unrecognized option in stylized comment: %s", + flagname)); + } + } + else if (flagcode_isGlobalFlag (fflag)) + { + llerror + (FLG_BADFLAG, + message + ("Stylized comment attempts to set global flag %s. " + "A global flag cannot be set locally.", + flagname)); + } + else + { + context_fileSetFlag (fflag, set); + + if (flagcode_hasArgument (fflag)) + { + if (ynm_isMaybe (set)) + { + llerror + (FLG_BADFLAG, + message + ("Stylized comment attempts to restore flag %s. " + "A flag for setting a value cannot be restored.", + flagname)); + } + else + { /* cut-and-pastied from llmain...blecch */ + cstring extra = cstring_undefined; + char *rest; + char *orest; + char rchar; + + *s = c; + rest = mstring_copy (s); + orest = rest; + *s = '\0'; + + while ((rchar = *rest) != '\0' + && (isspace (rchar))) + { + rest++; + s++; + } + + while ((rchar = *rest) != '\0' + && !isspace (rchar)) + { + extra = cstring_appendChar (extra, rchar); + rest++; + s++; + } + + sfree (orest); + + if (cstring_isUndefined (extra)) + { + llerror + (FLG_BADFLAG, + message + ("Flag %s (in stylized comment) must be followed by an argument", + flagcode_unparse (fflag))); + } + else + { + s--; + + if (flagcode_hasValue (fflag)) + { + setValueFlag (fflag, extra); + } + else if (flagcode_hasString (fflag)) + { + setStringFlag (fflag, extra); + } + else + { + BADEXIT; + } + } + } + } + } + } + else + { + ; + } + + *s = c; + while ((c == ' ') || (c == '\t') || (c == '\n')) + { + c = *(++s); + } + } + + if (context_inHeader () && !isArtificial (cstring_fromChars (os))) + { + context_addComment (cstring_fromCharsNew (os)); + } + else + { + ; + } + } + else + { + char *t = s; + int macrocode; + char tchar = '\0'; + + while (*s != '\0' && *s != ' ' && *s != '\t' && *s != '\n') + { + s++; + } + + if (*s != '\0') + { + tchar = *s; + *s = '\0'; + s++; + } + + t = cstring_toCharsSafe (cstring_downcase (cstring_fromChars (t))); + macrocode = tokenMacroCode (cstring_fromChars (t)); + + if (macrocode != BADTOK) + { + tokLength = mstring_length (t); + + + sfree (t); + sfree (os); + + if (macrocode == SKIPTOK) + { + return BADTOK; + } + + return macrocode; + } + + if (context_inHeader ()) + { + if (tchar != '\0') + { + *(s-1) = tchar; + } + + if ((context_inMacro () || context_inGlobalContext ()) + && macrocode != SKIPTOK + && !isArtificial (cstring_fromChars (os))) + { + context_addComment (cstring_fromCharsNew (os)); + } + else + { + ; + } + + if (tchar != '\0') + { + *(s-1) = '\0'; + } + } + + if (mstring_equal (t, "ignore")) + { + if (!context_getFlag (FLG_NOCOMMENTS)) + { + context_enterSuppressRegion (); + } + } + else if ((*t == 'i' || *t == 't') + && (*(t + 1) == '\0')) + { + if (!context_getFlag (FLG_NOCOMMENTS) + && (*t == 'i' || context_getFlag (FLG_TMPCOMMENTS))) + { + context_enterSuppressLine (-1); /* infinite suppression */ + } + } + else if (((*t == 'i') || (*t == 't')) + && ((*(t + 1) >= '0' && *(t + 1) <= '9'))) + { + bool tmpcomment = (*t == 't'); + int val = -1; + char *tt = t; /* don't mangle t, since it is free'd */ + char lc = *(++tt); + + if (lc >= '0' && lc <= '9') + { + val = (int)(lc - '0'); + + lc = *(++tt); + while (lc >= '0' && lc <= '9') + { + val *= 10; + val += lc - '0'; + lc = *(++tt); + } + } + + + if (!context_getFlag (FLG_NOCOMMENTS) + && (!tmpcomment || context_getFlag (FLG_TMPCOMMENTS))) + { + context_enterSuppressLine (val); + } + } + else if (mstring_equal (t, "end")) + { + if (!context_getFlag (FLG_NOCOMMENTS)) + { + context_exitSuppressRegion (); + } + } + else if (mstring_equal (t, "notfunction")) + { + ; /* handled by pcpp */ + } + else if (mstring_equal (t, "access")) + { + cstring tname; + + while (TRUE) + { + while ((c = *s) && (c == ' ' || c == '\t' || c == '\n')) + { + s++; + } + + if (c == '\0') + { + break; + } + + tname = cstring_fromChars (s); + + while ((c = *s) != '\0' && c != ' ' + && c != '\t' && c != '\n' && c != ',') + { + s++; + } + + *s = '\0'; + + + if (!context_getFlag (FLG_NOCOMMENTS) + && !context_getFlag (FLG_NOACCESS)) + { + if (usymtab_existsType (tname)) + { + usymId uid = usymtab_getTypeId (tname); + context_addFileAccessType (uid); + } + else + { + if (!(context_inSuppressRegion () + || context_inSuppressZone (g_currentloc))) + { + llmsg + (message + ("%q: Unrecognized type %s used in access comment", + fileloc_unparse (g_currentloc), tname)); + } + } + } + + if (c != '\0') + { + s++; + } + + if (c != ',' && c != ' ') + { + break; + } + } + } + else if (mstring_equal (t, "noaccess")) + { + cstring tname; + char lc; + + while (TRUE) + { + while ((lc = *s) && (lc == ' ' || lc == '\t' || lc == '\n')) + { + s++; + } + + if (lc == '\0') + { + break; + } + + tname = cstring_fromChars (s); + + while ((lc = *s) != '\0' && lc != ' ' && lc != '\t' + && lc != '\n' && lc != ',') + { + s++; + } + + *s = '\0'; + + if (!context_getFlag (FLG_NOCOMMENTS) + && !context_getFlag (FLG_NOACCESS)) + { + if (usymtab_existsType (tname)) + { + typeId tuid = usymtab_getTypeId (tname); + + if (context_couldHaveAccess (tuid)) + { + context_removeFileAccessType (tuid); + } + else + { + if (!(context_inSuppressRegion () + || context_inSuppressZone (g_currentloc))) + { + uentry ue = usymtab_getTypeEntry (tuid); + + if (uentry_isAbstractDatatype (ue)) + { + llmsg + (message + ("%q: Non-accessible abstract type %s used in noaccess comment", + fileloc_unparse (g_currentloc), tname)); + } + else + { + llmsg + (message + ("%q: Non-abstract type %s used in noaccess comment", + fileloc_unparse (g_currentloc), tname)); + } + } + } + } + else + { + if (!(context_inSuppressRegion () + || context_inSuppressZone (g_currentloc))) + { + llmsg + (message + ("%q: Unrecognized type %s used in noaccess comment", + fileloc_unparse (g_currentloc), tname)); + } + } + } + + if (lc != '\0') + { + s++; + } + + if (lc != ',' && lc != ' ') + { + break; + } + } + } + else + { + setTokLength (- (2 + charsread)); + + voptgenerror (FLG_UNRECOGCOMMENTS, + message ("Stylized comment unrecognized: %s", + cstring_fromChars (os)), + g_currentloc); + } + + sfree (t); + } + + sfree (os); + return BADTOK; +} + +static /*@only@*/ cstring makeIdentifier (char *s) +{ + char *c = mstring_create (size_toInt (strlen (s)) + 1); + cstring id = cstring_fromChars (c); + + while (isalnum (*s) || (*s == '_') || (*s == '$')) + { + *c++ = *s++; + } + + *c = '\0'; + return (id); +} + +/*@observer@*/ /*@dependent@*/ uentry coerceId (cstring cn) +{ + if (!(usymtab_exists (cn))) + { + fileloc loc = fileloc_createExternal (); + + /* + ** We need to put this in a global scope, otherwise the sRef will be deallocated. + */ + + uentry ce = uentry_makeUnrecognized (cn, loc); + + if (!context_inIterEnd ()) + { + voptgenerror + (FLG_SYSTEMUNRECOG, + message ("Unrecognized (possibly system) identifier: %q", + uentry_getName (ce)), + g_currentloc); + } + + return ce; + } + + return (usymtab_lookup (cn)); +} + +/* +** like, coerceId, but doesn't supercede for iters +*/ + +/*@observer@*/ uentry coerceIterId (cstring cn) +{ + if (!(usymtab_exists (cn))) + { + return uentry_undefined; + } + + return (usymtab_lookup (cn)); +} + +/*@observer@*/ cstring LastIdentifier () +{ + return (lastidprocessed); +} + +static int processIdentifier (cstring id) +{ + uentry le; + + DPRINTF (("Process identifier: %s", id)); + + context_clearJustPopped (); + lastidprocessed = id; + + if (context_inFunctionDecl ()) + { + int tok = commentMarkerToken (id); + + if (tok != BADTOK) + { + return tok; + } + else + { + tok = tokenMacroCode (id); + + if (tok != BADTOK) + { + return tok; + } + } + } + + /* Consider handling: Defined by C99 as static const char __func__[] */ + + if (context_getFlag (FLG_GNUEXTENSIONS)) + { + int tok = BADTOK; + + if (cstring_equalLit (id, "__stdcall") + || cstring_equalLit (id, "__cdecl") + || cstring_equalLit (id, "__extension__")) + { + return BADTOK; + } + else if (cstring_equalLit (id, "__volatile__")) + { + tok = QVOLATILE; + } + else if (cstring_equalLit (id, "__signed")) + { + tok = QSIGNED; + } + else if (cstring_equalLit (id, "__unsigned")) + { + tok = QUNSIGNED; + } + else if (cstring_equalLit (id, "__const__")) + { + tok = QCONST; + } + else if (cstring_equalLit (id, "__alignof__")) + { + tok = CALIGNOF; /* alignof is parsed like sizeof */ + } + else if (cstring_equalLit (id, "__FUNCTION__") + || cstring_equalLit (id, "__PRETTY_FUNCTION__")) + { + /* These tokens hold the name of the current function as strings */ + yylval.expr = exprNode_stringLiteral (id, fileloc_copy (g_currentloc)); + tokLength = 0; + lastWasString = TRUE; + tok = CCONSTANT; + return tok; + } + else if (cstring_equalLit (id, "__attribute__") + || cstring_equalLit (id, "__asm__") + || cstring_equalLit (id, "_asm") + || cstring_equalLit (id, "__asm") + || cstring_equalLit (id, "__declspec")) + { + int depth = 0; + bool useparens = FALSE; + bool usebraces = FALSE; + bool inquote = FALSE; + bool inescape = FALSE; + int ic; + + while ((ic = input ()) != EOF) + { + + if (inescape) + { + inescape = FALSE; + } + else if (ic == '\\') + { + inescape = TRUE; + } + else if (ic == '\"') + { + inquote = !inquote; + } + else if (!inquote) + { + if (ic == '(') + { + if (!useparens) + { + if (!usebraces) + { + useparens = TRUE; + } + } + + if (useparens) + { + depth++; + } + } + else if (ic == '{') + { + if (!usebraces) + { + if (!useparens) + { + usebraces = TRUE; + } + } + + if (usebraces) + { + depth++; + } + } + else if (ic == ')' && useparens) + { + depth--; + if (depth == 0) break; + } + else if (ic == '}' && usebraces) + { + depth--; + if (depth == 0) break; + } + else if (ic == '}' + && !usebraces && !useparens + && cstring_equalLit (id, "__asm")) + { + /* + ** We need this because some MS VC++ include files + ** have __asm mov ... } + ** Its a kludge, but otherwise would need to parse + ** the asm code! + */ + return TRBRACE; + } + } + + if (ic == '\n') + { + context_incLineno (); + + if (cstring_equalLit (id, "__asm") + && !useparens && !usebraces) + { + break; + } + } + } + + llassert ((useparens && ic == ')') + || (usebraces && ic == '}') + || (!useparens && !usebraces)); + + return BADTOK; + } + else if (cstring_equalLit (id, "inline") + || cstring_equalLit (id, "__inline") + || cstring_equalLit (id, "_inline") + || cstring_equalLit (id, "__inline__")) + { + tok = QINLINE; + } + + if (tok != BADTOK) + { + RETURN_TOK (tok); + } + } + + le = usymtab_lookupSafe (id); + + /*@-dependenttrans@*/ + + if (uentry_isIter (le)) + { + yylval.entry = le; + return (ITER_NAME); + } + else if (uentry_isEndIter (le)) + { + yylval.entry = le; + return (ITER_ENDNAME); + } + else if (uentry_isUndefined (le)) + { + yylval.cname = id; + + /* avoid parse errors for certain system built ins */ + + if (g_expectingTypeName && (cstring_firstChar (id) == '_') + && (cstring_secondChar (id) == '_')) + { + return (TYPE_NAME_OR_ID); + } + + return (NEW_IDENTIFIER); + } + else if (!uentry_isDeclared (le) && !uentry_isCodeDefined (le)) + { + if (uentry_isDatatype (le)) + { + yylval.cname = id; + return (NEW_IDENTIFIER); + } + else + { + yylval.entry = le; + return (IDENTIFIER); + } + } + else if (uentry_isDatatype (le)) + { + if (!g_expectingTypeName) + { + yylval.cname = id; + + return (NEW_IDENTIFIER); + } + else + { + yylval.ctyp = uentry_getAbstractType (le); + + uentry_setUsed (le, g_currentloc); + return (TYPE_NAME); + } + } + else + { + yylval.entry = le; + return (IDENTIFIER); + } + + /*@=dependenttrans@*/ +} + +static bool processHashIdentifier (/*@only@*/ cstring id) +{ + if (context_inMacro () || context_inIterDef () || + context_inIterEnd ()) + { + uentry le; + + context_clearJustPopped (); + + lastidprocessed = id; + le = usymtab_lookupSafe (id); + + if (uentry_isParam (le) || uentry_isRefParam (le)) + { + return TRUE; + } + else + { + return FALSE; + } + } + else + { + cstring_free (id); + return FALSE; + } +} + + +static /*@only@*/ exprNode processString () +{ + exprNode res; + fileloc loc; + char *nl = strchr (yytext, '\n'); + cstring ns = cstring_fromCharsNew (yytext); + + if (nl == NULL) + { + loc = fileloc_copy (g_currentloc); + addColumn (cstring_length (ns)); + } + else + { + char *lastnl = nl; + + loc = fileloc_copy (g_currentloc); + + context_incLineno (); + + while ((nl = strchr ((nl + 1), '\n')) != NULL) + { + context_incLineno (); + lastnl = nl; + } + } + + + res = exprNode_stringLiteral (ns, loc); + return (res); +} + +static +char processChar () +{ + char fchar; + char next; + + llassert (*yytext != '\0'); + fchar = *(yytext + 1); + if (fchar != '\\') return fchar; + + next = *(yytext + 2); + + switch (next) + { + case 'n': return '\n'; + case 't': return '\t'; + case '\"': return '\"'; + case '\'': return '\''; + case '\\': return '\\'; + default: return '\0'; + } +} + +static +double processFloat () +{ + double ret = atof (yytext); + + return (ret); +} + +static +long processHex () +{ + int index = 2; + long val = 0; + + llassert (yytext[0] == '0' + && (yytext[1] == 'X' || yytext[1] == 'x')); + + while (yytext[index] != '\0') { + int tval; + char c = yytext[index]; + + if (c >= '0' && c <= '9') { + tval = (int) c - (int) '0'; + } else if (c >= 'A' && c <= 'F') { + tval = (int) c - (int) 'A' + 10; + } else if (c >= 'a' && c <= 'f') { + tval = (int) c - (int) 'a' + 10; + } else if (c == 'U' || c == 'L' || c == 'u' || c == 'l') { + index++; + while (yytext[index] != '\0') { + if (c == 'U' || c == 'L' || c == 'u' || c == 'l') { + ; + } else { + voptgenerror + (FLG_SYNTAX, + message ("Invalid character (%c) following specifier in hex constant: %s", + c, cstring_fromChars (yytext)), + g_currentloc); + } + index++; + } + + break; + } else { + voptgenerror + (FLG_SYNTAX, + message ("Invalid character (%c) in hex constant: %s", + c, cstring_fromChars (yytext)), + g_currentloc); + break; + } + + val = (val * 16) + tval; + index++; + } + + DPRINTF (("Hex constant: %s = %ld", yytext, val)); + return val; +} + +static +long processOctal () +{ + int index = 1; + long val = 0; + + llassert (yytext[0] == '0' && yytext[1] != 'X' && yytext[1] != 'x'); + + while (yytext[index] != '\0') { + int tval; + char c = yytext[index]; + + if (c >= '0' && c <= '7') { + tval = (int) c - (int) '0'; + } else { + voptgenerror + (FLG_SYNTAX, + message ("Invalid character (%c) in octal constant: %s", + c, cstring_fromChars (yytext)), + g_currentloc); + break; + } + + val = (val * 8) + tval; + index++; + } + + DPRINTF (("Octal constant: %s = %ld", yytext, val)); + return val; +} + +static +long processDec () +{ + return (atol (yytext)); +} + +static int +processSpec (int tok) +{ + size_t length = strlen (yytext); + + + if (inSpecPart) + { + setTokLengthT (length); + RETURN_TOK (tok); + } + else + { + + context_saveLocation (); + setTokLengthT (length); + return (processIdentifier (makeIdentifier (yytext))); + } +} diff --git a/src/forjunk.c b/src/forjunk.c new file mode 100644 index 0000000..0f579ac --- /dev/null +++ b/src/forjunk.c @@ -0,0 +1,392 @@ +/* +** forjunk.c +*/ + +//#define DEBUGPRINT 1 + +# include /* for isdigit */ +# include "lclintMacros.nf" +# include "basic.h" +# include "cgrammar.h" +# include "cgrammar_tokens.h" + +# include "exprChecks.h" +# include "aliasChecks.h" +# include "exprNodeSList.h" + +# include "exprData.i" +# include "exprDataQuite.i" + + +// look for constraints like cexrp = cexrp + 1 +static bool incVar (constraint c) +{ + constraintExpr t1; + if (c->ar != EQ) + { + return FALSE; + } + if (! isInc (c->expr ) ) + return FALSE; + + llassert (c->expr->kind == binaryexpr); + t1 = constraintExprData_binaryExprGetExpr1 (c->expr->data); + if (constraintExpr_similar (c->lexpr, t1) ) + return TRUE; + + return FALSE; +} + + +static bool increments (constraint c, + constraintExpr var) +{ + llassert (incVar (c)); + if (constraintExpr_similar (c->lexpr, var) ) + return TRUE; + else + return FALSE; +} + +static bool canGetForTimes ( exprNode forPred, exprNode forBody) +{ + + exprNode init, test, inc, t1, t2; + lltok tok; + + init = exprData_getTripleInit (forPred->edata); + test = exprData_getTripleTest (forPred->edata); + inc = exprData_getTripleInc (forPred->edata); + + + if (test->kind != XPR_PREOP) + return FALSE; + + tok = (exprData_getUopTok (test->edata)); + if (!lltok_isMult (tok) ) + { + return FALSE; + } + + //should check preop too + if (inc->kind != XPR_POSTOP) + { + return FALSE; + } + + tok = (exprData_getUopTok (inc->edata)); + if (lltok_isInc_Op (tok) ) + { + t1 = exprData_getUopNode (test->edata); + t2 = exprData_getUopNode (inc->edata); + if (sRef_sameName (t1->sref, t2->sref) ) + { + return TRUE; + } + } + return FALSE; +} + +static constraintList getLessThanConstraints (constraintList c) +{ + constraintList ret; + + ret = constraintList_new(); + constraintList_elements (c, el) + { + if (el->ar == LT || el->ar == LTE) + { + ret = constraintList_add (ret, el); + } + } + end_constraintList_elements; + + return ret; +} + +static constraintList getIncConstraints (constraintList c) +{ + constraintList ret; + + ret = constraintList_new(); + constraintList_elements (c, el) + { + if (incVar (el) ) + { + ret = constraintList_add (ret, el); + } + } + end_constraintList_elements; + + return ret; +} + +constraintExpr getForTimes ( exprNode forPred, exprNode forBody) +{ + + exprNode init, test, inc, t1, t2; + constraintList ltCon; + constraintList incCon; + + lltok tok; + + init = exprData_getTripleInit (forPred->edata); + test = exprData_getTripleTest (forPred->edata); + inc = exprData_getTripleInc (forPred->edata); + + llassert(test); + llassert(inc); + + ltCon = getLessThanConstraints (test->trueEnsuresConstraints); + incCon = getIncConstraints (inc->ensuresConstraints); + + DPRINTF(( message ("getForTimes: ltCon: %s from %s", constraintList_print(ltCon), constraintList_print(test->trueEnsuresConstraints) ) )); + + DPRINTF(( message ("getForTimes: incCon: %s from %s", constraintList_print(incCon), constraintList_print(inc->ensuresConstraints) ) )); + + constraintList_elements (ltCon, el) + { + constraintList_elements(incCon, el2); + { + if ( increments(el2, el->lexpr) ) + { + DPRINTF(( message ("getForTimes: %s increments %s", constraint_print(el2), constraint_print(el) ) )); + return constraintExpr_copy (el->expr); + + } + else + DPRINTF(( message ("getForTimes: %s doesn't increment %s", constraint_print(el2), constraint_print(el) ) )); + } + end_constraintList_elements; + } + + end_constraintList_elements; + + DPRINTF (( message ("getForTimes: %s %s resorting to ugly hack", exprNode_unparse(forPred), exprNode_unparse(forBody) ) )); + if (! canGetForTimes (forPred, forBody) ) + { + return NULL; + } + + + if (test->kind != XPR_PREOP) + llassert (FALSE); + + tok = (exprData_getUopTok (test->edata)); + if (!lltok_isMult (tok) ) + { + llassert ( FALSE ); + } + + //should check preop too + if (inc->kind != XPR_POSTOP) + { + llassert (FALSE ); + } + + tok = (exprData_getUopTok (inc->edata)); + if (lltok_isInc_Op (tok) ) + { + t1 = exprData_getUopNode (test->edata); + t2 = exprData_getUopNode (inc->edata); + if (sRef_sameName (t1->sref, t2->sref) ) + { + return (constraintExpr_makeMaxSetExpr (t1) ); + } + } + llassert( FALSE); + BADEXIT; +} + + +static bool isInc (constraintExpr c) +{ + + if (c->kind == binaryexpr ) + { + constraintExprBinaryOpKind binOP; + constraintExpr t1, t2; + t1 = constraintExprData_binaryExprGetExpr1 (c->data); + t2 = constraintExprData_binaryExprGetExpr2 (c->data); + + binOP = constraintExprData_binaryExprGetOp (c->data); + if (binOP == PLUS) + if (constraintExpr_isLit (t2) && constraintExpr_getValue (t2) == 1 ) + { + return TRUE; + } + } + + return FALSE; +} + +constraintExpr constraintExpr_searchAndAdd (constraintExpr c, constraintExpr find, constraintExpr add) +{ + constraintExprKind kind; + constraintExpr temp; + + DPRINTF(( message ("Doing constraintExpr_searchAndAdd %s %s %s ", + constraintExpr_unparse(c), constraintExpr_unparse(find), constraintExpr_unparse(add) ) ) ); + + if ( constraintExpr_similar (c, find) ) + { + #warning mem leak + + constraintExpr new; + + new = constraintExpr_makeAddConstraintExpr (c, add); + + DPRINTF((message ("Replacing %s with %s", + constraintExpr_unparse(c), constraintExpr_unparse(new) + ))); + return new; + } + + kind = c->kind; + + switch (kind) + { + case term: + break; + case unaryExpr: + temp = constraintExprData_unaryExprGetExpr (c->data); + temp = constraintExpr_searchAndAdd (temp, find, add); + c->data = constraintExprData_unaryExprSetExpr (c->data, temp); + break; + case binaryexpr: + + temp = constraintExprData_binaryExprGetExpr1 (c->data); + temp = constraintExpr_searchAndAdd (temp, find, add); + c->data = constraintExprData_binaryExprSetExpr1 (c->data, temp); + + temp = constraintExprData_binaryExprGetExpr2 (c->data); + temp = constraintExpr_searchAndAdd (temp, find, add); + c->data = constraintExprData_binaryExprSetExpr2 (c->data, temp); + break; + default: + llassert(FALSE); + } + return c; + +} + +constraint constraint_searchAndAdd (constraint c, constraintExpr find, constraintExpr add) +{ + + llassert (constraint_search (c, find) ); + DPRINTF(( message ("Doing constraint_searchAndAdd %s %s %s ", + constraint_print(c), constraintExpr_unparse(find), constraintExpr_unparse(add) ) ) ); + + c->lexpr = constraintExpr_searchAndAdd (c->lexpr, find, add); + c->expr = constraintExpr_searchAndAdd (c->expr, find, add); + + c = constraint_simplify (c); + c = constraint_simplify (c); + + return c; + +} + +constraintList constraintList_searchAndAdd (constraintList list, + constraintExpr find, constraintExpr add) +{ + constraintList newConstraints; + constraintList ret; + + newConstraints = constraintList_new(); + + constraintList_elements (list, el) + { + if (constraint_search (el, find) ) + { + constraint new; + new = constraint_copy (el); + + new = constraint_searchAndAdd (new, find, add); + newConstraints = constraintList_add (newConstraints, new); + DPRINTF (( (message ("Adding constraint %s ", constraint_print (new)) ) )); + } + + } + end_constraintList_elements; + + ret = constraintList_addList (list, newConstraints); + return ret; +} + +void doAdjust(exprNode e, exprNode forPred, exprNode forBody, constraintExpr iterations) +{ + + constraintList_elements (forBody->ensuresConstraints, el) + { + // look fro var = var + 1 + if (incVar(el) ) + { + DPRINTF((message ("Found inc variable constraint : %s", constraint_print (el) ) )); + forBody->requiresConstraints = constraintList_searchAndAdd(forBody->requiresConstraints, el->lexpr, iterations); + } + } + end_constraintList_elements; +} + +void forLoopHeuristics( exprNode e, exprNode forPred, exprNode forBody) +{ + exprNode init, test, inc, t1, t2, t3 ,t4; + constraint con; + constraintExpr iterations; + + init = exprData_getTripleInit (forPred->edata); + test = exprData_getTripleTest (forPred->edata); + inc = exprData_getTripleInc (forPred->edata); + + if (exprNode_isError (test) || exprNode_isError (inc) ) + return; + + iterations = getForTimes (forPred, forBody ); + + if (iterations) + { + doAdjust ( e, forPred, forBody, iterations); + } + +} + + +/* else */ +/* { */ +/* DPRINTF (("Can't get for time ")); */ +/* } */ + +/* if (exprNode_isError(init) ) */ +/* { */ +/* return; */ +/* } */ + +/* if (init->kind == XPR_ASSIGN) */ +/* { */ +/* t1 = exprData_getOpA (init->edata); */ +/* t2 = exprData_getOpB (init->edata); */ + +/* if (! (t1->kind == XPR_VAR) ) */ +/* return; */ +/* } */ +/* else */ +/* return; */ + +/* if (test->kind == XPR_FETCH) */ +/* { */ +/* t3 = exprData_getPairA (test->edata); */ +/* t4 = exprData_getPairB (test->edata); */ + +/* if (sRef_sameName(t1->sref, t4->sref) ) */ +/* { */ +/* DPRINTF((message ("Found a for loop matching heuristic:%s", exprNode_unparse (forPred) ) )); */ +/* con = constraint_makeEnsureLteMaxRead(t1, t3); */ +/* forPred->ensuresConstraints = constraintList_add(forPred->ensuresConstraints, con); */ +/* } */ +/* else */ +/* { */ +/* DPRINTF((message ("Didn't Find a for loop matching heuristic:%s %s and %s differ", exprNode_unparse (forPred), exprNode_unparse(t1), exprNode_unparse(t3) ) )); */ +/* } */ +/* return; */ +/* } */ diff --git a/src/mapping_chdir.c b/src/mapping_chdir.c new file mode 100644 index 0000000..17f8206 --- /dev/null +++ b/src/mapping_chdir.c @@ -0,0 +1,66 @@ + + +int +#ifdef __STDC__ +mapping_chdir(/*@nullterminated@*/ char *orig_path) /*@bufferConstraint MaxRead(mapped_path) <= 198;MaxRead(orig_path) <= 199; (MaxRead(orig_path) + MaxRead(mapped_path)) <= (MaxSet(mapped_path) -1 );@*/ +#else +mapping_chdir( orig_path ) + /*@nullterminated@*/ char *orig_path; +#endif +{ + int ret; + char *sl, *path; + + strcpy( old_mapped_path, mapped_path ); + /*b changed from + path = &pathspace[0]; */ + + path = pathspace; + strcpy( path, orig_path ); + + /* / at start of path, set the start of the mapped_path to / */ + if( path[0] == '/' ){ + mapped_path[0] = '/'; + mapped_path[1] = '\0'; + path++; + } + + while( (sl = strchr( path, '/' )) ){ + char *dir, *last; + dir = path; + *sl = '\0'; + path = sl + 1; + if( *dir ) + do_elem( dir ); + if( *path == '\0' ) + break; + } + if( *path ) + do_elem( path ); + + if( (ret = chdir( mapped_path )) < 0 ){ + strcpy( mapped_path, old_mapped_path ); + } + + return ret; +} +/* From now on use the mapping version */ + +#define chdir(d) mapping_chdir(d) +#define getwd(d) mapping_getwd(d) +#define getcwd(d,u) mapping_getwd(d) + +int f() +{ + struct passwd *chroot_pw; + + if ((chroot_pw = getpwuid (pw->pw_uid)) != NULL) + if (/*strcpy ("kl", "hjklhjklhjkljhjklhjkhjkhjklhjkl") && */mapping_chdir (chroot_pw->pw_dir)/* >= 0 */) + { + char f[1]; + /// mapping_chdir (chroot_pw->pw_dir); + strcpy (f, "hjklhjklhjkljhjklhjkhjkhjklhjkl"); + home = sgetsave (chroot_pw->pw_dir); + + } +}