xref: /freebsd/contrib/byacc/test/btyacc/code_calc.tab.c (revision af23369a6deaaeb612ab266eb88b8bb8d560c322)
1 #undef YYBTYACC
2 #define YYBTYACC 0
3 #define YYDEBUGSTR YYPREFIX "debug"
4 typedef int YYINT;
5 const YYINT calc_lhs[] = {                        -1,
6     0,    0,    0,    1,    1,    2,    2,    2,    2,    2,
7     2,    2,    2,    2,    2,    2,    3,    3,
8 };
9 const YYINT calc_len[] = {                         2,
10     0,    3,    3,    1,    3,    3,    3,    3,    3,    3,
11     3,    3,    3,    2,    1,    1,    1,    2,
12 };
13 const YYINT calc_defred[] = {                      1,
14     0,    0,   17,    0,    0,    0,    0,    0,    0,    3,
15     0,   15,   14,    0,    2,    0,    0,    0,    0,    0,
16     0,    0,   18,    0,    6,    0,    0,    0,    0,    9,
17    10,   11,
18 };
19 #if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
20 const YYINT calc_stos[] = {                        0,
21   261,  256,  257,  258,   45,   40,  262,  263,  264,   10,
22    61,  258,  263,  263,   10,  124,   38,   43,   45,   42,
23    47,   37,  257,  263,   41,  263,  263,  263,  263,  263,
24   263,  263,
25 };
26 #endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
27 const YYINT calc_dgoto[] = {                       1,
28     7,    8,    9,
29 };
30 const YYINT calc_sindex[] = {                      0,
31   -40,   -7,    0,  -55,  -38,  -38,    1,  -29, -247,    0,
32   -38,    0,    0,   22,    0,  -38,  -38,  -38,  -38,  -38,
33   -38,  -38,    0,  -29,    0,   51,   60,  -20,  -20,    0,
34     0,    0,
35 };
36 const YYINT calc_rindex[] = {                      0,
37     0,    0,    0,    2,    0,    0,    0,    9,   -9,    0,
38     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
39     0,    0,    0,   10,    0,   -6,   14,    5,   13,    0,
40     0,    0,
41 };
42 #if YYBTYACC
43 const YYINT calc_cindex[] = {                      0,
44     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
45     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
46     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
47     0,    0,
48 };
49 #endif
50 const YYINT calc_gindex[] = {                      0,
51     0,   65,    0,
52 };
53 const YYINT calc_table[] = {                       6,
54    16,    6,   10,   13,    5,   11,    5,   22,   17,   23,
55    15,   15,   20,   18,    7,   19,   22,   21,    4,    5,
56     0,   20,    8,   12,    0,    0,   21,   16,   16,    0,
57     0,   16,   16,   16,   13,   16,    0,   16,   15,   15,
58     0,    0,    7,   15,   15,    7,   15,    7,   15,    7,
59     8,   12,    0,    8,   12,    8,    0,    8,   22,   17,
60     0,    0,   25,   20,   18,    0,   19,    0,   21,   13,
61    14,    0,    0,    0,    0,   24,    0,    0,    0,    0,
62    26,   27,   28,   29,   30,   31,   32,   22,   17,    0,
63     0,    0,   20,   18,   16,   19,   22,   21,    0,    0,
64     0,   20,   18,    0,   19,    0,   21,    0,    0,    0,
65     0,    0,    0,    0,   16,    0,    0,   13,    0,    0,
66     0,    0,    0,    0,    0,   15,    0,    0,    7,    0,
67     0,    0,    0,    0,    0,    0,    8,   12,    0,    0,
68     0,    0,    0,    0,    0,   16,    0,    0,    0,    0,
69     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
70     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
71     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
72     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
73     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
74     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
75     0,    0,    0,    0,    0,    2,    3,    4,    3,   12,
76 };
77 const YYINT calc_check[] = {                      40,
78    10,   40,   10,   10,   45,   61,   45,   37,   38,  257,
79    10,   10,   42,   43,   10,   45,   37,   47,   10,   10,
80    -1,   42,   10,   10,   -1,   -1,   47,   37,   38,   -1,
81    -1,   41,   42,   43,   41,   45,   -1,   47,   37,   38,
82    -1,   -1,   38,   42,   43,   41,   45,   43,   47,   45,
83    38,   38,   -1,   41,   41,   43,   -1,   45,   37,   38,
84    -1,   -1,   41,   42,   43,   -1,   45,   -1,   47,    5,
85     6,   -1,   -1,   -1,   -1,   11,   -1,   -1,   -1,   -1,
86    16,   17,   18,   19,   20,   21,   22,   37,   38,   -1,
87    -1,   -1,   42,   43,  124,   45,   37,   47,   -1,   -1,
88    -1,   42,   43,   -1,   45,   -1,   47,   -1,   -1,   -1,
89    -1,   -1,   -1,   -1,  124,   -1,   -1,  124,   -1,   -1,
90    -1,   -1,   -1,   -1,   -1,  124,   -1,   -1,  124,   -1,
91    -1,   -1,   -1,   -1,   -1,   -1,  124,  124,   -1,   -1,
92    -1,   -1,   -1,   -1,   -1,  124,   -1,   -1,   -1,   -1,
93    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
94    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
95    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
96    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
97    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
98    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
99    -1,   -1,   -1,   -1,   -1,  256,  257,  258,  257,  258,
100 };
101 #if YYBTYACC
102 const YYINT calc_ctable[] = {                     -1,
103    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
104    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
105    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
106    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
107    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
108    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
109    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
110    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
111    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
112    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
113    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
114    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
115    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
116    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
117    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
118    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
119    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
120    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
121    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
122    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
123    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
124    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
125 };
126 #endif
127 #ifndef YYDEBUG
128 #define YYDEBUG 0
129 #endif
130 const char *const calc_name[] = {
131 
132 "$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,
133 0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'",0,"'-'",0,"'/'",0,0,0,0,0,0,0,0,0,0,
134 0,0,0,"'='",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
135 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'|'",0,0,0,0,0,0,0,0,0,
136 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
137 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
138 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
139 0,0,"error","DIGIT","LETTER","UMINUS","$accept","list","stat","expr","number",
140 "illegal-symbol",
141 };
142 #if YYDEBUG
143 const char *const calc_rule[] = {
144 "$accept : list",
145 "list :",
146 "list : list stat '\\n'",
147 "list : list error '\\n'",
148 "stat : expr",
149 "stat : LETTER '=' expr",
150 "expr : '(' expr ')'",
151 "expr : expr '+' expr",
152 "expr : expr '-' expr",
153 "expr : expr '*' expr",
154 "expr : expr '/' expr",
155 "expr : expr '%' expr",
156 "expr : expr '&' expr",
157 "expr : expr '|' expr",
158 "expr : '-' expr",
159 "expr : LETTER",
160 "expr : number",
161 "number : DIGIT",
162 "number : number DIGIT",
163 
164 };
165 #endif
166