Ghidra Decompiler Analysis Engine
slghparse.hh
1 /* ###
2  * IP: GHIDRA
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 /* A Bison parser, made by GNU Bison 3.0.4. */
17 
18 /* Bison interface for Yacc-like parsers in C
19 
20  Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
21 
22  This program is free software: you can redistribute it and/or modify
23  it under the terms of the GNU General Public License as published by
24  the Free Software Foundation, either version 3 of the License, or
25  (at your option) any later version.
26 
27  This program is distributed in the hope that it will be useful,
28  but WITHOUT ANY WARRANTY; without even the implied warranty of
29  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30  GNU General Public License for more details.
31 
32  You should have received a copy of the GNU General Public License
33  along with this program. If not, see <http://www.gnu.org/licenses/>. */
34 
35 /* As a special exception, you may create a larger work that contains
36  part or all of the Bison parser skeleton and distribute that work
37  under terms of your choice, so long as that work isn't itself a
38  parser generator using the skeleton or a modified version thereof
39  as a parser skeleton. Alternatively, if you modify or redistribute
40  the parser skeleton itself, you may (at your option) remove this
41  special exception, which will cause the skeleton and the resulting
42  Bison output files to be licensed under the GNU General Public
43  License without this special exception.
44 
45  This special exception was added by the Free Software Foundation in
46  version 2.2 of Bison. */
47 
48 #ifndef YY_YY_SRC_DECOMPILE_CPP_SLGHPARSE_HH_INCLUDED
49 # define YY_YY_SRC_DECOMPILE_CPP_SLGHPARSE_HH_INCLUDED
50 /* Debug traces. */
51 #ifndef YYDEBUG
52 # define YYDEBUG 0
53 #endif
54 #if YYDEBUG
55 extern int yydebug;
56 #endif
57 
58 /* Token type. */
59 #ifndef YYTOKENTYPE
60 # define YYTOKENTYPE
61  enum yytokentype
62  {
63  OP_BOOL_OR = 258,
64  OP_BOOL_AND = 259,
65  OP_BOOL_XOR = 260,
66  OP_OR = 261,
67  OP_XOR = 262,
68  OP_AND = 263,
69  OP_EQUAL = 264,
70  OP_NOTEQUAL = 265,
71  OP_FEQUAL = 266,
72  OP_FNOTEQUAL = 267,
73  OP_GREATEQUAL = 268,
74  OP_LESSEQUAL = 269,
75  OP_SLESS = 270,
76  OP_SGREATEQUAL = 271,
77  OP_SLESSEQUAL = 272,
78  OP_SGREAT = 273,
79  OP_FLESS = 274,
80  OP_FGREAT = 275,
81  OP_FLESSEQUAL = 276,
82  OP_FGREATEQUAL = 277,
83  OP_LEFT = 278,
84  OP_RIGHT = 279,
85  OP_SRIGHT = 280,
86  OP_FADD = 281,
87  OP_FSUB = 282,
88  OP_SDIV = 283,
89  OP_SREM = 284,
90  OP_FMULT = 285,
91  OP_FDIV = 286,
92  OP_ZEXT = 287,
93  OP_CARRY = 288,
94  OP_BORROW = 289,
95  OP_SEXT = 290,
96  OP_SCARRY = 291,
97  OP_SBORROW = 292,
98  OP_NAN = 293,
99  OP_ABS = 294,
100  OP_SQRT = 295,
101  OP_CEIL = 296,
102  OP_FLOOR = 297,
103  OP_ROUND = 298,
104  OP_INT2FLOAT = 299,
105  OP_FLOAT2FLOAT = 300,
106  OP_TRUNC = 301,
107  OP_CPOOLREF = 302,
108  OP_NEW = 303,
109  OP_POPCOUNT = 304,
110  BADINTEGER = 305,
111  GOTO_KEY = 306,
112  CALL_KEY = 307,
113  RETURN_KEY = 308,
114  IF_KEY = 309,
115  DEFINE_KEY = 310,
116  ATTACH_KEY = 311,
117  MACRO_KEY = 312,
118  SPACE_KEY = 313,
119  TYPE_KEY = 314,
120  RAM_KEY = 315,
121  DEFAULT_KEY = 316,
122  REGISTER_KEY = 317,
123  ENDIAN_KEY = 318,
124  WITH_KEY = 319,
125  ALIGN_KEY = 320,
126  OP_UNIMPL = 321,
127  TOKEN_KEY = 322,
128  SIGNED_KEY = 323,
129  NOFLOW_KEY = 324,
130  HEX_KEY = 325,
131  DEC_KEY = 326,
132  BIG_KEY = 327,
133  LITTLE_KEY = 328,
134  SIZE_KEY = 329,
135  WORDSIZE_KEY = 330,
136  OFFSET_KEY = 331,
137  NAMES_KEY = 332,
138  VALUES_KEY = 333,
139  VARIABLES_KEY = 334,
140  PCODEOP_KEY = 335,
141  IS_KEY = 336,
142  LOCAL_KEY = 337,
143  DELAYSLOT_KEY = 338,
144  CROSSBUILD_KEY = 339,
145  EXPORT_KEY = 340,
146  BUILD_KEY = 341,
147  CONTEXT_KEY = 342,
148  ELLIPSIS_KEY = 343,
149  GLOBALSET_KEY = 344,
150  BITRANGE_KEY = 345,
151  CHAR = 346,
152  INTEGER = 347,
153  INTB = 348,
154  STRING = 349,
155  SYMBOLSTRING = 350,
156  SPACESYM = 351,
157  SECTIONSYM = 352,
158  TOKENSYM = 353,
159  USEROPSYM = 354,
160  VALUESYM = 355,
161  VALUEMAPSYM = 356,
162  CONTEXTSYM = 357,
163  NAMESYM = 358,
164  VARSYM = 359,
165  BITSYM = 360,
166  SPECSYM = 361,
167  VARLISTSYM = 362,
168  OPERANDSYM = 363,
169  STARTSYM = 364,
170  ENDSYM = 365,
171  MACROSYM = 366,
172  LABELSYM = 367,
173  SUBTABLESYM = 368
174  };
175 #endif
176 
177 /* Value type. */
178 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
179 
180 union YYSTYPE
181 {
182 #line 29 "src/decompile/cpp/slghparse.y" /* yacc.c:1909 */
183 
184  char ch;
185  uintb *i;
186  intb *big;
187  string *str;
188  vector<string> *strlist;
189  vector<intb> *biglist;
190  vector<ExprTree *> *param;
191  SpaceQuality *spacequal;
192  FieldQuality *fieldqual;
193  StarQuality *starqual;
194  VarnodeTpl *varnode;
195  ExprTree *tree;
196  vector<OpTpl *> *stmt;
197  ConstructTpl *sem;
198  SectionVector *sectionstart;
199  Constructor *construct;
200  PatternEquation *pateq;
201  PatternExpression *patexp;
202 
203  vector<SleighSymbol *> *symlist;
204  vector<ContextChange *> *contop;
205  SleighSymbol *anysym;
206  SpaceSymbol *spacesym;
207  SectionSymbol *sectionsym;
208  TokenSymbol *tokensym;
209  UserOpSymbol *useropsym;
210  MacroSymbol *macrosym;
211  LabelSymbol *labelsym;
212  SubtableSymbol *subtablesym;
213  StartSymbol *startsym;
214  EndSymbol *endsym;
215  OperandSymbol *operandsym;
216  VarnodeListSymbol *varlistsym;
217  VarnodeSymbol *varsym;
218  BitrangeSymbol *bitsym;
219  NameSymbol *namesym;
220  ValueSymbol *valuesym;
221  ValueMapSymbol *valuemapsym;
222  ContextSymbol *contextsym;
223  FamilySymbol *famsym;
224  SpecificSymbol *specsym;
225 
226 #line 212 "src/decompile/cpp/slghparse.hh" /* yacc.c:1909 */
227 };
228 
229 typedef union YYSTYPE YYSTYPE;
230 # define YYSTYPE_IS_TRIVIAL 1
231 # define YYSTYPE_IS_DECLARED 1
232 #endif
233 
234 
235 extern YYSTYPE yylval;
236 
237 int yyparse (void);
238 
239 #endif /* !YY_YY_SRC_DECOMPILE_CPP_SLGHPARSE_HH_INCLUDED */
ContextSymbol
Definition: slghsymbol.hh:279
VarnodeListSymbol
Definition: slghsymbol.hh:296
PatternExpression
Definition: slghpatexpress.hh:56
Constructor
Definition: slghsymbol.hh:466
PatternEquation
Definition: slghpatexpress.hh:336
VarnodeTpl
Definition: semantics.hh:77
VarnodeSymbol
Definition: slghsymbol.hh:245
OperandSymbol
Definition: slghsymbol.hh:313
ValueSymbol
Definition: slghsymbol.hh:197
FieldQuality
Definition: slgh_compile.hh:59
NameSymbol
Definition: slghsymbol.hh:230
ValueMapSymbol
Definition: slghsymbol.hh:214
UserOpSymbol
Definition: slghsymbol.hh:131
BitrangeSymbol
Definition: slghsymbol.hh:265
SubtableSymbol
Definition: slghsymbol.hh:564
SectionVector
Definition: slgh_compile.hh:31
YYSTYPE
Definition: grammar.cc:148
SectionSymbol
Definition: slghsymbol.hh:116
LabelSymbol
Definition: slghsymbol.hh:611
FamilySymbol
Definition: slghsymbol.hh:158
TokenSymbol
Definition: slghsymbol.hh:107
SpecificSymbol
Definition: slghsymbol.hh:165
MacroSymbol
Definition: slghsymbol.hh:595
StartSymbol
Definition: slghsymbol.hh:360
ExprTree
Definition: pcodecompile.hh:37
ConstructTpl
Definition: semantics.hh:161
SleighSymbol
Definition: slghsymbol.hh:23
SpaceQuality
Definition: slgh_compile.hh:46
SpaceSymbol
Definition: slghsymbol.hh:99
StarQuality
Definition: pcodecompile.hh:32
EndSymbol
Definition: slghsymbol.hh:377