Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-467 simplifed build for Decompiler making installation of bison/flex optional for most end-users

ghidra14b1beb742f01
diff --git a/Ghidra/Features/Decompiler/build.gradle b/Ghidra/Features/Decompiler/build.gradle
index f3957ab583..f398c9414d 100644
--- a/Ghidra/Features/Decompiler/build.gradle
+++ b/Ghidra/Features/Decompiler/build.gradle
@@ -8,8 +8,6 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Features Decompiler'
-
-
dependencies {
compile project(':Base')
compile project(':SoftwareModeling')
@@ -20,48 +18,64 @@ dependencies {
helpPath project(path: ":Base", configuration: 'helpPath')
}
+ext.cppSourceDir = "src/decompile/cpp"
/**
- * This task calls bison to process the xml.y and grammar.y file into cpp files that will then
- * be compiled with the rest of the decompiler code.
+ * The bison and flex generated files are maintained in source control and
+ * do not need regeneration unless changes have been made to the yacc (*.y),
+ * lex (*.l) or any critical header file. This stand-alone task should be
+ * executed as needed prior to building the decompiler or sleigh native
+ * executables.
+ */
+task generateParsers {
+ dependsOn "lexSleigh", "yaccDecompiler"
+}
+
+ /**
+ * This task calls bison to process the grammar.y and xml.y files (yacc) to
+ * generate the corresponding *.cc files that will then be compiled with the rest
+ * of the decompiler code.
*/
task yaccDecompiler {
- Task t1 = createBisonTask("xml", "decompile", true);
- Task t2 = createBisonTask("grammar", "decompile", true);
-
- dependsOn t1, t2
- // these variables are used by the cpp sources sets as an input to the decompiler native build
- ext.sourceDir = file("build/generated/decompile/cpp")
- ext.headerDir = file("build/generated/decompile/headers")
+ Task t1 = createBisonTask("xml", "decompile", false, true);
+ Task t2 = createBisonTask("grammar", "decompile", false, true);
+
+ if (t1 != null) {
+ dependsOn t1, t2
+ }
}
/**
- * This task calls bison to process the xml.y file (yacc) into an cpp file that will then
- * be compiled with the rest of the decompiler code.
+ * This task calls bison to process the slghparse.y, pcodeparse.y and xml.y
+ * files (yacc) to generate the corresponding *.cc files that will then be compiled
+ * with the rest of the sleigh code.
*/
task yaccSleigh {
- Task t1 = createBisonTask("slghparse", "sleigh", false);
- Task t2 = createBisonTask("pcodeparse", "sleigh", true);
- Task t3 = createBisonTask("xml", "sleigh", true);
- dependsOn t1,t2,t3
-
- ext.sourceDir = file("build/generated/sleigh/cpp")
- ext.headerDir = file("build/generated/sleigh/headers")
+ Task t1 = createBisonTask("slghparse", "sleigh", true, false); // also produces slghparse.hh header file
+ Task t2 = createBisonTask("pcodeparse", "sleigh", false, true);
+ Task t3 = createBisonTask("xml", "sleigh", false, true);
+
+ if (t1 != null) {
+ dependsOn t1,t2,t3
+ }
}
/**
- * This task calls flex to process the slghscan. file (yacc) into an cpp file that will then
- * be compiled with the rest of the decompiler code.
+ * This task calls flex to process the slghscan.l file (lex) into a cpp file that will then
+ * be compiled with the rest of the sleigh code.
*/
task lexSleigh {
+
+ dependsOn "yaccSleigh"
+
Task t1 = createLexTask("slghscan", "sleighlex")
- dependsOn t1
-
- ext.sourceDir = file("build/generated/sleighlex")
- ext.headerDir = file("build/generated/sleighlex")
+ if (t1 != null) {
+ // TODO: add missing task input file dependencies
+ dependsOn t1
+ }
}
def buildDir = "../../../build" // Relative to the 'workingDir' Exec task property.
@@ -362,9 +376,12 @@ model {
targetPlatform "osx64"
sources {
cpp {
+ // NOTE: The bison/flex generated files are assumed to be up-to-date.
+ // The task `generateParsers` should be executed if needed.
+ // builtBy yaccDecompiler
source {
srcDir "src/decompile/cpp"
- // include "xml.cc" // generated by yacc task
+
include "space.cc"
include "float.cc"
include "address.cc"
@@ -387,7 +404,6 @@ model {
include "fspec.cc"
include "action.cc"
include "loadimage.cc"
- //include "grammar.cc" // doesn't seem to be used
include "varnode.cc"
include "op.cc"
include "type.cc"
@@ -436,25 +452,21 @@ model {
include "comment_ghidra.cc"
include "string_ghidra.cc"
// include "callgraph.cc" // uncomment for debug
- // include "ifacedecomp.cc" // uncomment for debug
+ // include "ifacedecomp.cc" // uncomment for debug
// include "ifaceterm.cc" // uncomment for debug
// include "interface.cc" // uncomment for debug
+
+ // generated source files
+
+ include "xml.cc"
+ // include "grammar.cc" // used by diagnostic console mode
}
exportedHeaders {
srcDir "src/decompile/cpp"
}
- } // end cpp
-
- // this creates a source set that is basically the output of bison yacc task
- // defined above that compiles the xml.y file to a cpp file.
- yacc(CppSourceSet) {
- generatedBy yaccDecompiler
- exportedHeaders {
- srcDir "src/decompile/cpp"
- }
- }
+ } // end cpp
} // end sources
- }// end decompile
+ } // end decompile
sleigh(NativeExecutableSpec) {
targetPlatform "win64"
@@ -462,9 +474,12 @@ model {
targetPlatform "osx64"
sources {
cpp {
+ // NOTE: The bison/flex generated files are assumed to be up-to-date.
+ // The task `generateParsers` should be executed if needed.
+ // builtBy lexSleigh
source {
srcDir "src/decompile/cpp"
- //include "xml.cc"
+
include "space.cc"
include "float.cc"
include "address.cc"
@@ -473,7 +488,6 @@ model {
include "opcodes.cc"
include "globalcontext.cc"
include "sleigh.cc"
- //include "pcodeparse.cc"
include "pcodecompile.cc"
include "sleighbase.cc"
include "slghsymbol.cc"
@@ -483,31 +497,21 @@ model {
include "context.cc"
include "filemanage.cc"
include "slgh_compile.cc"
- //include "slghparse.cc"
- //include "slghscan.cc"
+
+ // generated source files
+
+ include "xml.cc"
+ include "pcodeparse.cc"
+ include "slghparse.cc"
+ include "slghscan.cc"
}
exportedHeaders {
srcDir "src/decompile/cpp"
}
- }
- yacc(CppSourceSet) {
- generatedBy yaccSleigh
- exportedHeaders {
- srcDir "src/decompile/cpp"
- }
- }
- lex(CppSourceSet) {
- generatedBy lexSleigh
- builtBy yaccSleigh // Requires headers produced by bison
- exportedHeaders {
- srcDir "src/decompile/cpp"
- srcDir yaccSleigh.headerDir
- srcDir lexSleigh.headerDir
- }
- }
-
+ } // end cpp
} // end sources (sleigh)
- }
+ } // end sleigh
+
} // end components
binaries {
@@ -555,32 +559,53 @@ model {
}
} // end model
-
+// Perform simple dependency change detection for generated files
+// produced by bison or flex. A 5-second tolerance is used
+// to avoid arbitrary last-modified times which may be produced
+// by a git checkout.
+boolean isUpToDate(File srcFile, File resultFile) {
+ long resultLm = resultFile.lastModified()
+ if (resultLm == 0) {
+ return true
+ }
+ long srcLm = srcFile.lastModified()
+ long elapsedTime = srcLm - resultLm
+ if (elapsedTime < 5000) {
+ println "Is UpToDate: ${resultFile}"
+ return true;
+ }
+ return false;
+}
/**
- * create a bison task to compile a yacc file for the decompiler
+ * Create a bison task to compile a yacc file (*.y) for the sleigh/decompiler
*/
-Task createBisonTask(String filename, String binaryName, boolean qualifyVariables) {
+Task createBisonTask(String filename, String binaryName, boolean generateHeader, boolean qualifyVariables) {
- return task("bison_${binaryName}_$filename", type: Exec) {
- String inputFile = "src/decompile/cpp/${filename}.y"
- String outputCppDir = "build/generated/$binaryName/cpp"
- String outputHeadersDir = "build/generated/$binaryName/headers"
+ def outputCppDir = "${cppSourceDir}"
+ def outputHeadersDir = "${cppSourceDir}"
+
+ def yaccFile = "${cppSourceDir}/${filename}.y"
+ def ccFile = "${outputCppDir}/${filename}.cc"
+ def headerFile = "${outputCppDir}/${filename}.hh"
- inputs.file inputFile
- outputs.dir outputCppDir
+ return task("bison_${binaryName}_$filename", type: Exec) {
- // make sure output directories exist. Must be done in execution phase. Otherwise,
- // if a clean task is executed it will wipe them out
- doFirst {
- file(outputCppDir).mkdirs()
- file(outputHeadersDir)mkdirs()
- }
+ inputs.file "${yaccFile}"
+ outputs.file "${ccFile}"
+ if (generateHeader) {
+ outputs.file "${headerFile}"
+ }
+
+ // doFirst {
+ // file(outputCppDir).mkdirs()
+ // file(outputHeadersDir)mkdirs()
+ // }
executable 'bison' // use bison program to process yacc files
// specify the bison's output file
- args "-o", "$outputCppDir/${filename}.tab.cc"
+ args "-o", "${ccFile}"
// most of the yacc files should be compiled with a variable qualifyer to avoid dupes.
// Unfortunately there is one (slghparse) that can't use a qualifyer because it
@@ -591,41 +616,42 @@ Task createBisonTask(String filename, String binaryName, boolean qualifyVariable
}
// tell bison where to put the hh file.
- args "--defines=${outputHeadersDir}/${filename}.tab.hh"
+ if (generateHeader) {
+ args "--defines=${headerFile}"
+ }
// tell bison the file to compile
- args inputFile
+ args "${yaccFile}"
}
}
/**
- * create a lex task to compile a yacc file for the decompiler
+ * Create a flex task to compile a lex file (*.l) for sleigh.
*/
Task createLexTask(String filename, String binaryName) {
- return task("lex_${binaryName}_$filename", type: Exec) {
- String outputDir = "build/generated/${binaryName}/cpp"
- String inputFile = "src/decompile/cpp/${filename}.l"
-
- executable 'flex' // the program to execute
- // set up inputs and outputs so that gradle knows when this needs to be rebuilt
-
- inputs.file inputFile
- outputs.dir outputDir
+ def outputCppDir = "${cppSourceDir}"
- // make sure the output dirs are created, but do it in the execution phase.
- // Can't do it in the configure phase, otherwise
- // a clean will remove it during the execution phase
+ def lexFile = "${cppSourceDir}/${filename}.l"
+ def ccFile = "${outputCppDir}/${filename}.cc"
- doFirst {
- file(outputDir).mkdirs();
- }
+ return task("lex_${binaryName}_$filename", type: Exec) {
+
+ // set up inputs and outputs so that gradle knows when this needs to be rebuilt
+ inputs.file "${lexFile}"
+ outputs.files "${ccFile}"
+
+ // doFirst {
+ // file(outputCppDir).mkdirs();
+ // }
+
+ executable 'flex' // the program to execute
// tell flex where to put the output
- args "-o", "$outputDir/${filename}.yy.cc"
+ args "-o", "${ccFile}"
// tell flex the input file
- args inputFile
+ args "${lexFile}"
}
}
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/.gitignore b/Ghidra/Features/Decompiler/src/decompile/cpp/.gitignore
index 2d654581c6..9b4cc5de8b 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/.gitignore
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/.gitignore
@@ -1,9 +1,3 @@
-grammar.cc
-pcodeparse.cc
-slghparse.cc
-slghparse.tab.hh
-slghscan.cc
-xml.cc
coreext_*
ghidraext_*
consoleext_*
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile b/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile
index deb0f22cda..76eed1458a 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile
@@ -140,7 +140,7 @@ SLEIGH_OPT_OBJS=$(SLEIGH_NAMES:%=sla_opt/%.o)
LIBSLA_DBG_OBJS=$(LIBSLA_NAMES:%=com_dbg/%.o)
LIBSLA_OPT_OBJS=$(LIBSLA_NAMES:%=com_opt/%.o)
LIBSLA_SOURCE=$(LIBSLA_NAMES:%=%.cc) $(LIBSLA_NAMES:%=%.hh) \
- $(SLACOMP:%=%.cc) slgh_compile.hh slghparse.tab.hh types.h \
+ $(SLACOMP:%=%.cc) slgh_compile.hh slghparse.hh types.h \
partmap.hh error.hh slghparse.y pcodeparse.y xml.y slghscan.l loadimage_bfd.hh loadimage_bfd.cc
LIBDECOMP_DBG_OBJS=$(LIBDECOMP_NAMES:%=com_dbg/%.o)
LIBDECOMP_OPT_OBJS=$(LIBDECOMP_NAMES:%=com_opt/%.o)
@@ -223,16 +223,14 @@ pcodeparse.cc: pcodeparse.y
$(YACC) -p pcode -o $@ $<
slghparse.cc: slghparse.y
$(YACC) -d -o $@ $<
- mv slghparse.hh slghparse.tab.hh
slghscan.cc: slghscan.l
$(LEX) -o$@ $<
ruleparse.cc: ruleparse.y
$(YACC) -p ruleparse -d -o $@ $<
- mv ruleparse.hh ruleparse.tab.hh
-slghparse.tab.hh: slghparse.y slghparse.cc
-slghscan.cc: slghparse.tab.hh
-ruleparse.tab.hh: ruleparse.y ruleparse.cc
+slghparse.hh: slghparse.y slghparse.cc
+slghscan.cc: slghparse.hh slgh_compile.hh
+ruleparse.hh: ruleparse.y ruleparse.cc
decomp_dbg: $(COMMANDLINE_DBG_OBJS)
$(CXX) $(DBG_CXXFLAGS) $(ARCH_TYPE) -o decomp_dbg $(COMMANDLINE_DBG_OBJS) $(BFDLIB) $(LNK)
@@ -382,7 +380,6 @@ resetgcov:
reallyclean: clean
rm -rf coreext_*.cc coreext_*.hh ghidraext_*.cc ghidraext_*.hh consoleext_*.cc consoleext_*.hh
- rm -rf grammar.cc xml.cc pcodeparse.cc slghparse.cc slghparse.tab.hh slghscan.cc ruleparse.cc ruleparse.tab.hh
rm -rf com_dbg com_opt ghi_dbg ghi_opt sla_dbg sla_opt
rm -f $(EXECS) TAGS *~
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.cc
new file mode 100644
index 0000000000..d6fc5792a1
--- /dev/null
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.cc
@@ -0,0 +1,3323 @@
+/* ###
+ * IP: GHIDRA
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* A Bison parser, made by GNU Bison 3.0.4. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "3.0.4"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+/* Substitute the variable and function names. */
+#define yyparse grammarparse
+#define yylex grammarlex
+#define yyerror grammarerror
+#define yydebug grammardebug
+#define yynerrs grammarnerrs
+
+#define yylval grammarlval
+#define yychar grammarchar
+
+/* Copy the first part of user declarations. */
+#line 16 "src/decompile/cpp/grammar.y" /* yacc.c:339 */
+
+#include "grammar.hh"
+
+extern int yylex(void);
+extern int yyerror(const char *str);
+static CParse *parse;
+extern int yydebug;
+
+#line 83 "src/decompile/cpp/grammar.cc" /* yacc.c:339 */
+
+# ifndef YY_NULLPTR
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int grammardebug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ DOTDOTDOT = 258,
+ BADTOKEN = 259,
+ STRUCT = 260,
+ UNION = 261,
+ ENUM = 262,
+ DECLARATION_RESULT = 263,
+ PARAM_RESULT = 264,
+ NUMBER = 265,
+ IDENTIFIER = 266,
+ STORAGE_CLASS_SPECIFIER = 267,
+ TYPE_QUALIFIER = 268,
+ FUNCTION_SPECIFIER = 269,
+ TYPE_NAME = 270
+ };
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
+union YYSTYPE
+{
+#line 25 "src/decompile/cpp/grammar.y" /* yacc.c:355 */
+
+ uint4 flags;
+ TypeDeclarator *dec;
+ vector<TypeDeclarator *> *declist;
+ TypeSpecifiers *spec;
+ vector<uint4> *ptrspec;
+ Datatype *type;
+ Enumerator *enumer;
+ vector<Enumerator *> *vecenum;
+ string *str;
+ uintb *i;
+
+#line 149 "src/decompile/cpp/grammar.cc" /* yacc.c:355 */
+};
+
+typedef union YYSTYPE YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern YYSTYPE grammarlval;
+
+int grammarparse (void);
+
+
+
+/* Copy the second part of user declarations. */
+
+#line 166 "src/decompile/cpp/grammar.cc" /* yacc.c:358 */
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 18
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 155
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 26
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 26
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 71
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 115
+
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 270
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
+static const yytype_uint8 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,
+ 21, 22, 25, 2, 17, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 16,
+ 2, 20, 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, 23, 2, 24, 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, 18, 2, 19, 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
+};
+
+#if YYDEBUG
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_uint8 yyrline[] =
+{
+ 0, 60, 60, 61, 65, 66, 70, 71, 72, 73,
+ 74, 75, 76, 77, 81, 82, 86, 91, 92, 93,
+ 97, 98, 99, 100, 101, 102, 106, 107, 111, 115,
+ 116, 117, 118, 122, 123, 127, 132, 133, 134, 135,
+ 136, 140, 141, 145, 146, 150, 151, 155, 156, 157,
+ 158, 160, 165, 166, 167, 168, 172, 173, 177, 178,
+ 182, 183, 187, 188, 189, 193, 194, 195, 199, 201,
+ 203, 207
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || 0
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "DOTDOTDOT", "BADTOKEN", "STRUCT",
+ "UNION", "ENUM", "DECLARATION_RESULT", "PARAM_RESULT", "NUMBER",
+ "IDENTIFIER", "STORAGE_CLASS_SPECIFIER", "TYPE_QUALIFIER",
+ "FUNCTION_SPECIFIER", "TYPE_NAME", "';'", "','", "'{'", "'}'", "'='",
+ "'('", "')'", "'['", "']'", "'*'", "$accept", "document", "declaration",
+ "declaration_specifiers", "init_declarator_list", "init_declarator",
+ "type_specifier", "struct_or_union_specifier", "struct_declaration_list",
+ "struct_declaration", "specifier_qualifier_list",
+ "struct_declarator_list", "struct_declarator", "enum_specifier",
+ "enumerator_list", "enumerator", "declarator", "direct_declarator",
+ "pointer", "type_qualifier_list", "parameter_type_list",
+ "parameter_list", "parameter_declaration", "abstract_declarator",
+ "direct_abstract_declarator", "assignment_expression", YY_NULLPTR
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 59, 44, 123, 125,
+ 61, 40, 41, 91, 93, 42
+};
+# endif
+
+#define YYPACT_NINF -71
+
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-71)))
+
+#define YYTABLE_NINF -1
+
+#define yytable_value_is_error(Yytable_value) \
+ 0
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int16 yypact[] =
+{
+ 114, 102, 102, 16, 41, 59, 108, 102, 102, 102,
+ -71, -71, 62, 102, -71, -71, 9, -71, -71, 31,
+ 105, 46, 105, 54, 68, -71, -71, -71, -71, -71,
+ 12, 2, 116, -71, -71, 104, 70, -71, 9, -71,
+ 71, -71, 107, 105, 105, 105, 35, -71, 12, 105,
+ 38, 68, 65, 39, -71, 91, -71, -71, 11, -71,
+ 12, 102, 8, 104, 117, 107, 102, 128, 56, -71,
+ -71, -71, -71, 118, -71, -71, 61, -71, 112, 130,
+ 3, -71, -71, -71, -71, -71, 119, 76, -71, -71,
+ 111, 120, -71, 121, 122, -71, -71, 12, -71, 36,
+ -71, -71, -71, -71, -71, 83, 123, -71, -71, -71,
+ -71, -71, -71, -71, -71
+};
+
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 0, 0, 0, 0, 0, 0, 0, 6, 8, 9,
+ 17, 2, 0, 7, 18, 19, 63, 3, 1, 22,
+ 0, 25, 0, 40, 0, 10, 12, 13, 47, 4,
+ 0, 52, 0, 14, 16, 45, 0, 11, 0, 62,
+ 65, 64, 66, 0, 31, 29, 0, 26, 0, 0,
+ 0, 0, 43, 0, 41, 0, 56, 54, 53, 5,
+ 0, 0, 0, 46, 0, 67, 0, 0, 0, 32,
+ 30, 20, 27, 0, 33, 35, 0, 23, 0, 0,
+ 0, 37, 48, 57, 55, 15, 0, 58, 60, 71,
+ 0, 0, 68, 0, 0, 21, 28, 0, 24, 0,
+ 36, 44, 39, 42, 51, 0, 0, 50, 70, 69,
+ 34, 38, 59, 61, 49
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int8 yypgoto[] =
+{
+ -71, -71, -71, 93, -71, 82, -1, -71, -11, -37,
+ 92, -71, 48, -71, 97, -70, -13, 63, -12, 87,
+ 84, -71, 0, 113, 115, -62
+};
+
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 3, 11, 16, 32, 33, 45, 14, 46, 47,
+ 48, 73, 74, 15, 53, 54, 34, 35, 36, 58,
+ 86, 87, 88, 41, 42, 91
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_uint8 yytable[] =
+{
+ 13, 13, 17, 39, 40, 94, 13, 13, 13, 72,
+ 103, 50, 13, 72, 52, 56, 18, 55, 89, 57,
+ 28, 56, 102, 28, 83, 55, 40, 31, 106, 103,
+ 38, 72, 68, 30, 31, 75, 31, 31, 76, 72,
+ 4, 5, 6, 4, 5, 6, 84, 52, 44, 43,
+ 10, 44, 19, 10, 71, 111, 80, 77, 81, 20,
+ 13, 4, 5, 6, 49, 13, 4, 5, 6, 44,
+ 21, 10, 51, 28, 44, 95, 10, 22, 29, 52,
+ 98, 28, 28, 30, 75, 79, 112, 31, 4, 5,
+ 6, 30, 38, 105, 12, 7, 8, 9, 10, 63,
+ 25, 26, 27, 63, 13, 113, 37, 4, 5, 6,
+ 4, 5, 6, 82, 7, 8, 9, 10, 44, 23,
+ 10, 89, 1, 2, 83, 61, 24, 62, 66, 99,
+ 67, 100, 59, 60, 96, 97, 69, 70, 89, 92,
+ 101, 104, 85, 108, 107, 110, 109, 114, 78, 90,
+ 93, 64, 0, 0, 0, 65
+};
+
+static const yytype_int8 yycheck[] =
+{
+ 1, 2, 2, 16, 16, 67, 7, 8, 9, 46,
+ 80, 22, 13, 50, 11, 13, 0, 30, 10, 31,
+ 11, 13, 19, 11, 13, 38, 38, 25, 90, 99,
+ 21, 68, 43, 21, 25, 48, 25, 25, 49, 76,
+ 5, 6, 7, 5, 6, 7, 58, 11, 13, 18,
+ 15, 13, 11, 15, 19, 19, 17, 19, 19, 18,
+ 61, 5, 6, 7, 18, 66, 5, 6, 7, 13,
+ 11, 15, 18, 11, 13, 19, 15, 18, 16, 11,
+ 19, 11, 11, 21, 97, 20, 3, 25, 5, 6,
+ 7, 21, 21, 17, 1, 12, 13, 14, 15, 36,
+ 7, 8, 9, 40, 105, 105, 13, 5, 6, 7,
+ 5, 6, 7, 22, 12, 13, 14, 15, 13, 11,
+ 15, 10, 8, 9, 13, 21, 18, 23, 21, 17,
+ 23, 19, 16, 17, 16, 17, 44, 45, 10, 22,
+ 10, 22, 60, 22, 24, 97, 24, 24, 51, 62,
+ 66, 38, -1, -1, -1, 40
+};
+
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 8, 9, 27, 5, 6, 7, 12, 13, 14,
+ 15, 28, 29, 32, 33, 39, 29, 48, 0, 11,
+ 18, 11, 18, 11, 18, 29, 29, 29, 11, 16,
+ 21, 25, 30, 31, 42, 43, 44, 29, 21, 42,
+ 44, 49, 50, 18, 13, 32, 34, 35, 36, 18,
+ 34, 18, 11, 40, 41, 42, 13, 44, 45, 16,
+ 17, 21, 23, 43, 49, 50, 21, 23, 34, 36,
+ 36, 19, 35, 37, 38, 42, 34, 19, 40, 20,
+ 17, 19, 22, 13, 44, 31, 46, 47, 48, 10,
+ 45, 51, 22, 46, 51, 19, 16, 17, 19, 17,
+ 19, 10, 19, 41, 22, 17, 51, 24, 22, 24,
+ 38, 19, 3, 48, 24
+};
+
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 26, 27, 27, 28, 28, 29, 29, 29, 29,
+ 29, 29, 29, 29, 30, 30, 31, 32, 32, 32,
+ 33, 33, 33, 33, 33, 33, 34, 34, 35, 36,
+ 36, 36, 36, 37, 37, 38, 39, 39, 39, 39,
+ 39, 40, 40, 41, 41, 42, 42, 43, 43, 43,
+ 43, 43, 44, 44, 44, 44, 45, 45, 46, 46,
+ 47, 47, 48, 48, 48, 49, 49, 49, 50, 50,
+ 50, 51
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 2, 2, 2, 3, 1, 1, 1, 1,
+ 2, 2, 2, 2, 1, 3, 1, 1, 1, 1,
+ 4, 5, 2, 4, 5, 2, 1, 2, 3, 1,
+ 2, 1, 2, 1, 3, 1, 5, 4, 6, 5,
+ 2, 1, 3, 1, 3, 1, 2, 1, 3, 5,
+ 4, 4, 1, 2, 2, 3, 1, 2, 1, 3,
+ 1, 3, 2, 1, 2, 1, 1, 2, 3, 4,
+ 4, 1
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (0)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+{
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ YYUSE (yytype);
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+{
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
+{
+ unsigned long int yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+{
+ YYUSE (yyvaluep);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (void)
+{
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* 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;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex ();
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+#line 60 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { parse->setResultDeclarations((yyvsp[0].declist)); }
+#line 1334 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 3:
+#line 61 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { vector<TypeDeclarator *> *res = parse->newVecDeclarator(); res->push_back((yyvsp[0].dec)); parse->setResultDeclarations(res); }
+#line 1340 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 4:
+#line 65 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = parse->mergeSpecDecVec((yyvsp[-1].spec)); }
+#line 1346 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 5:
+#line 66 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = parse->mergeSpecDecVec((yyvsp[-2].spec),(yyvsp[-1].declist)); }
+#line 1352 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 6:
+#line 70 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.spec) = parse->newSpecifier(); parse->addSpecifier((yyval.spec),(yyvsp[0].str)); }
+#line 1358 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 7:
+#line 71 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.spec) = parse->newSpecifier(); parse->addTypeSpecifier((yyval.spec),(yyvsp[0].type)); }
+#line 1364 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 8:
+#line 72 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.spec) = parse->newSpecifier(); parse->addSpecifier((yyval.spec),(yyvsp[0].str)); }
+#line 1370 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 9:
+#line 73 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.spec) = parse->newSpecifier(); parse->addFuncSpecifier((yyval.spec),(yyvsp[0].str)); }
+#line 1376 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 10:
+#line 74 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.spec) = parse->addSpecifier((yyvsp[0].spec),(yyvsp[-1].str)); }
+#line 1382 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 11:
+#line 75 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.spec) = parse->addTypeSpecifier((yyvsp[0].spec),(yyvsp[-1].type)); }
+#line 1388 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 12:
+#line 76 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.spec) = parse->addSpecifier((yyvsp[0].spec),(yyvsp[-1].str)); }
+#line 1394 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 13:
+#line 77 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.spec) = parse->addFuncSpecifier((yyvsp[0].spec),(yyvsp[-1].str)); }
+#line 1400 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 14:
+#line 81 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = parse->newVecDeclarator(); (yyval.declist)->push_back((yyvsp[0].dec)); }
+#line 1406 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 15:
+#line 82 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = (yyvsp[-2].declist); (yyval.declist)->push_back((yyvsp[0].dec)); }
+#line 1412 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 16:
+#line 86 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = (yyvsp[0].dec); }
+#line 1418 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 17:
+#line 91 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = (yyvsp[0].type); }
+#line 1424 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 18:
+#line 92 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = (yyvsp[0].type); }
+#line 1430 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 19:
+#line 93 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = (yyvsp[0].type); }
+#line 1436 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 20:
+#line 97 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = parse->newStruct("",(yyvsp[-1].declist)); }
+#line 1442 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 21:
+#line 98 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = parse->newStruct(*(yyvsp[-3].str),(yyvsp[-1].declist)); }
+#line 1448 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 22:
+#line 99 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = parse->oldStruct(*(yyvsp[0].str)); }
+#line 1454 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 23:
+#line 100 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = parse->newUnion("",(yyvsp[-1].declist)); }
+#line 1460 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 24:
+#line 101 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = parse->newUnion(*(yyvsp[-3].str),(yyvsp[-1].declist)); }
+#line 1466 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 25:
+#line 102 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = parse->oldUnion(*(yyvsp[0].str)); }
+#line 1472 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 26:
+#line 106 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = (yyvsp[0].declist); }
+#line 1478 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 27:
+#line 107 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = (yyvsp[-1].declist); (yyval.declist)->insert((yyval.declist)->end(),(yyvsp[0].declist)->begin(),(yyvsp[0].declist)->end()); }
+#line 1484 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 28:
+#line 111 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = parse->mergeSpecDecVec((yyvsp[-2].spec),(yyvsp[-1].declist)); }
+#line 1490 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 29:
+#line 115 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.spec) = parse->newSpecifier(); parse->addTypeSpecifier((yyval.spec),(yyvsp[0].type)); }
+#line 1496 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 30:
+#line 116 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.spec) = parse->addTypeSpecifier((yyvsp[0].spec),(yyvsp[-1].type)); }
+#line 1502 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 31:
+#line 117 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.spec) = parse->newSpecifier(); parse->addSpecifier((yyval.spec),(yyvsp[0].str)); }
+#line 1508 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 32:
+#line 118 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.spec) = parse->addSpecifier((yyvsp[0].spec),(yyvsp[-1].str)); }
+#line 1514 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 33:
+#line 122 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = parse->newVecDeclarator(); (yyval.declist)->push_back((yyvsp[0].dec)); }
+#line 1520 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 34:
+#line 123 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = (yyvsp[-2].declist); (yyval.declist)->push_back((yyvsp[0].dec)); }
+#line 1526 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 35:
+#line 127 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = (yyvsp[0].dec); }
+#line 1532 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 36:
+#line 132 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = parse->newEnum(*(yyvsp[-3].str),(yyvsp[-1].vecenum)); }
+#line 1538 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 37:
+#line 133 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = parse->newEnum("",(yyvsp[-1].vecenum)); }
+#line 1544 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 38:
+#line 134 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = parse->newEnum(*(yyvsp[-4].str),(yyvsp[-2].vecenum)); }
+#line 1550 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 39:
+#line 135 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = parse->newEnum("",(yyvsp[-2].vecenum)); }
+#line 1556 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 40:
+#line 136 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.type) = parse->oldEnum(*(yyvsp[0].str)); }
+#line 1562 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 41:
+#line 140 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.vecenum) = parse->newVecEnumerator(); (yyval.vecenum)->push_back((yyvsp[0].enumer)); }
+#line 1568 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 42:
+#line 141 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.vecenum) = (yyvsp[-2].vecenum); (yyval.vecenum)->push_back((yyvsp[0].enumer)); }
+#line 1574 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 43:
+#line 145 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.enumer) = parse->newEnumerator(*(yyvsp[0].str)); }
+#line 1580 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 44:
+#line 146 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.enumer) = parse->newEnumerator(*(yyvsp[-2].str),*(yyvsp[0].i)); }
+#line 1586 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 45:
+#line 150 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = (yyvsp[0].dec); }
+#line 1592 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 46:
+#line 151 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = parse->mergePointer((yyvsp[-1].ptrspec),(yyvsp[0].dec)); }
+#line 1598 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 47:
+#line 155 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = parse->newDeclarator((yyvsp[0].str)); }
+#line 1604 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 48:
+#line 156 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = (yyvsp[-1].dec); }
+#line 1610 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 49:
+#line 157 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = parse->newArray((yyvsp[-4].dec),(yyvsp[-2].flags),(yyvsp[-1].i)); }
+#line 1616 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 50:
+#line 158 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = parse->newArray((yyvsp[-3].dec),0,(yyvsp[-1].i)); }
+#line 1622 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 51:
+#line 160 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = parse->newFunc((yyvsp[-3].dec),(yyvsp[-1].declist)); }
+#line 1628 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 52:
+#line 165 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.ptrspec) = parse->newPointer(); (yyval.ptrspec)->push_back(0); }
+#line 1634 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 53:
+#line 166 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.ptrspec) = parse->newPointer(); (yyval.ptrspec)->push_back((yyvsp[0].flags)); }
+#line 1640 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 54:
+#line 167 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.ptrspec) = (yyvsp[0].ptrspec); (yyval.ptrspec)->push_back(0); }
+#line 1646 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 55:
+#line 168 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.ptrspec) = (yyvsp[0].ptrspec); (yyval.ptrspec)->push_back((yyvsp[-1].flags)); }
+#line 1652 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 56:
+#line 172 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.flags) = parse->convertFlag((yyvsp[0].str)); }
+#line 1658 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 57:
+#line 173 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.flags) = (yyvsp[-1].flags); (yyval.flags) |= parse->convertFlag((yyvsp[0].str)); }
+#line 1664 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 58:
+#line 177 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = (yyvsp[0].declist); }
+#line 1670 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 59:
+#line 178 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = (yyvsp[-2].declist); (yyval.declist)->push_back((TypeDeclarator *)0); }
+#line 1676 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 60:
+#line 182 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = parse->newVecDeclarator(); (yyval.declist)->push_back((yyvsp[0].dec)); }
+#line 1682 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 61:
+#line 183 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.declist) = (yyvsp[-2].declist); (yyval.declist)->push_back((yyvsp[0].dec)); }
+#line 1688 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 62:
+#line 187 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = parse->mergeSpecDec((yyvsp[-1].spec),(yyvsp[0].dec)); }
+#line 1694 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 63:
+#line 188 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = parse->mergeSpecDec((yyvsp[0].spec)); }
+#line 1700 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 64:
+#line 189 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = parse->mergeSpecDec((yyvsp[-1].spec),(yyvsp[0].dec)); }
+#line 1706 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 65:
+#line 193 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = parse->newDeclarator(); parse->mergePointer((yyvsp[0].ptrspec),(yyval.dec)); }
+#line 1712 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 66:
+#line 194 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = (yyvsp[0].dec); }
+#line 1718 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 67:
+#line 195 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = parse->mergePointer((yyvsp[-1].ptrspec),(yyvsp[0].dec)); }
+#line 1724 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 68:
+#line 199 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = (yyvsp[-1].dec); }
+#line 1730 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 69:
+#line 201 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = parse->newArray((yyvsp[-3].dec),0,(yyvsp[-1].i)); }
+#line 1736 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 70:
+#line 203 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.dec) = parse->newFunc((yyvsp[-3].dec),(yyvsp[-1].declist)); }
+#line 1742 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+ case 71:
+#line 207 "src/decompile/cpp/grammar.y" /* yacc.c:1646 */
+ { (yyval.i) = (yyvsp[0].i); }
+#line 1748 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ break;
+
+
+#line 1752 "src/decompile/cpp/grammar.cc" /* yacc.c:1646 */
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+ /* 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 - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ return yyresult;
+}
+#line 210 "src/decompile/cpp/grammar.y" /* yacc.c:1906 */
+
+
+void GrammarToken::set(uint4 tp)
+
+{
+ type = tp;
+}
+
+void GrammarToken::set(uint4 tp,char *ptr,int4 len)
+
+{
+ type = tp;
+ switch(tp) {
+ case integer:
+ {
+ string charstring(ptr,len);
+ istringstream s(charstring);
+ s.unsetf(ios::dec | ios::hex | ios::oct);
+ intb val;
+ s >> val;
+ value.integer = (uintb)val;
+ }
+ break;
+ case identifier:
+ case stringval:
+ value.stringval = new string(ptr,len);
+ break;
+ case charconstant:
+ if (len==1)
+ value.integer = (uintb)*ptr;
+ else { // Backslash
+ switch(ptr[1]) {
+ case 'n':
+ value.integer = 10;
+ break;
+ case '0':
+ value.integer = 0;
+ break;
+ case 'a':
+ value.integer = 7;
+ break;
+ case 'b':
+ value.integer = 8;
+ break;
+ case 't':
+ value.integer = 9;
+ break;
+ case 'v':
+ value.integer = 11;
+ break;
+ case 'f':
+ value.integer = 12;
+ break;
+ case 'r':
+ value.integer = 13;
+ break;
+ default:
+ value.integer = (uintb)ptr[1];
+ break;
+ }
+ }
+ break;
+ default:
+ throw LowlevelError("Bad internal grammar token set");
+ }
+}
+
+GrammarToken::GrammarToken(void)
+
+{
+ type = 0;
+ value.integer = 0;
+}
+
+GrammarLexer::GrammarLexer(int4 maxbuffer)
+
+{
+ buffersize = maxbuffer;
+ buffer = new char[ maxbuffer ];
+ bufstart = 0;
+ bufend = 0;
+ curlineno = 0;
+ state = start;
+ in = (istream *)0;
+ endoffile = true;
+}
+
+GrammarLexer::~GrammarLexer(void)
+
+{
+ delete [] buffer;
+}
+
+void GrammarLexer::bumpLine(void)
+
+{ // Keep track of a newline
+ curlineno += 1;
+ bufstart = 0;
+ bufend = 0;
+}
+
+uint4 GrammarLexer::moveState(char lookahead)
+
+{ // Change finite state machine based on lookahead
+ uint4 res;
+ bool newline = false;
+
+ if (lookahead<32) {
+ if ((lookahead == 9)||(lookahead==11)||(lookahead==12)||
+ (lookahead==13))
+ lookahead = ' ';
+ else if (lookahead == '\n') {
+ newline = true;
+ lookahead = ' ';
+ }
+ else {
+ setError("Illegal character");
+ return GrammarToken::badtoken;
+ }
+ }
+ else if (lookahead >= 127) {
+ setError("Illegal character");
+ return GrammarToken::badtoken;
+ }
+
+ res = 0;
+ bool syntaxerror = false;
+ switch(state) {
+ case start:
+ switch(lookahead) {
+ case '/':
+ state = slash;
+ break;
+ case '.':
+ state = dot1;
+ break;
+ case '*':
+ case ',':
+ case '(':
+ case ')':
+ case '[':
+ case ']':
+ case '{':
+ case '}':
+ case ';':
+ case '=':
+ state = punctuation;
+ bufstart = bufend-1;
+ break;
+ case '-':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ state = number;
+ bufstart = bufend-1;
+ break;
+ case ' ':
+ break; // Ignore since we are already open
+ case '\"':
+ state = doublequote;
+ bufstart = bufend-1;
+ break;
+ case '\'':
+ state = singlequote;
+ break;
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ state = identifier;
+ bufstart = bufend-1;
+ break;
+ default:
+ setError("Illegal character");
+ return GrammarToken::badtoken;
+ }
+ break;
+ case slash:
+ if (lookahead=='*')
+ state = c_comment;
+ else if (lookahead == '/')
+ state = endofline_comment;
+ else
+ syntaxerror = true;
+ break;
+ case dot1:
+ if (lookahead=='.')
+ state = dot2;
+ else
+ syntaxerror = true;
+ break;
+ case dot2:
+ if (lookahead=='.')
+ state = dot3;
+ else
+ syntaxerror = true;
+ break;
+ case dot3:
+ state = start;
+ res = GrammarToken::dotdotdot;
+ break;
+ case punctuation:
+ state = start;
+ res = (uint4)buffer[bufstart];
+ break;
+ case endofline_comment:
+ if (newline)
+ state = start;
+ break; // Anything else is part of comment
+ case c_comment:
+ if (lookahead == '/') {
+ if ((bufend >1)&&(buffer[bufend-2]=='*'))
+ state = start;
+ }
+ break; // Anything else is part of comment
+ case doublequote:
+ if (lookahead == '\"')
+ state = doublequoteend;
+ break; // Anything else is part of string
+ case doublequoteend:
+ state = start;
+ res = GrammarToken::stringval;
+ break;
+ case singlequote:
+ if (lookahead == '\\')
+ state = singlebackslash;
+ else if (lookahead == '\'')
+ state = singlequoteend;
+ break; // Anything else is part of string
+ case singlequoteend:
+ state = start;
+ res = GrammarToken::charconstant;
+ break;
+ case singlebackslash: // Seen backslash in a single quoted string
+ state = singlequote;
+ break;
+ case number:
+ if (lookahead=='x') {
+ if (((bufend-bufstart)!=2)||(buffer[bufstart]!='0'))
+ syntaxerror = true; // x only allowed as 0x hex indicator
+ }
+ else if ((lookahead>='0')&&(lookahead<='9')) {
+ }
+ else if ((lookahead>='A')&&(lookahead<='Z')) {
+ }
+ else if ((lookahead>='a')&&(lookahead<='z')) {
+ }
+ else if (lookahead == '_') {
+ }
+ else {
+ state = start;
+ res = GrammarToken::integer;
+ }
+ break;
+ case identifier:
+ if ((lookahead>='0')&&(lookahead<='9')) {
+ }
+ else if ((lookahead>='A')&&(lookahead<='Z')) {
+ }
+ else if ((lookahead>='a')&&(lookahead<='z')) {
+ }
+ else if (lookahead == '_' || lookahead == ':') {
+ }
+ else {
+ state = start;
+ res = GrammarToken::identifier;
+ }
+ break;
+ }
+ if (syntaxerror) {
+ setError("Syntax error");
+ return GrammarToken::badtoken;
+ }
+ if (newline) bumpLine();
+ return res;
+}
+
+void GrammarLexer::establishToken(GrammarToken &token,uint4 val)
+
+{
+ if (val < GrammarToken::integer)
+ token.set(val);
+ else {
+ token.set(val,buffer+bufstart,(bufend-bufstart)-1);
+ }
+ token.setPosition(filestack.back(),curlineno,bufstart);
+}
+
+void GrammarLexer::clear(void)
+
+{ // Clear lexer for a brand new parse
+ filenamemap.clear();
+ streammap.clear();
+ filestack.clear();
+ bufstart = 0;
+ bufend = 0;
+ curlineno = 0;
+ state = start;
+ in = (istream *)0;
+ endoffile = true;
+ error.clear();
+}
+
+void GrammarLexer::writeLocation(ostream &s,int4 line,int4 filenum)
+
+{
+ s << " at line " << dec << line;
+ s << " in " << filenamemap[filenum];
+}
+
+void GrammarLexer::writeTokenLocation(ostream &s,int4 line,int4 colno)
+
+{
+ if (line!=curlineno) return; // Does line match current line in buffer
+ for(int4 i=0;i<bufend;++i)
+ s << buffer[i];
+ s << '\n';
+ for(int4 i=0;i<colno;++i)
+ s << ' ';
+ s << "^--\n";
+}
+
+void GrammarLexer::pushFile(const string &filename,istream *i)
+
+{
+ int4 filenum = filenamemap.size();
+ filenamemap[filenum] = filename;
+ streammap[filenum] = i;
+ filestack.push_back(filenum);
+ in = i;
+ endoffile = false;
+}
+
+void GrammarLexer::popFile(void)
+
+{
+ filestack.pop_back();
+ if (filestack.empty()) {
+ endoffile = true;
+ return;
+ }
+ int4 filenum = filestack.back();
+ in = streammap[filenum]; // Get previous stream
+}
+
+void GrammarLexer::getNextToken(GrammarToken &token)
+
+{ // Read next token, return true if end of stream
+ char nextchar;
+ uint4 tok = GrammarToken::badtoken;
+ bool firsttimethru = true;
+
+ if (endoffile) {
+ token.set(GrammarToken::endoffile);
+ return;
+ }
+ do {
+ if ((!firsttimethru)||(bufend==0)) {
+ if (bufend >= buffersize) {
+ setError("Line too long");
+ tok = GrammarToken::badtoken;
+ break;
+ }
+ in->get(nextchar);
+ if (!(*in)) {
+ endoffile = true;
+ break;
+ }
+ buffer[bufend++] = nextchar;
+ }
+ else
+ nextchar = buffer[bufend-1]; // Get old lookahead token
+ tok = moveState(nextchar);
+ firsttimethru = false;
+ } while(tok == 0);
+ if (endoffile) {
+ buffer[bufend++] = ' '; // Simulate a space
+ tok = moveState(' '); // to let the final token resolve
+ if ((tok==0)&&(state != start)&&(state != endofline_comment)) {
+ setError("Incomplete token");
+ tok = GrammarToken::badtoken;
+ }
+ }
+ establishToken(token,tok);
+}
+
+Datatype *PointerModifier::modType(Datatype *base,const TypeDeclarator *decl,Architecture *glb) const
+
+{
+ int4 addrsize = glb->getDefaultDataSpace()->getAddrSize();
+ Datatype *restype;
+ restype = glb->types->getTypePointer(addrsize,base,glb->getDefaultDataSpace()->getWordSize());
+ return restype;
+}
+
+Datatype *ArrayModifier::modType(Datatype *base,const TypeDeclarator *decl,Architecture *glb) const
+
+{
+ Datatype *restype = glb->types->getTypeArray(arraysize,base);
+ return restype;
+}
+
+FunctionModifier::FunctionModifier(const vector<TypeDeclarator *> *p,bool dtdtdt)
+
+{
+ paramlist = *p;
+ if (paramlist.size()==1) {
+ TypeDeclarator *decl = paramlist[0];
+ if (decl->numModifiers()==0) { // Check for void as an inputtype
+ Datatype *ct = decl->getBaseType();
+ if ((ct != (Datatype *)0)&&(ct->getMetatype()==TYPE_VOID))
+ paramlist.clear();
+ }
+ }
+ dotdotdot = dtdtdt;
+}
+
+void FunctionModifier::getInTypes(vector<Datatype *> &intypes,Architecture *glb) const
+
+{
+ for(uint4 i=0;i<paramlist.size();++i) {
+ Datatype *ct = paramlist[i]->buildType(glb);
+ intypes.push_back( ct );
+ }
+}
+
+void FunctionModifier::getInNames(vector<string> &innames) const
+
+{
+ for(uint4 i=0;i<paramlist.size();++i)
+ innames.push_back(paramlist[i]->getIdentifier());
+}
+
+bool FunctionModifier::isValid(void) const
+
+{
+ for(uint4 i=0;i<paramlist.size();++i) {
+ TypeDeclarator *decl = paramlist[i];
+ if (!decl->isValid()) return false;
+ if (decl->numModifiers()==0) {
+ Datatype *ct = decl->getBaseType();
+ if ((ct != (Datatype *)0)&&(ct->getMetatype()==TYPE_VOID))
+ return false; // Extra void type
+ }
+ }
+ return true;
+}
+
+Datatype *FunctionModifier::modType(Datatype *base,const TypeDeclarator *decl,Architecture *glb) const
+
+{
+ vector<Datatype *> intypes;
+
+ // Varargs is encoded as extra null pointer in paramlist
+ bool dotdotdot = false;
+ if ((!paramlist.empty())&&(paramlist.back() == (TypeDeclarator *)0)) {
+ dotdotdot = true;
+ }
+
+ getInTypes(intypes,glb);
+
+ ProtoModel *protomodel = decl->getModel(glb);
+ return glb->types->getTypeCode(protomodel,base,intypes,dotdotdot);
+}
+
+TypeDeclarator::~TypeDeclarator(void)
+
+{
+ for(uint4 i=0;i<mods.size();++i)
+ delete mods[i];
+}
+
+Datatype *TypeDeclarator::buildType(Architecture *glb) const
+
+{ // Apply modifications to the basetype, (in reverse order of binding)
+ Datatype *restype = basetype;
+ vector<TypeModifier *>::const_iterator iter;
+ iter = mods.end();
+ while(iter != mods.begin()) {
+ --iter;
+ restype = (*iter)->modType(restype,this,glb);
+ }
+ return restype;
+}
+
+ProtoModel *TypeDeclarator::getModel(Architecture *glb) const
+
+{
+ // Get prototype model
+ ProtoModel *protomodel = (ProtoModel *)0;
+ if (model.size()!=0)
+ protomodel = glb->getModel(model);
+ if (protomodel == (ProtoModel *)0)
+ protomodel = glb->defaultfp;
+ return protomodel;
+}
+
+bool TypeDeclarator::getPrototype(PrototypePieces &pieces,Architecture *glb) const
+
+{
+ TypeModifier *mod = (TypeModifier *)0;
+ if (mods.size() > 0)
+ mod = mods[0];
+ if ((mod == (TypeModifier *)0)||(mod->getType()!=TypeModifier::function_mod))
+ return false;
+ FunctionModifier *fmod = (FunctionModifier *)mod;
+
+ pieces.model = getModel(glb);
+ pieces.name = ident;
+ pieces.intypes.clear();
+ fmod->getInTypes(pieces.intypes,glb);
+ pieces.innames.clear();
+ fmod->getInNames(pieces.innames);
+ pieces.dotdotdot = fmod->isDotdotdot();
+
+ // Construct the output type
+ pieces.outtype = basetype;
+ vector<TypeModifier *>::const_iterator iter;
+ iter = mods.end();
+ --iter; // At least one modification
+ while(iter != mods.begin()) { // Do not apply function modifier
+ pieces.outtype = (*iter)->modType(pieces.outtype,this,glb);
+ --iter;
+ }
+ return true;
+}
+
+bool TypeDeclarator::isValid(void) const
+
+{
+ if (basetype == (Datatype *)0)
+ return false; // No basetype
+
+ int4 count=0;
+ if ((flags & CParse::f_typedef)!=0)
+ count += 1;
+ if ((flags & CParse::f_extern)!=0)
+ count += 1;
+ if ((flags & CParse::f_static)!=0)
+ count += 1;
+ if ((flags & CParse::f_auto)!=0)
+ count += 1;
+ if ((flags & CParse::f_register)!=0)
+ count += 1;
+ if (count > 1)
+ throw ParseError("Multiple storage specifiers");
+
+ count = 0;
+ if ((flags & CParse::f_const)!=0)
+ count += 1;
+ if ((flags & CParse::f_restrict)!=0)
+ count += 1;
+ if ((flags & CParse::f_volatile)!=0)
+ count += 1;
+ if (count > 1)
+ throw ParseError("Multiple type qualifiers");
+
+ for(uint4 i=0;i<mods.size();++i) {
+ if (!mods[i]->isValid())
+ return false;
+ }
+ return true;
+}
+
+CParse::CParse(Architecture *g,int4 maxbuf)
+ : lexer(maxbuf)
+{
+ glb = g;
+ firsttoken = -1;
+ lastdecls = (vector<TypeDeclarator *> *)0;
+ keywords["typedef"] = f_typedef;
+ keywords["extern"] = f_extern;
+ keywords["static"] = f_static;
+ keywords["auto"] = f_auto;
+ keywords["register"] = f_register;
+ keywords["const"] = f_const;
+ keywords["restrict"] = f_restrict;
+ keywords["volatile"] = f_volatile;
+ keywords["inline"] = f_inline;
+ keywords["struct"] = f_struct;
+ keywords["union"] = f_union;
+ keywords["enum"] = f_enum;
+}
+
+CParse::~CParse(void)
+
+{
+ clearAllocation();
+}
+
+void CParse::clear(void)
+
+{
+ clearAllocation();
+ lasterror.clear();
+ lastdecls = (vector<TypeDeclarator *> *)0;
+ lexer.clear();
+ firsttoken = -1;
+}
+
+TypeDeclarator *CParse::mergeSpecDec(TypeSpecifiers *spec,TypeDeclarator *dec)
+
+{
+ dec->basetype = spec->type_specifier;
+ dec->model = spec->function_specifier;
+ dec->flags |= spec->flags;
+ return dec;
+}
+
+TypeDeclarator *CParse::mergeSpecDec(TypeSpecifiers *spec)
+
+{
+ TypeDeclarator *dec = new TypeDeclarator();
+ typedec_alloc.push_back(dec);
+ return mergeSpecDec(spec,dec);
+}
+
+vector<TypeDeclarator *> *CParse::mergeSpecDecVec(TypeSpecifiers *spec,vector<TypeDeclarator *> *declist)
+
+{
+ for(uint4 i=0;i<declist->size();++i)
+ mergeSpecDec(spec,(*declist)[i]);
+ return declist;
+}
+
+vector<TypeDeclarator *> *CParse::mergeSpecDecVec(TypeSpecifiers *spec)
+
+{
+ vector<TypeDeclarator *> *declist;
+ declist = new vector<TypeDeclarator *>();
+ vecdec_alloc.push_back(declist);
+ TypeDeclarator *dec = new TypeDeclarator();
+ typedec_alloc.push_back(dec);
+ declist->push_back( dec );
+ return mergeSpecDecVec(spec,declist);
+}
+
+uint4 CParse::convertFlag(string *str)
+
+{
+ map<string,uint4>::const_iterator iter;
+
+ iter = keywords.find(*str);
+ if (iter != keywords.end())
+ return (*iter).second;
+ setError("Unknown qualifier");
+ return 0;
+}
+
+TypeSpecifiers *CParse::addSpecifier(TypeSpecifiers *spec,string *str)
+
+{
+ uint4 flag = convertFlag(str);
+ spec->flags |= flag;
+ return spec;
+}
+
+TypeSpecifiers *CParse::addTypeSpecifier(TypeSpecifiers *spec,Datatype *tp)
+
+{
+ if (spec->type_specifier!=(Datatype *)0)
+ setError("Multiple type specifiers");
+ spec->type_specifier = tp;
+ return spec;
+}
+
+TypeSpecifiers *CParse::addFuncSpecifier(TypeSpecifiers *spec,string *str)
+
+{
+ map<string,uint4>::const_iterator iter;
+
+ iter = keywords.find(*str);
+ if (iter != keywords.end())
+ spec->flags |= (*iter).second; // A reserved specifier
+ else {
+ if (spec->function_specifier.size()!=0)
+ setError("Multiple parameter models");
+ spec->function_specifier = *str;
+ }
+ return spec;
+}
+
+TypeDeclarator *CParse::mergePointer(vector<uint4> *ptr,TypeDeclarator *dec)
+
+{
+ for(uint4 i=0;i<ptr->size();++i) {
+ PointerModifier *newmod = new PointerModifier((*ptr)[i]);
+ dec->mods.push_back(newmod);
+ }
+ return dec;
+}
+
+TypeDeclarator *CParse::newDeclarator(string *str)
+
+{
+ TypeDeclarator *res = new TypeDeclarator(*str);
+ typedec_alloc.push_back(res);
+ return res;
+}
+
+TypeDeclarator *CParse::newDeclarator(void)
+
+{
+ TypeDeclarator *res = new TypeDeclarator();
+ typedec_alloc.push_back(res);
+ return res;
+}
+
+TypeSpecifiers *CParse::newSpecifier(void)
+
+{
+ TypeSpecifiers *spec = new TypeSpecifiers();
+ typespec_alloc.push_back(spec);
+ return spec;
+}
+
+vector<TypeDeclarator *> *CParse::newVecDeclarator(void)
+
+{
+ vector<TypeDeclarator *> *res = new vector<TypeDeclarator *>();
+ vecdec_alloc.push_back(res);
+ return res;
+}
+
+vector<uint4> *CParse::newPointer(void)
+
+{
+ vector<uint4> *res = new vector<uint4>();
+ vecuint4_alloc.push_back(res);
+ return res;
+}
+
+TypeDeclarator *CParse::newArray(TypeDeclarator *dec,uint4 flags,uintb *num)
+
+{
+ ArrayModifier *newmod = new ArrayModifier(flags,(int4)*num);
+ dec->mods.push_back(newmod);
+ return dec;
+}
+
+TypeDeclarator *CParse::newFunc(TypeDeclarator *dec,vector<TypeDeclarator *> *declist)
+
+{
+ bool dotdotdot = false;
+ if (!declist->empty()) {
+ if (declist->back() == (TypeDeclarator *)0) {
+ dotdotdot = true;
+ declist->pop_back();
+ }
+ }
+ FunctionModifier *newmod = new FunctionModifier(declist,dotdotdot);
+ dec->mods.push_back(newmod);
+ return dec;
+}
+
+Datatype *CParse::newStruct(const string &ident,vector<TypeDeclarator *> *declist)
+
+{ // Build a new structure
+ TypeStruct *res = glb->types->getTypeStruct(ident); // Create stub (for recursion)
+ vector<TypeField> sublist;
+
+ for(uint4 i=0;i<declist->size();++i) {
+ TypeDeclarator *decl = (*declist)[i];
+ if (!decl->isValid()) {
+ setError("Invalid structure declarator");
+ glb->types->destroyType(res);
+ return (Datatype *)0;
+ }
+ sublist.push_back(TypeField());
+ sublist.back().type = decl->buildType(glb);
+ sublist.back().name = decl->getIdentifier();
+ sublist.back().offset = -1; // Let typegrp figure out offset
+ }
+
+ if (!glb->types->setFields(sublist,res,-1,0)) {
+ setError("Bad structure definition");
+ glb->types->destroyType(res);
+ return (Datatype *)0;
+ }
+ return res;
+}
+
+Datatype *CParse::oldStruct(const string &ident)
+
+{
+ Datatype *res = glb->types->findByName(ident);
+ if ((res==(Datatype *)0)||(res->getMetatype() != TYPE_STRUCT))
+ setError("Identifier does not represent a struct as required");
+ return res;
+}
+
+Datatype *CParse::newUnion(const string &ident,vector<TypeDeclarator *> *declist)
+
+{
+ setError("Unions are currently unsupported");
+ return (Datatype *)0;
+}
+
+Datatype *CParse::oldUnion(const string &ident)
+
+{
+ setError("Unions are currently unsupported");
+ return (Datatype *)0;
+}
+
+Enumerator *CParse::newEnumerator(const string &ident)
+
+{
+ Enumerator *res = new Enumerator(ident);
+ enum_alloc.push_back(res);
+ return res;
+}
+
+Enumerator *CParse::newEnumerator(const string &ident,uintb val)
+
+{
+ Enumerator *res = new Enumerator(ident,val);
+ enum_alloc.push_back(res);
+ return res;
+}
+
+vector<Enumerator *> *CParse::newVecEnumerator(void)
+
+{
+ vector<Enumerator *> *res = new vector<Enumerator *>();
+ vecenum_alloc.push_back(res);
+ return res;
+}
+
+Datatype *CParse::newEnum(const string &ident,vector<Enumerator *> *vecenum)
+
+{
+ TypeEnum *res = glb->types->getTypeEnum(ident);
+ vector<string> namelist;
+ vector<uintb> vallist;
+ vector<bool> assignlist;
+ for(uint4 i=0;i<vecenum->size();++i) {
+ Enumerator *enumer = (*vecenum)[i];
+ namelist.push_back(enumer->enumconstant);
+ vallist.push_back(enumer->value);
+ assignlist.push_back(enumer->constantassigned);
+ }
+ if (!glb->types->setEnumValues(namelist,vallist,assignlist,res)) {
+ setError("Bad enumeration values");
+ glb->types->destroyType(res);
+ return (Datatype *)0;
+ }
+ return res;
+}
+
+Datatype *CParse::oldEnum(const string &ident)
+
+{
+ Datatype *res = glb->types->findByName(ident);
+ if ((res==(Datatype *)0)||(!res->isEnumType()))
+ setError("Identifier does not represent an enum as required");
+ return res;
+}
+
+void CParse::clearAllocation(void)
+
+{
+ list<TypeDeclarator *>::iterator iter1;
+
+ for(iter1=typedec_alloc.begin();iter1!=typedec_alloc.end();++iter1)
+ delete *iter1;
+ typedec_alloc.clear();
+
+ list<TypeSpecifiers *>::iterator iter2;
+ for(iter2=typespec_alloc.begin();iter2!=typespec_alloc.end();++iter2)
+ delete *iter2;
+ typespec_alloc.clear();
+
+ list<vector<uint4> *>::iterator iter3;
+ for(iter3=vecuint4_alloc.begin();iter3!=vecuint4_alloc.end();++iter3)
+ delete *iter3;
+ vecuint4_alloc.clear();
+
+ list<vector<TypeDeclarator *> *>::iterator iter4;
+ for(iter4=vecdec_alloc.begin();iter4!=vecdec_alloc.end();++iter4)
+ delete *iter4;
+ vecdec_alloc.clear();
+
+ list<string *>::iterator iter5;
+ for(iter5=string_alloc.begin();iter5!=string_alloc.end();++iter5)
+ delete *iter5;
+ string_alloc.clear();
+
+ list<uintb *>::iterator iter6;
+ for(iter6=num_alloc.begin();iter6!=num_alloc.end();++iter6)
+ delete *iter6;
+ num_alloc.clear();
+
+ list<Enumerator *>::iterator iter7;
+ for(iter7=enum_alloc.begin();iter7!=enum_alloc.end();++iter7)
+ delete *iter7;
+ enum_alloc.clear();
+
+ list<vector<Enumerator *> *>::iterator iter8;
+ for(iter8=vecenum_alloc.begin();iter8!=vecenum_alloc.end();++iter8)
+ delete *iter8;
+ vecenum_alloc.clear();
+}
+
+int4 CParse::lookupIdentifier(const string &nm)
+
+{
+ map<string,uint4>::const_iterator iter = keywords.find(nm);
+ if (iter != keywords.end()) {
+ switch( (*iter).second ) {
+ case f_typedef:
+ case f_extern:
+ case f_static:
+ case f_auto:
+ case f_register:
+ return STORAGE_CLASS_SPECIFIER;
+ case f_const:
+ case f_restrict:
+ case f_volatile:
+ return TYPE_QUALIFIER;
+ case f_inline:
+ return FUNCTION_SPECIFIER;
+ case f_struct:
+ return STRUCT;
+ case f_union:
+ return UNION;
+ case f_enum:
+ return ENUM;
+ default:
+ break;
+ }
+ }
+ Datatype *tp = glb->types->findByName(nm);
+ if (tp != (Datatype *)0) {
+ yylval.type = tp;
+ return TYPE_NAME;
+ }
+ if (glb->hasModel(nm))
+ return FUNCTION_SPECIFIER;
+ return IDENTIFIER; // Unknown identifier
+}
+
+int4 CParse::lex(void)
+
+{
+ GrammarToken tok;
+
+ if (firsttoken != -1) {
+ int4 retval = firsttoken;
+ firsttoken = -1;
+ return retval;
+ }
+ if (lasterror.size()!=0)
+ return BADTOKEN;
+ lexer.getNextToken(tok);
+ lineno = tok.getLineNo();
+ colno = tok.getColNo();
+ filenum = tok.getFileNum();
+ switch(tok.getType()) {
+ case GrammarToken::integer:
+ case GrammarToken::charconstant:
+ yylval.i = new uintb(tok.getInteger());
+ num_alloc.push_back(yylval.i);
+ return NUMBER;
+ case GrammarToken::identifier:
+ yylval.str = tok.getString();
+ string_alloc.push_back(yylval.str);
+ return lookupIdentifier(*yylval.str);
+ case GrammarToken::stringval:
+ delete tok.getString();
+ setError("Illegal string constant");
+ return BADTOKEN;
+ case GrammarToken::dotdotdot:
+ return DOTDOTDOT;
+ case GrammarToken::badtoken:
+ setError(lexer.getError()); // Error from lexer
+ return BADTOKEN;
+ case GrammarToken::endoffile:
+ return -1; // No more tokens
+ default:
+ return (int4)tok.getType();
+ }
+}
+
+void CParse::setError(const string &msg)
+
+{
+ ostringstream s;
+
+ s << msg;
+ lexer.writeLocation(s,lineno,filenum);
+ s << '\n';
+ lexer.writeTokenLocation(s,lineno,colno);
+ lasterror = s.str();
+}
+
+bool CParse::runParse(uint4 doctype)
+
+{ // Assuming the stream has been setup, parse it
+ switch(doctype) {
+ case doc_declaration:
+ firsttoken = DECLARATION_RESULT;
+ break;
+ case doc_parameter_declaration:
+ firsttoken = PARAM_RESULT;
+ break;
+ default:
+ throw LowlevelError("Bad document type");
+ }
+ parse = this; // Setup global object for yyparse
+ int4 res = yyparse();
+ if (res != 0) {
+ if (lasterror.size()==0)
+ setError("Syntax error");
+ return false;
+ }
+ return true;
+}
+
+bool CParse::parseFile(const string &nm,uint4 doctype)
+
+{ // Run the parser on a file, return true if no parse errors
+ clear(); // Clear out any old parsing
+
+ ifstream s(nm.c_str()); // open file
+ if (!s)
+ throw LowlevelError("Unable to open file for parsing: "+nm);
+
+ lexer.pushFile(nm,&s); // Inform lexer of filename and stream
+ bool res = runParse(doctype);
+ s.close();
+ return res;
+}
+
+bool CParse::parseStream(istream &s,uint4 doctype)
+
+{
+ clear();
+
+ lexer.pushFile("stream",&s);
+ return runParse(doctype);
+}
+
+int yylex(void)
+
+{
+ return parse->lex();
+}
+
+int yyerror(const char *str)
+
+{
+ return 0;
+}
+
+Datatype *parse_type(istream &s,string &name,Architecture *glb)
+
+{
+ CParse parser(glb,1000);
+
+ if (!parser.parseStream(s,CParse::doc_parameter_declaration))
+ throw ParseError(parser.getError());
+ vector<TypeDeclarator *> *decls = parser.getResultDeclarations();
+ if ((decls == (vector<TypeDeclarator *> *)0)||(decls->size()==0))
+ throw ParseError("Did not parse a datatype");
+ if (decls->size() > 1)
+ throw ParseError("Parsed multiple declarations");
+ TypeDeclarator *decl = (*decls)[0];
+ if (!decl->isValid())
+ throw ParseError("Parsed type is invalid");
+ name = decl->getIdentifier();
+ return decl->buildType(glb);
+}
+
+void parse_protopieces(PrototypePieces &pieces,
+ istream &s,Architecture *glb)
+{
+ CParse parser(glb,1000);
+
+ if (!parser.parseStream(s,CParse::doc_declaration))
+ throw ParseError(parser.getError());
+ vector<TypeDeclarator *> *decls = parser.getResultDeclarations();
+ if ((decls == (vector<TypeDeclarator *> *)0)||(decls->size()==0))
+ throw ParseError("Did not parse a datatype");
+ if (decls->size() > 1)
+ throw ParseError("Parsed multiple declarations");
+ TypeDeclarator *decl = (*decls)[0];
+ if (!decl->isValid())
+ throw ParseError("Parsed type is invalid");
+
+ if (!decl->getPrototype(pieces,glb))
+ throw ParseError("Did not parse a prototype");
+}
+
+void parse_C(Architecture *glb,istream &s)
+
+{ // Load type data straight into datastructures
+ CParse parser(glb,1000);
+
+ if (!parser.parseStream(s,CParse::doc_declaration))
+ throw ParseError(parser.getError());
+ vector<TypeDeclarator *> *decls = parser.getResultDeclarations();
+ if ((decls == (vector<TypeDeclarator *> *)0)||(decls->size()==0))
+ throw ParseError("Did not parse a datatype");
+ if (decls->size() > 1)
+ throw ParseError("Parsed multiple declarations");
+ TypeDeclarator *decl = (*decls)[0];
+ if (!decl->isValid())
+ throw ParseError("Parsed type is invalid");
+
+ if (decl->hasProperty(CParse::f_extern)) {
+ PrototypePieces pieces;
+ if (!decl->getPrototype(pieces,glb))
+ throw ParseError("Did not parse prototype as expected");
+ glb->setPrototype(pieces);
+ }
+ else if (decl->hasProperty(CParse::f_typedef)) {
+ Datatype *ct = decl->buildType(glb);
+ if (decl->getIdentifier().size() == 0)
+ throw ParseError("Missing identifier for typedef");
+ glb->types->setName(ct,decl->getIdentifier());
+ }
+ else if (decl->getBaseType()->getMetatype()==TYPE_STRUCT) {
+ // We parsed a struct, treat as a typedef
+ }
+ else if (decl->getBaseType()->isEnumType()) {
+ // We parsed an enum, treat as a typedef
+ }
+ else
+ throw LowlevelError("Not sure what to do with this type");
+}
+
+void parse_toseparator(istream &s,string &name)
+
+{ // parse to next (C) separator
+ char tok;
+
+ name.erase();
+ s >> ws;
+ tok = s.peek();
+
+ while((isalnum(tok))||(tok=='_')) {
+ s >> tok;
+ name += tok;
+ tok = s.peek();
+ }
+}
+
+Address parse_varnode(istream &s,int4 &size,Address &pc,uintm &uq,const TypeFactory &typegrp)
+
+{ // Scan for a specific varnode
+ char tok;
+ int4 discard;
+
+ Address loc(parse_machaddr(s,size,typegrp));
+ s >> ws >> tok;
+ if (tok != '(')
+ throw ParseError("Missing '('");
+ s >> ws;
+ tok = s.peek();
+ pc = Address(); // pc starts out as invalid
+ if (tok == 'i')
+ s >> tok;
+ else if (s.peek() != ':') {
+ s.unsetf(ios::dec | ios::hex | ios::oct); // Let user specify base
+ pc = parse_machaddr(s,discard,typegrp,true);
+ }
+ s >> ws;
+ if (s.peek() == ':') { // Scan uniq
+ s >> tok >> ws >> hex >> uq; // Assume uniq is in hex
+ }
+ else
+ uq = ~((uintm)0);
+ s >> ws >> tok;
+ if (tok != ')')
+ throw ParseError("Missing ')'");
+ return loc;
+}
+
+Address parse_op(istream &s,uintm &uq,const TypeFactory &typegrp)
+
+{
+ int4 size;
+ char tok;
+ Address loc(parse_machaddr(s,size,typegrp,true));
+ s >> ws >> tok;
+ if (tok != ':')
+ throw ParseError("Missing ':'");
+ s >> ws >> hex >> uq; // Assume uniq is in hex
+ return loc;
+}
+
+Address parse_machaddr(istream &s,int4 &defaultsize,const TypeFactory &typegrp,bool ignorecolon)
+
+{ // Read Address from ASCII stream
+ string token;
+ AddrSpace *b;
+ int4 size = -1;
+ int4 oversize;
+ char tok;
+ const AddrSpaceManager *manage = typegrp.getArch();
+
+ s >> ws;
+ tok = s.peek();
+ if (tok == '[') {
+ s >> tok;
+ parse_toseparator(s,token); // scan base address token
+ b = manage->getSpaceByName(token);
+ if (b == (AddrSpace *)0)
+ throw ParseError("Bad address base");
+ s >> ws >> tok;
+ if (tok != ',')
+ throw ParseError("Missing ',' in address");
+ parse_toseparator(s,token); // Get the offset portion of the address
+ s >> ws >> tok;
+ if (tok == ',') { // Optional size specifier
+ s.unsetf(ios::dec | ios::hex | ios::oct);
+ s >> size;
+ s >> ws >> tok;
+ }
+ if (tok != ']')
+ throw ParseError("Missing ']' in address");
+ }
+ else if (tok == '{') {
+ b = manage->getJoinSpace();
+ s >> tok;
+ s >> tok;
+ while(tok != '}') // Scan to the matching curly brace
+ token += tok;
+ }
+ else {
+ if (tok == '0') {
+ b = manage->getDefaultCodeSpace();
+ }
+ else {
+ b = manage->getSpaceByShortcut(tok);
+ s >> tok;
+ }
+ if (b==(AddrSpace *)0) {
+ s >> token;
+ string errmsg = "Bad address: ";
+ errmsg += tok;
+ errmsg += token;
+ throw ParseError(errmsg);
+ }
+ token.erase();
+ s >> ws;
+ tok = s.peek();
+ if (ignorecolon) {
+ while((isalnum(tok))||(tok=='_')||(tok=='+')) {
+ token += tok;
+ s >> tok;
+ tok = s.peek();
+ }
+ }
+ else {
+ while((isalnum(tok))||(tok=='_')||(tok=='+')||(tok==':')) {
+ token += tok;
+ s >> tok;
+ tok = s.peek();
+ }
+ }
+ }
+
+ Address res(b,0);
+ oversize = res.read(token); // Read the address of this particular type
+ // oversize is "standard size"
+ if (oversize == -1)
+ throw ParseError("Bad machine address");
+ defaultsize = (size==-1) ? oversize : size; // If not overriden use standard
+ return res;
+}
+
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.cc
new file mode 100644
index 0000000000..a15a81a2ac
--- /dev/null
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.cc
@@ -0,0 +1,3409 @@
+/* ###
+ * IP: GHIDRA
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* A Bison parser, made by GNU Bison 3.0.4. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "3.0.4"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+/* Substitute the variable and function names. */
+#define yyparse pcodeparseparse
+#define yylex pcodeparselex
+#define yyerror pcodeparseerror
+#define yydebug pcodeparsedebug
+#define yynerrs pcodeparsenerrs
+
+#define yylval pcodeparselval
+#define yychar pcodeparsechar
+
+/* Copy the first part of user declarations. */
+#line 16 "src/decompile/cpp/pcodeparse.y" /* yacc.c:339 */
+
+#include "pcodeparse.hh"
+
+ //#define YYERROR_VERBOSE
+ extern int yylex(void);
+ static PcodeSnippet *pcode;
+ extern int yydebug;
+ extern int yyerror(const char *str );
+
+#line 84 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:339 */
+
+# ifndef YY_NULLPTR
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int pcodeparsedebug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ OP_BOOL_OR = 258,
+ OP_BOOL_AND = 259,
+ OP_BOOL_XOR = 260,
+ OP_EQUAL = 261,
+ OP_NOTEQUAL = 262,
+ OP_FEQUAL = 263,
+ OP_FNOTEQUAL = 264,
+ OP_GREATEQUAL = 265,
+ OP_LESSEQUAL = 266,
+ OP_SLESS = 267,
+ OP_SGREATEQUAL = 268,
+ OP_SLESSEQUAL = 269,
+ OP_SGREAT = 270,
+ OP_FLESS = 271,
+ OP_FGREAT = 272,
+ OP_FLESSEQUAL = 273,
+ OP_FGREATEQUAL = 274,
+ OP_LEFT = 275,
+ OP_RIGHT = 276,
+ OP_SRIGHT = 277,
+ OP_FADD = 278,
+ OP_FSUB = 279,
+ OP_SDIV = 280,
+ OP_SREM = 281,
+ OP_FMULT = 282,
+ OP_FDIV = 283,
+ OP_ZEXT = 284,
+ OP_CARRY = 285,
+ OP_BORROW = 286,
+ OP_SEXT = 287,
+ OP_SCARRY = 288,
+ OP_SBORROW = 289,
+ OP_NAN = 290,
+ OP_ABS = 291,
+ OP_SQRT = 292,
+ OP_CEIL = 293,
+ OP_FLOOR = 294,
+ OP_ROUND = 295,
+ OP_INT2FLOAT = 296,
+ OP_FLOAT2FLOAT = 297,
+ OP_TRUNC = 298,
+ OP_NEW = 299,
+ BADINTEGER = 300,
+ GOTO_KEY = 301,
+ CALL_KEY = 302,
+ RETURN_KEY = 303,
+ IF_KEY = 304,
+ ENDOFSTREAM = 305,
+ LOCAL_KEY = 306,
+ INTEGER = 307,
+ STRING = 308,
+ SPACESYM = 309,
+ USEROPSYM = 310,
+ VARSYM = 311,
+ OPERANDSYM = 312,
+ STARTSYM = 313,
+ ENDSYM = 314,
+ LABELSYM = 315
+ };
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
+union YYSTYPE
+{
+#line 26 "src/decompile/cpp/pcodeparse.y" /* yacc.c:355 */
+
+ uintb *i;
+ string *str;
+ vector<ExprTree *> *param;
+ StarQuality *starqual;
+ VarnodeTpl *varnode;
+ ExprTree *tree;
+ vector<OpTpl *> *stmt;
+ ConstructTpl *sem;
+
+ SpaceSymbol *spacesym;
+ UserOpSymbol *useropsym;
+ LabelSymbol *labelsym;
+ StartSymbol *startsym;
+ EndSymbol *endsym;
+ OperandSymbol *operandsym;
+ VarnodeSymbol *varsym;
+ SpecificSymbol *specsym;
+
+#line 202 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:355 */
+};
+
+typedef union YYSTYPE YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern YYSTYPE pcodeparselval;
+
+int pcodeparseparse (void);
+
+
+
+/* Copy the second part of user declarations. */
+
+#line 219 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:358 */
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 3
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 1919
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 81
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 13
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 118
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 296
+
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 315
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
+static const yytype_uint8 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, 40, 2, 2, 2, 35, 9, 2,
+ 76, 77, 33, 29, 79, 30, 2, 34, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 74, 7,
+ 14, 75, 15, 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, 78, 2, 80, 8, 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, 6, 2, 41, 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, 10, 11, 12, 13, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 31, 32,
+ 36, 37, 38, 39, 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
+};
+
+#if YYDEBUG
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_uint8 yyrline[] =
+{
+ 0, 100, 100, 102, 103, 104, 105, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 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, 191,
+ 192, 193, 194, 196, 197, 198, 199, 200, 201, 202,
+ 204, 205, 206, 208, 209, 210, 211, 212, 214, 215,
+ 217, 218, 220, 221, 222, 223, 225, 226, 227
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || 0
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "OP_BOOL_OR", "OP_BOOL_AND",
+ "OP_BOOL_XOR", "'|'", "';'", "'^'", "'&'", "OP_EQUAL", "OP_NOTEQUAL",
+ "OP_FEQUAL", "OP_FNOTEQUAL", "'<'", "'>'", "OP_GREATEQUAL",
+ "OP_LESSEQUAL", "OP_SLESS", "OP_SGREATEQUAL", "OP_SLESSEQUAL",
+ "OP_SGREAT", "OP_FLESS", "OP_FGREAT", "OP_FLESSEQUAL", "OP_FGREATEQUAL",
+ "OP_LEFT", "OP_RIGHT", "OP_SRIGHT", "'+'", "'-'", "OP_FADD", "OP_FSUB",
+ "'*'", "'/'", "'%'", "OP_SDIV", "OP_SREM", "OP_FMULT", "OP_FDIV", "'!'",
+ "'~'", "OP_ZEXT", "OP_CARRY", "OP_BORROW", "OP_SEXT", "OP_SCARRY",
+ "OP_SBORROW", "OP_NAN", "OP_ABS", "OP_SQRT", "OP_CEIL", "OP_FLOOR",
+ "OP_ROUND", "OP_INT2FLOAT", "OP_FLOAT2FLOAT", "OP_TRUNC", "OP_NEW",
+ "BADINTEGER", "GOTO_KEY", "CALL_KEY", "RETURN_KEY", "IF_KEY",
+ "ENDOFSTREAM", "LOCAL_KEY", "INTEGER", "STRING", "SPACESYM", "USEROPSYM",
+ "VARSYM", "OPERANDSYM", "STARTSYM", "ENDSYM", "LABELSYM", "':'", "'='",
+ "'('", "')'", "'['", "','", "']'", "$accept", "rtl", "rtlmid",
+ "statement", "expr", "sizedstar", "jumpdest", "varnode",
+ "integervarnode", "lhsvarnode", "label", "specificsymbol", "paramlist", YY_NULLPTR
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 124, 59, 94, 38,
+ 261, 262, 263, 264, 60, 62, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 43,
+ 45, 278, 279, 42, 47, 37, 280, 281, 282, 283,
+ 33, 126, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 58, 61, 40, 41, 91, 44,
+ 93
+};
+# endif
+
+#define YYPACT_NINF -67
+
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-67)))
+
+#define YYTABLE_NINF -110
+
+#define yytable_value_is_error(Yytable_value) \
+ (!!((Yytable_value) == (-110)))
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int16 yypact[] =
+{
+ -67, 9, 203, -67, -2, -39, -43, -67, 135, 137,
+ -1, 1490, -67, -18, -66, -46, -50, -67, -67, -67,
+ -67, -67, 1490, 76, -67, 67, -67, 68, -67, -10,
+ -67, -67, 34, 35, 11, -6, -67, -13, -67, -67,
+ -67, 1490, 75, -67, 1490, 79, -67, 1490, 1490, 1490,
+ 1490, 1490, 7, 27, 28, 65, 71, 78, 84, 118,
+ 122, 123, 138, 140, 143, 145, 146, 147, 1490, 1564,
+ 1490, -67, -16, 5, 12, 159, 161, 1490, 1490, 1459,
+ 162, 164, 1490, 165, 187, -67, -67, -67, 151, 167,
+ 153, -67, 275, -67, 312, -67, -67, -67, -67, 1490,
+ 1490, 1490, 1490, 1490, 1490, 1490, 1490, 1490, 1490, 1490,
+ 1490, 1490, 1490, 1490, 1490, 603, 1490, 1490, 1490, 1490,
+ 1490, 1490, 1490, 1490, 1490, 1490, 1490, 1490, 1490, 1490,
+ 1490, 1490, 1490, 1490, 1490, 1490, 1490, 1490, 1490, 1490,
+ 1490, 1490, 1490, 1490, 1490, 1490, 1490, 1490, 1490, 1490,
+ 1490, 1490, 139, -67, 170, 16, 172, -67, 173, 1490,
+ -67, -67, 157, 1621, 1880, -4, 1490, 166, 169, 1658,
+ 160, -67, 174, 171, 237, 240, 242, 640, 422, 710,
+ 494, 531, 747, 817, 854, 924, 961, 1031, 1068, 1138,
+ 1175, 385, 141, -67, 348, 457, 457, 566, 672, 778,
+ 881, 881, 881, 881, 988, 988, 988, 988, 988, 988,
+ 988, 988, 988, 988, 988, 988, -15, -15, -15, 8,
+ 8, 8, 8, -67, -67, -67, -67, -67, -67, -67,
+ 243, -67, 178, 191, 3, 1695, 1490, -67, 269, 1490,
+ 1732, -67, -67, -67, 212, 254, -67, -67, -67, -67,
+ -67, 1490, -67, 1490, 1490, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, 1490, -67, -67, -67, 364,
+ -67, 1490, -67, 1769, -67, 1880, -67, 458, -67, 1245,
+ 1282, 1352, 1389, 491, 1806, -67, 497, -67, -67, -67,
+ -67, -67, -67, 1490, 1843, -67
+};
+
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 3, 0, 0, 1, 0, 0, 92, 104, 0, 0,
+ 0, 0, 2, 0, 103, 102, 0, 112, 113, 114,
+ 115, 4, 0, 0, 101, 0, 25, 100, 102, 0,
+ 106, 100, 0, 0, 0, 0, 96, 95, 99, 93,
+ 94, 0, 0, 98, 0, 0, 23, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 26, 100, 0, 0, 0, 0, 0, 116, 0,
+ 0, 0, 0, 0, 0, 111, 110, 91, 0, 0,
+ 0, 18, 0, 21, 0, 41, 68, 54, 42, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 116, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 27, 0, 0, 0, 5, 0, 0,
+ 12, 105, 0, 0, 117, 0, 0, 0, 0, 0,
+ 0, 107, 90, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 28, 57, 56, 55, 45, 43, 44,
+ 31, 32, 58, 59, 33, 36, 34, 35, 37, 38,
+ 39, 40, 60, 61, 62, 63, 46, 47, 48, 29,
+ 30, 64, 65, 49, 50, 52, 51, 53, 66, 67,
+ 0, 86, 0, 0, 0, 0, 0, 9, 0, 0,
+ 0, 16, 17, 7, 0, 0, 97, 20, 22, 24,
+ 72, 0, 71, 0, 0, 78, 69, 70, 80, 81,
+ 82, 77, 76, 79, 83, 0, 88, 19, 85, 0,
+ 6, 0, 8, 0, 14, 118, 13, 0, 89, 0,
+ 0, 0, 0, 0, 0, 11, 0, 73, 74, 75,
+ 84, 87, 10, 0, 0, 15
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -67, -67, -67, -67, -11, 645, -8, 1, 557, -67,
+ 752, 0, 704
+};
+
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 1, 2, 21, 164, 70, 42, 71, 24, 25,
+ 43, 72, 165
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_int16 yytable[] =
+{
+ 69, 45, 27, 23, 31, 30, 46, 4, 75, 3,
+ 270, 79, 157, 74, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 4, 78, 32, 76, 77,
+ 90, 34, -109, 92, 33, 35, 94, 95, 96, 97,
+ 98, 145, 146, 147, 148, 149, 150, 151, 73, 85,
+ 86, 17, 18, 19, 20, 84, 7, 115, 154, 153,
+ 155, 88, 156, 14, 28, 89, 163, 17, 18, 19,
+ 20, 169, 29, 238, 7, 239, 87, 47, 271, 158,
+ 159, 14, 91, 99, 31, 171, 93, 160, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 100, 101, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 102, 82, -108, 230, 83, -108, 103, 235, 5,
+ 80, 5, 81, 5, 104, 240, 116, 117, 118, 119,
+ 105, 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, 36, 106, 36, 4, 36, 107, 108,
+ 37, 38, 37, 38, 37, 38, 39, 40, 39, 40,
+ 39, 40, 4, 41, 109, 44, 110, 5, 266, 111,
+ 239, 112, 113, 114, 161, 273, 162, 167, 275, 168,
+ 170, 172, 236, 174, 173, 231, 6, 233, 234, 244,
+ 279, 241, 280, 281, 247, 7, 242, 248, 245, 249,
+ 267, 246, 14, 28, 282, 268, 17, 18, 19, 20,
+ 284, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 269, 16, 17, 18, 19, 20, 274, 277, 116, 117,
+ 118, 119, 294, 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, 116, 117, 118, 119, 278,
+ 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, 117, 118, 119, 175, 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, 116, 117,
+ 118, 119, 176, 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, 116, 117, 118, 119, 283,
+ 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, 264, 119, 265, 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, 116, 117, 118,
+ 119, 251, 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, 116, 117, 118, 119, 286, 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, 291, 293, 253, 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, 116, 117, 118, 119,
+ 254, 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, 116, 117, 118, 119, 22, 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,
+ 193, 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, 232, 116, 117, 118, 119, 250, 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,
+ 116, 117, 118, 119, 26, 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, 252, 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, 192, 0,
+ 116, 117, 118, 119, 255, 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, 116, 117, 118,
+ 119, 0, 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, 256, 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, 0, 0, 0, 0, 0, 0, 116, 117, 118,
+ 119, 257, 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, 116, 117, 118, 119, 0, 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, 258, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151, 0, 0,
+ 0, 0, 0, 0, 116, 117, 118, 119, 259, 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, 116, 117, 118, 119, 0, 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, 260, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 116, 117, 118, 119, 261, 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, 116, 117,
+ 118, 119, 0, 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, 262, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 116, 117,
+ 118, 119, 263, 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, 116, 117, 118, 119, 0,
+ 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, 287, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 116, 117, 118, 119, 288,
+ 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, 116, 117, 118, 119, 0, 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, 289,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 116, 117, 118, 119, 290, 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, 4,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 48, 0, 49, 6, 0, 0, 0, 0, 0, 0,
+ 50, 51, 52, 53, 166, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 7, 0,
+ 0, 0, 0, 0, 0, 14, 28, 0, 67, 17,
+ 18, 19, 20, 0, 0, 0, 68, 116, 117, 118,
+ 119, 0, 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, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 152, 116, 117, 118, 119, 237, 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, 116, 117, 118, 119, 243, 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, 116, 117,
+ 118, 119, 272, 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, 116, 117, 118, 119, 276,
+ 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, 116, 117, 118, 119, 285, 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, 116,
+ 117, 118, 119, 292, 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, 116, 117, 118, 119,
+ 295, 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, 116, 117, 118, 119, 0, 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
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 11, 9, 2, 2, 4, 4, 7, 9, 74, 0,
+ 7, 22, 7, 13, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 9, 76, 66, 74, 75,
+ 41, 74, 78, 44, 73, 78, 47, 48, 49, 50,
+ 51, 33, 34, 35, 36, 37, 38, 39, 66, 15,
+ 15, 69, 70, 71, 72, 65, 58, 68, 74, 70,
+ 76, 67, 78, 65, 66, 78, 77, 69, 70, 71,
+ 72, 82, 74, 77, 58, 79, 65, 78, 75, 74,
+ 75, 65, 7, 76, 84, 84, 7, 75, 99, 100,
+ 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 112, 113, 76, 76, 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, 76, 75, 75, 152, 78, 78, 76, 159, 14,
+ 74, 14, 76, 14, 76, 166, 3, 4, 5, 6,
+ 76, 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, 58, 76, 58, 9, 58, 76, 76,
+ 65, 66, 65, 66, 65, 66, 71, 72, 71, 72,
+ 71, 72, 9, 78, 76, 78, 76, 14, 77, 76,
+ 79, 76, 76, 76, 65, 236, 65, 65, 239, 65,
+ 65, 80, 75, 80, 67, 65, 33, 65, 65, 79,
+ 251, 75, 253, 254, 7, 58, 77, 7, 74, 7,
+ 7, 80, 65, 66, 265, 77, 69, 70, 71, 72,
+ 271, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 79, 68, 69, 70, 71, 72, 7, 65, 3, 4,
+ 5, 6, 293, 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, 3, 4, 5, 6, 65,
+ 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, 4, 5, 6, 80, 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, 3, 4,
+ 5, 6, 80, 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, 3, 4, 5, 6, 65,
+ 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, 77, 6, 79, 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, 3, 4, 5,
+ 6, 79, 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, 3, 4, 5, 6, 80, 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, 80, 75, 79, 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, 3, 4, 5, 6,
+ 79, 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, 3, 4, 5, 6, 2, 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,
+ 77, 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, 155, 3, 4, 5, 6, 77, 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,
+ 3, 4, 5, 6, 2, 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, 77, 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, 114, -1,
+ 3, 4, 5, 6, 77, 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, 3, 4, 5,
+ 6, -1, 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, 77, 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, -1, -1, -1, -1, -1, -1, 3, 4, 5,
+ 6, 77, 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, 3, 4, 5, 6, -1, 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, 77, 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, -1, -1,
+ -1, -1, -1, -1, 3, 4, 5, 6, 77, 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, 3, 4, 5, 6, -1, 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, 77, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3, 4, 5, 6, 77, 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, 3, 4,
+ 5, 6, -1, 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, 77, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
+ 5, 6, 77, 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, 3, 4, 5, 6, -1,
+ 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, 77, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3, 4, 5, 6, 77,
+ 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, 3, 4, 5, 6, -1, 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, 77,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3, 4, 5, 6, 77, 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, 9,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 30, -1, 32, 33, -1, -1, -1, -1, -1, -1,
+ 40, 41, 42, 43, 75, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, -1,
+ -1, -1, -1, -1, -1, 65, 66, -1, 68, 69,
+ 70, 71, 72, -1, -1, -1, 76, 3, 4, 5,
+ 6, -1, 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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 59, 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, 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, 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, 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, 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, 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, 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, 3, 4, 5, 6, -1, 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
+};
+
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 82, 83, 0, 9, 14, 33, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 68, 69, 70, 71,
+ 72, 84, 86, 88, 89, 90, 91, 92, 66, 74,
+ 88, 92, 66, 73, 74, 78, 58, 65, 66, 71,
+ 72, 78, 87, 91, 78, 87, 7, 78, 30, 32,
+ 40, 41, 42, 43, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 68, 76, 85,
+ 86, 88, 92, 66, 92, 74, 74, 75, 76, 85,
+ 74, 76, 75, 78, 65, 15, 15, 65, 67, 78,
+ 85, 7, 85, 7, 85, 85, 85, 85, 85, 76,
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 85, 3, 4, 5, 6,
+ 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, 59, 85, 74, 76, 78, 7, 74, 75,
+ 75, 65, 65, 85, 85, 93, 75, 65, 65, 85,
+ 65, 88, 80, 67, 80, 80, 80, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 93, 77, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 87, 65, 89, 65, 65, 85, 75, 7, 77, 79,
+ 85, 75, 77, 7, 79, 74, 80, 7, 7, 7,
+ 77, 79, 77, 79, 79, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 79, 77, 7, 77, 79,
+ 7, 75, 7, 85, 7, 85, 7, 65, 65, 85,
+ 85, 85, 85, 65, 85, 7, 80, 77, 77, 77,
+ 77, 80, 7, 75, 85, 7
+};
+
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 81, 82, 83, 83, 83, 83, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 86,
+ 86, 86, 86, 87, 87, 87, 87, 87, 87, 87,
+ 88, 88, 88, 89, 89, 89, 89, 89, 90, 90,
+ 91, 91, 92, 92, 92, 92, 93, 93, 93
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 2, 0, 2, 4, 6, 4, 5, 4,
+ 7, 6, 3, 5, 5, 9, 4, 4, 3, 5,
+ 5, 3, 5, 2, 5, 1, 1, 2, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 2, 2, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 2, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 2, 4,
+ 4, 4, 4, 6, 6, 6, 4, 4, 4, 4,
+ 4, 4, 4, 4, 6, 4, 3, 6, 4, 6,
+ 4, 3, 1, 1, 1, 1, 1, 4, 1, 1,
+ 1, 1, 1, 1, 1, 3, 2, 4, 1, 1,
+ 3, 3, 1, 1, 1, 1, 0, 1, 3
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (0)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+{
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ YYUSE (yytype);
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+{
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
+{
+ unsigned long int yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+{
+ YYUSE (yyvaluep);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ switch (yytype)
+ {
+ case 65: /* INTEGER */
+#line 90 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1257 */
+ { delete ((*yyvaluep).i); }
+#line 1563 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1257 */
+ break;
+
+ case 66: /* STRING */
+#line 91 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1257 */
+ { delete ((*yyvaluep).str); }
+#line 1569 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1257 */
+ break;
+
+ case 83: /* rtlmid */
+#line 93 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1257 */
+ { delete ((*yyvaluep).sem); }
+#line 1575 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1257 */
+ break;
+
+ case 84: /* statement */
+#line 94 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1257 */
+ { if (((*yyvaluep).stmt) != (vector<OpTpl *> *)0) { for(int4 i=0;i<((*yyvaluep).stmt)->size();++i) delete (*((*yyvaluep).stmt))[i]; delete ((*yyvaluep).stmt);} }
+#line 1581 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1257 */
+ break;
+
+ case 85: /* expr */
+#line 95 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1257 */
+ { delete ((*yyvaluep).tree); }
+#line 1587 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1257 */
+ break;
+
+ case 86: /* sizedstar */
+#line 97 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1257 */
+ { delete ((*yyvaluep).starqual); }
+#line 1593 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1257 */
+ break;
+
+ case 87: /* jumpdest */
+#line 96 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1257 */
+ { if (((*yyvaluep).varnode) != (VarnodeTpl *)0) delete ((*yyvaluep).varnode); }
+#line 1599 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1257 */
+ break;
+
+ case 88: /* varnode */
+#line 96 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1257 */
+ { if (((*yyvaluep).varnode) != (VarnodeTpl *)0) delete ((*yyvaluep).varnode); }
+#line 1605 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1257 */
+ break;
+
+ case 89: /* integervarnode */
+#line 96 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1257 */
+ { if (((*yyvaluep).varnode) != (VarnodeTpl *)0) delete ((*yyvaluep).varnode); }
+#line 1611 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1257 */
+ break;
+
+ case 90: /* lhsvarnode */
+#line 96 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1257 */
+ { if (((*yyvaluep).varnode) != (VarnodeTpl *)0) delete ((*yyvaluep).varnode); }
+#line 1617 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1257 */
+ break;
+
+ case 93: /* paramlist */
+#line 92 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1257 */
+ { for(int4 i=0;i<((*yyvaluep).param)->size();++i) delete (*((*yyvaluep).param))[i]; delete ((*yyvaluep).param); }
+#line 1623 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1257 */
+ break;
+
+
+ default:
+ break;
+ }
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (void)
+{
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* 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;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex ();
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+#line 100 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { pcode->setResult((yyvsp[-1].sem)); }
+#line 1887 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 3:
+#line 102 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.sem) = new ConstructTpl(); }
+#line 1893 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 4:
+#line 103 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.sem) = (yyvsp[-1].sem); if (!(yyval.sem)->addOpList(*(yyvsp[0].stmt))) { delete (yyvsp[0].stmt); yyerror("Multiple delayslot declarations"); YYERROR; } delete (yyvsp[0].stmt); }
+#line 1899 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 5:
+#line 104 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.sem) = (yyvsp[-3].sem); pcode->newLocalDefinition((yyvsp[-1].str)); }
+#line 1905 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 6:
+#line 105 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.sem) = (yyvsp[-5].sem); pcode->newLocalDefinition((yyvsp[-3].str),*(yyvsp[-1].i)); delete (yyvsp[-1].i); }
+#line 1911 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 7:
+#line 107 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyvsp[-1].tree)->setOutput((yyvsp[-3].varnode)); (yyval.stmt) = ExprTree::toVector((yyvsp[-1].tree)); }
+#line 1917 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 8:
+#line 108 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->newOutput(true,(yyvsp[-1].tree),(yyvsp[-3].str)); }
+#line 1923 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 9:
+#line 109 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->newOutput(false,(yyvsp[-1].tree),(yyvsp[-3].str)); }
+#line 1929 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 10:
+#line 110 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->newOutput(true,(yyvsp[-1].tree),(yyvsp[-5].str),*(yyvsp[-3].i)); delete (yyvsp[-3].i); }
+#line 1935 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 11:
+#line 111 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->newOutput(true,(yyvsp[-1].tree),(yyvsp[-5].str),*(yyvsp[-3].i)); delete (yyvsp[-3].i); }
+#line 1941 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 12:
+#line 112 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = (vector<OpTpl *> *)0; string errmsg = "Redefinition of symbol: "+(yyvsp[-1].specsym)->getName(); yyerror(errmsg.c_str()); YYERROR; }
+#line 1947 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 13:
+#line 113 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->createStore((yyvsp[-4].starqual),(yyvsp[-3].tree),(yyvsp[-1].tree)); }
+#line 1953 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 14:
+#line 114 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->createUserOpNoOut((yyvsp[-4].useropsym),(yyvsp[-2].param)); }
+#line 1959 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 15:
+#line 115 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->assignBitRange((yyvsp[-8].varnode),(uint4)*(yyvsp[-6].i),(uint4)*(yyvsp[-4].i),(yyvsp[-1].tree)); delete (yyvsp[-6].i), delete (yyvsp[-4].i); }
+#line 1965 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 16:
+#line 116 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = (vector<OpTpl *> *)0; delete (yyvsp[-3].varnode); delete (yyvsp[-1].i); yyerror("Illegal truncation on left-hand side of assignment"); YYERROR; }
+#line 1971 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 17:
+#line 117 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = (vector<OpTpl *> *)0; delete (yyvsp[-3].varnode); delete (yyvsp[-1].i); yyerror("Illegal subpiece on left-hand side of assignment"); YYERROR; }
+#line 1977 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 18:
+#line 118 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->createOpNoOut(CPUI_BRANCH,new ExprTree((yyvsp[-1].varnode))); }
+#line 1983 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 19:
+#line 119 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->createOpNoOut(CPUI_CBRANCH,new ExprTree((yyvsp[-1].varnode)),(yyvsp[-3].tree)); }
+#line 1989 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 20:
+#line 120 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->createOpNoOut(CPUI_BRANCHIND,(yyvsp[-2].tree)); }
+#line 1995 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 21:
+#line 121 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->createOpNoOut(CPUI_CALL,new ExprTree((yyvsp[-1].varnode))); }
+#line 2001 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 22:
+#line 122 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->createOpNoOut(CPUI_CALLIND,(yyvsp[-2].tree)); }
+#line 2007 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 23:
+#line 123 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = (vector<OpTpl *> *)0; yyerror("Must specify an indirect parameter for return"); YYERROR; }
+#line 2013 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 24:
+#line 124 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->createOpNoOut(CPUI_RETURN,(yyvsp[-2].tree)); }
+#line 2019 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 25:
+#line 125 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = pcode->placeLabel( (yyvsp[0].labelsym) ); }
+#line 2025 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 26:
+#line 127 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = new ExprTree((yyvsp[0].varnode)); }
+#line 2031 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 27:
+#line 128 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createLoad((yyvsp[-1].starqual),(yyvsp[0].tree)); }
+#line 2037 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 28:
+#line 129 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = (yyvsp[-1].tree); }
+#line 2043 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 29:
+#line 130 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_ADD,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2049 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 30:
+#line 131 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_SUB,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2055 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 31:
+#line 132 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_EQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2061 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 32:
+#line 133 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_NOTEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2067 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 33:
+#line 134 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_LESS,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2073 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 34:
+#line 135 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_LESSEQUAL,(yyvsp[0].tree),(yyvsp[-2].tree)); }
+#line 2079 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 35:
+#line 136 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_LESSEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2085 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 36:
+#line 137 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_LESS,(yyvsp[0].tree),(yyvsp[-2].tree)); }
+#line 2091 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 37:
+#line 138 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_SLESS,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2097 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 38:
+#line 139 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_SLESSEQUAL,(yyvsp[0].tree),(yyvsp[-2].tree)); }
+#line 2103 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 39:
+#line 140 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_SLESSEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2109 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 40:
+#line 141 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_SLESS,(yyvsp[0].tree),(yyvsp[-2].tree)); }
+#line 2115 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 41:
+#line 142 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_2COMP,(yyvsp[0].tree)); }
+#line 2121 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 42:
+#line 143 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_NEGATE,(yyvsp[0].tree)); }
+#line 2127 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 43:
+#line 144 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_XOR,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2133 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 44:
+#line 145 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_AND,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2139 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 45:
+#line 146 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_OR,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2145 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 46:
+#line 147 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_LEFT,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2151 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 47:
+#line 148 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_RIGHT,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2157 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 48:
+#line 149 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_SRIGHT,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2163 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 49:
+#line 150 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_MULT,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2169 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 50:
+#line 151 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_DIV,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2175 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 51:
+#line 152 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_SDIV,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2181 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 52:
+#line 153 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_REM,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2187 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 53:
+#line 154 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_SREM,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2193 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 54:
+#line 155 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_BOOL_NEGATE,(yyvsp[0].tree)); }
+#line 2199 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 55:
+#line 156 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_BOOL_XOR,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2205 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 56:
+#line 157 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_BOOL_AND,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2211 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 57:
+#line 158 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_BOOL_OR,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2217 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 58:
+#line 159 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_EQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2223 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 59:
+#line 160 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_NOTEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2229 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 60:
+#line 161 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_LESS,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2235 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 61:
+#line 162 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_LESS,(yyvsp[0].tree),(yyvsp[-2].tree)); }
+#line 2241 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 62:
+#line 163 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_LESSEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2247 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 63:
+#line 164 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_LESSEQUAL,(yyvsp[0].tree),(yyvsp[-2].tree)); }
+#line 2253 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 64:
+#line 165 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_ADD,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2259 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 65:
+#line 166 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_SUB,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2265 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 66:
+#line 167 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_MULT,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2271 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 67:
+#line 168 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_DIV,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 2277 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 68:
+#line 169 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_NEG,(yyvsp[0].tree)); }
+#line 2283 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 69:
+#line 170 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_ABS,(yyvsp[-1].tree)); }
+#line 2289 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 70:
+#line 171 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_SQRT,(yyvsp[-1].tree)); }
+#line 2295 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 71:
+#line 172 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_SEXT,(yyvsp[-1].tree)); }
+#line 2301 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 72:
+#line 173 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_ZEXT,(yyvsp[-1].tree)); }
+#line 2307 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 73:
+#line 174 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_CARRY,(yyvsp[-3].tree),(yyvsp[-1].tree)); }
+#line 2313 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 74:
+#line 175 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_SCARRY,(yyvsp[-3].tree),(yyvsp[-1].tree)); }
+#line 2319 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 75:
+#line 176 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_INT_SBORROW,(yyvsp[-3].tree),(yyvsp[-1].tree)); }
+#line 2325 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 76:
+#line 177 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_FLOAT2FLOAT,(yyvsp[-1].tree)); }
+#line 2331 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 77:
+#line 178 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_INT2FLOAT,(yyvsp[-1].tree)); }
+#line 2337 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 78:
+#line 179 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_NAN,(yyvsp[-1].tree)); }
+#line 2343 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 79:
+#line 180 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_TRUNC,(yyvsp[-1].tree)); }
+#line 2349 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 80:
+#line 181 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_CEIL,(yyvsp[-1].tree)); }
+#line 2355 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 81:
+#line 182 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_FLOOR,(yyvsp[-1].tree)); }
+#line 2361 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 82:
+#line 183 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_FLOAT_ROUND,(yyvsp[-1].tree)); }
+#line 2367 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 83:
+#line 184 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_NEW,(yyvsp[-1].tree)); }
+#line 2373 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 84:
+#line 185 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_NEW,(yyvsp[-3].tree),(yyvsp[-1].tree)); }
+#line 2379 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 85:
+#line 186 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createOp(CPUI_SUBPIECE,new ExprTree((yyvsp[-3].specsym)->getVarnode()),new ExprTree((yyvsp[-1].varnode))); }
+#line 2385 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 86:
+#line 187 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createBitRange((yyvsp[-2].specsym),0,(uint4)(*(yyvsp[0].i) * 8)); delete (yyvsp[0].i); }
+#line 2391 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 87:
+#line 188 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createBitRange((yyvsp[-5].specsym),(uint4)*(yyvsp[-3].i),(uint4)*(yyvsp[-1].i)); delete (yyvsp[-3].i), delete (yyvsp[-1].i); }
+#line 2397 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 88:
+#line 189 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = pcode->createUserOp((yyvsp[-3].useropsym),(yyvsp[-1].param)); }
+#line 2403 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 89:
+#line 191 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = *(yyvsp[0].i); delete (yyvsp[0].i); (yyval.starqual)->id=ConstTpl((yyvsp[-3].spacesym)->getSpace()); }
+#line 2409 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 90:
+#line 192 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = 0; (yyval.starqual)->id=ConstTpl((yyvsp[-1].spacesym)->getSpace()); }
+#line 2415 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 91:
+#line 193 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = *(yyvsp[0].i); delete (yyvsp[0].i); (yyval.starqual)->id=ConstTpl(pcode->getDefaultSpace()); }
+#line 2421 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 92:
+#line 194 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = 0; (yyval.starqual)->id=ConstTpl(pcode->getDefaultSpace()); }
+#line 2427 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 93:
+#line 196 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { VarnodeTpl *sym = (yyvsp[0].startsym)->getVarnode(); (yyval.varnode) = new VarnodeTpl(ConstTpl(ConstTpl::j_curspace),sym->getOffset(),ConstTpl(ConstTpl::j_curspace_size)); delete sym; }
+#line 2433 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 94:
+#line 197 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { VarnodeTpl *sym = (yyvsp[0].endsym)->getVarnode(); (yyval.varnode) = new VarnodeTpl(ConstTpl(ConstTpl::j_curspace),sym->getOffset(),ConstTpl(ConstTpl::j_curspace_size)); delete sym; }
+#line 2439 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 95:
+#line 198 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(ConstTpl::j_curspace),ConstTpl(ConstTpl::real,*(yyvsp[0].i)),ConstTpl(ConstTpl::j_curspace_size)); delete (yyvsp[0].i); }
+#line 2445 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 96:
+#line 199 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(ConstTpl::j_curspace),ConstTpl(ConstTpl::real,0),ConstTpl(ConstTpl::j_curspace_size)); yyerror("Parsed integer is too big (overflow)"); }
+#line 2451 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 97:
+#line 200 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { AddrSpace *spc = (yyvsp[-1].spacesym)->getSpace(); (yyval.varnode) = new VarnodeTpl(ConstTpl(spc),ConstTpl(ConstTpl::real,*(yyvsp[-3].i)),ConstTpl(ConstTpl::real,spc->getAddrSize())); delete (yyvsp[-3].i); }
+#line 2457 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 98:
+#line 201 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(pcode->getConstantSpace()),ConstTpl(ConstTpl::j_relative,(yyvsp[0].labelsym)->getIndex()),ConstTpl(ConstTpl::real,sizeof(uintm))); (yyvsp[0].labelsym)->incrementRefCount(); }
+#line 2463 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 99:
+#line 202 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = (VarnodeTpl *)0; string errmsg = "Unknown jump destination: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+#line 2469 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 100:
+#line 204 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); }
+#line 2475 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 101:
+#line 205 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = (yyvsp[0].varnode); }
+#line 2481 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 102:
+#line 206 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = (VarnodeTpl *)0; string errmsg = "Unknown varnode parameter: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+#line 2487 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 103:
+#line 208 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(pcode->getConstantSpace()),ConstTpl(ConstTpl::real,*(yyvsp[0].i)),ConstTpl(ConstTpl::real,0)); delete (yyvsp[0].i); }
+#line 2493 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 104:
+#line 209 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(pcode->getConstantSpace()),ConstTpl(ConstTpl::real,0),ConstTpl(ConstTpl::real,0)); yyerror("Parsed integer is too big (overflow)"); }
+#line 2499 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 105:
+#line 210 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(pcode->getConstantSpace()),ConstTpl(ConstTpl::real,*(yyvsp[-2].i)),ConstTpl(ConstTpl::real,*(yyvsp[0].i))); delete (yyvsp[-2].i); delete (yyvsp[0].i); }
+#line 2505 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 106:
+#line 211 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = pcode->addressOf((yyvsp[0].varnode),0); }
+#line 2511 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 107:
+#line 212 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = pcode->addressOf((yyvsp[0].varnode),*(yyvsp[-1].i)); delete (yyvsp[-1].i); }
+#line 2517 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 108:
+#line 214 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); }
+#line 2523 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 109:
+#line 215 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = (VarnodeTpl *)0; string errmsg = "Unknown assignment varnode: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+#line 2529 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 110:
+#line 217 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.labelsym) = (yyvsp[-1].labelsym); }
+#line 2535 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 111:
+#line 218 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.labelsym) = pcode->defineLabel( (yyvsp[-1].str) ); }
+#line 2541 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 112:
+#line 220 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.specsym) = (yyvsp[0].varsym); }
+#line 2547 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 113:
+#line 221 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.specsym) = (yyvsp[0].operandsym); }
+#line 2553 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 114:
+#line 222 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.specsym) = (yyvsp[0].startsym); }
+#line 2559 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 115:
+#line 223 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.specsym) = (yyvsp[0].endsym); }
+#line 2565 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 116:
+#line 225 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.param) = new vector<ExprTree *>; }
+#line 2571 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 117:
+#line 226 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.param) = new vector<ExprTree *>; (yyval.param)->push_back((yyvsp[0].tree)); }
+#line 2577 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 118:
+#line 227 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1646 */
+ { (yyval.param) = (yyvsp[-2].param); (yyval.param)->push_back((yyvsp[0].tree)); }
+#line 2583 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ break;
+
+
+#line 2587 "src/decompile/cpp/pcodeparse.cc" /* yacc.c:1646 */
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+ /* 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 - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ return yyresult;
+}
+#line 229 "src/decompile/cpp/pcodeparse.y" /* yacc.c:1906 */
+
+
+#define IDENTREC_SIZE 46
+const IdentRec PcodeLexer::idents[]= { // Sorted list of identifiers
+ { "!=", OP_NOTEQUAL },
+ { "&&", OP_BOOL_AND },
+ { "<<", OP_LEFT },
+ { "<=", OP_LESSEQUAL },
+ { "==", OP_EQUAL },
+ { ">=", OP_GREATEQUAL },
+ { ">>", OP_RIGHT },
+ { "^^", OP_BOOL_XOR },
+ { "||", OP_BOOL_OR },
+ { "abs", OP_ABS },
+ { "borrow", OP_BORROW },
+ { "call", CALL_KEY },
+ { "carry", OP_CARRY },
+ { "ceil", OP_CEIL },
+ { "f!=", OP_FNOTEQUAL },
+ { "f*", OP_FMULT },
+ { "f+", OP_FADD },
+ { "f-", OP_FSUB },
+ { "f/", OP_FDIV },
+ { "f<", OP_FLESS },
+ { "f<=", OP_FLESSEQUAL },
+ { "f==", OP_FEQUAL },
+ { "f>", OP_FGREAT },
+ { "f>=", OP_FGREATEQUAL },
+ { "float2float", OP_FLOAT2FLOAT },
+ { "floor", OP_FLOOR },
+ { "goto", GOTO_KEY },
+ { "if", IF_KEY },
+ { "int2float", OP_INT2FLOAT },
+ { "local", LOCAL_KEY },
+ { "nan", OP_NAN },
+ { "return", RETURN_KEY },
+ { "round", OP_ROUND },
+ { "s%", OP_SREM },
+ { "s/", OP_SDIV },
+ { "s<", OP_SLESS },
+ { "s<=", OP_SLESSEQUAL },
+ { "s>", OP_SGREAT },
+ { "s>=", OP_SGREATEQUAL },
+ { "s>>",OP_SRIGHT },
+ { "sborrow", OP_SBORROW },
+ { "scarry", OP_SCARRY },
+ { "sext", OP_SEXT },
+ { "sqrt", OP_SQRT },
+ { "trunc", OP_TRUNC },
+ { "zext", OP_ZEXT }
+};
+
+int4 PcodeLexer::findIdentifier(const string &str) const
+
+{
+ int4 low = 0;
+ int4 high = IDENTREC_SIZE-1;
+ int4 comp;
+ do {
+ int4 targ = (low+high)/2;
+ comp = str.compare(idents[targ].nm);
+ if (comp < 0) // str comes before targ
+ high = targ-1;
+ else if (comp > 0) // str comes after targ
+ low = targ + 1;
+ else
+ return targ;
+ } while(low <= high);
+ return -1;
+}
+
+int4 PcodeLexer::moveState(void)
+
+{
+ switch(curstate) {
+ case start:
+ switch(curchar) {
+ case '|':
+ if (lookahead1 == '|') {
+ starttoken();
+ curstate = special2;
+ return start;
+ }
+ return punctuation;
+ case '&':
+ if (lookahead1 == '&') {
+ starttoken();
+ curstate = special2;
+ return start;
+ }
+ return punctuation;
+ case '^':
+ if (lookahead1 == '^') {
+ starttoken();
+ curstate = special2;
+ return start;
+ }
+ return punctuation;
+ case '>':
+ if ((lookahead1 == '>')||(lookahead1=='=')) {
+ starttoken();
+ curstate = special2;
+ return start;
+ }
+ return punctuation;
+ case '<':
+ if ((lookahead1 == '<')||(lookahead1=='=')) {
+ starttoken();
+ curstate = special2;
+ return start;
+ }
+ return punctuation;
+ case '=':
+ if (lookahead1 == '=') {
+ starttoken();
+ curstate = special2;
+ return start;
+ }
+ return punctuation;
+ case '!':
+ if (lookahead1 == '=') {
+ starttoken();
+ curstate = special2;
+ return start;
+ }
+ return punctuation;
+ case '(':
+ case ')':
+ case ',':
+ case ':':
+ case '[':
+ case ']':
+ case ';':
+ case '+':
+ case '-':
+ case '*':
+ case '/':
+ case '%':
+ case '~':
+ return punctuation;
+ case 's':
+ case 'f':
+ if (curchar == 's') {
+ if ((lookahead1 == '/')||(lookahead1=='%')) {
+ starttoken();
+ curstate = special2;
+ return start;
+ }
+ else if (lookahead1 == '<') {
+ starttoken();
+ if (lookahead2 == '=')
+ curstate = special3;
+ else
+ curstate = special2;
+ return start;
+ }
+ else if (lookahead1 == '>') {
+ starttoken();
+ if ((lookahead2=='>')||(lookahead2=='='))
+ curstate = special3;
+ else
+ curstate = special2;
+ return start;
+ }
+ }
+ else { // curchar == 'f'
+ if ((lookahead1=='+')||(lookahead1=='-')||(lookahead1=='*')||(lookahead1=='/')) {
+ starttoken();
+ curstate = special2;
+ return start;
+ }
+ else if (((lookahead1=='=')||(lookahead1=='!'))&&(lookahead2=='=')) {
+ starttoken();
+ curstate = special3;
+ return start;
+ }
+ else if ((lookahead1=='<')||(lookahead1=='>')) {
+ starttoken();
+ if (lookahead2 == '=')
+ curstate = special3;
+ else
+ curstate = special2;
+ return start;
+ }
+ }
+ // fall through here, treat 's' and 'f' as ordinary characters
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case '.':
+ starttoken();
+ if (isIdent(lookahead1)) {
+ curstate = identifier;
+ return start;
+ }
+ curstate = start;
+ return identifier;
+ case '0':
+ starttoken();
+ if (lookahead1 == 'x') {
+ curstate = hexstring;
+ return start;
+ }
+ if (isDec(lookahead1)) {
+ curstate = decstring;
+ return start;
+ }
+ curstate = start;
+ return decstring;
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ starttoken();
+ if (isDec(lookahead1)) {
+ curstate = decstring;
+ return start;
+ }
+ curstate = start;
+ return decstring;
+ case '\n':
+ case ' ':
+ case '\t':
+ case '\v':
+ case '\r':
+ return start; // Ignore whitespace
+ case '\0':
+ curstate = endstream;
+ return endstream;
+ default:
+ curstate = illegal;
+ return illegal;
+ }
+ break;
+ case special2:
+ advancetoken();
+ curstate = start;
+ return identifier;
+ break;
+ case special3:
+ advancetoken();
+ curstate = special32;
+ return start;
+ break;
+ case special32:
+ advancetoken();
+ curstate = start;
+ return identifier;
+ break;
+ case comment:
+ if (curchar == '\n')
+ curstate = start;
+ else if (curchar == '\0') {
+ curstate = endstream;
+ return endstream;
+ }
+ break;
+ case identifier:
+ advancetoken();
+ if (isIdent(lookahead1))
+ return start;
+ curstate = start;
+ return identifier;
+ break;
+ case hexstring:
+ advancetoken();
+ if (isHex(lookahead1))
+ return start;
+ curstate = start;
+ return hexstring;
+ break;
+ case decstring:
+ advancetoken();
+ if (isDec(lookahead1))
+ return start;
+ curstate = start;
+ return decstring;
+ break;
+ default:
+ curstate = endstream;
+ }
+ return endstream;
+}
+
+int4 PcodeLexer::getNextToken(void)
+
+{ // Will return either: identifier, punctuation, hexstring, decstring, endstream, or illegal
+ // If identifier, hexstring, or decstring, curtoken will be filled with the characters
+ int4 tok;
+ do {
+ curchar = lookahead1;
+ lookahead1 = lookahead2;
+ if (endofstream)
+ lookahead2 = '\0';
+ else {
+ s->get(lookahead2);
+ if (!(*s)) {
+ endofstream = true;
+ lookahead2 = '\0';
+ }
+ }
+ tok = moveState();
+ } while(tok == start);
+ if (tok == identifier) {
+ curtoken[tokpos] = '\0'; // Append null terminator
+ curidentifier = curtoken;
+ int4 num = findIdentifier(curidentifier);
+ if (num < 0) // Not a keyword
+ return STRING;
+ return idents[num].id;
+ }
+ else if ((tok == hexstring)||(tok == decstring)) {
+ curtoken[tokpos] = '\0';
+ istringstream s1(curtoken);
+ s1.unsetf(ios::dec | ios::hex | ios::oct);
+ s1 >> curnum;
+ if (!s1)
+ return BADINTEGER;
+ return INTEGER;
+ }
+ else if (tok == endstream) {
+ if (!endofstreamsent) {
+ endofstreamsent = true;
+ return ENDOFSTREAM; // Send 'official' end of stream token
+ }
+ return 0; // 0 means end of file to parser
+ }
+ else if (tok == illegal)
+ return 0;
+ return (int4)curchar;
+}
+
+void PcodeLexer::initialize(istream *t)
+
+{ // Set up for new lex
+ s = t;
+ curstate = start;
+ tokpos = 0;
+ endofstream = false;
+ endofstreamsent = false;
+ lookahead1 = 0;
+ lookahead2 = 0;
+ s->get(lookahead1); // Buffer the first two characters
+ if (!(*s)) {
+ endofstream = true;
+ lookahead1 = 0;
+ return;
+ }
+ s->get(lookahead2);
+ if (!(*s)) {
+ endofstream = true;
+ lookahead2 = 0;
+ return;
+ }
+}
+
+uintb PcodeSnippet::allocateTemp(void)
+
+{ // Allocate a variable in the unique space and return the offset
+ uintb res = tempbase;
+ tempbase += 16;
+ return res;
+}
+
+void PcodeSnippet::addSymbol(SleighSymbol *sym)
+
+{
+ pair<SymbolTree::iterator,bool> res;
+
+ res = tree.insert( sym );
+ if (!res.second) {
+ reportError((const Location *)0,"Duplicate symbol name: "+sym->getName());
+ delete sym; // Symbol is unattached to anything else
+ }
+}
+
+void PcodeSnippet::clear(void)
+
+{ // Clear everything, prepare for a new parse against the same language
+ SymbolTree::iterator iter,tmpiter;
+ iter = tree.begin();
+ while(iter != tree.end()) {
+ SleighSymbol *sym = *iter;
+ tmpiter = iter;
+ ++iter; // Increment now, as node may be deleted
+ if (sym->getType() != SleighSymbol::space_symbol) {
+ delete sym; // Free any old local symbols
+ tree.erase(tmpiter);
+ }
+ }
+ if (result != (ConstructTpl *)0) {
+ delete result;
+ result = (ConstructTpl *)0;
+ }
+ // tempbase = 0;
+ errorcount = 0;
+ firsterror.clear();
+ resetLabelCount();
+}
+
+PcodeSnippet::PcodeSnippet(const SleighBase *slgh)
+ : PcodeCompile()
+{
+ sleigh = slgh;
+ tempbase = 0;
+ errorcount = 0;
+ result = (ConstructTpl *)0;
+ setDefaultSpace(slgh->getDefaultCodeSpace());
+ setConstantSpace(slgh->getConstantSpace());
+ setUniqueSpace(slgh->getUniqueSpace());
+ int4 num = slgh->numSpaces();
+ for(int4 i=0;i<num;++i) {
+ AddrSpace *spc = slgh->getSpace(i);
+ spacetype type = spc->getType();
+ if ((type==IPTR_CONSTANT)||(type==IPTR_PROCESSOR)||(type==IPTR_SPACEBASE)||(type==IPTR_INTERNAL))
+ tree.insert(new SpaceSymbol(spc));
+ }
+ addSymbol(new FlowDestSymbol("inst_dest",slgh->getConstantSpace()));
+ addSymbol(new FlowRefSymbol("inst_ref",slgh->getConstantSpace()));
+}
+
+PcodeSnippet::~PcodeSnippet(void)
+
+{
+ SymbolTree::iterator iter;
+ for(iter=tree.begin();iter!=tree.end();++iter)
+ delete *iter; // Free ALL temporary symbols
+ if (result != (ConstructTpl *)0) {
+ delete result;
+ result = (ConstructTpl *)0;
+ }
+}
+
+void PcodeSnippet::reportError(const Location *loc, const string &msg)
+
+{
+ if (errorcount == 0)
+ firsterror = msg;
+ errorcount += 1;
+}
+
+int4 PcodeSnippet::lex(void)
+
+{
+ int4 tok = lexer.getNextToken();
+ if (tok == STRING) {
+ SleighSymbol *sym;
+ SleighSymbol tmpsym(lexer.getIdentifier());
+ SymbolTree::const_iterator iter = tree.find(&tmpsym);
+ if (iter != tree.end())
+ sym = *iter; // Found a local symbol
+ else
+ sym = sleigh->findSymbol(lexer.getIdentifier());
+ if (sym != (SleighSymbol *)0) {
+ switch(sym->getType()) {
+ case SleighSymbol::space_symbol:
+ yylval.spacesym = (SpaceSymbol *)sym;
+ return SPACESYM;
+ case SleighSymbol::userop_symbol:
+ yylval.useropsym = (UserOpSymbol *)sym;
+ return USEROPSYM;
+ case SleighSymbol::varnode_symbol:
+ yylval.varsym = (VarnodeSymbol *)sym;
+ return VARSYM;
+ case SleighSymbol::operand_symbol:
+ yylval.operandsym = (OperandSymbol *)sym;
+ return OPERANDSYM;
+ case SleighSymbol::start_symbol:
+ yylval.startsym = (StartSymbol *)sym;
+ return STARTSYM;
+ case SleighSymbol::end_symbol:
+ yylval.endsym = (EndSymbol *)sym;
+ return ENDSYM;
+ case SleighSymbol::label_symbol:
+ yylval.labelsym = (LabelSymbol *)sym;
+ return LABELSYM;
+ case SleighSymbol::dummy_symbol:
+ break;
+ default:
+ // The translator may have other symbols in it that we don't want visible in the snippet compiler
+ break;
+ }
+ }
+ yylval.str = new string(lexer.getIdentifier());
+ return STRING;
+ }
+ if (tok == INTEGER) {
+ yylval.i = new uintb(lexer.getNumber());
+ return INTEGER;
+ }
+ return tok;
+}
+
+ bool PcodeSnippet::parseStream(istream &s)
+
+{
+ lexer.initialize(&s);
+ pcode = this; // Setup global object for yyparse
+ int4 res = yyparse();
+ if (res != 0) {
+ reportError((const Location *)0,"Syntax error");
+ return false;
+ }
+ if (!PcodeCompile::propagateSize(result)) {
+ reportError((const Location *)0,"Could not resolve at least 1 variable size");
+ return false;
+ }
+ return true;
+}
+
+void PcodeSnippet::addOperand(const string &name,int4 index)
+
+{ // Add an operand symbol for this snippet
+ OperandSymbol *sym = new OperandSymbol(name,index,(Constructor *)0);
+ addSymbol(sym);
+}
+
+int yylex(void) {
+ return pcode->lex();
+}
+
+int yyerror(const char *s)
+
+{
+ pcode->reportError((const Location *)0,s);
+ return 0;
+}
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.cc
new file mode 100644
index 0000000000..116bbac27d
--- /dev/null
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.cc
@@ -0,0 +1,4394 @@
+/* ###
+ * IP: GHIDRA
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* A Bison parser, made by GNU Bison 3.0.4. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "3.0.4"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 16 "src/decompile/cpp/slghparse.y" /* yacc.c:339 */
+
+#include "slgh_compile.hh"
+
+#define YYERROR_VERBOSE
+
+ extern SleighCompile *slgh;
+ extern int4 actionon;
+ extern FILE *yyin;
+ extern int yydebug;
+ extern int yylex(void);
+ extern int yyerror(const char *str );
+
+#line 79 "src/decompile/cpp/slghparse.cc" /* yacc.c:339 */
+
+# ifndef YY_NULLPTR
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* In a future release of Bison, this section will be replaced
+ by #include "slghparse.hh". */
+#ifndef YY_YY_SRC_DECOMPILE_CPP_SLGHPARSE_HH_INCLUDED
+# define YY_YY_SRC_DECOMPILE_CPP_SLGHPARSE_HH_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int yydebug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ OP_BOOL_OR = 258,
+ OP_BOOL_AND = 259,
+ OP_BOOL_XOR = 260,
+ OP_OR = 261,
+ OP_XOR = 262,
+ OP_AND = 263,
+ OP_EQUAL = 264,
+ OP_NOTEQUAL = 265,
+ OP_FEQUAL = 266,
+ OP_FNOTEQUAL = 267,
+ OP_GREATEQUAL = 268,
+ OP_LESSEQUAL = 269,
+ OP_SLESS = 270,
+ OP_SGREATEQUAL = 271,
+ OP_SLESSEQUAL = 272,
+ OP_SGREAT = 273,
+ OP_FLESS = 274,
+ OP_FGREAT = 275,
+ OP_FLESSEQUAL = 276,
+ OP_FGREATEQUAL = 277,
+ OP_LEFT = 278,
+ OP_RIGHT = 279,
+ OP_SRIGHT = 280,
+ OP_FADD = 281,
+ OP_FSUB = 282,
+ OP_SDIV = 283,
+ OP_SREM = 284,
+ OP_FMULT = 285,
+ OP_FDIV = 286,
+ OP_ZEXT = 287,
+ OP_CARRY = 288,
+ OP_BORROW = 289,
+ OP_SEXT = 290,
+ OP_SCARRY = 291,
+ OP_SBORROW = 292,
+ OP_NAN = 293,
+ OP_ABS = 294,
+ OP_SQRT = 295,
+ OP_CEIL = 296,
+ OP_FLOOR = 297,
+ OP_ROUND = 298,
+ OP_INT2FLOAT = 299,
+ OP_FLOAT2FLOAT = 300,
+ OP_TRUNC = 301,
+ OP_CPOOLREF = 302,
+ OP_NEW = 303,
+ OP_POPCOUNT = 304,
+ BADINTEGER = 305,
+ GOTO_KEY = 306,
+ CALL_KEY = 307,
+ RETURN_KEY = 308,
+ IF_KEY = 309,
+ DEFINE_KEY = 310,
+ ATTACH_KEY = 311,
+ MACRO_KEY = 312,
+ SPACE_KEY = 313,
+ TYPE_KEY = 314,
+ RAM_KEY = 315,
+ DEFAULT_KEY = 316,
+ REGISTER_KEY = 317,
+ ENDIAN_KEY = 318,
+ WITH_KEY = 319,
+ ALIGN_KEY = 320,
+ OP_UNIMPL = 321,
+ TOKEN_KEY = 322,
+ SIGNED_KEY = 323,
+ NOFLOW_KEY = 324,
+ HEX_KEY = 325,
+ DEC_KEY = 326,
+ BIG_KEY = 327,
+ LITTLE_KEY = 328,
+ SIZE_KEY = 329,
+ WORDSIZE_KEY = 330,
+ OFFSET_KEY = 331,
+ NAMES_KEY = 332,
+ VALUES_KEY = 333,
+ VARIABLES_KEY = 334,
+ PCODEOP_KEY = 335,
+ IS_KEY = 336,
+ LOCAL_KEY = 337,
+ DELAYSLOT_KEY = 338,
+ CROSSBUILD_KEY = 339,
+ EXPORT_KEY = 340,
+ BUILD_KEY = 341,
+ CONTEXT_KEY = 342,
+ ELLIPSIS_KEY = 343,
+ GLOBALSET_KEY = 344,
+ BITRANGE_KEY = 345,
+ CHAR = 346,
+ INTEGER = 347,
+ INTB = 348,
+ STRING = 349,
+ SYMBOLSTRING = 350,
+ SPACESYM = 351,
+ SECTIONSYM = 352,
+ TOKENSYM = 353,
+ USEROPSYM = 354,
+ VALUESYM = 355,
+ VALUEMAPSYM = 356,
+ CONTEXTSYM = 357,
+ NAMESYM = 358,
+ VARSYM = 359,
+ BITSYM = 360,
+ SPECSYM = 361,
+ VARLISTSYM = 362,
+ OPERANDSYM = 363,
+ STARTSYM = 364,
+ ENDSYM = 365,
+ MACROSYM = 366,
+ LABELSYM = 367,
+ SUBTABLESYM = 368
+ };
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
+union YYSTYPE
+{
+#line 29 "src/decompile/cpp/slghparse.y" /* yacc.c:355 */
+
+ char ch;
+ uintb *i;
+ intb *big;
+ string *str;
+ vector<string> *strlist;
+ vector<intb> *biglist;
+ vector<ExprTree *> *param;
+ SpaceQuality *spacequal;
+ FieldQuality *fieldqual;
+ StarQuality *starqual;
+ VarnodeTpl *varnode;
+ ExprTree *tree;
+ vector<OpTpl *> *stmt;
+ ConstructTpl *sem;
+ SectionVector *sectionstart;
+ Constructor *construct;
+ PatternEquation *pateq;
+ PatternExpression *patexp;
+
+ vector<SleighSymbol *> *symlist;
+ vector<ContextChange *> *contop;
+ SleighSymbol *anysym;
+ SpaceSymbol *spacesym;
+ SectionSymbol *sectionsym;
+ TokenSymbol *tokensym;
+ UserOpSymbol *useropsym;
+ MacroSymbol *macrosym;
+ LabelSymbol *labelsym;
+ SubtableSymbol *subtablesym;
+ StartSymbol *startsym;
+ EndSymbol *endsym;
+ OperandSymbol *operandsym;
+ VarnodeListSymbol *varlistsym;
+ VarnodeSymbol *varsym;
+ BitrangeSymbol *bitsym;
+ NameSymbol *namesym;
+ ValueSymbol *valuesym;
+ ValueMapSymbol *valuemapsym;
+ ContextSymbol *contextsym;
+ FamilySymbol *famsym;
+ SpecificSymbol *specsym;
+
+#line 277 "src/decompile/cpp/slghparse.cc" /* yacc.c:355 */
+};
+
+typedef union YYSTYPE YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern YYSTYPE yylval;
+
+int yyparse (void);
+
+#endif /* !YY_YY_SRC_DECOMPILE_CPP_SLGHPARSE_HH_INCLUDED */
+
+/* Copy the second part of user declarations. */
+
+#line 294 "src/decompile/cpp/slghparse.cc" /* yacc.c:358 */
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 5
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 2654
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 137
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 71
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 338
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 713
+
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 368
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
+static const yytype_uint8 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, 136, 43, 2, 2, 2, 38, 11, 2,
+ 129, 130, 36, 32, 131, 33, 2, 37, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 135, 8,
+ 17, 128, 18, 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, 132, 2, 133, 9, 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, 134, 6, 127, 44, 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, 7, 10, 12, 13, 14, 15, 16, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 34, 35, 39, 40, 41, 42, 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
+};
+
+#if YYDEBUG
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 156, 156, 157, 158, 159, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 172, 173, 174, 175,
+ 177, 178, 180, 182, 184, 185, 186, 187, 188, 190,
+ 192, 193, 196, 197, 198, 199, 200, 202, 203, 204,
+ 205, 206, 207, 209, 211, 212, 213, 214, 215, 216,
+ 217, 219, 221, 223, 225, 226, 228, 231, 233, 235,
+ 237, 239, 242, 244, 245, 246, 248, 250, 251, 252,
+ 255, 256, 259, 261, 262, 263, 265, 266, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 278, 279, 280,
+ 281, 283, 285, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 302, 303, 304, 305,
+ 307, 308, 310, 311, 313, 314, 316, 317, 318, 319,
+ 320, 321, 322, 325, 326, 327, 328, 330, 331, 333,
+ 334, 335, 336, 337, 338, 340, 341, 343, 345, 346,
+ 348, 349, 350, 351, 352, 354, 355, 356, 357, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 452, 453, 454, 455, 457, 458, 459, 460, 461, 462,
+ 463, 464, 466, 467, 468, 469, 471, 472, 473, 474,
+ 475, 477, 478, 479, 481, 482, 484, 485, 486, 487,
+ 488, 489, 491, 492, 493, 494, 495, 497, 498, 499,
+ 500, 501, 503, 504, 506, 507, 508, 510, 511, 512,
+ 514, 515, 516, 519, 520, 522, 523, 524, 526, 528,
+ 529, 530, 531, 533, 534, 535, 537, 538, 539, 540,
+ 541, 543, 544, 546, 547, 549, 550, 553, 554, 555,
+ 557, 558, 559, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || 0
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "OP_BOOL_OR", "OP_BOOL_AND",
+ "OP_BOOL_XOR", "'|'", "OP_OR", "';'", "'^'", "OP_XOR", "'&'", "OP_AND",
+ "OP_EQUAL", "OP_NOTEQUAL", "OP_FEQUAL", "OP_FNOTEQUAL", "'<'", "'>'",
+ "OP_GREATEQUAL", "OP_LESSEQUAL", "OP_SLESS", "OP_SGREATEQUAL",
+ "OP_SLESSEQUAL", "OP_SGREAT", "OP_FLESS", "OP_FGREAT", "OP_FLESSEQUAL",
+ "OP_FGREATEQUAL", "OP_LEFT", "OP_RIGHT", "OP_SRIGHT", "'+'", "'-'",
+ "OP_FADD", "OP_FSUB", "'*'", "'/'", "'%'", "OP_SDIV", "OP_SREM",
+ "OP_FMULT", "OP_FDIV", "'!'", "'~'", "OP_ZEXT", "OP_CARRY", "OP_BORROW",
+ "OP_SEXT", "OP_SCARRY", "OP_SBORROW", "OP_NAN", "OP_ABS", "OP_SQRT",
+ "OP_CEIL", "OP_FLOOR", "OP_ROUND", "OP_INT2FLOAT", "OP_FLOAT2FLOAT",
+ "OP_TRUNC", "OP_CPOOLREF", "OP_NEW", "OP_POPCOUNT", "BADINTEGER",
+ "GOTO_KEY", "CALL_KEY", "RETURN_KEY", "IF_KEY", "DEFINE_KEY",
+ "ATTACH_KEY", "MACRO_KEY", "SPACE_KEY", "TYPE_KEY", "RAM_KEY",
+ "DEFAULT_KEY", "REGISTER_KEY", "ENDIAN_KEY", "WITH_KEY", "ALIGN_KEY",
+ "OP_UNIMPL", "TOKEN_KEY", "SIGNED_KEY", "NOFLOW_KEY", "HEX_KEY",
+ "DEC_KEY", "BIG_KEY", "LITTLE_KEY", "SIZE_KEY", "WORDSIZE_KEY",
+ "OFFSET_KEY", "NAMES_KEY", "VALUES_KEY", "VARIABLES_KEY", "PCODEOP_KEY",
+ "IS_KEY", "LOCAL_KEY", "DELAYSLOT_KEY", "CROSSBUILD_KEY", "EXPORT_KEY",
+ "BUILD_KEY", "CONTEXT_KEY", "ELLIPSIS_KEY", "GLOBALSET_KEY",
+ "BITRANGE_KEY", "CHAR", "INTEGER", "INTB", "STRING", "SYMBOLSTRING",
+ "SPACESYM", "SECTIONSYM", "TOKENSYM", "USEROPSYM", "VALUESYM",
+ "VALUEMAPSYM", "CONTEXTSYM", "NAMESYM", "VARSYM", "BITSYM", "SPECSYM",
+ "VARLISTSYM", "OPERANDSYM", "STARTSYM", "ENDSYM", "MACROSYM", "LABELSYM",
+ "SUBTABLESYM", "'}'", "'='", "'('", "')'", "','", "'['", "']'", "'{'",
+ "':'", "' '", "$accept", "spec", "definition", "constructorlike",
+ "endiandef", "aligndef", "tokendef", "tokenprop", "contextdef",
+ "contextprop", "fielddef", "contextfielddef", "spacedef", "spaceprop",
+ "varnodedef", "bitrangedef", "bitrangelist", "bitrangesingle",
+ "pcodeopdef", "valueattach", "nameattach", "varattach", "macrodef",
+ "withblockstart", "withblockmid", "withblock", "id_or_nil",
+ "bitpat_or_nil", "macrostart", "rtlbody", "constructor",
+ "constructprint", "subtablestart", "pexpression", "pequation", "elleq",
+ "ellrt", "atomic", "constraint", "contextblock", "contextlist",
+ "section_def", "rtlfirstsection", "rtlcontinue", "rtl", "rtlmid",
+ "statement", "expr", "sizedstar", "jumpdest", "varnode",
+ "integervarnode", "lhsvarnode", "label", "exportvarnode", "familysymbol",
+ "specificsymbol", "charstring", "intblist", "intbpart", "stringlist",
+ "stringpart", "anystringlist", "anystringpart", "valuelist", "valuepart",
+ "varlist", "varpart", "paramlist", "oplist", "anysymbol", YY_NULLPTR
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 124, 261, 59, 94,
+ 262, 38, 263, 264, 265, 266, 267, 60, 62, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 43, 45, 281, 282, 42, 47, 37, 283,
+ 284, 285, 286, 33, 126, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 125, 61, 40,
+ 41, 44, 91, 93, 123, 58, 32
+};
+# endif
+
+#define YYPACT_NINF -313
+
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-313)))
+
+#define YYTABLE_NINF -271
+
+#define yytable_value_is_error(Yytable_value) \
+ (!!((Yytable_value) == (-271)))
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int16 yypact[] =
+{
+ -42, 58, 3, -313, -37, -313, 5, -41, -5, 42,
+ 50, 25, 44, -313, -313, -313, -313, -313, 388, -313,
+ 419, -313, 317, -313, -313, -313, -313, -313, -313, -313,
+ -313, 37, -313, 59, -313, 23, 87, -45, -313, -313,
+ 2492, 71, 2510, -78, 90, 172, 197, 33, 33, 33,
+ 163, -313, -313, 182, -313, -313, -313, 200, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, 351, 254, -313, 256, 291, 267,
+ -313, 269, -313, 290, 293, 308, -313, -313, -313, -313,
+ -313, 2336, -313, -313, -313, -313, 276, -313, 2336, -313,
+ -313, -313, 276, 417, 423, -313, -313, 331, 310, -313,
+ -313, 330, 444, -313, 327, 8, -313, 328, -313, -313,
+ 159, 322, -12, -84, 350, 2336, 329, -313, -313, -313,
+ 333, 334, -313, -313, -313, -313, 336, 249, 361, 362,
+ 341, 1662, 1481, -313, -313, -313, -313, -313, -313, 349,
+ -313, 2336, 4, -313, -313, 368, -313, 64, -313, 4,
+ -313, -313, 472, 376, -313, 2362, -313, 365, -313, -313,
+ -44, -313, -313, -57, 2528, 476, 381, -313, 16, 482,
+ -313, 54, 485, -313, -32, 364, 315, 389, 408, 418,
+ 420, -313, -313, -313, -313, -313, 264, -30, 179, -313,
+ 271, 1668, 1, 1530, 353, 393, 1561, 366, 406, 409,
+ 141, 428, -313, 430, -313, -313, -313, -313, 431, 74,
+ -313, 1530, -65, -313, 157, -313, 166, -313, 1689, 17,
+ 2336, 2336, 2336, -313, -59, -313, 1689, 1689, 1689, 1689,
+ 1689, 1689, -59, -313, 429, -313, -313, -313, 438, -313,
+ 474, -313, -313, -313, -313, -313, 2387, -313, -313, -313,
+ 466, -313, -313, -15, -313, -313, -313, 45, -313, -313,
+ 468, 439, 480, 484, 519, 520, -313, -313, 505, -313,
+ -313, 595, 635, 546, 581, -313, 559, -313, -313, -313,
+ -313, 1530, 686, -313, 1530, 723, -313, 1530, 1530, 1530,
+ 1530, 1530, 605, 638, 639, 647, 649, 680, 685, 688,
+ 690, 725, 728, 730, 765, 770, 805, 806, 810, 845,
+ -313, 1530, 1810, 1530, -313, -10, 0, 564, 627, 764,
+ 307, 840, 971, -313, 161, 1006, -313, 1011, 910, 1530,
+ 949, 1530, 1530, 1530, 1487, 950, 954, 1530, 989, 1689,
+ 1689, -313, 1689, 2369, -313, -313, -313, 325, 1084, -313,
+ 75, -313, -313, -313, 2369, 2369, 2369, 2369, 2369, 2369,
+ -313, 1023, 1029, 1046, -313, -313, -313, -313, 1030, -313,
+ -313, -313, -313, -313, -313, -313, -313, 1034, 1070, 1074,
+ 1109, 1561, -313, -313, 1082, -313, 1110, 326, -313, 563,
+ -313, 603, -313, -313, -313, -313, 1530, 1530, 1530, 1530,
+ 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530,
+ 1530, 1530, 1530, 1530, 807, 1530, 1530, 1530, 1530, 1530,
+ 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530,
+ 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530,
+ 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530,
+ 1530, 1627, -313, 11, 1149, 1150, -313, 1530, 1154, -313,
+ 1164, 299, 1190, -313, 1194, 1326, -313, 1331, -313, -313,
+ -313, -313, 1862, 1246, 2182, 36, 1902, 43, 1530, 1205,
+ 1251, 1942, 1244, -313, -313, 283, 1689, 1689, 1689, 1689,
+ 1689, 1689, 1689, 1689, 1689, 1285, -313, 1291, 1366, -313,
+ -313, -313, -18, 1371, 1284, 1349, -313, 1325, 1329, 1365,
+ 1402, -313, 1399, 1403, 1531, 1532, 1534, 847, 684, 887,
+ 724, 766, 927, 967, 1007, 1047, 1087, 1127, 1167, 1207,
+ 1247, 96, 643, 1287, 136, -313, 2221, 2258, 2258, 2292,
+ 2324, 2394, 2504, 2504, 2504, 2504, 2530, 2530, 2530, 2530,
+ 2530, 2530, 2530, 2530, 2530, 2530, 2530, 2530, 514, 514,
+ 514, 479, 479, 479, 479, -313, -313, -313, -313, -313,
+ -313, -313, 1535, 1408, 1413, -313, 1982, 9, 1537, 1538,
+ 1539, 1561, -313, -313, -313, 1530, 1540, 1530, -313, 1541,
+ 2022, -313, -313, -313, 1445, -313, 2431, 2561, 168, 383,
+ 383, 29, 29, -313, -313, 1622, 1689, 1689, 1597, 300,
+ -313, -313, 27, 1446, -78, -313, -313, -313, -313, 1449,
+ -313, -313, -313, -313, -313, 1530, -313, 1530, 1530, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ 1530, -313, -313, -313, -313, 1452, -313, -313, 1530, -313,
+ -313, -313, -313, 2062, -313, 2182, -313, -313, 1425, 1430,
+ 1431, 1523, 2360, -313, -313, 1568, 1569, -313, -313, 1434,
+ 1556, -313, 1327, 1367, 1407, 1447, 1435, 2102, -313, 1441,
+ 1455, 1456, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, 1530, 1473, 1474, 2142, 1598, 1601,
+ -313, -313, -313
+};
+
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint16 yydefact[] =
+{
+ 0, 0, 0, 2, 0, 1, 0, 0, 0, 0,
+ 67, 0, 0, 89, 4, 5, 3, 6, 0, 7,
+ 0, 8, 0, 9, 10, 11, 12, 13, 14, 17,
+ 63, 0, 18, 0, 16, 0, 0, 0, 15, 19,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 69, 68, 0, 88, 87, 23, 0, 323, 324,
+ 325, 326, 329, 330, 331, 332, 333, 338, 334, 335,
+ 336, 337, 327, 328, 27, 0, 29, 0, 31, 0,
+ 43, 0, 50, 0, 0, 0, 66, 64, 65, 145,
+ 82, 0, 282, 83, 86, 85, 84, 81, 0, 78,
+ 80, 90, 79, 0, 0, 44, 45, 0, 0, 28,
+ 294, 0, 0, 30, 0, 0, 54, 0, 304, 305,
+ 0, 0, 0, 0, 320, 70, 0, 34, 35, 36,
+ 0, 0, 39, 40, 41, 42, 0, 0, 0, 0,
+ 0, 140, 0, 272, 273, 274, 275, 124, 276, 123,
+ 126, 0, 127, 106, 111, 113, 114, 125, 283, 127,
+ 20, 21, 0, 0, 295, 0, 57, 0, 53, 55,
+ 0, 306, 307, 0, 0, 0, 0, 285, 0, 0,
+ 312, 0, 0, 321, 0, 127, 71, 0, 0, 0,
+ 0, 46, 47, 48, 49, 61, 0, 0, 243, 257,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 256,
+ 254, 0, 277, 0, 278, 279, 280, 281, 0, 255,
+ 146, 0, 0, 253, 0, 173, 252, 110, 0, 0,
+ 0, 0, 0, 129, 0, 112, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 296, 293, 297, 0, 52,
+ 0, 310, 308, 309, 303, 299, 0, 300, 59, 286,
+ 0, 287, 289, 0, 58, 314, 313, 0, 60, 72,
+ 0, 0, 0, 0, 0, 0, 254, 255, 0, 259,
+ 252, 0, 0, 0, 0, 247, 246, 251, 248, 244,
+ 245, 0, 0, 250, 0, 0, 170, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 237, 0, 0, 0, 174, 252, 0, 0, 0, 0,
+ 0, 0, 143, 271, 0, 0, 266, 0, 0, 0,
+ 0, 317, 0, 317, 0, 0, 0, 0, 0, 0,
+ 0, 91, 0, 122, 92, 93, 115, 108, 109, 107,
+ 0, 75, 145, 76, 117, 118, 120, 121, 119, 116,
+ 77, 24, 0, 0, 301, 298, 302, 288, 0, 290,
+ 292, 284, 316, 315, 311, 322, 62, 0, 0, 0,
+ 0, 0, 265, 264, 0, 242, 0, 0, 165, 0,
+ 168, 0, 189, 216, 202, 190, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 317, 0, 0, 317, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 175, 0, 0, 0, 147, 0, 0, 154,
+ 0, 0, 0, 267, 0, 144, 263, 0, 261, 141,
+ 161, 258, 0, 0, 318, 0, 0, 0, 0, 0,
+ 0, 0, 0, 104, 105, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 134, 0, 0, 128,
+ 138, 145, 0, 0, 0, 0, 291, 0, 0, 0,
+ 0, 260, 241, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 176, 205, 204, 203, 193,
+ 191, 192, 179, 180, 206, 207, 181, 184, 182, 183,
+ 185, 186, 187, 188, 208, 209, 210, 211, 194, 195,
+ 196, 177, 178, 212, 213, 197, 198, 200, 199, 201,
+ 214, 215, 0, 0, 0, 235, 0, 0, 0, 0,
+ 0, 0, 269, 142, 151, 0, 0, 0, 158, 0,
+ 0, 160, 159, 149, 0, 94, 101, 102, 100, 98,
+ 99, 95, 96, 97, 103, 0, 0, 0, 0, 0,
+ 73, 137, 0, 0, 0, 32, 33, 37, 38, 0,
+ 249, 167, 169, 171, 220, 0, 219, 0, 0, 226,
+ 217, 218, 228, 229, 230, 225, 224, 227, 239, 231,
+ 0, 233, 238, 166, 234, 0, 150, 148, 0, 164,
+ 163, 162, 268, 0, 156, 319, 172, 155, 0, 0,
+ 0, 0, 0, 74, 139, 0, 0, 26, 25, 0,
+ 0, 240, 0, 0, 0, 0, 0, 0, 153, 0,
+ 0, 0, 130, 133, 135, 136, 56, 51, 221, 222,
+ 223, 232, 236, 152, 0, 0, 0, 0, 0, 0,
+ 157, 131, 132
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -313, -313, 1574, 1580, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, 1497, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, 1374,
+ -313, -313, -313, -194, -62, -313, 1471, -313, -313, -132,
+ -313, 999, -313, -313, 1256, 1108, -313, -197, -140, -196,
+ -127, 1157, 1288, -139, -313, -91, -53, 1585, -313, -313,
+ 1001, -313, -313, -313, 252, -313, -313, -313, -312, -313,
+ 15
+};
+
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 2, 14, 15, 3, 16, 17, 18, 19, 20,
+ 74, 78, 21, 22, 23, 24, 115, 116, 25, 26,
+ 27, 28, 29, 30, 31, 32, 53, 185, 33, 363,
+ 34, 35, 36, 353, 152, 153, 154, 155, 156, 234,
+ 360, 621, 510, 511, 140, 141, 220, 484, 323, 292,
+ 324, 223, 224, 293, 335, 354, 325, 96, 179, 263,
+ 112, 165, 175, 256, 121, 173, 182, 267, 485, 184,
+ 75
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_int16 yytable[] =
+{
+ 157, 221, 225, 5, 6, 295, 322, 157, 466, 296,
+ 230, 619, 231, 38, 222, 232, 168, 657, 378, 249,
+ 361, 176, 196, 230, 344, 231, 1, 242, 232, 110,
+ 40, 487, 90, 180, 157, 79, 159, 41, 6, 42,
+ 103, 104, 364, 365, 366, 367, 368, 369, 181, 260,
+ 251, 157, 43, 271, 111, 106, 252, 109, 253, 44,
+ 157, 250, 45, 186, 345, 503, 504, 334, 46, 279,
+ 346, 7, 8, 9, 199, 362, 254, 281, 236, 329,
+ 10, 237, 238, 239, 240, 47, 48, 49, 226, 229,
+ 379, 37, 380, 177, 397, 282, 97, 399, 269, 270,
+ 401, 402, 403, 404, 405, 85, 8, 9, 541, 620,
+ 11, 544, 677, 678, 10, 114, 209, 91, 381, 463,
+ 178, 261, 464, 262, 424, 465, 462, 92, 467, 12,
+ 93, 94, 39, 297, 4, 468, 233, 658, 13, 157,
+ 157, 157, 482, 280, 11, 486, 118, 356, 119, 50,
+ 491, 327, 382, 280, 336, 493, 494, 51, 495, 95,
+ 54, 265, 383, 12, 86, 120, 596, 597, 357, 358,
+ 359, 266, 13, 599, 597, 355, 52, 505, 384, 55,
+ 247, 98, 506, 355, 355, 355, 355, 355, 355, 257,
+ 507, 92, 241, 89, 99, 100, 508, 499, 500, 107,
+ 501, 502, -263, 473, 503, 504, -263, 113, 509, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 101, 542, 543, 648, 597, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
+ 578, 579, 580, 581, 521, 582, 652, 597, 475, 339,
+ 586, 376, 171, -262, 172, 196, 340, 280, 212, 114,
+ 214, 478, 215, 216, 217, 347, 117, 476, 197, 348,
+ 496, 600, 124, 497, -261, 498, 355, 355, -261, 355,
+ 122, 123, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 283, 499, 500, 284, 501, 502, 125, 196, 503,
+ 504, 230, 191, 231, 192, 80, 232, 199, 126, 425,
+ 426, 427, 428, 231, 285, 429, 232, 430, 280, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 209,
+ 199, 276, 132, 133, 134, 135, 286, 330, 287, 40,
+ 158, 212, 130, 214, 131, 215, 216, 217, 42, 81,
+ 277, 82, 288, 289, 290, 136, 56, 137, 663, 278,
+ 665, 43, 198, 291, 83, 84, 589, 675, 44, 590,
+ 676, 45, 209, 605, 276, 501, 502, 46, 138, 503,
+ 504, 139, 671, 672, 212, 160, 214, 76, 215, 216,
+ 217, 161, 127, 277, 128, 129, 162, 164, 682, 163,
+ 683, 684, 472, 355, 355, 355, 355, 355, 355, 355,
+ 355, 355, 166, 685, 174, 167, 170, 183, 187, 524,
+ 326, 687, 188, 189, 662, 190, 193, 194, 195, 235,
+ 212, 331, 214, 332, 215, 216, 217, 228, 221, 225,
+ 243, 244, 248, 212, 258, 214, 259, 215, 216, 217,
+ 264, 222, 333, 268, 272, 57, 233, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 707, 68, 69,
+ 70, 71, 72, 273, 73, 454, 455, 456, 457, 458,
+ 459, 460, 328, 274, 669, 275, 77, 337, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 67, 280, 68,
+ 69, 70, 71, 72, 338, 73, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 341, 342, 371,
+ 343, 373, 670, 355, 355, 226, 425, 426, 427, 428,
+ 372, 377, 429, 386, 430, 385, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 425, 426, 427, 428,
+ 391, 387, 429, 392, 430, 388, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 425, 426, 427, 428,
+ 389, 390, 429, 393, 430, 394, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 395, 425, 426, 427,
+ 428, 396, 469, 429, 398, 430, 525, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 425, 426, 427,
+ 428, 400, 470, 429, 406, 430, 526, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 407, 408, 425,
+ 426, 427, 428, 649, 650, 429, 409, 430, 410, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 411,
+ 425, 426, 427, 428, 412, 635, 429, 413, 430, 414,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 415, 637, 429, 416, 430, 417,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 418, 471, 429, 638, 430, 419,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 420, 421, 429, 545, 430, 422,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 423, 474, 429, 634, 430, -270,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 479, 481, 429, 636, 430, 480,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 483, 489, 429, 639, 430, 490,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 492, 232, 429, 640, 430, 513,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 514, 516, 429, 641, 430, 517,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 515, 518, 429, 642, 430, 519,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 520, 522, 429, 643, 430, 523,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 584, 585, 429, 644, 430, 587,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 588, 591, 429, 645, 430, 592,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, -262, 601, 429, 646, 430, 593,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 595, 604, 429, 647, 430, 602,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 615, 623, 429, 651, 430, 616,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 624, 625, 429, 698, 430, 626,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 425, 426, 427, 428, 617, 627, 429, 699, 430, 622,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 496, 692, 628, 497, 629, 498, 630, 700, 654, 631,
+ 632, 196, 633, 653, 655, 659, 660, 661, 664, 666,
+ 668, 679, 499, 500, 681, 501, 502, 686, 689, 503,
+ 504, 690, 691, 298, 697, 299, 198, 696, 702, 704,
+ 705, 706, 196, 300, 301, 302, 303, 701, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 199, 143, 144, 145, 146, 694, 695,
+ 147, 148, 149, 708, 709, 87, 711, 150, 196, 712,
+ 151, 88, 169, 227, 197, 488, 370, 674, 512, 618,
+ 583, 102, 477, 0, 199, 680, 619, 0, 0, 0,
+ 0, 0, 0, 198, 0, 209, 0, 276, 0, 0,
+ 0, 0, 319, 0, 197, 0, 0, 212, 320, 214,
+ 0, 215, 216, 217, 0, 0, 277, 0, 0, 321,
+ 199, 200, 201, 202, 203, 0, 209, 0, 276, 0,
+ 0, 0, 0, 196, 0, 0, 0, 0, 212, 197,
+ 214, 0, 215, 216, 217, 197, 0, 277, 0, 0,
+ 285, 0, 204, 205, 206, 0, 208, 0, 198, 0,
+ 0, 0, 209, 0, 210, 0, 0, 0, 0, 211,
+ 0, 0, 0, 0, 212, 213, 214, 0, 215, 216,
+ 217, 218, 349, 219, 673, 199, 200, 201, 202, 203,
+ 0, 285, 286, 350, 287, 143, 144, 145, 146, 212,
+ 0, 214, 148, 215, 216, 217, 0, 0, 288, 289,
+ 290, 0, 0, 0, 0, 0, 0, 204, 205, 206,
+ 207, 208, 0, 0, 0, 0, 0, 209, 0, 210,
+ 0, 0, 0, 286, 211, 287, 0, 0, 0, 212,
+ 213, 214, 0, 215, 216, 217, 218, 0, 219, 288,
+ 289, 290, 0, 0, 0, 351, 0, 0, 0, 0,
+ 294, 0, 143, 144, 145, 146, 212, 0, 214, 148,
+ 215, 216, 217, 425, 426, 427, 428, 0, 352, 429,
+ 0, 430, 0, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 425, 426, 427, 428, 0,
+ 594, 429, 0, 430, 461, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 425, 426, 427, 428, 0,
+ 598, 429, 0, 430, 0, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 425, 426, 427, 428, 0,
+ 603, 429, 0, 430, 0, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 425, 426, 427, 428, 0,
+ 656, 429, 0, 430, 0, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 425, 426, 427, 428, 0,
+ 667, 429, 0, 430, 0, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 425, 426, 427, 428, 0,
+ 688, 429, 0, 430, 0, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 425, 426, 427, 428, 0,
+ 703, 429, 0, 430, 0, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 425, 426, 427, 428, 0,
+ 710, 429, 0, 430, 0, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 425, 426, 427, 428, 0,
+ 0, 429, 0, 430, 0, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 426, 427, 428, 0, 0,
+ 429, 0, 430, 0, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 428, 0, 0, 429, 0, 430,
+ 0, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 429, 0, 430, 0, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 430, 0, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 496, 693, 0,
+ 497, 0, 498, 0, 0, 0, 496, 0, 0, 497,
+ 0, 498, 0, 0, 0, 0, 0, 0, 0, 499,
+ 500, 0, 501, 502, 0, 0, 503, 504, 499, 500,
+ 0, 501, 502, 0, 0, 503, 504, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 142, 0, 0,
+ 0, 497, 0, 498, 0, 0, 0, 0, 0, 143,
+ 144, 145, 146, 0, 0, 147, 148, 149, 0, 0,
+ 499, 500, 150, 501, 502, 151, 0, 503, 504, 245,
+ 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 67, 0, 68, 69, 70, 71, 72, 0, 73, 0,
+ 0, 0, 0, 0, 374, 246, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 0, 68, 69, 70,
+ 71, 72, 0, 73, 0, 0, 0, 0, 0, 0,
+ 375, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 498, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 499, 500, 0, 501, 502, 0, 0, 503, 504, 105,
+ 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 67, 0, 68, 69, 70, 71, 72, 108, 73, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 67, 0,
+ 68, 69, 70, 71, 72, 255, 73, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 0, 68, 69,
+ 70, 71, 72, 0, 73
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 91, 141, 141, 0, 1, 201, 203, 98, 8, 8,
+ 6, 29, 8, 8, 141, 11, 8, 8, 33, 63,
+ 79, 33, 11, 6, 221, 8, 68, 159, 11, 107,
+ 71, 343, 9, 117, 125, 20, 98, 78, 1, 80,
+ 85, 86, 236, 237, 238, 239, 240, 241, 132, 33,
+ 107, 142, 93, 185, 132, 40, 113, 42, 115, 100,
+ 151, 105, 103, 125, 129, 36, 37, 207, 109, 196,
+ 135, 68, 69, 70, 63, 134, 133, 107, 14, 206,
+ 77, 17, 18, 19, 20, 90, 91, 92, 141, 151,
+ 105, 128, 107, 105, 291, 125, 9, 294, 130, 131,
+ 297, 298, 299, 300, 301, 68, 69, 70, 420, 127,
+ 107, 423, 85, 86, 77, 107, 105, 94, 133, 129,
+ 132, 105, 132, 107, 321, 135, 323, 104, 128, 126,
+ 107, 108, 127, 132, 76, 135, 132, 128, 135, 230,
+ 231, 232, 339, 196, 107, 342, 113, 130, 115, 107,
+ 347, 204, 107, 206, 207, 349, 350, 107, 352, 136,
+ 135, 107, 117, 126, 127, 132, 130, 131, 230, 231,
+ 232, 117, 135, 130, 131, 228, 126, 102, 133, 135,
+ 165, 94, 107, 236, 237, 238, 239, 240, 241, 174,
+ 115, 104, 128, 134, 107, 108, 121, 29, 30, 128,
+ 32, 33, 128, 330, 36, 37, 132, 117, 133, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 136, 421, 422, 130, 131, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 391, 461, 130, 131, 107, 128,
+ 467, 256, 113, 132, 115, 11, 135, 330, 117, 107,
+ 119, 334, 121, 122, 123, 128, 89, 126, 17, 132,
+ 7, 488, 129, 10, 128, 12, 349, 350, 132, 352,
+ 48, 49, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 132, 29, 30, 135, 32, 33, 135, 11, 36,
+ 37, 6, 73, 8, 75, 8, 11, 63, 128, 3,
+ 4, 5, 6, 8, 63, 9, 11, 11, 391, 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, 105,
+ 63, 107, 81, 82, 83, 84, 105, 11, 107, 71,
+ 104, 117, 128, 119, 128, 121, 122, 123, 80, 72,
+ 126, 74, 121, 122, 123, 128, 8, 128, 595, 135,
+ 597, 93, 36, 132, 87, 88, 107, 107, 100, 110,
+ 110, 103, 105, 130, 107, 32, 33, 109, 128, 36,
+ 37, 128, 616, 617, 117, 8, 119, 8, 121, 122,
+ 123, 8, 81, 126, 83, 84, 105, 107, 635, 129,
+ 637, 638, 135, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 8, 650, 132, 128, 128, 107, 129, 133,
+ 107, 658, 129, 129, 591, 129, 105, 105, 127, 101,
+ 117, 105, 119, 107, 121, 122, 123, 128, 618, 618,
+ 8, 105, 117, 117, 8, 119, 105, 121, 122, 123,
+ 8, 618, 126, 8, 105, 107, 132, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 704, 120, 121,
+ 122, 123, 124, 105, 126, 36, 37, 38, 39, 40,
+ 41, 42, 129, 105, 615, 105, 107, 121, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 591, 120,
+ 121, 122, 123, 124, 135, 126, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 129, 128, 130,
+ 129, 87, 615, 616, 617, 618, 3, 4, 5, 6,
+ 132, 105, 9, 134, 11, 107, 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, 3, 4, 5, 6,
+ 105, 131, 9, 18, 11, 131, 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, 3, 4, 5, 6,
+ 131, 131, 9, 18, 11, 109, 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, 105, 3, 4, 5,
+ 6, 132, 128, 9, 8, 11, 133, 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, 3, 4, 5,
+ 6, 8, 105, 9, 129, 11, 133, 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, 129, 129, 3,
+ 4, 5, 6, 130, 131, 9, 129, 11, 129, 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, 129,
+ 3, 4, 5, 6, 129, 131, 9, 129, 11, 129,
+ 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,
+ 3, 4, 5, 6, 129, 131, 9, 129, 11, 129,
+ 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,
+ 3, 4, 5, 6, 129, 131, 9, 131, 11, 129,
+ 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,
+ 3, 4, 5, 6, 129, 129, 9, 130, 11, 129,
+ 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,
+ 3, 4, 5, 6, 129, 135, 9, 130, 11, 8,
+ 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,
+ 3, 4, 5, 6, 8, 105, 9, 130, 11, 8,
+ 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,
+ 3, 4, 5, 6, 105, 105, 9, 130, 11, 105,
+ 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,
+ 3, 4, 5, 6, 105, 11, 9, 130, 11, 76,
+ 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,
+ 3, 4, 5, 6, 105, 105, 9, 130, 11, 105,
+ 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,
+ 3, 4, 5, 6, 128, 105, 9, 130, 11, 105,
+ 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,
+ 3, 4, 5, 6, 105, 133, 9, 130, 11, 109,
+ 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,
+ 3, 4, 5, 6, 105, 105, 9, 130, 11, 105,
+ 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,
+ 3, 4, 5, 6, 130, 105, 9, 130, 11, 105,
+ 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,
+ 3, 4, 5, 6, 8, 130, 9, 130, 11, 8,
+ 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,
+ 3, 4, 5, 6, 128, 131, 9, 130, 11, 128,
+ 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,
+ 3, 4, 5, 6, 129, 131, 9, 130, 11, 128,
+ 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,
+ 3, 4, 5, 6, 105, 130, 9, 130, 11, 130,
+ 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,
+ 3, 4, 5, 6, 128, 130, 9, 130, 11, 128,
+ 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,
+ 7, 8, 130, 10, 135, 12, 133, 130, 130, 8,
+ 8, 11, 8, 8, 131, 8, 8, 8, 8, 8,
+ 105, 105, 29, 30, 105, 32, 33, 105, 133, 36,
+ 37, 131, 131, 33, 8, 35, 36, 133, 133, 128,
+ 115, 115, 11, 43, 44, 45, 46, 130, 48, 49,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 113, 114, 115, 116, 30, 30,
+ 119, 120, 121, 130, 130, 31, 8, 126, 11, 8,
+ 129, 31, 115, 142, 17, 128, 242, 618, 362, 511,
+ 463, 36, 334, -1, 63, 624, 29, -1, -1, -1,
+ -1, -1, -1, 36, -1, 105, -1, 107, -1, -1,
+ -1, -1, 112, -1, 17, -1, -1, 117, 118, 119,
+ -1, 121, 122, 123, -1, -1, 126, -1, -1, 129,
+ 63, 64, 65, 66, 67, -1, 105, -1, 107, -1,
+ -1, -1, -1, 11, -1, -1, -1, -1, 117, 17,
+ 119, -1, 121, 122, 123, 17, -1, 126, -1, -1,
+ 63, -1, 95, 96, 97, -1, 99, -1, 36, -1,
+ -1, -1, 105, -1, 107, -1, -1, -1, -1, 112,
+ -1, -1, -1, -1, 117, 118, 119, -1, 121, 122,
+ 123, 124, 33, 126, 127, 63, 64, 65, 66, 67,
+ -1, 63, 105, 44, 107, 113, 114, 115, 116, 117,
+ -1, 119, 120, 121, 122, 123, -1, -1, 121, 122,
+ 123, -1, -1, -1, -1, -1, -1, 95, 96, 97,
+ 98, 99, -1, -1, -1, -1, -1, 105, -1, 107,
+ -1, -1, -1, 105, 112, 107, -1, -1, -1, 117,
+ 118, 119, -1, 121, 122, 123, 124, -1, 126, 121,
+ 122, 123, -1, -1, -1, 106, -1, -1, -1, -1,
+ 132, -1, 113, 114, 115, 116, 117, -1, 119, 120,
+ 121, 122, 123, 3, 4, 5, 6, -1, 129, 9,
+ -1, 11, -1, 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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3, 4, 5, 6, -1,
+ 8, 9, -1, 11, 64, 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, 3, 4, 5, 6, -1,
+ 8, 9, -1, 11, -1, 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, 3, 4, 5, 6, -1,
+ 8, 9, -1, 11, -1, 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, 3, 4, 5, 6, -1,
+ 8, 9, -1, 11, -1, 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, 3, 4, 5, 6, -1,
+ 8, 9, -1, 11, -1, 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, 3, 4, 5, 6, -1,
+ 8, 9, -1, 11, -1, 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, 3, 4, 5, 6, -1,
+ 8, 9, -1, 11, -1, 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, 3, 4, 5, 6, -1,
+ 8, 9, -1, 11, -1, 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, 3, 4, 5, 6, -1,
+ -1, 9, -1, 11, -1, 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, 4, 5, 6, -1, -1,
+ 9, -1, 11, -1, 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, 6, -1, -1, 9, -1, 11,
+ -1, 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, 9, -1, 11, -1, 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, 11, -1, 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, 7, 8, -1,
+ 10, -1, 12, -1, -1, -1, 7, -1, -1, 10,
+ -1, 12, -1, -1, -1, -1, -1, -1, -1, 29,
+ 30, -1, 32, 33, -1, -1, 36, 37, 29, 30,
+ -1, 32, 33, -1, -1, 36, 37, 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, 101, -1, -1,
+ -1, 10, -1, 12, -1, -1, -1, -1, -1, 113,
+ 114, 115, 116, -1, -1, 119, 120, 121, -1, -1,
+ 29, 30, 126, 32, 33, 129, -1, 36, 37, 107,
+ -1, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+ 118, -1, 120, 121, 122, 123, 124, -1, 126, -1,
+ -1, -1, -1, -1, 107, 133, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, -1, 120, 121, 122,
+ 123, 124, -1, 126, -1, -1, -1, -1, -1, -1,
+ 133, 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, 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, 12, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 29, 30, -1, 32, 33, -1, -1, 36, 37, 107,
+ -1, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+ 118, -1, 120, 121, 122, 123, 124, 107, 126, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
+ 120, 121, 122, 123, 124, 107, 126, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, -1, 120, 121,
+ 122, 123, 124, -1, 126
+};
+
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 68, 138, 141, 76, 0, 1, 68, 69, 70,
+ 77, 107, 126, 135, 139, 140, 142, 143, 144, 145,
+ 146, 149, 150, 151, 152, 155, 156, 157, 158, 159,
+ 160, 161, 162, 165, 167, 168, 169, 128, 8, 127,
+ 71, 78, 80, 93, 100, 103, 109, 90, 91, 92,
+ 107, 107, 126, 163, 135, 135, 8, 107, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 120, 121,
+ 122, 123, 124, 126, 147, 207, 8, 107, 148, 207,
+ 8, 72, 74, 87, 88, 68, 127, 139, 140, 134,
+ 9, 94, 104, 107, 108, 136, 194, 9, 94, 107,
+ 108, 136, 194, 85, 86, 107, 207, 128, 107, 207,
+ 107, 132, 197, 117, 107, 153, 154, 89, 113, 115,
+ 132, 201, 201, 201, 129, 135, 128, 81, 83, 84,
+ 128, 128, 81, 82, 83, 84, 128, 128, 128, 128,
+ 181, 182, 101, 113, 114, 115, 116, 119, 120, 121,
+ 126, 129, 171, 172, 173, 174, 175, 192, 104, 171,
+ 8, 8, 105, 129, 107, 198, 8, 128, 8, 154,
+ 128, 113, 115, 202, 132, 199, 33, 105, 132, 195,
+ 117, 132, 203, 107, 206, 164, 171, 129, 129, 129,
+ 129, 73, 75, 105, 105, 127, 11, 17, 36, 63,
+ 64, 65, 66, 67, 95, 96, 97, 98, 99, 105,
+ 107, 112, 117, 118, 119, 121, 122, 123, 124, 126,
+ 183, 185, 187, 188, 189, 190, 193, 173, 128, 171,
+ 6, 8, 11, 132, 176, 101, 14, 17, 18, 19,
+ 20, 128, 176, 8, 105, 107, 133, 207, 117, 63,
+ 105, 107, 113, 115, 133, 107, 200, 207, 8, 105,
+ 33, 105, 107, 196, 8, 107, 117, 204, 8, 130,
+ 131, 176, 105, 105, 105, 105, 107, 126, 135, 187,
+ 193, 107, 125, 132, 135, 63, 105, 107, 121, 122,
+ 123, 132, 186, 190, 132, 186, 8, 132, 33, 35,
+ 43, 44, 45, 46, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 112,
+ 118, 129, 184, 185, 187, 193, 107, 193, 129, 187,
+ 11, 105, 107, 126, 185, 191, 193, 121, 135, 128,
+ 135, 129, 128, 129, 184, 129, 135, 128, 132, 33,
+ 44, 106, 129, 170, 192, 193, 130, 171, 171, 171,
+ 177, 79, 134, 166, 170, 170, 170, 170, 170, 170,
+ 166, 130, 132, 87, 107, 133, 207, 105, 33, 105,
+ 107, 133, 107, 117, 133, 107, 134, 131, 131, 131,
+ 131, 105, 18, 18, 109, 105, 132, 184, 8, 184,
+ 8, 184, 184, 184, 184, 184, 129, 129, 129, 129,
+ 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
+ 129, 129, 129, 129, 184, 3, 4, 5, 6, 9,
+ 11, 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, 64, 184, 129, 132, 135, 8, 128, 135, 128,
+ 105, 131, 135, 187, 135, 107, 126, 189, 193, 8,
+ 8, 105, 184, 105, 184, 205, 184, 205, 128, 105,
+ 105, 184, 105, 170, 170, 170, 7, 10, 12, 29,
+ 30, 32, 33, 36, 37, 102, 107, 115, 121, 133,
+ 179, 180, 181, 76, 105, 128, 105, 105, 105, 105,
+ 105, 187, 133, 109, 133, 133, 133, 184, 184, 184,
+ 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
+ 184, 205, 184, 184, 205, 130, 184, 184, 184, 184,
+ 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
+ 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
+ 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
+ 184, 184, 186, 188, 105, 105, 184, 105, 130, 107,
+ 110, 105, 105, 8, 8, 128, 130, 131, 8, 130,
+ 184, 130, 128, 8, 131, 130, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 129, 128, 128, 182, 29,
+ 127, 178, 128, 131, 105, 130, 130, 130, 130, 135,
+ 133, 8, 8, 8, 130, 131, 130, 131, 131, 130,
+ 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+ 131, 130, 130, 8, 130, 131, 8, 8, 128, 8,
+ 8, 8, 187, 184, 8, 184, 8, 8, 105, 192,
+ 193, 170, 170, 127, 178, 107, 110, 85, 86, 105,
+ 197, 105, 184, 184, 184, 184, 105, 184, 8, 133,
+ 131, 131, 8, 8, 30, 30, 133, 8, 130, 130,
+ 130, 130, 133, 8, 128, 115, 115, 184, 130, 130,
+ 8, 8, 8
+};
+
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 137, 138, 138, 138, 138, 139, 139, 139, 139,
+ 139, 139, 139, 139, 139, 139, 140, 140, 140, 140,
+ 141, 141, 142, 143, 144, 144, 144, 144, 144, 145,
+ 146, 146, 147, 147, 147, 147, 147, 148, 148, 148,
+ 148, 148, 148, 149, 150, 150, 150, 150, 150, 150,
+ 150, 151, 151, 152, 153, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 161, 161, 162, 163, 163, 163,
+ 164, 164, 165, 166, 166, 166, 167, 167, 168, 168,
+ 168, 168, 168, 168, 168, 168, 168, 169, 169, 169,
+ 169, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 171, 171, 171, 171,
+ 172, 172, 173, 173, 174, 174, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 176, 176, 177,
+ 177, 177, 177, 177, 177, 178, 178, 179, 180, 180,
+ 181, 181, 181, 181, 181, 182, 182, 182, 182, 183,
+ 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
+ 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
+ 183, 183, 183, 183, 184, 184, 184, 184, 184, 184,
+ 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
+ 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
+ 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
+ 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
+ 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
+ 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
+ 185, 185, 185, 185, 186, 186, 186, 186, 186, 186,
+ 186, 186, 187, 187, 187, 187, 188, 188, 188, 188,
+ 188, 189, 189, 189, 190, 190, 191, 191, 191, 191,
+ 191, 191, 192, 192, 192, 192, 192, 193, 193, 193,
+ 193, 193, 194, 194, 195, 195, 195, 196, 196, 196,
+ 196, 196, 196, 197, 197, 198, 198, 198, 199, 200,
+ 200, 200, 200, 201, 201, 201, 202, 202, 202, 202,
+ 202, 203, 203, 204, 204, 204, 204, 205, 205, 205,
+ 206, 206, 206, 207, 207, 207, 207, 207, 207, 207,
+ 207, 207, 207, 207, 207, 207, 207, 207, 207
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 1, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 1, 1, 1, 2,
+ 5, 5, 5, 2, 6, 9, 9, 2, 3, 2,
+ 3, 2, 7, 7, 2, 2, 2, 7, 7, 2,
+ 2, 2, 2, 2, 3, 3, 4, 4, 4, 4,
+ 2, 10, 5, 4, 1, 2, 8, 4, 5, 5,
+ 5, 4, 6, 1, 2, 2, 2, 0, 1, 1,
+ 0, 1, 5, 3, 4, 1, 5, 5, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
+ 2, 1, 1, 1, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 2, 2, 1, 3, 3, 3,
+ 2, 1, 2, 1, 1, 3, 3, 3, 3, 3,
+ 3, 3, 3, 1, 1, 1, 1, 0, 3, 0,
+ 5, 8, 8, 5, 2, 3, 3, 2, 1, 3,
+ 1, 4, 5, 3, 4, 0, 2, 4, 6, 4,
+ 5, 4, 7, 6, 3, 5, 5, 9, 4, 4,
+ 4, 3, 5, 5, 5, 3, 5, 5, 3, 5,
+ 2, 5, 5, 1, 1, 2, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
+ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 2, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 2, 4, 4, 4,
+ 4, 6, 6, 6, 4, 4, 4, 4, 4, 4,
+ 4, 4, 6, 4, 4, 3, 6, 1, 4, 4,
+ 6, 4, 3, 1, 1, 1, 1, 1, 1, 4,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
+ 4, 1, 1, 1, 3, 3, 1, 2, 4, 3,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 3, 1, 2, 1, 2, 1,
+ 2, 3, 2, 3, 1, 1, 2, 2, 3, 1,
+ 1, 2, 2, 3, 1, 1, 1, 1, 2, 2,
+ 2, 3, 1, 1, 1, 2, 2, 0, 1, 3,
+ 0, 1, 3, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (0)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+{
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ YYUSE (yytype);
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+{
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
+{
+ unsigned long int yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+{
+ YYUSE (yyvaluep);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (void)
+{
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* 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;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex ();
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 19:
+#line 175 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->resetConstructors(); }
+#line 2276 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 20:
+#line 177 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->setEndian(1); }
+#line 2282 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 21:
+#line 178 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->setEndian(0); }
+#line 2288 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 22:
+#line 180 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->setAlignment(*(yyvsp[-1].i)); delete (yyvsp[-1].i); }
+#line 2294 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 23:
+#line 182 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ {}
+#line 2300 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 24:
+#line 184 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tokensym) = slgh->defineToken((yyvsp[-3].str),(yyvsp[-1].i),0); }
+#line 2306 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 25:
+#line 185 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tokensym) = slgh->defineToken((yyvsp[-6].str),(yyvsp[-4].i),-1); }
+#line 2312 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 26:
+#line 186 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tokensym) = slgh->defineToken((yyvsp[-6].str),(yyvsp[-4].i),1); }
+#line 2318 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 27:
+#line 187 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tokensym) = (yyvsp[-1].tokensym); slgh->addTokenField((yyvsp[-1].tokensym),(yyvsp[0].fieldqual)); }
+#line 2324 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 28:
+#line 188 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg=(yyvsp[0].anysym)->getName()+": redefined as a token"; yyerror(errmsg.c_str()); YYERROR; }
+#line 2330 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 29:
+#line 190 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ {}
+#line 2336 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 30:
+#line 192 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varsym) = (yyvsp[0].varsym); }
+#line 2342 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 31:
+#line 193 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varsym) = (yyvsp[-1].varsym); if (!slgh->addContextField( (yyvsp[-1].varsym), (yyvsp[0].fieldqual) ))
+ { yyerror("All context definitions must come before constructors"); YYERROR; } }
+#line 2349 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 32:
+#line 196 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.fieldqual) = new FieldQuality((yyvsp[-6].str),(yyvsp[-3].i),(yyvsp[-1].i)); }
+#line 2355 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 33:
+#line 197 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { delete (yyvsp[-3].i); delete (yyvsp[-1].i); string errmsg = (yyvsp[-6].anysym)->getName()+": redefined as field"; yyerror(errmsg.c_str()); YYERROR; }
+#line 2361 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 34:
+#line 198 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->signext = true; }
+#line 2367 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 35:
+#line 199 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->hex = true; }
+#line 2373 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 36:
+#line 200 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->hex = false; }
+#line 2379 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 37:
+#line 202 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.fieldqual) = new FieldQuality((yyvsp[-6].str),(yyvsp[-3].i),(yyvsp[-1].i)); }
+#line 2385 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 38:
+#line 203 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { delete (yyvsp[-3].i); delete (yyvsp[-1].i); string errmsg = (yyvsp[-6].anysym)->getName()+": redefined as field"; yyerror(errmsg.c_str()); YYERROR; }
+#line 2391 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 39:
+#line 204 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->signext = true; }
+#line 2397 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 40:
+#line 205 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->flow = false; }
+#line 2403 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 41:
+#line 206 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->hex = true; }
+#line 2409 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 42:
+#line 207 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->hex = false; }
+#line 2415 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 43:
+#line 209 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->newSpace((yyvsp[-1].spacequal)); }
+#line 2421 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 44:
+#line 211 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.spacequal) = new SpaceQuality(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 2427 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 45:
+#line 212 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg = (yyvsp[0].anysym)->getName()+": redefined as space"; yyerror(errmsg.c_str()); YYERROR; }
+#line 2433 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 46:
+#line 213 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.spacequal) = (yyvsp[-3].spacequal); (yyval.spacequal)->type = SpaceQuality::ramtype; }
+#line 2439 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 47:
+#line 214 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.spacequal) = (yyvsp[-3].spacequal); (yyval.spacequal)->type = SpaceQuality::registertype; }
+#line 2445 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 48:
+#line 215 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.spacequal) = (yyvsp[-3].spacequal); (yyval.spacequal)->size = *(yyvsp[0].i); delete (yyvsp[0].i); }
+#line 2451 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 49:
+#line 216 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.spacequal) = (yyvsp[-3].spacequal); (yyval.spacequal)->wordsize = *(yyvsp[0].i); delete (yyvsp[0].i); }
+#line 2457 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 50:
+#line 217 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.spacequal) = (yyvsp[-1].spacequal); (yyval.spacequal)->isdefault = true; }
+#line 2463 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 51:
+#line 219 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ {
+ slgh->defineVarnodes((yyvsp[-8].spacesym),(yyvsp[-5].i),(yyvsp[-2].i),(yyvsp[-1].strlist)); }
+#line 2470 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 52:
+#line 221 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { yyerror("Parsed integer is too big (overflow)"); YYERROR; }
+#line 2476 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 56:
+#line 228 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ {
+ slgh->defineBitrange((yyvsp[-7].str),(yyvsp[-5].varsym),(uint4)*(yyvsp[-3].i),(uint4)*(yyvsp[-1].i)); delete (yyvsp[-3].i); delete (yyvsp[-1].i); }
+#line 2483 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 57:
+#line 231 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->addUserOp((yyvsp[-1].strlist)); }
+#line 2489 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 58:
+#line 233 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->attachValues((yyvsp[-2].symlist),(yyvsp[-1].biglist)); }
+#line 2495 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 59:
+#line 235 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->attachNames((yyvsp[-2].symlist),(yyvsp[-1].strlist)); }
+#line 2501 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 60:
+#line 237 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->attachVarnodes((yyvsp[-2].symlist),(yyvsp[-1].symlist)); }
+#line 2507 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 61:
+#line 239 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->buildMacro((yyvsp[-3].macrosym),(yyvsp[-1].sem)); }
+#line 2513 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 62:
+#line 242 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->pushWith((yyvsp[-4].subtablesym),(yyvsp[-2].pateq),(yyvsp[-1].contop)); }
+#line 2519 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 66:
+#line 248 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->popWith(); }
+#line 2525 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 67:
+#line 250 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.subtablesym) = (SubtableSymbol *)0; }
+#line 2531 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 68:
+#line 251 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.subtablesym) = (yyvsp[0].subtablesym); }
+#line 2537 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 69:
+#line 252 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.subtablesym) = slgh->newTable((yyvsp[0].str)); }
+#line 2543 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 70:
+#line 255 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = (PatternEquation *)0; }
+#line 2549 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 71:
+#line 256 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = (yyvsp[0].pateq); }
+#line 2555 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 72:
+#line 259 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.macrosym) = slgh->createMacro((yyvsp[-3].str),(yyvsp[-1].strlist)); }
+#line 2561 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 73:
+#line 261 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sectionstart) = slgh->standaloneSection((yyvsp[-1].sem)); }
+#line 2567 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 74:
+#line 262 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sectionstart) = slgh->finalNamedSection((yyvsp[-2].sectionstart),(yyvsp[-1].sem)); }
+#line 2573 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 75:
+#line 263 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sectionstart) = (SectionVector *)0; }
+#line 2579 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 76:
+#line 265 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->buildConstructor((yyvsp[-4].construct),(yyvsp[-2].pateq),(yyvsp[-1].contop),(yyvsp[0].sectionstart)); }
+#line 2585 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 77:
+#line 266 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { slgh->buildConstructor((yyvsp[-4].construct),(yyvsp[-2].pateq),(yyvsp[-1].contop),(yyvsp[0].sectionstart)); }
+#line 2591 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 78:
+#line 268 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.construct) = (yyvsp[-1].construct); (yyval.construct)->addSyntax(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 2597 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 79:
+#line 269 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.construct) = (yyvsp[-1].construct); (yyval.construct)->addSyntax(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 2603 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 80:
+#line 270 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.construct) = (yyvsp[-1].construct); if (slgh->isInRoot((yyvsp[-1].construct))) { (yyval.construct)->addSyntax(*(yyvsp[0].str)); delete (yyvsp[0].str); } else slgh->newOperand((yyvsp[-1].construct),(yyvsp[0].str)); }
+#line 2609 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 81:
+#line 271 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.construct) = (yyvsp[-1].construct); if (!slgh->isInRoot((yyvsp[-1].construct))) { yyerror("Unexpected '^' at start of print pieces"); YYERROR; } }
+#line 2615 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 82:
+#line 272 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.construct) = (yyvsp[-1].construct); }
+#line 2621 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 83:
+#line 273 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.construct) = (yyvsp[-1].construct); (yyval.construct)->addSyntax(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 2627 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 84:
+#line 274 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.construct) = (yyvsp[-1].construct); (yyval.construct)->addSyntax(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 2633 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 85:
+#line 275 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.construct) = (yyvsp[-1].construct); (yyval.construct)->addSyntax(string(" ")); }
+#line 2639 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 86:
+#line 276 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.construct) = (yyvsp[-1].construct); slgh->newOperand((yyvsp[-1].construct),(yyvsp[0].str)); }
+#line 2645 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 87:
+#line 278 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.construct) = slgh->createConstructor((yyvsp[-1].subtablesym)); }
+#line 2651 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 88:
+#line 279 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { SubtableSymbol *sym=slgh->newTable((yyvsp[-1].str)); (yyval.construct) = slgh->createConstructor(sym); }
+#line 2657 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 89:
+#line 280 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.construct) = slgh->createConstructor((SubtableSymbol *)0); }
+#line 2663 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 90:
+#line 281 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.construct) = (yyvsp[-1].construct); }
+#line 2669 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 91:
+#line 283 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = new ConstantValue(*(yyvsp[0].big)); delete (yyvsp[0].big); }
+#line 2675 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 92:
+#line 285 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { if ((actionon==1)&&((yyvsp[0].famsym)->getType() != SleighSymbol::context_symbol))
+ { string errmsg="Global symbol "+(yyvsp[0].famsym)->getName(); errmsg += " is not allowed in action expression"; yyerror(errmsg.c_str()); } (yyval.patexp) = (yyvsp[0].famsym)->getPatternValue(); }
+#line 2682 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 93:
+#line 288 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = (yyvsp[0].specsym)->getPatternExpression(); }
+#line 2688 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 94:
+#line 289 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = (yyvsp[-1].patexp); }
+#line 2694 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 95:
+#line 290 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = new PlusExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); }
+#line 2700 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 96:
+#line 291 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = new SubExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); }
+#line 2706 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 97:
+#line 292 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = new MultExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); }
+#line 2712 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 98:
+#line 293 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = new LeftShiftExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); }
+#line 2718 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 99:
+#line 294 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = new RightShiftExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); }
+#line 2724 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 100:
+#line 295 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = new AndExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); }
+#line 2730 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 101:
+#line 296 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = new OrExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); }
+#line 2736 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 102:
+#line 297 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = new XorExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); }
+#line 2742 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 103:
+#line 298 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = new DivExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); }
+#line 2748 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 104:
+#line 299 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = new MinusExpression((yyvsp[0].patexp)); }
+#line 2754 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 105:
+#line 300 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.patexp) = new NotExpression((yyvsp[0].patexp)); }
+#line 2760 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 107:
+#line 303 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new EquationAnd((yyvsp[-2].pateq),(yyvsp[0].pateq)); }
+#line 2766 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 108:
+#line 304 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new EquationOr((yyvsp[-2].pateq),(yyvsp[0].pateq)); }
+#line 2772 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 109:
+#line 305 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new EquationCat((yyvsp[-2].pateq),(yyvsp[0].pateq)); }
+#line 2778 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 110:
+#line 307 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new EquationLeftEllipsis((yyvsp[0].pateq)); }
+#line 2784 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 112:
+#line 310 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new EquationRightEllipsis((yyvsp[-1].pateq)); }
+#line 2790 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 115:
+#line 314 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = (yyvsp[-1].pateq); }
+#line 2796 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 116:
+#line 316 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new EqualEquation((yyvsp[-2].famsym)->getPatternValue(),(yyvsp[0].patexp)); }
+#line 2802 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 117:
+#line 317 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new NotEqualEquation((yyvsp[-2].famsym)->getPatternValue(),(yyvsp[0].patexp)); }
+#line 2808 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 118:
+#line 318 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new LessEquation((yyvsp[-2].famsym)->getPatternValue(),(yyvsp[0].patexp)); }
+#line 2814 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 119:
+#line 319 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new LessEqualEquation((yyvsp[-2].famsym)->getPatternValue(),(yyvsp[0].patexp)); }
+#line 2820 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 120:
+#line 320 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new GreaterEquation((yyvsp[-2].famsym)->getPatternValue(),(yyvsp[0].patexp)); }
+#line 2826 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 121:
+#line 321 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new GreaterEqualEquation((yyvsp[-2].famsym)->getPatternValue(),(yyvsp[0].patexp)); }
+#line 2832 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 122:
+#line 322 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = slgh->constrainOperand((yyvsp[-2].operandsym),(yyvsp[0].patexp));
+ if ((yyval.pateq) == (PatternEquation *)0)
+ { string errmsg="Constraining currently undefined operand "+(yyvsp[-2].operandsym)->getName(); yyerror(errmsg.c_str()); } }
+#line 2840 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 123:
+#line 325 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new OperandEquation((yyvsp[0].operandsym)->getIndex()); slgh->selfDefine((yyvsp[0].operandsym)); }
+#line 2846 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 124:
+#line 326 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = new UnconstrainedEquation((yyvsp[0].specsym)->getPatternExpression()); }
+#line 2852 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 125:
+#line 327 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = slgh->defineInvisibleOperand((yyvsp[0].famsym)); }
+#line 2858 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 126:
+#line 328 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.pateq) = slgh->defineInvisibleOperand((yyvsp[0].subtablesym)); }
+#line 2864 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 127:
+#line 330 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.contop) = (vector<ContextChange *> *)0; }
+#line 2870 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 128:
+#line 331 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.contop) = (yyvsp[-1].contop); }
+#line 2876 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 129:
+#line 333 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.contop) = new vector<ContextChange *>; }
+#line 2882 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 130:
+#line 334 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.contop) = (yyvsp[-4].contop); if (!slgh->contextMod((yyvsp[-4].contop),(yyvsp[-3].contextsym),(yyvsp[-1].patexp))) { string errmsg="Cannot use 'inst_next' to set context variable: "+(yyvsp[-3].contextsym)->getName(); yyerror(errmsg.c_str()); YYERROR; } }
+#line 2888 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 131:
+#line 335 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.contop) = (yyvsp[-7].contop); slgh->contextSet((yyvsp[-7].contop),(yyvsp[-4].famsym),(yyvsp[-2].contextsym)); }
+#line 2894 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 132:
+#line 336 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.contop) = (yyvsp[-7].contop); slgh->contextSet((yyvsp[-7].contop),(yyvsp[-4].specsym),(yyvsp[-2].contextsym)); }
+#line 2900 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 133:
+#line 337 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.contop) = (yyvsp[-4].contop); slgh->defineOperand((yyvsp[-3].operandsym),(yyvsp[-1].patexp)); }
+#line 2906 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 134:
+#line 338 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg="Expecting context symbol, not "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+#line 2912 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 135:
+#line 340 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sectionsym) = slgh->newSectionSymbol( *(yyvsp[-1].str) ); delete (yyvsp[-1].str); }
+#line 2918 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 136:
+#line 341 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sectionsym) = (yyvsp[-1].sectionsym); }
+#line 2924 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 137:
+#line 343 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sectionstart) = slgh->firstNamedSection((yyvsp[-1].sem),(yyvsp[0].sectionsym)); }
+#line 2930 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 138:
+#line 345 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sectionstart) = (yyvsp[0].sectionstart); }
+#line 2936 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 139:
+#line 346 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sectionstart) = slgh->nextNamedSection((yyvsp[-2].sectionstart),(yyvsp[-1].sem),(yyvsp[0].sectionsym)); }
+#line 2942 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 140:
+#line 348 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sem) = (yyvsp[0].sem); if ((yyval.sem)->getOpvec().empty() && ((yyval.sem)->getResult() == (HandleTpl *)0)) slgh->recordNop(); }
+#line 2948 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 141:
+#line 349 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sem) = slgh->setResultVarnode((yyvsp[-3].sem),(yyvsp[-1].varnode)); }
+#line 2954 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 142:
+#line 350 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sem) = slgh->setResultStarVarnode((yyvsp[-4].sem),(yyvsp[-2].starqual),(yyvsp[-1].varnode)); }
+#line 2960 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 143:
+#line 351 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg="Unknown export varnode: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+#line 2966 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 144:
+#line 352 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg="Unknown pointer varnode: "+*(yyvsp[0].str); delete (yyvsp[-1].starqual); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+#line 2972 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 145:
+#line 354 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sem) = new ConstructTpl(); }
+#line 2978 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 146:
+#line 355 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sem) = (yyvsp[-1].sem); if (!(yyval.sem)->addOpList(*(yyvsp[0].stmt))) { delete (yyvsp[0].stmt); yyerror("Multiple delayslot declarations"); YYERROR; } delete (yyvsp[0].stmt); }
+#line 2984 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 147:
+#line 356 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sem) = (yyvsp[-3].sem); slgh->pcode.newLocalDefinition((yyvsp[-1].str)); }
+#line 2990 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 148:
+#line 357 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.sem) = (yyvsp[-5].sem); slgh->pcode.newLocalDefinition((yyvsp[-3].str),*(yyvsp[-1].i)); delete (yyvsp[-1].i); }
+#line 2996 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 149:
+#line 359 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyvsp[-1].tree)->setOutput((yyvsp[-3].varnode)); (yyval.stmt) = ExprTree::toVector((yyvsp[-1].tree)); }
+#line 3002 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 150:
+#line 360 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.newOutput(true,(yyvsp[-1].tree),(yyvsp[-3].str)); }
+#line 3008 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 151:
+#line 361 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.newOutput(false,(yyvsp[-1].tree),(yyvsp[-3].str)); }
+#line 3014 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 152:
+#line 362 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.newOutput(true,(yyvsp[-1].tree),(yyvsp[-5].str),*(yyvsp[-3].i)); delete (yyvsp[-3].i); }
+#line 3020 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 153:
+#line 363 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.newOutput(true,(yyvsp[-1].tree),(yyvsp[-5].str),*(yyvsp[-3].i)); delete (yyvsp[-3].i); }
+#line 3026 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 154:
+#line 364 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = (vector<OpTpl *> *)0; string errmsg = "Redefinition of symbol: "+(yyvsp[-1].specsym)->getName(); yyerror(errmsg.c_str()); YYERROR; }
+#line 3032 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 155:
+#line 365 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.createStore((yyvsp[-4].starqual),(yyvsp[-3].tree),(yyvsp[-1].tree)); }
+#line 3038 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 156:
+#line 366 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.createUserOpNoOut((yyvsp[-4].useropsym),(yyvsp[-2].param)); }
+#line 3044 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 157:
+#line 367 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.assignBitRange((yyvsp[-8].varnode),(uint4)*(yyvsp[-6].i),(uint4)*(yyvsp[-4].i),(yyvsp[-1].tree)); delete (yyvsp[-6].i), delete (yyvsp[-4].i); }
+#line 3050 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 158:
+#line 368 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt)=slgh->pcode.assignBitRange((yyvsp[-3].bitsym)->getParentSymbol()->getVarnode(),(yyvsp[-3].bitsym)->getBitOffset(),(yyvsp[-3].bitsym)->numBits(),(yyvsp[-1].tree)); }
+#line 3056 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 159:
+#line 369 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { delete (yyvsp[-3].varnode); delete (yyvsp[-1].i); yyerror("Illegal truncation on left-hand side of assignment"); YYERROR; }
+#line 3062 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 160:
+#line 370 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { delete (yyvsp[-3].varnode); delete (yyvsp[-1].i); yyerror("Illegal subpiece on left-hand side of assignment"); YYERROR; }
+#line 3068 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 161:
+#line 371 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.createOpConst(BUILD,(yyvsp[-1].operandsym)->getIndex()); }
+#line 3074 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 162:
+#line 372 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->createCrossBuild((yyvsp[-3].varnode),(yyvsp[-1].sectionsym)); }
+#line 3080 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 163:
+#line 373 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->createCrossBuild((yyvsp[-3].varnode),slgh->newSectionSymbol(*(yyvsp[-1].str))); delete (yyvsp[-1].str); }
+#line 3086 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 164:
+#line 374 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.createOpConst(DELAY_SLOT,*(yyvsp[-2].i)); delete (yyvsp[-2].i); }
+#line 3092 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 165:
+#line 375 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.createOpNoOut(CPUI_BRANCH,new ExprTree((yyvsp[-1].varnode))); }
+#line 3098 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 166:
+#line 376 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.createOpNoOut(CPUI_CBRANCH,new ExprTree((yyvsp[-1].varnode)),(yyvsp[-3].tree)); }
+#line 3104 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 167:
+#line 377 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.createOpNoOut(CPUI_BRANCHIND,(yyvsp[-2].tree)); }
+#line 3110 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 168:
+#line 378 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.createOpNoOut(CPUI_CALL,new ExprTree((yyvsp[-1].varnode))); }
+#line 3116 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 169:
+#line 379 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.createOpNoOut(CPUI_CALLIND,(yyvsp[-2].tree)); }
+#line 3122 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 170:
+#line 380 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { yyerror("Must specify an indirect parameter for return"); YYERROR; }
+#line 3128 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 171:
+#line 381 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.createOpNoOut(CPUI_RETURN,(yyvsp[-2].tree)); }
+#line 3134 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 172:
+#line 382 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->createMacroUse((yyvsp[-4].macrosym),(yyvsp[-2].param)); }
+#line 3140 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 173:
+#line 383 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.stmt) = slgh->pcode.placeLabel( (yyvsp[0].labelsym) ); }
+#line 3146 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 174:
+#line 385 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = new ExprTree((yyvsp[0].varnode)); }
+#line 3152 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 175:
+#line 386 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createLoad((yyvsp[-1].starqual),(yyvsp[0].tree)); }
+#line 3158 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 176:
+#line 387 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = (yyvsp[-1].tree); }
+#line 3164 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 177:
+#line 388 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_ADD,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3170 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 178:
+#line 389 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SUB,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3176 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 179:
+#line 390 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_EQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3182 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 180:
+#line 391 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_NOTEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3188 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 181:
+#line 392 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_LESS,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3194 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 182:
+#line 393 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_LESSEQUAL,(yyvsp[0].tree),(yyvsp[-2].tree)); }
+#line 3200 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 183:
+#line 394 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_LESSEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3206 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 184:
+#line 395 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_LESS,(yyvsp[0].tree),(yyvsp[-2].tree)); }
+#line 3212 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 185:
+#line 396 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SLESS,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3218 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 186:
+#line 397 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SLESSEQUAL,(yyvsp[0].tree),(yyvsp[-2].tree)); }
+#line 3224 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 187:
+#line 398 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SLESSEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3230 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 188:
+#line 399 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SLESS,(yyvsp[0].tree),(yyvsp[-2].tree)); }
+#line 3236 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 189:
+#line 400 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_2COMP,(yyvsp[0].tree)); }
+#line 3242 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 190:
+#line 401 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_NEGATE,(yyvsp[0].tree)); }
+#line 3248 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 191:
+#line 402 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_XOR,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3254 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 192:
+#line 403 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_AND,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3260 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 193:
+#line 404 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_OR,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3266 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 194:
+#line 405 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_LEFT,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3272 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 195:
+#line 406 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_RIGHT,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3278 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 196:
+#line 407 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SRIGHT,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3284 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 197:
+#line 408 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_MULT,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3290 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 198:
+#line 409 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_DIV,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3296 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 199:
+#line 410 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SDIV,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3302 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 200:
+#line 411 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_REM,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3308 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 201:
+#line 412 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SREM,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3314 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 202:
+#line 413 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_BOOL_NEGATE,(yyvsp[0].tree)); }
+#line 3320 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 203:
+#line 414 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_BOOL_XOR,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3326 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 204:
+#line 415 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_BOOL_AND,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3332 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 205:
+#line 416 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_BOOL_OR,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3338 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 206:
+#line 417 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_EQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3344 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 207:
+#line 418 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_NOTEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3350 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 208:
+#line 419 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_LESS,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3356 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 209:
+#line 420 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_LESS,(yyvsp[0].tree),(yyvsp[-2].tree)); }
+#line 3362 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 210:
+#line 421 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_LESSEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3368 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 211:
+#line 422 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_LESSEQUAL,(yyvsp[0].tree),(yyvsp[-2].tree)); }
+#line 3374 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 212:
+#line 423 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_ADD,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3380 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 213:
+#line 424 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_SUB,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3386 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 214:
+#line 425 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_MULT,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3392 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 215:
+#line 426 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_DIV,(yyvsp[-2].tree),(yyvsp[0].tree)); }
+#line 3398 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 216:
+#line 427 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_NEG,(yyvsp[0].tree)); }
+#line 3404 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 217:
+#line 428 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_ABS,(yyvsp[-1].tree)); }
+#line 3410 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 218:
+#line 429 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_SQRT,(yyvsp[-1].tree)); }
+#line 3416 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 219:
+#line 430 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SEXT,(yyvsp[-1].tree)); }
+#line 3422 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 220:
+#line 431 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_ZEXT,(yyvsp[-1].tree)); }
+#line 3428 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 221:
+#line 432 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_CARRY,(yyvsp[-3].tree),(yyvsp[-1].tree)); }
+#line 3434 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 222:
+#line 433 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SCARRY,(yyvsp[-3].tree),(yyvsp[-1].tree)); }
+#line 3440 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 223:
+#line 434 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SBORROW,(yyvsp[-3].tree),(yyvsp[-1].tree)); }
+#line 3446 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 224:
+#line 435 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_FLOAT2FLOAT,(yyvsp[-1].tree)); }
+#line 3452 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 225:
+#line 436 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_INT2FLOAT,(yyvsp[-1].tree)); }
+#line 3458 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 226:
+#line 437 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_NAN,(yyvsp[-1].tree)); }
+#line 3464 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 227:
+#line 438 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_TRUNC,(yyvsp[-1].tree)); }
+#line 3470 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 228:
+#line 439 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_CEIL,(yyvsp[-1].tree)); }
+#line 3476 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 229:
+#line 440 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_FLOOR,(yyvsp[-1].tree)); }
+#line 3482 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 230:
+#line 441 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_ROUND,(yyvsp[-1].tree)); }
+#line 3488 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 231:
+#line 442 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_NEW,(yyvsp[-1].tree)); }
+#line 3494 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 232:
+#line 443 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_NEW,(yyvsp[-3].tree),(yyvsp[-1].tree)); }
+#line 3500 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 233:
+#line 444 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_POPCOUNT,(yyvsp[-1].tree)); }
+#line 3506 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 234:
+#line 445 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createOp(CPUI_SUBPIECE,new ExprTree((yyvsp[-3].specsym)->getVarnode()),new ExprTree((yyvsp[-1].varnode))); }
+#line 3512 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 235:
+#line 446 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createBitRange((yyvsp[-2].specsym),0,(uint4)(*(yyvsp[0].i) * 8)); delete (yyvsp[0].i); }
+#line 3518 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 236:
+#line 447 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createBitRange((yyvsp[-5].specsym),(uint4)*(yyvsp[-3].i),(uint4)*(yyvsp[-1].i)); delete (yyvsp[-3].i), delete (yyvsp[-1].i); }
+#line 3524 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 237:
+#line 448 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree)=slgh->pcode.createBitRange((yyvsp[0].bitsym)->getParentSymbol(),(yyvsp[0].bitsym)->getBitOffset(),(yyvsp[0].bitsym)->numBits()); }
+#line 3530 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 238:
+#line 449 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.tree) = slgh->pcode.createUserOp((yyvsp[-3].useropsym),(yyvsp[-1].param)); }
+#line 3536 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 239:
+#line 450 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { if ((*(yyvsp[-1].param)).size() < 2) { string errmsg = "Must at least two inputs to cpool"; yyerror(errmsg.c_str()); YYERROR; } (yyval.tree) = slgh->pcode.createVariadic(CPUI_CPOOLREF,(yyvsp[-1].param)); }
+#line 3542 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 240:
+#line 452 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = *(yyvsp[0].i); delete (yyvsp[0].i); (yyval.starqual)->id=ConstTpl((yyvsp[-3].spacesym)->getSpace()); }
+#line 3548 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 241:
+#line 453 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = 0; (yyval.starqual)->id=ConstTpl((yyvsp[-1].spacesym)->getSpace()); }
+#line 3554 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 242:
+#line 454 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = *(yyvsp[0].i); delete (yyvsp[0].i); (yyval.starqual)->id=ConstTpl(slgh->getDefaultCodeSpace()); }
+#line 3560 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 243:
+#line 455 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = 0; (yyval.starqual)->id=ConstTpl(slgh->getDefaultCodeSpace()); }
+#line 3566 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 244:
+#line 457 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { VarnodeTpl *sym = (yyvsp[0].startsym)->getVarnode(); (yyval.varnode) = new VarnodeTpl(ConstTpl(ConstTpl::j_curspace),sym->getOffset(),ConstTpl(ConstTpl::j_curspace_size)); delete sym; }
+#line 3572 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 245:
+#line 458 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { VarnodeTpl *sym = (yyvsp[0].endsym)->getVarnode(); (yyval.varnode) = new VarnodeTpl(ConstTpl(ConstTpl::j_curspace),sym->getOffset(),ConstTpl(ConstTpl::j_curspace_size)); delete sym; }
+#line 3578 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 246:
+#line 459 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(ConstTpl::j_curspace),ConstTpl(ConstTpl::real,*(yyvsp[0].i)),ConstTpl(ConstTpl::j_curspace_size)); delete (yyvsp[0].i); }
+#line 3584 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 247:
+#line 460 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(ConstTpl::j_curspace),ConstTpl(ConstTpl::real,0),ConstTpl(ConstTpl::j_curspace_size)); yyerror("Parsed integer is too big (overflow)"); }
+#line 3590 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 248:
+#line 461 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = (yyvsp[0].operandsym)->getVarnode(); (yyvsp[0].operandsym)->setCodeAddress(); }
+#line 3596 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 249:
+#line 462 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { AddrSpace *spc = (yyvsp[-1].spacesym)->getSpace(); (yyval.varnode) = new VarnodeTpl(ConstTpl(spc),ConstTpl(ConstTpl::real,*(yyvsp[-3].i)),ConstTpl(ConstTpl::real,spc->getAddrSize())); delete (yyvsp[-3].i); }
+#line 3602 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 250:
+#line 463 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(slgh->getConstantSpace()),ConstTpl(ConstTpl::j_relative,(yyvsp[0].labelsym)->getIndex()),ConstTpl(ConstTpl::real,sizeof(uintm))); (yyvsp[0].labelsym)->incrementRefCount(); }
+#line 3608 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 251:
+#line 464 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg = "Unknown jump destination: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+#line 3614 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 252:
+#line 466 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); }
+#line 3620 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 253:
+#line 467 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = (yyvsp[0].varnode); }
+#line 3626 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 254:
+#line 468 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg = "Unknown varnode parameter: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+#line 3632 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 255:
+#line 469 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg = "Subtable not attached to operand: "+(yyvsp[0].subtablesym)->getName(); yyerror(errmsg.c_str()); YYERROR; }
+#line 3638 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 256:
+#line 471 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(slgh->getConstantSpace()),ConstTpl(ConstTpl::real,*(yyvsp[0].i)),ConstTpl(ConstTpl::real,0)); delete (yyvsp[0].i); }
+#line 3644 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 257:
+#line 472 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(slgh->getConstantSpace()),ConstTpl(ConstTpl::real,0),ConstTpl(ConstTpl::real,0)); yyerror("Parsed integer is too big (overflow)"); }
+#line 3650 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 258:
+#line 473 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(slgh->getConstantSpace()),ConstTpl(ConstTpl::real,*(yyvsp[-2].i)),ConstTpl(ConstTpl::real,*(yyvsp[0].i))); delete (yyvsp[-2].i); delete (yyvsp[0].i); }
+#line 3656 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 259:
+#line 474 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = slgh->pcode.addressOf((yyvsp[0].varnode),0); }
+#line 3662 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 260:
+#line 475 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = slgh->pcode.addressOf((yyvsp[0].varnode),*(yyvsp[-1].i)); delete (yyvsp[-1].i); }
+#line 3668 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 261:
+#line 477 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); }
+#line 3674 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 262:
+#line 478 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg = "Unknown assignment varnode: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+#line 3680 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 263:
+#line 479 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg = "Subtable not attached to operand: "+(yyvsp[0].subtablesym)->getName(); yyerror(errmsg.c_str()); YYERROR; }
+#line 3686 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 264:
+#line 481 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.labelsym) = (yyvsp[-1].labelsym); }
+#line 3692 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 265:
+#line 482 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.labelsym) = slgh->pcode.defineLabel( (yyvsp[-1].str) ); }
+#line 3698 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 266:
+#line 484 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); }
+#line 3704 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 267:
+#line 485 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = slgh->pcode.addressOf((yyvsp[0].varnode),0); }
+#line 3710 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 268:
+#line 486 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = slgh->pcode.addressOf((yyvsp[0].varnode),*(yyvsp[-1].i)); delete (yyvsp[-1].i); }
+#line 3716 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 269:
+#line 487 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.varnode) = new VarnodeTpl(ConstTpl(slgh->getConstantSpace()),ConstTpl(ConstTpl::real,*(yyvsp[-2].i)),ConstTpl(ConstTpl::real,*(yyvsp[0].i))); delete (yyvsp[-2].i); delete (yyvsp[0].i); }
+#line 3722 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 270:
+#line 488 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg="Unknown export varnode: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+#line 3728 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 271:
+#line 489 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg = "Subtable not attached to operand: "+(yyvsp[0].subtablesym)->getName(); yyerror(errmsg.c_str()); YYERROR; }
+#line 3734 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 272:
+#line 491 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.famsym) = (yyvsp[0].valuesym); }
+#line 3740 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 273:
+#line 492 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.famsym) = (yyvsp[0].valuemapsym); }
+#line 3746 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 274:
+#line 493 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.famsym) = (yyvsp[0].contextsym); }
+#line 3752 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 275:
+#line 494 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.famsym) = (yyvsp[0].namesym); }
+#line 3758 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 276:
+#line 495 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.famsym) = (yyvsp[0].varlistsym); }
+#line 3764 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 277:
+#line 497 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.specsym) = (yyvsp[0].varsym); }
+#line 3770 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 278:
+#line 498 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.specsym) = (yyvsp[0].specsym); }
+#line 3776 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 279:
+#line 499 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.specsym) = (yyvsp[0].operandsym); }
+#line 3782 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 280:
+#line 500 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.specsym) = (yyvsp[0].startsym); }
+#line 3788 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 281:
+#line 501 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.specsym) = (yyvsp[0].endsym); }
+#line 3794 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 282:
+#line 503 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.str) = new string; (*(yyval.str)) += (yyvsp[0].ch); }
+#line 3800 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 283:
+#line 504 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.str) = (yyvsp[-1].str); (*(yyval.str)) += (yyvsp[0].ch); }
+#line 3806 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 284:
+#line 506 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.biglist) = (yyvsp[-1].biglist); }
+#line 3812 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 285:
+#line 507 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.biglist) = new vector<intb>; (yyval.biglist)->push_back(intb(*(yyvsp[0].i))); delete (yyvsp[0].i); }
+#line 3818 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 286:
+#line 508 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.biglist) = new vector<intb>; (yyval.biglist)->push_back(-intb(*(yyvsp[0].i))); delete (yyvsp[0].i); }
+#line 3824 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 287:
+#line 510 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.biglist) = new vector<intb>; (yyval.biglist)->push_back(intb(*(yyvsp[0].i))); delete (yyvsp[0].i); }
+#line 3830 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 288:
+#line 511 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.biglist) = new vector<intb>; (yyval.biglist)->push_back(-intb(*(yyvsp[0].i))); delete (yyvsp[0].i); }
+#line 3836 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 289:
+#line 512 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { if (*(yyvsp[0].str)!="_") { string errmsg = "Expecting integer but saw: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+ (yyval.biglist) = new vector<intb>; (yyval.biglist)->push_back((intb)0xBADBEEF); delete (yyvsp[0].str); }
+#line 3843 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 290:
+#line 514 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.biglist) = (yyvsp[-1].biglist); (yyval.biglist)->push_back(intb(*(yyvsp[0].i))); delete (yyvsp[0].i); }
+#line 3849 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 291:
+#line 515 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.biglist) = (yyvsp[-2].biglist); (yyval.biglist)->push_back(-intb(*(yyvsp[0].i))); delete (yyvsp[0].i); }
+#line 3855 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 292:
+#line 516 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { if (*(yyvsp[0].str)!="_") { string errmsg = "Expecting integer but saw: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+ (yyval.biglist) = (yyvsp[-1].biglist); (yyval.biglist)->push_back((intb)0xBADBEEF); delete (yyvsp[0].str); }
+#line 3862 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 293:
+#line 519 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.strlist) = (yyvsp[-1].strlist); }
+#line 3868 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 294:
+#line 520 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.strlist) = new vector<string>; (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 3874 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 295:
+#line 522 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.strlist) = new vector<string>; (yyval.strlist)->push_back( *(yyvsp[0].str) ); delete (yyvsp[0].str); }
+#line 3880 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 296:
+#line 523 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.strlist) = (yyvsp[-1].strlist); (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 3886 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 297:
+#line 524 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg = (yyvsp[0].anysym)->getName()+": redefined"; yyerror(errmsg.c_str()); YYERROR; }
+#line 3892 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 298:
+#line 526 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.strlist) = (yyvsp[-1].strlist); }
+#line 3898 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 299:
+#line 528 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.strlist) = new vector<string>; (yyval.strlist)->push_back( *(yyvsp[0].str) ); delete (yyvsp[0].str); }
+#line 3904 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 300:
+#line 529 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.strlist) = new vector<string>; (yyval.strlist)->push_back( (yyvsp[0].anysym)->getName() ); }
+#line 3910 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 301:
+#line 530 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.strlist) = (yyvsp[-1].strlist); (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 3916 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 302:
+#line 531 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.strlist) = (yyvsp[-1].strlist); (yyval.strlist)->push_back((yyvsp[0].anysym)->getName()); }
+#line 3922 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 303:
+#line 533 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.symlist) = (yyvsp[-1].symlist); }
+#line 3928 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 304:
+#line 534 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.symlist) = new vector<SleighSymbol *>; (yyval.symlist)->push_back((yyvsp[0].valuesym)); }
+#line 3934 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 305:
+#line 535 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.symlist) = new vector<SleighSymbol *>; (yyval.symlist)->push_back((yyvsp[0].contextsym)); }
+#line 3940 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 306:
+#line 537 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.symlist) = new vector<SleighSymbol *>; (yyval.symlist)->push_back( (yyvsp[0].valuesym) ); }
+#line 3946 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 307:
+#line 538 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.symlist) = new vector<SleighSymbol *>; (yyval.symlist)->push_back((yyvsp[0].contextsym)); }
+#line 3952 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 308:
+#line 539 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.symlist) = (yyvsp[-1].symlist); (yyval.symlist)->push_back((yyvsp[0].valuesym)); }
+#line 3958 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 309:
+#line 540 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.symlist) = (yyvsp[-1].symlist); (yyval.symlist)->push_back((yyvsp[0].contextsym)); }
+#line 3964 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 310:
+#line 541 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { string errmsg = *(yyvsp[0].str)+": is not a value pattern"; delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+#line 3970 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 311:
+#line 543 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.symlist) = (yyvsp[-1].symlist); }
+#line 3976 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 312:
+#line 544 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.symlist) = new vector<SleighSymbol *>; (yyval.symlist)->push_back((yyvsp[0].varsym)); }
+#line 3982 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 313:
+#line 546 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.symlist) = new vector<SleighSymbol *>; (yyval.symlist)->push_back((yyvsp[0].varsym)); }
+#line 3988 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 314:
+#line 547 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { if (*(yyvsp[0].str)!="_") { string errmsg = *(yyvsp[0].str)+": is not a varnode symbol"; delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+ (yyval.symlist) = new vector<SleighSymbol *>; (yyval.symlist)->push_back((SleighSymbol *)0); delete (yyvsp[0].str); }
+#line 3995 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 315:
+#line 549 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.symlist) = (yyvsp[-1].symlist); (yyval.symlist)->push_back((yyvsp[0].varsym)); }
+#line 4001 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 316:
+#line 550 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { if (*(yyvsp[0].str)!="_") { string errmsg = *(yyvsp[0].str)+": is not a varnode symbol"; delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; }
+ (yyval.symlist) = (yyvsp[-1].symlist); (yyval.symlist)->push_back((SleighSymbol *)0); delete (yyvsp[0].str); }
+#line 4008 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 317:
+#line 553 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.param) = new vector<ExprTree *>; }
+#line 4014 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 318:
+#line 554 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.param) = new vector<ExprTree *>; (yyval.param)->push_back((yyvsp[0].tree)); }
+#line 4020 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 319:
+#line 555 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.param) = (yyvsp[-2].param); (yyval.param)->push_back((yyvsp[0].tree)); }
+#line 4026 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 320:
+#line 557 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.strlist) = new vector<string>; }
+#line 4032 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 321:
+#line 558 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.strlist) = new vector<string>; (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 4038 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 322:
+#line 559 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.strlist) = (yyvsp[-2].strlist); (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 4044 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 323:
+#line 561 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].spacesym); }
+#line 4050 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 324:
+#line 562 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].sectionsym); }
+#line 4056 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 325:
+#line 563 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].tokensym); }
+#line 4062 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 326:
+#line 564 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].useropsym); }
+#line 4068 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 327:
+#line 565 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].macrosym); }
+#line 4074 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 328:
+#line 566 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].subtablesym); }
+#line 4080 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 329:
+#line 567 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].valuesym); }
+#line 4086 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 330:
+#line 568 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].valuemapsym); }
+#line 4092 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 331:
+#line 569 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].contextsym); }
+#line 4098 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 332:
+#line 570 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].namesym); }
+#line 4104 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 333:
+#line 571 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].varsym); }
+#line 4110 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 334:
+#line 572 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].varlistsym); }
+#line 4116 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 335:
+#line 573 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].operandsym); }
+#line 4122 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 336:
+#line 574 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].startsym); }
+#line 4128 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 337:
+#line 575 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].endsym); }
+#line 4134 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+ case 338:
+#line 576 "src/decompile/cpp/slghparse.y" /* yacc.c:1646 */
+ { (yyval.anysym) = (yyvsp[0].bitsym); }
+#line 4140 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ break;
+
+
+#line 4144 "src/decompile/cpp/slghparse.cc" /* yacc.c:1646 */
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+ /* 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 - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ return yyresult;
+}
+#line 578 "src/decompile/cpp/slghparse.y" /* yacc.c:1906 */
+
+
+int yyerror(const char *s)
+
+{
+ slgh->reportError(s);
+ return 0;
+}
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.hh b/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.hh
new file mode 100644
index 0000000000..1df3ac4533
--- /dev/null
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.hh
@@ -0,0 +1,239 @@
+/* ###
+ * IP: GHIDRA
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* A Bison parser, made by GNU Bison 3.0.4. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+#ifndef YY_YY_SRC_DECOMPILE_CPP_SLGHPARSE_HH_INCLUDED
+# define YY_YY_SRC_DECOMPILE_CPP_SLGHPARSE_HH_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int yydebug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ OP_BOOL_OR = 258,
+ OP_BOOL_AND = 259,
+ OP_BOOL_XOR = 260,
+ OP_OR = 261,
+ OP_XOR = 262,
+ OP_AND = 263,
+ OP_EQUAL = 264,
+ OP_NOTEQUAL = 265,
+ OP_FEQUAL = 266,
+ OP_FNOTEQUAL = 267,
+ OP_GREATEQUAL = 268,
+ OP_LESSEQUAL = 269,
+ OP_SLESS = 270,
+ OP_SGREATEQUAL = 271,
+ OP_SLESSEQUAL = 272,
+ OP_SGREAT = 273,
+ OP_FLESS = 274,
+ OP_FGREAT = 275,
+ OP_FLESSEQUAL = 276,
+ OP_FGREATEQUAL = 277,
+ OP_LEFT = 278,
+ OP_RIGHT = 279,
+ OP_SRIGHT = 280,
+ OP_FADD = 281,
+ OP_FSUB = 282,
+ OP_SDIV = 283,
+ OP_SREM = 284,
+ OP_FMULT = 285,
+ OP_FDIV = 286,
+ OP_ZEXT = 287,
+ OP_CARRY = 288,
+ OP_BORROW = 289,
+ OP_SEXT = 290,
+ OP_SCARRY = 291,
+ OP_SBORROW = 292,
+ OP_NAN = 293,
+ OP_ABS = 294,
+ OP_SQRT = 295,
+ OP_CEIL = 296,
+ OP_FLOOR = 297,
+ OP_ROUND = 298,
+ OP_INT2FLOAT = 299,
+ OP_FLOAT2FLOAT = 300,
+ OP_TRUNC = 301,
+ OP_CPOOLREF = 302,
+ OP_NEW = 303,
+ OP_POPCOUNT = 304,
+ BADINTEGER = 305,
+ GOTO_KEY = 306,
+ CALL_KEY = 307,
+ RETURN_KEY = 308,
+ IF_KEY = 309,
+ DEFINE_KEY = 310,
+ ATTACH_KEY = 311,
+ MACRO_KEY = 312,
+ SPACE_KEY = 313,
+ TYPE_KEY = 314,
+ RAM_KEY = 315,
+ DEFAULT_KEY = 316,
+ REGISTER_KEY = 317,
+ ENDIAN_KEY = 318,
+ WITH_KEY = 319,
+ ALIGN_KEY = 320,
+ OP_UNIMPL = 321,
+ TOKEN_KEY = 322,
+ SIGNED_KEY = 323,
+ NOFLOW_KEY = 324,
+ HEX_KEY = 325,
+ DEC_KEY = 326,
+ BIG_KEY = 327,
+ LITTLE_KEY = 328,
+ SIZE_KEY = 329,
+ WORDSIZE_KEY = 330,
+ OFFSET_KEY = 331,
+ NAMES_KEY = 332,
+ VALUES_KEY = 333,
+ VARIABLES_KEY = 334,
+ PCODEOP_KEY = 335,
+ IS_KEY = 336,
+ LOCAL_KEY = 337,
+ DELAYSLOT_KEY = 338,
+ CROSSBUILD_KEY = 339,
+ EXPORT_KEY = 340,
+ BUILD_KEY = 341,
+ CONTEXT_KEY = 342,
+ ELLIPSIS_KEY = 343,
+ GLOBALSET_KEY = 344,
+ BITRANGE_KEY = 345,
+ CHAR = 346,
+ INTEGER = 347,
+ INTB = 348,
+ STRING = 349,
+ SYMBOLSTRING = 350,
+ SPACESYM = 351,
+ SECTIONSYM = 352,
+ TOKENSYM = 353,
+ USEROPSYM = 354,
+ VALUESYM = 355,
+ VALUEMAPSYM = 356,
+ CONTEXTSYM = 357,
+ NAMESYM = 358,
+ VARSYM = 359,
+ BITSYM = 360,
+ SPECSYM = 361,
+ VARLISTSYM = 362,
+ OPERANDSYM = 363,
+ STARTSYM = 364,
+ ENDSYM = 365,
+ MACROSYM = 366,
+ LABELSYM = 367,
+ SUBTABLESYM = 368
+ };
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
+union YYSTYPE
+{
+#line 29 "src/decompile/cpp/slghparse.y" /* yacc.c:1909 */
+
+ char ch;
+ uintb *i;
+ intb *big;
+ string *str;
+ vector<string> *strlist;
+ vector<intb> *biglist;
+ vector<ExprTree *> *param;
+ SpaceQuality *spacequal;
+ FieldQuality *fieldqual;
+ StarQuality *starqual;
+ VarnodeTpl *varnode;
+ ExprTree *tree;
+ vector<OpTpl *> *stmt;
+ ConstructTpl *sem;
+ SectionVector *sectionstart;
+ Constructor *construct;
+ PatternEquation *pateq;
+ PatternExpression *patexp;
+
+ vector<SleighSymbol *> *symlist;
+ vector<ContextChange *> *contop;
+ SleighSymbol *anysym;
+ SpaceSymbol *spacesym;
+ SectionSymbol *sectionsym;
+ TokenSymbol *tokensym;
+ UserOpSymbol *useropsym;
+ MacroSymbol *macrosym;
+ LabelSymbol *labelsym;
+ SubtableSymbol *subtablesym;
+ StartSymbol *startsym;
+ EndSymbol *endsym;
+ OperandSymbol *operandsym;
+ VarnodeListSymbol *varlistsym;
+ VarnodeSymbol *varsym;
+ BitrangeSymbol *bitsym;
+ NameSymbol *namesym;
+ ValueSymbol *valuesym;
+ ValueMapSymbol *valuemapsym;
+ ContextSymbol *contextsym;
+ FamilySymbol *famsym;
+ SpecificSymbol *specsym;
+
+#line 212 "src/decompile/cpp/slghparse.hh" /* yacc.c:1909 */
+};
+
+typedef union YYSTYPE YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern YYSTYPE yylval;
+
+int yyparse (void);
+
+#endif /* !YY_YY_SRC_DECOMPILE_CPP_SLGHPARSE_HH_INCLUDED */
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.cc
new file mode 100644
index 0000000000..ff5a40f614
--- /dev/null
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.cc
@@ -0,0 +1,3477 @@
+/* ###
+ * IP: GHIDRA
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#line 2 "src/decompile/cpp/slghscan.cc"
+
+#line 4 "src/decompile/cpp/slghscan.cc"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 37
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#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. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t yyleng;
+
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ #define YY_LESS_LINENO(n)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
+ YY_RESTORE_YY_MORE_OFFSET \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, (yytext_ptr) )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+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.
+ */
+ yy_size_t 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;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* 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
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+
+/* 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".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
+yy_size_t yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 0; /* 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 (FILE *input_file );
+void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
+void yy_delete_buffer (YY_BUFFER_STATE b );
+void yy_flush_buffer (YY_BUFFER_STATE b );
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state (void );
+
+static void yyensure_buffer_stack (void );
+static void yy_load_buffer_state (void );
+static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+
+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
+
+void *yyalloc (yy_size_t );
+void *yyrealloc (void *,yy_size_t );
+void yyfree (void * );
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){\
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+typedef unsigned char YY_CHAR;
+
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+
+typedef int yy_state_type;
+
+extern int yylineno;
+
+int yylineno = 1;
+
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (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 = (size_t) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
+ *yy_cp = '\0'; \
+ (yy_c_buf_p) = yy_cp;
+
+#define YY_NUM_RULES 164
+#define YY_END_OF_BUFFER 165
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static yyconst flex_int16_t yy_accept[527] =
+ { 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 165, 14, 7, 8, 6, 14,
+ 3, 13, 4, 13, 13, 13, 13, 5, 1, 58,
+ 56, 57, 58, 50, 58, 25, 51, 52, 52, 26,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 23, 22, 20, 21, 22,
+ 17, 19, 18, 15, 68, 66, 67, 61, 68, 61,
+ 64, 62, 64, 59, 96, 94, 95, 96, 89, 96,
+ 85, 88, 90, 91, 91, 88, 88, 90, 83, 84,
+ 87, 90, 90, 71, 86, 69, 161, 159, 160, 153,
+
+ 154, 161, 153, 153, 155, 156, 156, 153, 153, 153,
+ 153, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 153, 99, 97, 164,
+ 164, 163, 162, 7, 6, 0, 13, 13, 13, 13,
+ 13, 1, 1, 56, 0, 55, 50, 0, 51, 0,
+ 0, 52, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 23, 23, 20, 0, 19, 15, 15, 66, 0,
+ 65, 0, 64, 63, 59, 59, 94, 76, 89, 0,
+ 0, 0, 0, 90, 90, 0, 0, 91, 75, 77,
+
+ 78, 74, 90, 90, 69, 69, 159, 106, 154, 0,
+ 101, 155, 0, 0, 156, 104, 107, 105, 108, 103,
+ 102, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 0, 118, 116, 117, 119, 122, 0, 123, 155, 155,
+ 144, 155, 155, 155, 155, 155, 155, 155, 110, 109,
+ 112, 113, 155, 155, 155, 155, 155, 155, 100, 97,
+ 97, 0, 163, 162, 162, 0, 13, 13, 13, 13,
+ 0, 54, 53, 51, 41, 51, 51, 38, 51, 51,
+ 37, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 0, 0, 0, 0,
+
+ 80, 0, 82, 93, 92, 90, 90, 0, 158, 157,
+ 133, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 121, 124, 120, 125, 155, 155, 155, 155, 132, 155,
+ 155, 155, 155, 114, 115, 111, 155, 155, 155, 155,
+ 155, 155, 2, 0, 13, 13, 13, 12, 24, 0,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 43, 51, 51, 28, 51, 51, 51,
+ 16, 0, 60, 0, 70, 0, 79, 81, 90, 90,
+ 98, 0, 155, 155, 146, 155, 135, 155, 155, 155,
+ 155, 155, 155, 145, 155, 155, 155, 155, 155, 155,
+
+ 155, 155, 129, 134, 155, 126, 13, 13, 9, 51,
+ 51, 51, 51, 51, 51, 46, 51, 51, 51, 51,
+ 51, 51, 27, 32, 51, 51, 51, 90, 90, 155,
+ 151, 127, 141, 155, 155, 155, 155, 136, 155, 152,
+ 155, 155, 155, 137, 155, 155, 140, 11, 10, 51,
+ 51, 51, 51, 39, 42, 36, 45, 51, 51, 51,
+ 35, 47, 51, 51, 90, 72, 128, 155, 155, 150,
+ 155, 155, 155, 155, 147, 155, 130, 51, 51, 33,
+ 30, 49, 51, 51, 51, 51, 90, 155, 155, 155,
+ 155, 155, 155, 131, 51, 34, 51, 51, 51, 44,
+
+ 90, 155, 155, 155, 155, 155, 143, 40, 29, 51,
+ 48, 73, 155, 148, 155, 138, 142, 51, 149, 155,
+ 51, 139, 51, 51, 31, 0
+ } ;
+
+static yyconst flex_int32_t yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 2, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 4, 5, 6, 7, 8, 9, 1, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 21, 21, 21, 21, 21, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 29, 29, 29, 29, 29,
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ 31, 1, 32, 33, 34, 1, 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, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 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 flex_int32_t yy_meta[65] =
+ { 0,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 3, 1, 1, 1, 1, 4, 1, 5, 5, 5,
+ 5, 1, 1, 1, 1, 1, 1, 1, 5, 4,
+ 1, 1, 1, 4, 5, 5, 5, 5, 5, 5,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 1, 1, 1, 1
+ } ;
+
+static yyconst flex_int16_t yy_base[564] =
+ { 0,
+ 0, 897, 64, 896, 128, 895, 192, 894, 256, 893,
+ 320, 892, 0, 382, 919, 926, 916, 926, 0, 907,
+ 926, 0, 926, 862, 876, 879, 870, 926, 909, 926,
+ 909, 926, 905, 0, 899, 926, 0, 350, 369, 926,
+ 862, 864, 857, 866, 856, 864, 859, 356, 861, 863,
+ 357, 350, 345, 864, 849, 894, 926, 894, 926, 885,
+ 926, 0, 926, 891, 926, 891, 926, 926, 887, 881,
+ 0, 926, 837, 886, 926, 886, 926, 862, 0, 385,
+ 926, 926, 870, 361, 393, 374, 376, 0, 926, 926,
+ 926, 839, 836, 926, 926, 880, 926, 880, 926, 856,
+
+ 0, 870, 926, 870, 0, 367, 397, 382, 853, 396,
+ 844, 840, 374, 389, 836, 816, 423, 824, 397, 823,
+ 391, 822, 393, 436, 818, 830, 806, 926, 864, 926,
+ 863, 926, 862, 862, 0, 0, 0, 809, 822, 824,
+ 806, 856, 926, 856, 852, 851, 0, 0, 0, 432,
+ 0, 436, 812, 392, 806, 421, 815, 794, 797, 803,
+ 809, 808, 798, 799, 804, 411, 809, 798, 792, 413,
+ 789, 837, 926, 837, 0, 0, 835, 926, 835, 831,
+ 830, 0, 0, 0, 831, 926, 831, 926, 0, 0,
+ 784, 779, 781, 813, 0, 445, 0, 458, 926, 926,
+
+ 926, 926, 779, 784, 823, 926, 823, 926, 0, 0,
+ 926, 0, 448, 0, 462, 926, 926, 926, 926, 926,
+ 926, 771, 771, 779, 422, 778, 771, 770, 772, 767,
+ 791, 926, 926, 926, 926, 790, 789, 788, 763, 757,
+ 0, 756, 772, 760, 750, 756, 751, 749, 926, 926,
+ 778, 459, 753, 766, 742, 747, 743, 739, 926, 793,
+ 926, 792, 926, 791, 926, 782, 757, 748, 738, 747,
+ 777, 470, 0, 746, 0, 734, 731, 0, 749, 740,
+ 0, 728, 742, 734, 726, 740, 743, 733, 727, 735,
+ 736, 733, 732, 715, 726, 730, 756, 755, 754, 726,
+
+ 926, 711, 0, 472, 0, 726, 714, 749, 474, 0,
+ 0, 707, 712, 711, 704, 709, 705, 700, 717, 702,
+ 926, 926, 926, 926, 451, 701, 729, 713, 0, 698,
+ 709, 690, 696, 926, 926, 926, 691, 690, 687, 686,
+ 691, 684, 926, 726, 699, 687, 685, 0, 926, 722,
+ 684, 696, 691, 674, 693, 681, 673, 676, 685, 684,
+ 669, 668, 681, 0, 680, 670, 0, 678, 681, 662,
+ 926, 703, 926, 702, 926, 701, 926, 926, 676, 660,
+ 926, 698, 659, 669, 0, 647, 0, 659, 651, 644,
+ 650, 647, 648, 0, 659, 652, 661, 647, 643, 656,
+
+ 641, 640, 0, 0, 654, 0, 648, 650, 0, 641,
+ 639, 628, 639, 636, 644, 0, 625, 627, 631, 629,
+ 624, 639, 0, 0, 623, 639, 631, 627, 626, 614,
+ 0, 0, 0, 634, 616, 614, 647, 0, 620, 0,
+ 621, 609, 615, 0, 613, 602, 0, 0, 0, 621,
+ 618, 604, 603, 0, 0, 0, 0, 606, 620, 615,
+ 0, 0, 607, 592, 598, 0, 0, 595, 603, 0,
+ 608, 598, 607, 597, 0, 587, 0, 595, 603, 0,
+ 0, 0, 604, 588, 600, 599, 598, 593, 586, 588,
+ 598, 595, 577, 0, 576, 0, 590, 594, 574, 0,
+
+ 572, 579, 570, 574, 518, 506, 0, 0, 0, 476,
+ 0, 0, 474, 0, 464, 0, 0, 448, 0, 443,
+ 461, 0, 458, 455, 0, 926, 500, 505, 510, 512,
+ 517, 522, 527, 529, 534, 536, 541, 546, 548, 553,
+ 558, 560, 565, 570, 572, 577, 582, 587, 589, 591,
+ 465, 593, 595, 597, 426, 599, 404, 602, 605, 608,
+ 611, 614, 617
+ } ;
+
+static yyconst flex_int16_t yy_def[564] =
+ { 0,
+ 526, 1, 526, 3, 526, 5, 526, 7, 526, 9,
+ 526, 11, 527, 528, 526, 526, 526, 526, 529, 526,
+ 526, 530, 526, 530, 530, 530, 530, 526, 531, 526,
+ 526, 526, 532, 533, 526, 526, 534, 526, 526, 526,
+ 534, 534, 534, 534, 534, 534, 534, 534, 534, 534,
+ 534, 534, 534, 534, 534, 535, 526, 526, 526, 526,
+ 526, 536, 526, 537, 526, 526, 526, 526, 538, 526,
+ 539, 526, 539, 540, 526, 526, 526, 526, 541, 526,
+ 526, 526, 542, 526, 526, 526, 526, 542, 526, 526,
+ 526, 542, 542, 526, 526, 543, 526, 526, 526, 526,
+
+ 544, 526, 526, 526, 545, 526, 526, 526, 526, 526,
+ 526, 545, 545, 545, 545, 545, 545, 545, 545, 545,
+ 545, 545, 545, 545, 545, 545, 526, 526, 546, 526,
+ 547, 526, 548, 526, 529, 549, 530, 530, 530, 530,
+ 530, 531, 526, 526, 532, 526, 533, 550, 534, 526,
+ 551, 526, 534, 534, 534, 534, 534, 534, 534, 534,
+ 534, 534, 534, 534, 534, 534, 534, 534, 534, 534,
+ 534, 535, 526, 526, 552, 536, 537, 526, 526, 538,
+ 526, 553, 539, 539, 540, 526, 526, 526, 541, 554,
+ 526, 526, 526, 542, 542, 526, 555, 526, 526, 526,
+
+ 526, 526, 542, 542, 543, 526, 526, 526, 544, 556,
+ 526, 545, 526, 557, 526, 526, 526, 526, 526, 526,
+ 526, 545, 545, 545, 545, 545, 545, 545, 545, 545,
+ 526, 526, 526, 526, 526, 526, 526, 526, 545, 545,
+ 545, 545, 545, 545, 545, 545, 545, 545, 526, 526,
+ 526, 526, 545, 545, 545, 545, 545, 545, 526, 546,
+ 526, 547, 526, 548, 526, 558, 530, 530, 530, 530,
+ 559, 526, 551, 534, 534, 534, 534, 534, 534, 534,
+ 534, 534, 534, 534, 534, 534, 534, 534, 534, 534,
+ 534, 534, 534, 534, 534, 534, 560, 561, 562, 526,
+
+ 526, 526, 542, 526, 555, 542, 542, 563, 526, 557,
+ 545, 545, 545, 545, 545, 545, 545, 545, 545, 545,
+ 526, 526, 526, 526, 545, 545, 545, 545, 545, 545,
+ 545, 545, 545, 526, 526, 526, 545, 545, 545, 545,
+ 545, 545, 526, 558, 530, 530, 530, 530, 526, 559,
+ 534, 534, 534, 534, 534, 534, 534, 534, 534, 534,
+ 534, 534, 534, 534, 534, 534, 534, 534, 534, 534,
+ 526, 560, 526, 561, 526, 562, 526, 526, 542, 542,
+ 526, 563, 545, 545, 545, 545, 545, 545, 545, 545,
+ 545, 545, 545, 545, 545, 545, 545, 545, 545, 545,
+
+ 545, 545, 545, 545, 545, 545, 530, 530, 530, 534,
+ 534, 534, 534, 534, 534, 534, 534, 534, 534, 534,
+ 534, 534, 534, 534, 534, 534, 534, 542, 542, 545,
+ 545, 545, 545, 545, 545, 545, 545, 545, 545, 545,
+ 545, 545, 545, 545, 545, 545, 545, 530, 530, 534,
+ 534, 534, 534, 534, 534, 534, 534, 534, 534, 534,
+ 534, 534, 534, 534, 542, 542, 545, 545, 545, 545,
+ 545, 545, 545, 545, 545, 545, 545, 534, 534, 534,
+ 534, 534, 534, 534, 534, 534, 542, 545, 545, 545,
+ 545, 545, 545, 545, 534, 534, 534, 534, 534, 534,
+
+ 542, 545, 545, 545, 545, 545, 545, 534, 534, 534,
+ 534, 542, 545, 545, 545, 545, 545, 534, 545, 545,
+ 534, 545, 534, 534, 534, 0, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526
+ } ;
+
+static yyconst flex_int16_t yy_nxt[991] =
+ { 0,
+ 16, 17, 18, 16, 16, 19, 20, 16, 16, 21,
+ 21, 16, 16, 21, 21, 22, 16, 16, 16, 16,
+ 16, 23, 16, 16, 16, 16, 16, 16, 22, 22,
+ 16, 16, 16, 22, 24, 22, 22, 25, 22, 22,
+ 22, 22, 22, 22, 22, 22, 26, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 27, 22, 22, 22,
+ 28, 16, 16, 16, 30, 31, 32, 30, 33, 34,
+ 35, 30, 30, 36, 36, 30, 30, 36, 30, 37,
+ 30, 38, 39, 39, 39, 36, 40, 30, 36, 30,
+ 30, 30, 37, 37, 36, 36, 30, 37, 41, 42,
+
+ 43, 44, 45, 37, 37, 46, 37, 37, 37, 47,
+ 37, 48, 49, 50, 37, 51, 52, 53, 37, 54,
+ 55, 37, 37, 37, 30, 30, 30, 30, 57, 58,
+ 59, 57, 57, 57, 60, 57, 57, 61, 61, 57,
+ 57, 61, 57, 62, 57, 57, 57, 57, 57, 57,
+ 57, 57, 57, 57, 57, 57, 62, 62, 57, 57,
+ 57, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62, 63, 57,
+ 57, 57, 65, 66, 67, 68, 69, 68, 70, 68,
+
+ 68, 68, 68, 68, 68, 68, 68, 71, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
+ 71, 71, 68, 68, 72, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 73, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 68, 68, 68, 68, 75, 76, 77, 78,
+ 75, 79, 80, 75, 81, 82, 82, 82, 82, 82,
+ 82, 83, 82, 84, 85, 85, 85, 82, 82, 86,
+ 82, 87, 75, 75, 88, 88, 89, 90, 91, 88,
+ 88, 88, 88, 88, 88, 88, 92, 88, 88, 88,
+
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 93, 88, 88, 88, 88, 88, 94, 95, 75, 82,
+ 97, 98, 99, 100, 97, 101, 102, 103, 104, 103,
+ 103, 103, 103, 103, 103, 105, 103, 106, 107, 107,
+ 107, 103, 103, 108, 109, 110, 97, 97, 105, 105,
+ 103, 103, 111, 105, 112, 113, 114, 115, 116, 117,
+ 118, 105, 119, 105, 105, 120, 105, 121, 105, 122,
+ 105, 123, 124, 125, 105, 105, 105, 105, 105, 126,
+ 97, 127, 128, 103, 132, 150, 152, 152, 152, 152,
+ 160, 164, 166, 168, 190, 165, 196, 199, 200, 167,
+
+ 201, 202, 213, 169, 161, 216, 217, 151, 310, 133,
+ 198, 198, 198, 198, 215, 215, 215, 215, 197, 191,
+ 219, 220, 223, 225, 214, 244, 231, 226, 224, 245,
+ 305, 247, 275, 192, 232, 233, 241, 234, 227, 235,
+ 228, 248, 193, 249, 242, 276, 236, 237, 238, 272,
+ 272, 289, 250, 152, 152, 152, 152, 278, 294, 251,
+ 279, 252, 304, 304, 295, 309, 309, 314, 239, 273,
+ 290, 253, 254, 315, 255, 198, 198, 198, 198, 215,
+ 215, 215, 215, 335, 336, 392, 256, 272, 272, 304,
+ 304, 309, 309, 525, 524, 523, 522, 521, 520, 393,
+
+ 130, 130, 130, 130, 130, 131, 131, 131, 131, 131,
+ 135, 519, 135, 135, 135, 137, 137, 142, 142, 142,
+ 142, 142, 145, 145, 145, 145, 145, 147, 518, 147,
+ 147, 147, 149, 149, 172, 172, 172, 172, 172, 176,
+ 176, 177, 177, 177, 177, 177, 180, 180, 180, 180,
+ 180, 183, 183, 185, 185, 185, 185, 185, 189, 517,
+ 189, 189, 189, 195, 195, 205, 205, 205, 205, 205,
+ 209, 516, 209, 209, 209, 212, 212, 260, 260, 260,
+ 260, 260, 262, 262, 262, 262, 262, 264, 264, 264,
+ 264, 264, 266, 266, 271, 271, 297, 297, 298, 298,
+
+ 299, 299, 308, 308, 344, 344, 344, 350, 350, 350,
+ 372, 372, 372, 374, 374, 374, 376, 376, 376, 382,
+ 382, 382, 515, 514, 513, 512, 511, 510, 509, 508,
+ 507, 506, 505, 504, 503, 502, 501, 500, 499, 498,
+ 497, 496, 495, 494, 493, 492, 491, 490, 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, 381, 429,
+ 428, 375, 373, 371, 427, 426, 425, 424, 423, 422,
+ 421, 420, 419, 418, 417, 416, 415, 414, 413, 412,
+ 411, 410, 349, 409, 408, 407, 343, 406, 405, 404,
+ 403, 402, 401, 400, 399, 398, 397, 396, 395, 394,
+ 391, 390, 389, 388, 387, 386, 385, 384, 383, 381,
+ 380, 379, 378, 377, 375, 373, 371, 370, 369, 368,
+ 367, 366, 365, 364, 363, 362, 361, 360, 359, 358,
+ 357, 356, 355, 354, 353, 352, 351, 349, 348, 347,
+ 346, 345, 343, 265, 263, 261, 342, 341, 340, 339,
+
+ 338, 337, 334, 333, 332, 331, 330, 329, 328, 327,
+ 326, 325, 324, 323, 322, 321, 320, 319, 318, 317,
+ 316, 313, 312, 311, 207, 206, 307, 306, 303, 302,
+ 301, 300, 187, 186, 180, 181, 179, 178, 174, 173,
+ 296, 293, 292, 291, 288, 287, 286, 285, 284, 283,
+ 282, 281, 280, 277, 274, 145, 146, 144, 143, 270,
+ 269, 268, 267, 134, 265, 263, 261, 259, 258, 257,
+ 246, 243, 240, 230, 229, 222, 221, 218, 211, 210,
+ 208, 207, 206, 204, 203, 194, 188, 187, 186, 184,
+ 182, 181, 179, 178, 175, 174, 173, 171, 170, 163,
+
+ 162, 159, 158, 157, 156, 155, 154, 153, 148, 146,
+ 144, 143, 141, 140, 139, 138, 136, 134, 526, 129,
+ 96, 74, 64, 56, 29, 15, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526
+ } ;
+
+static yyconst flex_int16_t yy_chk[991] =
+ { 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, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 7, 7, 7, 7, 7, 7, 7, 7,
+
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 14, 38, 39, 39, 39, 39,
+ 48, 51, 52, 53, 80, 51, 84, 86, 86, 52,
+
+ 87, 87, 106, 53, 48, 108, 108, 38, 557, 14,
+ 85, 85, 85, 85, 107, 107, 107, 107, 84, 80,
+ 110, 110, 113, 114, 106, 121, 117, 114, 113, 121,
+ 555, 123, 154, 80, 117, 117, 119, 117, 114, 117,
+ 114, 123, 80, 124, 119, 154, 117, 117, 117, 150,
+ 150, 166, 124, 152, 152, 152, 152, 156, 170, 124,
+ 156, 124, 196, 196, 170, 213, 213, 225, 117, 551,
+ 166, 124, 124, 225, 124, 198, 198, 198, 198, 215,
+ 215, 215, 215, 252, 252, 325, 124, 272, 272, 304,
+ 304, 309, 309, 524, 523, 521, 520, 518, 515, 325,
+
+ 527, 527, 527, 527, 527, 528, 528, 528, 528, 528,
+ 529, 513, 529, 529, 529, 530, 530, 531, 531, 531,
+ 531, 531, 532, 532, 532, 532, 532, 533, 510, 533,
+ 533, 533, 534, 534, 535, 535, 535, 535, 535, 536,
+ 536, 537, 537, 537, 537, 537, 538, 538, 538, 538,
+ 538, 539, 539, 540, 540, 540, 540, 540, 541, 506,
+ 541, 541, 541, 542, 542, 543, 543, 543, 543, 543,
+ 544, 505, 544, 544, 544, 545, 545, 546, 546, 546,
+ 546, 546, 547, 547, 547, 547, 547, 548, 548, 548,
+ 548, 548, 549, 549, 550, 550, 552, 552, 553, 553,
+
+ 554, 554, 556, 556, 558, 558, 558, 559, 559, 559,
+ 560, 560, 560, 561, 561, 561, 562, 562, 562, 563,
+ 563, 563, 504, 503, 502, 501, 499, 498, 497, 495,
+ 493, 492, 491, 490, 489, 488, 487, 486, 485, 484,
+ 483, 479, 478, 476, 474, 473, 472, 471, 469, 468,
+ 465, 464, 463, 460, 459, 458, 453, 452, 451, 450,
+ 446, 445, 443, 442, 441, 439, 437, 436, 435, 434,
+ 430, 429, 428, 427, 426, 425, 422, 421, 420, 419,
+ 418, 417, 415, 414, 413, 412, 411, 410, 408, 407,
+ 405, 402, 401, 400, 399, 398, 397, 396, 395, 393,
+
+ 392, 391, 390, 389, 388, 386, 384, 383, 382, 380,
+ 379, 376, 374, 372, 370, 369, 368, 366, 365, 363,
+ 362, 361, 360, 359, 358, 357, 356, 355, 354, 353,
+ 352, 351, 350, 347, 346, 345, 344, 342, 341, 340,
+ 339, 338, 337, 333, 332, 331, 330, 328, 327, 326,
+ 320, 319, 318, 317, 316, 315, 314, 313, 312, 308,
+ 307, 306, 302, 300, 299, 298, 297, 296, 295, 294,
+ 293, 292, 291, 290, 289, 288, 287, 286, 285, 284,
+ 283, 282, 280, 279, 277, 276, 274, 271, 270, 269,
+ 268, 267, 266, 264, 262, 260, 258, 257, 256, 255,
+
+ 254, 253, 251, 248, 247, 246, 245, 244, 243, 242,
+ 240, 239, 238, 237, 236, 231, 230, 229, 228, 227,
+ 226, 224, 223, 222, 207, 205, 204, 203, 194, 193,
+ 192, 191, 187, 185, 181, 180, 179, 177, 174, 172,
+ 171, 169, 168, 167, 165, 164, 163, 162, 161, 160,
+ 159, 158, 157, 155, 153, 146, 145, 144, 142, 141,
+ 140, 139, 138, 134, 133, 131, 129, 127, 126, 125,
+ 122, 120, 118, 116, 115, 112, 111, 109, 104, 102,
+ 100, 98, 96, 93, 92, 83, 78, 76, 74, 73,
+ 70, 69, 66, 64, 60, 58, 56, 55, 54, 50,
+
+ 49, 47, 46, 45, 44, 43, 42, 41, 35, 33,
+ 31, 29, 27, 26, 25, 24, 20, 17, 15, 12,
+ 10, 8, 6, 4, 2, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
+ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526
+ } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
+/* 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 "src/decompile/cpp/slghscan.l"
+/* ###
+ * IP: GHIDRA
+ * NOTE: flex skeletons are NOT bound by flex's BSD license
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#line 18 "src/decompile/cpp/slghscan.l"
+#include "slgh_compile.hh"
+#include "slghparse.hh"
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
+
+/* If we are building don't include unistd.h */
+/* flex provides us with this macro for turning it off */
+#ifdef _WIN32
+#define YY_NO_UNISTD_H
+static int isatty (int fildes) { return 0; }
+#endif
+
+struct FileStreamState {
+ YY_BUFFER_STATE lastbuffer; // Last lex buffer corresponding to the stream
+ FILE *file; // The NEW file stream
+};
+
+extern SleighCompile *slgh;
+int4 last_preproc; // lex state before last preprocessing erasure
+int4 actionon; // whether '&' '|' and '^' are treated as actionon in pattern section
+int4 withsection = 0; // whether we are between the 'with' keyword and its open brace '{'
+vector<FileStreamState> filebuffers;
+vector<int4> ifstack;
+int4 negative_if = -1;
+
+void preproc_error(const string &err)
+
+{
+ slgh->reportError((const Location *)0, err);
+ cerr << "Terminating due to error in preprocessing" << endl;
+ exit(1);
+}
+
+void check_to_endofline(istream &s)
+
+{ // Make sure there is nothing to the end of the line
+ s >> ws;
+ if (!s.eof())
+ if (s.peek() != '#')
+ preproc_error("Extra characters in preprocessor directive");
+}
+
+string read_identifier(istream &s)
+
+{ // Read a proper identifier from the stream
+ s >> ws; // Skip any whitespace
+ string res;
+ while(!s.eof()) {
+ char tok = s.peek();
+ if (isalnum(tok) || (tok == '_')) {
+ s >> tok;
+ res += tok;
+ }
+ else
+ break;
+ }
+ return res;
+}
+
+void preprocess_string(istream &s,string &res)
+
+{ // Grab string surrounded by double quotes from stream or call preprocess_error
+ int4 val;
+
+ s >> ws; // Skip any whitespace
+ val = s.get();
+ if (val != '\"')
+ preproc_error("Expecting double quoted string");
+ val = s.get();
+ while((val != '\"')&&(val>=0)) {
+ res += (char)val;
+ val = s.get();
+ }
+ if (val != '\"')
+ preproc_error("Missing terminating double quote");
+}
+
+extern int4 preprocess_if(istream &s); // Forward declaration for recursion
+
+int4 read_defined_operator(istream &s)
+
+{ // We have seen a -defined- keyword in an if or elif
+ // Read macro name used as input, return 1 if it is defined
+ char tok = ' ';
+ string macroname;
+
+ s >> ws >> tok;
+ if (tok != '(')
+ preproc_error("Badly formed \"defined\" operator");
+ macroname = read_identifier(s);
+ int4 res = slgh->getPreprocValue(macroname,macroname) ? 1 : 0;
+ s >> ws >> tok;
+ if (tok != ')')
+ preproc_error("Badly formed \"defined\" operator");
+ return res;
+}
+
+int4 read_boolean_clause(istream &s)
+
+{ // We have seen an if or elif
+ // return 1 if condition is true or else 0
+ s >> ws;
+ if (s.peek()=='(') { // Parenthetical expression spawns recursion
+ int4 val = s.get();
+ int4 res = preprocess_if(s);
+ s >> ws;
+ val = s.get();
+ if (val != ')')
+ preproc_error("Unbalanced parentheses");
+ return res;
+ }
+ // Otherwise we must have a normal comparison operator
+ string lhs,rhs,comp;
+
+ if (s.peek()=='\"') // Read left-hand side string
+ preprocess_string(s,lhs);
+ else {
+ lhs = read_identifier(s);
+ if (lhs == "defined")
+ return read_defined_operator(s);
+ if (!slgh->getPreprocValue(lhs,lhs))
+ preproc_error("Could not find preprocessor macro "+lhs);
+ }
+
+ char tok;
+ s >> tok; // Read comparison symbol
+ comp += tok;
+ s >> tok;
+ comp += tok;
+
+ s >> ws;
+ if (s.peek()=='\"') // Read right-hand side string
+ preprocess_string(s,rhs);
+ else {
+ rhs = read_identifier(s);
+ if (!slgh->getPreprocValue(rhs,rhs))
+ preproc_error("Could not find preprocessor macro "+rhs);
+ }
+
+ if (comp == "==")
+ return (lhs == rhs) ? 1 : 0;
+ else if (comp=="!=")
+ return (lhs != rhs) ? 1 : 0;
+ else
+ preproc_error("Syntax error in condition");
+ return 0;
+}
+
+int4 preprocess_if(istream &s)
+
+{
+ int4 res = read_boolean_clause(s);
+ s >> ws;
+ while((!s.eof())&&(s.peek()!=')')) {
+ string boolop;
+ char tok;
+ s >> tok;
+ boolop += tok;
+ s >> tok;
+ boolop += tok;
+ int4 res2 = read_boolean_clause(s);
+ if (boolop == "&&")
+ res = res & res2;
+ else if (boolop == "||")
+ res = res | res2;
+ else if (boolop == "^^")
+ res = res ^ res2;
+ else
+ preproc_error("Syntax error in expression");
+ s >> ws;
+ }
+ return res;
+}
+
+void expand_preprocmacros(string &str)
+
+{
+ string::size_type pos;
+ string::size_type lastpos = 0;
+ pos = str.find("$(",lastpos);
+ if (pos == string::npos)
+ return;
+ string res;
+ for(;;) {
+ if (pos == string::npos) {
+ res += str.substr(lastpos);
+ str = res;
+ return;
+ }
+ else {
+ res += str.substr(lastpos,(pos-lastpos));
+ string::size_type endpos = str.find(')',pos+2);
+ if (endpos == string::npos) {
+ preproc_error("Unterminated macro in string");
+ break;
+ }
+ string macro = str.substr(pos+2, endpos - (pos+2));
+ string value;
+ if (!slgh->getPreprocValue(macro,value)) {
+ preproc_error("Unknown preprocessing macro "+macro);
+ break;
+ }
+ res += value;
+ lastpos = endpos + 1;
+ }
+ pos = str.find("$(",lastpos);
+ }
+}
+
+int4 preprocess(int4 cur_state,int4 blank_state)
+
+{
+ string str(yytext);
+ string::size_type pos = str.find('#');
+ if (pos != string::npos)
+ str.erase(pos);
+ istringstream s(str);
+ string type;
+
+ if (cur_state != blank_state)
+ last_preproc = cur_state;
+
+ s.get(); // Skip the preprocessor marker
+ s >> type;
+ if (type == "include") {
+ if (negative_if == -1) { // Not in the middle of a false if clause
+ filebuffers.push_back(FileStreamState()); // Save state of current file
+ filebuffers.back().lastbuffer = YY_CURRENT_BUFFER;
+ filebuffers.back().file = (FILE *)0;
+ s >> ws;
+ string fname;
+ preprocess_string(s,fname);
+ expand_preprocmacros(fname);
+ slgh->parseFromNewFile(fname);
+ fname = slgh->grabCurrentFilePath();
+ yyin = fopen(fname.c_str(),"r");
+ if (yyin == (FILE *)0)
+ preproc_error("Could not open included file "+fname);
+ filebuffers.back().file = yyin;
+ yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE) );
+ check_to_endofline(s);
+ }
+ }
+ else if (type == "define") {
+ if (negative_if == -1) {
+ string varname;
+ string value;
+ varname = read_identifier(s); // Get name of variable being defined
+ s >> ws;
+ if (s.peek() == '\"')
+ preprocess_string(s,value);
+ else
+ value = read_identifier(s);
+ if (varname.size()==0)
+ preproc_error("Error in preprocessor definition");
+ slgh->setPreprocValue(varname,value);
+ check_to_endofline(s);
+ }
+ }
+ else if (type == "undef") {
+ if (negative_if == -1) {
+ string varname;
+ varname = read_identifier(s); // Name of variable to undefine
+ if (varname.size()==0)
+ preproc_error("Error in preprocessor undef");
+ slgh->undefinePreprocValue(varname);
+ check_to_endofline(s);
+ }
+ }
+ else if (type=="ifdef") {
+ string varname;
+ varname = read_identifier(s);
+ if (varname.size()==0)
+ preproc_error("Error in preprocessor ifdef");
+ string value;
+ int4 truth = (slgh->getPreprocValue(varname,value)) ? 1 : 0;
+ ifstack.push_back(truth);
+ check_to_endofline(s);
+ }
+ else if (type=="ifndef") {
+ string varname;
+ varname = read_identifier(s);
+ if (varname.size()==0)
+ preproc_error("Error in preprocessor ifndef");
+ string value;
+ int4 truth = (slgh->getPreprocValue(varname,value)) ? 0 : 1; // flipped from ifdef
+ ifstack.push_back(truth);
+ check_to_endofline(s);
+ }
+ else if (type=="if") {
+ int4 truth = preprocess_if(s);
+ if (!s.eof())
+ preproc_error("Unbalanced parentheses");
+ ifstack.push_back(truth);
+ }
+ else if (type=="elif") {
+ if (ifstack.empty())
+ preproc_error("elif without preceding if");
+ if ((ifstack.back()&2)!=0) // We have already seen an else clause
+ preproc_error("elif follows else");
+ if ((ifstack.back()&4)!=0) // We have already seen a true elif clause
+ ifstack.back() = 4; // don't include any other elif clause
+ else if ((ifstack.back()&1)!=0) // Last clause was a true if
+ ifstack.back() = 4; // don't include this elif
+ else {
+ int4 truth = preprocess_if(s);
+ if (!s.eof())
+ preproc_error("Unbalanced parentheses");
+ if (truth==0)
+ ifstack.back() = 0;
+ else
+ ifstack.back() = 5;
+ }
+ }
+ else if (type=="endif") {
+ if (ifstack.empty())
+ preproc_error("preprocessing endif without matching if");
+ ifstack.pop_back();
+ check_to_endofline(s);
+ }
+ else if (type=="else") {
+ if (ifstack.empty())
+ preproc_error("preprocessing else without matching if");
+ if ((ifstack.back()&2)!=0)
+ preproc_error("second else for one if");
+ if ((ifstack.back()&4)!=0) // Seen a true elif clause before
+ ifstack.back() = 6;
+ else if (ifstack.back()==0)
+ ifstack.back() = 3;
+ else
+ ifstack.back() = 2;
+ check_to_endofline(s);
+ }
+ else
+ preproc_error("Unknown preprocessing directive: "+type);
+
+ if (negative_if >= 0) { // We were in a false state
+ if (negative_if+1 < ifstack.size())
+ return blank_state; // false state is still deep in stack
+ else // false state is popped off or is current and changed
+ negative_if = -1;
+ }
+ if (ifstack.empty()) return last_preproc;
+ if ((ifstack.back()&1)==0) {
+ negative_if = ifstack.size()-1;
+ return blank_state;
+ }
+ return last_preproc;
+}
+
+void preproc_macroexpand(void)
+
+{
+ filebuffers.push_back(FileStreamState());
+ filebuffers.back().lastbuffer = YY_CURRENT_BUFFER;
+ filebuffers.back().file = (FILE *)0;
+ string macro(yytext);
+ macro.erase(0,2);
+ macro.erase(macro.size()-1,1);
+ string value;
+ if (!slgh->getPreprocValue(macro,value))
+ preproc_error("Unknown preprocessing macro "+macro);
+ yy_switch_to_buffer(yy_scan_string(value.c_str() ) );
+ slgh->parsePreprocMacro();
+}
+
+int4 find_symbol(void) {
+ string * newstring = new string(yytext);
+ SleighSymbol *sym = slgh->findSymbol(*newstring);
+ if (sym == (SleighSymbol *)0) {
+ yylval.str = newstring;
+ return STRING;
+ }
+ delete newstring;
+ switch(sym->getType()) {
+ case SleighSymbol::section_symbol:
+ yylval.sectionsym = (SectionSymbol *)sym;
+ return SECTIONSYM;
+ case SleighSymbol::space_symbol:
+ yylval.spacesym = (SpaceSymbol *)sym;
+ return SPACESYM;
+ case SleighSymbol::token_symbol:
+ yylval.tokensym = (TokenSymbol *)sym;
+ return TOKENSYM;
+ case SleighSymbol::userop_symbol:
+ yylval.useropsym = (UserOpSymbol *)sym;
+ return USEROPSYM;
+ case SleighSymbol::value_symbol:
+ yylval.valuesym = (ValueSymbol *)sym;
+ return VALUESYM;
+ case SleighSymbol::valuemap_symbol:
+ yylval.valuemapsym = (ValueMapSymbol *)sym;
+ return VALUEMAPSYM;
+ case SleighSymbol::name_symbol:
+ yylval.namesym = (NameSymbol *)sym;
+ return NAMESYM;
+ case SleighSymbol::varnode_symbol:
+ yylval.varsym = (VarnodeSymbol *)sym;
+ return VARSYM;
+ case SleighSymbol::bitrange_symbol:
+ yylval.bitsym = (BitrangeSymbol *)sym;
+ return BITSYM;
+ case SleighSymbol::varnodelist_symbol:
+ yylval.varlistsym = (VarnodeListSymbol *)sym;
+ return VARLISTSYM;
+ case SleighSymbol::operand_symbol:
+ yylval.operandsym = (OperandSymbol *)sym;
+ return OPERANDSYM;
+ case SleighSymbol::start_symbol:
+ yylval.startsym = (StartSymbol *)sym;
+ return STARTSYM;
+ case SleighSymbol::end_symbol:
+ yylval.endsym = (EndSymbol *)sym;
+ return ENDSYM;
+ case SleighSymbol::subtable_symbol:
+ yylval.subtablesym = (SubtableSymbol *)sym;
+ return SUBTABLESYM;
+ case SleighSymbol::macro_symbol:
+ yylval.macrosym = (MacroSymbol *)sym;
+ return MACROSYM;
+ case SleighSymbol::label_symbol:
+ yylval.labelsym = (LabelSymbol *)sym;
+ return LABELSYM;
+ case SleighSymbol::epsilon_symbol:
+ yylval.specsym = (SpecificSymbol *)sym;
+ return SPECSYM;
+ case SleighSymbol::context_symbol:
+ yylval.contextsym = (ContextSymbol *)sym;
+ return CONTEXTSYM;
+ case SleighSymbol::dummy_symbol:
+ break;
+ }
+ return -1; // Should never reach here
+}
+
+int4 scan_number(char *numtext,YYSTYPE *lval,bool signednum)
+
+{
+ uintb val;
+ if (numtext[0] == '0' && numtext[1] == 'b') {
+ val = 0;
+ numtext += 2;
+ while ((*numtext) != 0) {
+ val <<= 1;
+ if (*numtext == '1') {
+ val |= 1;
+ }
+ ++numtext;
+ }
+ } else {
+ istringstream s(numtext);
+ s.unsetf(ios::dec | ios::hex | ios::oct);
+ s >> val;
+ if (!s)
+ return BADINTEGER;
+ }
+ if (signednum) {
+ lval->big = new intb(val);
+ return INTB;
+ }
+ lval->i = new uintb(val);
+ return INTEGER;
+}
+
+
+
+
+
+
+
+#line 1335 "src/decompile/cpp/slghscan.cc"
+
+#define INITIAL 0
+#define defblock 1
+#define macroblock 2
+#define print 3
+#define pattern 4
+#define sem 5
+#define preproc 6
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals (void );
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy (void );
+
+int yyget_debug (void );
+
+void yyset_debug (int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra (void );
+
+void yyset_extra (YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in (void );
+
+void yyset_in (FILE * in_str );
+
+FILE *yyget_out (void );
+
+void yyset_out (FILE * out_str );
+
+yy_size_t yyget_leng (void );
+
+char *yyget_text (void );
+
+int yyget_lineno (void );
+
+void yyset_lineno (int line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap (void );
+#else
+extern int yywrap (void );
+#endif
+#endif
+
+ static void yyunput (int c,char *buf_ptr );
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#ifdef __cplusplus
+static int yyinput (void );
+#else
+static int input (void );
+#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 do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#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_LVALUE->yy_is_interactive ) \
+ { \
+ int c = '*'; \
+ size_t 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 \
+ { \
+ errno=0; \
+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(yyin); \
+ } \
+ }\
+\
+
+#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
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* 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 \
+ if ( yyleng > 0 ) \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
+ (yytext[yyleng - 1] == '\n'); \
+ YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+
+#line 490 "src/decompile/cpp/slghscan.l"
+
+
+#line 1529 "src/decompile/cpp/slghscan.cc"
+
+ if ( !(yy_init) )
+ {
+ (yy_init) = 1;
+
+#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 ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ 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_current_state += YY_AT_BOL();
+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 >= 527 )
+ 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] != 926 );
+
+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:
+/* rule 1 can match eol */
+YY_RULE_SETUP
+#line 492 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); BEGIN( preprocess(INITIAL,preproc) ); }
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 493 "src/decompile/cpp/slghscan.l"
+{ preproc_macroexpand(); }
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 494 "src/decompile/cpp/slghscan.l"
+{ yylval.ch = yytext[0]; return yytext[0]; }
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 495 "src/decompile/cpp/slghscan.l"
+{ BEGIN(print); slgh->calcContextLayout(); yylval.ch = yytext[0]; return yytext[0]; }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 496 "src/decompile/cpp/slghscan.l"
+{ BEGIN(sem); yylval.ch = yytext[0]; return yytext[0]; }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 497 "src/decompile/cpp/slghscan.l"
+
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 498 "src/decompile/cpp/slghscan.l"
+
+ YY_BREAK
+case 8:
+/* rule 8 can match eol */
+YY_RULE_SETUP
+#line 499 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); }
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 500 "src/decompile/cpp/slghscan.l"
+{ BEGIN(macroblock); return MACRO_KEY; }
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 501 "src/decompile/cpp/slghscan.l"
+{ BEGIN(defblock); return DEFINE_KEY; }
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 502 "src/decompile/cpp/slghscan.l"
+{ BEGIN(defblock); slgh->calcContextLayout(); return ATTACH_KEY; }
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 503 "src/decompile/cpp/slghscan.l"
+{ BEGIN(pattern); withsection = 1; slgh->calcContextLayout(); return WITH_KEY; }
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 504 "src/decompile/cpp/slghscan.l"
+{ return find_symbol(); }
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 505 "src/decompile/cpp/slghscan.l"
+{ return yytext[0]; }
+ YY_BREAK
+case 15:
+/* rule 15 can match eol */
+YY_RULE_SETUP
+#line 507 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); BEGIN( preprocess(macroblock,preproc) ); }
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 508 "src/decompile/cpp/slghscan.l"
+{ preproc_macroexpand(); }
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 509 "src/decompile/cpp/slghscan.l"
+{ yylval.ch = yytext[0]; return yytext[0]; }
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 510 "src/decompile/cpp/slghscan.l"
+{ BEGIN(sem); return yytext[0]; }
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 511 "src/decompile/cpp/slghscan.l"
+{ yylval.str = new string(yytext); return STRING; }
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 512 "src/decompile/cpp/slghscan.l"
+
+ YY_BREAK
+case 21:
+/* rule 21 can match eol */
+YY_RULE_SETUP
+#line 513 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); }
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 514 "src/decompile/cpp/slghscan.l"
+{ return yytext[0]; }
+ YY_BREAK
+case 23:
+/* rule 23 can match eol */
+YY_RULE_SETUP
+#line 516 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); BEGIN( preprocess(defblock,preproc) ); }
+ YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 517 "src/decompile/cpp/slghscan.l"
+{ preproc_macroexpand(); }
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 518 "src/decompile/cpp/slghscan.l"
+{ yylval.ch = yytext[0]; return yytext[0]; }
+ YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 519 "src/decompile/cpp/slghscan.l"
+{ BEGIN(INITIAL); yylval.ch = yytext[0]; return yytext[0]; }
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 520 "src/decompile/cpp/slghscan.l"
+{ return SPACE_KEY; }
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 521 "src/decompile/cpp/slghscan.l"
+{ return TYPE_KEY; }
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 522 "src/decompile/cpp/slghscan.l"
+{ return RAM_KEY; }
+ YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 523 "src/decompile/cpp/slghscan.l"
+{ return DEFAULT_KEY; }
+ YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 524 "src/decompile/cpp/slghscan.l"
+{ return REGISTER_KEY; }
+ YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 525 "src/decompile/cpp/slghscan.l"
+{ return TOKEN_KEY; }
+ YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 526 "src/decompile/cpp/slghscan.l"
+{ return CONTEXT_KEY; }
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 527 "src/decompile/cpp/slghscan.l"
+{ return BITRANGE_KEY; }
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 528 "src/decompile/cpp/slghscan.l"
+{ return SIGNED_KEY; }
+ YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 529 "src/decompile/cpp/slghscan.l"
+{ return NOFLOW_KEY; }
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 530 "src/decompile/cpp/slghscan.l"
+{ return HEX_KEY; }
+ YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 531 "src/decompile/cpp/slghscan.l"
+{ return DEC_KEY; }
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 532 "src/decompile/cpp/slghscan.l"
+{ return ENDIAN_KEY; }
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 533 "src/decompile/cpp/slghscan.l"
+{ return ALIGN_KEY; }
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 534 "src/decompile/cpp/slghscan.l"
+{ return BIG_KEY; }
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 535 "src/decompile/cpp/slghscan.l"
+{ return LITTLE_KEY; }
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 536 "src/decompile/cpp/slghscan.l"
+{ return SIZE_KEY; }
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 537 "src/decompile/cpp/slghscan.l"
+{ return WORDSIZE_KEY; }
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 538 "src/decompile/cpp/slghscan.l"
+{ return OFFSET_KEY; }
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 539 "src/decompile/cpp/slghscan.l"
+{ return NAMES_KEY; }
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 540 "src/decompile/cpp/slghscan.l"
+{ return VALUES_KEY; }
+ YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 541 "src/decompile/cpp/slghscan.l"
+{ return VARIABLES_KEY; }
+ YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 542 "src/decompile/cpp/slghscan.l"
+{ return PCODEOP_KEY; }
+ YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 543 "src/decompile/cpp/slghscan.l"
+
+ YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 544 "src/decompile/cpp/slghscan.l"
+{ return find_symbol(); }
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 545 "src/decompile/cpp/slghscan.l"
+{ return scan_number(yytext,&yylval,false); }
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 546 "src/decompile/cpp/slghscan.l"
+{ return scan_number(yytext,&yylval,false); }
+ YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 547 "src/decompile/cpp/slghscan.l"
+{ return scan_number(yytext,&yylval,false); }
+ YY_BREAK
+case 55:
+/* rule 55 can match eol */
+YY_RULE_SETUP
+#line 548 "src/decompile/cpp/slghscan.l"
+{ yylval.str = new string(yytext+1,strlen(yytext)-2); return STRING; }
+ YY_BREAK
+case 56:
+YY_RULE_SETUP
+#line 549 "src/decompile/cpp/slghscan.l"
+
+ YY_BREAK
+case 57:
+/* rule 57 can match eol */
+YY_RULE_SETUP
+#line 550 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); }
+ YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 551 "src/decompile/cpp/slghscan.l"
+{ return yytext[0]; }
+ YY_BREAK
+case 59:
+/* rule 59 can match eol */
+YY_RULE_SETUP
+#line 554 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); BEGIN( preprocess(print,preproc) ); }
+ YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 555 "src/decompile/cpp/slghscan.l"
+{ preproc_macroexpand(); }
+ YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 556 "src/decompile/cpp/slghscan.l"
+{ yylval.ch = yytext[0]; return CHAR; }
+ YY_BREAK
+case 62:
+YY_RULE_SETUP
+#line 557 "src/decompile/cpp/slghscan.l"
+{ yylval.ch = '^'; return '^'; }
+ YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 558 "src/decompile/cpp/slghscan.l"
+{ BEGIN(pattern); actionon=0; return IS_KEY; }
+ YY_BREAK
+case 64:
+YY_RULE_SETUP
+#line 559 "src/decompile/cpp/slghscan.l"
+{ yylval.str = new string(yytext); return SYMBOLSTRING; }
+ YY_BREAK
+case 65:
+/* rule 65 can match eol */
+YY_RULE_SETUP
+#line 560 "src/decompile/cpp/slghscan.l"
+{ yylval.str = new string(yytext+1,strlen(yytext)-2); return STRING; }
+ YY_BREAK
+case 66:
+YY_RULE_SETUP
+#line 561 "src/decompile/cpp/slghscan.l"
+{ yylval.ch = ' '; return ' '; }
+ YY_BREAK
+case 67:
+/* rule 67 can match eol */
+YY_RULE_SETUP
+#line 562 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); return ' '; }
+ YY_BREAK
+case 68:
+YY_RULE_SETUP
+#line 563 "src/decompile/cpp/slghscan.l"
+{ return yytext[0]; }
+ YY_BREAK
+case 69:
+/* rule 69 can match eol */
+YY_RULE_SETUP
+#line 565 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); BEGIN( preprocess(pattern,preproc) ); }
+ YY_BREAK
+case 70:
+YY_RULE_SETUP
+#line 566 "src/decompile/cpp/slghscan.l"
+{ preproc_macroexpand(); }
+ YY_BREAK
+case 71:
+YY_RULE_SETUP
+#line 567 "src/decompile/cpp/slghscan.l"
+{ BEGIN((withsection==1) ? INITIAL:sem); withsection=0; yylval.ch = yytext[0]; return yytext[0]; }
+ YY_BREAK
+case 72:
+YY_RULE_SETUP
+#line 568 "src/decompile/cpp/slghscan.l"
+{ BEGIN(INITIAL); return OP_UNIMPL; }
+ YY_BREAK
+case 73:
+YY_RULE_SETUP
+#line 569 "src/decompile/cpp/slghscan.l"
+{ return GLOBALSET_KEY; }
+ YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 570 "src/decompile/cpp/slghscan.l"
+{ return OP_RIGHT; }
+ YY_BREAK
+case 75:
+YY_RULE_SETUP
+#line 571 "src/decompile/cpp/slghscan.l"
+{ return OP_LEFT; }
+ YY_BREAK
+case 76:
+YY_RULE_SETUP
+#line 572 "src/decompile/cpp/slghscan.l"
+{ return OP_NOTEQUAL; }
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 573 "src/decompile/cpp/slghscan.l"
+{ return OP_LESSEQUAL; }
+ YY_BREAK
+case 78:
+YY_RULE_SETUP
+#line 574 "src/decompile/cpp/slghscan.l"
+{ return OP_GREATEQUAL; }
+ YY_BREAK
+case 79:
+YY_RULE_SETUP
+#line 575 "src/decompile/cpp/slghscan.l"
+{ return OP_AND; }
+ YY_BREAK
+case 80:
+YY_RULE_SETUP
+#line 576 "src/decompile/cpp/slghscan.l"
+{ return OP_OR; }
+ YY_BREAK
+case 81:
+YY_RULE_SETUP
+#line 577 "src/decompile/cpp/slghscan.l"
+{ return OP_XOR; }
+ YY_BREAK
+case 82:
+YY_RULE_SETUP
+#line 578 "src/decompile/cpp/slghscan.l"
+{ return ELLIPSIS_KEY; }
+ YY_BREAK
+case 83:
+YY_RULE_SETUP
+#line 579 "src/decompile/cpp/slghscan.l"
+{ actionon = 1; yylval.ch = yytext[0]; return yytext[0]; }
+ YY_BREAK
+case 84:
+YY_RULE_SETUP
+#line 580 "src/decompile/cpp/slghscan.l"
+{ actionon = 0; yylval.ch = yytext[0]; return yytext[0]; }
+ YY_BREAK
+case 85:
+YY_RULE_SETUP
+#line 581 "src/decompile/cpp/slghscan.l"
+{ yylval.ch = yytext[0]; return (actionon==0) ? yytext[0] : OP_AND; }
+ YY_BREAK
+case 86:
+YY_RULE_SETUP
+#line 582 "src/decompile/cpp/slghscan.l"
+{ yylval.ch = yytext[0]; return (actionon==0) ? yytext[0] : OP_OR; }
+ YY_BREAK
+case 87:
+YY_RULE_SETUP
+#line 583 "src/decompile/cpp/slghscan.l"
+{ return OP_XOR; }
+ YY_BREAK
+case 88:
+YY_RULE_SETUP
+#line 584 "src/decompile/cpp/slghscan.l"
+{ yylval.ch = yytext[0]; return yytext[0]; }
+ YY_BREAK
+case 89:
+YY_RULE_SETUP
+#line 585 "src/decompile/cpp/slghscan.l"
+
+ YY_BREAK
+case 90:
+YY_RULE_SETUP
+#line 586 "src/decompile/cpp/slghscan.l"
+{ return find_symbol(); }
+ YY_BREAK
+case 91:
+YY_RULE_SETUP
+#line 587 "src/decompile/cpp/slghscan.l"
+{ return scan_number(yytext,&yylval,true); }
+ YY_BREAK
+case 92:
+YY_RULE_SETUP
+#line 588 "src/decompile/cpp/slghscan.l"
+{ return scan_number(yytext,&yylval,true); }
+ YY_BREAK
+case 93:
+YY_RULE_SETUP
+#line 589 "src/decompile/cpp/slghscan.l"
+{ return scan_number(yytext,&yylval,true); }
+ YY_BREAK
+case 94:
+YY_RULE_SETUP
+#line 590 "src/decompile/cpp/slghscan.l"
+
+ YY_BREAK
+case 95:
+/* rule 95 can match eol */
+YY_RULE_SETUP
+#line 591 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); }
+ YY_BREAK
+case 96:
+YY_RULE_SETUP
+#line 592 "src/decompile/cpp/slghscan.l"
+{ return yytext[0]; }
+ YY_BREAK
+case 97:
+/* rule 97 can match eol */
+YY_RULE_SETUP
+#line 594 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); BEGIN( preprocess(sem,preproc) ); }
+ YY_BREAK
+case 98:
+YY_RULE_SETUP
+#line 595 "src/decompile/cpp/slghscan.l"
+{ preproc_macroexpand(); }
+ YY_BREAK
+case 99:
+YY_RULE_SETUP
+#line 596 "src/decompile/cpp/slghscan.l"
+{ BEGIN(INITIAL); yylval.ch = yytext[0]; return yytext[0]; }
+ YY_BREAK
+case 100:
+YY_RULE_SETUP
+#line 597 "src/decompile/cpp/slghscan.l"
+{ return OP_BOOL_OR; }
+ YY_BREAK
+case 101:
+YY_RULE_SETUP
+#line 598 "src/decompile/cpp/slghscan.l"
+{ return OP_BOOL_AND; }
+ YY_BREAK
+case 102:
+YY_RULE_SETUP
+#line 599 "src/decompile/cpp/slghscan.l"
+{ return OP_BOOL_XOR; }
+ YY_BREAK
+case 103:
+YY_RULE_SETUP
+#line 600 "src/decompile/cpp/slghscan.l"
+{ return OP_RIGHT; }
+ YY_BREAK
+case 104:
+YY_RULE_SETUP
+#line 601 "src/decompile/cpp/slghscan.l"
+{ return OP_LEFT; }
+ YY_BREAK
+case 105:
+YY_RULE_SETUP
+#line 602 "src/decompile/cpp/slghscan.l"
+{ return OP_EQUAL; }
+ YY_BREAK
+case 106:
+YY_RULE_SETUP
+#line 603 "src/decompile/cpp/slghscan.l"
+{ return OP_NOTEQUAL; }
+ YY_BREAK
+case 107:
+YY_RULE_SETUP
+#line 604 "src/decompile/cpp/slghscan.l"
+{ return OP_LESSEQUAL; }
+ YY_BREAK
+case 108:
+YY_RULE_SETUP
+#line 605 "src/decompile/cpp/slghscan.l"
+{ return OP_GREATEQUAL; }
+ YY_BREAK
+case 109:
+YY_RULE_SETUP
+#line 606 "src/decompile/cpp/slghscan.l"
+{ return OP_SDIV; }
+ YY_BREAK
+case 110:
+YY_RULE_SETUP
+#line 607 "src/decompile/cpp/slghscan.l"
+{ return OP_SREM; }
+ YY_BREAK
+case 111:
+YY_RULE_SETUP
+#line 608 "src/decompile/cpp/slghscan.l"
+{ return OP_SRIGHT; }
+ YY_BREAK
+case 112:
+YY_RULE_SETUP
+#line 609 "src/decompile/cpp/slghscan.l"
+{ return OP_SLESS; }
+ YY_BREAK
+case 113:
+YY_RULE_SETUP
+#line 610 "src/decompile/cpp/slghscan.l"
+{ return OP_SGREAT; }
+ YY_BREAK
+case 114:
+YY_RULE_SETUP
+#line 611 "src/decompile/cpp/slghscan.l"
+{ return OP_SLESSEQUAL; }
+ YY_BREAK
+case 115:
+YY_RULE_SETUP
+#line 612 "src/decompile/cpp/slghscan.l"
+{ return OP_SGREATEQUAL; }
+ YY_BREAK
+case 116:
+YY_RULE_SETUP
+#line 613 "src/decompile/cpp/slghscan.l"
+{ return OP_FADD; }
+ YY_BREAK
+case 117:
+YY_RULE_SETUP
+#line 614 "src/decompile/cpp/slghscan.l"
+{ return OP_FSUB; }
+ YY_BREAK
+case 118:
+YY_RULE_SETUP
+#line 615 "src/decompile/cpp/slghscan.l"
+{ return OP_FMULT; }
+ YY_BREAK
+case 119:
+YY_RULE_SETUP
+#line 616 "src/decompile/cpp/slghscan.l"
+{ return OP_FDIV; }
+ YY_BREAK
+case 120:
+YY_RULE_SETUP
+#line 617 "src/decompile/cpp/slghscan.l"
+{ return OP_FEQUAL; }
+ YY_BREAK
+case 121:
+YY_RULE_SETUP
+#line 618 "src/decompile/cpp/slghscan.l"
+{ return OP_FNOTEQUAL; }
+ YY_BREAK
+case 122:
+YY_RULE_SETUP
+#line 619 "src/decompile/cpp/slghscan.l"
+{ return OP_FLESS; }
+ YY_BREAK
+case 123:
+YY_RULE_SETUP
+#line 620 "src/decompile/cpp/slghscan.l"
+{ return OP_FGREAT; }
+ YY_BREAK
+case 124:
+YY_RULE_SETUP
+#line 621 "src/decompile/cpp/slghscan.l"
+{ return OP_FLESSEQUAL; }
+ YY_BREAK
+case 125:
+YY_RULE_SETUP
+#line 622 "src/decompile/cpp/slghscan.l"
+{ return OP_FGREATEQUAL; }
+ YY_BREAK
+case 126:
+YY_RULE_SETUP
+#line 623 "src/decompile/cpp/slghscan.l"
+{ return OP_ZEXT; }
+ YY_BREAK
+case 127:
+YY_RULE_SETUP
+#line 624 "src/decompile/cpp/slghscan.l"
+{ return OP_CARRY; }
+ YY_BREAK
+case 128:
+YY_RULE_SETUP
+#line 625 "src/decompile/cpp/slghscan.l"
+{ return OP_BORROW; }
+ YY_BREAK
+case 129:
+YY_RULE_SETUP
+#line 626 "src/decompile/cpp/slghscan.l"
+{ return OP_SEXT; }
+ YY_BREAK
+case 130:
+YY_RULE_SETUP
+#line 627 "src/decompile/cpp/slghscan.l"
+{ return OP_SCARRY; }
+ YY_BREAK
+case 131:
+YY_RULE_SETUP
+#line 628 "src/decompile/cpp/slghscan.l"
+{ return OP_SBORROW; }
+ YY_BREAK
+case 132:
+YY_RULE_SETUP
+#line 629 "src/decompile/cpp/slghscan.l"
+{ return OP_NAN; }
+ YY_BREAK
+case 133:
+YY_RULE_SETUP
+#line 630 "src/decompile/cpp/slghscan.l"
+{ return OP_ABS; }
+ YY_BREAK
+case 134:
+YY_RULE_SETUP
+#line 631 "src/decompile/cpp/slghscan.l"
+{ return OP_SQRT; }
+ YY_BREAK
+case 135:
+YY_RULE_SETUP
+#line 632 "src/decompile/cpp/slghscan.l"
+{ return OP_CEIL; }
+ YY_BREAK
+case 136:
+YY_RULE_SETUP
+#line 633 "src/decompile/cpp/slghscan.l"
+{ return OP_FLOOR; }
+ YY_BREAK
+case 137:
+YY_RULE_SETUP
+#line 634 "src/decompile/cpp/slghscan.l"
+{ return OP_ROUND; }
+ YY_BREAK
+case 138:
+YY_RULE_SETUP
+#line 635 "src/decompile/cpp/slghscan.l"
+{ return OP_INT2FLOAT; }
+ YY_BREAK
+case 139:
+YY_RULE_SETUP
+#line 636 "src/decompile/cpp/slghscan.l"
+{ return OP_FLOAT2FLOAT; }
+ YY_BREAK
+case 140:
+YY_RULE_SETUP
+#line 637 "src/decompile/cpp/slghscan.l"
+{ return OP_TRUNC; }
+ YY_BREAK
+case 141:
+YY_RULE_SETUP
+#line 638 "src/decompile/cpp/slghscan.l"
+{ return OP_CPOOLREF; }
+ YY_BREAK
+case 142:
+YY_RULE_SETUP
+#line 639 "src/decompile/cpp/slghscan.l"
+{ return OP_NEW; }
+ YY_BREAK
+case 143:
+YY_RULE_SETUP
+#line 640 "src/decompile/cpp/slghscan.l"
+{ return OP_POPCOUNT; }
+ YY_BREAK
+case 144:
+YY_RULE_SETUP
+#line 641 "src/decompile/cpp/slghscan.l"
+{ return IF_KEY; }
+ YY_BREAK
+case 145:
+YY_RULE_SETUP
+#line 642 "src/decompile/cpp/slghscan.l"
+{ return GOTO_KEY; }
+ YY_BREAK
+case 146:
+YY_RULE_SETUP
+#line 643 "src/decompile/cpp/slghscan.l"
+{ return CALL_KEY; }
+ YY_BREAK
+case 147:
+YY_RULE_SETUP
+#line 644 "src/decompile/cpp/slghscan.l"
+{ return RETURN_KEY; }
+ YY_BREAK
+case 148:
+YY_RULE_SETUP
+#line 645 "src/decompile/cpp/slghscan.l"
+{ return DELAYSLOT_KEY; }
+ YY_BREAK
+case 149:
+YY_RULE_SETUP
+#line 646 "src/decompile/cpp/slghscan.l"
+{ return CROSSBUILD_KEY; }
+ YY_BREAK
+case 150:
+YY_RULE_SETUP
+#line 647 "src/decompile/cpp/slghscan.l"
+{ return EXPORT_KEY; }
+ YY_BREAK
+case 151:
+YY_RULE_SETUP
+#line 648 "src/decompile/cpp/slghscan.l"
+{ return BUILD_KEY; }
+ YY_BREAK
+case 152:
+YY_RULE_SETUP
+#line 649 "src/decompile/cpp/slghscan.l"
+{ return LOCAL_KEY; }
+ YY_BREAK
+case 153:
+YY_RULE_SETUP
+#line 650 "src/decompile/cpp/slghscan.l"
+{ yylval.ch = yytext[0]; return yytext[0]; }
+ YY_BREAK
+case 154:
+YY_RULE_SETUP
+#line 651 "src/decompile/cpp/slghscan.l"
+
+ YY_BREAK
+case 155:
+YY_RULE_SETUP
+#line 652 "src/decompile/cpp/slghscan.l"
+{ return find_symbol(); }
+ YY_BREAK
+case 156:
+YY_RULE_SETUP
+#line 653 "src/decompile/cpp/slghscan.l"
+{ return scan_number(yytext,&yylval,false); }
+ YY_BREAK
+case 157:
+YY_RULE_SETUP
+#line 654 "src/decompile/cpp/slghscan.l"
+{ return scan_number(yytext,&yylval,false); }
+ YY_BREAK
+case 158:
+YY_RULE_SETUP
+#line 655 "src/decompile/cpp/slghscan.l"
+{ return scan_number(yytext,&yylval,false); }
+ YY_BREAK
+case 159:
+YY_RULE_SETUP
+#line 656 "src/decompile/cpp/slghscan.l"
+
+ YY_BREAK
+case 160:
+/* rule 160 can match eol */
+YY_RULE_SETUP
+#line 657 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); }
+ YY_BREAK
+case 161:
+YY_RULE_SETUP
+#line 658 "src/decompile/cpp/slghscan.l"
+{ return yytext[0]; }
+ YY_BREAK
+case 162:
+/* rule 162 can match eol */
+YY_RULE_SETUP
+#line 660 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); BEGIN( preprocess(preproc,preproc) ); }
+ YY_BREAK
+case 163:
+/* rule 163 can match eol */
+YY_RULE_SETUP
+#line 661 "src/decompile/cpp/slghscan.l"
+{ slgh->nextLine(); }
+ YY_BREAK
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(defblock):
+case YY_STATE_EOF(macroblock):
+case YY_STATE_EOF(print):
+case YY_STATE_EOF(pattern):
+case YY_STATE_EOF(sem):
+case YY_STATE_EOF(preproc):
+#line 663 "src/decompile/cpp/slghscan.l"
+{ yy_delete_buffer(YY_CURRENT_BUFFER );
+ if (filebuffers.empty())
+ yyterminate();
+ yy_switch_to_buffer(filebuffers.back().lastbuffer );
+ FILE *curfile = filebuffers.back().file;
+ if (curfile != (FILE *)0)
+ fclose(curfile);
+ filebuffers.pop_back();
+ slgh->parseFileFinished();
+ }
+ YY_BREAK
+case 164:
+YY_RULE_SETUP
+#line 673 "src/decompile/cpp/slghscan.l"
+ECHO;
+ YY_BREAK
+#line 2468 "src/decompile/cpp/slghscan.cc"
+
+ 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_LVALUE->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_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->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_LVALUE->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_LVALUE->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 (void)
+{
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->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_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( YY_CURRENT_BUFFER_LVALUE->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_LVALUE->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_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+ else
+ {
+ yy_size_t num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+
+ int yy_c_buf_p_offset =
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ yy_size_t 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. */
+ yyrealloc((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_LVALUE->yy_buf_size -
+ number_to_move - 1;
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->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_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
+
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->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 (void)
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = (yy_start);
+ yy_current_state += YY_AT_BOL();
+
+ 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 >= 527 )
+ 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 );
+ */
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
+ 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 >= 527 )
+ 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 == 526);
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+ static void yyunput (int c, register char * yy_bp )
+{
+ register char *yy_cp;
+
+ yy_cp = (yy_c_buf_p);
+
+ /* undo effects of setting up yytext */
+ *yy_cp = (yy_hold_char);
+
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register yy_size_t number_to_move = (yy_n_chars) + 2;
+ register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+ register char *source =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->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;
+}
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+ static int yyinput (void)
+#else
+ static int input (void)
+#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_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ /* This was really a NUL. */
+ *(yy_c_buf_p) = '\0';
+
+ else
+ { /* need more input */
+ yy_size_t 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 );
+
+ /*FALLTHROUGH*/
+
+ 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);
+
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
+
+ return c;
+}
+#endif /* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void yyrestart (FILE * input_file )
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer(yyin,YY_BUF_SIZE );
+ }
+
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+ yy_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack ();
+ 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_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = 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;
+}
+
+static void yy_load_buffer_state (void)
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yyalloc(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 *) yyalloc(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;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
+ if ( ! b )
+ return;
+
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yyfree((void *) b->yy_ch_buf );
+
+ yyfree((void *) b );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+
+{
+ int oerrno = errno;
+
+ yy_flush_buffer(b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+ void yy_flush_buffer (YY_BUFFER_STATE b )
+{
+ 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( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+ if (new_buffer == NULL)
+ return;
+
+ yyensure_buffer_stack();
+
+ /* This block is copied from yy_switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+void yypop_buffer_state (void)
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+ }
+}
+
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+ yy_size_t num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
+
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ int grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+{
+ 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) yyalloc(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;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+{
+
+ return yy_scan_bytes(yystr,strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+{
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = _yybytes_len + 2;
+ buf = (char *) yyalloc(n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
+
+ buf[_yybytes_len] = buf[_yybytes_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;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yy_fatal_error (yyconst char* msg )
+{
+ (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. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
+
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
+
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
+
+/** Get the length of the current token.
+ *
+ */
+yy_size_t yyget_leng (void)
+{
+ return yyleng;
+}
+
+/** Get the current token.
+ *
+ */
+
+char *yyget_text (void)
+{
+ return yytext;
+}
+
+/** Set the current line number.
+ * @param line_number
+ *
+ */
+void yyset_lineno (int line_number )
+{
+
+ yylineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE * in_str )
+{
+ yyin = in_str ;
+}
+
+void yyset_out (FILE * out_str )
+{
+ yyout = out_str ;
+}
+
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
+
+void yyset_debug (int bdebug )
+{
+ yy_flex_debug = bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ (yy_buffer_stack) = 0;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = (char *) 0;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
+#else
+ yyin = (FILE *) 0;
+ yyout = (FILE *) 0;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ yypop_buffer_state();
+ }
+
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+
+ return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * s )
+{
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *yyalloc (yy_size_t size )
+{
+ return (void *) malloc( size );
+}
+
+void *yyrealloc (void * ptr, yy_size_t size )
+{
+ /* 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 );
+}
+
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 673 "src/decompile/cpp/slghscan.l"
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.l b/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.l
index 0115555194..9897fc3531 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.l
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.l
@@ -16,7 +16,7 @@
*/
%{
#include "slgh_compile.hh"
-#include "slghparse.tab.hh"
+#include "slghparse.hh"
#define yywrap() 1
#define YY_SKIP_YYWRAP
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/xml.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/xml.cc
new file mode 100644
index 0000000000..51fb5870ca
--- /dev/null
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/xml.cc
@@ -0,0 +1,2366 @@
+/* ###
+ * IP: GHIDRA
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* A Bison parser, made by GNU Bison 3.0.4. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "3.0.4"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+/* Substitute the variable and function names. */
+#define yyparse xmlparse
+#define yylex xmllex
+#define yyerror xmlerror
+#define yydebug xmldebug
+#define yynerrs xmlnerrs
+
+#define yylval xmllval
+#define yychar xmlchar
+
+/* Copy the first part of user declarations. */
+#line 16 "src/decompile/cpp/xml.y" /* yacc.c:339 */
+
+#include "xml.hh"
+// CharData mode look for '<' '&' or "]]>"
+// Name mode look for non-name char
+// CData mode looking for "]]>"
+// Entity mode looking for ending ';'
+// AttValue mode looking for endquote or '&'
+// Comment mode looking for "--"
+
+#include <iostream>
+#include <string>
+
+string Attributes::bogus_uri("http://unused.uri");
+
+/// \brief The XML character scanner
+///
+/// Tokenize a byte stream suitably for the main XML parser. The scanner expects an ASCII or UTF-8
+/// encoding. Characters is XML tag and attribute names are restricted to ASCII "letters", but
+/// extended UTF-8 characters can be used in any other character data: attribute values, content, comments.
+class XmlScan {
+public:
+ /// \brief Modes of the scanner
+ enum mode { CharDataMode, CDataMode, AttValueSingleMode,
+ AttValueDoubleMode, CommentMode, CharRefMode,
+ NameMode, SNameMode, SingleMode };
+ /// \brief Additional tokens returned by the scanner, in addition to byte values 00-ff
+ enum token { CharDataToken = 258,
+ CDataToken = 259,
+ AttValueToken = 260,
+ CommentToken =261,
+ CharRefToken = 262,
+ NameToken = 263,
+ SNameToken = 264,
+ ElementBraceToken = 265,
+ CommandBraceToken = 266 };
+private:
+ mode curmode; ///< The current scanning mode
+ istream &s; ///< The stream being scanned
+ string *lvalue; ///< Current string being built
+ int4 lookahead[4]; ///< Lookahead into the byte stream
+ int4 pos; ///< Current position in the lookahead buffer
+ bool endofstream; ///< Has end of stream been reached
+ void clearlvalue(void); ///< Clear the current token string
+
+ /// \brief Get the next byte in the stream
+ ///
+ /// Maintain a lookahead of 4 bytes at all times so that we can check for special
+ /// XML character sequences without consuming.
+ /// \return the next byte value as an integer
+ int4 getxmlchar(void) {
+ char c;
+ int4 ret=lookahead[pos];
+ if (!endofstream) {
+ s.get(c);
+ if (s.eof()||(c=='\0')) {
+ endofstream = true;
+ lookahead[pos] = '\n';
+ }
+ else
+ lookahead[pos] = c;
+ }
+ else
+ lookahead[pos] = -1;
+ pos = (pos+1)&3;
+ return ret;
+ }
+ int4 next(int4 i) { return lookahead[(pos+i)&3]; } ///< Peek at the next (i-th) byte without consuming
+ bool isLetter(int4 val) { return (((val>=0x41)&&(val<=0x5a))||((val>=0x61)&&(val<=0x7a))); } ///< Is the given byte a \e letter
+ bool isInitialNameChar(int4 val); ///< Is the given byte/character the valid start of an XML name
+ bool isNameChar(int4 val); ///< Is the given byte/character valid for an XML name
+ bool isChar(int4 val); ///< Is the given byte/character valid as an XML character
+ int4 scanSingle(void); ///< Scan for the next token in Single Character mode
+ int4 scanCharData(void); ///< Scan for the next token is Character Data mode
+ int4 scanCData(void); ///< Scan for the next token in CDATA mode
+ int4 scanAttValue(int4 quote); ///< Scan for the next token in Attribute Value mode
+ int4 scanCharRef(void); ///< Scan for the next token in Character Reference mode
+ int4 scanComment(void); ///< Scan for the next token in Comment mode
+ int4 scanName(void); ///< Scan a Name or return single non-name character
+ int4 scanSName(void); ///< Scan Name, allow white space before
+public:
+ XmlScan(istream &t); ///< Construct scanner given a stream
+ ~XmlScan(void); ///< Destructor
+ void setmode(mode m) { curmode = m; } ///< Set the scanning mode
+ int4 nexttoken(void); ///< Get the next token
+ string *lval(void) { string *ret = lvalue; lvalue = (string *)0; return ret; } ///< Return the last \e lvalue string
+};
+
+/// \brief A parsed name/value pair
+struct NameValue {
+ string *name; ///< The name
+ string *value; ///< The value
+};
+
+extern int yylex(void); ///< Interface to the scanner
+extern int yyerror(const char *str); ///< Interface for registering an error in parsing
+extern void print_content(const string &str); ///< Send character data to the ContentHandler
+extern int4 convertEntityRef(const string &ref); ///< Convert an XML entity to its equivalent character
+extern int4 convertCharRef(const string &ref); ///< Convert an XML character reference to its equivalent character
+static XmlScan *global_scan; ///< Global reference to the scanner
+static ContentHandler *handler; ///< Global reference to the content handler
+extern int yydebug; ///< Debug mode
+
+#line 177 "src/decompile/cpp/xml.cc" /* yacc.c:339 */
+
+# ifndef YY_NULLPTR
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int xmldebug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ CHARDATA = 258,
+ CDATA = 259,
+ ATTVALUE = 260,
+ COMMENT = 261,
+ CHARREF = 262,
+ NAME = 263,
+ SNAME = 264,
+ ELEMBRACE = 265,
+ COMMBRACE = 266
+ };
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
+union YYSTYPE
+{
+#line 119 "src/decompile/cpp/xml.y" /* yacc.c:355 */
+
+ int4 i;
+ string *str;
+ Attributes *attr;
+ NameValue *pair;
+
+#line 233 "src/decompile/cpp/xml.cc" /* yacc.c:355 */
+};
+
+typedef union YYSTYPE YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern YYSTYPE xmllval;
+
+int xmlparse (void);
+
+
+
+/* Copy the second part of user declarations. */
+
+#line 250 "src/decompile/cpp/xml.cc" /* yacc.c:358 */
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 25
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 205
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 50
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 37
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 70
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 151
+
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 266
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 15,
+ 13, 2, 2, 14, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 12, 18, 17, 48, 2, 2, 47, 16,
+ 2, 2, 2, 2, 2, 19, 2, 46, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 49,
+ 2, 32, 20, 21, 2, 25, 2, 23, 24, 31,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 28,
+ 30, 2, 2, 2, 26, 2, 2, 2, 2, 29,
+ 2, 22, 2, 27, 2, 2, 2, 2, 2, 40,
+ 41, 34, 2, 42, 2, 37, 2, 2, 45, 44,
+ 39, 38, 2, 2, 35, 36, 2, 2, 33, 2,
+ 43, 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
+};
+
+#if YYDEBUG
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_uint8 yyrline[] =
+{
+ 0, 135, 135, 136, 137, 138, 139, 140, 141, 142,
+ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 160, 161, 162, 163, 164,
+ 165, 166, 168, 169, 170, 171, 172, 173, 174, 176,
+ 177, 178, 179, 180, 181, 182, 184, 185, 187, 188,
+ 189, 190, 192, 193, 194, 195, 196, 197, 199, 200,
+ 201, 202, 203, 204, 205, 207, 208, 210, 211, 212,
+ 213
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || 0
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "CHARDATA", "CDATA", "ATTVALUE",
+ "COMMENT", "CHARREF", "NAME", "SNAME", "ELEMBRACE", "COMMBRACE", "' '",
+ "'\\n'", "'\\r'", "'\\t'", "'\\''", "'\"'", "'!'", "'-'", "'>'", "'?'",
+ "'['", "'C'", "'D'", "'A'", "'T'", "']'", "'O'", "'Y'", "'P'", "'E'",
+ "'='", "'v'", "'e'", "'r'", "'s'", "'i'", "'o'", "'n'", "'c'", "'d'",
+ "'g'", "'x'", "'m'", "'l'", "'/'", "'&'", "'#'", "';'", "$accept",
+ "document", "whitespace", "S", "attsinglemid", "attdoublemid",
+ "AttValue", "elemstart", "commentstart", "Comment", "PI", "CDSect",
+ "CDStart", "CDEnd", "doctypepro", "prologpre", "prolog", "doctypedecl",
+ "Eq", "Misc", "VersionInfo", "EncodingDecl", "xmldeclstart", "XMLDecl",
+ "element", "STag", "EmptyElemTag", "stagstart", "SAttribute",
+ "etagbrace", "ETag", "content", "Reference", "refstart", "charrefstart",
+ "CharRef", "EntityRef", YY_NULLPTR
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 32, 10, 13, 9, 39, 34, 33, 45,
+ 62, 63, 91, 67, 68, 65, 84, 93, 79, 89,
+ 80, 69, 61, 118, 101, 114, 115, 105, 111, 110,
+ 99, 100, 103, 120, 109, 108, 47, 38, 35, 59
+};
+# endif
+
+#define YYPACT_NINF -136
+
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-136)))
+
+#define YYTABLE_NINF -1
+
+#define yytable_value_is_error(Yytable_value) \
+ 0
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int16 yypact[] =
+{
+ 132, -136, 42, -136, -136, -136, -136, 22, -136, 125,
+ 9, 20, -136, -136, 143, 28, -136, 79, -136, 148,
+ -136, -136, 16, 18, 6, -136, -136, -136, 32, 65,
+ 148, -136, -136, 148, 38, 40, 93, 91, -136, -1,
+ 63, -136, 39, 27, -136, 45, 26, 52, -12, -136,
+ -136, -136, -136, 69, 57, 77, 104, -136, -3, -136,
+ -136, -136, -136, 94, -136, 95, -136, -136, -4, 103,
+ -136, -136, -136, 67, 136, -136, -136, 106, -136, 68,
+ 109, 87, -136, 90, -136, 144, 2, -136, 138, 108,
+ 117, -136, 118, -136, -136, -136, 125, -2, 3, -136,
+ -136, 125, -136, 145, 131, -136, 147, 146, -136, -136,
+ 121, -136, -136, -136, -136, -136, -136, -136, -136, 54,
+ -136, 149, 130, 150, 152, -136, 142, 151, 140, 153,
+ -136, 154, 155, 156, 157, 158, 159, 137, 161, 160,
+ -136, 63, 162, 163, 136, -136, 164, -136, 63, 136,
+ -136
+};
+
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 0, 18, 0, 4, 5, 6, 7, 0, 8, 38,
+ 0, 0, 36, 37, 31, 0, 28, 0, 27, 0,
+ 58, 46, 0, 0, 21, 1, 9, 52, 0, 0,
+ 30, 25, 29, 0, 0, 0, 0, 0, 2, 0,
+ 0, 48, 0, 0, 53, 0, 0, 0, 0, 21,
+ 26, 3, 42, 0, 0, 0, 0, 59, 0, 67,
+ 64, 63, 62, 0, 60, 0, 47, 61, 0, 0,
+ 66, 65, 33, 0, 0, 50, 49, 0, 19, 0,
+ 0, 0, 43, 0, 44, 0, 0, 55, 0, 0,
+ 0, 68, 0, 34, 10, 13, 35, 0, 0, 54,
+ 51, 0, 20, 0, 0, 45, 0, 0, 22, 56,
+ 0, 70, 69, 11, 16, 12, 14, 17, 15, 0,
+ 41, 0, 0, 0, 0, 57, 0, 0, 0, 0,
+ 24, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 32, 0, 0, 0, 0, 23, 0, 40, 0, 0,
+ 39
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -136, -136, -8, -17, -136, -136, -133, -136, -136, 165,
+ 166, -136, -136, -136, -136, -136, -136, -136, -135, 71,
+ -136, -136, -136, -136, 17, -136, -136, -136, -136, -136,
+ -136, -136, -64, -136, -136, -136, -136
+};
+
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 7, 8, 9, 97, 98, 99, 10, 11, 12,
+ 13, 62, 63, 108, 30, 14, 15, 31, 74, 16,
+ 120, 36, 17, 18, 19, 20, 21, 22, 44, 65,
+ 66, 39, 67, 68, 69, 70, 71
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_uint8 yytable[] =
+{
+ 35, 26, 57, 113, 90, 43, 144, 45, 116, 1,
+ 58, 147, 81, 149, 114, 86, 150, 27, 49, 56,
+ 117, 45, 25, 73, 106, 40, 28, 26, 3, 4,
+ 5, 6, 33, 115, 118, 26, 41, 45, 1, 3,
+ 4, 5, 6, 87, 91, 59, 59, 76, 26, 46,
+ 59, 47, 3, 4, 5, 6, 64, 96, 52, 75,
+ 23, 53, 42, 24, 78, 26, 3, 4, 5, 6,
+ 79, 80, 110, 77, 54, 3, 4, 5, 6, 3,
+ 4, 5, 6, 48, 119, 32, 49, 126, 26, 82,
+ 38, 3, 4, 5, 6, 72, 83, 84, 88, 93,
+ 34, 50, 26, 89, 51, 3, 4, 5, 6, 23,
+ 92, 26, 49, 101, 55, 103, 3, 4, 5, 6,
+ 3, 4, 5, 6, 73, 85, 100, 96, 109, 102,
+ 104, 73, 96, 3, 4, 5, 6, 3, 4, 5,
+ 6, 125, 1, 2, 3, 4, 5, 6, 3, 4,
+ 5, 6, 94, 95, 29, 3, 4, 5, 6, 37,
+ 3, 4, 5, 6, 105, 107, 111, 112, 121, 122,
+ 123, 128, 130, 124, 129, 127, 131, 133, 134, 141,
+ 132, 0, 0, 138, 145, 136, 142, 0, 0, 135,
+ 140, 0, 0, 0, 139, 137, 0, 143, 0, 0,
+ 0, 146, 0, 148, 60, 61
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 17, 9, 3, 5, 8, 22, 141, 19, 5, 10,
+ 11, 144, 24, 148, 16, 18, 149, 8, 21, 36,
+ 17, 19, 0, 40, 22, 9, 6, 35, 12, 13,
+ 14, 15, 15, 97, 98, 43, 20, 19, 10, 12,
+ 13, 14, 15, 46, 48, 47, 47, 20, 56, 43,
+ 47, 19, 12, 13, 14, 15, 39, 74, 20, 20,
+ 18, 21, 46, 21, 19, 73, 12, 13, 14, 15,
+ 44, 19, 89, 46, 34, 12, 13, 14, 15, 12,
+ 13, 14, 15, 18, 101, 14, 21, 33, 96, 20,
+ 19, 12, 13, 14, 15, 32, 39, 20, 4, 32,
+ 21, 30, 110, 8, 33, 12, 13, 14, 15, 18,
+ 7, 119, 21, 45, 21, 28, 12, 13, 14, 15,
+ 12, 13, 14, 15, 141, 21, 20, 144, 20, 20,
+ 40, 148, 149, 12, 13, 14, 15, 12, 13, 14,
+ 15, 20, 10, 11, 12, 13, 14, 15, 12, 13,
+ 14, 15, 16, 17, 11, 12, 13, 14, 15, 11,
+ 12, 13, 14, 15, 20, 27, 49, 49, 23, 38,
+ 23, 41, 20, 27, 24, 26, 34, 37, 25, 42,
+ 29, -1, -1, 26, 22, 30, 25, -1, -1, 35,
+ 31, -1, -1, -1, 36, 39, -1, 37, -1, -1,
+ -1, 38, -1, 39, 39, 39
+};
+
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 10, 11, 12, 13, 14, 15, 51, 52, 53,
+ 57, 58, 59, 60, 65, 66, 69, 72, 73, 74,
+ 75, 76, 77, 18, 21, 0, 52, 8, 6, 11,
+ 64, 67, 69, 74, 21, 53, 71, 11, 69, 81,
+ 9, 20, 46, 53, 78, 19, 43, 19, 18, 21,
+ 69, 69, 20, 21, 34, 21, 53, 3, 11, 47,
+ 59, 60, 61, 62, 74, 79, 80, 82, 83, 84,
+ 85, 86, 32, 53, 68, 20, 20, 46, 19, 44,
+ 19, 24, 20, 39, 20, 21, 18, 46, 4, 8,
+ 8, 48, 7, 32, 16, 17, 53, 54, 55, 56,
+ 20, 45, 20, 28, 40, 20, 22, 27, 63, 20,
+ 53, 49, 49, 5, 16, 82, 5, 17, 82, 53,
+ 70, 23, 38, 23, 27, 20, 33, 26, 41, 24,
+ 20, 34, 29, 37, 25, 35, 30, 39, 26, 36,
+ 31, 42, 25, 37, 68, 22, 38, 56, 39, 68,
+ 56
+};
+
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 50, 51, 51, 52, 52, 52, 52, 53, 53,
+ 54, 54, 54, 55, 55, 55, 56, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 64, 65, 65, 65,
+ 66, 66, 67, 68, 68, 68, 69, 69, 69, 70,
+ 71, 72, 73, 73, 73, 73, 74, 74, 75, 75,
+ 76, 76, 77, 77, 78, 79, 80, 80, 81, 81,
+ 81, 81, 81, 81, 81, 82, 82, 83, 84, 85,
+ 86
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 2, 3, 1, 1, 1, 1, 1, 2,
+ 1, 2, 2, 1, 2, 2, 2, 2, 1, 4,
+ 5, 2, 3, 9, 3, 1, 2, 1, 1, 2,
+ 2, 1, 9, 1, 2, 2, 1, 1, 1, 10,
+ 11, 6, 3, 4, 4, 5, 1, 3, 2, 3,
+ 3, 4, 2, 2, 3, 2, 3, 4, 0, 2,
+ 2, 2, 2, 2, 2, 1, 1, 1, 2, 3,
+ 3
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (0)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+{
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ YYUSE (yytype);
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+{
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
+{
+ unsigned long int yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+{
+ YYUSE (yyvaluep);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (void)
+{
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* 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;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex ();
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 10:
+#line 144 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = new string; global_scan->setmode(XmlScan::AttValueSingleMode); }
+#line 1443 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 11:
+#line 145 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = (yyvsp[-1].str); *(yyval.str) += *(yyvsp[0].str); delete (yyvsp[0].str); global_scan->setmode(XmlScan::AttValueSingleMode); }
+#line 1449 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 12:
+#line 146 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = (yyvsp[-1].str); *(yyval.str) += (yyvsp[0].i); global_scan->setmode(XmlScan::AttValueSingleMode); }
+#line 1455 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 13:
+#line 147 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = new string; global_scan->setmode(XmlScan::AttValueDoubleMode); }
+#line 1461 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 14:
+#line 148 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = (yyvsp[-1].str); *(yyval.str) += *(yyvsp[0].str); delete (yyvsp[0].str); global_scan->setmode(XmlScan::AttValueDoubleMode); }
+#line 1467 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 15:
+#line 149 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = (yyvsp[-1].str); *(yyval.str) += (yyvsp[0].i); global_scan->setmode(XmlScan::AttValueDoubleMode); }
+#line 1473 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 16:
+#line 150 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = (yyvsp[-1].str); }
+#line 1479 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 17:
+#line 151 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = (yyvsp[-1].str); }
+#line 1485 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 18:
+#line 152 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { global_scan->setmode(XmlScan::NameMode); delete (yyvsp[0].str); }
+#line 1491 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 19:
+#line 153 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { global_scan->setmode(XmlScan::CommentMode); delete (yyvsp[-3].str); }
+#line 1497 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 20:
+#line 154 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { delete (yyvsp[-3].str); }
+#line 1503 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 21:
+#line 155 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { delete (yyvsp[-1].str); yyerror("Processing instructions are not supported"); YYERROR; }
+#line 1509 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 22:
+#line 156 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = (yyvsp[-1].str); }
+#line 1515 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 23:
+#line 157 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { global_scan->setmode(XmlScan::CDataMode); delete (yyvsp[-8].str); }
+#line 1521 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 32:
+#line 168 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { delete (yyvsp[-8].str); yyerror("DTD's not supported"); YYERROR; }
+#line 1527 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 39:
+#line 176 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { handler->setVersion(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 1533 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 40:
+#line 177 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { handler->setEncoding(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 1539 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 46:
+#line 184 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { handler->endElement((yyvsp[0].attr)->getelemURI(),(yyvsp[0].attr)->getelemName(),(yyvsp[0].attr)->getelemName()); delete (yyvsp[0].attr); }
+#line 1545 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 47:
+#line 185 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { handler->endElement((yyvsp[-2].attr)->getelemURI(),(yyvsp[-2].attr)->getelemName(),(yyvsp[-2].attr)->getelemName()); delete (yyvsp[-2].attr); delete (yyvsp[0].str); }
+#line 1551 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 48:
+#line 187 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { handler->startElement((yyvsp[-1].attr)->getelemURI(),(yyvsp[-1].attr)->getelemName(),(yyvsp[-1].attr)->getelemName(),*(yyvsp[-1].attr)); (yyval.attr) = (yyvsp[-1].attr); }
+#line 1557 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 49:
+#line 188 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { handler->startElement((yyvsp[-2].attr)->getelemURI(),(yyvsp[-2].attr)->getelemName(),(yyvsp[-2].attr)->getelemName(),*(yyvsp[-2].attr)); (yyval.attr) = (yyvsp[-2].attr); }
+#line 1563 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 50:
+#line 189 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { handler->startElement((yyvsp[-2].attr)->getelemURI(),(yyvsp[-2].attr)->getelemName(),(yyvsp[-2].attr)->getelemName(),*(yyvsp[-2].attr)); (yyval.attr) = (yyvsp[-2].attr); }
+#line 1569 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 51:
+#line 190 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { handler->startElement((yyvsp[-3].attr)->getelemURI(),(yyvsp[-3].attr)->getelemName(),(yyvsp[-3].attr)->getelemName(),*(yyvsp[-3].attr)); (yyval.attr) = (yyvsp[-3].attr); }
+#line 1575 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 52:
+#line 192 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.attr) = new Attributes((yyvsp[0].str)); global_scan->setmode(XmlScan::SNameMode); }
+#line 1581 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 53:
+#line 193 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.attr) = (yyvsp[-1].attr); (yyval.attr)->add_attribute( (yyvsp[0].pair)->name, (yyvsp[0].pair)->value); delete (yyvsp[0].pair); global_scan->setmode(XmlScan::SNameMode); }
+#line 1587 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 54:
+#line 194 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.pair) = new NameValue; (yyval.pair)->name = (yyvsp[-2].str); (yyval.pair)->value = (yyvsp[0].str); }
+#line 1593 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 55:
+#line 195 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { global_scan->setmode(XmlScan::NameMode); delete (yyvsp[-1].str); }
+#line 1599 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 56:
+#line 196 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = (yyvsp[-1].str); }
+#line 1605 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 57:
+#line 197 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = (yyvsp[-2].str); }
+#line 1611 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 58:
+#line 199 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { global_scan->setmode(XmlScan::CharDataMode); }
+#line 1617 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 59:
+#line 200 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { print_content( *(yyvsp[0].str) ); delete (yyvsp[0].str); global_scan->setmode(XmlScan::CharDataMode); }
+#line 1623 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 60:
+#line 201 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { global_scan->setmode(XmlScan::CharDataMode); }
+#line 1629 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 61:
+#line 202 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { string *tmp=new string(); *tmp += (yyvsp[0].i); print_content(*tmp); delete tmp; global_scan->setmode(XmlScan::CharDataMode); }
+#line 1635 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 62:
+#line 203 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { print_content( *(yyvsp[0].str) ); delete (yyvsp[0].str); global_scan->setmode(XmlScan::CharDataMode); }
+#line 1641 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 63:
+#line 204 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { global_scan->setmode(XmlScan::CharDataMode); }
+#line 1647 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 64:
+#line 205 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { global_scan->setmode(XmlScan::CharDataMode); }
+#line 1653 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 65:
+#line 207 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.i) = convertEntityRef(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 1659 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 66:
+#line 208 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.i) = convertCharRef(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 1665 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 67:
+#line 210 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { global_scan->setmode(XmlScan::NameMode); }
+#line 1671 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 68:
+#line 211 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { global_scan->setmode(XmlScan::CharRefMode); }
+#line 1677 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 69:
+#line 212 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = (yyvsp[-1].str); }
+#line 1683 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+ case 70:
+#line 213 "src/decompile/cpp/xml.y" /* yacc.c:1646 */
+ { (yyval.str) = (yyvsp[-1].str); }
+#line 1689 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ break;
+
+
+#line 1693 "src/decompile/cpp/xml.cc" /* yacc.c:1646 */
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+ /* 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 - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ return yyresult;
+}
+#line 214 "src/decompile/cpp/xml.y" /* yacc.c:1906 */
+
+
+XmlScan::XmlScan(istream &t) : s(t)
+
+{
+ curmode = SingleMode;
+ lvalue = (string *)0;
+ pos = 0;
+ endofstream = false;
+ getxmlchar(); getxmlchar(); getxmlchar(); getxmlchar(); // Fill lookahead buffer
+}
+
+XmlScan::~XmlScan(void)
+
+{
+ clearlvalue();
+}
+
+void XmlScan::clearlvalue(void)
+
+{
+ if (lvalue != (string *)0)
+ delete lvalue;
+}
+
+int4 XmlScan::scanSingle(void)
+
+{
+ int4 res = getxmlchar();
+ if (res == '<') {
+ if (isInitialNameChar(next(0))) return ElementBraceToken;
+ return CommandBraceToken;
+ }
+ return res;
+}
+
+int4 XmlScan::scanCharData(void)
+
+{
+ clearlvalue();
+ lvalue = new string();
+
+ while(next(0) != -1) { // look for '<' '&' or ']]>'
+ if (next(0) == '<') break;
+ if (next(0) == '&') break;
+ if (next(0) == ']')
+ if (next(1)== ']')
+ if (next(2)=='>')
+ break;
+ *lvalue += getxmlchar();
+ }
+ if (lvalue->size()==0)
+ return scanSingle();
+ return CharDataToken;
+}
+
+int4 XmlScan::scanCData(void)
+
+{
+ clearlvalue();
+ lvalue = new string();
+
+ while(next(0) != -1) { // Look for "]]>" and non-Char
+ if (next(0)==']')
+ if (next(1)==']')
+ if (next(2)=='>')
+ break;
+ if (!isChar(next(0))) break;
+ *lvalue += getxmlchar();
+ }
+ return CDataToken; // CData can be empty
+}
+
+int4 XmlScan::scanCharRef(void)
+
+{
+ int4 v;
+ clearlvalue();
+ lvalue = new string();
+ if (next(0) == 'x') {
+ *lvalue += getxmlchar();
+ while(next(0) != -1) {
+ v = next(0);
+ if (v < '0') break;
+ if ((v>'9')&&(v<'A')) break;
+ if ((v>'F')&&(v<'a')) break;
+ if (v>'f') break;
+ *lvalue += getxmlchar();
+ }
+ if (lvalue->size()==1)
+ return 'x'; // Must be at least 1 hex digit
+ }
+ else {
+ while(next(0) != -1) {
+ v = next(0);
+ if (v<'0') break;
+ if (v>'9') break;
+ *lvalue += getxmlchar();
+ }
+ if (lvalue->size()==0)
+ return scanSingle();
+ }
+ return CharRefToken;
+}
+
+int4 XmlScan::scanAttValue(int4 quote)
+
+{
+ clearlvalue();
+ lvalue = new string();
+ while(next(0) != -1) {
+ if (next(0) == quote) break;
+ if (next(0) == '<') break;
+ if (next(0) == '&') break;
+ *lvalue += getxmlchar();
+ }
+ if (lvalue->size() == 0)
+ return scanSingle();
+ return AttValueToken;
+}
+
+int4 XmlScan::scanComment(void)
+
+{
+ clearlvalue();
+ lvalue = new string();
+
+ while(next(0) != -1) {
+ if (next(0)=='-')
+ if (next(1)=='-')
+ break;
+ if (!isChar(next(0))) break;
+ *lvalue += getxmlchar();
+ }
+ return CommentToken;
+}
+
+int4 XmlScan::scanName(void)
+
+{
+ clearlvalue();
+ lvalue = new string();
+
+ if (!isInitialNameChar(next(0)))
+ return scanSingle();
+ *lvalue += getxmlchar();
+ while(next(0) != -1) {
+ if (!isNameChar(next(0))) break;
+ *lvalue += getxmlchar();
+ }
+ return NameToken;
+}
+
+int4 XmlScan::scanSName(void)
+
+{
+ int4 whitecount = 0;
+ while((next(0)==' ')||(next(0)=='\n')||(next(0)=='\r')||(next(0)=='\t')) {
+ whitecount += 1;
+ getxmlchar();
+ }
+ clearlvalue();
+ lvalue = new string();
+ if (!isInitialNameChar(next(0))) { // First non-whitespace is not Name char
+ if (whitecount > 0)
+ return ' ';
+ return scanSingle();
+ }
+ *lvalue += getxmlchar();
+ while(next(0) != -1) {
+ if (!isNameChar(next(0))) break;
+ *lvalue += getxmlchar();
+ }
+ if (whitecount>0)
+ return SNameToken;
+ return NameToken;
+}
+
+bool XmlScan::isInitialNameChar(int4 val)
+
+{
+ if (isLetter(val)) return true;
+ if ((val=='_')||(val==':')) return true;
+ return false;
+}
+
+bool XmlScan::isNameChar(int4 val)
+
+{
+ if (isLetter(val)) return true;
+ if ((val>='0')&&(val<='9')) return true;
+ if ((val=='.')||(val=='-')||(val=='_')||(val==':')) return true;
+ return false;
+}
+
+bool XmlScan::isChar(int4 val)
+
+{
+ if (val>=0x20) return true;
+ if ((val == 0xd)||(val==0xa)||(val==0x9)) return true;
+ return false;
+}
+
+int4 XmlScan::nexttoken(void)
+
+{
+ mode mymode = curmode;
+ curmode = SingleMode;
+ switch(mymode) {
+ case CharDataMode:
+ return scanCharData();
+ case CDataMode:
+ return scanCData();
+ case AttValueSingleMode:
+ return scanAttValue('\'');
+ case AttValueDoubleMode:
+ return scanAttValue('"');
+ case CommentMode:
+ return scanComment();
+ case CharRefMode:
+ return scanCharRef();
+ case NameMode:
+ return scanName();
+ case SNameMode:
+ return scanSName();
+ case SingleMode:
+ return scanSingle();
+ }
+ return -1;
+}
+
+void print_content(const string &str)
+
+{
+ uint4 i;
+ for(i=0;i<str.size();++i) {
+ if (str[i]==' ') continue;
+ if (str[i]=='\n') continue;
+ if (str[i]=='\r') continue;
+ if (str[i]=='\t') continue;
+ break;
+ }
+ if (i==str.size())
+ handler->ignorableWhitespace(str.c_str(),0,str.size());
+ else
+ handler->characters(str.c_str(),0,str.size());
+}
+
+int4 convertEntityRef(const string &ref)
+
+{
+ if (ref == "lt") return '<';
+ if (ref == "amp") return '&';
+ if (ref == "gt") return '>';
+ if (ref == "quot") return '"';
+ if (ref == "apos") return '\'';
+ return -1;
+}
+
+int4 convertCharRef(const string &ref)
+
+{
+ uint4 i;
+ int4 mult,val,cur;
+
+ if (ref[0]=='x') {
+ i = 1;
+ mult = 16;
+ }
+ else {
+ i = 0;
+ mult = 10;
+ }
+ val = 0;
+ for(;i<ref.size();++i) {
+ if (ref[i]<='9') cur = ref[i]-'0';
+ else if (ref[i]<='F') cur = 10+ref[i]-'A';
+ else cur=10+ref[i]-'a';
+ val *= mult;
+ val += cur;
+ }
+ return val;
+}
+
+int yylex(void)
+
+{
+ int res = global_scan->nexttoken();
+ if (res>255)
+ yylval.str = global_scan->lval();
+ return res;
+}
+
+int yyerror(const char *str)
+
+{
+ handler->setError(str);
+ return 0;
+}
+
+int4 xml_parse(istream &i,ContentHandler *hand,int4 dbg)
+
+{
+#if YYDEBUG
+ yydebug = dbg;
+#endif
+ global_scan = new XmlScan(i);
+ handler = hand;
+ handler->startDocument();
+ int4 res = yyparse();
+ if (res == 0)
+ handler->endDocument();
+ delete global_scan;
+ return res;
+}
+
+void TreeHandler::startElement(const string &namespaceURI,const string &localName,
+ const string &qualifiedName,const Attributes &atts)
+{
+ Element *newel = new Element(cur);
+ cur->addChild(newel);
+ cur = newel;
+ newel->setName(localName);
+ for(int4 i=0;i<atts.getLength();++i)
+ newel->addAttribute(atts.getLocalName(i),atts.getValue(i));
+}
+
+void TreeHandler::endElement(const string &namespaceURI,const string &localName,
+ const string &qualifiedName)
+{
+ cur = cur->getParent();
+}
+
+void TreeHandler::characters(const char *text,int4 start,int4 length)
+
+{
+ cur->addContent(text,start,length);
+}
+
+Element::~Element(void)
+
+{
+ List::iterator iter;
+
+ for(iter=children.begin();iter!=children.end();++iter)
+ delete *iter;
+}
+
+const string &Element::getAttributeValue(const string &nm) const
+
+{
+ for(uint4 i=0;i<attr.size();++i)
+ if (attr[i] == nm)
+ return value[i];
+ throw XmlError("Unknown attribute: "+nm);
+}
+
+DocumentStorage::~DocumentStorage(void)
+
+{
+ for(int4 i=0;i<doclist.size();++i) {
+ if (doclist[i] != (Document *)0)
+ delete doclist[i];
+ }
+}
+
+Document *DocumentStorage::parseDocument(istream &s)
+
+{
+ doclist.push_back((Document *)0);
+ doclist.back() = xml_tree(s);
+ return doclist.back();
+}
+
+Document *DocumentStorage::openDocument(const string &filename)
+
+{
+ ifstream s(filename.c_str());
+ if (!s)
+ throw XmlError("Unable to open xml document "+filename);
+ Document *res = parseDocument(s);
+ s.close();
+ return res;
+}
+
+void DocumentStorage::registerTag(const Element *el)
+
+{
+ tagmap[el->getName()] = el;
+}
+
+const Element *DocumentStorage::getTag(const string &nm) const
+
+{
+ map<string,const Element *>::const_iterator iter;
+
+ iter = tagmap.find(nm);
+ if (iter != tagmap.end())
+ return (*iter).second;
+ return (const Element *)0;
+}
+
+Document *xml_tree(istream &i)
+
+{
+ Document *doc = new Document();
+ TreeHandler handle(doc);
+ if (0!=xml_parse(i,&handle)) {
+ delete doc;
+ throw XmlError(handle.getError());
+ }
+ return doc;
+}
+
+void xml_escape(ostream &s,const char *str)
+
+{
+ while(*str!='\0') {
+ if (*str < '?') {
+ if (*str=='<') s << "&lt;";
+ else if (*str=='>') s << "&gt;";
+ else if (*str=='&') s << "&amp;";
+ else if (*str=='"') s << "&quot;";
+ else if (*str=='\'') s << "&apos;";
+ else s << *str;
+ }
+ else
+ s << *str;
+ str++;
+ }
+}