diff --git a/Ghidra/Features/Decompiler/build.gradle b/Ghidra/Features/Decompiler/build.gradle index 11c5b4d4ab..a7c3c61af4 100644 --- a/Ghidra/Features/Decompiler/build.gradle +++ b/Ghidra/Features/Decompiler/build.gradle @@ -64,8 +64,8 @@ task generateParsers { */ task yaccDecompiler { - Task t1 = createBisonTask("xml", "decompile", false, true); - Task t2 = createBisonTask("grammar", "decompile", false, true); + Task t1 = createBisonTask("xml", "decompile", false); + Task t2 = createBisonTask("grammar", "decompile", false); if (t1 != null) { dependsOn t1, t2 @@ -79,9 +79,9 @@ task yaccDecompiler { */ task yaccSleigh { - 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); + Task t1 = createBisonTask("slghparse", "sleigh", true); // also produces slghparse.hh header file + Task t2 = createBisonTask("pcodeparse", "sleigh", false); + Task t3 = createBisonTask("xml", "sleigh", false); if (t1 != null) { dependsOn t1,t2,t3 @@ -110,6 +110,8 @@ def installPoint = "$rootDir/GhidraDocs/languages/html" def installHelpPoint = "../help/help" +def defaultStylePoint = "$rootDir/Ghidra/Framework/Help/src/main/resources/help/shared/DefaultStyle.css" + task buildDecompilerHelpHtml(type: Exec) { workingDir 'src/main/doc' @@ -134,7 +136,7 @@ task buildDecompilerHelpHtml(type: Exec) { xsltproc --output $buildDir/decomp_noscaling.xml --stringparam profile.condition "noscaling" commonprofile.xsl decompileplugin.xml 2>&1 xsltproc --stringparam base.dir ${installHelpPoint}/topics/DecompilePlugin/ --stringparam root.filename Decompiler decompileplugin_html.xsl $buildDir/decomp_noscaling.xml 2>&1 rm ${installHelpPoint}/topics/DecompilePlugin/Decompiler.html - sed -i -e '/Frontpage.css/ { p; s/Frontpage.css/languages.css/; }' ${installHelpPoint}/topics/DecompilePlugin/*.html 2>&1 + sed -i -e '/DefaultStyle.css/ { p; sQhref=".*"Qhref="../../shared/languages.css"Q; }' ${installHelpPoint}/topics/DecompilePlugin/*.html 2>&1 echo '** Done. **' """ @@ -174,6 +176,9 @@ task buildDecompilerHelpPdf(type: Exec) { workingDir 'src/main/doc' + outputs.dir "$workingDir/$buildDir/pdf" + outputs.file "$workingDir/$buildDir/pdf/decompileplugin.pdf" + // 'which' returns the number of failed arguments // Using 'which' first will allow the entire command to fail if the required // executables are not installed. @@ -186,19 +191,25 @@ task buildDecompilerHelpPdf(type: Exec) { echo '** Checking if required executables are installed. **' which fop 2>&1 which xsltproc 2>&1 - rm -f $buildDir/decompileplugin.fo $buildDir/decompileplugin.pdf $buildDir/decompileplugin_withscaling.xml 2>&1 - rm -rf $buildDir/images 2>&1 - mkdir -p $buildDir/images 2>&1 - cp $installHelpPoint/topics/DecompilePlugin/images/*.png $buildDir/images 2>&1 - cp $installHelpPoint/topics/DecompilePlugin/images/*.gif $buildDir/images 2>&1 - cp $installHelpPoint/shared/*.png $buildDir/images 2>&1 + mkdir -p $buildDir/pdf/images 2>&1 + cp $installHelpPoint/topics/DecompilePlugin/images/*.png $buildDir/pdf/images 2>&1 + cp ../resources/images/decompileFunction.gif $buildDir/pdf/images 2>&1 + cp ../../../../../Framework/Help/src/main/resources/help/shared/warning.png $buildDir/pdf/images 2>&1 + cp ../../../../../Framework/Help/src/main/resources/help/shared/tip.png $buildDir/pdf/images 2>&1 + cp ../../../../../Framework/Help/src/main/resources/help/shared/note.png $buildDir/pdf/images 2>&1 + cp ../../../../../Features/Base/src/main/resources/images/camera-photo.png $buildDir/pdf/images 2>&1 + cp ../../../../../Framework/Gui/src/main/resources/images/openFolder.png $buildDir/pdf/images 2>&1 + cp ../../../../../Framework/Gui/src/main/resources/images/reload3.png $buildDir/pdf/images 2>&1 + cp ../../../../../Framework/Gui/src/main/resources/images/page_white_copy.png $buildDir/pdf/images 2>&1 + cp ../../../../../Framework/Docking/src/main/resources/images/document-properties.png $buildDir/pdf/images 2>&1 + cp ../../../../../Framework/Project/src/main/resources/images/page_edit.png $buildDir/pdf/images 2>&1 echo '** Building decompileplugin.fo **' - xsltproc --output $buildDir/decompileplugin_withscaling.xml --stringparam profile.condition "withscaling" commonprofile.xsl decompileplugin.xml 2>&1 - xsltproc --output $buildDir/decompileplugin.fo decompileplugin_pdf.xsl $buildDir/decompileplugin_withscaling.xml 2>&1 + xsltproc --output $buildDir/pdf/decompileplugin_withscaling.xml --stringparam profile.condition "withscaling" commonprofile.xsl decompileplugin.xml 2>&1 + xsltproc --output $buildDir/pdf/decompileplugin.fo decompileplugin_pdf.xsl $buildDir/pdf/decompileplugin_withscaling.xml 2>&1 echo '** Building decompileplugin.pdf **' - fop $buildDir/decompileplugin.fo $buildDir/decompileplugin.pdf 2>&1 + fop $buildDir/pdf/decompileplugin.fo $buildDir/pdf/decompileplugin.pdf 2>&1 echo '** Done. **' """ @@ -323,12 +334,11 @@ task buildDecompilerDocumentationHtml(type: Exec) { echo -e '** Building index.html **' xsltproc --output $buildDir/index.html main_html.xsl main.xml 2>&1 - sed -i -e '/Frontpage.css/ { p; s/Frontpage.css/languages.css/; }' $buildDir/index.html + sed -i -e '/DefaultStyle.css/ { p; sQhref=".*"Qhref="../../shared/languages.css"Q; }' $buildDir/index.html echo '** Building html/sleigh.html **' xsltproc --stringparam base.dir $buildDir/html/ --stringparam root.filename sleigh sleigh_html.xsl sleigh.xml 2>&1 - sed -i -e '/Frontpage.css/ { p; s/Frontpage.css/languages.css/; }' $buildDir/html/sleigh*.html - cp $installPoint/Frontpage.css $buildDir/html 2>&1 + cp $defaultStylePoint $buildDir/html 2>&1 cp $installPoint/languages.css $buildDir/html cp $installPoint/Diagram1.png $buildDir/html cp $installPoint/Diagram2.png $buildDir/html @@ -336,11 +346,9 @@ task buildDecompilerDocumentationHtml(type: Exec) { echo '** Building html/pcoderef.html **' xsltproc --stringparam base.dir $buildDir/html/ --stringparam root.filename pcoderef pcoderef_html.xsl pcoderef.xml 2>&1 - sed -i -e '/Frontpage.css/ { p; s/Frontpage.css/languages.css/; }' $buildDir/html/pcoderef.html - sed -i -e '/Frontpage.css/ { p; s/Frontpage.css/languages.css/; }' $buildDir/html/pcodedescription.html - sed -i -e '/Frontpage.css/ { p; s/Frontpage.css/languages.css/; }' $buildDir/html/pseudo-ops.html - sed -i -e '/Frontpage.css/ { p; s/Frontpage.css/languages.css/; }' $buildDir/html/reference.html - cp $installPoint/Frontpage.css $buildDir/html + + sed -i -e '/DefaultStyle.css/ { p; sQhref=".*"Qhref="languages.css"Q; }' $buildDir/html/*.html + cp $defaultStylePoint $buildDir/html cp $installPoint/languages.css $buildDir/html echo '** Installing html documentation. **' @@ -402,40 +410,25 @@ boolean isUpToDate(File srcFile, File resultFile) { /** * Create a bison task to compile a yacc file (*.y) for the sleigh/decompiler */ -Task createBisonTask(String filename, String binaryName, boolean generateHeader, boolean qualifyVariables) { +Task createBisonTask(String filename, String binaryName, boolean generateHeader) { - def outputCppDir = "${cppSourceDir}" - def outputHeadersDir = "${cppSourceDir}" - - def yaccFile = "${cppSourceDir}/${filename}.y" - def ccFile = "${outputCppDir}/${filename}.cc" - def headerFile = "${outputCppDir}/${filename}.hh" + def yaccFile = "${filename}.y" + def ccFile = "${filename}.cc" + def headerFile = "${filename}.hh" return task("bison_${binaryName}_$filename", type: Exec) { - inputs.file "${yaccFile}" - outputs.file "${ccFile}" + inputs.file "${cppSourceDir}/${yaccFile}" + outputs.file "${cppSourceDir}/${ccFile}" if (generateHeader) { outputs.file "${headerFile}" } - // doFirst { - // file(outputCppDir).mkdirs() - // file(outputHeadersDir)mkdirs() - // } - + workingDir "${cppSourceDir}" executable 'bison' // use bison program to process yacc files - // specify the bison's output file - 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 - // declares a variable used by other files. - - if (qualifyVariables) { - args "-p", filename - } + // specify the bison's output file and that no #line directives should be generated + args "-l", "-o", "${ccFile}" // tell bison where to put the hh file. if (generateHeader) { @@ -452,25 +445,20 @@ Task createBisonTask(String filename, String binaryName, boolean generateHeader, */ Task createLexTask(String filename, String binaryName) { - def outputCppDir = "${cppSourceDir}" - - def lexFile = "${cppSourceDir}/${filename}.l" - def ccFile = "${outputCppDir}/${filename}.cc" + def lexFile = "${filename}.l" + def ccFile = "${filename}.cc" 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}" + inputs.file "${cppSourceDir}/${lexFile}" + outputs.files "${cppSourceDir}/${ccFile}" - // doFirst { - // file(outputCppDir).mkdirs(); - // } - + workingDir "${cppSourceDir}" executable 'flex' // the program to execute - // tell flex where to put the output - args "-o", "${ccFile}" + // tell flex where to put the output and not to generate #line directives + args "-L", "-o", "${ccFile}" // tell flex the input file args "${lexFile}" diff --git a/Ghidra/Features/Decompiler/certification.manifest b/Ghidra/Features/Decompiler/certification.manifest index ec9ff53bb4..dd67a60d6b 100644 --- a/Ghidra/Features/Decompiler/certification.manifest +++ b/Ghidra/Features/Decompiler/certification.manifest @@ -31,6 +31,7 @@ src/decompile/datatests/impliedfield.xml||GHIDRA||||END| src/decompile/datatests/indproto.xml||GHIDRA||||END| src/decompile/datatests/injectoverride.xml||GHIDRA||||END| src/decompile/datatests/loopcomment.xml||GHIDRA||||END| +src/decompile/datatests/lzcount.xml||GHIDRA||||END| src/decompile/datatests/mixfloatint.xml||GHIDRA||||END| src/decompile/datatests/modulo.xml||GHIDRA||||END| src/decompile/datatests/modulo2.xml||GHIDRA||||END| diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile b/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile index c4d34ca2cf..5c6cb40547 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile @@ -231,15 +231,15 @@ sla_opt/%.o: %.cc $(CXX) $(ARCH_TYPE) -c $(OPT_CXXFLAGS) $(ADDITIONAL_FLAGS) $(SLEIGH_OPT) $< -o $@ grammar.cc: grammar.y - $(YACC) -p cparse -o $@ $< + $(YACC) -l -o $@ $< xml.cc: xml.y - $(YACC) -p xml -o $@ $< + $(YACC) -l -o $@ $< pcodeparse.cc: pcodeparse.y - $(YACC) -p pcode -o $@ $< + $(YACC) -l -o $@ $< slghparse.cc: slghparse.y - $(YACC) -d -o $@ $< + $(YACC) -l -d -o $@ $< slghscan.cc: slghscan.l - $(LEX) -o$@ $< + $(LEX) -L -o$@ $< ruleparse.cc: ruleparse.y $(YACC) -p ruleparse -d -o $@ $< diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.cc index aab637f398..01c43f3ce5 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.cc @@ -73,7 +73,8 @@ /* Pull parsers. */ #define YYPULL 1 - +/* Substitute the type names. */ +#define YYSTYPE GRAMMARSTYPE /* Substitute the variable and function names. */ #define yyparse grammarparse #define yylex grammarlex @@ -85,16 +86,15 @@ #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); +extern int grammarlex(void); +extern int grammarerror(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 @@ -114,17 +114,25 @@ extern int yydebug; /* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +#ifndef GRAMMARDEBUG +# if defined YYDEBUG #if YYDEBUG +# define GRAMMARDEBUG 1 +# else +# define GRAMMARDEBUG 0 +# endif +# else /* ! defined YYDEBUG */ +# define GRAMMARDEBUG 0 +# endif /* ! defined YYDEBUG */ +#endif /* ! defined GRAMMARDEBUG */ +#if GRAMMARDEBUG extern int grammardebug; #endif /* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype +#ifndef GRAMMARTOKENTYPE +# define GRAMMARTOKENTYPE + enum grammartokentype { DOTDOTDOT = 258, BADTOKEN = 259, @@ -143,11 +151,11 @@ extern int grammardebug; #endif /* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +#if ! defined GRAMMARSTYPE && ! defined GRAMMARSTYPE_IS_DECLARED -union YYSTYPE +union GRAMMARSTYPE { -#line 25 "src/decompile/cpp/grammar.y" /* yacc.c:355 */ + uint4 flags; TypeDeclarator *dec; @@ -160,16 +168,16 @@ union YYSTYPE 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 +typedef union GRAMMARSTYPE GRAMMARSTYPE; +# define GRAMMARSTYPE_IS_TRIVIAL 1 +# define GRAMMARSTYPE_IS_DECLARED 1 #endif -extern YYSTYPE grammarlval; +extern GRAMMARSTYPE grammarlval; int grammarparse (void); @@ -177,7 +185,7 @@ int grammarparse (void); /* Copy the second part of user declarations. */ -#line 166 "src/decompile/cpp/grammar.cc" /* yacc.c:358 */ + #ifdef short # undef short @@ -358,7 +366,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined GRAMMARSTYPE_IS_TRIVIAL && GRAMMARSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -472,7 +480,7 @@ static const yytype_uint8 yytranslate[] = 15 }; -#if YYDEBUG +#if GRAMMARDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { @@ -487,7 +495,7 @@ static const yytype_uint8 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +#if GRAMMARDEBUG || 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[] = @@ -706,7 +714,7 @@ while (0) /* Enable debugging if requested. */ -#if YYDEBUG +#if GRAMMARDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ @@ -827,12 +835,12 @@ do { \ /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; -#else /* !YYDEBUG */ +#else /* !GRAMMARDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ +#endif /* !GRAMMARDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ @@ -1343,427 +1351,427 @@ yyreduce: 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 *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 @@ -1991,7 +1999,7 @@ yyreturn: #endif return yyresult; } -#line 210 "src/decompile/cpp/grammar.y" /* yacc.c:1906 */ + void GrammarToken::set(uint4 tp) @@ -3114,13 +3122,13 @@ bool CParse::parseStream(istream &s,uint4 doctype) return runParse(doctype); } -int yylex(void) +int grammarlex(void) { return parse->lex(); } -int yyerror(const char *str) +int grammarerror(const char *str) { return 0; diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.y b/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.y index f210843fd4..c8ce159534 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.y +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.y @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +%define api.prefix {grammar} %{ #include "grammar.hh" -extern int yylex(void); -extern int yyerror(const char *str); +extern int grammarlex(void); +extern int grammarerror(const char *str); static CParse *parse; -extern int yydebug; %} %union { @@ -1329,13 +1329,13 @@ bool CParse::parseStream(istream &s,uint4 doctype) return runParse(doctype); } -int yylex(void) +int grammarlex(void) { return parse->lex(); } -int yyerror(const char *str) +int grammarerror(const char *str) { return 0; diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.cc index c562c0f834..8441427171 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.cc @@ -73,7 +73,8 @@ /* Pull parsers. */ #define YYPULL 1 - +/* Substitute the type names. */ +#define YYSTYPE PCODESTYPE /* Substitute the variable and function names. */ #define yyparse pcodeparse #define yylex pcodelex @@ -85,17 +86,16 @@ #define yychar pcodechar /* Copy the first part of user declarations. */ -#line 16 "pcodeparse.y" /* yacc.c:339 */ + #include "pcodeparse.hh" //#define YYERROR_VERBOSE - extern int yylex(void); + extern int pcodelex(void); static PcodeSnippet *pcode; - extern int yydebug; - extern int yyerror(const char *str ); + extern int pcodeerror(const char *str ); + -#line 84 "pcodeparse.cc" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus @@ -115,17 +115,25 @@ /* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +#ifndef PCODEDEBUG +# if defined YYDEBUG #if YYDEBUG +# define PCODEDEBUG 1 +# else +# define PCODEDEBUG 0 +# endif +# else /* ! defined YYDEBUG */ +# define PCODEDEBUG 0 +# endif /* ! defined YYDEBUG */ +#endif /* ! defined PCODEDEBUG */ +#if PCODEDEBUG extern int pcodedebug; #endif /* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype +#ifndef PCODETOKENTYPE +# define PCODETOKENTYPE + enum pcodetokentype { OP_BOOL_OR = 258, OP_BOOL_AND = 259, @@ -190,11 +198,11 @@ extern int pcodedebug; #endif /* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +#if ! defined PCODESTYPE && ! defined PCODESTYPE_IS_DECLARED -union YYSTYPE +union PCODESTYPE { -#line 26 "pcodeparse.y" /* yacc.c:355 */ + uintb *i; string *str; @@ -215,16 +223,16 @@ union YYSTYPE VarnodeSymbol *varsym; SpecificSymbol *specsym; -#line 204 "pcodeparse.cc" /* yacc.c:355 */ + }; -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 +typedef union PCODESTYPE PCODESTYPE; +# define PCODESTYPE_IS_TRIVIAL 1 +# define PCODESTYPE_IS_DECLARED 1 #endif -extern YYSTYPE pcodelval; +extern PCODESTYPE pcodelval; int pcodeparse (void); @@ -232,7 +240,7 @@ int pcodeparse (void); /* Copy the second part of user declarations. */ -#line 221 "pcodeparse.cc" /* yacc.c:358 */ + #ifdef short # undef short @@ -413,7 +421,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined PCODESTYPE_IS_TRIVIAL && PCODESTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -531,7 +539,7 @@ static const yytype_uint8 yytranslate[] = 68, 69, 70, 71, 72, 73, 74 }; -#if YYDEBUG +#if PCODEDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { @@ -551,7 +559,7 @@ static const yytype_uint8 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +#if PCODEDEBUG || 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[] = @@ -1203,7 +1211,7 @@ while (0) /* Enable debugging if requested. */ -#if YYDEBUG +#if PCODEDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ @@ -1324,12 +1332,12 @@ do { \ /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; -#else /* !YYDEBUG */ +#else /* !PCODEDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ +#endif /* !PCODEDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ @@ -1587,69 +1595,69 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) switch (yytype) { case 65: /* INTEGER */ -#line 92 "pcodeparse.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).i); } -#line 1578 "pcodeparse.cc" /* yacc.c:1257 */ + break; case 66: /* STRING */ -#line 93 "pcodeparse.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).str); } -#line 1584 "pcodeparse.cc" /* yacc.c:1257 */ + break; case 84: /* rtlmid */ -#line 95 "pcodeparse.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).sem); } -#line 1590 "pcodeparse.cc" /* yacc.c:1257 */ + break; case 85: /* statement */ -#line 96 "pcodeparse.y" /* yacc.c:1257 */ + { if (((*yyvaluep).stmt) != (vector *)0) { for(int4 i=0;i<((*yyvaluep).stmt)->size();++i) delete (*((*yyvaluep).stmt))[i]; delete ((*yyvaluep).stmt);} } -#line 1596 "pcodeparse.cc" /* yacc.c:1257 */ + break; case 86: /* expr */ -#line 97 "pcodeparse.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).tree); } -#line 1602 "pcodeparse.cc" /* yacc.c:1257 */ + break; case 87: /* sizedstar */ -#line 99 "pcodeparse.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).starqual); } -#line 1608 "pcodeparse.cc" /* yacc.c:1257 */ + break; case 88: /* jumpdest */ -#line 98 "pcodeparse.y" /* yacc.c:1257 */ + { if (((*yyvaluep).varnode) != (VarnodeTpl *)0) delete ((*yyvaluep).varnode); } -#line 1614 "pcodeparse.cc" /* yacc.c:1257 */ + break; case 89: /* varnode */ -#line 98 "pcodeparse.y" /* yacc.c:1257 */ + { if (((*yyvaluep).varnode) != (VarnodeTpl *)0) delete ((*yyvaluep).varnode); } -#line 1620 "pcodeparse.cc" /* yacc.c:1257 */ + break; case 90: /* integervarnode */ -#line 98 "pcodeparse.y" /* yacc.c:1257 */ + { if (((*yyvaluep).varnode) != (VarnodeTpl *)0) delete ((*yyvaluep).varnode); } -#line 1626 "pcodeparse.cc" /* yacc.c:1257 */ + break; case 91: /* lhsvarnode */ -#line 98 "pcodeparse.y" /* yacc.c:1257 */ + { if (((*yyvaluep).varnode) != (VarnodeTpl *)0) delete ((*yyvaluep).varnode); } -#line 1632 "pcodeparse.cc" /* yacc.c:1257 */ + break; case 94: /* paramlist */ -#line 94 "pcodeparse.y" /* yacc.c:1257 */ + { for(int4 i=0;i<((*yyvaluep).param)->size();++i) delete (*((*yyvaluep).param))[i]; delete ((*yyvaluep).param); } -#line 1638 "pcodeparse.cc" /* yacc.c:1257 */ + break; @@ -1911,721 +1919,721 @@ yyreduce: switch (yyn) { case 2: -#line 102 "pcodeparse.y" /* yacc.c:1646 */ + { pcode->setResult((yyvsp[-1].sem)); } -#line 1902 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 3: -#line 104 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.sem) = new ConstructTpl(); } -#line 1908 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 4: -#line 105 "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 1914 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 5: -#line 106 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.sem) = (yyvsp[-3].sem); pcode->newLocalDefinition((yyvsp[-1].str)); } -#line 1920 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 6: -#line 107 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.sem) = (yyvsp[-5].sem); pcode->newLocalDefinition((yyvsp[-3].str),*(yyvsp[-1].i)); delete (yyvsp[-1].i); } -#line 1926 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 7: -#line 109 "pcodeparse.y" /* yacc.c:1646 */ + { (yyvsp[-1].tree)->setOutput((yyvsp[-3].varnode)); (yyval.stmt) = ExprTree::toVector((yyvsp[-1].tree)); } -#line 1932 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 8: -#line 110 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->newOutput(true,(yyvsp[-1].tree),(yyvsp[-3].str)); } -#line 1938 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 9: -#line 111 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->newOutput(false,(yyvsp[-1].tree),(yyvsp[-3].str)); } -#line 1944 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 10: -#line 112 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->newOutput(true,(yyvsp[-1].tree),(yyvsp[-5].str),*(yyvsp[-3].i)); delete (yyvsp[-3].i); } -#line 1950 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 11: -#line 113 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->newOutput(true,(yyvsp[-1].tree),(yyvsp[-5].str),*(yyvsp[-3].i)); delete (yyvsp[-3].i); } -#line 1956 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 12: -#line 114 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = (vector *)0; string errmsg = "Redefinition of symbol: "+(yyvsp[-1].specsym)->getName(); yyerror(errmsg.c_str()); YYERROR; } -#line 1962 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 13: -#line 115 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->createStore((yyvsp[-4].starqual),(yyvsp[-3].tree),(yyvsp[-1].tree)); } -#line 1968 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 14: -#line 116 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->createUserOpNoOut((yyvsp[-4].useropsym),(yyvsp[-2].param)); } -#line 1974 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 15: -#line 117 "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 1980 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 16: -#line 118 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = (vector *)0; delete (yyvsp[-3].varnode); delete (yyvsp[-1].i); yyerror("Illegal truncation on left-hand side of assignment"); YYERROR; } -#line 1986 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 17: -#line 119 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = (vector *)0; delete (yyvsp[-3].varnode); delete (yyvsp[-1].i); yyerror("Illegal subpiece on left-hand side of assignment"); YYERROR; } -#line 1992 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 18: -#line 120 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->createOpNoOut(CPUI_BRANCH,new ExprTree((yyvsp[-1].varnode))); } -#line 1998 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 19: -#line 121 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->createOpNoOut(CPUI_CBRANCH,new ExprTree((yyvsp[-1].varnode)),(yyvsp[-3].tree)); } -#line 2004 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 20: -#line 122 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->createOpNoOut(CPUI_BRANCHIND,(yyvsp[-2].tree)); } -#line 2010 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 21: -#line 123 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->createOpNoOut(CPUI_CALL,new ExprTree((yyvsp[-1].varnode))); } -#line 2016 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 22: -#line 124 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->createOpNoOut(CPUI_CALLIND,(yyvsp[-2].tree)); } -#line 2022 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 23: -#line 125 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = (vector *)0; yyerror("Must specify an indirect parameter for return"); YYERROR; } -#line 2028 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 24: -#line 126 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->createOpNoOut(CPUI_RETURN,(yyvsp[-2].tree)); } -#line 2034 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 25: -#line 127 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = pcode->placeLabel( (yyvsp[0].labelsym) ); } -#line 2040 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 26: -#line 129 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = new ExprTree((yyvsp[0].varnode)); } -#line 2046 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 27: -#line 130 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createLoad((yyvsp[-1].starqual),(yyvsp[0].tree)); } -#line 2052 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 28: -#line 131 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = (yyvsp[-1].tree); } -#line 2058 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 29: -#line 132 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_ADD,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2064 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 30: -#line 133 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_SUB,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2070 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 31: -#line 134 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_EQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2076 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 32: -#line 135 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_NOTEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2082 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 33: -#line 136 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_LESS,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2088 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 34: -#line 137 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_LESSEQUAL,(yyvsp[0].tree),(yyvsp[-2].tree)); } -#line 2094 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 35: -#line 138 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_LESSEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2100 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 36: -#line 139 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_LESS,(yyvsp[0].tree),(yyvsp[-2].tree)); } -#line 2106 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 37: -#line 140 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_SLESS,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2112 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 38: -#line 141 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_SLESSEQUAL,(yyvsp[0].tree),(yyvsp[-2].tree)); } -#line 2118 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 39: -#line 142 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_SLESSEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2124 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 40: -#line 143 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_SLESS,(yyvsp[0].tree),(yyvsp[-2].tree)); } -#line 2130 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 41: -#line 144 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_2COMP,(yyvsp[0].tree)); } -#line 2136 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 42: -#line 145 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_NEGATE,(yyvsp[0].tree)); } -#line 2142 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 43: -#line 146 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_XOR,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2148 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 44: -#line 147 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_AND,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2154 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 45: -#line 148 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_OR,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2160 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 46: -#line 149 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_LEFT,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2166 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 47: -#line 150 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_RIGHT,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2172 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 48: -#line 151 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_SRIGHT,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2178 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 49: -#line 152 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_MULT,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2184 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 50: -#line 153 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_DIV,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2190 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 51: -#line 154 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_SDIV,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2196 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 52: -#line 155 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_REM,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2202 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 53: -#line 156 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_SREM,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2208 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 54: -#line 157 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_BOOL_NEGATE,(yyvsp[0].tree)); } -#line 2214 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 55: -#line 158 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_BOOL_XOR,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2220 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 56: -#line 159 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_BOOL_AND,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2226 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 57: -#line 160 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_BOOL_OR,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2232 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 58: -#line 161 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_EQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2238 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 59: -#line 162 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_NOTEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2244 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 60: -#line 163 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_LESS,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2250 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 61: -#line 164 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_LESS,(yyvsp[0].tree),(yyvsp[-2].tree)); } -#line 2256 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 62: -#line 165 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_LESSEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2262 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 63: -#line 166 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_LESSEQUAL,(yyvsp[0].tree),(yyvsp[-2].tree)); } -#line 2268 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 64: -#line 167 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_ADD,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2274 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 65: -#line 168 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_SUB,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2280 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 66: -#line 169 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_MULT,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2286 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 67: -#line 170 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_DIV,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 2292 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 68: -#line 171 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_NEG,(yyvsp[0].tree)); } -#line 2298 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 69: -#line 172 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_ABS,(yyvsp[-1].tree)); } -#line 2304 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 70: -#line 173 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_SQRT,(yyvsp[-1].tree)); } -#line 2310 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 71: -#line 174 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_SEXT,(yyvsp[-1].tree)); } -#line 2316 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 72: -#line 175 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_ZEXT,(yyvsp[-1].tree)); } -#line 2322 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 73: -#line 176 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_CARRY,(yyvsp[-3].tree),(yyvsp[-1].tree)); } -#line 2328 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 74: -#line 177 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_SCARRY,(yyvsp[-3].tree),(yyvsp[-1].tree)); } -#line 2334 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 75: -#line 178 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_INT_SBORROW,(yyvsp[-3].tree),(yyvsp[-1].tree)); } -#line 2340 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 76: -#line 179 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_FLOAT2FLOAT,(yyvsp[-1].tree)); } -#line 2346 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 77: -#line 180 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_INT2FLOAT,(yyvsp[-1].tree)); } -#line 2352 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 78: -#line 181 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_NAN,(yyvsp[-1].tree)); } -#line 2358 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 79: -#line 182 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_TRUNC,(yyvsp[-1].tree)); } -#line 2364 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 80: -#line 183 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_CEIL,(yyvsp[-1].tree)); } -#line 2370 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 81: -#line 184 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_FLOOR,(yyvsp[-1].tree)); } -#line 2376 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 82: -#line 185 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_FLOAT_ROUND,(yyvsp[-1].tree)); } -#line 2382 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 83: -#line 186 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_NEW,(yyvsp[-1].tree)); } -#line 2388 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 84: -#line 187 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_NEW,(yyvsp[-3].tree),(yyvsp[-1].tree)); } -#line 2394 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 85: -#line 188 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createOp(CPUI_SUBPIECE,new ExprTree((yyvsp[-3].specsym)->getVarnode()),new ExprTree((yyvsp[-1].varnode))); } -#line 2400 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 86: -#line 189 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createBitRange((yyvsp[-2].specsym),0,(uint4)(*(yyvsp[0].i) * 8)); delete (yyvsp[0].i); } -#line 2406 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 87: -#line 190 "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 2412 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 88: -#line 191 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.tree) = pcode->createUserOp((yyvsp[-3].useropsym),(yyvsp[-1].param)); } -#line 2418 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 89: -#line 193 "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 2424 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 90: -#line 194 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = 0; (yyval.starqual)->id=ConstTpl((yyvsp[-1].spacesym)->getSpace()); } -#line 2430 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 91: -#line 195 "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 2436 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 92: -#line 196 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = 0; (yyval.starqual)->id=ConstTpl(pcode->getDefaultSpace()); } -#line 2442 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 93: -#line 198 "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 2448 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 94: -#line 199 "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 2454 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 95: -#line 200 "pcodeparse.y" /* yacc.c:1646 */ + { VarnodeTpl *sym = (yyvsp[0].next2sym)->getVarnode(); (yyval.varnode) = new VarnodeTpl(ConstTpl(ConstTpl::j_curspace),sym->getOffset(),ConstTpl(ConstTpl::j_curspace_size)); delete sym; } -#line 2460 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 96: -#line 201 "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 2466 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 97: -#line 202 "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 2472 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 98: -#line 203 "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 2478 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 99: -#line 204 "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 2484 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 100: -#line 205 "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 2490 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 101: -#line 207 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); } -#line 2496 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 102: -#line 208 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.varnode) = (yyvsp[0].varnode); } -#line 2502 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 103: -#line 209 "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 2508 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 104: -#line 211 "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 2514 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 105: -#line 212 "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 2520 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 106: -#line 213 "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 2526 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 107: -#line 214 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.varnode) = pcode->addressOf((yyvsp[0].varnode),0); } -#line 2532 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 108: -#line 215 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.varnode) = pcode->addressOf((yyvsp[0].varnode),*(yyvsp[-1].i)); delete (yyvsp[-1].i); } -#line 2538 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 109: -#line 217 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); } -#line 2544 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 110: -#line 218 "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 2550 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 111: -#line 220 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.labelsym) = (yyvsp[-1].labelsym); } -#line 2556 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 112: -#line 221 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.labelsym) = pcode->defineLabel( (yyvsp[-1].str) ); } -#line 2562 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 113: -#line 223 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.specsym) = (yyvsp[0].varsym); } -#line 2568 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 114: -#line 224 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.specsym) = (yyvsp[0].operandsym); } -#line 2574 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 115: -#line 225 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.specsym) = (yyvsp[0].startsym); } -#line 2580 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 116: -#line 226 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.specsym) = (yyvsp[0].endsym); } -#line 2586 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 117: -#line 227 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.specsym) = (yyvsp[0].next2sym); } -#line 2592 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 118: -#line 229 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.param) = new vector; } -#line 2598 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 119: -#line 230 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.param) = new vector; (yyval.param)->push_back((yyvsp[0].tree)); } -#line 2604 "pcodeparse.cc" /* yacc.c:1646 */ + break; case 120: -#line 231 "pcodeparse.y" /* yacc.c:1646 */ + { (yyval.param) = (yyvsp[-2].param); (yyval.param)->push_back((yyvsp[0].tree)); } -#line 2610 "pcodeparse.cc" /* yacc.c:1646 */ + break; -#line 2614 "pcodeparse.cc" /* yacc.c:1646 */ + default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2853,7 +2861,7 @@ yyreturn: #endif return yyresult; } -#line 233 "pcodeparse.y" /* yacc.c:1906 */ + #define IDENTREC_SIZE 46 @@ -3424,11 +3432,11 @@ void PcodeSnippet::addOperand(const string &name,int4 index) addSymbol(sym); } -int yylex(void) { +int pcodelex(void) { return pcode->lex(); } -int yyerror(const char *s) +int pcodeerror(const char *s) { pcode->reportError((const Location *)0,s); diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.y b/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.y index c858fa148c..9f93f7b0c4 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.y +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.y @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +%define api.prefix {pcode} %{ #include "pcodeparse.hh" //#define YYERROR_VERBOSE - extern int yylex(void); + extern int pcodelex(void); static PcodeSnippet *pcode; - extern int yydebug; - extern int yyerror(const char *str ); + extern int pcodeerror(const char *str ); %} %union { @@ -800,11 +800,11 @@ void PcodeSnippet::addOperand(const string &name,int4 index) addSymbol(sym); } -int yylex(void) { +int pcodelex(void) { return pcode->lex(); } -int yyerror(const char *s) +int pcodeerror(const char *s) { pcode->reportError((const Location *)0,s); diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc index db0fa35c0a..00c9c39fde 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc @@ -10127,11 +10127,11 @@ int4 RuleXorSwap::applyOp(PcodeOp *op,Funcdata &data) } /// \class RuleLzcountShiftBool -/// \brief Simplify equality checks that use lzcount. +/// \brief Simplify equality checks that use lzcount: `lzcount(X) >> c => X == 0` if X is 2^c bits wide /// /// Some compilers check if a value is equal to zero by checking the most /// significant bit in lzcount; for instance on a 32-bit system, -/// it being equal to 32 would have the 5th bit set. +/// the result of lzcount on zero would have the 5th bit set. /// - `lzcount(a ^ 3) >> 5 => a ^ 3 == 0 => a == 3` (by RuleXorCollapse) /// - `lzcount(a - 3) >> 5 => a - 3 == 0 => a == 3` (by RuleEqual2Zero) void RuleLzcountShiftBool::getOpList(vector &oplist) const @@ -10170,7 +10170,6 @@ int4 RuleLzcountShiftBool::applyOp(PcodeOp *op,Funcdata &data) // CPUI_INT_EQUAL must produce a 1-byte boolean result Varnode* eqResVn = data.newUniqueOut(1, newOp); - data.opSetOutput(newOp, eqResVn); data.opInsertBefore(newOp, baseOp); @@ -10178,7 +10177,10 @@ int4 RuleLzcountShiftBool::applyOp(PcodeOp *op,Funcdata &data) // we have to guarantee that a Varnode of this size gets outputted // to the descending PcodeOps. This is handled here with CPUI_INT_ZEXT. data.opRemoveInput(baseOp, 1); - data.opSetOpcode(baseOp, CPUI_INT_ZEXT); + if (baseOp->getOut()->getSize() == 1) + data.opSetOpcode(baseOp, CPUI_COPY); + else + data.opSetOpcode(baseOp, CPUI_INT_ZEXT); data.opSetInput(baseOp, eqResVn, 0); return 1; } diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.cc index 746d70a815..6a57bcc0fd 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.cc @@ -77,7 +77,7 @@ /* Copy the first part of user declarations. */ -#line 16 "slghparse.y" /* yacc.c:339 */ + #include "slgh_compile.hh" @@ -90,7 +90,7 @@ extern int yylex(void); extern int yyerror(const char *str ); -#line 79 "slghparse.cc" /* yacc.c:339 */ + # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus @@ -172,71 +172,72 @@ extern int yydebug; 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, - NEXT2SYM = 366, - MACROSYM = 367, - LABELSYM = 368, - SUBTABLESYM = 369 + OP_LZCOUNT = 305, + BADINTEGER = 306, + GOTO_KEY = 307, + CALL_KEY = 308, + RETURN_KEY = 309, + IF_KEY = 310, + DEFINE_KEY = 311, + ATTACH_KEY = 312, + MACRO_KEY = 313, + SPACE_KEY = 314, + TYPE_KEY = 315, + RAM_KEY = 316, + DEFAULT_KEY = 317, + REGISTER_KEY = 318, + ENDIAN_KEY = 319, + WITH_KEY = 320, + ALIGN_KEY = 321, + OP_UNIMPL = 322, + TOKEN_KEY = 323, + SIGNED_KEY = 324, + NOFLOW_KEY = 325, + HEX_KEY = 326, + DEC_KEY = 327, + BIG_KEY = 328, + LITTLE_KEY = 329, + SIZE_KEY = 330, + WORDSIZE_KEY = 331, + OFFSET_KEY = 332, + NAMES_KEY = 333, + VALUES_KEY = 334, + VARIABLES_KEY = 335, + PCODEOP_KEY = 336, + IS_KEY = 337, + LOCAL_KEY = 338, + DELAYSLOT_KEY = 339, + CROSSBUILD_KEY = 340, + EXPORT_KEY = 341, + BUILD_KEY = 342, + CONTEXT_KEY = 343, + ELLIPSIS_KEY = 344, + GLOBALSET_KEY = 345, + BITRANGE_KEY = 346, + CHAR = 347, + INTEGER = 348, + INTB = 349, + STRING = 350, + SYMBOLSTRING = 351, + SPACESYM = 352, + SECTIONSYM = 353, + TOKENSYM = 354, + USEROPSYM = 355, + VALUESYM = 356, + VALUEMAPSYM = 357, + CONTEXTSYM = 358, + NAMESYM = 359, + VARSYM = 360, + BITSYM = 361, + SPECSYM = 362, + VARLISTSYM = 363, + OPERANDSYM = 364, + STARTSYM = 365, + ENDSYM = 366, + NEXT2SYM = 367, + MACROSYM = 368, + LABELSYM = 369, + SUBTABLESYM = 370 }; #endif @@ -245,7 +246,7 @@ extern int yydebug; union YYSTYPE { -#line 29 "slghparse.y" /* yacc.c:355 */ + char ch; uintb *i; @@ -290,7 +291,7 @@ union YYSTYPE FamilySymbol *famsym; SpecificSymbol *specsym; -#line 279 "slghparse.cc" /* yacc.c:355 */ + }; typedef union YYSTYPE YYSTYPE; @@ -307,7 +308,7 @@ int yyparse (void); /* Copy the second part of user declarations. */ -#line 296 "slghparse.cc" /* yacc.c:358 */ + #ifdef short # undef short @@ -549,21 +550,21 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2617 +#define YYLAST 2665 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 138 +#define YYNTOKENS 139 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 71 /* YYNRULES -- Number of rules. */ -#define YYNRULES 341 +#define YYNRULES 342 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 716 +#define YYNSTATES 720 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 369 +#define YYMAXUTOK 370 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -575,16 +576,16 @@ 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, 137, 43, 2, 2, 2, 38, 11, 2, - 130, 131, 36, 32, 132, 33, 2, 37, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 136, 8, - 17, 129, 18, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 138, 43, 2, 2, 2, 38, 11, 2, + 131, 132, 36, 32, 133, 33, 2, 37, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 137, 8, + 17, 130, 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, 133, 2, 134, 9, 2, 2, 2, 2, 2, + 2, 134, 2, 135, 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, 135, 6, 128, 44, 2, 2, 2, + 2, 2, 2, 136, 6, 129, 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, @@ -608,7 +609,8 @@ static const yytype_uint8 yytranslate[] = 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, 127 + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128 }; #if YYDEBUG @@ -639,17 +641,17 @@ static const yytype_uint16 yyrline[] = 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, 451, 452, - 454, 455, 456, 457, 459, 460, 461, 462, 463, 464, - 465, 466, 467, 469, 470, 471, 472, 474, 475, 476, - 477, 478, 480, 481, 482, 484, 485, 487, 488, 489, - 490, 491, 492, 494, 495, 496, 497, 498, 500, 501, - 502, 503, 504, 505, 507, 508, 510, 511, 512, 514, - 515, 516, 518, 519, 520, 523, 524, 526, 527, 528, - 530, 532, 533, 534, 535, 537, 538, 539, 541, 542, - 543, 544, 545, 547, 548, 550, 551, 553, 554, 557, - 558, 559, 561, 562, 563, 565, 566, 567, 568, 569, + 453, 455, 456, 457, 458, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 470, 471, 472, 473, 475, 476, + 477, 478, 479, 481, 482, 483, 485, 486, 488, 489, + 490, 491, 492, 493, 495, 496, 497, 498, 499, 501, + 502, 503, 504, 505, 506, 508, 509, 511, 512, 513, + 515, 516, 517, 519, 520, 521, 524, 525, 527, 528, + 529, 531, 533, 534, 535, 536, 538, 539, 540, 542, + 543, 544, 545, 546, 548, 549, 551, 552, 554, 555, + 558, 559, 560, 562, 563, 564, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, - 580, 581 + 580, 581, 582 }; #endif @@ -668,21 +670,21 @@ static const char *const yytname[] = "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", "NEXT2SYM", "MACROSYM", - "LABELSYM", "SUBTABLESYM", "'}'", "'='", "'('", "')'", "','", "'['", - "']'", "'{'", "':'", "' '", "$accept", "spec", "definition", + "OP_TRUNC", "OP_CPOOLREF", "OP_NEW", "OP_POPCOUNT", "OP_LZCOUNT", + "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", "NEXT2SYM", + "MACROSYM", "LABELSYM", "SUBTABLESYM", "'}'", "'='", "'('", "')'", "','", + "'['", "']'", "'{'", "':'", "' '", "$accept", "spec", "definition", "constructorlike", "endiandef", "aligndef", "tokendef", "tokenprop", "contextdef", "contextprop", "fielddef", "contextfielddef", "spacedef", "spaceprop", "varnodedef", "bitrangedef", "bitrangelist", @@ -717,97 +719,97 @@ static const yytype_uint16 yytoknum[] = 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, 369, 125, 61, - 40, 41, 44, 91, 93, 123, 58, 32 + 362, 363, 364, 365, 366, 367, 368, 369, 370, 125, + 61, 40, 41, 44, 91, 93, 123, 58, 32 }; # endif -#define YYPACT_NINF -316 +#define YYPACT_NINF -339 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-316))) + (!!((Yystate) == (-339))) -#define YYTABLE_NINF -272 +#define YYTABLE_NINF -273 #define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-272))) + (!!((Yytable_value) == (-273))) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { - -39, -23, 8, -316, -41, -316, 2, 88, 245, 0, - -38, -37, -14, -316, -316, -316, -316, -316, 426, -316, - 453, -316, 62, -316, -316, -316, -316, -316, -316, -316, - -316, 49, -316, 10, -316, 16, 191, 123, -316, -316, - 2427, 70, 2446, -21, 111, 189, 204, -61, -61, -61, - 173, -316, -316, 171, -316, -316, -316, 182, -316, -316, - -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, - -316, -316, -316, -316, -316, 203, 185, -316, 193, 186, - 210, -316, 213, -316, 217, 231, 220, -316, -316, -316, - -316, -316, 211, -316, -316, -316, -316, 214, -316, 211, - -316, -316, -316, 214, 336, 347, -316, -316, 289, 267, - -316, -316, 297, 400, -316, 284, 55, -316, 295, -316, - -316, 159, 299, 47, -24, 315, 211, 308, -316, -316, - -316, 310, 349, -316, -316, -316, -316, 353, 215, 372, - 373, 364, 1692, 1754, -316, -316, -316, -316, -316, -316, - 369, -316, 211, 15, -316, -316, 395, -316, 26, -316, - 15, -316, -316, 492, 401, -316, 2302, -316, 396, -316, - -316, -57, -316, -316, -34, 2467, 497, 409, -316, 9, - 507, -316, -85, 509, -316, 261, 385, 190, 414, 415, - 417, 418, -316, -316, -316, -316, -316, 293, -70, 21, - -316, 388, 1613, 5, 1556, 226, 399, 1577, 304, 424, - 394, 50, 422, -316, 425, -316, -316, -316, -316, -316, - 429, -58, -316, 1556, -40, -316, 41, -316, 60, -316, - 1662, 27, 211, 211, 211, -316, -51, -316, 1662, 1662, - 1662, 1662, 1662, 1662, -51, -316, 441, -316, -316, -316, - 446, -316, 468, -316, -316, -316, -316, -316, 2328, -316, - -316, -316, 451, -316, -316, -13, -316, -316, -316, -43, - -316, -316, 450, 455, 449, 459, 461, 463, -316, -316, - 525, -316, -316, 613, 615, 526, 565, -316, 538, -316, - -316, -316, -316, -316, 1556, 665, -316, 1556, 667, -316, - 1556, 1556, 1556, 1556, 1556, 576, 577, 582, 585, 622, - 625, 658, 659, 669, 704, 709, 744, 749, 784, 785, - 820, 825, 826, -316, 1556, 1822, 1556, -316, 54, 3, - 584, 648, 703, 380, 661, 909, -316, 367, 952, -316, - 987, 770, 1556, 891, 1556, 1556, 1556, 1512, 895, 930, - 1556, 931, 1662, 1662, -316, 1662, 423, -316, -316, -316, - 167, 1029, -316, 187, -316, -316, -316, 423, 423, 423, - 423, 423, 423, -316, 995, 971, 992, -316, -316, -316, - -316, 972, -316, -316, -316, -316, -316, -316, -316, -316, - 976, 1011, 1012, 1051, 1577, -316, -316, 1023, -316, 1052, - 348, -316, 583, -316, 623, -316, -316, -316, -316, 1556, - 1556, 1556, 1556, 1556, 1556, 1556, 1556, 1556, 1556, 1556, - 1556, 1556, 1556, 1556, 1556, 1556, 1556, 827, 1556, 1556, - 1556, 1556, 1556, 1556, 1556, 1556, 1556, 1556, 1556, 1556, - 1556, 1556, 1556, 1556, 1556, 1556, 1556, 1556, 1556, 1556, - 1556, 1556, 1556, 1556, 1556, 1556, 1556, 1556, 1556, 1556, - 1556, 1556, 1556, 1556, 1700, -316, -8, 1087, 1092, -316, - 1556, 1093, -316, 1071, 85, 1132, -316, 1133, 1234, -316, - 1269, -316, -316, -316, -316, 1874, 1153, 2194, 271, 1914, - 275, 1556, 1147, 1184, 1954, 1186, -316, -316, 29, 1662, - 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1189, -316, - 1194, 1229, -316, -316, -316, 39, 1274, 1227, 1258, -316, - 1267, 1268, 1303, 1308, -316, 1304, 1310, 1471, 1476, 1511, - 867, 705, 907, 745, 787, 948, 988, 1028, 1069, 1109, - 1149, 1190, 1230, 1270, 287, 663, 1311, 305, -316, 2233, - 2270, 2270, 2304, 2336, 2366, 2465, 2465, 2465, 2465, 2491, - 2491, 2491, 2491, 2491, 2491, 2491, 2491, 2491, 2491, 2491, - 2491, 2575, 2575, 2575, 408, 408, 408, 408, -316, -316, - -316, -316, -316, -316, -316, 1516, 1349, 1388, -316, 1994, - 4, 1549, 1551, 1553, 1577, -316, -316, -316, 1556, 1554, - 1556, -316, 1557, 2034, -316, -316, -316, 1459, -316, 2444, - 2435, 495, 273, 273, 421, 421, -316, -316, 2482, 1662, - 1662, 1626, 117, -316, -316, 387, 1461, -21, -316, -316, - -316, -316, 1463, -316, -316, -316, -316, -316, 1556, -316, - 1556, 1556, -316, -316, -316, -316, -316, -316, -316, -316, - -316, -316, -316, 1556, -316, -316, -316, -316, 1464, -316, - -316, 1556, -316, -316, -316, -316, 2074, -316, 2194, -316, - -316, 1436, 1439, 1440, 1548, 1615, -316, -316, 1543, 1544, - -316, -316, 1441, 1568, -316, 1351, 1391, 1432, 1472, 1445, - 2114, -316, 1453, 1468, 1475, -316, -316, -316, -316, -316, - -316, -316, -316, -316, -316, -316, -316, 1556, 1455, 1456, - 2154, 1585, 1586, -316, -316, -316 + -20, 14, 11, -339, -32, -339, -3, 213, 336, 6, + -75, -4, 12, -339, -339, -339, -339, -339, 425, -339, + 1512, -339, 216, -339, -339, -339, -339, -339, -339, -339, + -339, 39, -339, -31, -339, 27, 50, 98, -339, -339, + 2499, 47, 2518, -82, 61, 101, 185, -21, -21, -21, + 137, -339, -339, 151, -339, -339, -339, 165, -339, -339, + -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, + -339, -339, -339, -339, -339, 244, 167, -339, 171, 253, + 186, -339, 200, -339, 220, 266, 230, -339, -339, -339, + -339, -339, 2345, -339, -339, -339, -339, 297, -339, 2345, + -339, -339, -339, 297, 314, 400, -339, -339, 311, 288, + -339, -339, 317, 424, -339, 307, -2, -339, 331, -339, + -339, 7, 300, -23, -93, 334, 2345, 329, -339, -339, + -339, 332, 344, -339, -339, -339, -339, 345, 95, 356, + 371, 349, 1667, 399, -339, -339, -339, -339, -339, -339, + 357, -339, 2345, 16, -339, -339, 378, -339, 56, -339, + 16, -339, -339, 478, 382, -339, 2367, -339, 375, -339, + -339, -19, -339, -339, 192, 2537, 504, 411, -339, 10, + 510, -339, -61, 514, -339, 68, 389, 304, 418, 419, + 420, 422, -339, -339, -339, -339, -339, 287, -71, -22, + -339, 330, 1546, 23, 446, 1538, 401, 74, 1596, 423, + 426, -38, 429, -339, 427, -339, -339, -339, -339, -339, + 436, -76, -339, 446, -53, -339, 57, -339, 59, -339, + 1696, 24, 2345, 2345, 2345, -339, -59, -339, 1696, 1696, + 1696, 1696, 1696, 1696, -59, -339, 440, -339, -339, -339, + 397, -339, 467, -339, -339, -339, -339, -339, 2393, -339, + -339, -339, 474, -339, -339, 55, -339, -339, -339, 178, + -339, -339, 465, 445, 451, 452, 461, 462, -339, -339, + 491, -339, -339, 581, 616, 525, 531, -339, 505, -339, + -339, -339, -339, -339, 446, 666, -339, 446, 669, -339, + 446, 446, 446, 446, 446, 544, 548, 579, 580, 586, + 589, 626, 629, 662, 663, 671, 673, 704, 709, 714, + 749, 754, 789, 790, -339, 446, 1819, 446, -339, 44, + 0, 582, 612, 625, 298, 744, 915, -339, 1491, 952, + -339, 955, 735, 446, 855, 446, 446, 446, 1553, 894, + 895, 446, 897, 1696, 1696, -339, 1696, 2379, -339, -339, + -339, 279, 1029, -339, 217, -339, -339, -339, 2379, 2379, + 2379, 2379, 2379, 2379, -339, 964, 937, 950, -339, -339, + -339, -339, 975, -339, -339, -339, -339, -339, -339, -339, + -339, 977, 1014, 1015, 1017, 74, -339, -339, 1025, -339, + 1051, 350, -339, 587, -339, 627, -339, -339, -339, -339, + 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, + 446, 446, 446, 446, 446, 446, 446, 446, 446, 833, + 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, + 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, + 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, + 446, 446, 446, 446, 446, 446, 1584, -339, 60, 1057, + 1094, -339, 446, 1095, -339, 1071, -45, 1134, -339, 1135, + 1235, -339, 1272, -339, -339, -339, -339, 1872, 1151, 2192, + 96, 1912, 225, 446, 1188, 1191, 1952, 1150, -339, -339, + 32, 1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696, + 1192, -339, 1230, 1231, -339, -339, -339, -9, 1270, 1268, + 1257, -339, 1271, 1308, 1309, 1311, -339, 1343, 1346, 1475, + 1515, 1552, 873, 710, 913, 750, 792, 953, 993, 1033, + 1073, 1113, 1153, 1193, 1233, 1273, 267, 667, 1313, 1353, + 281, -339, 2231, 2268, 2268, 2302, 2334, 2404, 2512, 2512, + 2512, 2512, 2538, 2538, 2538, 2538, 2538, 2538, 2538, 2538, + 2538, 2538, 2538, 2538, 2416, 2416, 2416, 409, 409, 409, + 409, -339, -339, -339, -339, -339, -339, -339, 1588, 1389, + 1428, -339, 1992, 30, 1589, 1590, 1592, 74, -339, -339, + -339, 446, 1594, 446, -339, 1595, 2032, -339, -339, -339, + 1498, -339, 546, 2569, 312, 237, 237, 394, 394, -339, + -339, 1748, 1696, 1696, 1630, 235, -339, -339, 353, 1500, + -82, -339, -339, -339, -339, 1502, -339, -339, -339, -339, + -339, 446, -339, 446, 446, -339, -339, -339, -339, -339, + -339, -339, -339, -339, -339, -339, 446, -339, -339, -339, + -339, -339, 1506, -339, -339, 446, -339, -339, -339, -339, + 2072, -339, 2192, -339, -339, 1482, 1485, 1488, 1769, 2370, + -339, -339, 1609, 1612, -339, -339, 1508, 1636, -339, 1393, + 1433, 1473, 1513, 1514, 2112, -339, 1520, 1535, 1537, -339, + -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, + -339, 446, 1523, 1525, 2152, 1656, 1657, -339, -339, -339 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -820,86 +822,86 @@ static const yytype_uint16 yydefact[] = 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, 325, 326, - 327, 328, 331, 332, 333, 334, 335, 341, 336, 337, - 338, 339, 340, 329, 330, 27, 0, 29, 0, 31, + 0, 69, 68, 0, 88, 87, 23, 0, 326, 327, + 328, 329, 332, 333, 334, 335, 336, 342, 337, 338, + 339, 340, 341, 330, 331, 27, 0, 29, 0, 31, 0, 43, 0, 50, 0, 0, 0, 66, 64, 65, - 145, 82, 0, 284, 83, 86, 85, 84, 81, 0, + 145, 82, 0, 285, 83, 86, 85, 84, 81, 0, 78, 80, 90, 79, 0, 0, 44, 45, 0, 0, - 28, 296, 0, 0, 30, 0, 0, 54, 0, 306, - 307, 0, 0, 0, 0, 322, 70, 0, 34, 35, + 28, 297, 0, 0, 30, 0, 0, 54, 0, 307, + 308, 0, 0, 0, 0, 323, 70, 0, 34, 35, 36, 0, 0, 39, 40, 41, 42, 0, 0, 0, - 0, 0, 140, 0, 273, 274, 275, 276, 124, 277, - 123, 126, 0, 127, 106, 111, 113, 114, 125, 285, - 127, 20, 21, 0, 0, 297, 0, 57, 0, 53, - 55, 0, 308, 309, 0, 0, 0, 0, 287, 0, - 0, 314, 0, 0, 323, 0, 127, 71, 0, 0, - 0, 0, 46, 47, 48, 49, 61, 0, 0, 243, - 258, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 257, 255, 0, 278, 0, 279, 280, 281, 282, 283, - 0, 256, 146, 0, 0, 254, 0, 173, 253, 110, + 0, 0, 140, 0, 274, 275, 276, 277, 124, 278, + 123, 126, 0, 127, 106, 111, 113, 114, 125, 286, + 127, 20, 21, 0, 0, 298, 0, 57, 0, 53, + 55, 0, 309, 310, 0, 0, 0, 0, 288, 0, + 0, 315, 0, 0, 324, 0, 127, 71, 0, 0, + 0, 0, 46, 47, 48, 49, 61, 0, 0, 244, + 259, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 258, 256, 0, 279, 0, 280, 281, 282, 283, 284, + 0, 257, 146, 0, 0, 255, 0, 173, 254, 110, 0, 0, 0, 0, 0, 129, 0, 112, 0, 0, - 0, 0, 0, 0, 0, 22, 0, 298, 295, 299, - 0, 52, 0, 312, 310, 311, 305, 301, 0, 302, - 59, 288, 0, 289, 291, 0, 58, 316, 315, 0, - 60, 72, 0, 0, 0, 0, 0, 0, 255, 256, - 0, 260, 253, 0, 0, 0, 0, 248, 247, 252, - 249, 244, 245, 246, 0, 0, 251, 0, 0, 170, + 0, 0, 0, 0, 0, 22, 0, 299, 296, 300, + 0, 52, 0, 313, 311, 312, 306, 302, 0, 303, + 59, 289, 0, 290, 292, 0, 58, 317, 316, 0, + 60, 72, 0, 0, 0, 0, 0, 0, 256, 257, + 0, 261, 254, 0, 0, 0, 0, 249, 248, 253, + 250, 245, 246, 247, 0, 0, 252, 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, 253, 0, - 0, 0, 0, 0, 0, 143, 272, 0, 0, 267, - 0, 0, 0, 0, 319, 0, 319, 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, 303, 300, 304, - 290, 0, 292, 294, 286, 318, 317, 313, 324, 62, - 0, 0, 0, 0, 0, 266, 265, 0, 242, 0, - 0, 165, 0, 168, 0, 189, 216, 202, 190, 0, + 0, 0, 0, 0, 238, 0, 0, 0, 174, 254, + 0, 0, 0, 0, 0, 0, 143, 273, 0, 0, + 268, 0, 0, 0, 0, 320, 0, 320, 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, 304, 301, + 305, 291, 0, 293, 295, 287, 319, 318, 314, 325, + 62, 0, 0, 0, 0, 0, 267, 266, 0, 243, + 0, 0, 165, 0, 168, 0, 189, 216, 202, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 319, 0, 0, 319, 0, 0, 0, + 0, 0, 0, 0, 320, 0, 0, 0, 320, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 268, 0, 144, 264, - 0, 262, 141, 161, 259, 0, 0, 320, 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, 293, - 0, 0, 0, 0, 261, 241, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 175, 0, 0, + 0, 147, 0, 0, 154, 0, 0, 0, 269, 0, + 144, 265, 0, 263, 141, 161, 260, 0, 0, 321, + 0, 0, 0, 0, 0, 0, 0, 0, 104, 105, 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, 270, 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, 250, 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, 269, 0, 156, 321, 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 + 0, 134, 0, 0, 128, 138, 145, 0, 0, 0, + 0, 294, 0, 0, 0, 0, 262, 242, 0, 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, 236, 0, 0, 0, 0, 0, 0, 271, 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, 251, 167, 169, 171, + 220, 0, 219, 0, 0, 226, 217, 218, 228, 229, + 230, 225, 224, 227, 240, 231, 0, 233, 234, 239, + 166, 235, 0, 150, 148, 0, 164, 163, 162, 270, + 0, 156, 322, 172, 155, 0, 0, 0, 0, 0, + 74, 139, 0, 0, 26, 25, 0, 0, 241, 0, + 0, 0, 0, 0, 0, 153, 0, 0, 0, 130, + 133, 135, 136, 56, 51, 221, 222, 223, 232, 237, + 152, 0, 0, 0, 0, 0, 0, 157, 131, 132 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -316, -316, 1564, 1565, -316, -316, -316, -316, -316, -316, - -316, -316, -316, -316, -316, -316, -316, 1481, -316, -316, - -316, -316, -316, -316, -316, -316, -316, -316, -316, 1354, - -316, -316, -316, -224, -69, -316, 1477, -316, -316, -73, - -316, 1000, -316, -316, 1259, 1112, -316, -199, -141, -198, - -60, 1162, 1292, -140, -316, -92, -36, 1595, -316, -316, - 1005, -316, -316, -316, 427, -316, -316, -316, -315, -316, - 7 + -339, -339, 1641, 1642, -339, -339, -339, -339, -339, -339, + -339, -339, -339, -339, -339, -339, -339, 1551, -339, -339, + -339, -339, -339, -339, -339, -339, -339, -339, -339, 1430, + -339, -339, -339, -225, -80, -339, 1532, -339, -339, -131, + -339, 1052, -339, -339, 1315, 1161, -339, -200, -141, -199, + -63, 1211, 1344, -140, -339, -92, -35, 1649, -339, -339, + 1056, -339, -339, -339, 410, -339, -339, -339, -338, -339, + 8 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -907,11 +909,11 @@ static const yytype_int16 yydefgoto[] = { -1, 2, 14, 15, 3, 16, 17, 18, 19, 20, 75, 79, 21, 22, 23, 24, 116, 117, 25, 26, - 27, 28, 29, 30, 31, 32, 53, 186, 33, 366, - 34, 35, 36, 356, 153, 154, 155, 156, 157, 236, - 363, 624, 513, 514, 141, 142, 222, 487, 326, 295, - 327, 225, 226, 296, 338, 357, 328, 97, 180, 265, - 113, 166, 176, 258, 122, 174, 183, 269, 488, 185, + 27, 28, 29, 30, 31, 32, 53, 186, 33, 367, + 34, 35, 36, 357, 153, 154, 155, 156, 157, 236, + 364, 627, 515, 516, 141, 142, 222, 489, 327, 295, + 328, 225, 226, 296, 339, 358, 329, 97, 180, 265, + 113, 166, 176, 258, 122, 174, 183, 269, 490, 185, 76 }; @@ -920,652 +922,662 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 158, 223, 227, 197, 298, 325, 251, 158, 5, 6, - 38, 469, 660, 299, 367, 368, 369, 370, 371, 372, - 381, 232, 267, 233, 347, 91, 234, 80, 364, 1, - 160, 490, 268, 232, 158, 233, 499, 283, 234, 500, - 238, 501, 262, 239, 240, 241, 242, 107, 252, 110, - 6, 158, 119, 4, 120, 200, 284, 187, 502, 503, - 158, 504, 505, 169, 385, 506, 507, 337, 622, 51, - 81, -264, 121, 253, 386, -264, 7, 8, 9, 254, - 177, 255, 224, 231, 365, 10, 111, 244, 37, 52, - 348, 387, 382, 181, 383, 400, 349, 210, 402, 54, - 256, 404, 405, 406, 407, 408, 228, 50, 544, 182, - 92, 547, 112, 273, 263, 11, 264, 86, 8, 9, - 93, 384, 55, 94, 95, 427, 10, 465, 496, 497, - 39, 498, 470, 661, 82, 12, 83, 281, 300, 471, - 158, 158, 158, 485, 13, 90, 489, 332, 235, 84, - 85, 494, 178, 96, 285, 243, 11, 286, 359, 40, - 608, 282, 115, 360, 361, 362, 41, 623, 42, 330, - 350, 282, 339, 249, 351, 233, 12, 87, 234, 342, - 179, 43, 259, -263, 466, 13, 343, 467, 44, -262, - 468, 45, 592, -262, 358, 593, 232, 46, 233, 108, - 98, 234, 358, 358, 358, 358, 358, 358, 104, 105, - 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, - 540, 541, 542, 543, 678, 545, 546, 679, 114, 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, 582, 583, 584, 379, 585, 133, 134, 135, - 136, 589, 172, 476, 173, 609, 610, 611, 612, 613, - 614, 615, 616, 617, 128, 99, 129, 130, 192, 508, - 193, 40, 603, 118, 509, 93, 115, 282, 100, 101, - 42, 481, 510, 125, 197, 504, 505, 126, 511, 506, - 507, 127, 143, 43, 131, 333, 358, 358, 159, 358, - 44, 512, 132, 45, 144, 145, 146, 147, 102, 46, - 148, 149, 150, 329, 524, 47, 48, 49, 151, 137, - 199, 152, 138, 213, 161, 215, 139, 216, 217, 218, - 219, 428, 429, 430, 431, 162, 200, 432, 282, 433, - 140, 434, 435, 436, 437, 438, 439, 440, 441, 442, + 158, 223, 227, 298, 326, 38, 169, 158, 471, 492, + 177, 5, 6, 368, 369, 370, 371, 372, 373, 160, + 625, 365, 232, 348, 233, 181, 111, 234, 80, 244, + 232, 299, 233, 51, 158, 234, 91, 283, 664, 501, + 6, 182, 502, 262, 503, 251, 187, 267, 107, 1, + 110, 158, 112, 52, -265, 273, 284, 268, -265, 98, + 158, 504, 505, 595, 506, 507, 596, 338, 508, 509, + 238, 197, 231, 239, 240, 241, 242, 366, 349, 224, + 7, 8, 9, 178, 350, 197, 546, 252, 382, 10, + 550, 4, 343, 119, 401, 120, -264, 403, 37, 344, + 405, 406, 407, 408, 409, 90, 115, 228, 86, 8, + 9, 179, 285, 121, 50, 286, 263, 10, 264, 11, + 626, 172, 92, 173, 200, 429, 39, 467, 498, 499, + 472, 500, 93, 54, 281, 94, 95, 473, 200, 12, + 158, 158, 158, 487, 333, 99, 491, 11, 13, 55, + 235, 496, 361, 362, 363, 93, 360, 300, 100, 101, + 665, 383, 282, 384, 611, 96, 210, 12, 87, 192, + 331, 193, 282, 340, 249, 468, 13, 108, 469, 114, + 210, 470, 278, 259, 104, 105, 243, 351, 102, -263, + 385, 352, 213, -263, 215, 359, 216, 217, 218, 219, + 271, 272, 279, 359, 359, 359, 359, 359, 359, 115, + 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, + 542, 543, 544, 545, 81, 547, 548, 549, 602, 603, + 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, + 582, 583, 584, 585, 586, 587, 380, 588, 125, 506, + 507, 478, 592, 508, 509, 118, 612, 613, 614, 615, + 616, 617, 618, 619, 620, 40, 386, 233, 126, 82, + 234, 83, 41, 606, 42, 127, 387, 131, 197, 282, + 253, 132, 40, 483, 84, 85, 254, 43, 255, 197, + 232, 42, 233, 388, 44, 234, 137, 45, 359, 359, + 510, 359, 161, 46, 43, 511, 128, 256, 129, 130, + 138, 44, 526, 512, 45, 133, 134, 135, 136, 513, + 46, 504, 505, 682, 506, 507, 683, 198, 508, 509, + 139, 200, 514, 430, 431, 432, 433, 605, 603, 434, + 282, 435, 200, 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, 461, 462, - 463, 197, 271, 272, 163, 674, 675, 164, 210, 666, - 278, 668, 599, 600, 165, 198, 602, 600, 167, 334, - 213, 335, 215, 168, 216, 217, 218, 219, 651, 600, - 279, 213, 184, 215, 171, 216, 217, 218, 219, 280, - 499, 336, 175, 500, 56, 501, 655, 600, 188, 685, - 189, 686, 687, 200, 457, 458, 459, 460, 461, 462, - 463, 287, 502, 503, 688, 504, 505, 506, 507, 506, - 507, 77, 690, 358, 358, 358, 358, 358, 358, 358, - 358, 358, 680, 681, 478, 123, 124, 194, 195, 190, - 223, 227, 527, 191, 213, 210, 215, 278, 216, 217, - 218, 219, 196, 288, 479, 289, 237, 213, 230, 215, - 245, 216, 217, 218, 219, 260, 246, 279, 710, 290, - 291, 292, 293, 250, 261, 266, 475, 270, 235, 274, - 275, 294, 276, 277, 502, 503, 672, 504, 505, 331, - 341, 506, 507, 57, 665, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 340, 68, 69, 70, 71, - 72, 73, 344, 74, 345, 376, 380, 388, 282, 346, - 78, 224, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 374, 68, 69, 70, 71, 72, 73, 375, - 74, 390, 673, 358, 358, 228, 428, 429, 430, 431, - 389, 391, 432, 392, 433, 393, 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, 461, 462, 463, 428, 429, 430, 431, - 394, 395, 432, 396, 433, 397, 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, 461, 462, 463, 428, 429, 430, 431, - 398, 399, 432, 401, 433, 403, 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, 461, 462, 463, 409, 410, 428, 429, - 430, 431, 411, 472, 432, 412, 433, 528, 434, 435, + 463, 464, 465, 210, 287, 278, 140, 678, 679, 654, + 603, 670, 159, 672, 210, 213, 278, 215, 162, 216, + 217, 218, 219, 659, 603, 279, 213, 163, 215, 164, + 216, 217, 218, 219, 280, 165, 279, 47, 48, 49, + 508, 509, 167, 56, 175, 477, 288, 168, 289, 684, + 685, 689, 184, 690, 691, 459, 460, 461, 462, 463, + 464, 465, 290, 291, 292, 293, 692, 197, 123, 124, + 188, 171, 194, 189, 294, 694, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 190, 191, 195, 196, 301, + 237, 302, 199, 223, 227, 529, 245, 230, 246, 303, + 304, 305, 306, 250, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 200, 714, 260, 144, 145, 146, 147, 261, 266, 148, + 149, 150, 270, 235, 274, 275, 276, 151, 277, 676, + 152, 376, 332, 57, 669, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 341, 68, 69, 70, 71, + 72, 73, 210, 74, 278, 377, 502, 346, 503, 323, + 345, 224, 282, 342, 213, 324, 215, 347, 216, 217, + 218, 219, 375, 389, 279, 504, 505, 325, 506, 507, + 381, 390, 508, 509, 391, 392, 677, 359, 359, 228, + 430, 431, 432, 433, 393, 394, 434, 395, 435, 396, 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, 461, 462, 463, 428, 429, - 430, 431, 413, 473, 432, 414, 433, 529, 434, 435, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, + 430, 431, 432, 433, 397, 398, 434, 399, 435, 400, 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, 461, 462, 463, 415, 416, - 428, 429, 430, 431, 652, 653, 432, 477, 433, 417, - 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, 461, 462, 463, - 428, 429, 430, 431, 418, 474, 432, 638, 433, 419, - 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, 461, 462, 463, - 428, 429, 430, 431, 420, 484, 432, 640, 433, 421, - 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, 461, 462, 463, - 428, 429, 430, 431, 422, 423, 432, -271, 433, 641, - 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, 461, 462, 463, - 424, 428, 429, 430, 431, 425, 426, 432, 548, 433, - 482, 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, 461, 462, - 463, 428, 429, 430, 431, 483, 486, 432, 637, 433, - 492, 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, 461, 462, - 463, 428, 429, 430, 431, 493, 495, 432, 639, 433, - 234, 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, 461, 462, - 463, 516, 428, 429, 430, 431, 517, 519, 432, 642, - 433, 520, 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, 461, - 462, 463, 428, 429, 430, 431, 521, 522, 432, 643, - 433, 518, 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, 461, - 462, 463, 428, 429, 430, 431, 523, 525, 432, 644, - 433, 526, 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, 461, - 462, 463, 587, 428, 429, 430, 431, 588, 590, 432, - 645, 433, 591, 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, - 461, 462, 463, 428, 429, 430, 431, 594, 595, 432, - 646, 433, -263, 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, - 461, 462, 463, 428, 429, 430, 431, 596, 604, 432, - 647, 433, 598, 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, - 461, 462, 463, 605, 428, 429, 430, 431, 607, 618, - 432, 648, 433, 619, 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, 461, 462, 463, 428, 429, 430, 431, 620, 626, - 432, 649, 433, 627, 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, 461, 462, 463, 428, 429, 430, 431, 628, 629, - 432, 650, 433, 625, 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, 461, 462, 463, 630, 428, 429, 430, 431, 631, - 632, 432, 654, 433, 633, 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, 461, 462, 463, 428, 429, 430, 431, 634, - 657, 432, 701, 433, 635, 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, 461, 462, 463, 428, 429, 430, 431, 636, - 658, 432, 702, 433, 656, 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, 461, 462, 463, 499, 695, 662, 500, 663, - 501, 664, 667, 703, 671, 669, 682, 197, 684, 689, - 692, 693, 694, 697, 698, 699, 700, 502, 503, 705, - 504, 505, 707, 708, 506, 507, 711, 712, 197, 301, - 709, 302, 199, 714, 715, 88, 89, 170, 373, 303, - 304, 305, 306, 704, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, 318, 319, 320, 321, 200, - 229, 677, 499, 696, 515, 500, 621, 501, 586, 480, - 198, 103, 683, 0, 0, 0, 0, 197, 0, 0, - 200, 491, 0, 198, 502, 503, 0, 504, 505, 0, - 0, 506, 507, 0, 0, 622, 0, 0, 0, 0, - 0, 210, 199, 278, 0, 0, 0, 0, 322, 0, - 0, 0, 0, 213, 323, 215, 287, 216, 217, 218, - 219, 0, 210, 279, 278, 0, 324, 0, 0, 200, - 201, 202, 203, 204, 213, 352, 215, 0, 216, 217, - 218, 219, 0, 197, 279, 0, 353, 0, 0, 198, - 0, 0, 0, 0, 0, 0, 0, 198, 288, 0, - 289, 205, 206, 207, 0, 209, 0, 0, 199, 0, - 0, 210, 0, 211, 290, 291, 292, 293, 212, 0, - 0, 0, 0, 213, 214, 215, 297, 216, 217, 218, - 219, 220, 0, 221, 676, 200, 201, 202, 203, 204, - 0, 0, 0, 287, 0, 0, 0, 0, 354, 0, - 0, 0, 0, 0, 0, 144, 145, 146, 147, 213, - 0, 215, 149, 216, 217, 218, 219, 205, 206, 207, - 208, 209, 355, 0, 0, 0, 0, 210, 0, 211, - 0, 0, 0, 0, 212, 288, 0, 289, 0, 213, - 214, 215, 0, 216, 217, 218, 219, 220, 0, 221, - 0, 290, 291, 292, 293, 428, 429, 430, 431, 0, - 0, 432, 0, 433, 0, 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, 461, 462, 463, 0, 0, 144, 145, 146, - 147, 0, 0, 148, 149, 150, 0, 428, 429, 430, - 431, 151, 597, 432, 152, 433, 464, 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, 461, 462, 463, 428, 429, 430, - 431, 0, 601, 432, 0, 433, 0, 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, 461, 462, 463, 428, 429, 430, - 431, 0, 606, 432, 0, 433, 0, 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, 461, 462, 463, 428, 429, 430, - 431, 0, 659, 432, 0, 433, 0, 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, 461, 462, 463, 428, 429, 430, - 431, 0, 670, 432, 0, 433, 0, 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, 461, 462, 463, 428, 429, 430, - 431, 0, 691, 432, 0, 433, 0, 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, 461, 462, 463, 428, 429, 430, - 431, 0, 706, 432, 0, 433, 0, 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, 461, 462, 463, 428, 429, 430, - 431, 0, 713, 432, 0, 433, 0, 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, 461, 462, 463, 428, 429, 430, - 431, 0, 0, 432, 0, 433, 0, 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, 461, 462, 463, 429, 430, 431, - 0, 0, 432, 0, 433, 0, 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, 461, 462, 463, 431, 0, 0, 432, - 0, 433, 0, 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, - 461, 462, 463, 432, 0, 433, 0, 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, 461, 462, 463, 433, 0, 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, 461, 462, 463, 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, 461, 462, 463, 247, - 0, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 0, 68, 69, 70, 71, 72, 73, 0, 74, - 0, 0, 0, 0, 0, 377, 248, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 501, 68, 69, - 70, 71, 72, 73, 500, 74, 501, 0, 0, 0, - 0, 0, 378, 0, 502, 503, 0, 504, 505, 0, - 0, 506, 507, 502, 503, 0, 504, 505, 0, 0, - 506, 507, 438, 439, 440, 441, 442, 443, 444, 445, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, + 430, 431, 432, 433, 402, 410, 434, 404, 435, 411, + 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, 461, 462, 463, -272, -272, - -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, + 412, 413, 474, 430, 431, 432, 433, 414, 475, 434, + 415, 435, 530, 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, 461, 462, + 463, 464, 465, 430, 431, 432, 433, 416, 476, 434, + 417, 435, 531, 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, 461, 462, + 463, 464, 465, 418, 419, 430, 431, 432, 433, 655, + 656, 434, 420, 435, 421, 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, + 461, 462, 463, 464, 465, 422, 430, 431, 432, 433, + 423, 486, 434, 641, 435, 424, 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, 461, 462, 463, 106, 0, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 0, 68, 69, 70, - 71, 72, 73, 109, 74, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 0, 68, 69, 70, 71, - 72, 73, 0, 74, 257, 0, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 0, 68, 69, 70, - 71, 72, 73, 0, 74, 144, 145, 146, 147, 213, - 0, 215, 149, 216, 217, 218, 219, 453, 454, 455, - 456, 457, 458, 459, 460, 461, 462, 463 + 460, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 425, 479, 434, 643, 435, 426, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 427, 428, 434, -272, 435, 644, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 484, 488, 434, 485, 435, 551, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 494, 495, 434, 497, 435, 640, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 234, 518, 434, 519, 435, 642, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 520, 521, 434, 522, 435, 645, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 523, 524, 434, 525, 435, 646, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 527, 528, 434, 590, 435, 647, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 591, 593, 434, 594, 435, 648, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 597, 598, 434, -264, 435, 649, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 599, 601, 434, 610, 435, 650, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 607, 608, 434, 621, 435, 651, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 622, 623, 434, 630, 435, 652, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 628, 629, 434, 631, 435, 653, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 632, 633, 434, 634, 435, 657, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 635, 636, 434, 637, 435, 658, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 77, 661, 434, 638, 435, 705, 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, 461, 462, 463, 464, 465, 430, 431, 432, 433, + 639, 662, 434, 198, 435, 706, 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, 461, 462, 463, 464, 465, 660, 666, 667, 480, + 668, 198, 671, 673, 675, 707, 686, 334, 688, 213, + 287, 215, 693, 216, 217, 218, 219, 696, 697, 481, + 78, 698, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 199, 68, 69, 70, 71, 72, 73, 701, + 74, 197, 702, 703, 704, 708, 330, 198, 287, 709, + 711, 712, 288, 713, 289, 715, 213, 716, 215, 625, + 216, 217, 218, 219, 718, 719, 199, 170, 290, 291, + 292, 293, 88, 89, 374, 229, 681, 624, 197, 589, + 297, 517, 482, 493, 198, 103, 687, 0, 0, 0, + 288, 0, 289, 0, 200, 201, 202, 203, 204, 0, + 0, 0, 335, 199, 336, 0, 290, 291, 292, 293, + 0, 0, 0, 0, 213, 0, 215, 0, 216, 217, + 218, 219, 0, 0, 337, 0, 205, 206, 207, 353, + 209, 200, 201, 202, 203, 204, 210, 0, 211, 0, + 354, 0, 0, 212, 0, 0, 0, 0, 213, 214, + 215, 0, 216, 217, 218, 219, 220, 0, 221, 680, + 0, 0, 0, 205, 206, 207, 208, 209, 0, 0, + 0, 0, 0, 210, 0, 211, 501, 699, 0, 502, + 212, 503, 0, 0, 0, 213, 214, 215, 0, 216, + 217, 218, 219, 220, 0, 221, 0, 0, 504, 505, + 0, 506, 507, 355, 0, 508, 509, 0, 0, 0, + 144, 145, 146, 147, 213, 0, 215, 149, 216, 217, + 218, 219, 430, 431, 432, 433, 0, 356, 434, 0, + 435, 0, 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, 461, 462, 463, + 464, 465, 144, 145, 146, 147, 213, 0, 215, 149, + 216, 217, 218, 219, 0, 430, 431, 432, 433, 0, + 600, 434, 0, 435, 466, 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, + 461, 462, 463, 464, 465, 430, 431, 432, 433, 0, + 604, 434, 0, 435, 0, 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, + 461, 462, 463, 464, 465, 430, 431, 432, 433, 0, + 609, 434, 0, 435, 0, 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, + 461, 462, 463, 464, 465, 430, 431, 432, 433, 0, + 663, 434, 0, 435, 0, 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, + 461, 462, 463, 464, 465, 430, 431, 432, 433, 0, + 674, 434, 0, 435, 0, 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, + 461, 462, 463, 464, 465, 430, 431, 432, 433, 0, + 695, 434, 0, 435, 0, 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, + 461, 462, 463, 464, 465, 430, 431, 432, 433, 0, + 710, 434, 0, 435, 0, 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, + 461, 462, 463, 464, 465, 430, 431, 432, 433, 0, + 717, 434, 0, 435, 0, 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, + 461, 462, 463, 464, 465, 430, 431, 432, 433, 0, + 0, 434, 0, 435, 0, 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, + 461, 462, 463, 464, 465, 431, 432, 433, 0, 0, + 434, 0, 435, 0, 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, 461, + 462, 463, 464, 465, 433, 0, 0, 434, 0, 435, + 0, 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, 461, 462, 463, 464, + 465, 434, 0, 435, 0, 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, + 461, 462, 463, 464, 465, 435, 0, 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, 461, 462, 463, 464, 465, 501, 700, 0, + 502, 0, 503, 0, 0, 0, 501, 0, 0, 502, + 0, 503, 0, 0, 0, 0, 0, 0, 0, 504, + 505, 0, 506, 507, 0, 0, 508, 509, 504, 505, + 0, 506, 507, 0, 0, 508, 509, 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, 461, 462, 463, 464, 465, 143, 455, 456, + 457, 458, 459, 460, 461, 462, 463, 464, 465, 144, + 145, 146, 147, 0, 0, 148, 149, 150, 0, 0, + 0, 0, 0, 151, 0, 247, 152, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 0, 68, 69, + 70, 71, 72, 73, 0, 74, 0, 0, 0, 0, + 0, 378, 248, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 0, 68, 69, 70, 71, 72, 73, + 0, 74, 0, 0, 0, 0, 0, 0, 379, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, + 461, 462, 463, 464, 465, -273, -273, -273, -273, -273, + -273, -273, -273, -273, -273, -273, -273, 452, 453, 454, + 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 503, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 504, 505, + 0, 506, 507, 0, 0, 508, 509, 106, 0, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, + 68, 69, 70, 71, 72, 73, 109, 74, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 0, 68, + 69, 70, 71, 72, 73, 257, 74, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 0, 68, 69, + 70, 71, 72, 73, 0, 74 }; static const yytype_int16 yycheck[] = { - 92, 142, 142, 11, 202, 204, 63, 99, 0, 1, - 8, 8, 8, 8, 238, 239, 240, 241, 242, 243, - 33, 6, 107, 8, 223, 9, 11, 20, 79, 68, - 99, 346, 117, 6, 126, 8, 7, 107, 11, 10, - 14, 12, 33, 17, 18, 19, 20, 40, 105, 42, - 1, 143, 113, 76, 115, 63, 126, 126, 29, 30, - 152, 32, 33, 8, 107, 36, 37, 208, 29, 107, - 8, 129, 133, 107, 117, 133, 68, 69, 70, 113, - 33, 115, 142, 152, 135, 77, 107, 160, 129, 127, - 130, 134, 105, 117, 107, 294, 136, 105, 297, 136, - 134, 300, 301, 302, 303, 304, 142, 107, 423, 133, - 94, 426, 133, 186, 105, 107, 107, 68, 69, 70, - 104, 134, 136, 107, 108, 324, 77, 326, 352, 353, - 128, 355, 129, 129, 72, 127, 74, 197, 133, 136, - 232, 233, 234, 342, 136, 135, 345, 207, 133, 87, - 88, 350, 105, 137, 133, 129, 107, 136, 131, 71, - 131, 197, 107, 232, 233, 234, 78, 128, 80, 205, - 129, 207, 208, 166, 133, 8, 127, 128, 11, 129, - 133, 93, 175, 133, 130, 136, 136, 133, 100, 129, - 136, 103, 107, 133, 230, 110, 6, 109, 8, 129, - 9, 11, 238, 239, 240, 241, 242, 243, 85, 86, - 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, - 419, 420, 421, 422, 107, 424, 425, 110, 117, 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, 461, 462, 463, 258, 464, 81, 82, 83, - 84, 470, 113, 333, 115, 499, 500, 501, 502, 503, - 504, 505, 506, 507, 81, 94, 83, 84, 73, 102, - 75, 71, 491, 89, 107, 104, 107, 333, 107, 108, - 80, 337, 115, 130, 11, 32, 33, 136, 121, 36, - 37, 129, 101, 93, 129, 11, 352, 353, 104, 355, - 100, 134, 129, 103, 113, 114, 115, 116, 137, 109, - 119, 120, 121, 107, 394, 90, 91, 92, 127, 129, - 36, 130, 129, 117, 8, 119, 129, 121, 122, 123, - 124, 3, 4, 5, 6, 8, 63, 9, 394, 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, 11, 131, 132, 105, 619, 620, 130, 105, 598, - 107, 600, 131, 132, 107, 17, 131, 132, 8, 105, - 117, 107, 119, 129, 121, 122, 123, 124, 131, 132, - 127, 117, 107, 119, 129, 121, 122, 123, 124, 136, - 7, 127, 133, 10, 8, 12, 131, 132, 130, 638, - 130, 640, 641, 63, 36, 37, 38, 39, 40, 41, - 42, 63, 29, 30, 653, 32, 33, 36, 37, 36, - 37, 8, 661, 499, 500, 501, 502, 503, 504, 505, - 506, 507, 85, 86, 107, 48, 49, 105, 105, 130, - 621, 621, 134, 130, 117, 105, 119, 107, 121, 122, - 123, 124, 128, 105, 127, 107, 101, 117, 129, 119, - 8, 121, 122, 123, 124, 8, 105, 127, 707, 121, - 122, 123, 124, 117, 105, 8, 136, 8, 133, 105, - 105, 133, 105, 105, 29, 30, 618, 32, 33, 130, - 136, 36, 37, 107, 594, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 121, 120, 121, 122, 123, - 124, 125, 130, 127, 129, 87, 105, 107, 594, 130, - 107, 621, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 131, 120, 121, 122, 123, 124, 125, 133, - 127, 132, 618, 619, 620, 621, 3, 4, 5, 6, - 135, 132, 9, 132, 11, 132, 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, 18, 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, 3, 4, 5, 6, - 105, 133, 9, 8, 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, 130, 130, 3, 4, - 5, 6, 130, 129, 9, 130, 11, 134, 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, 134, 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, 130, 130, - 3, 4, 5, 6, 131, 132, 9, 136, 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, 130, 132, 9, 132, 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, 130, 105, 9, 132, 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, 130, 130, 9, 8, 11, 132, - 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, - 130, 3, 4, 5, 6, 130, 130, 9, 131, 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, 131, 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, 105, 9, 131, 11, - 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, 76, 3, 4, 5, 6, 105, 105, 9, 131, - 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, 105, 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, 105, 134, 9, 131, - 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, 105, 105, 9, - 131, 11, 131, 13, 14, 15, 16, 17, 18, 19, + 92, 142, 142, 202, 204, 8, 8, 99, 8, 347, + 33, 0, 1, 238, 239, 240, 241, 242, 243, 99, + 29, 80, 6, 223, 8, 118, 108, 11, 20, 160, + 6, 8, 8, 108, 126, 11, 9, 108, 8, 7, + 1, 134, 10, 33, 12, 64, 126, 108, 40, 69, + 42, 143, 134, 128, 130, 186, 127, 118, 134, 9, + 152, 29, 30, 108, 32, 33, 111, 208, 36, 37, + 14, 11, 152, 17, 18, 19, 20, 136, 131, 142, + 69, 70, 71, 106, 137, 11, 424, 106, 33, 78, + 428, 77, 130, 114, 294, 116, 134, 297, 130, 137, + 300, 301, 302, 303, 304, 136, 108, 142, 69, 70, + 71, 134, 134, 134, 108, 137, 106, 78, 108, 108, + 129, 114, 95, 116, 64, 325, 129, 327, 353, 354, + 130, 356, 105, 137, 197, 108, 109, 137, 64, 128, + 232, 233, 234, 343, 207, 95, 346, 108, 137, 137, + 134, 351, 232, 233, 234, 105, 132, 134, 108, 109, + 130, 106, 197, 108, 132, 138, 106, 128, 129, 74, + 205, 76, 207, 208, 166, 131, 137, 130, 134, 118, + 106, 137, 108, 175, 86, 87, 130, 130, 138, 130, + 135, 134, 118, 134, 120, 230, 122, 123, 124, 125, + 132, 133, 128, 238, 239, 240, 241, 242, 243, 108, + 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 423, 8, 425, 426, 427, 132, 133, + 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, 461, 462, 463, 464, 465, 258, 466, 131, 32, + 33, 334, 472, 36, 37, 90, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 72, 108, 8, 137, 73, + 11, 75, 79, 493, 81, 130, 118, 130, 11, 334, + 108, 130, 72, 338, 88, 89, 114, 94, 116, 11, + 6, 81, 8, 135, 101, 11, 130, 104, 353, 354, + 103, 356, 8, 110, 94, 108, 82, 135, 84, 85, + 130, 101, 395, 116, 104, 82, 83, 84, 85, 122, + 110, 29, 30, 108, 32, 33, 111, 17, 36, 37, + 130, 64, 135, 3, 4, 5, 6, 132, 133, 9, + 395, 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, 105, 105, 9, - 131, 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, 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, 129, 3, 4, 5, 6, 132, 130, - 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, 132, - 9, 131, 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, 131, 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, 131, 3, 4, 5, 6, 131, - 136, 9, 131, 11, 134, 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, - 131, 9, 131, 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, - 132, 9, 131, 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, 7, 8, 8, 10, 8, - 12, 8, 8, 131, 105, 8, 105, 11, 105, 105, - 134, 132, 132, 30, 30, 134, 8, 29, 30, 134, - 32, 33, 129, 115, 36, 37, 131, 131, 11, 33, - 115, 35, 36, 8, 8, 31, 31, 116, 244, 43, - 44, 45, 46, 131, 48, 49, 50, 51, 52, 53, + 40, 41, 42, 106, 64, 108, 130, 622, 623, 132, + 133, 601, 105, 603, 106, 118, 108, 120, 8, 122, + 123, 124, 125, 132, 133, 128, 118, 106, 120, 131, + 122, 123, 124, 125, 137, 108, 128, 91, 92, 93, + 36, 37, 8, 8, 134, 137, 106, 130, 108, 86, + 87, 641, 108, 643, 644, 36, 37, 38, 39, 40, + 41, 42, 122, 123, 124, 125, 656, 11, 48, 49, + 131, 130, 106, 131, 134, 665, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 131, 131, 106, 129, 33, + 102, 35, 36, 624, 624, 135, 8, 130, 106, 43, + 44, 45, 46, 118, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 143, 621, 7, 8, 365, 10, 514, 12, 466, 337, - 17, 36, 627, -1, -1, -1, -1, 11, -1, -1, - 63, 129, -1, 17, 29, 30, -1, 32, 33, -1, - -1, 36, 37, -1, -1, 29, -1, -1, -1, -1, - -1, 105, 36, 107, -1, -1, -1, -1, 112, -1, - -1, -1, -1, 117, 118, 119, 63, 121, 122, 123, - 124, -1, 105, 127, 107, -1, 130, -1, -1, 63, - 64, 65, 66, 67, 117, 33, 119, -1, 121, 122, - 123, 124, -1, 11, 127, -1, 44, -1, -1, 17, - -1, -1, -1, -1, -1, -1, -1, 17, 105, -1, - 107, 95, 96, 97, -1, 99, -1, -1, 36, -1, - -1, 105, -1, 107, 121, 122, 123, 124, 112, -1, - -1, -1, -1, 117, 118, 119, 133, 121, 122, 123, - 124, 125, -1, 127, 128, 63, 64, 65, 66, 67, - -1, -1, -1, 63, -1, -1, -1, -1, 106, -1, - -1, -1, -1, -1, -1, 113, 114, 115, 116, 117, - -1, 119, 120, 121, 122, 123, 124, 95, 96, 97, - 98, 99, 130, -1, -1, -1, -1, 105, -1, 107, - -1, -1, -1, -1, 112, 105, -1, 107, -1, 117, - 118, 119, -1, 121, 122, 123, 124, 125, -1, 127, - -1, 121, 122, 123, 124, 3, 4, 5, 6, -1, + 64, 711, 8, 114, 115, 116, 117, 106, 8, 120, + 121, 122, 8, 134, 106, 106, 106, 128, 106, 621, + 131, 134, 131, 108, 597, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 122, 121, 122, 123, 124, + 125, 126, 106, 128, 108, 88, 10, 130, 12, 113, + 131, 624, 597, 137, 118, 119, 120, 131, 122, 123, + 124, 125, 132, 108, 128, 29, 30, 131, 32, 33, + 106, 136, 36, 37, 133, 133, 621, 622, 623, 624, + 3, 4, 5, 6, 133, 133, 9, 106, 11, 18, + 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, 18, 110, 9, 106, 11, 134, + 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, 131, 9, 8, 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, + 131, 131, 130, 3, 4, 5, 6, 131, 106, 9, + 131, 11, 135, 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, 133, 9, + 131, 11, 135, 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, 131, 131, 3, 4, 5, 6, 132, + 133, 9, 131, 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, 131, 3, 4, 5, 6, + 131, 106, 9, 133, 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, 137, 9, 133, 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, 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, 106, 9, 8, 11, 132, 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, + 106, 106, 9, 106, 11, 132, 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, + 11, 77, 9, 106, 11, 132, 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, 106, 9, 106, 11, 132, 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, + 106, 106, 9, 106, 11, 132, 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, + 135, 110, 9, 106, 11, 132, 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, + 106, 106, 9, 132, 11, 132, 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, + 106, 106, 9, 8, 11, 132, 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, 133, 11, 132, 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, + 132, 130, 9, 131, 11, 132, 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, 130, 9, 106, 11, 132, 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, 133, 9, 132, 11, 132, 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, + 132, 132, 9, 132, 11, 132, 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, + 137, 135, 9, 8, 11, 132, 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, 132, 9, 8, 11, 132, 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, 133, 9, 17, 11, 132, 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, 8, 8, 8, 108, + 8, 17, 8, 8, 106, 132, 106, 11, 106, 118, + 64, 120, 106, 122, 123, 124, 125, 135, 133, 128, + 108, 133, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 36, 121, 122, 123, 124, 125, 126, 30, + 128, 11, 30, 135, 8, 132, 108, 17, 64, 135, + 130, 116, 106, 116, 108, 132, 118, 132, 120, 29, + 122, 123, 124, 125, 8, 8, 36, 116, 122, 123, + 124, 125, 31, 31, 244, 143, 624, 516, 11, 468, + 134, 366, 338, 130, 17, 36, 630, -1, -1, -1, + 106, -1, 108, -1, 64, 65, 66, 67, 68, -1, + -1, -1, 106, 36, 108, -1, 122, 123, 124, 125, + -1, -1, -1, -1, 118, -1, 120, -1, 122, 123, + 124, 125, -1, -1, 128, -1, 96, 97, 98, 33, + 100, 64, 65, 66, 67, 68, 106, -1, 108, -1, + 44, -1, -1, 113, -1, -1, -1, -1, 118, 119, + 120, -1, 122, 123, 124, 125, 126, -1, 128, 129, + -1, -1, -1, 96, 97, 98, 99, 100, -1, -1, + -1, -1, -1, 106, -1, 108, 7, 8, -1, 10, + 113, 12, -1, -1, -1, 118, 119, 120, -1, 122, + 123, 124, 125, 126, -1, 128, -1, -1, 29, 30, + -1, 32, 33, 107, -1, 36, 37, -1, -1, -1, + 114, 115, 116, 117, 118, -1, 120, 121, 122, 123, + 124, 125, 3, 4, 5, 6, -1, 131, 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, 114, 115, 116, 117, 118, -1, 120, 121, + 122, 123, 124, 125, -1, 3, 4, 5, 6, -1, + 8, 9, -1, 11, 65, 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, -1, -1, 113, 114, 115, - 116, -1, -1, 119, 120, 121, -1, 3, 4, 5, - 6, 127, 8, 9, 130, 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, 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, 107, - -1, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, -1, 120, 121, 122, 123, 124, 125, -1, 127, - -1, -1, -1, -1, -1, 107, 134, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 12, 120, 121, - 122, 123, 124, 125, 10, 127, 12, -1, -1, -1, - -1, -1, 134, -1, 29, 30, -1, 32, 33, -1, - -1, 36, 37, 29, 30, -1, 32, 33, -1, -1, - 36, 37, 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, + 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, 107, -1, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, -1, 120, 121, 122, - 123, 124, 125, 107, 127, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, -1, 120, 121, 122, 123, - 124, 125, -1, 127, 107, -1, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, -1, 120, 121, 122, - 123, 124, 125, -1, 127, 113, 114, 115, 116, 117, - -1, 119, 120, 121, 122, 123, 124, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42 + 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, 102, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 114, + 115, 116, 117, -1, -1, 120, 121, 122, -1, -1, + -1, -1, -1, 128, -1, 108, 131, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, -1, 121, 122, + 123, 124, 125, 126, -1, 128, -1, -1, -1, -1, + -1, 108, 135, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, -1, 121, 122, 123, 124, 125, 126, + -1, 128, -1, -1, -1, -1, -1, -1, 135, 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, 108, -1, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, -1, + 121, 122, 123, 124, 125, 126, 108, 128, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, -1, 121, + 122, 123, 124, 125, 126, 108, 128, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, -1, 121, 122, + 123, 124, 125, 126, -1, 128 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 68, 139, 142, 76, 0, 1, 68, 69, 70, - 77, 107, 127, 136, 140, 141, 143, 144, 145, 146, - 147, 150, 151, 152, 153, 156, 157, 158, 159, 160, - 161, 162, 163, 166, 168, 169, 170, 129, 8, 128, - 71, 78, 80, 93, 100, 103, 109, 90, 91, 92, - 107, 107, 127, 164, 136, 136, 8, 107, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, - 122, 123, 124, 125, 127, 148, 208, 8, 107, 149, - 208, 8, 72, 74, 87, 88, 68, 128, 140, 141, - 135, 9, 94, 104, 107, 108, 137, 195, 9, 94, - 107, 108, 137, 195, 85, 86, 107, 208, 129, 107, - 208, 107, 133, 198, 117, 107, 154, 155, 89, 113, - 115, 133, 202, 202, 202, 130, 136, 129, 81, 83, - 84, 129, 129, 81, 82, 83, 84, 129, 129, 129, - 129, 182, 183, 101, 113, 114, 115, 116, 119, 120, - 121, 127, 130, 172, 173, 174, 175, 176, 193, 104, - 172, 8, 8, 105, 130, 107, 199, 8, 129, 8, - 155, 129, 113, 115, 203, 133, 200, 33, 105, 133, - 196, 117, 133, 204, 107, 207, 165, 172, 130, 130, - 130, 130, 73, 75, 105, 105, 128, 11, 17, 36, - 63, 64, 65, 66, 67, 95, 96, 97, 98, 99, - 105, 107, 112, 117, 118, 119, 121, 122, 123, 124, - 125, 127, 184, 186, 188, 189, 190, 191, 194, 174, - 129, 172, 6, 8, 11, 133, 177, 101, 14, 17, - 18, 19, 20, 129, 177, 8, 105, 107, 134, 208, - 117, 63, 105, 107, 113, 115, 134, 107, 201, 208, - 8, 105, 33, 105, 107, 197, 8, 107, 117, 205, - 8, 131, 132, 177, 105, 105, 105, 105, 107, 127, - 136, 188, 194, 107, 126, 133, 136, 63, 105, 107, - 121, 122, 123, 124, 133, 187, 191, 133, 187, 8, - 133, 33, 35, 43, 44, 45, 46, 48, 49, 50, + 0, 69, 140, 143, 77, 0, 1, 69, 70, 71, + 78, 108, 128, 137, 141, 142, 144, 145, 146, 147, + 148, 151, 152, 153, 154, 157, 158, 159, 160, 161, + 162, 163, 164, 167, 169, 170, 171, 130, 8, 129, + 72, 79, 81, 94, 101, 104, 110, 91, 92, 93, + 108, 108, 128, 165, 137, 137, 8, 108, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, + 123, 124, 125, 126, 128, 149, 209, 8, 108, 150, + 209, 8, 73, 75, 88, 89, 69, 129, 141, 142, + 136, 9, 95, 105, 108, 109, 138, 196, 9, 95, + 108, 109, 138, 196, 86, 87, 108, 209, 130, 108, + 209, 108, 134, 199, 118, 108, 155, 156, 90, 114, + 116, 134, 203, 203, 203, 131, 137, 130, 82, 84, + 85, 130, 130, 82, 83, 84, 85, 130, 130, 130, + 130, 183, 184, 102, 114, 115, 116, 117, 120, 121, + 122, 128, 131, 173, 174, 175, 176, 177, 194, 105, + 173, 8, 8, 106, 131, 108, 200, 8, 130, 8, + 156, 130, 114, 116, 204, 134, 201, 33, 106, 134, + 197, 118, 134, 205, 108, 208, 166, 173, 131, 131, + 131, 131, 74, 76, 106, 106, 129, 11, 17, 36, + 64, 65, 66, 67, 68, 96, 97, 98, 99, 100, + 106, 108, 113, 118, 119, 120, 122, 123, 124, 125, + 126, 128, 185, 187, 189, 190, 191, 192, 195, 175, + 130, 173, 6, 8, 11, 134, 178, 102, 14, 17, + 18, 19, 20, 130, 178, 8, 106, 108, 135, 209, + 118, 64, 106, 108, 114, 116, 135, 108, 202, 209, + 8, 106, 33, 106, 108, 198, 8, 108, 118, 206, + 8, 132, 133, 178, 106, 106, 106, 106, 108, 128, + 137, 189, 195, 108, 127, 134, 137, 64, 106, 108, + 122, 123, 124, 125, 134, 188, 192, 134, 188, 8, + 134, 33, 35, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 112, 118, 130, 185, 186, 188, 194, 107, - 194, 130, 188, 11, 105, 107, 127, 186, 192, 194, - 121, 136, 129, 136, 130, 129, 130, 185, 130, 136, - 129, 133, 33, 44, 106, 130, 171, 193, 194, 131, - 172, 172, 172, 178, 79, 135, 167, 171, 171, 171, - 171, 171, 171, 167, 131, 133, 87, 107, 134, 208, - 105, 33, 105, 107, 134, 107, 117, 134, 107, 135, - 132, 132, 132, 132, 105, 18, 18, 109, 105, 133, - 185, 8, 185, 8, 185, 185, 185, 185, 185, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 185, 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, 185, 130, 133, 136, 8, - 129, 136, 129, 105, 132, 136, 188, 136, 107, 127, - 190, 194, 8, 8, 105, 185, 105, 185, 206, 185, - 206, 129, 105, 105, 185, 105, 171, 171, 171, 7, - 10, 12, 29, 30, 32, 33, 36, 37, 102, 107, - 115, 121, 134, 180, 181, 182, 76, 105, 129, 105, - 105, 105, 105, 105, 188, 134, 109, 134, 134, 134, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 185, 206, 185, 185, 206, 131, 185, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 185, 185, 187, 189, 105, 105, 185, - 105, 131, 107, 110, 105, 105, 8, 8, 129, 131, - 132, 8, 131, 185, 131, 129, 8, 132, 131, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 130, 129, - 129, 183, 29, 128, 179, 129, 132, 105, 131, 131, - 131, 131, 136, 134, 8, 8, 8, 131, 132, 131, - 132, 132, 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 132, 131, 131, 8, 131, 132, 8, - 8, 129, 8, 8, 8, 188, 185, 8, 185, 8, - 8, 105, 193, 194, 171, 171, 128, 179, 107, 110, - 85, 86, 105, 198, 105, 185, 185, 185, 185, 105, - 185, 8, 134, 132, 132, 8, 8, 30, 30, 134, - 8, 131, 131, 131, 131, 134, 8, 129, 115, 115, - 185, 131, 131, 8, 8, 8 + 61, 62, 63, 113, 119, 131, 186, 187, 189, 195, + 108, 195, 131, 189, 11, 106, 108, 128, 187, 193, + 195, 122, 137, 130, 137, 131, 130, 131, 186, 131, + 137, 130, 134, 33, 44, 107, 131, 172, 194, 195, + 132, 173, 173, 173, 179, 80, 136, 168, 172, 172, + 172, 172, 172, 172, 168, 132, 134, 88, 108, 135, + 209, 106, 33, 106, 108, 135, 108, 118, 135, 108, + 136, 133, 133, 133, 133, 106, 18, 18, 110, 106, + 134, 186, 8, 186, 8, 186, 186, 186, 186, 186, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 186, + 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, 65, 186, 131, 134, + 137, 8, 130, 137, 130, 106, 133, 137, 189, 137, + 108, 128, 191, 195, 8, 8, 106, 186, 106, 186, + 207, 186, 207, 130, 106, 106, 186, 106, 172, 172, + 172, 7, 10, 12, 29, 30, 32, 33, 36, 37, + 103, 108, 116, 122, 135, 181, 182, 183, 77, 106, + 130, 106, 106, 106, 106, 106, 189, 135, 110, 135, + 135, 135, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 207, 186, 186, 186, + 207, 132, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 188, 190, + 106, 106, 186, 106, 132, 108, 111, 106, 106, 8, + 8, 130, 132, 133, 8, 132, 186, 132, 130, 8, + 133, 132, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 131, 130, 130, 184, 29, 129, 180, 130, 133, + 106, 132, 132, 132, 132, 137, 135, 8, 8, 8, + 132, 133, 132, 133, 133, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 133, 132, 132, 132, + 8, 132, 133, 8, 8, 130, 8, 8, 8, 189, + 186, 8, 186, 8, 8, 106, 194, 195, 172, 172, + 129, 180, 108, 111, 86, 87, 106, 199, 106, 186, + 186, 186, 186, 106, 186, 8, 135, 133, 133, 8, + 8, 30, 30, 135, 8, 132, 132, 132, 132, 135, + 8, 130, 116, 116, 186, 132, 132, 8, 8, 8 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 138, 139, 139, 139, 139, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 141, 141, 141, 141, - 142, 142, 143, 144, 145, 145, 145, 145, 145, 146, - 147, 147, 148, 148, 148, 148, 148, 149, 149, 149, - 149, 149, 149, 150, 151, 151, 151, 151, 151, 151, - 151, 152, 152, 153, 154, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 162, 162, 163, 164, 164, 164, - 165, 165, 166, 167, 167, 167, 168, 168, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 170, 170, 170, - 170, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 172, 172, 172, 172, - 173, 173, 174, 174, 175, 175, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 177, 177, 178, - 178, 178, 178, 178, 178, 179, 179, 180, 181, 181, - 182, 182, 182, 182, 182, 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, 185, 185, 185, 185, 185, 185, + 0, 139, 140, 140, 140, 140, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 142, 142, 142, 142, + 143, 143, 144, 145, 146, 146, 146, 146, 146, 147, + 148, 148, 149, 149, 149, 149, 149, 150, 150, 150, + 150, 150, 150, 151, 152, 152, 152, 152, 152, 152, + 152, 153, 153, 154, 155, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 163, 163, 164, 165, 165, 165, + 166, 166, 167, 168, 168, 168, 169, 169, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 171, 171, 171, + 171, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 173, 173, 173, 173, + 174, 174, 175, 175, 176, 176, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 178, 178, 179, + 179, 179, 179, 179, 179, 180, 180, 181, 182, 182, + 183, 183, 183, 183, 183, 184, 184, 184, 184, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 186, 186, 186, 186, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 188, 188, 188, 188, 189, 189, 189, - 189, 189, 190, 190, 190, 191, 191, 192, 192, 192, - 192, 192, 192, 193, 193, 193, 193, 193, 194, 194, - 194, 194, 194, 194, 195, 195, 196, 196, 196, 197, - 197, 197, 197, 197, 197, 198, 198, 199, 199, 199, - 200, 201, 201, 201, 201, 202, 202, 202, 203, 203, - 203, 203, 203, 204, 204, 205, 205, 205, 205, 206, - 206, 206, 207, 207, 207, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208 + 185, 185, 185, 185, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 187, 187, 187, 187, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 189, 189, 189, 189, 190, 190, + 190, 190, 190, 191, 191, 191, 192, 192, 193, 193, + 193, 193, 193, 193, 194, 194, 194, 194, 194, 195, + 195, 195, 195, 195, 195, 196, 196, 197, 197, 197, + 198, 198, 198, 198, 198, 198, 199, 199, 200, 200, + 200, 201, 202, 202, 202, 202, 203, 203, 203, 204, + 204, 204, 204, 204, 205, 205, 206, 206, 206, 206, + 207, 207, 207, 208, 208, 208, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1594,18 +1606,18 @@ static const yytype_uint8 yyr2[] = 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, 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, 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, + 4, 4, 6, 4, 4, 4, 3, 6, 1, 4, + 4, 6, 4, 3, 1, 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, 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 + 1, 1, 1 }; @@ -2282,1895 +2294,1901 @@ yyreduce: switch (yyn) { case 19: -#line 177 "slghparse.y" /* yacc.c:1646 */ + { slgh->resetConstructors(); } -#line 2273 "slghparse.cc" /* yacc.c:1646 */ + break; case 20: -#line 179 "slghparse.y" /* yacc.c:1646 */ + { slgh->setEndian(1); } -#line 2279 "slghparse.cc" /* yacc.c:1646 */ + break; case 21: -#line 180 "slghparse.y" /* yacc.c:1646 */ + { slgh->setEndian(0); } -#line 2285 "slghparse.cc" /* yacc.c:1646 */ + break; case 22: -#line 182 "slghparse.y" /* yacc.c:1646 */ + { slgh->setAlignment(*(yyvsp[-1].i)); delete (yyvsp[-1].i); } -#line 2291 "slghparse.cc" /* yacc.c:1646 */ + break; case 23: -#line 184 "slghparse.y" /* yacc.c:1646 */ + {} -#line 2297 "slghparse.cc" /* yacc.c:1646 */ + break; case 24: -#line 186 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tokensym) = slgh->defineToken((yyvsp[-3].str),(yyvsp[-1].i),0); } -#line 2303 "slghparse.cc" /* yacc.c:1646 */ + break; case 25: -#line 187 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tokensym) = slgh->defineToken((yyvsp[-6].str),(yyvsp[-4].i),-1); } -#line 2309 "slghparse.cc" /* yacc.c:1646 */ + break; case 26: -#line 188 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tokensym) = slgh->defineToken((yyvsp[-6].str),(yyvsp[-4].i),1); } -#line 2315 "slghparse.cc" /* yacc.c:1646 */ + break; case 27: -#line 189 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tokensym) = (yyvsp[-1].tokensym); slgh->addTokenField((yyvsp[-1].tokensym),(yyvsp[0].fieldqual)); } -#line 2321 "slghparse.cc" /* yacc.c:1646 */ + break; case 28: -#line 190 "slghparse.y" /* yacc.c:1646 */ + { string errmsg=(yyvsp[0].anysym)->getName()+": redefined as a token"; yyerror(errmsg.c_str()); YYERROR; } -#line 2327 "slghparse.cc" /* yacc.c:1646 */ + break; case 29: -#line 192 "slghparse.y" /* yacc.c:1646 */ + {} -#line 2333 "slghparse.cc" /* yacc.c:1646 */ + break; case 30: -#line 194 "slghparse.y" /* yacc.c:1646 */ + { (yyval.varsym) = (yyvsp[0].varsym); } -#line 2339 "slghparse.cc" /* yacc.c:1646 */ + break; case 31: -#line 195 "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 2346 "slghparse.cc" /* yacc.c:1646 */ + break; case 32: -#line 198 "slghparse.y" /* yacc.c:1646 */ + { (yyval.fieldqual) = new FieldQuality((yyvsp[-6].str),(yyvsp[-3].i),(yyvsp[-1].i)); } -#line 2352 "slghparse.cc" /* yacc.c:1646 */ + break; case 33: -#line 199 "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 2358 "slghparse.cc" /* yacc.c:1646 */ + break; case 34: -#line 200 "slghparse.y" /* yacc.c:1646 */ + { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->signext = true; } -#line 2364 "slghparse.cc" /* yacc.c:1646 */ + break; case 35: -#line 201 "slghparse.y" /* yacc.c:1646 */ + { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->hex = true; } -#line 2370 "slghparse.cc" /* yacc.c:1646 */ + break; case 36: -#line 202 "slghparse.y" /* yacc.c:1646 */ + { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->hex = false; } -#line 2376 "slghparse.cc" /* yacc.c:1646 */ + break; case 37: -#line 204 "slghparse.y" /* yacc.c:1646 */ + { (yyval.fieldqual) = new FieldQuality((yyvsp[-6].str),(yyvsp[-3].i),(yyvsp[-1].i)); } -#line 2382 "slghparse.cc" /* yacc.c:1646 */ + break; case 38: -#line 205 "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 2388 "slghparse.cc" /* yacc.c:1646 */ + break; case 39: -#line 206 "slghparse.y" /* yacc.c:1646 */ + { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->signext = true; } -#line 2394 "slghparse.cc" /* yacc.c:1646 */ + break; case 40: -#line 207 "slghparse.y" /* yacc.c:1646 */ + { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->flow = false; } -#line 2400 "slghparse.cc" /* yacc.c:1646 */ + break; case 41: -#line 208 "slghparse.y" /* yacc.c:1646 */ + { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->hex = true; } -#line 2406 "slghparse.cc" /* yacc.c:1646 */ + break; case 42: -#line 209 "slghparse.y" /* yacc.c:1646 */ + { (yyval.fieldqual) = (yyvsp[-1].fieldqual); (yyval.fieldqual)->hex = false; } -#line 2412 "slghparse.cc" /* yacc.c:1646 */ + break; case 43: -#line 211 "slghparse.y" /* yacc.c:1646 */ + { slgh->newSpace((yyvsp[-1].spacequal)); } -#line 2418 "slghparse.cc" /* yacc.c:1646 */ + break; case 44: -#line 213 "slghparse.y" /* yacc.c:1646 */ + { (yyval.spacequal) = new SpaceQuality(*(yyvsp[0].str)); delete (yyvsp[0].str); } -#line 2424 "slghparse.cc" /* yacc.c:1646 */ + break; case 45: -#line 214 "slghparse.y" /* yacc.c:1646 */ + { string errmsg = (yyvsp[0].anysym)->getName()+": redefined as space"; yyerror(errmsg.c_str()); YYERROR; } -#line 2430 "slghparse.cc" /* yacc.c:1646 */ + break; case 46: -#line 215 "slghparse.y" /* yacc.c:1646 */ + { (yyval.spacequal) = (yyvsp[-3].spacequal); (yyval.spacequal)->type = SpaceQuality::ramtype; } -#line 2436 "slghparse.cc" /* yacc.c:1646 */ + break; case 47: -#line 216 "slghparse.y" /* yacc.c:1646 */ + { (yyval.spacequal) = (yyvsp[-3].spacequal); (yyval.spacequal)->type = SpaceQuality::registertype; } -#line 2442 "slghparse.cc" /* yacc.c:1646 */ + break; case 48: -#line 217 "slghparse.y" /* yacc.c:1646 */ + { (yyval.spacequal) = (yyvsp[-3].spacequal); (yyval.spacequal)->size = *(yyvsp[0].i); delete (yyvsp[0].i); } -#line 2448 "slghparse.cc" /* yacc.c:1646 */ + break; case 49: -#line 218 "slghparse.y" /* yacc.c:1646 */ + { (yyval.spacequal) = (yyvsp[-3].spacequal); (yyval.spacequal)->wordsize = *(yyvsp[0].i); delete (yyvsp[0].i); } -#line 2454 "slghparse.cc" /* yacc.c:1646 */ + break; case 50: -#line 219 "slghparse.y" /* yacc.c:1646 */ + { (yyval.spacequal) = (yyvsp[-1].spacequal); (yyval.spacequal)->isdefault = true; } -#line 2460 "slghparse.cc" /* yacc.c:1646 */ + break; case 51: -#line 221 "slghparse.y" /* yacc.c:1646 */ + { slgh->defineVarnodes((yyvsp[-8].spacesym),(yyvsp[-5].i),(yyvsp[-2].i),(yyvsp[-1].strlist)); } -#line 2467 "slghparse.cc" /* yacc.c:1646 */ + break; case 52: -#line 223 "slghparse.y" /* yacc.c:1646 */ + { yyerror("Parsed integer is too big (overflow)"); YYERROR; } -#line 2473 "slghparse.cc" /* yacc.c:1646 */ + break; case 56: -#line 230 "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 2480 "slghparse.cc" /* yacc.c:1646 */ + break; case 57: -#line 233 "slghparse.y" /* yacc.c:1646 */ + { slgh->addUserOp((yyvsp[-1].strlist)); } -#line 2486 "slghparse.cc" /* yacc.c:1646 */ + break; case 58: -#line 235 "slghparse.y" /* yacc.c:1646 */ + { slgh->attachValues((yyvsp[-2].symlist),(yyvsp[-1].biglist)); } -#line 2492 "slghparse.cc" /* yacc.c:1646 */ + break; case 59: -#line 237 "slghparse.y" /* yacc.c:1646 */ + { slgh->attachNames((yyvsp[-2].symlist),(yyvsp[-1].strlist)); } -#line 2498 "slghparse.cc" /* yacc.c:1646 */ + break; case 60: -#line 239 "slghparse.y" /* yacc.c:1646 */ + { slgh->attachVarnodes((yyvsp[-2].symlist),(yyvsp[-1].symlist)); } -#line 2504 "slghparse.cc" /* yacc.c:1646 */ + break; case 61: -#line 241 "slghparse.y" /* yacc.c:1646 */ + { slgh->buildMacro((yyvsp[-3].macrosym),(yyvsp[-1].sem)); } -#line 2510 "slghparse.cc" /* yacc.c:1646 */ + break; case 62: -#line 244 "slghparse.y" /* yacc.c:1646 */ + { slgh->pushWith((yyvsp[-4].subtablesym),(yyvsp[-2].pateq),(yyvsp[-1].contop)); } -#line 2516 "slghparse.cc" /* yacc.c:1646 */ + break; case 66: -#line 250 "slghparse.y" /* yacc.c:1646 */ + { slgh->popWith(); } -#line 2522 "slghparse.cc" /* yacc.c:1646 */ + break; case 67: -#line 252 "slghparse.y" /* yacc.c:1646 */ + { (yyval.subtablesym) = (SubtableSymbol *)0; } -#line 2528 "slghparse.cc" /* yacc.c:1646 */ + break; case 68: -#line 253 "slghparse.y" /* yacc.c:1646 */ + { (yyval.subtablesym) = (yyvsp[0].subtablesym); } -#line 2534 "slghparse.cc" /* yacc.c:1646 */ + break; case 69: -#line 254 "slghparse.y" /* yacc.c:1646 */ + { (yyval.subtablesym) = slgh->newTable((yyvsp[0].str)); } -#line 2540 "slghparse.cc" /* yacc.c:1646 */ + break; case 70: -#line 257 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = (PatternEquation *)0; } -#line 2546 "slghparse.cc" /* yacc.c:1646 */ + break; case 71: -#line 258 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = (yyvsp[0].pateq); } -#line 2552 "slghparse.cc" /* yacc.c:1646 */ + break; case 72: -#line 261 "slghparse.y" /* yacc.c:1646 */ + { (yyval.macrosym) = slgh->createMacro((yyvsp[-3].str),(yyvsp[-1].strlist)); } -#line 2558 "slghparse.cc" /* yacc.c:1646 */ + break; case 73: -#line 263 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sectionstart) = slgh->standaloneSection((yyvsp[-1].sem)); } -#line 2564 "slghparse.cc" /* yacc.c:1646 */ + break; case 74: -#line 264 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sectionstart) = slgh->finalNamedSection((yyvsp[-2].sectionstart),(yyvsp[-1].sem)); } -#line 2570 "slghparse.cc" /* yacc.c:1646 */ + break; case 75: -#line 265 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sectionstart) = (SectionVector *)0; } -#line 2576 "slghparse.cc" /* yacc.c:1646 */ + break; case 76: -#line 267 "slghparse.y" /* yacc.c:1646 */ + { slgh->buildConstructor((yyvsp[-4].construct),(yyvsp[-2].pateq),(yyvsp[-1].contop),(yyvsp[0].sectionstart)); } -#line 2582 "slghparse.cc" /* yacc.c:1646 */ + break; case 77: -#line 268 "slghparse.y" /* yacc.c:1646 */ + { slgh->buildConstructor((yyvsp[-4].construct),(yyvsp[-2].pateq),(yyvsp[-1].contop),(yyvsp[0].sectionstart)); } -#line 2588 "slghparse.cc" /* yacc.c:1646 */ + break; case 78: -#line 270 "slghparse.y" /* yacc.c:1646 */ + { (yyval.construct) = (yyvsp[-1].construct); (yyval.construct)->addSyntax(*(yyvsp[0].str)); delete (yyvsp[0].str); } -#line 2594 "slghparse.cc" /* yacc.c:1646 */ + break; case 79: -#line 271 "slghparse.y" /* yacc.c:1646 */ + { (yyval.construct) = (yyvsp[-1].construct); (yyval.construct)->addSyntax(*(yyvsp[0].str)); delete (yyvsp[0].str); } -#line 2600 "slghparse.cc" /* yacc.c:1646 */ + break; case 80: -#line 272 "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 2606 "slghparse.cc" /* yacc.c:1646 */ + break; case 81: -#line 273 "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 2612 "slghparse.cc" /* yacc.c:1646 */ + break; case 82: -#line 274 "slghparse.y" /* yacc.c:1646 */ + { (yyval.construct) = (yyvsp[-1].construct); } -#line 2618 "slghparse.cc" /* yacc.c:1646 */ + break; case 83: -#line 275 "slghparse.y" /* yacc.c:1646 */ + { (yyval.construct) = (yyvsp[-1].construct); (yyval.construct)->addSyntax(*(yyvsp[0].str)); delete (yyvsp[0].str); } -#line 2624 "slghparse.cc" /* yacc.c:1646 */ + break; case 84: -#line 276 "slghparse.y" /* yacc.c:1646 */ + { (yyval.construct) = (yyvsp[-1].construct); (yyval.construct)->addSyntax(*(yyvsp[0].str)); delete (yyvsp[0].str); } -#line 2630 "slghparse.cc" /* yacc.c:1646 */ + break; case 85: -#line 277 "slghparse.y" /* yacc.c:1646 */ + { (yyval.construct) = (yyvsp[-1].construct); (yyval.construct)->addSyntax(string(" ")); } -#line 2636 "slghparse.cc" /* yacc.c:1646 */ + break; case 86: -#line 278 "slghparse.y" /* yacc.c:1646 */ + { (yyval.construct) = (yyvsp[-1].construct); slgh->newOperand((yyvsp[-1].construct),(yyvsp[0].str)); } -#line 2642 "slghparse.cc" /* yacc.c:1646 */ + break; case 87: -#line 280 "slghparse.y" /* yacc.c:1646 */ + { (yyval.construct) = slgh->createConstructor((yyvsp[-1].subtablesym)); } -#line 2648 "slghparse.cc" /* yacc.c:1646 */ + break; case 88: -#line 281 "slghparse.y" /* yacc.c:1646 */ + { SubtableSymbol *sym=slgh->newTable((yyvsp[-1].str)); (yyval.construct) = slgh->createConstructor(sym); } -#line 2654 "slghparse.cc" /* yacc.c:1646 */ + break; case 89: -#line 282 "slghparse.y" /* yacc.c:1646 */ + { (yyval.construct) = slgh->createConstructor((SubtableSymbol *)0); } -#line 2660 "slghparse.cc" /* yacc.c:1646 */ + break; case 90: -#line 283 "slghparse.y" /* yacc.c:1646 */ + { (yyval.construct) = (yyvsp[-1].construct); } -#line 2666 "slghparse.cc" /* yacc.c:1646 */ + break; case 91: -#line 285 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = new ConstantValue(*(yyvsp[0].big)); delete (yyvsp[0].big); } -#line 2672 "slghparse.cc" /* yacc.c:1646 */ + break; case 92: -#line 287 "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 2679 "slghparse.cc" /* yacc.c:1646 */ + break; case 93: -#line 290 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = (yyvsp[0].specsym)->getPatternExpression(); } -#line 2685 "slghparse.cc" /* yacc.c:1646 */ + break; case 94: -#line 291 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = (yyvsp[-1].patexp); } -#line 2691 "slghparse.cc" /* yacc.c:1646 */ + break; case 95: -#line 292 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = new PlusExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); } -#line 2697 "slghparse.cc" /* yacc.c:1646 */ + break; case 96: -#line 293 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = new SubExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); } -#line 2703 "slghparse.cc" /* yacc.c:1646 */ + break; case 97: -#line 294 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = new MultExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); } -#line 2709 "slghparse.cc" /* yacc.c:1646 */ + break; case 98: -#line 295 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = new LeftShiftExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); } -#line 2715 "slghparse.cc" /* yacc.c:1646 */ + break; case 99: -#line 296 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = new RightShiftExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); } -#line 2721 "slghparse.cc" /* yacc.c:1646 */ + break; case 100: -#line 297 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = new AndExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); } -#line 2727 "slghparse.cc" /* yacc.c:1646 */ + break; case 101: -#line 298 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = new OrExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); } -#line 2733 "slghparse.cc" /* yacc.c:1646 */ + break; case 102: -#line 299 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = new XorExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); } -#line 2739 "slghparse.cc" /* yacc.c:1646 */ + break; case 103: -#line 300 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = new DivExpression((yyvsp[-2].patexp),(yyvsp[0].patexp)); } -#line 2745 "slghparse.cc" /* yacc.c:1646 */ + break; case 104: -#line 301 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = new MinusExpression((yyvsp[0].patexp)); } -#line 2751 "slghparse.cc" /* yacc.c:1646 */ + break; case 105: -#line 302 "slghparse.y" /* yacc.c:1646 */ + { (yyval.patexp) = new NotExpression((yyvsp[0].patexp)); } -#line 2757 "slghparse.cc" /* yacc.c:1646 */ + break; case 107: -#line 305 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new EquationAnd((yyvsp[-2].pateq),(yyvsp[0].pateq)); } -#line 2763 "slghparse.cc" /* yacc.c:1646 */ + break; case 108: -#line 306 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new EquationOr((yyvsp[-2].pateq),(yyvsp[0].pateq)); } -#line 2769 "slghparse.cc" /* yacc.c:1646 */ + break; case 109: -#line 307 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new EquationCat((yyvsp[-2].pateq),(yyvsp[0].pateq)); } -#line 2775 "slghparse.cc" /* yacc.c:1646 */ + break; case 110: -#line 309 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new EquationLeftEllipsis((yyvsp[0].pateq)); } -#line 2781 "slghparse.cc" /* yacc.c:1646 */ + break; case 112: -#line 312 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new EquationRightEllipsis((yyvsp[-1].pateq)); } -#line 2787 "slghparse.cc" /* yacc.c:1646 */ + break; case 115: -#line 316 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = (yyvsp[-1].pateq); } -#line 2793 "slghparse.cc" /* yacc.c:1646 */ + break; case 116: -#line 318 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new EqualEquation((yyvsp[-2].famsym)->getPatternValue(),(yyvsp[0].patexp)); } -#line 2799 "slghparse.cc" /* yacc.c:1646 */ + break; case 117: -#line 319 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new NotEqualEquation((yyvsp[-2].famsym)->getPatternValue(),(yyvsp[0].patexp)); } -#line 2805 "slghparse.cc" /* yacc.c:1646 */ + break; case 118: -#line 320 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new LessEquation((yyvsp[-2].famsym)->getPatternValue(),(yyvsp[0].patexp)); } -#line 2811 "slghparse.cc" /* yacc.c:1646 */ + break; case 119: -#line 321 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new LessEqualEquation((yyvsp[-2].famsym)->getPatternValue(),(yyvsp[0].patexp)); } -#line 2817 "slghparse.cc" /* yacc.c:1646 */ + break; case 120: -#line 322 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new GreaterEquation((yyvsp[-2].famsym)->getPatternValue(),(yyvsp[0].patexp)); } -#line 2823 "slghparse.cc" /* yacc.c:1646 */ + break; case 121: -#line 323 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new GreaterEqualEquation((yyvsp[-2].famsym)->getPatternValue(),(yyvsp[0].patexp)); } -#line 2829 "slghparse.cc" /* yacc.c:1646 */ + break; case 122: -#line 324 "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 2837 "slghparse.cc" /* yacc.c:1646 */ + break; case 123: -#line 327 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new OperandEquation((yyvsp[0].operandsym)->getIndex()); slgh->selfDefine((yyvsp[0].operandsym)); } -#line 2843 "slghparse.cc" /* yacc.c:1646 */ + break; case 124: -#line 328 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = new UnconstrainedEquation((yyvsp[0].specsym)->getPatternExpression()); } -#line 2849 "slghparse.cc" /* yacc.c:1646 */ + break; case 125: -#line 329 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = slgh->defineInvisibleOperand((yyvsp[0].famsym)); } -#line 2855 "slghparse.cc" /* yacc.c:1646 */ + break; case 126: -#line 330 "slghparse.y" /* yacc.c:1646 */ + { (yyval.pateq) = slgh->defineInvisibleOperand((yyvsp[0].subtablesym)); } -#line 2861 "slghparse.cc" /* yacc.c:1646 */ + break; case 127: -#line 332 "slghparse.y" /* yacc.c:1646 */ + { (yyval.contop) = (vector *)0; } -#line 2867 "slghparse.cc" /* yacc.c:1646 */ + break; case 128: -#line 333 "slghparse.y" /* yacc.c:1646 */ + { (yyval.contop) = (yyvsp[-1].contop); } -#line 2873 "slghparse.cc" /* yacc.c:1646 */ + break; case 129: -#line 335 "slghparse.y" /* yacc.c:1646 */ + { (yyval.contop) = new vector; } -#line 2879 "slghparse.cc" /* yacc.c:1646 */ + break; case 130: -#line 336 "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' or 'inst_next2' to set context variable: "+(yyvsp[-3].contextsym)->getName(); yyerror(errmsg.c_str()); YYERROR; } } -#line 2885 "slghparse.cc" /* yacc.c:1646 */ + break; case 131: -#line 337 "slghparse.y" /* yacc.c:1646 */ + { (yyval.contop) = (yyvsp[-7].contop); slgh->contextSet((yyvsp[-7].contop),(yyvsp[-4].famsym),(yyvsp[-2].contextsym)); } -#line 2891 "slghparse.cc" /* yacc.c:1646 */ + break; case 132: -#line 338 "slghparse.y" /* yacc.c:1646 */ + { (yyval.contop) = (yyvsp[-7].contop); slgh->contextSet((yyvsp[-7].contop),(yyvsp[-4].specsym),(yyvsp[-2].contextsym)); } -#line 2897 "slghparse.cc" /* yacc.c:1646 */ + break; case 133: -#line 339 "slghparse.y" /* yacc.c:1646 */ + { (yyval.contop) = (yyvsp[-4].contop); slgh->defineOperand((yyvsp[-3].operandsym),(yyvsp[-1].patexp)); } -#line 2903 "slghparse.cc" /* yacc.c:1646 */ + break; case 134: -#line 340 "slghparse.y" /* yacc.c:1646 */ + { string errmsg="Expecting context symbol, not "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; } -#line 2909 "slghparse.cc" /* yacc.c:1646 */ + break; case 135: -#line 342 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sectionsym) = slgh->newSectionSymbol( *(yyvsp[-1].str) ); delete (yyvsp[-1].str); } -#line 2915 "slghparse.cc" /* yacc.c:1646 */ + break; case 136: -#line 343 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sectionsym) = (yyvsp[-1].sectionsym); } -#line 2921 "slghparse.cc" /* yacc.c:1646 */ + break; case 137: -#line 345 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sectionstart) = slgh->firstNamedSection((yyvsp[-1].sem),(yyvsp[0].sectionsym)); } -#line 2927 "slghparse.cc" /* yacc.c:1646 */ + break; case 138: -#line 347 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sectionstart) = (yyvsp[0].sectionstart); } -#line 2933 "slghparse.cc" /* yacc.c:1646 */ + break; case 139: -#line 348 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sectionstart) = slgh->nextNamedSection((yyvsp[-2].sectionstart),(yyvsp[-1].sem),(yyvsp[0].sectionsym)); } -#line 2939 "slghparse.cc" /* yacc.c:1646 */ + break; case 140: -#line 350 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sem) = (yyvsp[0].sem); if ((yyval.sem)->getOpvec().empty() && ((yyval.sem)->getResult() == (HandleTpl *)0)) slgh->recordNop(); } -#line 2945 "slghparse.cc" /* yacc.c:1646 */ + break; case 141: -#line 351 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sem) = slgh->setResultVarnode((yyvsp[-3].sem),(yyvsp[-1].varnode)); } -#line 2951 "slghparse.cc" /* yacc.c:1646 */ + break; case 142: -#line 352 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sem) = slgh->setResultStarVarnode((yyvsp[-4].sem),(yyvsp[-2].starqual),(yyvsp[-1].varnode)); } -#line 2957 "slghparse.cc" /* yacc.c:1646 */ + break; case 143: -#line 353 "slghparse.y" /* yacc.c:1646 */ + { string errmsg="Unknown export varnode: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; } -#line 2963 "slghparse.cc" /* yacc.c:1646 */ + break; case 144: -#line 354 "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 2969 "slghparse.cc" /* yacc.c:1646 */ + break; case 145: -#line 356 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sem) = new ConstructTpl(); } -#line 2975 "slghparse.cc" /* yacc.c:1646 */ + break; case 146: -#line 357 "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 2981 "slghparse.cc" /* yacc.c:1646 */ + break; case 147: -#line 358 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sem) = (yyvsp[-3].sem); slgh->pcode.newLocalDefinition((yyvsp[-1].str)); } -#line 2987 "slghparse.cc" /* yacc.c:1646 */ + break; case 148: -#line 359 "slghparse.y" /* yacc.c:1646 */ + { (yyval.sem) = (yyvsp[-5].sem); slgh->pcode.newLocalDefinition((yyvsp[-3].str),*(yyvsp[-1].i)); delete (yyvsp[-1].i); } -#line 2993 "slghparse.cc" /* yacc.c:1646 */ + break; case 149: -#line 361 "slghparse.y" /* yacc.c:1646 */ + { (yyvsp[-1].tree)->setOutput((yyvsp[-3].varnode)); (yyval.stmt) = ExprTree::toVector((yyvsp[-1].tree)); } -#line 2999 "slghparse.cc" /* yacc.c:1646 */ + break; case 150: -#line 362 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.newOutput(true,(yyvsp[-1].tree),(yyvsp[-3].str)); } -#line 3005 "slghparse.cc" /* yacc.c:1646 */ + break; case 151: -#line 363 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.newOutput(false,(yyvsp[-1].tree),(yyvsp[-3].str)); } -#line 3011 "slghparse.cc" /* yacc.c:1646 */ + break; case 152: -#line 364 "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 3017 "slghparse.cc" /* yacc.c:1646 */ + break; case 153: -#line 365 "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 3023 "slghparse.cc" /* yacc.c:1646 */ + break; case 154: -#line 366 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = (vector *)0; string errmsg = "Redefinition of symbol: "+(yyvsp[-1].specsym)->getName(); yyerror(errmsg.c_str()); YYERROR; } -#line 3029 "slghparse.cc" /* yacc.c:1646 */ + break; case 155: -#line 367 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.createStore((yyvsp[-4].starqual),(yyvsp[-3].tree),(yyvsp[-1].tree)); } -#line 3035 "slghparse.cc" /* yacc.c:1646 */ + break; case 156: -#line 368 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.createUserOpNoOut((yyvsp[-4].useropsym),(yyvsp[-2].param)); } -#line 3041 "slghparse.cc" /* yacc.c:1646 */ + break; case 157: -#line 369 "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 3047 "slghparse.cc" /* yacc.c:1646 */ + break; case 158: -#line 370 "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 3053 "slghparse.cc" /* yacc.c:1646 */ + break; case 159: -#line 371 "slghparse.y" /* yacc.c:1646 */ + { delete (yyvsp[-3].varnode); delete (yyvsp[-1].i); yyerror("Illegal truncation on left-hand side of assignment"); YYERROR; } -#line 3059 "slghparse.cc" /* yacc.c:1646 */ + break; case 160: -#line 372 "slghparse.y" /* yacc.c:1646 */ + { delete (yyvsp[-3].varnode); delete (yyvsp[-1].i); yyerror("Illegal subpiece on left-hand side of assignment"); YYERROR; } -#line 3065 "slghparse.cc" /* yacc.c:1646 */ + break; case 161: -#line 373 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.createOpConst(BUILD,(yyvsp[-1].operandsym)->getIndex()); } -#line 3071 "slghparse.cc" /* yacc.c:1646 */ + break; case 162: -#line 374 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->createCrossBuild((yyvsp[-3].varnode),(yyvsp[-1].sectionsym)); } -#line 3077 "slghparse.cc" /* yacc.c:1646 */ + break; case 163: -#line 375 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->createCrossBuild((yyvsp[-3].varnode),slgh->newSectionSymbol(*(yyvsp[-1].str))); delete (yyvsp[-1].str); } -#line 3083 "slghparse.cc" /* yacc.c:1646 */ + break; case 164: -#line 376 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.createOpConst(DELAY_SLOT,*(yyvsp[-2].i)); delete (yyvsp[-2].i); } -#line 3089 "slghparse.cc" /* yacc.c:1646 */ + break; case 165: -#line 377 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.createOpNoOut(CPUI_BRANCH,new ExprTree((yyvsp[-1].varnode))); } -#line 3095 "slghparse.cc" /* yacc.c:1646 */ + break; case 166: -#line 378 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.createOpNoOut(CPUI_CBRANCH,new ExprTree((yyvsp[-1].varnode)),(yyvsp[-3].tree)); } -#line 3101 "slghparse.cc" /* yacc.c:1646 */ + break; case 167: -#line 379 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.createOpNoOut(CPUI_BRANCHIND,(yyvsp[-2].tree)); } -#line 3107 "slghparse.cc" /* yacc.c:1646 */ + break; case 168: -#line 380 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.createOpNoOut(CPUI_CALL,new ExprTree((yyvsp[-1].varnode))); } -#line 3113 "slghparse.cc" /* yacc.c:1646 */ + break; case 169: -#line 381 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.createOpNoOut(CPUI_CALLIND,(yyvsp[-2].tree)); } -#line 3119 "slghparse.cc" /* yacc.c:1646 */ + break; case 170: -#line 382 "slghparse.y" /* yacc.c:1646 */ + { yyerror("Must specify an indirect parameter for return"); YYERROR; } -#line 3125 "slghparse.cc" /* yacc.c:1646 */ + break; case 171: -#line 383 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.createOpNoOut(CPUI_RETURN,(yyvsp[-2].tree)); } -#line 3131 "slghparse.cc" /* yacc.c:1646 */ + break; case 172: -#line 384 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->createMacroUse((yyvsp[-4].macrosym),(yyvsp[-2].param)); } -#line 3137 "slghparse.cc" /* yacc.c:1646 */ + break; case 173: -#line 385 "slghparse.y" /* yacc.c:1646 */ + { (yyval.stmt) = slgh->pcode.placeLabel( (yyvsp[0].labelsym) ); } -#line 3143 "slghparse.cc" /* yacc.c:1646 */ + break; case 174: -#line 387 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = new ExprTree((yyvsp[0].varnode)); } -#line 3149 "slghparse.cc" /* yacc.c:1646 */ + break; case 175: -#line 388 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createLoad((yyvsp[-1].starqual),(yyvsp[0].tree)); } -#line 3155 "slghparse.cc" /* yacc.c:1646 */ + break; case 176: -#line 389 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = (yyvsp[-1].tree); } -#line 3161 "slghparse.cc" /* yacc.c:1646 */ + break; case 177: -#line 390 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_ADD,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3167 "slghparse.cc" /* yacc.c:1646 */ + break; case 178: -#line 391 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SUB,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3173 "slghparse.cc" /* yacc.c:1646 */ + break; case 179: -#line 392 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_EQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3179 "slghparse.cc" /* yacc.c:1646 */ + break; case 180: -#line 393 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_NOTEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3185 "slghparse.cc" /* yacc.c:1646 */ + break; case 181: -#line 394 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_LESS,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3191 "slghparse.cc" /* yacc.c:1646 */ + break; case 182: -#line 395 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_LESSEQUAL,(yyvsp[0].tree),(yyvsp[-2].tree)); } -#line 3197 "slghparse.cc" /* yacc.c:1646 */ + break; case 183: -#line 396 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_LESSEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3203 "slghparse.cc" /* yacc.c:1646 */ + break; case 184: -#line 397 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_LESS,(yyvsp[0].tree),(yyvsp[-2].tree)); } -#line 3209 "slghparse.cc" /* yacc.c:1646 */ + break; case 185: -#line 398 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SLESS,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3215 "slghparse.cc" /* yacc.c:1646 */ + break; case 186: -#line 399 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SLESSEQUAL,(yyvsp[0].tree),(yyvsp[-2].tree)); } -#line 3221 "slghparse.cc" /* yacc.c:1646 */ + break; case 187: -#line 400 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SLESSEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3227 "slghparse.cc" /* yacc.c:1646 */ + break; case 188: -#line 401 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SLESS,(yyvsp[0].tree),(yyvsp[-2].tree)); } -#line 3233 "slghparse.cc" /* yacc.c:1646 */ + break; case 189: -#line 402 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_2COMP,(yyvsp[0].tree)); } -#line 3239 "slghparse.cc" /* yacc.c:1646 */ + break; case 190: -#line 403 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_NEGATE,(yyvsp[0].tree)); } -#line 3245 "slghparse.cc" /* yacc.c:1646 */ + break; case 191: -#line 404 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_XOR,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3251 "slghparse.cc" /* yacc.c:1646 */ + break; case 192: -#line 405 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_AND,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3257 "slghparse.cc" /* yacc.c:1646 */ + break; case 193: -#line 406 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_OR,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3263 "slghparse.cc" /* yacc.c:1646 */ + break; case 194: -#line 407 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_LEFT,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3269 "slghparse.cc" /* yacc.c:1646 */ + break; case 195: -#line 408 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_RIGHT,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3275 "slghparse.cc" /* yacc.c:1646 */ + break; case 196: -#line 409 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SRIGHT,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3281 "slghparse.cc" /* yacc.c:1646 */ + break; case 197: -#line 410 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_MULT,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3287 "slghparse.cc" /* yacc.c:1646 */ + break; case 198: -#line 411 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_DIV,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3293 "slghparse.cc" /* yacc.c:1646 */ + break; case 199: -#line 412 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SDIV,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3299 "slghparse.cc" /* yacc.c:1646 */ + break; case 200: -#line 413 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_REM,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3305 "slghparse.cc" /* yacc.c:1646 */ + break; case 201: -#line 414 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SREM,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3311 "slghparse.cc" /* yacc.c:1646 */ + break; case 202: -#line 415 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_BOOL_NEGATE,(yyvsp[0].tree)); } -#line 3317 "slghparse.cc" /* yacc.c:1646 */ + break; case 203: -#line 416 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_BOOL_XOR,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3323 "slghparse.cc" /* yacc.c:1646 */ + break; case 204: -#line 417 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_BOOL_AND,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3329 "slghparse.cc" /* yacc.c:1646 */ + break; case 205: -#line 418 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_BOOL_OR,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3335 "slghparse.cc" /* yacc.c:1646 */ + break; case 206: -#line 419 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_EQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3341 "slghparse.cc" /* yacc.c:1646 */ + break; case 207: -#line 420 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_NOTEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3347 "slghparse.cc" /* yacc.c:1646 */ + break; case 208: -#line 421 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_LESS,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3353 "slghparse.cc" /* yacc.c:1646 */ + break; case 209: -#line 422 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_LESS,(yyvsp[0].tree),(yyvsp[-2].tree)); } -#line 3359 "slghparse.cc" /* yacc.c:1646 */ + break; case 210: -#line 423 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_LESSEQUAL,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3365 "slghparse.cc" /* yacc.c:1646 */ + break; case 211: -#line 424 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_LESSEQUAL,(yyvsp[0].tree),(yyvsp[-2].tree)); } -#line 3371 "slghparse.cc" /* yacc.c:1646 */ + break; case 212: -#line 425 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_ADD,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3377 "slghparse.cc" /* yacc.c:1646 */ + break; case 213: -#line 426 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_SUB,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3383 "slghparse.cc" /* yacc.c:1646 */ + break; case 214: -#line 427 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_MULT,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3389 "slghparse.cc" /* yacc.c:1646 */ + break; case 215: -#line 428 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_DIV,(yyvsp[-2].tree),(yyvsp[0].tree)); } -#line 3395 "slghparse.cc" /* yacc.c:1646 */ + break; case 216: -#line 429 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_NEG,(yyvsp[0].tree)); } -#line 3401 "slghparse.cc" /* yacc.c:1646 */ + break; case 217: -#line 430 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_ABS,(yyvsp[-1].tree)); } -#line 3407 "slghparse.cc" /* yacc.c:1646 */ + break; case 218: -#line 431 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_SQRT,(yyvsp[-1].tree)); } -#line 3413 "slghparse.cc" /* yacc.c:1646 */ + break; case 219: -#line 432 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SEXT,(yyvsp[-1].tree)); } -#line 3419 "slghparse.cc" /* yacc.c:1646 */ + break; case 220: -#line 433 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_ZEXT,(yyvsp[-1].tree)); } -#line 3425 "slghparse.cc" /* yacc.c:1646 */ + break; case 221: -#line 434 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_CARRY,(yyvsp[-3].tree),(yyvsp[-1].tree)); } -#line 3431 "slghparse.cc" /* yacc.c:1646 */ + break; case 222: -#line 435 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SCARRY,(yyvsp[-3].tree),(yyvsp[-1].tree)); } -#line 3437 "slghparse.cc" /* yacc.c:1646 */ + break; case 223: -#line 436 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_INT_SBORROW,(yyvsp[-3].tree),(yyvsp[-1].tree)); } -#line 3443 "slghparse.cc" /* yacc.c:1646 */ + break; case 224: -#line 437 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_FLOAT2FLOAT,(yyvsp[-1].tree)); } -#line 3449 "slghparse.cc" /* yacc.c:1646 */ + break; case 225: -#line 438 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_INT2FLOAT,(yyvsp[-1].tree)); } -#line 3455 "slghparse.cc" /* yacc.c:1646 */ + break; case 226: -#line 439 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_NAN,(yyvsp[-1].tree)); } -#line 3461 "slghparse.cc" /* yacc.c:1646 */ + break; case 227: -#line 440 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_TRUNC,(yyvsp[-1].tree)); } -#line 3467 "slghparse.cc" /* yacc.c:1646 */ + break; case 228: -#line 441 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_CEIL,(yyvsp[-1].tree)); } -#line 3473 "slghparse.cc" /* yacc.c:1646 */ + break; case 229: -#line 442 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_FLOOR,(yyvsp[-1].tree)); } -#line 3479 "slghparse.cc" /* yacc.c:1646 */ + break; case 230: -#line 443 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_FLOAT_ROUND,(yyvsp[-1].tree)); } -#line 3485 "slghparse.cc" /* yacc.c:1646 */ + break; case 231: -#line 444 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_NEW,(yyvsp[-1].tree)); } -#line 3491 "slghparse.cc" /* yacc.c:1646 */ + break; case 232: -#line 445 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_NEW,(yyvsp[-3].tree),(yyvsp[-1].tree)); } -#line 3497 "slghparse.cc" /* yacc.c:1646 */ + break; case 233: -#line 446 "slghparse.y" /* yacc.c:1646 */ + { (yyval.tree) = slgh->pcode.createOp(CPUI_POPCOUNT,(yyvsp[-1].tree)); } -#line 3503 "slghparse.cc" /* yacc.c:1646 */ + break; case 234: -#line 447 "slghparse.y" /* yacc.c:1646 */ - { (yyval.tree) = slgh->pcode.createOp(CPUI_SUBPIECE,new ExprTree((yyvsp[-3].specsym)->getVarnode()),new ExprTree((yyvsp[-1].varnode))); } -#line 3509 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.tree) = slgh->pcode.createOp(CPUI_LZCOUNT,(yyvsp[-1].tree)); } + break; case 235: -#line 448 "slghparse.y" /* yacc.c:1646 */ - { (yyval.tree) = slgh->pcode.createBitRange((yyvsp[-2].specsym),0,(uint4)(*(yyvsp[0].i) * 8)); delete (yyvsp[0].i); } -#line 3515 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.tree) = slgh->pcode.createOp(CPUI_SUBPIECE,new ExprTree((yyvsp[-3].specsym)->getVarnode()),new ExprTree((yyvsp[-1].varnode))); } + break; case 236: -#line 449 "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 3521 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.tree) = slgh->pcode.createBitRange((yyvsp[-2].specsym),0,(uint4)(*(yyvsp[0].i) * 8)); delete (yyvsp[0].i); } + break; case 237: -#line 450 "slghparse.y" /* yacc.c:1646 */ - { (yyval.tree)=slgh->pcode.createBitRange((yyvsp[0].bitsym)->getParentSymbol(),(yyvsp[0].bitsym)->getBitOffset(),(yyvsp[0].bitsym)->numBits()); } -#line 3527 "slghparse.cc" /* 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); } + break; case 238: -#line 451 "slghparse.y" /* yacc.c:1646 */ - { (yyval.tree) = slgh->pcode.createUserOp((yyvsp[-3].useropsym),(yyvsp[-1].param)); } -#line 3533 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.tree)=slgh->pcode.createBitRange((yyvsp[0].bitsym)->getParentSymbol(),(yyvsp[0].bitsym)->getBitOffset(),(yyvsp[0].bitsym)->numBits()); } + break; case 239: -#line 452 "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 3539 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.tree) = slgh->pcode.createUserOp((yyvsp[-3].useropsym),(yyvsp[-1].param)); } + break; case 240: -#line 454 "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 3545 "slghparse.cc" /* 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)); } + break; case 241: -#line 455 "slghparse.y" /* yacc.c:1646 */ - { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = 0; (yyval.starqual)->id=ConstTpl((yyvsp[-1].spacesym)->getSpace()); } -#line 3551 "slghparse.cc" /* 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()); } + break; case 242: -#line 456 "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 3557 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = 0; (yyval.starqual)->id=ConstTpl((yyvsp[-1].spacesym)->getSpace()); } + break; case 243: -#line 457 "slghparse.y" /* yacc.c:1646 */ - { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = 0; (yyval.starqual)->id=ConstTpl(slgh->getDefaultCodeSpace()); } -#line 3563 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = *(yyvsp[0].i); delete (yyvsp[0].i); (yyval.starqual)->id=ConstTpl(slgh->getDefaultCodeSpace()); } + break; case 244: -#line 459 "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 3569 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.starqual) = new StarQuality; (yyval.starqual)->size = 0; (yyval.starqual)->id=ConstTpl(slgh->getDefaultCodeSpace()); } + break; case 245: -#line 460 "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 3575 "slghparse.cc" /* 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; } + break; case 246: -#line 461 "slghparse.y" /* yacc.c:1646 */ - { VarnodeTpl *sym = (yyvsp[0].next2sym)->getVarnode(); (yyval.varnode) = new VarnodeTpl(ConstTpl(ConstTpl::j_curspace),sym->getOffset(),ConstTpl(ConstTpl::j_curspace_size)); delete sym; } -#line 3581 "slghparse.cc" /* 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; } + break; case 247: -#line 462 "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 3587 "slghparse.cc" /* yacc.c:1646 */ + + { VarnodeTpl *sym = (yyvsp[0].next2sym)->getVarnode(); (yyval.varnode) = new VarnodeTpl(ConstTpl(ConstTpl::j_curspace),sym->getOffset(),ConstTpl(ConstTpl::j_curspace_size)); delete sym; } + break; case 248: -#line 463 "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 3593 "slghparse.cc" /* 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); } + break; case 249: -#line 464 "slghparse.y" /* yacc.c:1646 */ - { (yyval.varnode) = (yyvsp[0].operandsym)->getVarnode(); (yyvsp[0].operandsym)->setCodeAddress(); } -#line 3599 "slghparse.cc" /* 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)"); } + break; case 250: -#line 465 "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 3605 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.varnode) = (yyvsp[0].operandsym)->getVarnode(); (yyvsp[0].operandsym)->setCodeAddress(); } + break; case 251: -#line 466 "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 3611 "slghparse.cc" /* 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); } + break; case 252: -#line 467 "slghparse.y" /* yacc.c:1646 */ - { string errmsg = "Unknown jump destination: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; } -#line 3617 "slghparse.cc" /* 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(); } + break; case 253: -#line 469 "slghparse.y" /* yacc.c:1646 */ - { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); } -#line 3623 "slghparse.cc" /* yacc.c:1646 */ + + { string errmsg = "Unknown jump destination: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; } + break; case 254: -#line 470 "slghparse.y" /* yacc.c:1646 */ - { (yyval.varnode) = (yyvsp[0].varnode); } -#line 3629 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); } + break; case 255: -#line 471 "slghparse.y" /* yacc.c:1646 */ - { string errmsg = "Unknown varnode parameter: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; } -#line 3635 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.varnode) = (yyvsp[0].varnode); } + break; case 256: -#line 472 "slghparse.y" /* yacc.c:1646 */ - { string errmsg = "Subtable not attached to operand: "+(yyvsp[0].subtablesym)->getName(); yyerror(errmsg.c_str()); YYERROR; } -#line 3641 "slghparse.cc" /* yacc.c:1646 */ + + { string errmsg = "Unknown varnode parameter: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; } + break; case 257: -#line 474 "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 3647 "slghparse.cc" /* yacc.c:1646 */ + + { string errmsg = "Subtable not attached to operand: "+(yyvsp[0].subtablesym)->getName(); yyerror(errmsg.c_str()); YYERROR; } + break; case 258: -#line 475 "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 3653 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.varnode) = new VarnodeTpl(ConstTpl(slgh->getConstantSpace()),ConstTpl(ConstTpl::real,*(yyvsp[0].i)),ConstTpl(ConstTpl::real,0)); delete (yyvsp[0].i); } + break; case 259: -#line 476 "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 3659 "slghparse.cc" /* 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)"); } + break; case 260: -#line 477 "slghparse.y" /* yacc.c:1646 */ - { (yyval.varnode) = slgh->pcode.addressOf((yyvsp[0].varnode),0); } -#line 3665 "slghparse.cc" /* 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); } + break; case 261: -#line 478 "slghparse.y" /* yacc.c:1646 */ - { (yyval.varnode) = slgh->pcode.addressOf((yyvsp[0].varnode),*(yyvsp[-1].i)); delete (yyvsp[-1].i); } -#line 3671 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.varnode) = slgh->pcode.addressOf((yyvsp[0].varnode),0); } + break; case 262: -#line 480 "slghparse.y" /* yacc.c:1646 */ - { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); } -#line 3677 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.varnode) = slgh->pcode.addressOf((yyvsp[0].varnode),*(yyvsp[-1].i)); delete (yyvsp[-1].i); } + break; case 263: -#line 481 "slghparse.y" /* yacc.c:1646 */ - { string errmsg = "Unknown assignment varnode: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; } -#line 3683 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); } + break; case 264: -#line 482 "slghparse.y" /* yacc.c:1646 */ - { string errmsg = "Subtable not attached to operand: "+(yyvsp[0].subtablesym)->getName(); yyerror(errmsg.c_str()); YYERROR; } -#line 3689 "slghparse.cc" /* yacc.c:1646 */ + + { string errmsg = "Unknown assignment varnode: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; } + break; case 265: -#line 484 "slghparse.y" /* yacc.c:1646 */ - { (yyval.labelsym) = (yyvsp[-1].labelsym); } -#line 3695 "slghparse.cc" /* yacc.c:1646 */ + + { string errmsg = "Subtable not attached to operand: "+(yyvsp[0].subtablesym)->getName(); yyerror(errmsg.c_str()); YYERROR; } + break; case 266: -#line 485 "slghparse.y" /* yacc.c:1646 */ - { (yyval.labelsym) = slgh->pcode.defineLabel( (yyvsp[-1].str) ); } -#line 3701 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.labelsym) = (yyvsp[-1].labelsym); } + break; case 267: -#line 487 "slghparse.y" /* yacc.c:1646 */ - { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); } -#line 3707 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.labelsym) = slgh->pcode.defineLabel( (yyvsp[-1].str) ); } + break; case 268: -#line 488 "slghparse.y" /* yacc.c:1646 */ - { (yyval.varnode) = slgh->pcode.addressOf((yyvsp[0].varnode),0); } -#line 3713 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.varnode) = (yyvsp[0].specsym)->getVarnode(); } + break; case 269: -#line 489 "slghparse.y" /* yacc.c:1646 */ - { (yyval.varnode) = slgh->pcode.addressOf((yyvsp[0].varnode),*(yyvsp[-1].i)); delete (yyvsp[-1].i); } -#line 3719 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.varnode) = slgh->pcode.addressOf((yyvsp[0].varnode),0); } + break; case 270: -#line 490 "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 3725 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.varnode) = slgh->pcode.addressOf((yyvsp[0].varnode),*(yyvsp[-1].i)); delete (yyvsp[-1].i); } + break; case 271: -#line 491 "slghparse.y" /* yacc.c:1646 */ - { string errmsg="Unknown export varnode: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; } -#line 3731 "slghparse.cc" /* 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); } + break; case 272: -#line 492 "slghparse.y" /* yacc.c:1646 */ - { string errmsg = "Subtable not attached to operand: "+(yyvsp[0].subtablesym)->getName(); yyerror(errmsg.c_str()); YYERROR; } -#line 3737 "slghparse.cc" /* yacc.c:1646 */ + + { string errmsg="Unknown export varnode: "+*(yyvsp[0].str); delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; } + break; case 273: -#line 494 "slghparse.y" /* yacc.c:1646 */ - { (yyval.famsym) = (yyvsp[0].valuesym); } -#line 3743 "slghparse.cc" /* yacc.c:1646 */ + + { string errmsg = "Subtable not attached to operand: "+(yyvsp[0].subtablesym)->getName(); yyerror(errmsg.c_str()); YYERROR; } + break; case 274: -#line 495 "slghparse.y" /* yacc.c:1646 */ - { (yyval.famsym) = (yyvsp[0].valuemapsym); } -#line 3749 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.famsym) = (yyvsp[0].valuesym); } + break; case 275: -#line 496 "slghparse.y" /* yacc.c:1646 */ - { (yyval.famsym) = (yyvsp[0].contextsym); } -#line 3755 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.famsym) = (yyvsp[0].valuemapsym); } + break; case 276: -#line 497 "slghparse.y" /* yacc.c:1646 */ - { (yyval.famsym) = (yyvsp[0].namesym); } -#line 3761 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.famsym) = (yyvsp[0].contextsym); } + break; case 277: -#line 498 "slghparse.y" /* yacc.c:1646 */ - { (yyval.famsym) = (yyvsp[0].varlistsym); } -#line 3767 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.famsym) = (yyvsp[0].namesym); } + break; case 278: -#line 500 "slghparse.y" /* yacc.c:1646 */ - { (yyval.specsym) = (yyvsp[0].varsym); } -#line 3773 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.famsym) = (yyvsp[0].varlistsym); } + break; case 279: -#line 501 "slghparse.y" /* yacc.c:1646 */ - { (yyval.specsym) = (yyvsp[0].specsym); } -#line 3779 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.specsym) = (yyvsp[0].varsym); } + break; case 280: -#line 502 "slghparse.y" /* yacc.c:1646 */ - { (yyval.specsym) = (yyvsp[0].operandsym); } -#line 3785 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.specsym) = (yyvsp[0].specsym); } + break; case 281: -#line 503 "slghparse.y" /* yacc.c:1646 */ - { (yyval.specsym) = (yyvsp[0].startsym); } -#line 3791 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.specsym) = (yyvsp[0].operandsym); } + break; case 282: -#line 504 "slghparse.y" /* yacc.c:1646 */ - { (yyval.specsym) = (yyvsp[0].endsym); } -#line 3797 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.specsym) = (yyvsp[0].startsym); } + break; case 283: -#line 505 "slghparse.y" /* yacc.c:1646 */ - { (yyval.specsym) = (yyvsp[0].next2sym); } -#line 3803 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.specsym) = (yyvsp[0].endsym); } + break; case 284: -#line 507 "slghparse.y" /* yacc.c:1646 */ - { (yyval.str) = new string; (*(yyval.str)) += (yyvsp[0].ch); } -#line 3809 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.specsym) = (yyvsp[0].next2sym); } + break; case 285: -#line 508 "slghparse.y" /* yacc.c:1646 */ - { (yyval.str) = (yyvsp[-1].str); (*(yyval.str)) += (yyvsp[0].ch); } -#line 3815 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.str) = new string; (*(yyval.str)) += (yyvsp[0].ch); } + break; case 286: -#line 510 "slghparse.y" /* yacc.c:1646 */ - { (yyval.biglist) = (yyvsp[-1].biglist); } -#line 3821 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.str) = (yyvsp[-1].str); (*(yyval.str)) += (yyvsp[0].ch); } + break; case 287: -#line 511 "slghparse.y" /* yacc.c:1646 */ - { (yyval.biglist) = new vector; (yyval.biglist)->push_back(intb(*(yyvsp[0].i))); delete (yyvsp[0].i); } -#line 3827 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.biglist) = (yyvsp[-1].biglist); } + break; case 288: -#line 512 "slghparse.y" /* yacc.c:1646 */ - { (yyval.biglist) = new vector; (yyval.biglist)->push_back(-intb(*(yyvsp[0].i))); delete (yyvsp[0].i); } -#line 3833 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.biglist) = new vector; (yyval.biglist)->push_back(intb(*(yyvsp[0].i))); delete (yyvsp[0].i); } + break; case 289: -#line 514 "slghparse.y" /* yacc.c:1646 */ - { (yyval.biglist) = new vector; (yyval.biglist)->push_back(intb(*(yyvsp[0].i))); delete (yyvsp[0].i); } -#line 3839 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.biglist) = new vector; (yyval.biglist)->push_back(-intb(*(yyvsp[0].i))); delete (yyvsp[0].i); } + break; case 290: -#line 515 "slghparse.y" /* yacc.c:1646 */ - { (yyval.biglist) = new vector; (yyval.biglist)->push_back(-intb(*(yyvsp[0].i))); delete (yyvsp[0].i); } -#line 3845 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.biglist) = new vector; (yyval.biglist)->push_back(intb(*(yyvsp[0].i))); delete (yyvsp[0].i); } + break; case 291: -#line 516 "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; (yyval.biglist)->push_back((intb)0xBADBEEF); delete (yyvsp[0].str); } -#line 3852 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.biglist) = new vector; (yyval.biglist)->push_back(-intb(*(yyvsp[0].i))); delete (yyvsp[0].i); } + break; case 292: -#line 518 "slghparse.y" /* yacc.c:1646 */ - { (yyval.biglist) = (yyvsp[-1].biglist); (yyval.biglist)->push_back(intb(*(yyvsp[0].i))); delete (yyvsp[0].i); } -#line 3858 "slghparse.cc" /* 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; (yyval.biglist)->push_back((intb)0xBADBEEF); delete (yyvsp[0].str); } + break; case 293: -#line 519 "slghparse.y" /* yacc.c:1646 */ - { (yyval.biglist) = (yyvsp[-2].biglist); (yyval.biglist)->push_back(-intb(*(yyvsp[0].i))); delete (yyvsp[0].i); } -#line 3864 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.biglist) = (yyvsp[-1].biglist); (yyval.biglist)->push_back(intb(*(yyvsp[0].i))); delete (yyvsp[0].i); } + break; case 294: -#line 520 "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 3871 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.biglist) = (yyvsp[-2].biglist); (yyval.biglist)->push_back(-intb(*(yyvsp[0].i))); delete (yyvsp[0].i); } + break; case 295: -#line 523 "slghparse.y" /* yacc.c:1646 */ - { (yyval.strlist) = (yyvsp[-1].strlist); } -#line 3877 "slghparse.cc" /* 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); } + break; case 296: -#line 524 "slghparse.y" /* yacc.c:1646 */ - { (yyval.strlist) = new vector; (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); } -#line 3883 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.strlist) = (yyvsp[-1].strlist); } + break; case 297: -#line 526 "slghparse.y" /* yacc.c:1646 */ - { (yyval.strlist) = new vector; (yyval.strlist)->push_back( *(yyvsp[0].str) ); delete (yyvsp[0].str); } -#line 3889 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.strlist) = new vector; (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); } + break; case 298: -#line 527 "slghparse.y" /* yacc.c:1646 */ - { (yyval.strlist) = (yyvsp[-1].strlist); (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); } -#line 3895 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.strlist) = new vector; (yyval.strlist)->push_back( *(yyvsp[0].str) ); delete (yyvsp[0].str); } + break; case 299: -#line 528 "slghparse.y" /* yacc.c:1646 */ - { string errmsg = (yyvsp[0].anysym)->getName()+": redefined"; yyerror(errmsg.c_str()); YYERROR; } -#line 3901 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.strlist) = (yyvsp[-1].strlist); (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); } + break; case 300: -#line 530 "slghparse.y" /* yacc.c:1646 */ - { (yyval.strlist) = (yyvsp[-1].strlist); } -#line 3907 "slghparse.cc" /* yacc.c:1646 */ + + { string errmsg = (yyvsp[0].anysym)->getName()+": redefined"; yyerror(errmsg.c_str()); YYERROR; } + break; case 301: -#line 532 "slghparse.y" /* yacc.c:1646 */ - { (yyval.strlist) = new vector; (yyval.strlist)->push_back( *(yyvsp[0].str) ); delete (yyvsp[0].str); } -#line 3913 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.strlist) = (yyvsp[-1].strlist); } + break; case 302: -#line 533 "slghparse.y" /* yacc.c:1646 */ - { (yyval.strlist) = new vector; (yyval.strlist)->push_back( (yyvsp[0].anysym)->getName() ); } -#line 3919 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.strlist) = new vector; (yyval.strlist)->push_back( *(yyvsp[0].str) ); delete (yyvsp[0].str); } + break; case 303: -#line 534 "slghparse.y" /* yacc.c:1646 */ - { (yyval.strlist) = (yyvsp[-1].strlist); (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); } -#line 3925 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.strlist) = new vector; (yyval.strlist)->push_back( (yyvsp[0].anysym)->getName() ); } + break; case 304: -#line 535 "slghparse.y" /* yacc.c:1646 */ - { (yyval.strlist) = (yyvsp[-1].strlist); (yyval.strlist)->push_back((yyvsp[0].anysym)->getName()); } -#line 3931 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.strlist) = (yyvsp[-1].strlist); (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); } + break; case 305: -#line 537 "slghparse.y" /* yacc.c:1646 */ - { (yyval.symlist) = (yyvsp[-1].symlist); } -#line 3937 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.strlist) = (yyvsp[-1].strlist); (yyval.strlist)->push_back((yyvsp[0].anysym)->getName()); } + break; case 306: -#line 538 "slghparse.y" /* yacc.c:1646 */ - { (yyval.symlist) = new vector; (yyval.symlist)->push_back((yyvsp[0].valuesym)); } -#line 3943 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.symlist) = (yyvsp[-1].symlist); } + break; case 307: -#line 539 "slghparse.y" /* yacc.c:1646 */ - { (yyval.symlist) = new vector; (yyval.symlist)->push_back((yyvsp[0].contextsym)); } -#line 3949 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.symlist) = new vector; (yyval.symlist)->push_back((yyvsp[0].valuesym)); } + break; case 308: -#line 541 "slghparse.y" /* yacc.c:1646 */ - { (yyval.symlist) = new vector; (yyval.symlist)->push_back( (yyvsp[0].valuesym) ); } -#line 3955 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.symlist) = new vector; (yyval.symlist)->push_back((yyvsp[0].contextsym)); } + break; case 309: -#line 542 "slghparse.y" /* yacc.c:1646 */ - { (yyval.symlist) = new vector; (yyval.symlist)->push_back((yyvsp[0].contextsym)); } -#line 3961 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.symlist) = new vector; (yyval.symlist)->push_back( (yyvsp[0].valuesym) ); } + break; case 310: -#line 543 "slghparse.y" /* yacc.c:1646 */ - { (yyval.symlist) = (yyvsp[-1].symlist); (yyval.symlist)->push_back((yyvsp[0].valuesym)); } -#line 3967 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.symlist) = new vector; (yyval.symlist)->push_back((yyvsp[0].contextsym)); } + break; case 311: -#line 544 "slghparse.y" /* yacc.c:1646 */ - { (yyval.symlist) = (yyvsp[-1].symlist); (yyval.symlist)->push_back((yyvsp[0].contextsym)); } -#line 3973 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.symlist) = (yyvsp[-1].symlist); (yyval.symlist)->push_back((yyvsp[0].valuesym)); } + break; case 312: -#line 545 "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 3979 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.symlist) = (yyvsp[-1].symlist); (yyval.symlist)->push_back((yyvsp[0].contextsym)); } + break; case 313: -#line 547 "slghparse.y" /* yacc.c:1646 */ - { (yyval.symlist) = (yyvsp[-1].symlist); } -#line 3985 "slghparse.cc" /* yacc.c:1646 */ + + { string errmsg = *(yyvsp[0].str)+": is not a value pattern"; delete (yyvsp[0].str); yyerror(errmsg.c_str()); YYERROR; } + break; case 314: -#line 548 "slghparse.y" /* yacc.c:1646 */ - { (yyval.symlist) = new vector; (yyval.symlist)->push_back((yyvsp[0].varsym)); } -#line 3991 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.symlist) = (yyvsp[-1].symlist); } + break; case 315: -#line 550 "slghparse.y" /* yacc.c:1646 */ + { (yyval.symlist) = new vector; (yyval.symlist)->push_back((yyvsp[0].varsym)); } -#line 3997 "slghparse.cc" /* yacc.c:1646 */ + break; case 316: -#line 551 "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; (yyval.symlist)->push_back((SleighSymbol *)0); delete (yyvsp[0].str); } -#line 4004 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.symlist) = new vector; (yyval.symlist)->push_back((yyvsp[0].varsym)); } + break; case 317: -#line 553 "slghparse.y" /* yacc.c:1646 */ - { (yyval.symlist) = (yyvsp[-1].symlist); (yyval.symlist)->push_back((yyvsp[0].varsym)); } -#line 4010 "slghparse.cc" /* 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; (yyval.symlist)->push_back((SleighSymbol *)0); delete (yyvsp[0].str); } + break; case 318: -#line 554 "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 4017 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.symlist) = (yyvsp[-1].symlist); (yyval.symlist)->push_back((yyvsp[0].varsym)); } + break; case 319: -#line 557 "slghparse.y" /* yacc.c:1646 */ - { (yyval.param) = new vector; } -#line 4023 "slghparse.cc" /* 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); } + break; case 320: -#line 558 "slghparse.y" /* yacc.c:1646 */ - { (yyval.param) = new vector; (yyval.param)->push_back((yyvsp[0].tree)); } -#line 4029 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.param) = new vector; } + break; case 321: -#line 559 "slghparse.y" /* yacc.c:1646 */ - { (yyval.param) = (yyvsp[-2].param); (yyval.param)->push_back((yyvsp[0].tree)); } -#line 4035 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.param) = new vector; (yyval.param)->push_back((yyvsp[0].tree)); } + break; case 322: -#line 561 "slghparse.y" /* yacc.c:1646 */ - { (yyval.strlist) = new vector; } -#line 4041 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.param) = (yyvsp[-2].param); (yyval.param)->push_back((yyvsp[0].tree)); } + break; case 323: -#line 562 "slghparse.y" /* yacc.c:1646 */ - { (yyval.strlist) = new vector; (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); } -#line 4047 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.strlist) = new vector; } + break; case 324: -#line 563 "slghparse.y" /* yacc.c:1646 */ - { (yyval.strlist) = (yyvsp[-2].strlist); (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); } -#line 4053 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.strlist) = new vector; (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); } + break; case 325: -#line 565 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].spacesym); } -#line 4059 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.strlist) = (yyvsp[-2].strlist); (yyval.strlist)->push_back(*(yyvsp[0].str)); delete (yyvsp[0].str); } + break; case 326: -#line 566 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].sectionsym); } -#line 4065 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].spacesym); } + break; case 327: -#line 567 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].tokensym); } -#line 4071 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].sectionsym); } + break; case 328: -#line 568 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].useropsym); } -#line 4077 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].tokensym); } + break; case 329: -#line 569 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].macrosym); } -#line 4083 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].useropsym); } + break; case 330: -#line 570 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].subtablesym); } -#line 4089 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].macrosym); } + break; case 331: -#line 571 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].valuesym); } -#line 4095 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].subtablesym); } + break; case 332: -#line 572 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].valuemapsym); } -#line 4101 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].valuesym); } + break; case 333: -#line 573 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].contextsym); } -#line 4107 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].valuemapsym); } + break; case 334: -#line 574 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].namesym); } -#line 4113 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].contextsym); } + break; case 335: -#line 575 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].varsym); } -#line 4119 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].namesym); } + break; case 336: -#line 576 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].varlistsym); } -#line 4125 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].varsym); } + break; case 337: -#line 577 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].operandsym); } -#line 4131 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].varlistsym); } + break; case 338: -#line 578 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].startsym); } -#line 4137 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].operandsym); } + break; case 339: -#line 579 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].endsym); } -#line 4143 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].startsym); } + break; case 340: -#line 580 "slghparse.y" /* yacc.c:1646 */ - { (yyval.anysym) = (yyvsp[0].next2sym); } -#line 4149 "slghparse.cc" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].endsym); } + break; case 341: -#line 581 "slghparse.y" /* yacc.c:1646 */ + + { (yyval.anysym) = (yyvsp[0].next2sym); } + + break; + + case 342: + { (yyval.anysym) = (yyvsp[0].bitsym); } -#line 4155 "slghparse.cc" /* yacc.c:1646 */ + break; -#line 4159 "slghparse.cc" /* yacc.c:1646 */ + default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4398,7 +4416,7 @@ yyreturn: #endif return yyresult; } -#line 583 "slghparse.y" /* yacc.c:1906 */ + int yyerror(const char *s) diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.hh b/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.hh index f52fe7abbb..e9a86da632 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.hh +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.hh @@ -107,71 +107,72 @@ extern int yydebug; 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, - NEXT2SYM = 366, - MACROSYM = 367, - LABELSYM = 368, - SUBTABLESYM = 369 + OP_LZCOUNT = 305, + BADINTEGER = 306, + GOTO_KEY = 307, + CALL_KEY = 308, + RETURN_KEY = 309, + IF_KEY = 310, + DEFINE_KEY = 311, + ATTACH_KEY = 312, + MACRO_KEY = 313, + SPACE_KEY = 314, + TYPE_KEY = 315, + RAM_KEY = 316, + DEFAULT_KEY = 317, + REGISTER_KEY = 318, + ENDIAN_KEY = 319, + WITH_KEY = 320, + ALIGN_KEY = 321, + OP_UNIMPL = 322, + TOKEN_KEY = 323, + SIGNED_KEY = 324, + NOFLOW_KEY = 325, + HEX_KEY = 326, + DEC_KEY = 327, + BIG_KEY = 328, + LITTLE_KEY = 329, + SIZE_KEY = 330, + WORDSIZE_KEY = 331, + OFFSET_KEY = 332, + NAMES_KEY = 333, + VALUES_KEY = 334, + VARIABLES_KEY = 335, + PCODEOP_KEY = 336, + IS_KEY = 337, + LOCAL_KEY = 338, + DELAYSLOT_KEY = 339, + CROSSBUILD_KEY = 340, + EXPORT_KEY = 341, + BUILD_KEY = 342, + CONTEXT_KEY = 343, + ELLIPSIS_KEY = 344, + GLOBALSET_KEY = 345, + BITRANGE_KEY = 346, + CHAR = 347, + INTEGER = 348, + INTB = 349, + STRING = 350, + SYMBOLSTRING = 351, + SPACESYM = 352, + SECTIONSYM = 353, + TOKENSYM = 354, + USEROPSYM = 355, + VALUESYM = 356, + VALUEMAPSYM = 357, + CONTEXTSYM = 358, + NAMESYM = 359, + VARSYM = 360, + BITSYM = 361, + SPECSYM = 362, + VARLISTSYM = 363, + OPERANDSYM = 364, + STARTSYM = 365, + ENDSYM = 366, + NEXT2SYM = 367, + MACROSYM = 368, + LABELSYM = 369, + SUBTABLESYM = 370 }; #endif @@ -180,7 +181,7 @@ extern int yydebug; union YYSTYPE { -#line 29 "slghparse.y" /* yacc.c:1909 */ + char ch; uintb *i; @@ -225,7 +226,7 @@ union YYSTYPE FamilySymbol *famsym; SpecificSymbol *specsym; -#line 214 "slghparse.hh" /* yacc.c:1909 */ + }; typedef union YYSTYPE YYSTYPE; diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.cc index 1ac87e2cd5..1144098b3b 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.cc @@ -23,8 +23,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -99,65 +99,61 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + #endif /* ! C99 */ #endif /* ! FLEXINT_H */ -#ifdef __cplusplus +/* begin standard C++ headers. */ -/* 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 +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #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. +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +#define YY_SC_TO_UI(c) ((YY_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_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -174,15 +170,16 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; typedef size_t yy_size_t; #endif -extern yy_size_t yyleng; +extern int 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) + #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -197,7 +194,6 @@ extern FILE *yyin, *yyout; YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) - #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE @@ -212,12 +208,12 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int 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 @@ -240,7 +236,7 @@ struct yy_buffer_state 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. */ @@ -268,7 +264,7 @@ 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. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< 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 @@ -279,7 +275,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ #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. */ @@ -287,11 +282,11 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* 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; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; /* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; +static char *yy_c_buf_p = NULL; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ @@ -300,82 +295,79 @@ static int yy_start = 0; /* start state number */ */ 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 ); +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 ); +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 ) -#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 ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); -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 * ); +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_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_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; +typedef flex_uint8_t YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +FILE *yyin = NULL, *yyout = NULL; typedef int yy_state_type; extern int yylineno; - int yylineno = 1; extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif #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[] ); +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 yynoreturn yy_fatal_error ( const 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); \ + yyleng = (int) (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 +#define YY_NUM_RULES 165 +#define YY_END_OF_BUFFER 166 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -383,10 +375,10 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[527] = +static const flex_int16_t yy_accept[533] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 165, 14, 7, 8, 6, 14, + 0, 0, 0, 0, 166, 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, @@ -394,12 +386,12 @@ static yyconst flex_int16_t yy_accept[527] = 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, + 87, 90, 90, 71, 86, 69, 162, 160, 161, 154, - 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, + 155, 162, 154, 154, 156, 157, 157, 154, 154, 154, + 154, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 154, 99, 97, 165, + 165, 164, 163, 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, @@ -407,45 +399,46 @@ static yyconst flex_int16_t yy_accept[527] = 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, + 78, 74, 90, 90, 69, 69, 160, 106, 155, 0, + 101, 156, 0, 0, 157, 104, 107, 105, 108, 103, + 102, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 0, 118, 116, 117, 119, 122, 0, 123, 156, 156, + 145, 156, 156, 156, 156, 156, 156, 156, 156, 110, + 109, 112, 113, 156, 156, 156, 156, 156, 156, 100, + 97, 97, 0, 164, 163, 163, 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, - 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, + 0, 80, 0, 82, 93, 92, 90, 90, 0, 159, + 158, 133, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 121, 124, 120, 125, 156, 156, 156, 156, 156, + 132, 156, 156, 156, 156, 114, 115, 111, 156, 156, + 156, 156, 156, 156, 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, 156, 156, 147, 156, 135, 156, + 156, 156, 156, 156, 156, 146, 156, 156, 156, 156, - 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, + 156, 156, 156, 156, 156, 129, 134, 156, 126, 13, + 13, 9, 51, 51, 51, 51, 51, 51, 46, 51, + 51, 51, 51, 51, 51, 27, 32, 51, 51, 51, + 90, 90, 156, 152, 127, 141, 156, 156, 156, 156, + 136, 156, 153, 156, 156, 156, 156, 137, 156, 156, + 140, 11, 10, 51, 51, 51, 51, 39, 42, 36, + 45, 51, 51, 51, 35, 47, 51, 51, 90, 72, + 128, 156, 156, 151, 156, 156, 156, 156, 156, 148, + 156, 130, 51, 51, 33, 30, 49, 51, 51, 51, + 51, 90, 156, 156, 156, 156, 144, 156, 156, 131, - 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 + 51, 34, 51, 51, 51, 44, 90, 156, 156, 156, + 156, 156, 143, 40, 29, 51, 48, 73, 156, 149, + 156, 138, 142, 51, 150, 156, 51, 139, 51, 51, + 31, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, @@ -477,7 +470,7 @@ static yyconst flex_int32_t yy_ec[256] = 11, 11, 11, 11, 11 } ; -static yyconst flex_int32_t yy_meta[67] = +static const YY_CHAR yy_meta[67] = { 0, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 5, 3, 6, @@ -488,139 +481,139 @@ static yyconst flex_int32_t yy_meta[67] = 5, 5, 3, 3, 3, 3 } ; -static yyconst flex_int16_t yy_base[564] = +static const flex_int16_t yy_base[570] = { 0, - 0, 931, 66, 930, 132, 929, 198, 928, 264, 927, - 330, 926, 0, 394, 955, 962, 396, 962, 0, 942, - 962, 0, 962, 897, 911, 914, 905, 962, 946, 962, - 397, 962, 942, 0, 935, 962, 0, 365, 384, 962, - 898, 900, 893, 902, 892, 900, 895, 365, 897, 899, - 371, 365, 358, 900, 885, 932, 962, 409, 962, 922, - 962, 0, 962, 930, 962, 416, 962, 962, 926, 919, - 0, 962, 875, 926, 962, 419, 962, 901, 0, 402, - 962, 962, 909, 377, 406, 404, 405, 0, 962, 962, - 962, 878, 875, 962, 962, 921, 962, 432, 962, 896, + 0, 937, 66, 936, 132, 935, 198, 934, 264, 933, + 330, 932, 0, 394, 961, 968, 396, 968, 0, 948, + 968, 0, 968, 903, 917, 920, 911, 968, 952, 968, + 397, 968, 948, 0, 941, 968, 0, 365, 384, 968, + 904, 906, 899, 908, 898, 906, 901, 365, 903, 905, + 371, 365, 358, 906, 891, 938, 968, 409, 968, 928, + 968, 0, 968, 936, 968, 416, 968, 968, 932, 925, + 0, 968, 881, 932, 968, 419, 968, 907, 0, 402, + 968, 968, 915, 377, 406, 404, 405, 0, 968, 968, + 968, 884, 881, 968, 968, 927, 968, 432, 968, 902, - 0, 910, 962, 911, 0, 384, 420, 419, 893, 420, - 884, 880, 398, 413, 876, 856, 454, 864, 410, 863, - 420, 862, 415, 465, 858, 870, 846, 962, 906, 962, - 905, 962, 904, 468, 0, 0, 0, 850, 863, 865, - 847, 899, 962, 473, 895, 894, 0, 0, 0, 443, - 0, 465, 854, 395, 848, 437, 857, 836, 839, 845, - 851, 850, 840, 841, 846, 435, 851, 840, 834, 435, - 831, 881, 962, 488, 0, 0, 880, 962, 492, 876, - 875, 0, 0, 0, 877, 962, 496, 962, 0, 0, - 829, 824, 826, 858, 0, 487, 0, 489, 962, 962, + 0, 916, 968, 917, 0, 384, 420, 419, 899, 420, + 890, 886, 398, 413, 882, 862, 454, 870, 410, 410, + 429, 869, 423, 466, 865, 877, 853, 968, 913, 968, + 912, 968, 911, 454, 0, 0, 0, 857, 870, 872, + 854, 906, 968, 474, 902, 901, 0, 0, 0, 463, + 0, 466, 861, 395, 855, 451, 864, 843, 846, 852, + 858, 857, 847, 848, 853, 434, 858, 847, 841, 409, + 838, 888, 968, 493, 0, 0, 887, 968, 496, 883, + 882, 0, 0, 0, 884, 968, 497, 968, 0, 0, + 836, 831, 833, 865, 0, 488, 0, 490, 968, 968, - 962, 962, 824, 829, 870, 962, 497, 962, 0, 0, - 962, 0, 493, 0, 499, 962, 962, 962, 962, 962, - 962, 817, 817, 825, 469, 824, 817, 816, 818, 813, - 837, 962, 962, 962, 962, 836, 835, 834, 809, 803, - 0, 802, 818, 806, 796, 802, 797, 795, 962, 962, - 824, 488, 799, 812, 788, 793, 789, 785, 962, 841, - 962, 840, 962, 839, 962, 828, 803, 794, 784, 793, - 823, 504, 0, 792, 0, 780, 777, 0, 795, 786, - 0, 774, 788, 780, 772, 786, 789, 779, 773, 781, - 782, 779, 778, 761, 772, 776, 802, 801, 800, 772, + 968, 968, 831, 836, 877, 968, 512, 968, 0, 0, + 968, 0, 497, 0, 500, 968, 968, 968, 968, 968, + 968, 824, 824, 832, 476, 831, 824, 823, 825, 820, + 844, 968, 968, 968, 968, 843, 842, 841, 816, 810, + 0, 809, 825, 824, 812, 802, 808, 803, 801, 968, + 968, 830, 498, 805, 818, 794, 799, 795, 791, 968, + 847, 968, 846, 968, 845, 968, 834, 809, 800, 790, + 799, 829, 507, 0, 798, 0, 786, 783, 0, 801, + 792, 0, 780, 794, 786, 778, 792, 795, 785, 779, + 787, 788, 785, 784, 767, 778, 782, 808, 807, 806, - 962, 757, 0, 506, 0, 772, 760, 795, 508, 0, - 0, 753, 758, 757, 750, 755, 751, 746, 763, 748, - 962, 962, 962, 962, 493, 747, 775, 759, 0, 744, - 755, 736, 742, 962, 962, 962, 737, 736, 733, 732, - 737, 730, 962, 772, 745, 733, 731, 0, 962, 768, - 730, 742, 737, 720, 739, 727, 719, 722, 731, 730, - 715, 714, 727, 0, 726, 716, 0, 724, 727, 708, - 962, 749, 962, 748, 962, 747, 962, 962, 722, 706, - 962, 744, 705, 715, 0, 693, 0, 705, 697, 690, - 696, 693, 694, 0, 705, 698, 707, 693, 689, 702, + 778, 968, 763, 0, 511, 0, 778, 766, 801, 513, + 0, 0, 759, 764, 763, 756, 761, 757, 752, 769, + 754, 968, 968, 968, 968, 478, 753, 781, 765, 750, + 0, 749, 760, 741, 747, 968, 968, 968, 742, 741, + 738, 737, 742, 735, 968, 777, 750, 738, 736, 0, + 968, 773, 735, 747, 742, 725, 744, 732, 724, 727, + 736, 735, 720, 719, 732, 0, 731, 721, 0, 729, + 732, 713, 968, 754, 968, 753, 968, 752, 968, 968, + 727, 711, 968, 749, 710, 720, 0, 698, 0, 710, + 702, 695, 701, 698, 699, 0, 710, 703, 693, 711, - 687, 686, 0, 0, 700, 0, 694, 696, 0, 687, - 685, 674, 685, 682, 690, 0, 671, 673, 677, 675, - 670, 685, 0, 0, 669, 685, 677, 673, 672, 660, - 0, 0, 0, 680, 662, 660, 693, 0, 666, 0, - 667, 655, 661, 0, 659, 648, 0, 0, 0, 667, - 664, 650, 649, 0, 0, 0, 0, 652, 666, 661, - 0, 0, 653, 638, 644, 0, 0, 641, 649, 0, - 654, 644, 653, 643, 0, 633, 0, 641, 649, 0, - 0, 0, 650, 634, 646, 645, 644, 639, 632, 634, - 644, 641, 623, 0, 568, 0, 569, 540, 503, 0, + 697, 693, 706, 691, 690, 0, 0, 704, 0, 698, + 700, 0, 691, 689, 678, 689, 686, 694, 0, 675, + 677, 681, 679, 674, 689, 0, 0, 673, 689, 681, + 677, 676, 664, 0, 0, 0, 684, 666, 664, 697, + 0, 670, 0, 667, 670, 658, 664, 0, 662, 651, + 0, 0, 0, 670, 667, 653, 652, 0, 0, 0, + 0, 655, 669, 664, 0, 0, 656, 641, 647, 0, + 0, 644, 652, 0, 657, 647, 641, 655, 645, 0, + 635, 0, 643, 651, 0, 0, 0, 652, 636, 648, + 647, 646, 641, 634, 636, 646, 0, 643, 625, 0, - 487, 494, 485, 489, 483, 482, 0, 0, 0, 482, - 0, 0, 496, 0, 498, 0, 0, 482, 0, 477, - 495, 0, 492, 464, 0, 962, 544, 550, 556, 558, - 564, 568, 574, 576, 582, 584, 590, 594, 596, 602, - 608, 610, 616, 622, 624, 630, 636, 642, 644, 646, - 489, 648, 650, 652, 452, 654, 429, 657, 660, 663, - 666, 669, 672 + 624, 0, 638, 642, 622, 0, 620, 627, 618, 622, + 616, 615, 0, 0, 0, 615, 0, 0, 629, 0, + 577, 0, 0, 548, 0, 510, 511, 0, 467, 462, + 0, 968, 534, 540, 546, 548, 554, 558, 564, 566, + 572, 574, 580, 584, 586, 592, 598, 600, 606, 612, + 614, 620, 626, 632, 634, 636, 485, 638, 640, 642, + 473, 644, 429, 647, 650, 653, 656, 659, 662 } ; -static yyconst flex_int16_t yy_def[564] = +static const flex_int16_t yy_def[570] = { 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, + 532, 1, 532, 3, 532, 5, 532, 7, 532, 9, + 532, 11, 533, 534, 532, 532, 532, 532, 535, 532, + 532, 536, 532, 536, 536, 536, 536, 532, 537, 532, + 532, 532, 538, 539, 532, 532, 540, 532, 532, 532, + 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, + 540, 540, 540, 540, 540, 541, 532, 532, 532, 532, + 532, 542, 532, 543, 532, 532, 532, 532, 544, 532, + 545, 532, 545, 546, 532, 532, 532, 532, 547, 532, + 532, 532, 548, 532, 532, 532, 532, 548, 532, 532, + 532, 548, 548, 532, 532, 549, 532, 532, 532, 532, - 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, + 550, 532, 532, 532, 551, 532, 532, 532, 532, 532, + 532, 551, 551, 551, 551, 551, 551, 551, 551, 551, + 551, 551, 551, 551, 551, 551, 532, 532, 552, 532, + 553, 532, 554, 532, 535, 555, 536, 536, 536, 536, + 536, 537, 532, 532, 538, 532, 539, 556, 540, 532, + 557, 532, 540, 540, 540, 540, 540, 540, 540, 540, + 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, + 540, 541, 532, 532, 558, 542, 543, 532, 532, 544, + 532, 559, 545, 545, 546, 532, 532, 532, 547, 560, + 532, 532, 532, 548, 548, 532, 561, 532, 532, 532, - 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, + 532, 532, 548, 548, 549, 532, 532, 532, 550, 562, + 532, 551, 532, 563, 532, 532, 532, 532, 532, 532, + 532, 551, 551, 551, 551, 551, 551, 551, 551, 551, + 532, 532, 532, 532, 532, 532, 532, 532, 551, 551, + 551, 551, 551, 551, 551, 551, 551, 551, 551, 532, + 532, 532, 532, 551, 551, 551, 551, 551, 551, 532, + 552, 532, 553, 532, 554, 532, 564, 536, 536, 536, + 536, 565, 532, 557, 540, 540, 540, 540, 540, 540, + 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, + 540, 540, 540, 540, 540, 540, 540, 566, 567, 568, - 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, + 532, 532, 532, 548, 532, 561, 548, 548, 569, 532, + 563, 551, 551, 551, 551, 551, 551, 551, 551, 551, + 551, 532, 532, 532, 532, 551, 551, 551, 551, 551, + 551, 551, 551, 551, 551, 532, 532, 532, 551, 551, + 551, 551, 551, 551, 532, 564, 536, 536, 536, 536, + 532, 565, 540, 540, 540, 540, 540, 540, 540, 540, + 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, + 540, 540, 532, 566, 532, 567, 532, 568, 532, 532, + 548, 548, 532, 569, 551, 551, 551, 551, 551, 551, + 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, - 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, + 551, 551, 551, 551, 551, 551, 551, 551, 551, 536, + 536, 536, 540, 540, 540, 540, 540, 540, 540, 540, + 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, + 548, 548, 551, 551, 551, 551, 551, 551, 551, 551, + 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, + 551, 536, 536, 540, 540, 540, 540, 540, 540, 540, + 540, 540, 540, 540, 540, 540, 540, 540, 548, 548, + 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, + 551, 551, 540, 540, 540, 540, 540, 540, 540, 540, + 540, 548, 551, 551, 551, 551, 551, 551, 551, 551, - 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 + 540, 540, 540, 540, 540, 540, 548, 551, 551, 551, + 551, 551, 551, 540, 540, 540, 540, 548, 551, 551, + 551, 551, 551, 540, 551, 551, 540, 551, 540, 540, + 540, 0, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532 } ; -static yyconst flex_int16_t yy_nxt[1029] = +static const flex_int16_t yy_nxt[1035] = { 0, 16, 17, 18, 17, 16, 16, 19, 20, 16, 16, 16, 21, 21, 16, 16, 21, 21, 22, 16, 16, @@ -669,75 +662,76 @@ static yyconst flex_int16_t yy_nxt[1029] = 144, 160, 150, 152, 152, 152, 152, 164, 168, 166, 174, 165, 174, 190, 196, 161, 167, 179, 169, 179, 187, 213, 187, 133, 151, 198, 198, 198, 198, 199, - 200, 201, 202, 207, 310, 207, 197, 275, 191, 215, + 200, 201, 202, 207, 311, 207, 197, 276, 191, 215, 215, 215, 215, 214, 216, 217, 219, 220, 223, 225, - 276, 241, 192, 226, 224, 247, 244, 305, 231, 242, - 245, 193, 272, 272, 227, 248, 228, 232, 233, 134, - 234, 134, 235, 249, 144, 278, 144, 289, 279, 236, - 237, 238, 294, 250, 152, 152, 152, 152, 295, 174, - 251, 174, 252, 179, 273, 179, 290, 187, 207, 187, + 277, 241, 192, 226, 224, 134, 295, 134, 231, 242, + 243, 193, 296, 248, 227, 245, 228, 232, 233, 246, + 234, 244, 235, 249, 250, 144, 290, 144, 306, 236, + 237, 238, 273, 273, 251, 152, 152, 152, 152, 279, + 274, 252, 280, 253, 174, 291, 174, 179, 187, 179, - 207, 239, 253, 254, 525, 255, 304, 304, 198, 198, - 198, 198, 309, 309, 335, 336, 314, 256, 215, 215, - 215, 215, 315, 272, 272, 304, 304, 309, 309, 392, - 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, - 514, 513, 512, 393, 130, 130, 130, 130, 130, 130, - 131, 131, 131, 131, 131, 131, 135, 511, 135, 135, + 187, 239, 531, 254, 255, 530, 256, 305, 305, 198, + 198, 198, 198, 207, 394, 207, 310, 310, 257, 215, + 215, 215, 215, 315, 337, 338, 273, 273, 395, 316, + 305, 305, 310, 310, 130, 130, 130, 130, 130, 130, + 131, 131, 131, 131, 131, 131, 135, 529, 135, 135, 135, 135, 137, 137, 142, 142, 142, 142, 142, 142, - 145, 145, 145, 145, 147, 510, 147, 147, 147, 147, + 145, 145, 145, 145, 147, 528, 147, 147, 147, 147, 149, 149, 172, 172, 172, 172, 172, 172, 176, 176, 177, 177, 177, 177, 177, 177, 180, 180, 180, 180, + 183, 183, 185, 185, 185, 185, 185, 185, 189, 527, - 183, 183, 185, 185, 185, 185, 185, 185, 189, 509, 189, 189, 189, 189, 195, 195, 205, 205, 205, 205, - 205, 205, 209, 508, 209, 209, 209, 209, 212, 212, - 260, 260, 260, 260, 260, 260, 262, 262, 262, 262, - 262, 262, 264, 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, 507, 506, - 505, 504, 503, 502, 501, 500, 499, 498, 497, 496, - 495, 494, 493, 492, 491, 490, 489, 488, 487, 486, + 205, 205, 209, 526, 209, 209, 209, 209, 212, 212, + 261, 261, 261, 261, 261, 261, 263, 263, 263, 263, + 263, 263, 265, 265, 265, 265, 265, 265, 267, 267, + 272, 272, 298, 298, 299, 299, 300, 300, 309, 309, + 346, 346, 346, 352, 352, 352, 374, 374, 374, 376, + 376, 376, 378, 378, 378, 384, 384, 384, 525, 524, + 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, + 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, + 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, - 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, + 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, 383, 432, 431, 377, 375, 373, 430, 429, 428, + 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, + 417, 416, 415, 414, 413, 351, 412, 411, 410, 345, + 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, - 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, 206, 307, 306, 303, 302, 301, 300, 186, - 180, 181, 178, 173, 296, 293, 292, 291, 288, 287, - 286, 285, 284, 283, 282, 281, 280, 277, 274, 145, + 399, 398, 397, 396, 393, 392, 391, 390, 389, 388, + 387, 386, 385, 383, 382, 381, 380, 379, 377, 375, + 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, + 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, + 353, 351, 350, 349, 348, 347, 345, 266, 264, 262, + 344, 343, 342, 341, 340, 339, 336, 335, 334, 333, + 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, + 322, 321, 320, 319, 318, 317, 314, 313, 312, 206, + 308, 307, 304, 303, 302, 301, 186, 180, 181, 178, + 173, 297, 294, 293, 292, 289, 288, 287, 286, 285, - 146, 143, 270, 269, 268, 267, 265, 263, 261, 259, - 258, 257, 246, 243, 240, 230, 229, 222, 221, 218, - 211, 210, 208, 206, 204, 203, 194, 188, 186, 184, - 182, 181, 178, 175, 173, 171, 170, 163, 162, 159, - 158, 157, 156, 155, 154, 153, 148, 146, 143, 141, - 140, 139, 138, 136, 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, + 284, 283, 282, 281, 278, 275, 145, 146, 143, 271, + 270, 269, 268, 266, 264, 262, 260, 259, 258, 247, + 240, 230, 229, 222, 221, 218, 211, 210, 208, 206, + 204, 203, 194, 188, 186, 184, 182, 181, 178, 175, + 173, 171, 170, 163, 162, 159, 158, 157, 156, 155, + 154, 153, 148, 146, 143, 141, 140, 139, 138, 136, + 532, 129, 96, 74, 64, 56, 29, 15, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, - 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 + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532 } ; -static yyconst flex_int16_t yy_chk[1029] = +static const flex_int16_t yy_chk[1035] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -786,72 +780,73 @@ static yyconst flex_int16_t yy_chk[1029] = 31, 48, 38, 39, 39, 39, 39, 51, 53, 52, 58, 51, 58, 80, 84, 48, 52, 66, 53, 66, 76, 106, 76, 14, 38, 85, 85, 85, 85, 86, - 86, 87, 87, 98, 557, 98, 84, 154, 80, 107, + 86, 87, 87, 98, 563, 98, 84, 154, 80, 107, 107, 107, 107, 106, 108, 108, 110, 110, 113, 114, - 154, 119, 80, 114, 113, 123, 121, 555, 117, 119, - 121, 80, 150, 150, 114, 123, 114, 117, 117, 134, - 117, 134, 117, 124, 144, 156, 144, 166, 156, 117, - 117, 117, 170, 124, 152, 152, 152, 152, 170, 174, - 124, 174, 124, 179, 551, 179, 166, 187, 207, 187, + 154, 119, 80, 114, 113, 134, 170, 134, 117, 119, + 120, 80, 170, 123, 114, 121, 114, 117, 117, 121, + 117, 120, 117, 123, 124, 144, 166, 144, 561, 117, + 117, 117, 150, 150, 124, 152, 152, 152, 152, 156, + 557, 124, 156, 124, 174, 166, 174, 179, 187, 179, - 207, 117, 124, 124, 524, 124, 196, 196, 198, 198, - 198, 198, 213, 213, 252, 252, 225, 124, 215, 215, - 215, 215, 225, 272, 272, 304, 304, 309, 309, 325, - 523, 521, 520, 518, 515, 513, 510, 506, 505, 504, - 503, 502, 501, 325, 527, 527, 527, 527, 527, 527, - 528, 528, 528, 528, 528, 528, 529, 499, 529, 529, - 529, 529, 530, 530, 531, 531, 531, 531, 531, 531, - 532, 532, 532, 532, 533, 498, 533, 533, 533, 533, - 534, 534, 535, 535, 535, 535, 535, 535, 536, 536, - 537, 537, 537, 537, 537, 537, 538, 538, 538, 538, + 187, 117, 530, 124, 124, 529, 124, 196, 196, 198, + 198, 198, 198, 207, 326, 207, 213, 213, 124, 215, + 215, 215, 215, 225, 253, 253, 273, 273, 326, 225, + 305, 305, 310, 310, 533, 533, 533, 533, 533, 533, + 534, 534, 534, 534, 534, 534, 535, 527, 535, 535, + 535, 535, 536, 536, 537, 537, 537, 537, 537, 537, + 538, 538, 538, 538, 539, 526, 539, 539, 539, 539, + 540, 540, 541, 541, 541, 541, 541, 541, 542, 542, + 543, 543, 543, 543, 543, 543, 544, 544, 544, 544, + 545, 545, 546, 546, 546, 546, 546, 546, 547, 524, - 539, 539, 540, 540, 540, 540, 540, 540, 541, 497, - 541, 541, 541, 541, 542, 542, 543, 543, 543, 543, - 543, 543, 544, 495, 544, 544, 544, 544, 545, 545, - 546, 546, 546, 546, 546, 546, 547, 547, 547, 547, - 547, 547, 548, 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, 493, 492, - 491, 490, 489, 488, 487, 486, 485, 484, 483, 479, - 478, 476, 474, 473, 472, 471, 469, 468, 465, 464, + 547, 547, 547, 547, 548, 548, 549, 549, 549, 549, + 549, 549, 550, 521, 550, 550, 550, 550, 551, 551, + 552, 552, 552, 552, 552, 552, 553, 553, 553, 553, + 553, 553, 554, 554, 554, 554, 554, 554, 555, 555, + 556, 556, 558, 558, 559, 559, 560, 560, 562, 562, + 564, 564, 564, 565, 565, 565, 566, 566, 566, 567, + 567, 567, 568, 568, 568, 569, 569, 569, 519, 516, + 512, 511, 510, 509, 508, 507, 505, 504, 503, 501, + 499, 498, 496, 495, 494, 493, 492, 491, 490, 489, + 488, 484, 483, 481, 479, 478, 477, 476, 475, 473, - 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, + 472, 469, 468, 467, 464, 463, 462, 457, 456, 455, + 454, 450, 449, 447, 446, 445, 444, 442, 440, 439, + 438, 437, 433, 432, 431, 430, 429, 428, 425, 424, + 423, 422, 421, 420, 418, 417, 416, 415, 414, 413, + 411, 410, 408, 405, 404, 403, 402, 401, 400, 399, + 398, 397, 395, 394, 393, 392, 391, 390, 388, 386, + 385, 384, 382, 381, 378, 376, 374, 372, 371, 370, + 368, 367, 365, 364, 363, 362, 361, 360, 359, 358, + 357, 356, 355, 354, 353, 352, 349, 348, 347, 346, + 344, 343, 342, 341, 340, 339, 335, 334, 333, 332, - 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, 205, 204, 203, 194, 193, 192, 191, 185, - 181, 180, 177, 172, 171, 169, 168, 167, 165, 164, - 163, 162, 161, 160, 159, 158, 157, 155, 153, 146, + 330, 329, 328, 327, 321, 320, 319, 318, 317, 316, + 315, 314, 313, 309, 308, 307, 303, 301, 300, 299, + 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, + 288, 287, 286, 285, 284, 283, 281, 280, 278, 277, + 275, 272, 271, 270, 269, 268, 267, 265, 263, 261, + 259, 258, 257, 256, 255, 254, 252, 249, 248, 247, + 246, 245, 244, 243, 242, 240, 239, 238, 237, 236, + 231, 230, 229, 228, 227, 226, 224, 223, 222, 205, + 204, 203, 194, 193, 192, 191, 185, 181, 180, 177, + 172, 171, 169, 168, 167, 165, 164, 163, 162, 161, - 145, 142, 141, 140, 139, 138, 133, 131, 129, 127, - 126, 125, 122, 120, 118, 116, 115, 112, 111, 109, - 104, 102, 100, 96, 93, 92, 83, 78, 74, 73, - 70, 69, 64, 60, 56, 55, 54, 50, 49, 47, - 46, 45, 44, 43, 42, 41, 35, 33, 29, 27, - 26, 25, 24, 20, 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, + 160, 159, 158, 157, 155, 153, 146, 145, 142, 141, + 140, 139, 138, 133, 131, 129, 127, 126, 125, 122, + 118, 116, 115, 112, 111, 109, 104, 102, 100, 96, + 93, 92, 83, 78, 74, 73, 70, 69, 64, 60, + 56, 55, 54, 50, 49, 47, 46, 45, 44, 43, + 42, 41, 35, 33, 29, 27, 26, 25, 24, 20, + 15, 12, 10, 8, 6, 4, 2, 532, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, - 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 + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 532, 532 } ; static yy_state_type yy_last_accepting_state; @@ -868,7 +863,6 @@ int yy_flex_debug = 0; #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "slghscan.l" /* ### * IP: GHIDRA * NOTE: flex skeletons are NOT bound by flex's BSD license @@ -885,7 +879,6 @@ char *yytext; * See the License for the specific language governing permissions and * limitations under the License. */ -#line 18 "slghscan.l" #include "slgh_compile.hh" #include "slghparse.hh" #define yywrap() 1 @@ -1125,7 +1118,7 @@ int4 preprocess(int4 cur_state,int4 blank_state) 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) ); + yy_switch_to_buffer( yy_create_buffer(yyin, YY_BUF_SIZE) ); check_to_endofline(s); } } @@ -1248,7 +1241,7 @@ void preproc_macroexpand(void) string value; if (!slgh->getPreprocValue(macro,value)) preproc_error("Unknown preprocessing macro "+macro); - yy_switch_to_buffer(yy_scan_string(value.c_str() ) ); + yy_switch_to_buffer( yy_scan_string( value.c_str() ) ); slgh->parsePreprocMacro(); } @@ -1353,14 +1346,6 @@ int4 scan_number(char *numtext,YYSTYPE *lval,bool signednum) return INTEGER; } - - - - - - -#line 1348 "slghscan.cc" - #define INITIAL 0 #define defblock 1 #define macroblock 2 @@ -1381,36 +1366,36 @@ int4 scan_number(char *numtext,YYSTYPE *lval,bool signednum) #define YY_EXTRA_TYPE void * #endif -static int yy_init_globals (void ); +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 yylex_destroy ( void ); -int yyget_debug (void ); +int yyget_debug ( void ); -void yyset_debug (int debug_flag ); +void yyset_debug ( int debug_flag ); -YY_EXTRA_TYPE yyget_extra (void ); +YY_EXTRA_TYPE yyget_extra ( void ); -void yyset_extra (YY_EXTRA_TYPE user_defined ); +void yyset_extra ( YY_EXTRA_TYPE user_defined ); -FILE *yyget_in (void ); +FILE *yyget_in ( void ); -void yyset_in (FILE * in_str ); +void yyset_in ( FILE * _in_str ); -FILE *yyget_out (void ); +FILE *yyget_out ( void ); -void yyset_out (FILE * out_str ); +void yyset_out ( FILE * _out_str ); -yy_size_t yyget_leng (void ); + int yyget_leng ( void ); -char *yyget_text (void ); +char *yyget_text ( void ); -int yyget_lineno (void ); +int yyget_lineno ( void ); -void yyset_lineno (int line_number ); +void yyset_lineno ( int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1418,35 +1403,43 @@ void yyset_lineno (int line_number ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap (void ); +extern "C" int yywrap ( void ); #else -extern int yywrap (void ); +extern int yywrap ( void ); #endif #endif - static void yyunput (int c,char *buf_ptr ); +#ifndef YY_NO_UNPUT + static void yyunput ( int c, char *buf_ptr ); + +#endif + #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); +static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT - #ifdef __cplusplus -static int yyinput (void ); +static int yyinput ( void ); #else -static int input (void ); +static int input ( void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1454,7 +1447,7 @@ static int input (void ); /* 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) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1465,7 +1458,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1478,7 +1471,7 @@ static int input (void ); else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -1533,7 +1526,7 @@ extern int yylex (void); /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -1546,15 +1539,10 @@ extern int yylex (void); */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; -#line 493 "slghscan.l" - - -#line 1542 "slghscan.cc" - if ( !(yy_init) ) { (yy_init) = 1; @@ -1575,13 +1563,15 @@ YY_DECL if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - yy_load_buffer_state( ); + yy_load_buffer_state( ); } - while ( 1 ) /* loops until end-of-file is reached */ + { + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); @@ -1598,7 +1588,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + 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; @@ -1607,13 +1597,13 @@ yy_match: 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]; + if ( yy_current_state >= 533 ) + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 962 ); + while ( yy_base[yy_current_state] != 968 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1640,830 +1630,671 @@ do_action: /* This label is used only to access EOF actions. */ case 1: /* rule 1 can match eol */ YY_RULE_SETUP -#line 495 "slghscan.l" { slgh->nextLine(); BEGIN( preprocess(INITIAL,preproc) ); } YY_BREAK case 2: YY_RULE_SETUP -#line 496 "slghscan.l" { preproc_macroexpand(); } YY_BREAK case 3: YY_RULE_SETUP -#line 497 "slghscan.l" { yylval.ch = yytext[0]; return yytext[0]; } YY_BREAK case 4: YY_RULE_SETUP -#line 498 "slghscan.l" { BEGIN(print); slgh->calcContextLayout(); yylval.ch = yytext[0]; return yytext[0]; } YY_BREAK case 5: YY_RULE_SETUP -#line 499 "slghscan.l" { BEGIN(sem); yylval.ch = yytext[0]; return yytext[0]; } YY_BREAK case 6: YY_RULE_SETUP -#line 500 "slghscan.l" YY_BREAK case 7: YY_RULE_SETUP -#line 501 "slghscan.l" YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP -#line 502 "slghscan.l" { slgh->nextLine(); } YY_BREAK case 9: YY_RULE_SETUP -#line 503 "slghscan.l" { BEGIN(macroblock); return MACRO_KEY; } YY_BREAK case 10: YY_RULE_SETUP -#line 504 "slghscan.l" { BEGIN(defblock); return DEFINE_KEY; } YY_BREAK case 11: YY_RULE_SETUP -#line 505 "slghscan.l" { BEGIN(defblock); slgh->calcContextLayout(); return ATTACH_KEY; } YY_BREAK case 12: YY_RULE_SETUP -#line 506 "slghscan.l" { BEGIN(pattern); withsection = 1; slgh->calcContextLayout(); return WITH_KEY; } YY_BREAK case 13: YY_RULE_SETUP -#line 507 "slghscan.l" { return find_symbol(); } YY_BREAK case 14: YY_RULE_SETUP -#line 508 "slghscan.l" { return yytext[0]; } YY_BREAK case 15: /* rule 15 can match eol */ YY_RULE_SETUP -#line 510 "slghscan.l" { slgh->nextLine(); BEGIN( preprocess(macroblock,preproc) ); } YY_BREAK case 16: YY_RULE_SETUP -#line 511 "slghscan.l" { preproc_macroexpand(); } YY_BREAK case 17: YY_RULE_SETUP -#line 512 "slghscan.l" { yylval.ch = yytext[0]; return yytext[0]; } YY_BREAK case 18: YY_RULE_SETUP -#line 513 "slghscan.l" { BEGIN(sem); return yytext[0]; } YY_BREAK case 19: YY_RULE_SETUP -#line 514 "slghscan.l" { yylval.str = new string(yytext); return STRING; } YY_BREAK case 20: YY_RULE_SETUP -#line 515 "slghscan.l" YY_BREAK case 21: /* rule 21 can match eol */ YY_RULE_SETUP -#line 516 "slghscan.l" { slgh->nextLine(); } YY_BREAK case 22: YY_RULE_SETUP -#line 517 "slghscan.l" { return yytext[0]; } YY_BREAK case 23: /* rule 23 can match eol */ YY_RULE_SETUP -#line 519 "slghscan.l" { slgh->nextLine(); BEGIN( preprocess(defblock,preproc) ); } YY_BREAK case 24: YY_RULE_SETUP -#line 520 "slghscan.l" { preproc_macroexpand(); } YY_BREAK case 25: YY_RULE_SETUP -#line 521 "slghscan.l" { yylval.ch = yytext[0]; return yytext[0]; } YY_BREAK case 26: YY_RULE_SETUP -#line 522 "slghscan.l" { BEGIN(INITIAL); yylval.ch = yytext[0]; return yytext[0]; } YY_BREAK case 27: YY_RULE_SETUP -#line 523 "slghscan.l" { return SPACE_KEY; } YY_BREAK case 28: YY_RULE_SETUP -#line 524 "slghscan.l" { return TYPE_KEY; } YY_BREAK case 29: YY_RULE_SETUP -#line 525 "slghscan.l" { return RAM_KEY; } YY_BREAK case 30: YY_RULE_SETUP -#line 526 "slghscan.l" { return DEFAULT_KEY; } YY_BREAK case 31: YY_RULE_SETUP -#line 527 "slghscan.l" { return REGISTER_KEY; } YY_BREAK case 32: YY_RULE_SETUP -#line 528 "slghscan.l" { return TOKEN_KEY; } YY_BREAK case 33: YY_RULE_SETUP -#line 529 "slghscan.l" { return CONTEXT_KEY; } YY_BREAK case 34: YY_RULE_SETUP -#line 530 "slghscan.l" { return BITRANGE_KEY; } YY_BREAK case 35: YY_RULE_SETUP -#line 531 "slghscan.l" { return SIGNED_KEY; } YY_BREAK case 36: YY_RULE_SETUP -#line 532 "slghscan.l" { return NOFLOW_KEY; } YY_BREAK case 37: YY_RULE_SETUP -#line 533 "slghscan.l" { return HEX_KEY; } YY_BREAK case 38: YY_RULE_SETUP -#line 534 "slghscan.l" { return DEC_KEY; } YY_BREAK case 39: YY_RULE_SETUP -#line 535 "slghscan.l" { return ENDIAN_KEY; } YY_BREAK case 40: YY_RULE_SETUP -#line 536 "slghscan.l" { return ALIGN_KEY; } YY_BREAK case 41: YY_RULE_SETUP -#line 537 "slghscan.l" { return BIG_KEY; } YY_BREAK case 42: YY_RULE_SETUP -#line 538 "slghscan.l" { return LITTLE_KEY; } YY_BREAK case 43: YY_RULE_SETUP -#line 539 "slghscan.l" { return SIZE_KEY; } YY_BREAK case 44: YY_RULE_SETUP -#line 540 "slghscan.l" { return WORDSIZE_KEY; } YY_BREAK case 45: YY_RULE_SETUP -#line 541 "slghscan.l" { return OFFSET_KEY; } YY_BREAK case 46: YY_RULE_SETUP -#line 542 "slghscan.l" { return NAMES_KEY; } YY_BREAK case 47: YY_RULE_SETUP -#line 543 "slghscan.l" { return VALUES_KEY; } YY_BREAK case 48: YY_RULE_SETUP -#line 544 "slghscan.l" { return VARIABLES_KEY; } YY_BREAK case 49: YY_RULE_SETUP -#line 545 "slghscan.l" { return PCODEOP_KEY; } YY_BREAK case 50: YY_RULE_SETUP -#line 546 "slghscan.l" YY_BREAK case 51: YY_RULE_SETUP -#line 547 "slghscan.l" { return find_symbol(); } YY_BREAK case 52: YY_RULE_SETUP -#line 548 "slghscan.l" { return scan_number(yytext,&yylval,false); } YY_BREAK case 53: YY_RULE_SETUP -#line 549 "slghscan.l" { return scan_number(yytext,&yylval,false); } YY_BREAK case 54: YY_RULE_SETUP -#line 550 "slghscan.l" { return scan_number(yytext,&yylval,false); } YY_BREAK case 55: YY_RULE_SETUP -#line 551 "slghscan.l" { yylval.str = new string(yytext+1,strlen(yytext)-2); return STRING; } YY_BREAK case 56: YY_RULE_SETUP -#line 552 "slghscan.l" YY_BREAK case 57: /* rule 57 can match eol */ YY_RULE_SETUP -#line 553 "slghscan.l" { slgh->nextLine(); } YY_BREAK case 58: YY_RULE_SETUP -#line 554 "slghscan.l" { return yytext[0]; } YY_BREAK case 59: /* rule 59 can match eol */ YY_RULE_SETUP -#line 557 "slghscan.l" { slgh->nextLine(); BEGIN( preprocess(print,preproc) ); } YY_BREAK case 60: YY_RULE_SETUP -#line 558 "slghscan.l" { preproc_macroexpand(); } YY_BREAK case 61: YY_RULE_SETUP -#line 559 "slghscan.l" { yylval.ch = yytext[0]; return CHAR; } YY_BREAK case 62: YY_RULE_SETUP -#line 560 "slghscan.l" { yylval.ch = '^'; return '^'; } YY_BREAK case 63: YY_RULE_SETUP -#line 561 "slghscan.l" { BEGIN(pattern); actionon=0; return IS_KEY; } YY_BREAK case 64: YY_RULE_SETUP -#line 562 "slghscan.l" { yylval.str = new string(yytext); return SYMBOLSTRING; } YY_BREAK case 65: YY_RULE_SETUP -#line 563 "slghscan.l" { yylval.str = new string(yytext+1,strlen(yytext)-2); return STRING; } YY_BREAK case 66: YY_RULE_SETUP -#line 564 "slghscan.l" { yylval.ch = ' '; return ' '; } YY_BREAK case 67: /* rule 67 can match eol */ YY_RULE_SETUP -#line 565 "slghscan.l" { slgh->nextLine(); return ' '; } YY_BREAK case 68: YY_RULE_SETUP -#line 566 "slghscan.l" { return yytext[0]; } YY_BREAK case 69: /* rule 69 can match eol */ YY_RULE_SETUP -#line 568 "slghscan.l" { slgh->nextLine(); BEGIN( preprocess(pattern,preproc) ); } YY_BREAK case 70: YY_RULE_SETUP -#line 569 "slghscan.l" { preproc_macroexpand(); } YY_BREAK case 71: YY_RULE_SETUP -#line 570 "slghscan.l" { BEGIN((withsection==1) ? INITIAL:sem); withsection=0; yylval.ch = yytext[0]; return yytext[0]; } YY_BREAK case 72: YY_RULE_SETUP -#line 571 "slghscan.l" { BEGIN(INITIAL); return OP_UNIMPL; } YY_BREAK case 73: YY_RULE_SETUP -#line 572 "slghscan.l" { return GLOBALSET_KEY; } YY_BREAK case 74: YY_RULE_SETUP -#line 573 "slghscan.l" { return OP_RIGHT; } YY_BREAK case 75: YY_RULE_SETUP -#line 574 "slghscan.l" { return OP_LEFT; } YY_BREAK case 76: YY_RULE_SETUP -#line 575 "slghscan.l" { return OP_NOTEQUAL; } YY_BREAK case 77: YY_RULE_SETUP -#line 576 "slghscan.l" { return OP_LESSEQUAL; } YY_BREAK case 78: YY_RULE_SETUP -#line 577 "slghscan.l" { return OP_GREATEQUAL; } YY_BREAK case 79: YY_RULE_SETUP -#line 578 "slghscan.l" { return OP_AND; } YY_BREAK case 80: YY_RULE_SETUP -#line 579 "slghscan.l" { return OP_OR; } YY_BREAK case 81: YY_RULE_SETUP -#line 580 "slghscan.l" { return OP_XOR; } YY_BREAK case 82: YY_RULE_SETUP -#line 581 "slghscan.l" { return ELLIPSIS_KEY; } YY_BREAK case 83: YY_RULE_SETUP -#line 582 "slghscan.l" { actionon = 1; yylval.ch = yytext[0]; return yytext[0]; } YY_BREAK case 84: YY_RULE_SETUP -#line 583 "slghscan.l" { actionon = 0; yylval.ch = yytext[0]; return yytext[0]; } YY_BREAK case 85: YY_RULE_SETUP -#line 584 "slghscan.l" { yylval.ch = yytext[0]; return (actionon==0) ? yytext[0] : OP_AND; } YY_BREAK case 86: YY_RULE_SETUP -#line 585 "slghscan.l" { yylval.ch = yytext[0]; return (actionon==0) ? yytext[0] : OP_OR; } YY_BREAK case 87: YY_RULE_SETUP -#line 586 "slghscan.l" { return OP_XOR; } YY_BREAK case 88: YY_RULE_SETUP -#line 587 "slghscan.l" { yylval.ch = yytext[0]; return yytext[0]; } YY_BREAK case 89: YY_RULE_SETUP -#line 588 "slghscan.l" YY_BREAK case 90: YY_RULE_SETUP -#line 589 "slghscan.l" { return find_symbol(); } YY_BREAK case 91: YY_RULE_SETUP -#line 590 "slghscan.l" { return scan_number(yytext,&yylval,true); } YY_BREAK case 92: YY_RULE_SETUP -#line 591 "slghscan.l" { return scan_number(yytext,&yylval,true); } YY_BREAK case 93: YY_RULE_SETUP -#line 592 "slghscan.l" { return scan_number(yytext,&yylval,true); } YY_BREAK case 94: YY_RULE_SETUP -#line 593 "slghscan.l" YY_BREAK case 95: /* rule 95 can match eol */ YY_RULE_SETUP -#line 594 "slghscan.l" { slgh->nextLine(); } YY_BREAK case 96: YY_RULE_SETUP -#line 595 "slghscan.l" { return yytext[0]; } YY_BREAK case 97: /* rule 97 can match eol */ YY_RULE_SETUP -#line 597 "slghscan.l" { slgh->nextLine(); BEGIN( preprocess(sem,preproc) ); } YY_BREAK case 98: YY_RULE_SETUP -#line 598 "slghscan.l" { preproc_macroexpand(); } YY_BREAK case 99: YY_RULE_SETUP -#line 599 "slghscan.l" { BEGIN(INITIAL); yylval.ch = yytext[0]; return yytext[0]; } YY_BREAK case 100: YY_RULE_SETUP -#line 600 "slghscan.l" { return OP_BOOL_OR; } YY_BREAK case 101: YY_RULE_SETUP -#line 601 "slghscan.l" { return OP_BOOL_AND; } YY_BREAK case 102: YY_RULE_SETUP -#line 602 "slghscan.l" { return OP_BOOL_XOR; } YY_BREAK case 103: YY_RULE_SETUP -#line 603 "slghscan.l" { return OP_RIGHT; } YY_BREAK case 104: YY_RULE_SETUP -#line 604 "slghscan.l" { return OP_LEFT; } YY_BREAK case 105: YY_RULE_SETUP -#line 605 "slghscan.l" { return OP_EQUAL; } YY_BREAK case 106: YY_RULE_SETUP -#line 606 "slghscan.l" { return OP_NOTEQUAL; } YY_BREAK case 107: YY_RULE_SETUP -#line 607 "slghscan.l" { return OP_LESSEQUAL; } YY_BREAK case 108: YY_RULE_SETUP -#line 608 "slghscan.l" { return OP_GREATEQUAL; } YY_BREAK case 109: YY_RULE_SETUP -#line 609 "slghscan.l" { return OP_SDIV; } YY_BREAK case 110: YY_RULE_SETUP -#line 610 "slghscan.l" { return OP_SREM; } YY_BREAK case 111: YY_RULE_SETUP -#line 611 "slghscan.l" { return OP_SRIGHT; } YY_BREAK case 112: YY_RULE_SETUP -#line 612 "slghscan.l" { return OP_SLESS; } YY_BREAK case 113: YY_RULE_SETUP -#line 613 "slghscan.l" { return OP_SGREAT; } YY_BREAK case 114: YY_RULE_SETUP -#line 614 "slghscan.l" { return OP_SLESSEQUAL; } YY_BREAK case 115: YY_RULE_SETUP -#line 615 "slghscan.l" { return OP_SGREATEQUAL; } YY_BREAK case 116: YY_RULE_SETUP -#line 616 "slghscan.l" { return OP_FADD; } YY_BREAK case 117: YY_RULE_SETUP -#line 617 "slghscan.l" { return OP_FSUB; } YY_BREAK case 118: YY_RULE_SETUP -#line 618 "slghscan.l" { return OP_FMULT; } YY_BREAK case 119: YY_RULE_SETUP -#line 619 "slghscan.l" { return OP_FDIV; } YY_BREAK case 120: YY_RULE_SETUP -#line 620 "slghscan.l" { return OP_FEQUAL; } YY_BREAK case 121: YY_RULE_SETUP -#line 621 "slghscan.l" { return OP_FNOTEQUAL; } YY_BREAK case 122: YY_RULE_SETUP -#line 622 "slghscan.l" { return OP_FLESS; } YY_BREAK case 123: YY_RULE_SETUP -#line 623 "slghscan.l" { return OP_FGREAT; } YY_BREAK case 124: YY_RULE_SETUP -#line 624 "slghscan.l" { return OP_FLESSEQUAL; } YY_BREAK case 125: YY_RULE_SETUP -#line 625 "slghscan.l" { return OP_FGREATEQUAL; } YY_BREAK case 126: YY_RULE_SETUP -#line 626 "slghscan.l" { return OP_ZEXT; } YY_BREAK case 127: YY_RULE_SETUP -#line 627 "slghscan.l" { return OP_CARRY; } YY_BREAK case 128: YY_RULE_SETUP -#line 628 "slghscan.l" { return OP_BORROW; } YY_BREAK case 129: YY_RULE_SETUP -#line 629 "slghscan.l" { return OP_SEXT; } YY_BREAK case 130: YY_RULE_SETUP -#line 630 "slghscan.l" { return OP_SCARRY; } YY_BREAK case 131: YY_RULE_SETUP -#line 631 "slghscan.l" { return OP_SBORROW; } YY_BREAK case 132: YY_RULE_SETUP -#line 632 "slghscan.l" { return OP_NAN; } YY_BREAK case 133: YY_RULE_SETUP -#line 633 "slghscan.l" { return OP_ABS; } YY_BREAK case 134: YY_RULE_SETUP -#line 634 "slghscan.l" { return OP_SQRT; } YY_BREAK case 135: YY_RULE_SETUP -#line 635 "slghscan.l" { return OP_CEIL; } YY_BREAK case 136: YY_RULE_SETUP -#line 636 "slghscan.l" { return OP_FLOOR; } YY_BREAK case 137: YY_RULE_SETUP -#line 637 "slghscan.l" { return OP_ROUND; } YY_BREAK case 138: YY_RULE_SETUP -#line 638 "slghscan.l" { return OP_INT2FLOAT; } YY_BREAK case 139: YY_RULE_SETUP -#line 639 "slghscan.l" { return OP_FLOAT2FLOAT; } YY_BREAK case 140: YY_RULE_SETUP -#line 640 "slghscan.l" { return OP_TRUNC; } YY_BREAK case 141: YY_RULE_SETUP -#line 641 "slghscan.l" { return OP_CPOOLREF; } YY_BREAK case 142: YY_RULE_SETUP -#line 642 "slghscan.l" { return OP_NEW; } YY_BREAK case 143: YY_RULE_SETUP -#line 643 "slghscan.l" { return OP_POPCOUNT; } YY_BREAK case 144: YY_RULE_SETUP -#line 644 "slghscan.l" -{ return IF_KEY; } +{ return OP_LZCOUNT; } YY_BREAK case 145: YY_RULE_SETUP -#line 645 "slghscan.l" -{ return GOTO_KEY; } +{ return IF_KEY; } YY_BREAK case 146: YY_RULE_SETUP -#line 646 "slghscan.l" -{ return CALL_KEY; } +{ return GOTO_KEY; } YY_BREAK case 147: YY_RULE_SETUP -#line 647 "slghscan.l" -{ return RETURN_KEY; } +{ return CALL_KEY; } YY_BREAK case 148: YY_RULE_SETUP -#line 648 "slghscan.l" -{ return DELAYSLOT_KEY; } +{ return RETURN_KEY; } YY_BREAK case 149: YY_RULE_SETUP -#line 649 "slghscan.l" -{ return CROSSBUILD_KEY; } +{ return DELAYSLOT_KEY; } YY_BREAK case 150: YY_RULE_SETUP -#line 650 "slghscan.l" -{ return EXPORT_KEY; } +{ return CROSSBUILD_KEY; } YY_BREAK case 151: YY_RULE_SETUP -#line 651 "slghscan.l" -{ return BUILD_KEY; } +{ return EXPORT_KEY; } YY_BREAK case 152: YY_RULE_SETUP -#line 652 "slghscan.l" -{ return LOCAL_KEY; } +{ return BUILD_KEY; } YY_BREAK case 153: YY_RULE_SETUP -#line 653 "slghscan.l" -{ yylval.ch = yytext[0]; return yytext[0]; } +{ return LOCAL_KEY; } YY_BREAK case 154: YY_RULE_SETUP -#line 654 "slghscan.l" - +{ yylval.ch = yytext[0]; return yytext[0]; } YY_BREAK case 155: YY_RULE_SETUP -#line 655 "slghscan.l" -{ return find_symbol(); } + YY_BREAK case 156: YY_RULE_SETUP -#line 656 "slghscan.l" -{ return scan_number(yytext,&yylval,false); } +{ return find_symbol(); } YY_BREAK case 157: YY_RULE_SETUP -#line 657 "slghscan.l" { return scan_number(yytext,&yylval,false); } YY_BREAK case 158: YY_RULE_SETUP -#line 658 "slghscan.l" { return scan_number(yytext,&yylval,false); } YY_BREAK case 159: YY_RULE_SETUP -#line 659 "slghscan.l" - +{ return scan_number(yytext,&yylval,false); } YY_BREAK case 160: -/* rule 160 can match eol */ YY_RULE_SETUP -#line 660 "slghscan.l" -{ slgh->nextLine(); } + YY_BREAK case 161: +/* rule 161 can match eol */ YY_RULE_SETUP -#line 661 "slghscan.l" -{ return yytext[0]; } +{ slgh->nextLine(); } YY_BREAK case 162: -/* rule 162 can match eol */ YY_RULE_SETUP -#line 663 "slghscan.l" -{ slgh->nextLine(); BEGIN( preprocess(preproc,preproc) ); } +{ return yytext[0]; } YY_BREAK case 163: /* rule 163 can match eol */ YY_RULE_SETUP -#line 664 "slghscan.l" +{ slgh->nextLine(); BEGIN( preprocess(preproc,preproc) ); } + YY_BREAK +case 164: +/* rule 164 can match eol */ +YY_RULE_SETUP { slgh->nextLine(); } YY_BREAK case YY_STATE_EOF(INITIAL): @@ -2473,11 +2304,10 @@ case YY_STATE_EOF(print): case YY_STATE_EOF(pattern): case YY_STATE_EOF(sem): case YY_STATE_EOF(preproc): -#line 666 "slghscan.l" -{ yy_delete_buffer(YY_CURRENT_BUFFER ); +{ yy_delete_buffer( YY_CURRENT_BUFFER ); if (filebuffers.empty()) yyterminate(); - yy_switch_to_buffer(filebuffers.back().lastbuffer ); + yy_switch_to_buffer( filebuffers.back().lastbuffer ); FILE *curfile = filebuffers.back().file; if (curfile != (FILE *)0) fclose(curfile); @@ -2485,12 +2315,10 @@ case YY_STATE_EOF(preproc): slgh->parseFileFinished(); } YY_BREAK -case 164: +case 165: YY_RULE_SETUP -#line 676 "slghscan.l" ECHO; YY_BREAK -#line 2479 "slghscan.cc" case YY_END_OF_BUFFER: { @@ -2566,7 +2394,7 @@ ECHO; { (yy_did_buffer_switch_on_eof) = 0; - if ( yywrap( ) ) + if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -2619,6 +2447,7 @@ ECHO; "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -2630,9 +2459,9 @@ ECHO; */ 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; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) @@ -2661,7 +2490,7 @@ static int yy_get_next_buffer (void) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -2674,7 +2503,7 @@ static int yy_get_next_buffer (void) else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -2688,7 +2517,7 @@ static int yy_get_next_buffer (void) if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -2697,11 +2526,12 @@ static int yy_get_next_buffer (void) b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -2729,7 +2559,7 @@ static int yy_get_next_buffer (void) if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ); + yyrestart( yyin ); } else @@ -2743,12 +2573,15 @@ static int yy_get_next_buffer (void) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if (((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 ); + int 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, (yy_size_t) new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } (yy_n_chars) += number_to_move; @@ -2764,15 +2597,15 @@ static int yy_get_next_buffer (void) static yy_state_type yy_get_previous_state (void) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + 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); + 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; @@ -2781,10 +2614,10 @@ static int yy_get_next_buffer (void) 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]; + if ( yy_current_state >= 533 ) + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; @@ -2797,10 +2630,10 @@ static int yy_get_next_buffer (void) */ 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); + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -2809,18 +2642,20 @@ static int yy_get_next_buffer (void) 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]; + if ( yy_current_state >= 533 ) + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 526); + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 532); return yy_is_jam ? 0 : yy_current_state; } - static void yyunput (int c, register char * yy_bp ) +#ifndef YY_NO_UNPUT + + static void yyunput (int c, char * yy_bp ) { - register char *yy_cp; + char *yy_cp; yy_cp = (yy_c_buf_p); @@ -2830,10 +2665,10 @@ static int yy_get_next_buffer (void) 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[ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = + char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -2842,7 +2677,7 @@ static int yy_get_next_buffer (void) 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; + (yy_n_chars) = (int) 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" ); @@ -2855,6 +2690,8 @@ static int yy_get_next_buffer (void) (yy_c_buf_p) = yy_cp; } +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) @@ -2879,7 +2716,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -2896,14 +2733,14 @@ static int yy_get_next_buffer (void) */ /* Reset buffer status. */ - yyrestart(yyin ); + yyrestart( yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap( ) ) - return EOF; + if ( yywrap( ) ) + return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -2942,11 +2779,11 @@ static int yy_get_next_buffer (void) if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - yy_init_buffer(YY_CURRENT_BUFFER,input_file ); - yy_load_buffer_state( ); + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); } /** Switch to a different input buffer. @@ -2974,7 +2811,7 @@ static int yy_get_next_buffer (void) } YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); + yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag @@ -3002,7 +2839,7 @@ static void yy_load_buffer_state (void) { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -3011,13 +2848,13 @@ static void yy_load_buffer_state (void) /* 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 ); + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (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 ); + yy_init_buffer( b, file ); return b; } @@ -3036,9 +2873,9 @@ static void yy_load_buffer_state (void) YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ); + yyfree( (void *) b->yy_ch_buf ); - yyfree((void *) b ); + yyfree( (void *) b ); } /* Initializes or reinitializes a buffer. @@ -3050,7 +2887,7 @@ static void yy_load_buffer_state (void) { int oerrno = errno; - yy_flush_buffer(b ); + yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; @@ -3093,7 +2930,7 @@ static void yy_load_buffer_state (void) b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); + yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes @@ -3124,7 +2961,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } @@ -3143,7 +2980,7 @@ void yypop_buffer_state (void) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } @@ -3161,15 +2998,15 @@ static void yyensure_buffer_stack (void) * 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; + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ (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; @@ -3178,7 +3015,7 @@ static void yyensure_buffer_stack (void) 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 */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc @@ -3198,7 +3035,7 @@ static void yyensure_buffer_stack (void) * @param base the character buffer * @param size the size in bytes of the character buffer * - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { @@ -3208,23 +3045,23 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) 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; + return NULL; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + 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_size = (int) (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_input_file = NULL; 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 ); + yy_switch_to_buffer( b ); return b; } @@ -3237,10 +3074,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) * @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 ) +YY_BUFFER_STATE yy_scan_string (const char * yystr ) { - return yy_scan_bytes(yystr,strlen(yystr) ); + return yy_scan_bytes( yystr, (int) strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -3250,7 +3087,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; @@ -3258,8 +3095,8 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yyalloc(n ); + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); @@ -3268,7 +3105,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer(buf,n ); + b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -3284,9 +3121,9 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg ) +static void yynoreturn yy_fatal_error (const char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); + fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -3314,7 +3151,7 @@ static void yy_fatal_error (yyconst char* msg ) */ int yyget_lineno (void) { - + return yylineno; } @@ -3337,7 +3174,7 @@ FILE *yyget_out (void) /** Get the length of the current token. * */ -yy_size_t yyget_leng (void) +int yyget_leng (void) { return yyleng; } @@ -3352,29 +3189,29 @@ char *yyget_text (void) } /** Set the current line number. - * @param line_number + * @param _line_number line number * */ -void yyset_lineno (int line_number ) +void yyset_lineno (int _line_number ) { - yylineno = line_number; + yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * * @see yy_switch_to_buffer */ -void yyset_in (FILE * in_str ) +void yyset_in (FILE * _in_str ) { - yyin = in_str ; + yyin = _in_str ; } -void yyset_out (FILE * out_str ) +void yyset_out (FILE * _out_str ) { - yyout = out_str ; + yyout = _out_str ; } int yyget_debug (void) @@ -3382,9 +3219,9 @@ int yyget_debug (void) return yy_flex_debug; } -void yyset_debug (int bdebug ) +void yyset_debug (int _bdebug ) { - yy_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } static int yy_init_globals (void) @@ -3393,10 +3230,10 @@ static int yy_init_globals (void) * This function is called from yylex_destroy(), so don't allocate here. */ - (yy_buffer_stack) = 0; + (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; + (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; @@ -3405,8 +3242,8 @@ static int yy_init_globals (void) yyin = stdin; yyout = stdout; #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by @@ -3421,7 +3258,7 @@ int yylex_destroy (void) /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ); + yy_delete_buffer( YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } @@ -3442,18 +3279,19 @@ int yylex_destroy (void) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +static void yy_flex_strncpy (char* s1, const char * s2, int n ) { - register int i; + + 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 ) +static int yy_flex_strlen (const char * s ) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -3463,11 +3301,12 @@ static int yy_flex_strlen (yyconst char * s ) void *yyalloc (yy_size_t size ) { - return (void *) malloc( size ); + return 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 @@ -3475,14 +3314,13 @@ void *yyrealloc (void * ptr, yy_size_t size ) * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } void yyfree (void * ptr ) { - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 676 "slghscan.l" diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/unionresolve.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/unionresolve.cc index 940d333225..5f8a22c851 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/unionresolve.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/unionresolve.cc @@ -476,6 +476,7 @@ void ScoreUnionFields::scoreTrialDown(const Trial &trial,bool lastLevel) case CPUI_INT_AND: case CPUI_INT_OR: case CPUI_POPCOUNT: + case CPUI_LZCOUNT: if (meta == TYPE_ARRAY || meta == TYPE_STRUCT || meta == TYPE_UNION || meta == TYPE_CODE || meta == TYPE_FLOAT) score = -5; else if (meta == TYPE_PTR || meta == TYPE_BOOL) @@ -717,6 +718,7 @@ void ScoreUnionFields::scoreTrialUp(const Trial &trial,bool lastLevel) case CPUI_INT_AND: case CPUI_INT_OR: case CPUI_POPCOUNT: + case CPUI_LZCOUNT: if (meta == TYPE_ARRAY || meta == TYPE_STRUCT || meta == TYPE_UNION || meta == TYPE_CODE || meta == TYPE_FLOAT) score = -5; else if (meta == TYPE_PTR || meta == TYPE_BOOL) diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/xml.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/xml.cc index fc4d1bf616..901e373487 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/xml.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/xml.cc @@ -73,7 +73,8 @@ /* Pull parsers. */ #define YYPULL 1 - +/* Substitute the type names. */ +#define YYSTYPE XMLSTYPE /* Substitute the variable and function names. */ #define yyparse xmlparse #define yylex xmllex @@ -85,7 +86,7 @@ #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 "]]>" @@ -179,16 +180,15 @@ struct NameValue { 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 int xmllex(void); ///< Interface to the scanner +extern int xmlerror(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 @@ -208,17 +208,25 @@ extern int yydebug; ///< Debug mode /* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +#ifndef XMLDEBUG +# if defined YYDEBUG #if YYDEBUG +# define XMLDEBUG 1 +# else +# define XMLDEBUG 0 +# endif +# else /* ! defined YYDEBUG */ +# define XMLDEBUG 0 +# endif /* ! defined YYDEBUG */ +#endif /* ! defined XMLDEBUG */ +#if XMLDEBUG extern int xmldebug; #endif /* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype +#ifndef XMLTOKENTYPE +# define XMLTOKENTYPE + enum xmltokentype { CHARDATA = 258, CDATA = 259, @@ -233,27 +241,27 @@ extern int xmldebug; #endif /* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +#if ! defined XMLSTYPE && ! defined XMLSTYPE_IS_DECLARED -union YYSTYPE +union XMLSTYPE { -#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 +typedef union XMLSTYPE XMLSTYPE; +# define XMLSTYPE_IS_TRIVIAL 1 +# define XMLSTYPE_IS_DECLARED 1 #endif -extern YYSTYPE xmllval; +extern XMLSTYPE xmllval; int xmlparse (void); @@ -261,7 +269,7 @@ int xmlparse (void); /* Copy the second part of user declarations. */ -#line 250 "src/decompile/cpp/xml.cc" /* yacc.c:358 */ + #ifdef short # undef short @@ -442,7 +450,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined XMLSTYPE_IS_TRIVIAL && XMLSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -555,7 +563,7 @@ static const yytype_uint8 yytranslate[] = 5, 6, 7, 8, 9, 10, 11 }; -#if YYDEBUG +#if XMLDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { @@ -570,7 +578,7 @@ static const yytype_uint8 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +#if XMLDEBUG || 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[] = @@ -815,7 +823,7 @@ while (0) /* Enable debugging if requested. */ -#if YYDEBUG +#if XMLDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ @@ -936,12 +944,12 @@ do { \ /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; -#else /* !YYDEBUG */ +#else /* !XMLDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ +#endif /* !XMLDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ @@ -1452,259 +1460,259 @@ yyreduce: 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 @@ -1932,7 +1940,7 @@ yyreturn: #endif return yyresult; } -#line 214 "src/decompile/cpp/xml.y" /* yacc.c:1906 */ + XmlScan::XmlScan(istream &t) : s(t) @@ -2217,7 +2225,7 @@ int4 convertCharRef(const string &ref) return val; } -int yylex(void) +int xmllex(void) { int res = global_scan->nexttoken(); @@ -2226,7 +2234,7 @@ int yylex(void) return res; } -int yyerror(const char *str) +int xmlerror(const char *str) { handler->setError(str); diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/xml.y b/Ghidra/Features/Decompiler/src/decompile/cpp/xml.y index 8f5386237b..9a131710f8 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/xml.y +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/xml.y @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +%define api.prefix {xml} %{ #include "xml.hh" // CharData mode look for '<' '&' or "]]>" @@ -106,14 +107,13 @@ struct NameValue { 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 int xmllex(void); ///< Interface to the scanner +extern int xmlerror(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 %} %union { @@ -495,7 +495,7 @@ int4 convertCharRef(const string &ref) return val; } -int yylex(void) +int xmllex(void) { int res = global_scan->nexttoken(); @@ -504,7 +504,7 @@ int yylex(void) return res; } -int yyerror(const char *str) +int xmlerror(const char *str) { handler->setError(str); diff --git a/Ghidra/Features/Decompiler/src/decompile/datatests/lzcount.xml b/Ghidra/Features/Decompiler/src/decompile/datatests/lzcount.xml new file mode 100644 index 0000000000..315ce01fc5 --- /dev/null +++ b/Ghidra/Features/Decompiler/src/decompile/datatests/lzcount.xml @@ -0,0 +1,17 @@ + + + + +686300037c6300345463d97e4e800020 + + + + +return param_1 == 3; +lzcount + diff --git a/Ghidra/Features/Decompiler/src/main/doc/cspec_html.xsl b/Ghidra/Features/Decompiler/src/main/doc/cspec_html.xsl index 978d2a6b08..0d815237ef 100644 --- a/Ghidra/Features/Decompiler/src/main/doc/cspec_html.xsl +++ b/Ghidra/Features/Decompiler/src/main/doc/cspec_html.xsl @@ -25,7 +25,7 @@ - + diff --git a/Ghidra/Features/Decompiler/src/main/doc/decompileplugin_html.xsl b/Ghidra/Features/Decompiler/src/main/doc/decompileplugin_html.xsl index f1744f6669..d73720d3ca 100644 --- a/Ghidra/Features/Decompiler/src/main/doc/decompileplugin_html.xsl +++ b/Ghidra/Features/Decompiler/src/main/doc/decompileplugin_html.xsl @@ -40,11 +40,15 @@ + + + + - + @@ -54,5 +58,5 @@ - + diff --git a/Ghidra/Features/Decompiler/src/main/doc/decompileplugin_pdf.xsl b/Ghidra/Features/Decompiler/src/main/doc/decompileplugin_pdf.xsl index e315726e5c..5dce31a7a4 100644 --- a/Ghidra/Features/Decompiler/src/main/doc/decompileplugin_pdf.xsl +++ b/Ghidra/Features/Decompiler/src/main/doc/decompileplugin_pdf.xsl @@ -35,6 +35,6 @@ - + diff --git a/Ghidra/Features/Decompiler/src/main/doc/main_html.xsl b/Ghidra/Features/Decompiler/src/main/doc/main_html.xsl index 802a9939a6..df74df6d4f 100644 --- a/Ghidra/Features/Decompiler/src/main/doc/main_html.xsl +++ b/Ghidra/Features/Decompiler/src/main/doc/main_html.xsl @@ -23,7 +23,7 @@ set toc,title - + - + diff --git a/Ghidra/Features/Decompiler/src/main/doc/sleigh_html.xsl b/Ghidra/Features/Decompiler/src/main/doc/sleigh_html.xsl index 15f1f655cf..3633ae7ab7 100644 --- a/Ghidra/Features/Decompiler/src/main/doc/sleigh_html.xsl +++ b/Ghidra/Features/Decompiler/src/main/doc/sleigh_html.xsl @@ -8,7 +8,7 @@ - + diff --git a/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerAnnotations.html b/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerAnnotations.html index 1211eb4cb9..6e9dc033b9 100644 --- a/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerAnnotations.html +++ b/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerAnnotations.html @@ -3,14 +3,14 @@ Program Annotations Affecting the Decompiler - + -
+

Program Annotations Affecting the Decompiler

diff --git a/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerConcepts.html b/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerConcepts.html index 3887f5a74f..23afd21179 100644 --- a/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerConcepts.html +++ b/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerConcepts.html @@ -3,14 +3,14 @@ Decompiler Concepts - + -
+

Decompiler Concepts

@@ -182,7 +182,7 @@

-

Table�.�P-code Operations

+

Table . P-code Operations

diff --git a/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerIntro.html b/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerIntro.html index 21c950fdbd..df27356c0c 100644 --- a/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerIntro.html +++ b/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerIntro.html @@ -3,14 +3,14 @@ Decompiler - + -
+

Decompiler

@@ -64,7 +64,7 @@
  • Press the - �icon +  icon in the tool bar, or
  • diff --git a/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerOptions.html b/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerOptions.html index 4a93dfe117..71fce4b187 100644 --- a/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerOptions.html +++ b/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerOptions.html @@ -3,14 +3,14 @@ Decompiler Options - + -
    +

    Decompiler Options

    @@ -40,12 +40,12 @@
  • - �Analysis - lists Analysis Options that affect the Decompiler's transformation process. +  Analysis - lists Analysis Options that affect the Decompiler's transformation process.
  • - �Display - lists Display Options that affect the final presentation of Decompiler output. +  Display - lists Display Options that affect the final presentation of Decompiler output.
  • diff --git a/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerWindow.html b/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerWindow.html index 280d78476b..7697d2d955 100644 --- a/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerWindow.html +++ b/Ghidra/Features/Decompiler/src/main/help/help/topics/DecompilePlugin/DecompilerWindow.html @@ -3,13 +3,13 @@ Decompiler Window - + -
    +

    Decompiler Window

    @@ -18,7 +18,7 @@ function in the Code Browser, then select the - �icon from the tool bar, or the +  icon from the tool bar, or the Decompile option from the Window menu in the tool.

    @@ -91,7 +91,7 @@ Initially pressing - �or selecting +  or selecting Decompile from the Window menu in the tool brings up the main window. The main window always displays the function at the current address within the Code Browser and follows as the user navigates @@ -153,7 +153,7 @@ Pressing the - �icon +  icon in any Decompiler window's toolbar causes a Snapshot window to be created, which shows decompilation of the same function. Unlike the main window however, the Snapshot window @@ -240,7 +240,7 @@

    - �- button +  - button

    Exports the decompiled result of the current function to a file. A file chooser @@ -265,7 +265,7 @@

    - �- button +  - button

    Creates a new Snapshot window. The Snapshot window @@ -282,7 +282,7 @@

    - �- button +  - button

    Triggers a re-decompilation of the current function displayed in the window. @@ -310,7 +310,7 @@

    - �- button +  - button

    Copies the currently selected text in the Decompiler window to the clipboard. diff --git a/Ghidra/Features/FunctionID/build.gradle b/Ghidra/Features/FunctionID/build.gradle index 9df8dbda4c..d8f26e7e2f 100644 --- a/Ghidra/Features/FunctionID/build.gradle +++ b/Ghidra/Features/FunctionID/build.gradle @@ -62,7 +62,7 @@ task unpackFidDatabases { // Relative to the 'workingDir' Exec task property. def installPoint = "../help/help" -task buildFidDocumentationPdf(type: Exec) { +task buildFidHelpPdf(type: Exec) { workingDir 'src/main/doc' @@ -91,7 +91,7 @@ task buildFidDocumentationPdf(type: Exec) { cp $installPoint/topics/FunctionID/images/*.png $buildDir/images echo '** Building FunctionID.fo **' - xsltproc --output $buildDir/fid_withscaling.xml --stringparam profile.condition "withscaling" /usr/share/sgml/docbook/xsl-stylesheets/profiling/profile.xsl fid.xml 2>&1 + xsltproc --output $buildDir/fid_withscaling.xml --stringparam profile.condition "withscaling" commonprofile.xsl fid.xml 2>&1 xsltproc --output $buildDir/FunctionID.fo fid_pdf.xsl $buildDir/fid_withscaling.xml 2>&1 echo '** Building FunctionID.pdf **' @@ -137,10 +137,12 @@ task buildFidDocumentationPdf(type: Exec) { * A build (ex: 'gradle buildLocal') will place the html files in the distribution. * There is an associated, auto-generated clean task. **/ -task buildFidDocumentationHtml(type: Exec) { +task buildFidHelpHtml(type: Exec) { workingDir 'src/main/doc' + def buildDir = "../../../build/html" + // 'which' returns the number of failed arguments // Using the 'which' command first will allow the task to fail if the required // executables are not installed. @@ -158,9 +160,10 @@ task buildFidDocumentationHtml(type: Exec) { rm -f $installPoint/topics/FunctionID/*.html echo '** Building html files **' - xsltproc --output $buildDir/fid_noscaling.xml --stringparam profile.condition "noscaling" /usr/share/sgml/docbook/xsl-stylesheets/profiling/profile.xsl fid.xml 2>&1 + xsltproc --output $buildDir/fid_noscaling.xml --stringparam profile.condition "noscaling" commonprofile.xsl fid.xml 2>&1 xsltproc --stringparam base.dir ${installPoint}/topics/FunctionID/ fid_html.xsl $buildDir/fid_noscaling.xml 2>&1 - sed -i -e '/Frontpage.css/ { p; s/Frontpage.css/languages.css/; }' ${installPoint}/topics/FunctionID/*.html + rm ${installPoint}/topics/FunctionID/index.html + sed -i -e '/DefaultStyle.css/ { p; sQhref=".*"Qhref="../../shared/languages.css"Q; }' ${installPoint}/topics/FunctionID/*.html echo '** Done. **' """ diff --git a/Ghidra/Features/FunctionID/certification.manifest b/Ghidra/Features/FunctionID/certification.manifest index ee188e43c0..5a7bbe3386 100644 --- a/Ghidra/Features/FunctionID/certification.manifest +++ b/Ghidra/Features/FunctionID/certification.manifest @@ -4,6 +4,7 @@ Module.manifest||GHIDRA||||END| data/building_fid.txt||GHIDRA||||END| data/common_symbols_win32.txt||GHIDRA|||Symbols used to generate fiddb files distributed with Ghidra|END| data/common_symbols_win64.txt||GHIDRA|||Symbols used to generate fiddb files distributed with Ghidra|END| +src/main/doc/commonprofile.xsl||GHIDRA||||END| src/main/doc/fid.xml||GHIDRA||||END| src/main/doc/fid_common.xsl||GHIDRA||||END| src/main/doc/fid_html.xsl||GHIDRA||||END| diff --git a/Ghidra/Features/FunctionID/src/main/doc/commonprofile.xsl b/Ghidra/Features/FunctionID/src/main/doc/commonprofile.xsl new file mode 100644 index 0000000000..6e79c8417f --- /dev/null +++ b/Ghidra/Features/FunctionID/src/main/doc/commonprofile.xsl @@ -0,0 +1,6 @@ + + + + + diff --git a/Ghidra/Features/FunctionID/src/main/doc/fid.xml b/Ghidra/Features/FunctionID/src/main/doc/fid.xml index 8c170bbb82..b6dfef9d7f 100644 --- a/Ghidra/Features/FunctionID/src/main/doc/fid.xml +++ b/Ghidra/Features/FunctionID/src/main/doc/fid.xml @@ -41,7 +41,7 @@ from Microsoft Visual Studio for the x86 processor. These have been broken apart separate Function ID databases, based on 32-bit or 64-code and the version of Visual Studio. Within each database, there are a two library variants -- one for debug versions and one for production. - + Hashing Function ID works by calculating a cumulative hash over all the machine instructions @@ -82,7 +82,7 @@ is robust against changes due to linking; the specific has helps distinguish between closely related variants of a function. - + Parents and Children When Function ID examines a function, its parent and child functions are also considered @@ -92,7 +92,7 @@ the full hashes of the functions will be identical, but the system will try to m the two subfunctions, allowing it to distinguish between the two. - + Libraries Within a Function ID database, functions are grouped into libraries, @@ -144,7 +144,7 @@ the analyzer will still report a single match but will leave off the fields it couldn't distinguish. - + Single Matches A Single Match for a function occurs under the following conditions: @@ -283,7 +283,7 @@ increasing its overall score. If there are still more than one potential match, the highest assigned score is used to filter out matches with lower scores. - + Matching Function Names If there are still multiple potential matches once thresholds have been applied to the @@ -416,7 +416,7 @@ to populate the database. - + Dialog Fields @@ -519,7 +519,7 @@ most commonly called within the library. This list can be used to create a

    Preparing Libraries for a Function ID Database - + Location of Programs All functions going into a single Function ID Library must already be imported and analyzed @@ -530,7 +530,7 @@ the root for the library. The process acts recursively, so there can be addition but all programs to be included in the library must be under the one root. - + Analysis All programs must be analyzed enough to have recovered the bodies of all the functions that are to be included @@ -572,7 +572,7 @@ function that is declared as a match by the analyzer but has the incorrect symbo As with any classification algorithm, it is generally not possible to eliminate this kind of error completely, but with Function ID there are some mitigation strategies. - + Causes False positives for the most part only happen with small functions. @@ -611,7 +611,7 @@ There are two related causes with Function ID: In either case, Function ID can apply a symbol that is misleading for the analyst. - + Mitigation via Threshold All mitigation strategies, to some extent, trade-off false positives for @@ -758,7 +758,7 @@ section and check the box next to "FidDebugPlugin". The Function ID Debug Plug-in introduces the following actions to the Tools -> Function ID menu. - + Create Read-only Database Users can convert the read/write (.fidb) database into the a read-only (.fidbf) form. This is @@ -787,7 +787,7 @@ the RETURN key, with the cursor and focus still in the desire - + Search Fields @@ -845,7 +845,7 @@ the RETURN key, with the cursor and focus still in the desire - + Result Window Invoking a search will bring up the Result Window, presenting a row for @@ -901,7 +901,7 @@ other columns: - + Edit Menu The Result Window supports a small number of actions under the @@ -962,7 +962,7 @@ strategy. - + Table Viewer This invokes an extremely low-level view into the underlying tables that back a diff --git a/Ghidra/Features/FunctionID/src/main/doc/fid_html.xsl b/Ghidra/Features/FunctionID/src/main/doc/fid_html.xsl index 4d9072a7de..310cfe231a 100644 --- a/Ghidra/Features/FunctionID/src/main/doc/fid_html.xsl +++ b/Ghidra/Features/FunctionID/src/main/doc/fid_html.xsl @@ -2,7 +2,7 @@ - + @@ -40,9 +40,15 @@ + + + + + + - + diff --git a/Ghidra/Features/FunctionID/src/main/doc/fid_pdf.xsl b/Ghidra/Features/FunctionID/src/main/doc/fid_pdf.xsl index bf23a2b6e5..18195fda57 100644 --- a/Ghidra/Features/FunctionID/src/main/doc/fid_pdf.xsl +++ b/Ghidra/Features/FunctionID/src/main/doc/fid_pdf.xsl @@ -2,7 +2,7 @@ - + diff --git a/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionID.html b/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionID.html index 954c497d34..d03e7cdffa 100644 --- a/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionID.html +++ b/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionID.html @@ -3,24 +3,14 @@ Function ID - - + + + + + - -
    - - - - - - -
    Function ID
    ��Next -
    -
    -
    -
    +

    Function ID

    @@ -57,7 +47,7 @@ Within each database, there are a two library variants -- one for debug versions

    -Hashing

    +Hashing

    Function ID works by calculating a cumulative hash over all the machine instructions that make up the body of a function. For each function, two different 64-bit hashes are computed: a @@ -90,7 +80,7 @@ helps distinguish between closely related variants of a function.

    -Parents and Children

    +Parents and Children

    When Function ID examines a function, its parent and child functions are also considered as a way of disambiguating multiple matches. For example, suppose two functions have identical @@ -101,7 +91,7 @@ the two subfunctions, allowing it to distinguish between the two.

    -Libraries

    +Libraries

    Within a Function ID database, functions are grouped into libraries, which are intended to be recognizable named software components @@ -141,7 +131,7 @@ couldn't distinguish.

    -Single Matches

    +Single Matches

    A Single Match for a function occurs under the following conditions:

    @@ -268,7 +258,7 @@ used to filter out matches with lower scores.

    -Matching Function Names

    +Matching Function Names

    If there are still multiple potential matches once thresholds have been applied to the match scores, the remaining matches will be grouped based on function names. If @@ -284,22 +274,5 @@ parameter information is stripped.

    - - - + diff --git a/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionIDDebug.html b/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionIDDebug.html index 0837cdaba0..b7210dd796 100644 --- a/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionIDDebug.html +++ b/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionIDDebug.html @@ -3,24 +3,13 @@ Function ID Debug Plug-in - - + + + + - - -
    +

    Function ID Debug Plug-in

    @@ -54,7 +43,7 @@ The Function ID Debug Plug-in introduces the following actions to the

    -Create Read-only Database

    +Create Read-only Database

    Users can convert the read/write (.fidb) database into the a read-only (.fidbf) form. This is the more efficient final form used directly by the Function ID analyzer. The .fidbf form is @@ -80,7 +69,7 @@ the RETURN key, with the cursor an

    -Search Fields

    +Search Fields

    @@ -118,7 +107,7 @@ the RETURN key, with the cursor an

    -Result Window

    +Result Window

    Invoking a search will bring up the Result Window, presenting a row for each matching function record. Columns list properties of the function and correspond @@ -162,7 +151,7 @@ other columns:

    -Edit Menu
    +Edit Menu

    The Result Window supports a small number of actions under the Edit menu that allow the user to change the @@ -203,7 +192,7 @@ strategy.

    -Table Viewer

    +Table Viewer

    This invokes an extremely low-level view into the underlying tables that back a Function ID database. It can be invoked on any attached database. A window is brought up @@ -214,22 +203,5 @@ present readable values. The only meaningful table is likely to be the

    - - - + diff --git a/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionIDPlugin.html b/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionIDPlugin.html index c66624390e..60d74bf16e 100644 --- a/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionIDPlugin.html +++ b/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionIDPlugin.html @@ -3,26 +3,14 @@ Function ID Plug-in - - + + + + - - -
    +

    Function ID Plug-in

    @@ -132,7 +120,7 @@ to populate the database.

    -Dialog Fields

    +Dialog Fields

    @@ -204,7 +192,7 @@ most commonly called within the library. This list can be used to create a Preparing Libraries for a Function ID Database

    -Location of Programs

    +Location of Programs

    All functions going into a single Function ID Library must already be imported and analyzed somewhere within a single Ghidra repository (shared or non-shared). Multiple libraries contained within @@ -216,7 +204,7 @@ but all programs to be included in the library must be under the one root.

    -Analysis

    +Analysis

    All programs must be analyzed enough to have recovered the bodies of all the functions that are to be included in the library. Generally, the easiest way to accomplish this is to run Ghidra's default auto-analysis. @@ -260,7 +248,7 @@ of error completely, but with Function ID there are some mitigation strategies.

    -Causes

    +Causes

    False positives for the most part only happen with small functions. There are two related causes with Function ID: @@ -291,7 +279,7 @@ In either case, Function ID can apply a symbol that is misleading for the analys

    -Mitigation via Threshold

    +Mitigation via Threshold

    All mitigation strategies, to some extent, trade-off false positives for false negatives, which are functions that should have @@ -391,23 +379,5 @@ script.

    - - - + diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcode/opbehavior/OpBehaviorLzcount.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcode/opbehavior/OpBehaviorLzcount.java index 72d495df66..0b55c50537 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcode/opbehavior/OpBehaviorLzcount.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcode/opbehavior/OpBehaviorLzcount.java @@ -42,7 +42,21 @@ public class OpBehaviorLzcount extends UnaryOpBehavior { @Override public BigInteger evaluateUnary(int sizeout, int sizein, BigInteger unsignedIn1) { - // TODO Auto-generated method stub - return null; + int bitcount = 0; + sizein = sizein * 8 - 1; + while (sizein >= 0) { + if (unsignedIn1.testBit(sizein)) { + break; + } + bitcount += 1; + sizein -= 1; + } + if (sizeout == 1) { + bitcount &= 0xff; + } + else if (sizeout == 2) { + bitcount &= 0xffff; + } + return BigInteger.valueOf(bitcount); } } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcode/opbehavior/OpBehaviorPopcount.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcode/opbehavior/OpBehaviorPopcount.java index 072b41b6af..db70edd4f8 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcode/opbehavior/OpBehaviorPopcount.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcode/opbehavior/OpBehaviorPopcount.java @@ -39,8 +39,26 @@ public class OpBehaviorPopcount extends UnaryOpBehavior { @Override public BigInteger evaluateUnary(int sizeout, int sizein, BigInteger unsignedIn1) { - // TODO Auto-generated method stub - return null; + int bitcount = 0; + while (sizein >= 8) { + bitcount += evaluateUnary(1, 8, unsignedIn1.longValue()); + sizein -= 8; + if (sizein == 0) { + break; + } + unsignedIn1 = unsignedIn1.shiftRight(64); + } + if (sizein > 0) { + long mask = sizein * 8 - 1; + bitcount += evaluateUnary(1, 8, unsignedIn1.longValue() & mask); + } + if (sizeout == 1) { + bitcount &= 0xff; + } + else if (sizeout == 2) { + bitcount &= 0xffff; + } + return BigInteger.valueOf(bitcount); } } diff --git a/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/pcode/opbehavior/OpBehaviorLzcountTest.java b/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/pcode/opbehavior/OpBehaviorLzcountTest.java new file mode 100644 index 0000000000..c8a696d9ac --- /dev/null +++ b/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/pcode/opbehavior/OpBehaviorLzcountTest.java @@ -0,0 +1,91 @@ +/* ### + * 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. + */ +package ghidra.pcode.opbehavior; + +import java.math.BigInteger; + +import org.junit.Assert; +import org.junit.Test; + +import ghidra.pcode.utils.Utils; + +public class OpBehaviorLzcountTest extends AbstractOpBehaviorTest { + @Test + public void testEvaluateUnaryLong() { + + OpBehaviorLzcount op = new OpBehaviorLzcount(); + + Assert.assertEquals(8, op.evaluateUnary(1, 1, 0L)); + Assert.assertEquals(16, op.evaluateUnary(1, 2, 0L)); + Assert.assertEquals(32, op.evaluateUnary(1, 4, 0L)); + Assert.assertEquals(64, op.evaluateUnary(1, 8, 0L)); + + Assert.assertEquals(0, op.evaluateUnary(1, 1, 0xffL)); + Assert.assertEquals(0, op.evaluateUnary(1, 2, 0xffffL)); + Assert.assertEquals(0, op.evaluateUnary(1, 4, 0xffffffffL)); + Assert.assertEquals(0, op.evaluateUnary(1, 8, 0xffffffffffffffffL)); + + Assert.assertEquals(0, op.evaluateUnary(1, 1, 0x96L)); + Assert.assertEquals(0, op.evaluateUnary(1, 2, 0xdbf4L)); + Assert.assertEquals(1, op.evaluateUnary(1, 4, 0x460f457bL)); + Assert.assertEquals(3, op.evaluateUnary(1, 8, 0x1fae97efca7d5759L)); + + Assert.assertEquals(4, op.evaluateUnary(1, 1, 0xaL)); + Assert.assertEquals(6, op.evaluateUnary(1, 2, 0x2a5L)); + Assert.assertEquals(9, op.evaluateUnary(1, 4, 0x60dfffL)); + Assert.assertEquals(13, op.evaluateUnary(1, 8, 0x635017adefe4eL)); + + Assert.assertEquals(3, op.evaluateUnary(1, 1, 0x17L)); + Assert.assertEquals(8, op.evaluateUnary(1, 2, 0xd1L)); + Assert.assertEquals(22, op.evaluateUnary(1, 4, 0x39eL)); + Assert.assertEquals(27, op.evaluateUnary(1, 8, 0x189c178d6aL)); + + Assert.assertEquals(4, op.evaluateUnary(1, 1, 0xfL)); + Assert.assertEquals(4, op.evaluateUnary(1, 2, 0xff0L)); + Assert.assertEquals(0, op.evaluateUnary(1, 4, 0xffff0000L)); + Assert.assertEquals(24, op.evaluateUnary(1, 8, 0xff00ff00ffL)); + + } + + @Test + public void testEvaluateUnaryBigInteger() { + OpBehaviorLzcount op = new OpBehaviorLzcount(); + + BigInteger NEGATIVE_ONE = Utils.convertToUnsignedValue(BigInteger.valueOf(-1), 16); + BigInteger BIG_POSITIVE = new BigInteger("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", 16); + BigInteger BIG_NEGATIVE = Utils + .convertToUnsignedValue(new BigInteger("80000000000000000000000000000000", 16), 16); + + assertEquals(BigInteger.valueOf(128), op.evaluateUnary(1, 16, BigInteger.ZERO), 16); + assertEquals(BigInteger.ZERO, op.evaluateUnary(1, 16, NEGATIVE_ONE), 16); + assertEquals(BigInteger.ONE, op.evaluateUnary(1, 16, BIG_POSITIVE), 16); + assertEquals(BigInteger.ZERO, op.evaluateUnary(1, 16, BIG_NEGATIVE), 16); + + BigInteger val = BigInteger.valueOf(0x35017adefe4eL); + val = val.shiftLeft(64); + val = val.or(Utils.convertToUnsignedValue(BigInteger.valueOf(0xd46223189c178d6aL), 8)); + assertEquals(BigInteger.valueOf(18), op.evaluateUnary(1, 16, val), 16); + + BigInteger FF = BigInteger.valueOf(0xff); + val = BigInteger.ZERO; + for (int i = 0; i < 20; ++i) { + val = val.shiftLeft(16); + val = val.add(FF); + } + assertEquals(BigInteger.valueOf(8), op.evaluateUnary(1, 40, val), 40); + } + +} diff --git a/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/pcode/opbehavior/OpBehaviorPopcountTest.java b/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/pcode/opbehavior/OpBehaviorPopcountTest.java new file mode 100644 index 0000000000..777001ee2e --- /dev/null +++ b/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/pcode/opbehavior/OpBehaviorPopcountTest.java @@ -0,0 +1,90 @@ +/* ### + * 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. + */ +package ghidra.pcode.opbehavior; + +import java.math.BigInteger; + +import org.junit.Assert; +import org.junit.Test; + +import ghidra.pcode.utils.Utils; + +public class OpBehaviorPopcountTest extends AbstractOpBehaviorTest { + @Test + public void testEvaluateUnaryLong() { + + OpBehaviorPopcount op = new OpBehaviorPopcount(); + + Assert.assertEquals(0, op.evaluateUnary(1, 1, 0L)); + Assert.assertEquals(0, op.evaluateUnary(1, 2, 0L)); + Assert.assertEquals(0, op.evaluateUnary(1, 4, 0L)); + Assert.assertEquals(0, op.evaluateUnary(1, 8, 0L)); + + Assert.assertEquals(8, op.evaluateUnary(1, 1, 0xffL)); + Assert.assertEquals(16, op.evaluateUnary(1, 2, 0xffffL)); + Assert.assertEquals(32, op.evaluateUnary(1, 4, 0xffffffffL)); + Assert.assertEquals(64, op.evaluateUnary(1, 8, 0xffffffffffffffffL)); + + Assert.assertEquals(4, op.evaluateUnary(1, 1, 0x96L)); + Assert.assertEquals(11, op.evaluateUnary(1, 2, 0xdbf4L)); + Assert.assertEquals(16, op.evaluateUnary(1, 4, 0x460f457bL)); + Assert.assertEquals(41, op.evaluateUnary(1, 8, 0x1fae97efca7d5759L)); + + Assert.assertEquals(5, op.evaluateUnary(1, 1, 0x7aL)); + Assert.assertEquals(10, op.evaluateUnary(1, 2, 0xfca5L)); + Assert.assertEquals(20, op.evaluateUnary(1, 4, 0x2660dfffL)); + Assert.assertEquals(38, op.evaluateUnary(1, 8, 0x79f635017adefe4eL)); + + Assert.assertEquals(4, op.evaluateUnary(1, 1, 0x17L)); + Assert.assertEquals(10, op.evaluateUnary(1, 2, 0x77d1L)); + Assert.assertEquals(15, op.evaluateUnary(1, 4, 0x5758039eL)); + Assert.assertEquals(28, op.evaluateUnary(1, 8, 0xd46223189c178d6aL)); + + Assert.assertEquals(7, op.evaluateUnary(1, 1, 0xbfL)); + Assert.assertEquals(12, op.evaluateUnary(1, 2, 0xe3efL)); + Assert.assertEquals(17, op.evaluateUnary(1, 4, 0xb2d7e134L)); + Assert.assertEquals(34, op.evaluateUnary(1, 8, 0x69f7a0fa6eeda6L)); + + } + + @Test + public void testEvaluateUnaryBigInteger() { + OpBehaviorPopcount op = new OpBehaviorPopcount(); + + BigInteger NEGATIVE_ONE = Utils.convertToUnsignedValue(BigInteger.valueOf(-1), 16); + BigInteger BIG_POSITIVE = new BigInteger("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", 16); + BigInteger BIG_NEGATIVE = Utils + .convertToUnsignedValue(new BigInteger("80000000000000000000000000000000", 16), 16); + + assertEquals(BigInteger.ZERO, op.evaluateUnary(1, 16, BigInteger.ZERO), 16); + assertEquals(BigInteger.valueOf(128), op.evaluateUnary(1, 16, NEGATIVE_ONE), 16); + assertEquals(BigInteger.valueOf(127), op.evaluateUnary(1, 16, BIG_POSITIVE), 16); + assertEquals(BigInteger.ONE, op.evaluateUnary(1, 16, BIG_NEGATIVE), 16); + + BigInteger val = BigInteger.valueOf(0x79f635017adefe4eL); + val = val.shiftLeft(64); + val = val.or(Utils.convertToUnsignedValue(BigInteger.valueOf(0xd46223189c178d6aL), 8)); + assertEquals(BigInteger.valueOf(66), op.evaluateUnary(1, 16, val), 16); + + BigInteger FF = BigInteger.valueOf(0xff); + val = BigInteger.ZERO; + for (int i = 0; i < 20; ++i) { + val = val.shiftLeft(16); + val = val.add(FF); + } + assertEquals(BigInteger.valueOf(160), op.evaluateUnary(1, 40, val), 40); + } +} diff --git a/Ghidra/Processors/68000/data/languages/68000.pspec b/Ghidra/Processors/68000/data/languages/68000.pspec index 52e71d47e5..14df2cbd64 100644 --- a/Ghidra/Processors/68000/data/languages/68000.pspec +++ b/Ghidra/Processors/68000/data/languages/68000.pspec @@ -2,6 +2,7 @@ + diff --git a/GhidraDocs/languages/html/additionalpcode.html b/GhidraDocs/languages/html/additionalpcode.html index cf80077a56..f3de3eb25a 100644 --- a/GhidraDocs/languages/html/additionalpcode.html +++ b/GhidraDocs/languages/html/additionalpcode.html @@ -2,7 +2,8 @@ Additional P-CODE Operations - + + diff --git a/GhidraDocs/languages/html/pcodedescription.html b/GhidraDocs/languages/html/pcodedescription.html index 547ed595b2..760646ac02 100644 --- a/GhidraDocs/languages/html/pcodedescription.html +++ b/GhidraDocs/languages/html/pcodedescription.html @@ -2,7 +2,7 @@ P-Code Operation Reference - + diff --git a/GhidraDocs/languages/html/pcoderef.html b/GhidraDocs/languages/html/pcoderef.html index 8ac9d5d818..755bbda0c3 100644 --- a/GhidraDocs/languages/html/pcoderef.html +++ b/GhidraDocs/languages/html/pcoderef.html @@ -2,7 +2,7 @@ P-Code Reference Manual - + diff --git a/GhidraDocs/languages/html/pseudo-ops.html b/GhidraDocs/languages/html/pseudo-ops.html index a95c6d6716..00dc0da687 100644 --- a/GhidraDocs/languages/html/pseudo-ops.html +++ b/GhidraDocs/languages/html/pseudo-ops.html @@ -2,7 +2,7 @@ Pseudo P-CODE Operations - + diff --git a/GhidraDocs/languages/html/reference.html b/GhidraDocs/languages/html/reference.html index 2fde8b5163..d009fef09d 100644 --- a/GhidraDocs/languages/html/reference.html +++ b/GhidraDocs/languages/html/reference.html @@ -2,7 +2,7 @@ Syntax Reference - + diff --git a/GhidraDocs/languages/html/sleigh.html b/GhidraDocs/languages/html/sleigh.html index e0468a4b26..afd7e24e6f 100644 --- a/GhidraDocs/languages/html/sleigh.html +++ b/GhidraDocs/languages/html/sleigh.html @@ -2,7 +2,7 @@ SLEIGH - + diff --git a/GhidraDocs/languages/html/sleigh_constructors.html b/GhidraDocs/languages/html/sleigh_constructors.html index a0b5172687..73add6429d 100644 --- a/GhidraDocs/languages/html/sleigh_constructors.html +++ b/GhidraDocs/languages/html/sleigh_constructors.html @@ -2,7 +2,7 @@ 7. Constructors - + diff --git a/GhidraDocs/languages/html/sleigh_context.html b/GhidraDocs/languages/html/sleigh_context.html index f81ef1e33c..a6da400f94 100644 --- a/GhidraDocs/languages/html/sleigh_context.html +++ b/GhidraDocs/languages/html/sleigh_context.html @@ -2,7 +2,7 @@ 8. Using Context - + diff --git a/GhidraDocs/languages/html/sleigh_definitions.html b/GhidraDocs/languages/html/sleigh_definitions.html index 35518b8016..43a2179522 100644 --- a/GhidraDocs/languages/html/sleigh_definitions.html +++ b/GhidraDocs/languages/html/sleigh_definitions.html @@ -2,7 +2,7 @@ 4. Basic Definitions - + diff --git a/GhidraDocs/languages/html/sleigh_layout.html b/GhidraDocs/languages/html/sleigh_layout.html index 56a4acb225..878e71be69 100644 --- a/GhidraDocs/languages/html/sleigh_layout.html +++ b/GhidraDocs/languages/html/sleigh_layout.html @@ -2,7 +2,7 @@ 2. Basic Specification Layout - + diff --git a/GhidraDocs/languages/html/sleigh_preprocessing.html b/GhidraDocs/languages/html/sleigh_preprocessing.html index 23ecfe588d..7f38480482 100644 --- a/GhidraDocs/languages/html/sleigh_preprocessing.html +++ b/GhidraDocs/languages/html/sleigh_preprocessing.html @@ -2,7 +2,7 @@ 3. Preprocessing - + diff --git a/GhidraDocs/languages/html/sleigh_ref.html b/GhidraDocs/languages/html/sleigh_ref.html index 10210aaa57..d5e608dccd 100644 --- a/GhidraDocs/languages/html/sleigh_ref.html +++ b/GhidraDocs/languages/html/sleigh_ref.html @@ -2,7 +2,7 @@ 9. P-code Tables - + diff --git a/GhidraDocs/languages/html/sleigh_symbols.html b/GhidraDocs/languages/html/sleigh_symbols.html index f1915438ba..df994eb7bd 100644 --- a/GhidraDocs/languages/html/sleigh_symbols.html +++ b/GhidraDocs/languages/html/sleigh_symbols.html @@ -2,7 +2,7 @@ 5. Introduction to Symbols - + diff --git a/GhidraDocs/languages/html/sleigh_tokens.html b/GhidraDocs/languages/html/sleigh_tokens.html index 1ba4902e6e..2239604d1b 100644 --- a/GhidraDocs/languages/html/sleigh_tokens.html +++ b/GhidraDocs/languages/html/sleigh_tokens.html @@ -2,7 +2,7 @@ 6. Tokens and Fields - +