10c8de5b0SBaptiste Daroussin #undef YYBTYACC 20c8de5b0SBaptiste Daroussin #define YYBTYACC 0 30c8de5b0SBaptiste Daroussin #define YYDEBUGSTR YYPREFIX "debug" 4*b53bb29fSJung-uk Kim typedef int YYINT; 50c8de5b0SBaptiste Daroussin const YYINT calc_lhs[] = { -1, 60c8de5b0SBaptiste Daroussin 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 70c8de5b0SBaptiste Daroussin 2, 2, 2, 2, 2, 2, 3, 3, 80c8de5b0SBaptiste Daroussin }; 90c8de5b0SBaptiste Daroussin const YYINT calc_len[] = { 2, 100c8de5b0SBaptiste Daroussin 0, 3, 3, 1, 3, 3, 3, 3, 3, 3, 110c8de5b0SBaptiste Daroussin 3, 3, 3, 2, 1, 1, 1, 2, 120c8de5b0SBaptiste Daroussin }; 130c8de5b0SBaptiste Daroussin const YYINT calc_defred[] = { 1, 140c8de5b0SBaptiste Daroussin 0, 0, 17, 0, 0, 0, 0, 0, 0, 3, 150c8de5b0SBaptiste Daroussin 0, 15, 14, 0, 2, 0, 0, 0, 0, 0, 160c8de5b0SBaptiste Daroussin 0, 0, 18, 0, 6, 0, 0, 0, 0, 9, 170c8de5b0SBaptiste Daroussin 10, 11, 180c8de5b0SBaptiste Daroussin }; 192aca18c7SJung-uk Kim #if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING) 200c8de5b0SBaptiste Daroussin const YYINT calc_stos[] = { 0, 210c8de5b0SBaptiste Daroussin 261, 256, 257, 258, 45, 40, 262, 263, 264, 10, 220c8de5b0SBaptiste Daroussin 61, 258, 263, 263, 10, 124, 38, 43, 45, 42, 230c8de5b0SBaptiste Daroussin 47, 37, 257, 263, 41, 263, 263, 263, 263, 263, 240c8de5b0SBaptiste Daroussin 263, 263, 250c8de5b0SBaptiste Daroussin }; 262aca18c7SJung-uk Kim #endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */ 270c8de5b0SBaptiste Daroussin const YYINT calc_dgoto[] = { 1, 280c8de5b0SBaptiste Daroussin 7, 8, 9, 290c8de5b0SBaptiste Daroussin }; 300c8de5b0SBaptiste Daroussin const YYINT calc_sindex[] = { 0, 310c8de5b0SBaptiste Daroussin -40, -7, 0, -55, -38, -38, 1, -29, -247, 0, 320c8de5b0SBaptiste Daroussin -38, 0, 0, 22, 0, -38, -38, -38, -38, -38, 330c8de5b0SBaptiste Daroussin -38, -38, 0, -29, 0, 51, 60, -20, -20, 0, 340c8de5b0SBaptiste Daroussin 0, 0, 350c8de5b0SBaptiste Daroussin }; 360c8de5b0SBaptiste Daroussin const YYINT calc_rindex[] = { 0, 370c8de5b0SBaptiste Daroussin 0, 0, 0, 2, 0, 0, 0, 9, -9, 0, 380c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 390c8de5b0SBaptiste Daroussin 0, 0, 0, 10, 0, -6, 14, 5, 13, 0, 400c8de5b0SBaptiste Daroussin 0, 0, 410c8de5b0SBaptiste Daroussin }; 420c8de5b0SBaptiste Daroussin #if YYBTYACC 430c8de5b0SBaptiste Daroussin const YYINT calc_cindex[] = { 0, 440c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 450c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 460c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 470c8de5b0SBaptiste Daroussin 0, 0, 480c8de5b0SBaptiste Daroussin }; 490c8de5b0SBaptiste Daroussin #endif 500c8de5b0SBaptiste Daroussin const YYINT calc_gindex[] = { 0, 510c8de5b0SBaptiste Daroussin 0, 65, 0, 520c8de5b0SBaptiste Daroussin }; 530c8de5b0SBaptiste Daroussin const YYINT calc_table[] = { 6, 540c8de5b0SBaptiste Daroussin 16, 6, 10, 13, 5, 11, 5, 22, 17, 23, 550c8de5b0SBaptiste Daroussin 15, 15, 20, 18, 7, 19, 22, 21, 4, 5, 560c8de5b0SBaptiste Daroussin 0, 20, 8, 12, 0, 0, 21, 16, 16, 0, 570c8de5b0SBaptiste Daroussin 0, 16, 16, 16, 13, 16, 0, 16, 15, 15, 580c8de5b0SBaptiste Daroussin 0, 0, 7, 15, 15, 7, 15, 7, 15, 7, 590c8de5b0SBaptiste Daroussin 8, 12, 0, 8, 12, 8, 0, 8, 22, 17, 600c8de5b0SBaptiste Daroussin 0, 0, 25, 20, 18, 0, 19, 0, 21, 13, 610c8de5b0SBaptiste Daroussin 14, 0, 0, 0, 0, 24, 0, 0, 0, 0, 620c8de5b0SBaptiste Daroussin 26, 27, 28, 29, 30, 31, 32, 22, 17, 0, 630c8de5b0SBaptiste Daroussin 0, 0, 20, 18, 16, 19, 22, 21, 0, 0, 640c8de5b0SBaptiste Daroussin 0, 20, 18, 0, 19, 0, 21, 0, 0, 0, 650c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 16, 0, 0, 13, 0, 0, 660c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 15, 0, 0, 7, 0, 670c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 0, 8, 12, 0, 0, 680c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 690c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 700c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 710c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 720c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 730c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 740c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 750c8de5b0SBaptiste Daroussin 0, 0, 0, 0, 0, 2, 3, 4, 3, 12, 760c8de5b0SBaptiste Daroussin }; 770c8de5b0SBaptiste Daroussin const YYINT calc_check[] = { 40, 780c8de5b0SBaptiste Daroussin 10, 40, 10, 10, 45, 61, 45, 37, 38, 257, 790c8de5b0SBaptiste Daroussin 10, 10, 42, 43, 10, 45, 37, 47, 10, 10, 800c8de5b0SBaptiste Daroussin -1, 42, 10, 10, -1, -1, 47, 37, 38, -1, 810c8de5b0SBaptiste Daroussin -1, 41, 42, 43, 41, 45, -1, 47, 37, 38, 820c8de5b0SBaptiste Daroussin -1, -1, 38, 42, 43, 41, 45, 43, 47, 45, 830c8de5b0SBaptiste Daroussin 38, 38, -1, 41, 41, 43, -1, 45, 37, 38, 840c8de5b0SBaptiste Daroussin -1, -1, 41, 42, 43, -1, 45, -1, 47, 5, 850c8de5b0SBaptiste Daroussin 6, -1, -1, -1, -1, 11, -1, -1, -1, -1, 860c8de5b0SBaptiste Daroussin 16, 17, 18, 19, 20, 21, 22, 37, 38, -1, 870c8de5b0SBaptiste Daroussin -1, -1, 42, 43, 124, 45, 37, 47, -1, -1, 880c8de5b0SBaptiste Daroussin -1, 42, 43, -1, 45, -1, 47, -1, -1, -1, 890c8de5b0SBaptiste Daroussin -1, -1, -1, -1, 124, -1, -1, 124, -1, -1, 900c8de5b0SBaptiste Daroussin -1, -1, -1, -1, -1, 124, -1, -1, 124, -1, 910c8de5b0SBaptiste Daroussin -1, -1, -1, -1, -1, -1, 124, 124, -1, -1, 920c8de5b0SBaptiste Daroussin -1, -1, -1, -1, -1, 124, -1, -1, -1, -1, 930c8de5b0SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 940c8de5b0SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 950c8de5b0SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 960c8de5b0SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 970c8de5b0SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 980c8de5b0SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 990c8de5b0SBaptiste Daroussin -1, -1, -1, -1, -1, 256, 257, 258, 257, 258, 1000c8de5b0SBaptiste Daroussin }; 10111fce282SBaptiste Daroussin #if YYBTYACC 10211fce282SBaptiste Daroussin const YYINT calc_ctable[] = { -1, 10311fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10411fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10511fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10611fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10711fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10811fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10911fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11011fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11111fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11211fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11311fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11411fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11511fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11611fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11711fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11811fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11911fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12011fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12111fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12211fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12311fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12411fce282SBaptiste Daroussin -1, -1, -1, -1, -1, -1, -1, -1, -1, 12511fce282SBaptiste Daroussin }; 12611fce282SBaptiste Daroussin #endif 1270c8de5b0SBaptiste Daroussin #ifndef YYDEBUG 1280c8de5b0SBaptiste Daroussin #define YYDEBUG 0 1290c8de5b0SBaptiste Daroussin #endif 1300c8de5b0SBaptiste Daroussin const char *const calc_name[] = { 1310c8de5b0SBaptiste Daroussin 1320c8de5b0SBaptiste Daroussin "$end",0,0,0,0,0,0,0,0,0,"'\\n'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1330c8de5b0SBaptiste Daroussin 0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'",0,"'-'",0,"'/'",0,0,0,0,0,0,0,0,0,0, 1340c8de5b0SBaptiste Daroussin 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, 1350c8de5b0SBaptiste Daroussin 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, 1360c8de5b0SBaptiste Daroussin 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, 1370c8de5b0SBaptiste Daroussin 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, 1380c8de5b0SBaptiste Daroussin 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, 1390c8de5b0SBaptiste Daroussin 0,0,"error","DIGIT","LETTER","UMINUS","$accept","list","stat","expr","number", 1400c8de5b0SBaptiste Daroussin "illegal-symbol", 1410c8de5b0SBaptiste Daroussin }; 142c5b5d71aSJung-uk Kim #if YYDEBUG 1430c8de5b0SBaptiste Daroussin const char *const calc_rule[] = { 1440c8de5b0SBaptiste Daroussin "$accept : list", 1450c8de5b0SBaptiste Daroussin "list :", 1460c8de5b0SBaptiste Daroussin "list : list stat '\\n'", 1470c8de5b0SBaptiste Daroussin "list : list error '\\n'", 1480c8de5b0SBaptiste Daroussin "stat : expr", 1490c8de5b0SBaptiste Daroussin "stat : LETTER '=' expr", 1500c8de5b0SBaptiste Daroussin "expr : '(' expr ')'", 1510c8de5b0SBaptiste Daroussin "expr : expr '+' expr", 1520c8de5b0SBaptiste Daroussin "expr : expr '-' expr", 1530c8de5b0SBaptiste Daroussin "expr : expr '*' expr", 1540c8de5b0SBaptiste Daroussin "expr : expr '/' expr", 1550c8de5b0SBaptiste Daroussin "expr : expr '%' expr", 1560c8de5b0SBaptiste Daroussin "expr : expr '&' expr", 1570c8de5b0SBaptiste Daroussin "expr : expr '|' expr", 1580c8de5b0SBaptiste Daroussin "expr : '-' expr", 1590c8de5b0SBaptiste Daroussin "expr : LETTER", 1600c8de5b0SBaptiste Daroussin "expr : number", 1610c8de5b0SBaptiste Daroussin "number : DIGIT", 1620c8de5b0SBaptiste Daroussin "number : number DIGIT", 1630c8de5b0SBaptiste Daroussin 1640c8de5b0SBaptiste Daroussin }; 1650c8de5b0SBaptiste Daroussin #endif 166