xref: /freebsd/contrib/byacc/test/yacc/code_calc.tab.c (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1 typedef int YYINT;
2 const YYINT calc_lhs[] = {                        -1,
3     0,    0,    0,    1,    1,    2,    2,    2,    2,    2,
4     2,    2,    2,    2,    2,    2,    3,    3,
5 };
6 const YYINT calc_len[] = {                         2,
7     0,    3,    3,    1,    3,    3,    3,    3,    3,    3,
8     3,    3,    3,    2,    1,    1,    1,    2,
9 };
10 const YYINT calc_defred[] = {                      1,
11     0,    0,   17,    0,    0,    0,    0,    0,    0,    3,
12     0,   15,   14,    0,    2,    0,    0,    0,    0,    0,
13     0,    0,   18,    0,    6,    0,    0,    0,    0,    9,
14    10,   11,
15 };
16 const YYINT calc_dgoto[] = {                       1,
17     7,    8,    9,
18 };
19 const YYINT calc_sindex[] = {                      0,
20   -40,   -7,    0,  -55,  -38,  -38,    1,  -29, -247,    0,
21   -38,    0,    0,   22,    0,  -38,  -38,  -38,  -38,  -38,
22   -38,  -38,    0,  -29,    0,   51,   60,  -20,  -20,    0,
23     0,    0,
24 };
25 const YYINT calc_rindex[] = {                      0,
26     0,    0,    0,    2,    0,    0,    0,    9,   -9,    0,
27     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
28     0,    0,    0,   10,    0,   -6,   14,    5,   13,    0,
29     0,    0,
30 };
31 const YYINT calc_gindex[] = {                      0,
32     0,   65,    0,
33 };
34 const YYINT calc_table[] = {                       6,
35    16,    6,   10,   13,    5,   11,    5,   22,   17,   23,
36    15,   15,   20,   18,    7,   19,   22,   21,    4,    5,
37     0,   20,    8,   12,    0,    0,   21,   16,   16,    0,
38     0,   16,   16,   16,   13,   16,    0,   16,   15,   15,
39     0,    0,    7,   15,   15,    7,   15,    7,   15,    7,
40     8,   12,    0,    8,   12,    8,    0,    8,   22,   17,
41     0,    0,   25,   20,   18,    0,   19,    0,   21,   13,
42    14,    0,    0,    0,    0,   24,    0,    0,    0,    0,
43    26,   27,   28,   29,   30,   31,   32,   22,   17,    0,
44     0,    0,   20,   18,   16,   19,   22,   21,    0,    0,
45     0,   20,   18,    0,   19,    0,   21,    0,    0,    0,
46     0,    0,    0,    0,   16,    0,    0,   13,    0,    0,
47     0,    0,    0,    0,    0,   15,    0,    0,    7,    0,
48     0,    0,    0,    0,    0,    0,    8,   12,    0,    0,
49     0,    0,    0,    0,    0,   16,    0,    0,    0,    0,
50     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
51     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
52     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
53     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
54     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
55     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
56     0,    0,    0,    0,    0,    2,    3,    4,    3,   12,
57 };
58 const YYINT calc_check[] = {                      40,
59    10,   40,   10,   10,   45,   61,   45,   37,   38,  257,
60    10,   10,   42,   43,   10,   45,   37,   47,   10,   10,
61    -1,   42,   10,   10,   -1,   -1,   47,   37,   38,   -1,
62    -1,   41,   42,   43,   41,   45,   -1,   47,   37,   38,
63    -1,   -1,   38,   42,   43,   41,   45,   43,   47,   45,
64    38,   38,   -1,   41,   41,   43,   -1,   45,   37,   38,
65    -1,   -1,   41,   42,   43,   -1,   45,   -1,   47,    5,
66     6,   -1,   -1,   -1,   -1,   11,   -1,   -1,   -1,   -1,
67    16,   17,   18,   19,   20,   21,   22,   37,   38,   -1,
68    -1,   -1,   42,   43,  124,   45,   37,   47,   -1,   -1,
69    -1,   42,   43,   -1,   45,   -1,   47,   -1,   -1,   -1,
70    -1,   -1,   -1,   -1,  124,   -1,   -1,  124,   -1,   -1,
71    -1,   -1,   -1,   -1,   -1,  124,   -1,   -1,  124,   -1,
72    -1,   -1,   -1,   -1,   -1,   -1,  124,  124,   -1,   -1,
73    -1,   -1,   -1,   -1,   -1,  124,   -1,   -1,   -1,   -1,
74    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
75    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
76    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
77    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
78    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
79    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
80    -1,   -1,   -1,   -1,   -1,  256,  257,  258,  257,  258,
81 };
82 #ifndef YYDEBUG
83 #define YYDEBUG 0
84 #endif
85 const char *const calc_name[] = {
86 
87 "end-of-file",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,
88 0,0,0,0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'",0,"'-'",0,"'/'",0,0,0,0,0,0,0,
89 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,
90 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,
91 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,
92 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,
93 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,
94 0,0,0,0,0,0,"DIGIT","LETTER","UMINUS",0,0,0,0,0,"illegal-symbol",
95 };
96 #if YYDEBUG
97 const char *const calc_rule[] = {
98 "$accept : list",
99 "list :",
100 "list : list stat '\\n'",
101 "list : list error '\\n'",
102 "stat : expr",
103 "stat : LETTER '=' expr",
104 "expr : '(' expr ')'",
105 "expr : expr '+' expr",
106 "expr : expr '-' expr",
107 "expr : expr '*' expr",
108 "expr : expr '/' expr",
109 "expr : expr '%' expr",
110 "expr : expr '&' expr",
111 "expr : expr '|' expr",
112 "expr : '-' expr",
113 "expr : LETTER",
114 "expr : number",
115 "number : DIGIT",
116 "number : number DIGIT",
117 
118 };
119 #endif
120