pascalabcnet/AdditionalLanguages/SPython/SPythonParserKrylovMovchan/SPythonParserYacc.cs
Александр Земляк 1f4b44c2c0
Исправление ошибок при перекомпиляции pcu файлов (#3398)
* Move yield string constants to StringConstants class

* Add GeneratedNamesManager class to store all generated names during unit compilation

* Make GeneratedNamesManager class non static

* Add Utils project to installer files

* Add GeneratedNamesManager usage in CapturedVariablesSubstitutionsManager

* Move GeneratedNamesManager initialization in CompilationUnit constructor

* More GeneratedNamesManager usage

* QuestionPointDesugarVisitor fix
2026-03-08 18:30:33 +03:00

1629 lines
94 KiB
C#

// This code was generated by the Gardens Point Parser Generator
// Copyright (c) Wayne Kelly, QUT 2005-2010
// (see accompanying GPPGcopyright.rtf)
// GPPG version 1.3.6
// Machine: DESKTOP-V3E9T2U
// DateTime: 03.03.2026 17:10:12
// UserName: alex
// Input file <SPythonParser.y>
// options: no-lines gplex
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using QUT.Gppg;
using PascalABCCompiler.SyntaxTree;
using PascalABCCompiler.ParserTools;
using PascalABCCompiler.Errors;
using System.Linq;
using System.Collections.Generic;
using System.IO;
using SPythonParser;
namespace SPythonParserYacc
{
public enum Tokens {
error=1,EOF=2,FOR=3,IN=4,WHILE=5,IF=6,
ELSE=7,ELIF=8,DEF=9,RETURN=10,BREAK=11,CONTINUE=12,
IMPORT=13,FROM=14,GLOBAL=15,AS=16,PASS=17,CLASS=18,
LAMBDA=19,EXIT=20,NEW=21,IS=22,INDENT=23,UNINDENT=24,
END_OF_FILE=25,END_OF_LINE=26,DECLTYPE=27,INTNUM=28,REALNUM=29,TRUE=30,
FALSE=31,BIGINT=32,FSTRINGNUM=33,LPAR=34,RPAR=35,LBRACE=36,
RBRACE=37,LBRACKET=38,RBRACKET=39,DOT=40,COMMA=41,COLON=42,
SEMICOLON=43,ARROW=44,STRINGNUM=45,ASSIGN=46,PLUSEQUAL=47,MINUSEQUAL=48,
STAREQUAL=49,DIVEQUAL=50,BINXOREQUAL=51,SHLEQUAL=52,SHREQUAL=53,BINANDEQUAL=54,
BINOREQUAL=55,INTDIVISIONEQUAL=56,PLUS=57,MINUS=58,STAR=59,DIVIDE=60,
SLASHSLASH=61,PERCENTAGE=62,ID=63,LESS=64,GREATER=65,LESSEQUAL=66,
GREATEREQUAL=67,EQUAL=68,NOTEQUAL=69,AND=70,OR=71,NOT=72,
STARSTAR=73,BINNOT=74,BINXOR=75,SHL=76,SHR=77,BINAND=78,
BINOR=79,tkParseModeExpression=80,tkParseModeStatement=81,tkParseModeType=82,UMINUS=83,UPLUS=84};
public partial struct ValueType
{
public expression ex;
public ident id;
public Object ob;
public op_type_node op;
public syntax_tree_node stn;
public token_info ti;
public type_definition td;
}
// Abstract base class for GPLEX scanners
public abstract class ScanBase : AbstractScanner<ValueType,LexLocation> {
private LexLocation __yylloc = new LexLocation();
public override LexLocation yylloc { get { return __yylloc; } set { __yylloc = value; } }
protected virtual bool yywrap() { return true; }
}
public partial class SPythonGPPGParser: ShiftReduceParser<ValueType, LexLocation>
{
// Verbatim content from SPythonParser.y
public syntax_tree_node root;
public List<Error> errors;
// public string current_file_name;
// public int max_errors = 10;
public SPythonParserTools parserTools;
public List<compiler_directive> CompilerDirectives;
public bool is_unit_to_be_parsed = false;
public SPythonGPPGParser(AbstractScanner<ValueType, LexLocation> scanner, SPythonParserTools parserTools,
bool isUnitToBeParsed) : base(scanner)
{
this.parserTools = parserTools;
this.is_unit_to_be_parsed = isUnitToBeParsed;
}
// End verbatim content from SPythonParser.y
#pragma warning disable 649
private static Dictionary<int, string> aliasses;
#pragma warning restore 649
private static Rule[] rules = new Rule[183];
private static State[] states = new State[339];
private static string[] nonTerms = new string[] {
"ident", "func_name_ident", "type_decl_identifier", "extended_expr", "expr",
"dotted_ident", "proc_func_call", "const_value", "variable", "optional_condition",
"act_param", "new_expr", "is_expr", "variable_as_type", "act_param_list",
"optional_act_param_list", "proc_func_decl", "return_stmt", "break_stmt",
"continue_stmt", "global_stmt", "pass_stmt", "var_stmt", "assign_stmt",
"if_stmt", "stmt", "proc_func_call_stmt", "while_stmt", "for_stmt", "optional_else",
"optional_elif", "exit_stmt", "expr_list", "stmt_list", "block", "program",
"param_name", "form_param_sect", "form_param_list", "optional_form_param_list",
"ident_as_ident", "ident_as_ident_list", "ident_list", "proc_func_header",
"type_ref", "simple_type_identifier", "template_type", "import_clause",
"template_type_params", "template_param_list", "parts", "stmt_or_expression",
"expr_mapping_list", "optional_semicolon", "end_of_line", "variable_list",
"assign_type", "expr_mapping", "list_constant", "set_constant", "dict_constant",
"generator_object", "generator_object_for_dict", "tuple_expr", "assign_right_part",
"turbo_tuple_expr", "$accept", };
static SPythonGPPGParser() {
states[0] = new State(new int[]{63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,34,200,6,209,5,229,3,234,10,250,11,253,12,255,15,257,17,260,20,262,9,269,13,296,14,304,80,315,82,324,81,331},new int[]{-36,1,-34,3,-26,311,-24,8,-9,9,-1,81,-7,199,-8,183,-59,94,-60,100,-61,111,-23,207,-25,208,-27,227,-28,228,-29,233,-18,249,-19,252,-20,254,-21,256,-22,259,-32,261,-17,266,-44,267,-48,295,-51,313});
states[1] = new State(new int[]{2,2});
states[2] = new State(-1);
states[3] = new State(new int[]{43,312,26,309,25,-182},new int[]{-54,4,-55,6});
states[4] = new State(new int[]{25,5});
states[5] = new State(-2);
states[6] = new State(new int[]{63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,34,200,6,209,5,229,3,234,10,250,11,253,12,255,15,257,17,260,20,262,9,269,13,296,14,304},new int[]{-26,7,-24,8,-9,9,-1,81,-7,199,-8,183,-59,94,-60,100,-61,111,-23,207,-25,208,-27,227,-28,228,-29,233,-18,249,-19,252,-20,254,-21,256,-22,259,-32,261,-17,266,-44,267,-48,295});
states[7] = new State(-18);
states[8] = new State(-19);
states[9] = new State(new int[]{46,10,34,71,40,165,38,167,41,177,42,185,47,189,48,190,49,191,50,192,51,193,52,194,53,195,54,196,55,197,56,198},new int[]{-57,175});
states[10] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-65,11,-5,12,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128,-66,174});
states[11] = new State(-53);
states[12] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,41,172,43,-51,26,-51,25,-51});
states[13] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,14,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[14] = new State(new int[]{7,15,6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59});
states[15] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,16,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[16] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,41,-67,43,-67,26,-67,25,-67,7,-67,3,-67,35,-67,39,-67,37,-67,42,-67});
states[17] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,18,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[18] = new State(new int[]{6,13,57,-68,59,19,60,21,58,-68,64,-68,65,-68,66,-68,67,-68,68,-68,69,-68,70,-68,71,-68,61,41,62,43,76,-68,77,-68,78,-68,79,-68,75,-68,73,55,4,57,72,-68,41,-68,43,-68,26,-68,25,-68,7,-68,3,-68,35,-68,39,-68,37,-68,42,-68});
states[19] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,20,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[20] = new State(new int[]{6,13,57,-69,59,-69,60,-69,58,-69,64,-69,65,-69,66,-69,67,-69,68,-69,69,-69,70,-69,71,-69,61,-69,62,-69,76,-69,77,-69,78,-69,79,-69,75,-69,73,55,4,57,72,-69,41,-69,43,-69,26,-69,25,-69,7,-69,3,-69,35,-69,39,-69,37,-69,42,-69});
states[21] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,22,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[22] = new State(new int[]{6,13,57,-70,59,-70,60,-70,58,-70,64,-70,65,-70,66,-70,67,-70,68,-70,69,-70,70,-70,71,-70,61,-70,62,-70,76,-70,77,-70,78,-70,79,-70,75,-70,73,55,4,57,72,-70,41,-70,43,-70,26,-70,25,-70,7,-70,3,-70,35,-70,39,-70,37,-70,42,-70});
states[23] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,24,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[24] = new State(new int[]{6,13,57,-71,59,19,60,21,58,-71,64,-71,65,-71,66,-71,67,-71,68,-71,69,-71,70,-71,71,-71,61,41,62,43,76,-71,77,-71,78,-71,79,-71,75,-71,73,55,4,57,72,-71,41,-71,43,-71,26,-71,25,-71,7,-71,3,-71,35,-71,39,-71,37,-71,42,-71});
states[25] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,26,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[26] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-72,65,-72,66,-72,67,-72,68,-72,69,-72,70,-72,71,-72,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,-72,41,-72,43,-72,26,-72,25,-72,7,-72,3,-72,35,-72,39,-72,37,-72,42,-72});
states[27] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,28,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[28] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-73,65,-73,66,-73,67,-73,68,-73,69,-73,70,-73,71,-73,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,-73,41,-73,43,-73,26,-73,25,-73,7,-73,3,-73,35,-73,39,-73,37,-73,42,-73});
states[29] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,30,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[30] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-74,65,-74,66,-74,67,-74,68,-74,69,-74,70,-74,71,-74,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,-74,41,-74,43,-74,26,-74,25,-74,7,-74,3,-74,35,-74,39,-74,37,-74,42,-74});
states[31] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,32,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[32] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-75,65,-75,66,-75,67,-75,68,-75,69,-75,70,-75,71,-75,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,-75,41,-75,43,-75,26,-75,25,-75,7,-75,3,-75,35,-75,39,-75,37,-75,42,-75});
states[33] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,34,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[34] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-76,65,-76,66,-76,67,-76,68,-76,69,-76,70,-76,71,-76,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,-76,41,-76,43,-76,26,-76,25,-76,7,-76,3,-76,35,-76,39,-76,37,-76,42,-76});
states[35] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,36,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[36] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-77,65,-77,66,-77,67,-77,68,-77,69,-77,70,-77,71,-77,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,-77,41,-77,43,-77,26,-77,25,-77,7,-77,3,-77,35,-77,39,-77,37,-77,42,-77});
states[37] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,38,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[38] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,-78,71,-78,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,41,-78,43,-78,26,-78,25,-78,7,-78,3,-78,35,-78,39,-78,37,-78,42,-78});
states[39] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,40,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[40] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,-79,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,41,-79,43,-79,26,-79,25,-79,7,-79,3,-79,35,-79,39,-79,37,-79,42,-79});
states[41] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,42,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[42] = new State(new int[]{6,13,57,-80,59,-80,60,-80,58,-80,64,-80,65,-80,66,-80,67,-80,68,-80,69,-80,70,-80,71,-80,61,-80,62,-80,76,-80,77,-80,78,-80,79,-80,75,-80,73,55,4,57,72,-80,41,-80,43,-80,26,-80,25,-80,7,-80,3,-80,35,-80,39,-80,37,-80,42,-80});
states[43] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,44,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[44] = new State(new int[]{6,13,57,-81,59,-81,60,-81,58,-81,64,-81,65,-81,66,-81,67,-81,68,-81,69,-81,70,-81,71,-81,61,-81,62,-81,76,-81,77,-81,78,-81,79,-81,75,-81,73,55,4,57,72,-81,41,-81,43,-81,26,-81,25,-81,7,-81,3,-81,35,-81,39,-81,37,-81,42,-81});
states[45] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,46,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[46] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-82,65,-82,66,-82,67,-82,68,-82,69,-82,70,-82,71,-82,61,41,62,43,76,-82,77,-82,78,-82,79,-82,75,-82,73,55,4,57,72,-82,41,-82,43,-82,26,-82,25,-82,7,-82,3,-82,35,-82,39,-82,37,-82,42,-82});
states[47] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,48,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[48] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-83,65,-83,66,-83,67,-83,68,-83,69,-83,70,-83,71,-83,61,41,62,43,76,-83,77,-83,78,-83,79,-83,75,-83,73,55,4,57,72,-83,41,-83,43,-83,26,-83,25,-83,7,-83,3,-83,35,-83,39,-83,37,-83,42,-83});
states[49] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,50,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[50] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-84,65,-84,66,-84,67,-84,68,-84,69,-84,70,-84,71,-84,61,41,62,43,76,45,77,47,78,-84,79,-84,75,-84,73,55,4,57,72,-84,41,-84,43,-84,26,-84,25,-84,7,-84,3,-84,35,-84,39,-84,37,-84,42,-84});
states[51] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,52,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[52] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-85,65,-85,66,-85,67,-85,68,-85,69,-85,70,-85,71,-85,61,41,62,43,76,45,77,47,78,49,79,-85,75,53,73,55,4,57,72,-85,41,-85,43,-85,26,-85,25,-85,7,-85,3,-85,35,-85,39,-85,37,-85,42,-85});
states[53] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,54,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[54] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-86,65,-86,66,-86,67,-86,68,-86,69,-86,70,-86,71,-86,61,41,62,43,76,45,77,47,78,49,79,-86,75,-86,73,55,4,57,72,-86,41,-86,43,-86,26,-86,25,-86,7,-86,3,-86,35,-86,39,-86,37,-86,42,-86});
states[55] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,56,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[56] = new State(new int[]{6,13,57,-87,59,-87,60,-87,58,-87,64,-87,65,-87,66,-87,67,-87,68,-87,69,-87,70,-87,71,-87,61,-87,62,-87,76,-87,77,-87,78,-87,79,-87,75,-87,73,55,4,57,72,-87,41,-87,43,-87,26,-87,25,-87,7,-87,3,-87,35,-87,39,-87,37,-87,42,-87});
states[57] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,58,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[58] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,41,-88,43,-88,26,-88,25,-88,7,-88,3,-88,35,-88,39,-88,37,-88,42,-88});
states[59] = new State(new int[]{4,60});
states[60] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,61,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[61] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,41,-89,43,-89,26,-89,25,-89,7,-89,3,-89,35,-89,39,-89,37,-89,42,-89});
states[62] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,63,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[63] = new State(new int[]{6,13,57,-90,59,-90,60,-90,58,-90,64,-90,65,-90,66,-90,67,-90,68,-90,69,-90,70,-90,71,-90,61,-90,62,-90,76,-90,77,-90,78,-90,79,-90,75,-90,73,55,4,57,72,-90,41,-90,43,-90,26,-90,25,-90,7,-90,3,-90,35,-90,39,-90,37,-90,42,-90});
states[64] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,65,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[65] = new State(new int[]{6,13,57,-91,59,-91,60,-91,58,-91,64,-91,65,-91,66,-91,67,-91,68,-91,69,-91,70,-91,71,-91,61,-91,62,-91,76,-91,77,-91,78,-91,79,-91,75,-91,73,55,4,57,72,-91,41,-91,43,-91,26,-91,25,-91,7,-91,3,-91,35,-91,39,-91,37,-91,42,-91});
states[66] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,67,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[67] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,-92,71,-92,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,-92,41,-92,43,-92,26,-92,25,-92,7,-92,3,-92,35,-92,39,-92,37,-92,42,-92});
states[68] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,69,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[69] = new State(new int[]{6,13,57,-93,59,-93,60,-93,58,-93,64,-93,65,-93,66,-93,67,-93,68,-93,69,-93,70,-93,71,-93,61,-93,62,-93,76,-93,77,-93,78,-93,79,-93,75,-93,73,55,4,57,72,-93,41,-93,43,-93,26,-93,25,-93,7,-93,3,-93,35,-93,39,-93,37,-93,42,-93});
states[70] = new State(new int[]{34,71,40,165,38,167,22,170,6,-94,57,-94,59,-94,60,-94,58,-94,64,-94,65,-94,66,-94,67,-94,68,-94,69,-94,70,-94,71,-94,61,-94,62,-94,76,-94,77,-94,78,-94,79,-94,75,-94,73,-94,4,-94,72,-94,41,-94,43,-94,26,-94,25,-94,7,-94,3,-94,35,-94,39,-94,37,-94,42,-94});
states[71] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129,35,-178},new int[]{-16,72,-15,74,-11,118,-5,119,-9,70,-1,78,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128,-62,136});
states[72] = new State(new int[]{35,73});
states[73] = new State(-155);
states[74] = new State(new int[]{41,75,35,-176});
states[75] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-11,76,-5,77,-9,70,-1,78,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[76] = new State(-175);
states[77] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,41,-172,35,-172});
states[78] = new State(new int[]{46,79,34,-129,40,-129,38,-129,22,-129,6,-129,57,-129,59,-129,60,-129,58,-129,64,-129,65,-129,66,-129,67,-129,68,-129,69,-129,70,-129,71,-129,61,-129,62,-129,76,-129,77,-129,78,-129,79,-129,75,-129,73,-129,4,-129,72,-129,3,-129,41,-129,35,-129});
states[79] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,80,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[80] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,41,-173,35,-173});
states[81] = new State(-129);
states[82] = new State(-39);
states[83] = new State(-130);
states[84] = new State(new int[]{40,85,6,-95,57,-95,59,-95,60,-95,58,-95,64,-95,65,-95,66,-95,67,-95,68,-95,69,-95,70,-95,71,-95,61,-95,62,-95,76,-95,77,-95,78,-95,79,-95,75,-95,73,-95,4,-95,72,-95,41,-95,43,-95,26,-95,25,-95,7,-95,3,-95,35,-95,39,-95,37,-95,42,-95});
states[85] = new State(new int[]{63,82},new int[]{-1,86});
states[86] = new State(-132);
states[87] = new State(-104);
states[88] = new State(-105);
states[89] = new State(-106);
states[90] = new State(-107);
states[91] = new State(-108);
states[92] = new State(-109);
states[93] = new State(-110);
states[94] = new State(-133);
states[95] = new State(new int[]{39,161,57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-33,96,-62,162,-5,164,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[96] = new State(new int[]{39,97,41,98});
states[97] = new State(-147);
states[98] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,99,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[99] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,39,-112,41,-112,37,-112,35,-112,43,-112,26,-112,25,-112});
states[100] = new State(-134);
states[101] = new State(new int[]{37,149,57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-33,102,-53,104,-62,150,-63,152,-5,154,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128,-58,155});
states[102] = new State(new int[]{37,103,41,98});
states[103] = new State(-146);
states[104] = new State(new int[]{37,105,41,106});
states[105] = new State(-144);
states[106] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-58,107,-5,108,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[107] = new State(-48);
states[108] = new State(new int[]{42,109,6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59});
states[109] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,110,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[110] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,3,-46,37,-46,41,-46});
states[111] = new State(-135);
states[112] = new State(-96);
states[113] = new State(new int[]{63,82},new int[]{-45,114,-46,137,-1,146,-47,147});
states[114] = new State(new int[]{34,115});
states[115] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129,35,-178},new int[]{-16,116,-15,74,-11,118,-5,119,-9,70,-1,78,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128,-62,136});
states[116] = new State(new int[]{35,117});
states[117] = new State(-103);
states[118] = new State(-174);
states[119] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,3,120,41,-172,35,-172});
states[120] = new State(new int[]{63,82},new int[]{-1,121});
states[121] = new State(new int[]{4,122});
states[122] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,123,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[123] = new State(new int[]{6,125,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,35,-149,39,-149,37,-149},new int[]{-10,124});
states[124] = new State(-142);
states[125] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,126,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[126] = new State(new int[]{7,15,6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,35,-150,39,-150,37,-150});
states[127] = new State(-97);
states[128] = new State(-98);
states[129] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,130,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[130] = new State(new int[]{41,131,35,135,6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59});
states[131] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-33,132,-5,134,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[132] = new State(new int[]{35,133,41,98});
states[133] = new State(-100);
states[134] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,35,-111,41,-111,43,-111,26,-111,25,-111});
states[135] = new State(-99);
states[136] = new State(-177);
states[137] = new State(new int[]{40,138,38,141,34,-158,39,-158,41,-158,6,-158,57,-158,59,-158,60,-158,58,-158,64,-158,65,-158,66,-158,67,-158,68,-158,69,-158,70,-158,71,-158,61,-158,62,-158,76,-158,77,-158,78,-158,79,-158,75,-158,73,-158,4,-158,72,-158,43,-158,26,-158,25,-158,7,-158,3,-158,35,-158,37,-158,42,-158,46,-158},new int[]{-49,140});
states[138] = new State(new int[]{63,82},new int[]{-1,139});
states[139] = new State(-157);
states[140] = new State(-160);
states[141] = new State(new int[]{63,82},new int[]{-50,142,-45,148,-46,137,-1,146,-47,147});
states[142] = new State(new int[]{39,143,41,144});
states[143] = new State(-161);
states[144] = new State(new int[]{63,82},new int[]{-45,145,-46,137,-1,146,-47,147});
states[145] = new State(-163);
states[146] = new State(-156);
states[147] = new State(-159);
states[148] = new State(-162);
states[149] = new State(-145);
states[150] = new State(new int[]{37,151});
states[151] = new State(-138);
states[152] = new State(new int[]{37,153});
states[153] = new State(-139);
states[154] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,42,109,3,120,37,-111,41,-111});
states[155] = new State(new int[]{3,156,37,-47,41,-47});
states[156] = new State(new int[]{63,82},new int[]{-1,157});
states[157] = new State(new int[]{4,158});
states[158] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,159,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[159] = new State(new int[]{6,125,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,37,-149},new int[]{-10,160});
states[160] = new State(-143);
states[161] = new State(-148);
states[162] = new State(new int[]{39,163});
states[163] = new State(-137);
states[164] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,3,120,39,-111,41,-111});
states[165] = new State(new int[]{63,82},new int[]{-1,166});
states[166] = new State(-131);
states[167] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,168,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[168] = new State(new int[]{39,169,6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59});
states[169] = new State(-136);
states[170] = new State(new int[]{63,82},new int[]{-45,171,-46,137,-1,146,-47,147});
states[171] = new State(-102);
states[172] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-33,173,-5,134,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[173] = new State(new int[]{41,98,43,-101,26,-101,25,-101});
states[174] = new State(-52);
states[175] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-65,176,-5,12,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128,-66,174});
states[176] = new State(-54);
states[177] = new State(new int[]{63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101},new int[]{-56,178,-9,184,-1,81,-7,83,-8,183,-59,94,-60,100,-61,111});
states[178] = new State(new int[]{46,179,41,181});
states[179] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-65,180,-5,12,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128,-66,174});
states[180] = new State(-56);
states[181] = new State(new int[]{63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101},new int[]{-9,182,-1,81,-7,83,-8,183,-59,94,-60,100,-61,111});
states[182] = new State(new int[]{34,71,40,165,38,167,46,-141,41,-141,35,-141});
states[183] = new State(new int[]{40,85});
states[184] = new State(new int[]{34,71,40,165,38,167,46,-140,41,-140,35,-140});
states[185] = new State(new int[]{63,82},new int[]{-45,186,-46,137,-1,146,-47,147});
states[186] = new State(new int[]{46,187,43,-49,26,-49,25,-49});
states[187] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,188,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[188] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,43,-50,26,-50,25,-50});
states[189] = new State(-57);
states[190] = new State(-58);
states[191] = new State(-59);
states[192] = new State(-60);
states[193] = new State(-61);
states[194] = new State(-62);
states[195] = new State(-63);
states[196] = new State(-64);
states[197] = new State(-65);
states[198] = new State(-66);
states[199] = new State(new int[]{46,-130,34,-130,40,-130,38,-130,41,-130,42,-130,47,-130,48,-130,49,-130,50,-130,51,-130,52,-130,53,-130,54,-130,55,-130,56,-130,43,-128,26,-128,25,-128});
states[200] = new State(new int[]{63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101},new int[]{-9,201,-1,81,-7,83,-8,183,-59,94,-60,100,-61,111});
states[201] = new State(new int[]{41,202,34,71,40,165,38,167});
states[202] = new State(new int[]{63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101},new int[]{-56,203,-9,184,-1,81,-7,83,-8,183,-59,94,-60,100,-61,111});
states[203] = new State(new int[]{35,204,41,181});
states[204] = new State(new int[]{46,205});
states[205] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-65,206,-5,12,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128,-66,174});
states[206] = new State(-55);
states[207] = new State(-20);
states[208] = new State(-21);
states[209] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,210,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[210] = new State(new int[]{42,211,6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59});
states[211] = new State(new int[]{23,223},new int[]{-35,212});
states[212] = new State(new int[]{8,214,7,220,43,-117,26,-117,25,-117},new int[]{-31,213,-30,219});
states[213] = new State(-113);
states[214] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,215,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[215] = new State(new int[]{42,216,6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59});
states[216] = new State(new int[]{23,223},new int[]{-35,217});
states[217] = new State(new int[]{8,214,7,220,43,-117,26,-117,25,-117},new int[]{-31,218,-30,219});
states[218] = new State(-114);
states[219] = new State(-115);
states[220] = new State(new int[]{42,221});
states[221] = new State(new int[]{23,223},new int[]{-35,222});
states[222] = new State(-116);
states[223] = new State(new int[]{63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,34,200,6,209,5,229,3,234,10,250,11,253,12,255,15,257,17,260,20,262,9,269,13,296,14,304},new int[]{-34,224,-26,311,-24,8,-9,9,-1,81,-7,199,-8,183,-59,94,-60,100,-61,111,-23,207,-25,208,-27,227,-28,228,-29,233,-18,249,-19,252,-20,254,-21,256,-22,259,-32,261,-17,266,-44,267,-48,295});
states[224] = new State(new int[]{26,309,43,310},new int[]{-55,225});
states[225] = new State(new int[]{24,226,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,34,200,6,209,5,229,3,234,10,250,11,253,12,255,15,257,17,260,20,262,9,269,13,296,14,304},new int[]{-26,7,-24,8,-9,9,-1,81,-7,199,-8,183,-59,94,-60,100,-61,111,-23,207,-25,208,-27,227,-28,228,-29,233,-18,249,-19,252,-20,254,-21,256,-22,259,-32,261,-17,266,-44,267,-48,295});
states[226] = new State(-151);
states[227] = new State(-22);
states[228] = new State(-23);
states[229] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,230,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[230] = new State(new int[]{42,231,6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59});
states[231] = new State(new int[]{23,223},new int[]{-35,232});
states[232] = new State(-118);
states[233] = new State(-24);
states[234] = new State(new int[]{63,82},new int[]{-1,235});
states[235] = new State(new int[]{4,236,41,240});
states[236] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,237,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[237] = new State(new int[]{42,238,6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59});
states[238] = new State(new int[]{23,223},new int[]{-35,239});
states[239] = new State(-119);
states[240] = new State(new int[]{63,82},new int[]{-43,241,-1,248});
states[241] = new State(new int[]{4,242,41,246});
states[242] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,243,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[243] = new State(new int[]{42,244,6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59});
states[244] = new State(new int[]{23,223},new int[]{-35,245});
states[245] = new State(-120);
states[246] = new State(new int[]{63,82},new int[]{-1,247});
states[247] = new State(-122);
states[248] = new State(-121);
states[249] = new State(-25);
states[250] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129,43,-125,26,-125,25,-125},new int[]{-65,251,-5,12,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128,-66,174});
states[251] = new State(-124);
states[252] = new State(-26);
states[253] = new State(-126);
states[254] = new State(-27);
states[255] = new State(-127);
states[256] = new State(-28);
states[257] = new State(new int[]{63,82},new int[]{-43,258,-1,248});
states[258] = new State(new int[]{41,246,43,-38,26,-38,25,-38});
states[259] = new State(-29);
states[260] = new State(-36);
states[261] = new State(-30);
states[262] = new State(new int[]{34,263});
states[263] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129,35,-178},new int[]{-16,264,-15,74,-11,118,-5,119,-9,70,-1,78,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128,-62,136});
states[264] = new State(new int[]{35,265});
states[265] = new State(-37);
states[266] = new State(-31);
states[267] = new State(new int[]{23,223},new int[]{-35,268});
states[268] = new State(-152);
states[269] = new State(new int[]{63,82},new int[]{-2,270,-1,294});
states[270] = new State(new int[]{34,271});
states[271] = new State(new int[]{63,82,59,285,73,289,35,-171},new int[]{-40,272,-39,278,-38,293,-37,281,-1,284});
states[272] = new State(new int[]{35,273});
states[273] = new State(new int[]{42,274,44,275});
states[274] = new State(-153);
states[275] = new State(new int[]{63,82},new int[]{-45,276,-46,137,-1,146,-47,147});
states[276] = new State(new int[]{42,277});
states[277] = new State(-154);
states[278] = new State(new int[]{41,279,35,-170});
states[279] = new State(new int[]{63,82,59,285,73,289},new int[]{-38,280,-37,281,-1,284});
states[280] = new State(-169);
states[281] = new State(new int[]{42,282});
states[282] = new State(new int[]{63,82},new int[]{-45,283,-46,137,-1,146,-47,147});
states[283] = new State(-165);
states[284] = new State(-164);
states[285] = new State(new int[]{63,82},new int[]{-37,286,-1,284});
states[286] = new State(new int[]{42,287});
states[287] = new State(new int[]{63,82},new int[]{-45,288,-46,137,-1,146,-47,147});
states[288] = new State(-166);
states[289] = new State(new int[]{63,82},new int[]{-37,290,-1,284});
states[290] = new State(new int[]{42,291});
states[291] = new State(new int[]{63,82},new int[]{-45,292,-46,137,-1,146,-47,147});
states[292] = new State(-167);
states[293] = new State(-168);
states[294] = new State(-123);
states[295] = new State(-32);
states[296] = new State(new int[]{63,82},new int[]{-42,297,-41,303,-1,300});
states[297] = new State(new int[]{41,298,43,-33,26,-33,25,-33});
states[298] = new State(new int[]{63,82},new int[]{-41,299,-1,300});
states[299] = new State(-45);
states[300] = new State(new int[]{16,301,41,-43,43,-43,26,-43,25,-43});
states[301] = new State(new int[]{63,82},new int[]{-1,302});
states[302] = new State(-42);
states[303] = new State(-44);
states[304] = new State(new int[]{63,82},new int[]{-1,305});
states[305] = new State(new int[]{13,306});
states[306] = new State(new int[]{59,308,63,82},new int[]{-42,307,-41,303,-1,300});
states[307] = new State(new int[]{41,298,43,-34,26,-34,25,-34});
states[308] = new State(-35);
states[309] = new State(-179);
states[310] = new State(-180);
states[311] = new State(-17);
states[312] = new State(new int[]{25,-181,63,-180,28,-180,29,-180,30,-180,31,-180,45,-180,33,-180,32,-180,38,-180,36,-180,34,-180,6,-180,5,-180,3,-180,10,-180,11,-180,12,-180,15,-180,17,-180,20,-180,9,-180,13,-180,14,-180});
states[313] = new State(new int[]{25,314});
states[314] = new State(-3);
states[315] = new State(new int[]{27,317,57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,322,34,129},new int[]{-4,316,-5,321,-9,70,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[316] = new State(-4);
states[317] = new State(new int[]{63,82},new int[]{-3,318,-1,319});
states[318] = new State(-5);
states[319] = new State(new int[]{38,141,25,-10},new int[]{-49,320});
states[320] = new State(-11);
states[321] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,25,-8});
states[322] = new State(new int[]{63,82},new int[]{-45,323,-46,137,-1,146,-47,147});
states[323] = new State(new int[]{34,115,25,-9});
states[324] = new State(new int[]{63,82},new int[]{-14,325,-6,326,-1,330});
states[325] = new State(-6);
states[326] = new State(new int[]{40,327,38,141,25,-12},new int[]{-49,329});
states[327] = new State(new int[]{63,82},new int[]{-1,328});
states[328] = new State(-41);
states[329] = new State(-13);
states[330] = new State(-40);
states[331] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,335},new int[]{-52,332,-5,333,-9,334,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128,-24,337,-23,338});
states[332] = new State(-7);
states[333] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,25,65,27,66,29,67,31,68,33,69,35,70,37,71,39,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,25,-14});
states[334] = new State(new int[]{34,71,40,165,38,167,22,170,46,10,41,177,42,185,47,189,48,190,49,191,50,192,51,193,52,194,53,195,54,196,55,197,56,198,6,-94,57,-94,59,-94,60,-94,58,-94,64,-94,65,-94,66,-94,67,-94,68,-94,69,-94,70,-94,71,-94,61,-94,62,-94,76,-94,77,-94,78,-94,79,-94,75,-94,73,-94,4,-94,72,-94,25,-94},new int[]{-57,175});
states[335] = new State(new int[]{57,62,58,64,72,66,74,68,63,82,28,87,29,88,30,89,31,90,45,91,33,92,32,93,38,95,36,101,21,113,34,129},new int[]{-5,130,-9,336,-1,81,-7,83,-8,84,-59,94,-60,100,-61,111,-12,112,-13,127,-64,128});
states[336] = new State(new int[]{41,202,34,71,40,165,38,167,22,170,35,-94,6,-94,57,-94,59,-94,60,-94,58,-94,64,-94,65,-94,66,-94,67,-94,68,-94,69,-94,70,-94,71,-94,61,-94,62,-94,76,-94,77,-94,78,-94,79,-94,75,-94,73,-94,4,-94,72,-94});
states[337] = new State(-15);
states[338] = new State(-16);
rules[1] = new Rule(-67, new int[]{-36,2});
rules[2] = new Rule(-36, new int[]{-34,-54,25});
rules[3] = new Rule(-36, new int[]{-51,25});
rules[4] = new Rule(-51, new int[]{80,-4});
rules[5] = new Rule(-51, new int[]{80,27,-3});
rules[6] = new Rule(-51, new int[]{82,-14});
rules[7] = new Rule(-51, new int[]{81,-52});
rules[8] = new Rule(-4, new int[]{-5});
rules[9] = new Rule(-4, new int[]{21,-45});
rules[10] = new Rule(-3, new int[]{-1});
rules[11] = new Rule(-3, new int[]{-1,-49});
rules[12] = new Rule(-14, new int[]{-6});
rules[13] = new Rule(-14, new int[]{-6,-49});
rules[14] = new Rule(-52, new int[]{-5});
rules[15] = new Rule(-52, new int[]{-24});
rules[16] = new Rule(-52, new int[]{-23});
rules[17] = new Rule(-34, new int[]{-26});
rules[18] = new Rule(-34, new int[]{-34,-55,-26});
rules[19] = new Rule(-26, new int[]{-24});
rules[20] = new Rule(-26, new int[]{-23});
rules[21] = new Rule(-26, new int[]{-25});
rules[22] = new Rule(-26, new int[]{-27});
rules[23] = new Rule(-26, new int[]{-28});
rules[24] = new Rule(-26, new int[]{-29});
rules[25] = new Rule(-26, new int[]{-18});
rules[26] = new Rule(-26, new int[]{-19});
rules[27] = new Rule(-26, new int[]{-20});
rules[28] = new Rule(-26, new int[]{-21});
rules[29] = new Rule(-26, new int[]{-22});
rules[30] = new Rule(-26, new int[]{-32});
rules[31] = new Rule(-26, new int[]{-17});
rules[32] = new Rule(-26, new int[]{-48});
rules[33] = new Rule(-48, new int[]{13,-42});
rules[34] = new Rule(-48, new int[]{14,-1,13,-42});
rules[35] = new Rule(-48, new int[]{14,-1,13,59});
rules[36] = new Rule(-22, new int[]{17});
rules[37] = new Rule(-32, new int[]{20,34,-16,35});
rules[38] = new Rule(-21, new int[]{15,-43});
rules[39] = new Rule(-1, new int[]{63});
rules[40] = new Rule(-6, new int[]{-1});
rules[41] = new Rule(-6, new int[]{-6,40,-1});
rules[42] = new Rule(-41, new int[]{-1,16,-1});
rules[43] = new Rule(-41, new int[]{-1});
rules[44] = new Rule(-42, new int[]{-41});
rules[45] = new Rule(-42, new int[]{-42,41,-41});
rules[46] = new Rule(-58, new int[]{-5,42,-5});
rules[47] = new Rule(-53, new int[]{-58});
rules[48] = new Rule(-53, new int[]{-53,41,-58});
rules[49] = new Rule(-23, new int[]{-9,42,-45});
rules[50] = new Rule(-23, new int[]{-9,42,-45,46,-5});
rules[51] = new Rule(-65, new int[]{-5});
rules[52] = new Rule(-65, new int[]{-66});
rules[53] = new Rule(-24, new int[]{-9,46,-65});
rules[54] = new Rule(-24, new int[]{-9,-57,-65});
rules[55] = new Rule(-24, new int[]{34,-9,41,-56,35,46,-65});
rules[56] = new Rule(-24, new int[]{-9,41,-56,46,-65});
rules[57] = new Rule(-57, new int[]{47});
rules[58] = new Rule(-57, new int[]{48});
rules[59] = new Rule(-57, new int[]{49});
rules[60] = new Rule(-57, new int[]{50});
rules[61] = new Rule(-57, new int[]{51});
rules[62] = new Rule(-57, new int[]{52});
rules[63] = new Rule(-57, new int[]{53});
rules[64] = new Rule(-57, new int[]{54});
rules[65] = new Rule(-57, new int[]{55});
rules[66] = new Rule(-57, new int[]{56});
rules[67] = new Rule(-5, new int[]{-5,6,-5,7,-5});
rules[68] = new Rule(-5, new int[]{-5,57,-5});
rules[69] = new Rule(-5, new int[]{-5,59,-5});
rules[70] = new Rule(-5, new int[]{-5,60,-5});
rules[71] = new Rule(-5, new int[]{-5,58,-5});
rules[72] = new Rule(-5, new int[]{-5,64,-5});
rules[73] = new Rule(-5, new int[]{-5,65,-5});
rules[74] = new Rule(-5, new int[]{-5,66,-5});
rules[75] = new Rule(-5, new int[]{-5,67,-5});
rules[76] = new Rule(-5, new int[]{-5,68,-5});
rules[77] = new Rule(-5, new int[]{-5,69,-5});
rules[78] = new Rule(-5, new int[]{-5,70,-5});
rules[79] = new Rule(-5, new int[]{-5,71,-5});
rules[80] = new Rule(-5, new int[]{-5,61,-5});
rules[81] = new Rule(-5, new int[]{-5,62,-5});
rules[82] = new Rule(-5, new int[]{-5,76,-5});
rules[83] = new Rule(-5, new int[]{-5,77,-5});
rules[84] = new Rule(-5, new int[]{-5,78,-5});
rules[85] = new Rule(-5, new int[]{-5,79,-5});
rules[86] = new Rule(-5, new int[]{-5,75,-5});
rules[87] = new Rule(-5, new int[]{-5,73,-5});
rules[88] = new Rule(-5, new int[]{-5,4,-5});
rules[89] = new Rule(-5, new int[]{-5,72,4,-5});
rules[90] = new Rule(-5, new int[]{57,-5});
rules[91] = new Rule(-5, new int[]{58,-5});
rules[92] = new Rule(-5, new int[]{72,-5});
rules[93] = new Rule(-5, new int[]{74,-5});
rules[94] = new Rule(-5, new int[]{-9});
rules[95] = new Rule(-5, new int[]{-8});
rules[96] = new Rule(-5, new int[]{-12});
rules[97] = new Rule(-5, new int[]{-13});
rules[98] = new Rule(-5, new int[]{-64});
rules[99] = new Rule(-5, new int[]{34,-5,35});
rules[100] = new Rule(-64, new int[]{34,-5,41,-33,35});
rules[101] = new Rule(-66, new int[]{-5,41,-33});
rules[102] = new Rule(-13, new int[]{-9,22,-45});
rules[103] = new Rule(-12, new int[]{21,-45,34,-16,35});
rules[104] = new Rule(-8, new int[]{28});
rules[105] = new Rule(-8, new int[]{29});
rules[106] = new Rule(-8, new int[]{30});
rules[107] = new Rule(-8, new int[]{31});
rules[108] = new Rule(-8, new int[]{45});
rules[109] = new Rule(-8, new int[]{33});
rules[110] = new Rule(-8, new int[]{32});
rules[111] = new Rule(-33, new int[]{-5});
rules[112] = new Rule(-33, new int[]{-33,41,-5});
rules[113] = new Rule(-25, new int[]{6,-5,42,-35,-31});
rules[114] = new Rule(-31, new int[]{8,-5,42,-35,-31});
rules[115] = new Rule(-31, new int[]{-30});
rules[116] = new Rule(-30, new int[]{7,42,-35});
rules[117] = new Rule(-30, new int[]{});
rules[118] = new Rule(-28, new int[]{5,-5,42,-35});
rules[119] = new Rule(-29, new int[]{3,-1,4,-5,42,-35});
rules[120] = new Rule(-29, new int[]{3,-1,41,-43,4,-5,42,-35});
rules[121] = new Rule(-43, new int[]{-1});
rules[122] = new Rule(-43, new int[]{-43,41,-1});
rules[123] = new Rule(-2, new int[]{-1});
rules[124] = new Rule(-18, new int[]{10,-65});
rules[125] = new Rule(-18, new int[]{10});
rules[126] = new Rule(-19, new int[]{11});
rules[127] = new Rule(-20, new int[]{12});
rules[128] = new Rule(-27, new int[]{-7});
rules[129] = new Rule(-9, new int[]{-1});
rules[130] = new Rule(-9, new int[]{-7});
rules[131] = new Rule(-9, new int[]{-9,40,-1});
rules[132] = new Rule(-9, new int[]{-8,40,-1});
rules[133] = new Rule(-9, new int[]{-59});
rules[134] = new Rule(-9, new int[]{-60});
rules[135] = new Rule(-9, new int[]{-61});
rules[136] = new Rule(-9, new int[]{-9,38,-5,39});
rules[137] = new Rule(-9, new int[]{38,-62,39});
rules[138] = new Rule(-9, new int[]{36,-62,37});
rules[139] = new Rule(-9, new int[]{36,-63,37});
rules[140] = new Rule(-56, new int[]{-9});
rules[141] = new Rule(-56, new int[]{-56,41,-9});
rules[142] = new Rule(-62, new int[]{-5,3,-1,4,-5,-10});
rules[143] = new Rule(-63, new int[]{-58,3,-1,4,-5,-10});
rules[144] = new Rule(-61, new int[]{36,-53,37});
rules[145] = new Rule(-61, new int[]{36,37});
rules[146] = new Rule(-60, new int[]{36,-33,37});
rules[147] = new Rule(-59, new int[]{38,-33,39});
rules[148] = new Rule(-59, new int[]{38,39});
rules[149] = new Rule(-10, new int[]{});
rules[150] = new Rule(-10, new int[]{6,-5});
rules[151] = new Rule(-35, new int[]{23,-34,-55,24});
rules[152] = new Rule(-17, new int[]{-44,-35});
rules[153] = new Rule(-44, new int[]{9,-2,34,-40,35,42});
rules[154] = new Rule(-44, new int[]{9,-2,34,-40,35,44,-45,42});
rules[155] = new Rule(-7, new int[]{-9,34,-16,35});
rules[156] = new Rule(-46, new int[]{-1});
rules[157] = new Rule(-46, new int[]{-46,40,-1});
rules[158] = new Rule(-45, new int[]{-46});
rules[159] = new Rule(-45, new int[]{-47});
rules[160] = new Rule(-47, new int[]{-46,-49});
rules[161] = new Rule(-49, new int[]{38,-50,39});
rules[162] = new Rule(-50, new int[]{-45});
rules[163] = new Rule(-50, new int[]{-50,41,-45});
rules[164] = new Rule(-37, new int[]{-1});
rules[165] = new Rule(-38, new int[]{-37,42,-45});
rules[166] = new Rule(-38, new int[]{59,-37,42,-45});
rules[167] = new Rule(-38, new int[]{73,-37,42,-45});
rules[168] = new Rule(-39, new int[]{-38});
rules[169] = new Rule(-39, new int[]{-39,41,-38});
rules[170] = new Rule(-40, new int[]{-39});
rules[171] = new Rule(-40, new int[]{});
rules[172] = new Rule(-11, new int[]{-5});
rules[173] = new Rule(-11, new int[]{-1,46,-5});
rules[174] = new Rule(-15, new int[]{-11});
rules[175] = new Rule(-15, new int[]{-15,41,-11});
rules[176] = new Rule(-16, new int[]{-15});
rules[177] = new Rule(-16, new int[]{-62});
rules[178] = new Rule(-16, new int[]{});
rules[179] = new Rule(-55, new int[]{26});
rules[180] = new Rule(-55, new int[]{43});
rules[181] = new Rule(-54, new int[]{43});
rules[182] = new Rule(-54, new int[]{});
}
protected override void Initialize() {
this.InitSpecialTokens((int)Tokens.error, (int)Tokens.EOF);
this.InitStates(states);
this.InitRules(rules);
this.InitNonTerminals(nonTerms);
}
protected override void DoAction(int action)
{
switch (action)
{
case 2: // program -> stmt_list, optional_semicolon, END_OF_FILE
{
// main program
if (!is_unit_to_be_parsed) {
var stl = ValueStack[ValueStack.Depth-3].stn as statement_list;
stl.left_logical_bracket = new token_info("");
stl.right_logical_bracket = new token_info("");
var bl = new block(new declarations(), stl, CurrentLocationSpan);
root = CurrentSemanticValue.stn = NewProgramModule(null, null, new uses_list(), bl, ValueStack[ValueStack.Depth-2].ob, CurrentLocationSpan);
root.source_context = bl.source_context;
}
// unit
else {
var interface_part = new interface_node(new declarations(), new uses_list(), null, null);
var initialization_part = new initfinal_part(null, ValueStack[ValueStack.Depth-3].stn as statement_list, null, null, null, CurrentLocationSpan);
root = CurrentSemanticValue.stn = new unit_module(
new unit_name(new ident(Path.GetFileNameWithoutExtension(parserTools.currentFileName)),
UnitHeaderKeyword.Unit, CurrentLocationSpan), interface_part, null,
initialization_part.initialization_sect,
initialization_part.finalization_sect, null, CurrentLocationSpan);
}
}
break;
case 3: // program -> parts, END_OF_FILE
{
root = ValueStack[ValueStack.Depth-2].stn;
}
break;
case 4: // parts -> tkParseModeExpression, extended_expr
{ CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; }
break;
case 5: // parts -> tkParseModeExpression, DECLTYPE, type_decl_identifier
{ CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].id; }
break;
case 6: // parts -> tkParseModeType, variable_as_type
{ CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; }
break;
case 7: // parts -> tkParseModeStatement, stmt_or_expression
{ CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; }
break;
case 8: // extended_expr -> expr
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 9: // extended_expr -> NEW, type_ref
{
CurrentSemanticValue.ex = new new_expr(ValueStack[ValueStack.Depth-1].td, null, false, null, CurrentLocationSpan);
}
break;
case 10: // type_decl_identifier -> ident
{
CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id;
}
break;
case 11: // type_decl_identifier -> ident, template_type_params
{
CurrentSemanticValue.id = new template_type_name(ValueStack[ValueStack.Depth-2].id.name, ValueStack[ValueStack.Depth-1].stn as ident_list, CurrentLocationSpan);
}
break;
case 12: // variable_as_type -> dotted_ident
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 13: // variable_as_type -> dotted_ident, template_type_params
{
CurrentSemanticValue.ex = new ident_with_templateparams(ValueStack[ValueStack.Depth-2].ex as addressed_value, ValueStack[ValueStack.Depth-1].stn as template_param_list, CurrentLocationSpan);
}
break;
case 14: // stmt_or_expression -> expr
{ CurrentSemanticValue.stn = new expression_as_statement(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan);}
break;
case 15: // stmt_or_expression -> assign_stmt
{ CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; }
break;
case 16: // stmt_or_expression -> var_stmt
{ CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; }
break;
case 17: // stmt_list -> stmt
{
CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan);
}
break;
case 18: // stmt_list -> stmt_list, end_of_line, stmt
{
CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as statement_list).Add(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan);
}
break;
case 19: // stmt -> assign_stmt
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 20: // stmt -> var_stmt
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 21: // stmt -> if_stmt
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 22: // stmt -> proc_func_call_stmt
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 23: // stmt -> while_stmt
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 24: // stmt -> for_stmt
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 25: // stmt -> return_stmt
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 26: // stmt -> break_stmt
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 27: // stmt -> continue_stmt
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 28: // stmt -> global_stmt
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 29: // stmt -> pass_stmt
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 30: // stmt -> exit_stmt
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 31: // stmt -> proc_func_decl
{
CurrentSemanticValue.stn = new declarations_as_statement(new declarations(ValueStack[ValueStack.Depth-1].stn as procedure_definition, CurrentLocationSpan), CurrentLocationSpan);
}
break;
case 32: // stmt -> import_clause
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 33: // import_clause -> IMPORT, ident_as_ident_list
{
CurrentSemanticValue.stn = new import_statement(ValueStack[ValueStack.Depth-1].stn as as_statement_list, CurrentLocationSpan);
}
break;
case 34: // import_clause -> FROM, ident, IMPORT, ident_as_ident_list
{
CurrentSemanticValue.stn = new from_import_statement(ValueStack[ValueStack.Depth-3].id as ident, false, ValueStack[ValueStack.Depth-1].stn as as_statement_list, CurrentLocationSpan);
}
break;
case 35: // import_clause -> FROM, ident, IMPORT, STAR
{
CurrentSemanticValue.stn = new from_import_statement(ValueStack[ValueStack.Depth-3].id as ident, true, null, CurrentLocationSpan);
}
break;
case 36: // pass_stmt -> PASS
{
CurrentSemanticValue.stn = new empty_statement();
}
break;
case 37: // exit_stmt -> EXIT, LPAR, optional_act_param_list, RPAR
{
parserTools.AddErrorFromResource("UNSUPPORTED_CONSTRUCTION_{0}", CurrentLocationSpan, "exit");
}
break;
case 38: // global_stmt -> GLOBAL, ident_list
{
CurrentSemanticValue.stn = new global_statement(ValueStack[ValueStack.Depth-1].stn as ident_list, CurrentLocationSpan);
}
break;
case 39: // ident -> ID
{
CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id;
}
break;
case 40: // dotted_ident -> ident
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id;
}
break;
case 41: // dotted_ident -> dotted_ident, DOT, ident
{
CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan);
}
break;
case 42: // ident_as_ident -> ident, AS, ident
{
CurrentSemanticValue.stn = new as_statement(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan);
}
break;
case 43: // ident_as_ident -> ident
{
CurrentSemanticValue.stn = new as_statement(ValueStack[ValueStack.Depth-1].id, ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan);
}
break;
case 44: // ident_as_ident_list -> ident_as_ident
{
CurrentSemanticValue.stn = new as_statement_list(ValueStack[ValueStack.Depth-1].stn as as_statement, CurrentLocationSpan);
}
break;
case 45: // ident_as_ident_list -> ident_as_ident_list, COMMA, ident_as_ident
{
CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as as_statement_list).Add(ValueStack[ValueStack.Depth-1].stn as as_statement, CurrentLocationSpan);
}
break;
case 46: // expr_mapping -> expr, COLON, expr
{
expression_list el = new expression_list(new List<expression> { ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex }, CurrentLocationSpan);
CurrentSemanticValue.ex = new tuple_node(el, CurrentLocationSpan);
}
break;
case 47: // expr_mapping_list -> expr_mapping
{
CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 48: // expr_mapping_list -> expr_mapping_list, COMMA, expr_mapping
{
CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 49: // var_stmt -> variable, COLON, type_ref
{
var vds = new var_def_statement(new ident_list(ValueStack[ValueStack.Depth-3].ex as ident, LocationStack[LocationStack.Depth-3]), ValueStack[ValueStack.Depth-1].td, null, definition_attribute.None, false, CurrentLocationSpan);
CurrentSemanticValue.stn = new var_statement(vds, CurrentLocationSpan);
}
break;
case 50: // var_stmt -> variable, COLON, type_ref, ASSIGN, expr
{
var vds = new var_def_statement(new ident_list(ValueStack[ValueStack.Depth-5].ex as ident, LocationStack[LocationStack.Depth-5]), ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].ex, definition_attribute.None, false, CurrentLocationSpan);
CurrentSemanticValue.stn = new var_statement(vds, CurrentLocationSpan);
}
break;
case 51: // assign_right_part -> expr
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 52: // assign_right_part -> turbo_tuple_expr
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 53: // assign_stmt -> variable, ASSIGN, assign_right_part
{
if (!(ValueStack[ValueStack.Depth-3].ex is addressed_value))
parserTools.AddErrorFromResource("LEFT_SIDE_CANNOT_BE_ASSIGNED_TO", CurrentLocationSpan);
CurrentSemanticValue.stn = new assign(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 54: // assign_stmt -> variable, assign_type, assign_right_part
{
if (!(ValueStack[ValueStack.Depth-3].ex is addressed_value))
parserTools.AddErrorFromResource("LEFT_SIDE_CANNOT_BE_ASSIGNED_TO", CurrentLocationSpan);
CurrentSemanticValue.stn = new assign(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 55: // assign_stmt -> LPAR, variable, COMMA, variable_list, RPAR, ASSIGN,
// assign_right_part
{
// if False:
if (ValueStack[ValueStack.Depth-2].op.type != Operators.Assignment)
parserTools.AddErrorFromResource("ONLY_BASE_ASSIGNMENT_FOR_TUPLE", LocationStack[LocationStack.Depth-2]);
(ValueStack[ValueStack.Depth-4].ob as addressed_value_list).Insert(0, ValueStack[ValueStack.Depth-6].ex as addressed_value);
(ValueStack[ValueStack.Depth-4].ob as syntax_tree_node).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-7], LocationStack[LocationStack.Depth-6], LocationStack[LocationStack.Depth-5], LocationStack[LocationStack.Depth-4], LocationStack[LocationStack.Depth-3]);
CurrentSemanticValue.stn = new assign_tuple(ValueStack[ValueStack.Depth-4].ob as addressed_value_list, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 56: // assign_stmt -> variable, COMMA, variable_list, ASSIGN, assign_right_part
{
// if False:
if (ValueStack[ValueStack.Depth-2].op.type != Operators.Assignment)
parserTools.AddErrorFromResource("ONLY_BASE_ASSIGNMENT_FOR_TUPLE", LocationStack[LocationStack.Depth-2]);
(ValueStack[ValueStack.Depth-3].ob as addressed_value_list).Insert(0, ValueStack[ValueStack.Depth-5].ex as addressed_value);
(ValueStack[ValueStack.Depth-3].ob as syntax_tree_node).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-5], LocationStack[LocationStack.Depth-4], LocationStack[LocationStack.Depth-3]);
CurrentSemanticValue.stn = new assign_tuple(ValueStack[ValueStack.Depth-3].ob as addressed_value_list, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 57: // assign_type -> PLUSEQUAL
{
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
}
break;
case 58: // assign_type -> MINUSEQUAL
{
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
}
break;
case 59: // assign_type -> STAREQUAL
{
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
}
break;
case 60: // assign_type -> DIVEQUAL
{
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
}
break;
case 61: // assign_type -> BINXOREQUAL
{
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
}
break;
case 62: // assign_type -> SHLEQUAL
{
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
}
break;
case 63: // assign_type -> SHREQUAL
{
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
}
break;
case 64: // assign_type -> BINANDEQUAL
{
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
}
break;
case 65: // assign_type -> BINOREQUAL
{
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
}
break;
case 66: // assign_type -> INTDIVISIONEQUAL
{
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
}
break;
case 67: // expr -> expr, IF, expr, ELSE, expr
{
CurrentSemanticValue.ex = new question_colon_expression(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 68: // expr -> expr, PLUS, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 69: // expr -> expr, STAR, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 70: // expr -> expr, DIVIDE, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 71: // expr -> expr, MINUS, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 72: // expr -> expr, LESS, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 73: // expr -> expr, GREATER, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 74: // expr -> expr, LESSEQUAL, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 75: // expr -> expr, GREATEREQUAL, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 76: // expr -> expr, EQUAL, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 77: // expr -> expr, NOTEQUAL, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 78: // expr -> expr, AND, expr
{
CurrentSemanticValue.ex = new bin_expr(SubtreeCreator.CreateMethodCall("bool", ValueStack[ValueStack.Depth-3].ex.source_context, ValueStack[ValueStack.Depth-3].ex),
SubtreeCreator.CreateMethodCall("bool", ValueStack[ValueStack.Depth-1].ex.source_context, ValueStack[ValueStack.Depth-1].ex),
ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 79: // expr -> expr, OR, expr
{
CurrentSemanticValue.ex = new bin_expr(SubtreeCreator.CreateMethodCall("bool", ValueStack[ValueStack.Depth-3].ex.source_context, ValueStack[ValueStack.Depth-3].ex),
SubtreeCreator.CreateMethodCall("bool", ValueStack[ValueStack.Depth-1].ex.source_context, ValueStack[ValueStack.Depth-1].ex),
ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 80: // expr -> expr, SLASHSLASH, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 81: // expr -> expr, PERCENTAGE, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 82: // expr -> expr, SHL, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 83: // expr -> expr, SHR, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 84: // expr -> expr, BINAND, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 85: // expr -> expr, BINOR, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 86: // expr -> expr, BINXOR, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 87: // expr -> expr, STARSTAR, expr
{
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("!pow", CurrentLocationSpan, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex);
}
break;
case 88: // expr -> expr, IN, expr
{
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, Operators.In, CurrentLocationSpan);
}
break;
case 89: // expr -> expr, NOT, IN, expr
{
// $$ = new bin_expr($1, $4, Operators.NotIn, @$);
CurrentSemanticValue.ex = new un_expr(new bin_expr(ValueStack[ValueStack.Depth-4].ex, ValueStack[ValueStack.Depth-1].ex, Operators.In, CurrentLocationSpan),Operators.LogicalNOT,CurrentLocationSpan);
}
break;
case 90: // expr -> PLUS, expr
{
CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 91: // expr -> MINUS, expr
{
CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 92: // expr -> NOT, expr
{
CurrentSemanticValue.ex = new un_expr(SubtreeCreator.CreateMethodCall("bool", ValueStack[ValueStack.Depth-1].ex.source_context, ValueStack[ValueStack.Depth-1].ex), ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 93: // expr -> BINNOT, expr
{
CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
}
break;
case 94: // expr -> variable
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 95: // expr -> const_value
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 96: // expr -> new_expr
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 97: // expr -> is_expr
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 98: // expr -> tuple_expr
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 99: // expr -> LPAR, expr, RPAR
{
CurrentSemanticValue.ex = new bracket_expr(ValueStack[ValueStack.Depth-2].ex, CurrentLocationSpan);
}
break;
case 100: // tuple_expr -> LPAR, expr, COMMA, expr_list, RPAR
{
// inherited from PABC
if ((ValueStack[ValueStack.Depth-2].stn as expression_list).Count > 6)
parserTools.AddErrorFromResource("TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7", CurrentLocationSpan);
(ValueStack[ValueStack.Depth-2].stn as expression_list).Insert(0, ValueStack[ValueStack.Depth-4].ex);
CurrentSemanticValue.ex = new tuple_node(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan);
}
break;
case 101: // turbo_tuple_expr -> expr, COMMA, expr_list
{
// inherited from PABC
if ((ValueStack[ValueStack.Depth-1].stn as expression_list).Count > 6)
parserTools.AddErrorFromResource("TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7", CurrentLocationSpan);
(ValueStack[ValueStack.Depth-1].stn as expression_list).Insert(0, ValueStack[ValueStack.Depth-3].ex);
CurrentSemanticValue.ex = new tuple_node(ValueStack[ValueStack.Depth-1].stn as expression_list, CurrentLocationSpan);
}
break;
case 102: // is_expr -> variable, IS, type_ref
{
CurrentSemanticValue.ex = parserTools.NewAsIsExpr(ValueStack[ValueStack.Depth-3].ex, op_typecast.is_op, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan);
}
break;
case 103: // new_expr -> NEW, type_ref, LPAR, optional_act_param_list, RPAR
{
CurrentSemanticValue.ex = new new_expr(ValueStack[ValueStack.Depth-4].td, ValueStack[ValueStack.Depth-2].stn as expression_list, false, null, CurrentLocationSpan);
}
break;
case 104: // const_value -> INTNUM
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 105: // const_value -> REALNUM
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 106: // const_value -> TRUE
{
CurrentSemanticValue.ex = new ident("true", CurrentLocationSpan);
}
break;
case 107: // const_value -> FALSE
{
CurrentSemanticValue.ex = new ident("false", CurrentLocationSpan);
}
break;
case 108: // const_value -> STRINGNUM
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal;
}
break;
case 109: // const_value -> FSTRINGNUM
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 110: // const_value -> BIGINT
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 111: // expr_list -> expr
{
CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 112: // expr_list -> expr_list, COMMA, expr
{
CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 113: // if_stmt -> IF, expr, COLON, block, optional_elif
{
CurrentSemanticValue.stn = new if_node(ValueStack[ValueStack.Depth-4].ex, ValueStack[ValueStack.Depth-2].stn as statement, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan);
}
break;
case 114: // optional_elif -> ELIF, expr, COLON, block, optional_elif
{
CurrentSemanticValue.stn = new if_node(ValueStack[ValueStack.Depth-4].ex, ValueStack[ValueStack.Depth-2].stn as statement, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan);
}
break;
case 115: // optional_elif -> optional_else
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 116: // optional_else -> ELSE, COLON, block
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 117: // optional_else -> /* empty */
{
CurrentSemanticValue.stn = null;
}
break;
case 118: // while_stmt -> WHILE, expr, COLON, block
{
CurrentSemanticValue.stn = new while_node(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, WhileCycleType.While, CurrentLocationSpan);
}
break;
case 119: // for_stmt -> FOR, ident, IN, expr, COLON, block
{
CurrentSemanticValue.stn = new foreach_stmt(ValueStack[ValueStack.Depth-5].id, new no_type_foreach(), ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, null, CurrentLocationSpan);
}
break;
case 120: // for_stmt -> FOR, ident, COMMA, ident_list, IN, expr, COLON, block
{
(ValueStack[ValueStack.Depth-5].stn as ident_list).AddFirst(ValueStack[ValueStack.Depth-7].id);
var id = parserTools.NewId("#fe",LocationStack[LocationStack.Depth-5]);
var tttt = new assign_var_tuple(ValueStack[ValueStack.Depth-5].stn as ident_list, id, CurrentLocationSpan);
statement_list nine = ValueStack[ValueStack.Depth-1].stn is statement_list ? ValueStack[ValueStack.Depth-1].stn as statement_list : new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, LocationStack[LocationStack.Depth-1]);
nine.Insert(0, tttt);
var fe = new foreach_stmt(id, new no_type_foreach(), ValueStack[ValueStack.Depth-3].ex, nine, null, CurrentLocationSpan);
fe.ext = ValueStack[ValueStack.Depth-5].stn as ident_list;
CurrentSemanticValue.stn = fe;
}
break;
case 121: // ident_list -> ident
{
CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan);
}
break;
case 122: // ident_list -> ident_list, COMMA, ident
{
CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as ident_list).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan);
}
break;
case 123: // func_name_ident -> ident
{
CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id;
}
break;
case 124: // return_stmt -> RETURN, assign_right_part
{
CurrentSemanticValue.stn = new return_statement(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 125: // return_stmt -> RETURN
{
CurrentSemanticValue.stn = new return_statement(null, CurrentLocationSpan);
}
break;
case 126: // break_stmt -> BREAK
{
CurrentSemanticValue.stn = new procedure_call(new ident("break", CurrentLocationSpan), true, CurrentLocationSpan);
}
break;
case 127: // continue_stmt -> CONTINUE
{
CurrentSemanticValue.stn = new procedure_call(new ident("continue", CurrentLocationSpan), true, CurrentLocationSpan);
}
break;
case 128: // proc_func_call_stmt -> proc_func_call
{
CurrentSemanticValue.stn = new procedure_call(ValueStack[ValueStack.Depth-1].ex as addressed_value, ValueStack[ValueStack.Depth-1].ex is ident, CurrentLocationSpan);
}
break;
case 129: // variable -> ident
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id;
}
break;
case 130: // variable -> proc_func_call
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 131: // variable -> variable, DOT, ident
{
CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan);
}
break;
case 132: // variable -> const_value, DOT, ident
{
CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan);
}
break;
case 133: // variable -> list_constant
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 134: // variable -> set_constant
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 135: // variable -> dict_constant
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 136: // variable -> variable, LBRACKET, expr, RBRACKET
{
var el = new expression_list(ValueStack[ValueStack.Depth-2].ex as expression, CurrentLocationSpan);
CurrentSemanticValue.ex = new indexer(ValueStack[ValueStack.Depth-4].ex as addressed_value, el, CurrentLocationSpan);
}
break;
case 137: // variable -> LBRACKET, generator_object, RBRACKET
{
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("list", ValueStack[ValueStack.Depth-2].ex.source_context, ValueStack[ValueStack.Depth-2].ex);
}
break;
case 138: // variable -> LBRACE, generator_object, RBRACE
{
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("set", ValueStack[ValueStack.Depth-2].ex.source_context, ValueStack[ValueStack.Depth-2].ex);
}
break;
case 139: // variable -> LBRACE, generator_object_for_dict, RBRACE
{
dot_node dn = new dot_node(ValueStack[ValueStack.Depth-2].ex as addressed_value, (new ident("ToDictionary")) as addressed_value, ValueStack[ValueStack.Depth-2].ex.source_context);
CurrentSemanticValue.ex = new method_call(dn as addressed_value, null, ValueStack[ValueStack.Depth-2].ex.source_context);
}
break;
case 140: // variable_list -> variable
{
CurrentSemanticValue.ob = new addressed_value_list(ValueStack[ValueStack.Depth-1].ex as addressed_value,LocationStack[LocationStack.Depth-1]);
}
break;
case 141: // variable_list -> variable_list, COMMA, variable
{
(ValueStack[ValueStack.Depth-3].ob as addressed_value_list).Add(ValueStack[ValueStack.Depth-1].ex as addressed_value);
(ValueStack[ValueStack.Depth-3].ob as syntax_tree_node).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-3],LocationStack[LocationStack.Depth-2],LocationStack[LocationStack.Depth-1]);
CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-3].ob;
}
break;
case 142: // generator_object -> expr, FOR, ident, IN, expr, optional_condition
{
CurrentSemanticValue.ex = new generator_object(ValueStack[ValueStack.Depth-6].ex, ValueStack[ValueStack.Depth-4].id, ValueStack[ValueStack.Depth-2].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 143: // generator_object_for_dict -> expr_mapping, FOR, ident, IN, expr,
// optional_condition
{
CurrentSemanticValue.ex = new generator_object(ValueStack[ValueStack.Depth-6].ex, ValueStack[ValueStack.Depth-4].id, ValueStack[ValueStack.Depth-2].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 144: // dict_constant -> LBRACE, expr_mapping_list, RBRACE
{
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("dict", CurrentLocationSpan, (expression_list)ValueStack[ValueStack.Depth-2].stn);
}
break;
case 145: // dict_constant -> LBRACE, RBRACE
{
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("!empty_dict", CurrentLocationSpan);
}
break;
case 146: // set_constant -> LBRACE, expr_list, RBRACE
{
var acn = new array_const_new(ValueStack[ValueStack.Depth-2].stn as expression_list, '|', CurrentLocationSpan);
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("set", CurrentLocationSpan, acn);
}
break;
case 147: // list_constant -> LBRACKET, expr_list, RBRACKET
{
var acn = new array_const_new(ValueStack[ValueStack.Depth-2].stn as expression_list, '|', CurrentLocationSpan);
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("list", CurrentLocationSpan, acn);
}
break;
case 148: // list_constant -> LBRACKET, RBRACKET
{
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("!empty_list", CurrentLocationSpan);
}
break;
case 149: // optional_condition -> /* empty */
{
CurrentSemanticValue.ex = null;
}
break;
case 150: // optional_condition -> IF, expr
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 151: // block -> INDENT, stmt_list, end_of_line, UNINDENT
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-3].stn as statement_list;
(CurrentSemanticValue.stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-4].ti;
(CurrentSemanticValue.stn as statement_list).right_logical_bracket = ValueStack[ValueStack.Depth-1].ti;
CurrentSemanticValue.stn.source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-3], LocationStack[LocationStack.Depth-2]);
}
break;
case 152: // proc_func_decl -> proc_func_header, block
{
CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, new block(null, ValueStack[ValueStack.Depth-1].stn as statement_list, LocationStack[LocationStack.Depth-1]), CurrentLocationSpan);
}
break;
case 153: // proc_func_header -> DEF, func_name_ident, LPAR, optional_form_param_list, RPAR,
// COLON
{
CurrentSemanticValue.td = new procedure_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, new procedure_attributes_list(new List<procedure_attribute>()), new method_name(null,null, ValueStack[ValueStack.Depth-5].id, null, LocationStack[LocationStack.Depth-5]), null, CurrentLocationSpan);
}
break;
case 154: // proc_func_header -> DEF, func_name_ident, LPAR, optional_form_param_list, RPAR,
// ARROW, type_ref, COLON
{
CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-5].stn as formal_parameters, new procedure_attributes_list(new List<procedure_attribute>()), new method_name(null,null, ValueStack[ValueStack.Depth-7].id, null, LocationStack[LocationStack.Depth-7]), null, ValueStack[ValueStack.Depth-2].td as type_definition, CurrentLocationSpan);
}
break;
case 155: // proc_func_call -> variable, LPAR, optional_act_param_list, RPAR
{
CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-4].ex as addressed_value, ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan);
}
break;
case 156: // simple_type_identifier -> ident
{
CurrentSemanticValue.td = new named_type_reference(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan);
}
break;
case 157: // simple_type_identifier -> simple_type_identifier, DOT, ident
{
CurrentSemanticValue.td = (ValueStack[ValueStack.Depth-3].td as named_type_reference).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan);
}
break;
case 158: // type_ref -> simple_type_identifier
{
CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td as named_type_reference;
}
break;
case 159: // type_ref -> template_type
{
CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td;
}
break;
case 160: // template_type -> simple_type_identifier, template_type_params
{
CurrentSemanticValue.td = new template_type_reference(ValueStack[ValueStack.Depth-2].td as named_type_reference, ValueStack[ValueStack.Depth-1].stn as template_param_list, CurrentLocationSpan);
}
break;
case 161: // template_type_params -> LBRACKET, template_param_list, RBRACKET
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn;
CurrentSemanticValue.stn.source_context = CurrentLocationSpan;
}
break;
case 162: // template_param_list -> type_ref
{
CurrentSemanticValue.stn = new template_param_list(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan);
}
break;
case 163: // template_param_list -> template_param_list, COMMA, type_ref
{
CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as template_param_list).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan);
}
break;
case 164: // param_name -> ident
{
CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan);
}
break;
case 165: // form_param_sect -> param_name, COLON, type_ref
{
CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.none, null, CurrentLocationSpan);
}
break;
case 166: // form_param_sect -> STAR, param_name, COLON, type_ref
{
var at = new array_type(null, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan);
CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, at, parametr_kind.params_parametr, null, CurrentLocationSpan);
}
break;
case 167: // form_param_sect -> STARSTAR, param_name, COLON, type_ref
{
CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.kwargs_parameter, null, CurrentLocationSpan);
}
break;
case 168: // form_param_list -> form_param_sect
{
CurrentSemanticValue.stn = new formal_parameters(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan);
}
break;
case 169: // form_param_list -> form_param_list, COMMA, form_param_sect
{
CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as formal_parameters).Add(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan);
}
break;
case 170: // optional_form_param_list -> form_param_list
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 171: // optional_form_param_list -> /* empty */
{
CurrentSemanticValue.stn = null;
}
break;
case 172: // act_param -> expr
{
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
}
break;
case 173: // act_param -> ident, ASSIGN, expr
{
CurrentSemanticValue.ex = new name_assign_expr(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 174: // act_param_list -> act_param
{
CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 175: // act_param_list -> act_param_list, COMMA, act_param
{
CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 176: // optional_act_param_list -> act_param_list
{
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
}
break;
case 177: // optional_act_param_list -> generator_object
{
CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 178: // optional_act_param_list -> /* empty */
{
CurrentSemanticValue.stn = null;
}
break;
case 179: // end_of_line -> END_OF_LINE
{
CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ti;
}
break;
case 180: // end_of_line -> SEMICOLON
{
CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ti;
}
break;
case 181: // optional_semicolon -> SEMICOLON
{
CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ti;
}
break;
case 182: // optional_semicolon -> /* empty */
{
CurrentSemanticValue.ob = null;
}
break;
}
}
protected override string TerminalToString(int terminal)
{
if (aliasses != null && aliasses.ContainsKey(terminal))
return aliasses[terminal];
else if (((Tokens)terminal).ToString() != terminal.ToString(CultureInfo.InvariantCulture))
return ((Tokens)terminal).ToString();
else
return CharToString((char)terminal);
}
public program_module NewProgramModule(program_name progName, Object optHeadCompDirs, uses_list mainUsesClose, syntax_tree_node progBlock, Object optPoint, LexLocation loc)
{
var progModule = new program_module(progName, mainUsesClose, progBlock as block, null, loc);
if (optPoint == null && progBlock != null)
{
var fp = progBlock.source_context.end_position;
var err_stn = progBlock;
if ((progBlock is block) && (progBlock as block).program_code != null && (progBlock as block).program_code.subnodes != null && (progBlock as block).program_code.subnodes.Count > 0)
err_stn = (progBlock as block).program_code.subnodes[(progBlock as block).program_code.subnodes.Count - 1];
//parserTools.errors.Add(new SPythonUnexpectedToken(parserTools.currentFileName, StringResources.Get("TKPOINT"), new SourceContext(fp.line_num, fp.column_num + 1, fp.line_num, fp.column_num + 1, 0, 0), err_stn));
}
return progModule;
}
}
}