* Implement bool to int and int to bool implicit conversion for SPython * Change "and", "or" and "not" operations to be logical in SPython * Add standard functions' overloads (all, any, sum)
1636 lines
94 KiB
C#
1636 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: 29.01.2026 14:12:59
|
|
// 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};
|
|
|
|
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 ParserLambdaHelper lambdaHelper = new ParserLambdaHelper();
|
|
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[184];
|
|
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", "extended_new_expr", "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,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,34,198,6,207,5,227,3,232,10,248,11,251,12,253,15,255,17,258,20,260,9,267,13,294,14,302,80,313,82,324,81,331},new int[]{-37,1,-35,3,-27,309,-25,8,-9,9,-1,79,-7,197,-8,181,-60,92,-61,98,-62,109,-24,205,-26,206,-28,225,-29,226,-30,231,-19,247,-20,250,-21,252,-22,254,-23,257,-33,259,-18,264,-45,265,-49,293,-52,311});
|
|
states[1] = new State(new int[]{2,2});
|
|
states[2] = new State(-1);
|
|
states[3] = new State(new int[]{43,310,26,307,25,-183},new int[]{-55,4,-56,6});
|
|
states[4] = new State(new int[]{25,5});
|
|
states[5] = new State(-2);
|
|
states[6] = new State(new int[]{63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,34,198,6,207,5,227,3,232,10,248,11,251,12,253,15,255,17,258,20,260,9,267,13,294,14,302},new int[]{-27,7,-25,8,-9,9,-1,79,-7,197,-8,181,-60,92,-61,98,-62,109,-24,205,-26,206,-28,225,-29,226,-30,231,-19,247,-20,250,-21,252,-22,254,-23,257,-33,259,-18,264,-45,265,-49,293});
|
|
states[7] = new State(-20);
|
|
states[8] = new State(-21);
|
|
states[9] = new State(new int[]{46,10,34,69,40,163,38,165,41,175,42,183,47,187,48,188,49,189,50,190,51,191,52,192,53,193,54,194,55,195,56,196},new int[]{-58,173});
|
|
states[10] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-66,11,-5,12,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126,-67,172});
|
|
states[11] = new State(-55);
|
|
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,170,43,-53,26,-53,25,-53});
|
|
states[13] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,14,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
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[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,16,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
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,-69,43,-69,26,-69,25,-69,7,-69,3,-69,35,-69,39,-69,37,-69,42,-69});
|
|
states[17] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,18,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[18] = new State(new int[]{6,13,57,-70,59,19,60,21,58,-70,64,-70,65,-70,66,-70,67,-70,68,-70,69,-70,70,-70,71,-70,61,41,62,43,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[19] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,20,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[20] = new State(new int[]{6,13,57,-71,59,-71,60,-71,58,-71,64,-71,65,-71,66,-71,67,-71,68,-71,69,-71,70,-71,71,-71,61,-71,62,-71,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[21] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,22,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[22] = new State(new int[]{6,13,57,-72,59,-72,60,-72,58,-72,64,-72,65,-72,66,-72,67,-72,68,-72,69,-72,70,-72,71,-72,61,-72,62,-72,76,-72,77,-72,78,-72,79,-72,75,-72,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[23] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,24,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[24] = new State(new int[]{6,13,57,-73,59,19,60,21,58,-73,64,-73,65,-73,66,-73,67,-73,68,-73,69,-73,70,-73,71,-73,61,41,62,43,76,-73,77,-73,78,-73,79,-73,75,-73,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[25] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,26,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[26] = 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[27] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,28,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[28] = 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[29] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,30,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[30] = 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[31] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,32,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[32] = 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[33] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,34,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[34] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-78,65,-78,66,-78,67,-78,68,-78,69,-78,70,-78,71,-78,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,-78,41,-78,43,-78,26,-78,25,-78,7,-78,3,-78,35,-78,39,-78,37,-78,42,-78});
|
|
states[35] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,36,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[36] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-79,65,-79,66,-79,67,-79,68,-79,69,-79,70,-79,71,-79,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,-79,41,-79,43,-79,26,-79,25,-79,7,-79,3,-79,35,-79,39,-79,37,-79,42,-79});
|
|
states[37] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,38,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
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,-80,71,-80,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,41,-80,43,-80,26,-80,25,-80,7,-80,3,-80,35,-80,39,-80,37,-80,42,-80});
|
|
states[39] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,40,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
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,-81,61,41,62,43,76,45,77,47,78,49,79,51,75,53,73,55,4,57,72,59,41,-81,43,-81,26,-81,25,-81,7,-81,3,-81,35,-81,39,-81,37,-81,42,-81});
|
|
states[41] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,42,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[42] = new State(new int[]{6,13,57,-82,59,-82,60,-82,58,-82,64,-82,65,-82,66,-82,67,-82,68,-82,69,-82,70,-82,71,-82,61,-82,62,-82,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[43] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,44,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[44] = new State(new int[]{6,13,57,-83,59,-83,60,-83,58,-83,64,-83,65,-83,66,-83,67,-83,68,-83,69,-83,70,-83,71,-83,61,-83,62,-83,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[45] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,46,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[46] = 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,-84,77,-84,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[47] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,48,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[48] = 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,-85,77,-85,78,-85,79,-85,75,-85,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[49] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,50,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[50] = 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,-86,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[51] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,52,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[52] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-87,65,-87,66,-87,67,-87,68,-87,69,-87,70,-87,71,-87,61,41,62,43,76,45,77,47,78,49,79,-87,75,53,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[53] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,54,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[54] = new State(new int[]{6,13,57,17,59,19,60,21,58,23,64,-88,65,-88,66,-88,67,-88,68,-88,69,-88,70,-88,71,-88,61,41,62,43,76,45,77,47,78,49,79,-88,75,-88,73,55,4,57,72,-88,41,-88,43,-88,26,-88,25,-88,7,-88,3,-88,35,-88,39,-88,37,-88,42,-88});
|
|
states[55] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,56,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[56] = new State(new int[]{6,13,57,-89,59,-89,60,-89,58,-89,64,-89,65,-89,66,-89,67,-89,68,-89,69,-89,70,-89,71,-89,61,-89,62,-89,76,-89,77,-89,78,-89,79,-89,75,-89,73,55,4,57,72,-89,41,-89,43,-89,26,-89,25,-89,7,-89,3,-89,35,-89,39,-89,37,-89,42,-89});
|
|
states[57] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,58,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
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,-90,43,-90,26,-90,25,-90,7,-90,3,-90,35,-90,39,-90,37,-90,42,-90});
|
|
states[59] = new State(new int[]{4,60});
|
|
states[60] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,61,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
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,-91,43,-91,26,-91,25,-91,7,-91,3,-91,35,-91,39,-91,37,-91,42,-91});
|
|
states[62] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,63,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[63] = new State(new int[]{6,13,57,-92,59,19,60,21,58,-92,64,-92,65,-92,66,-92,67,-92,68,-92,69,-92,70,-92,71,-92,61,41,62,43,76,-92,77,-92,78,-92,79,-92,75,-92,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[64] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,65,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[65] = 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,-93,71,-93,61,41,62,43,76,45,77,47,78,49,79,51,75,53,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[66] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,67,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[67] = new State(new int[]{6,13,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,57,72,-94,41,-94,43,-94,26,-94,25,-94,7,-94,3,-94,35,-94,39,-94,37,-94,42,-94});
|
|
states[68] = new State(new int[]{34,69,40,163,38,165,22,168,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[69] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127,35,-179},new int[]{-17,70,-16,72,-11,116,-5,117,-9,68,-1,76,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126,-63,134});
|
|
states[70] = new State(new int[]{35,71});
|
|
states[71] = new State(-156);
|
|
states[72] = new State(new int[]{41,73,35,-177});
|
|
states[73] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-11,74,-5,75,-9,68,-1,76,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[74] = new State(-176);
|
|
states[75] = 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[76] = new State(new int[]{46,77,34,-130,40,-130,38,-130,22,-130,6,-130,57,-130,59,-130,60,-130,58,-130,64,-130,65,-130,66,-130,67,-130,68,-130,69,-130,70,-130,71,-130,61,-130,62,-130,76,-130,77,-130,78,-130,79,-130,75,-130,73,-130,4,-130,72,-130,3,-130,41,-130,35,-130});
|
|
states[77] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,78,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[78] = 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,-174,35,-174});
|
|
states[79] = new State(-130);
|
|
states[80] = new State(-41);
|
|
states[81] = new State(-131);
|
|
states[82] = new State(new int[]{40,83,6,-96,57,-96,59,-96,60,-96,58,-96,64,-96,65,-96,66,-96,67,-96,68,-96,69,-96,70,-96,71,-96,61,-96,62,-96,76,-96,77,-96,78,-96,79,-96,75,-96,73,-96,4,-96,72,-96,41,-96,43,-96,26,-96,25,-96,7,-96,3,-96,35,-96,39,-96,37,-96,42,-96});
|
|
states[83] = new State(new int[]{63,80},new int[]{-1,84});
|
|
states[84] = new State(-133);
|
|
states[85] = new State(-105);
|
|
states[86] = new State(-106);
|
|
states[87] = new State(-107);
|
|
states[88] = new State(-108);
|
|
states[89] = new State(-109);
|
|
states[90] = new State(-110);
|
|
states[91] = new State(-111);
|
|
states[92] = new State(-134);
|
|
states[93] = new State(new int[]{39,159,58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-34,94,-63,160,-5,162,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[94] = new State(new int[]{39,95,41,96});
|
|
states[95] = new State(-148);
|
|
states[96] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,97,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[97] = 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,-113,41,-113,37,-113,35,-113,43,-113,26,-113,25,-113});
|
|
states[98] = new State(-135);
|
|
states[99] = new State(new int[]{37,147,58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-34,100,-54,102,-63,148,-64,150,-5,152,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126,-59,153});
|
|
states[100] = new State(new int[]{37,101,41,96});
|
|
states[101] = new State(-147);
|
|
states[102] = new State(new int[]{37,103,41,104});
|
|
states[103] = new State(-145);
|
|
states[104] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-59,105,-5,106,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[105] = new State(-50);
|
|
states[106] = new State(new int[]{42,107,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[107] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,108,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[108] = 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,-48,37,-48,41,-48});
|
|
states[109] = new State(-136);
|
|
states[110] = new State(-97);
|
|
states[111] = new State(new int[]{63,80},new int[]{-46,112,-47,135,-1,144,-48,145});
|
|
states[112] = new State(new int[]{34,113});
|
|
states[113] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127,35,-179},new int[]{-17,114,-16,72,-11,116,-5,117,-9,68,-1,76,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126,-63,134});
|
|
states[114] = new State(new int[]{35,115});
|
|
states[115] = new State(-104);
|
|
states[116] = new State(-175);
|
|
states[117] = 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,118,41,-173,35,-173});
|
|
states[118] = new State(new int[]{63,80},new int[]{-1,119});
|
|
states[119] = new State(new int[]{4,120});
|
|
states[120] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,121,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[121] = new State(new int[]{6,123,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},new int[]{-10,122});
|
|
states[122] = new State(-143);
|
|
states[123] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,124,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[124] = 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,-151,39,-151,37,-151});
|
|
states[125] = new State(-98);
|
|
states[126] = new State(-99);
|
|
states[127] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,128,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[128] = new State(new int[]{41,129,35,133,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[129] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-34,130,-5,132,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[130] = new State(new int[]{35,131,41,96});
|
|
states[131] = new State(-101);
|
|
states[132] = 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,-112,41,-112,43,-112,26,-112,25,-112});
|
|
states[133] = new State(-100);
|
|
states[134] = new State(-178);
|
|
states[135] = new State(new int[]{40,136,38,139,34,-159,39,-159,41,-159,6,-159,57,-159,59,-159,60,-159,58,-159,64,-159,65,-159,66,-159,67,-159,68,-159,69,-159,70,-159,71,-159,61,-159,62,-159,76,-159,77,-159,78,-159,79,-159,75,-159,73,-159,4,-159,72,-159,43,-159,26,-159,25,-159,7,-159,3,-159,35,-159,37,-159,42,-159,46,-159},new int[]{-50,138});
|
|
states[136] = new State(new int[]{63,80},new int[]{-1,137});
|
|
states[137] = new State(-158);
|
|
states[138] = new State(-161);
|
|
states[139] = new State(new int[]{63,80},new int[]{-51,140,-46,146,-47,135,-1,144,-48,145});
|
|
states[140] = new State(new int[]{39,141,41,142});
|
|
states[141] = new State(-162);
|
|
states[142] = new State(new int[]{63,80},new int[]{-46,143,-47,135,-1,144,-48,145});
|
|
states[143] = new State(-164);
|
|
states[144] = new State(-157);
|
|
states[145] = new State(-160);
|
|
states[146] = new State(-163);
|
|
states[147] = new State(-146);
|
|
states[148] = new State(new int[]{37,149});
|
|
states[149] = new State(-139);
|
|
states[150] = new State(new int[]{37,151});
|
|
states[151] = new State(-140);
|
|
states[152] = 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,107,3,118,37,-112,41,-112});
|
|
states[153] = new State(new int[]{3,154,37,-49,41,-49});
|
|
states[154] = new State(new int[]{63,80},new int[]{-1,155});
|
|
states[155] = new State(new int[]{4,156});
|
|
states[156] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,157,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[157] = new State(new int[]{6,123,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,-150},new int[]{-10,158});
|
|
states[158] = new State(-144);
|
|
states[159] = new State(-149);
|
|
states[160] = new State(new int[]{39,161});
|
|
states[161] = new State(-138);
|
|
states[162] = 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,118,39,-112,41,-112});
|
|
states[163] = new State(new int[]{63,80},new int[]{-1,164});
|
|
states[164] = new State(-132);
|
|
states[165] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,166,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[166] = new State(new int[]{39,167,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[167] = new State(-137);
|
|
states[168] = new State(new int[]{63,80},new int[]{-46,169,-47,135,-1,144,-48,145});
|
|
states[169] = new State(-103);
|
|
states[170] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-34,171,-5,132,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[171] = new State(new int[]{41,96,43,-102,26,-102,25,-102});
|
|
states[172] = new State(-54);
|
|
states[173] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-66,174,-5,12,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126,-67,172});
|
|
states[174] = new State(-56);
|
|
states[175] = new State(new int[]{63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99},new int[]{-57,176,-9,182,-1,79,-7,81,-8,181,-60,92,-61,98,-62,109});
|
|
states[176] = new State(new int[]{46,177,41,179});
|
|
states[177] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-66,178,-5,12,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126,-67,172});
|
|
states[178] = new State(-58);
|
|
states[179] = new State(new int[]{63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99},new int[]{-9,180,-1,79,-7,81,-8,181,-60,92,-61,98,-62,109});
|
|
states[180] = new State(new int[]{34,69,40,163,38,165,46,-142,41,-142,35,-142});
|
|
states[181] = new State(new int[]{40,83});
|
|
states[182] = new State(new int[]{34,69,40,163,38,165,46,-141,41,-141,35,-141});
|
|
states[183] = new State(new int[]{63,80},new int[]{-46,184,-47,135,-1,144,-48,145});
|
|
states[184] = new State(new int[]{46,185,43,-51,26,-51,25,-51});
|
|
states[185] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,186,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[186] = 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,-52,26,-52,25,-52});
|
|
states[187] = new State(-59);
|
|
states[188] = new State(-60);
|
|
states[189] = new State(-61);
|
|
states[190] = new State(-62);
|
|
states[191] = new State(-63);
|
|
states[192] = new State(-64);
|
|
states[193] = new State(-65);
|
|
states[194] = new State(-66);
|
|
states[195] = new State(-67);
|
|
states[196] = new State(-68);
|
|
states[197] = new State(new int[]{46,-131,34,-131,40,-131,38,-131,41,-131,42,-131,47,-131,48,-131,49,-131,50,-131,51,-131,52,-131,53,-131,54,-131,55,-131,56,-131,43,-129,26,-129,25,-129});
|
|
states[198] = new State(new int[]{63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99},new int[]{-9,199,-1,79,-7,81,-8,181,-60,92,-61,98,-62,109});
|
|
states[199] = new State(new int[]{41,200,34,69,40,163,38,165});
|
|
states[200] = new State(new int[]{63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99},new int[]{-57,201,-9,182,-1,79,-7,81,-8,181,-60,92,-61,98,-62,109});
|
|
states[201] = new State(new int[]{35,202,41,179});
|
|
states[202] = new State(new int[]{46,203});
|
|
states[203] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-66,204,-5,12,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126,-67,172});
|
|
states[204] = new State(-57);
|
|
states[205] = new State(-22);
|
|
states[206] = new State(-23);
|
|
states[207] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,208,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[208] = new State(new int[]{42,209,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[209] = new State(new int[]{23,221},new int[]{-36,210});
|
|
states[210] = new State(new int[]{8,212,7,218,43,-118,26,-118,25,-118},new int[]{-32,211,-31,217});
|
|
states[211] = new State(-114);
|
|
states[212] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,213,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[213] = new State(new int[]{42,214,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[214] = new State(new int[]{23,221},new int[]{-36,215});
|
|
states[215] = new State(new int[]{8,212,7,218,43,-118,26,-118,25,-118},new int[]{-32,216,-31,217});
|
|
states[216] = new State(-115);
|
|
states[217] = new State(-116);
|
|
states[218] = new State(new int[]{42,219});
|
|
states[219] = new State(new int[]{23,221},new int[]{-36,220});
|
|
states[220] = new State(-117);
|
|
states[221] = new State(new int[]{63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,34,198,6,207,5,227,3,232,10,248,11,251,12,253,15,255,17,258,20,260,9,267,13,294,14,302},new int[]{-35,222,-27,309,-25,8,-9,9,-1,79,-7,197,-8,181,-60,92,-61,98,-62,109,-24,205,-26,206,-28,225,-29,226,-30,231,-19,247,-20,250,-21,252,-22,254,-23,257,-33,259,-18,264,-45,265,-49,293});
|
|
states[222] = new State(new int[]{26,307,43,308},new int[]{-56,223});
|
|
states[223] = new State(new int[]{24,224,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,34,198,6,207,5,227,3,232,10,248,11,251,12,253,15,255,17,258,20,260,9,267,13,294,14,302},new int[]{-27,7,-25,8,-9,9,-1,79,-7,197,-8,181,-60,92,-61,98,-62,109,-24,205,-26,206,-28,225,-29,226,-30,231,-19,247,-20,250,-21,252,-22,254,-23,257,-33,259,-18,264,-45,265,-49,293});
|
|
states[224] = new State(-152);
|
|
states[225] = new State(-24);
|
|
states[226] = new State(-25);
|
|
states[227] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,228,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[228] = new State(new int[]{42,229,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[229] = new State(new int[]{23,221},new int[]{-36,230});
|
|
states[230] = new State(-119);
|
|
states[231] = new State(-26);
|
|
states[232] = new State(new int[]{63,80},new int[]{-1,233});
|
|
states[233] = new State(new int[]{4,234,41,238});
|
|
states[234] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,235,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[235] = new State(new int[]{42,236,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[236] = new State(new int[]{23,221},new int[]{-36,237});
|
|
states[237] = new State(-120);
|
|
states[238] = new State(new int[]{63,80},new int[]{-44,239,-1,246});
|
|
states[239] = new State(new int[]{4,240,41,244});
|
|
states[240] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,241,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[241] = new State(new int[]{42,242,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[242] = new State(new int[]{23,221},new int[]{-36,243});
|
|
states[243] = new State(-121);
|
|
states[244] = new State(new int[]{63,80},new int[]{-1,245});
|
|
states[245] = new State(-123);
|
|
states[246] = new State(-122);
|
|
states[247] = new State(-27);
|
|
states[248] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127,43,-126,26,-126,25,-126},new int[]{-66,249,-5,12,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126,-67,172});
|
|
states[249] = new State(-125);
|
|
states[250] = new State(-28);
|
|
states[251] = new State(-127);
|
|
states[252] = new State(-29);
|
|
states[253] = new State(-128);
|
|
states[254] = new State(-30);
|
|
states[255] = new State(new int[]{63,80},new int[]{-44,256,-1,246});
|
|
states[256] = new State(new int[]{41,244,43,-40,26,-40,25,-40});
|
|
states[257] = new State(-31);
|
|
states[258] = new State(-38);
|
|
states[259] = new State(-32);
|
|
states[260] = new State(new int[]{34,261});
|
|
states[261] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127,35,-179},new int[]{-17,262,-16,72,-11,116,-5,117,-9,68,-1,76,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126,-63,134});
|
|
states[262] = new State(new int[]{35,263});
|
|
states[263] = new State(-39);
|
|
states[264] = new State(-33);
|
|
states[265] = new State(new int[]{23,221},new int[]{-36,266});
|
|
states[266] = new State(-153);
|
|
states[267] = new State(new int[]{63,80},new int[]{-2,268,-1,292});
|
|
states[268] = new State(new int[]{34,269});
|
|
states[269] = new State(new int[]{63,80,59,283,73,287,35,-172},new int[]{-41,270,-40,276,-39,291,-38,279,-1,282});
|
|
states[270] = new State(new int[]{35,271});
|
|
states[271] = new State(new int[]{42,272,44,273});
|
|
states[272] = new State(-154);
|
|
states[273] = new State(new int[]{63,80},new int[]{-46,274,-47,135,-1,144,-48,145});
|
|
states[274] = new State(new int[]{42,275});
|
|
states[275] = new State(-155);
|
|
states[276] = new State(new int[]{41,277,35,-171});
|
|
states[277] = new State(new int[]{63,80,59,283,73,287},new int[]{-39,278,-38,279,-1,282});
|
|
states[278] = new State(-170);
|
|
states[279] = new State(new int[]{42,280});
|
|
states[280] = new State(new int[]{63,80},new int[]{-46,281,-47,135,-1,144,-48,145});
|
|
states[281] = new State(-166);
|
|
states[282] = new State(-165);
|
|
states[283] = new State(new int[]{63,80},new int[]{-38,284,-1,282});
|
|
states[284] = new State(new int[]{42,285});
|
|
states[285] = new State(new int[]{63,80},new int[]{-46,286,-47,135,-1,144,-48,145});
|
|
states[286] = new State(-167);
|
|
states[287] = new State(new int[]{63,80},new int[]{-38,288,-1,282});
|
|
states[288] = new State(new int[]{42,289});
|
|
states[289] = new State(new int[]{63,80},new int[]{-46,290,-47,135,-1,144,-48,145});
|
|
states[290] = new State(-168);
|
|
states[291] = new State(-169);
|
|
states[292] = new State(-124);
|
|
states[293] = new State(-34);
|
|
states[294] = new State(new int[]{63,80},new int[]{-43,295,-42,301,-1,298});
|
|
states[295] = new State(new int[]{41,296,43,-35,26,-35,25,-35});
|
|
states[296] = new State(new int[]{63,80},new int[]{-42,297,-1,298});
|
|
states[297] = new State(-47);
|
|
states[298] = new State(new int[]{16,299,41,-45,43,-45,26,-45,25,-45});
|
|
states[299] = new State(new int[]{63,80},new int[]{-1,300});
|
|
states[300] = new State(-44);
|
|
states[301] = new State(-46);
|
|
states[302] = new State(new int[]{63,80},new int[]{-1,303});
|
|
states[303] = new State(new int[]{13,304});
|
|
states[304] = new State(new int[]{59,306,63,80},new int[]{-43,305,-42,301,-1,298});
|
|
states[305] = new State(new int[]{41,296,43,-36,26,-36,25,-36});
|
|
states[306] = new State(-37);
|
|
states[307] = new State(-180);
|
|
states[308] = new State(-181);
|
|
states[309] = new State(-19);
|
|
states[310] = new State(new int[]{25,-182,63,-181,28,-181,29,-181,30,-181,31,-181,45,-181,33,-181,32,-181,38,-181,36,-181,34,-181,6,-181,5,-181,3,-181,10,-181,11,-181,12,-181,15,-181,17,-181,20,-181,9,-181,13,-181,14,-181});
|
|
states[311] = new State(new int[]{25,312});
|
|
states[312] = new State(-3);
|
|
states[313] = new State(new int[]{27,315,58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,321,34,127},new int[]{-4,314,-5,319,-9,68,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,320,-14,125,-65,126,-12,323});
|
|
states[314] = new State(-4);
|
|
states[315] = new State(new int[]{63,80},new int[]{-3,316,-1,317});
|
|
states[316] = new State(-5);
|
|
states[317] = new State(new int[]{38,139,25,-12},new int[]{-50,318});
|
|
states[318] = new State(-13);
|
|
states[319] = 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[320] = new State(new int[]{6,-97,57,-97,59,-97,60,-97,58,-97,64,-97,65,-97,66,-97,67,-97,68,-97,69,-97,70,-97,71,-97,61,-97,62,-97,76,-97,77,-97,78,-97,79,-97,75,-97,73,-97,4,-97,72,-97,25,-10});
|
|
states[321] = new State(new int[]{63,80},new int[]{-46,322,-47,135,-1,144,-48,145});
|
|
states[322] = new State(new int[]{34,113,25,-11});
|
|
states[323] = new State(-9);
|
|
states[324] = new State(new int[]{63,80},new int[]{-15,325,-6,326,-1,330});
|
|
states[325] = new State(-6);
|
|
states[326] = new State(new int[]{40,327,38,139,25,-14},new int[]{-50,329});
|
|
states[327] = new State(new int[]{63,80},new int[]{-1,328});
|
|
states[328] = new State(-43);
|
|
states[329] = new State(-15);
|
|
states[330] = new State(-42);
|
|
states[331] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,335},new int[]{-53,332,-5,333,-9,334,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126,-25,337,-24,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,-16});
|
|
states[334] = new State(new int[]{34,69,40,163,38,165,22,168,46,10,41,175,42,183,47,187,48,188,49,189,50,190,51,191,52,192,53,193,54,194,55,195,56,196,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,25,-95},new int[]{-58,173});
|
|
states[335] = new State(new int[]{58,62,72,64,74,66,63,80,28,85,29,86,30,87,31,88,45,89,33,90,32,91,38,93,36,99,21,111,34,127},new int[]{-5,128,-9,336,-1,79,-7,81,-8,82,-60,92,-61,98,-62,109,-13,110,-14,125,-65,126});
|
|
states[336] = new State(new int[]{41,200,34,69,40,163,38,165,22,168,35,-95,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});
|
|
states[337] = new State(-17);
|
|
states[338] = new State(-18);
|
|
|
|
rules[1] = new Rule(-68, new int[]{-37,2});
|
|
rules[2] = new Rule(-37, new int[]{-35,-55,25});
|
|
rules[3] = new Rule(-37, new int[]{-52,25});
|
|
rules[4] = new Rule(-52, new int[]{80,-4});
|
|
rules[5] = new Rule(-52, new int[]{80,27,-3});
|
|
rules[6] = new Rule(-52, new int[]{82,-15});
|
|
rules[7] = new Rule(-52, new int[]{81,-53});
|
|
rules[8] = new Rule(-4, new int[]{-5});
|
|
rules[9] = new Rule(-4, new int[]{-12});
|
|
rules[10] = new Rule(-12, new int[]{-13});
|
|
rules[11] = new Rule(-12, new int[]{21,-46});
|
|
rules[12] = new Rule(-3, new int[]{-1});
|
|
rules[13] = new Rule(-3, new int[]{-1,-50});
|
|
rules[14] = new Rule(-15, new int[]{-6});
|
|
rules[15] = new Rule(-15, new int[]{-6,-50});
|
|
rules[16] = new Rule(-53, new int[]{-5});
|
|
rules[17] = new Rule(-53, new int[]{-25});
|
|
rules[18] = new Rule(-53, new int[]{-24});
|
|
rules[19] = new Rule(-35, new int[]{-27});
|
|
rules[20] = new Rule(-35, new int[]{-35,-56,-27});
|
|
rules[21] = new Rule(-27, new int[]{-25});
|
|
rules[22] = new Rule(-27, new int[]{-24});
|
|
rules[23] = new Rule(-27, new int[]{-26});
|
|
rules[24] = new Rule(-27, new int[]{-28});
|
|
rules[25] = new Rule(-27, new int[]{-29});
|
|
rules[26] = new Rule(-27, new int[]{-30});
|
|
rules[27] = new Rule(-27, new int[]{-19});
|
|
rules[28] = new Rule(-27, new int[]{-20});
|
|
rules[29] = new Rule(-27, new int[]{-21});
|
|
rules[30] = new Rule(-27, new int[]{-22});
|
|
rules[31] = new Rule(-27, new int[]{-23});
|
|
rules[32] = new Rule(-27, new int[]{-33});
|
|
rules[33] = new Rule(-27, new int[]{-18});
|
|
rules[34] = new Rule(-27, new int[]{-49});
|
|
rules[35] = new Rule(-49, new int[]{13,-43});
|
|
rules[36] = new Rule(-49, new int[]{14,-1,13,-43});
|
|
rules[37] = new Rule(-49, new int[]{14,-1,13,59});
|
|
rules[38] = new Rule(-23, new int[]{17});
|
|
rules[39] = new Rule(-33, new int[]{20,34,-17,35});
|
|
rules[40] = new Rule(-22, new int[]{15,-44});
|
|
rules[41] = new Rule(-1, new int[]{63});
|
|
rules[42] = new Rule(-6, new int[]{-1});
|
|
rules[43] = new Rule(-6, new int[]{-6,40,-1});
|
|
rules[44] = new Rule(-42, new int[]{-1,16,-1});
|
|
rules[45] = new Rule(-42, new int[]{-1});
|
|
rules[46] = new Rule(-43, new int[]{-42});
|
|
rules[47] = new Rule(-43, new int[]{-43,41,-42});
|
|
rules[48] = new Rule(-59, new int[]{-5,42,-5});
|
|
rules[49] = new Rule(-54, new int[]{-59});
|
|
rules[50] = new Rule(-54, new int[]{-54,41,-59});
|
|
rules[51] = new Rule(-24, new int[]{-9,42,-46});
|
|
rules[52] = new Rule(-24, new int[]{-9,42,-46,46,-5});
|
|
rules[53] = new Rule(-66, new int[]{-5});
|
|
rules[54] = new Rule(-66, new int[]{-67});
|
|
rules[55] = new Rule(-25, new int[]{-9,46,-66});
|
|
rules[56] = new Rule(-25, new int[]{-9,-58,-66});
|
|
rules[57] = new Rule(-25, new int[]{34,-9,41,-57,35,46,-66});
|
|
rules[58] = new Rule(-25, new int[]{-9,41,-57,46,-66});
|
|
rules[59] = new Rule(-58, new int[]{47});
|
|
rules[60] = new Rule(-58, new int[]{48});
|
|
rules[61] = new Rule(-58, new int[]{49});
|
|
rules[62] = new Rule(-58, new int[]{50});
|
|
rules[63] = new Rule(-58, new int[]{51});
|
|
rules[64] = new Rule(-58, new int[]{52});
|
|
rules[65] = new Rule(-58, new int[]{53});
|
|
rules[66] = new Rule(-58, new int[]{54});
|
|
rules[67] = new Rule(-58, new int[]{55});
|
|
rules[68] = new Rule(-58, new int[]{56});
|
|
rules[69] = new Rule(-5, new int[]{-5,6,-5,7,-5});
|
|
rules[70] = new Rule(-5, new int[]{-5,57,-5});
|
|
rules[71] = new Rule(-5, new int[]{-5,59,-5});
|
|
rules[72] = new Rule(-5, new int[]{-5,60,-5});
|
|
rules[73] = new Rule(-5, new int[]{-5,58,-5});
|
|
rules[74] = new Rule(-5, new int[]{-5,64,-5});
|
|
rules[75] = new Rule(-5, new int[]{-5,65,-5});
|
|
rules[76] = new Rule(-5, new int[]{-5,66,-5});
|
|
rules[77] = new Rule(-5, new int[]{-5,67,-5});
|
|
rules[78] = new Rule(-5, new int[]{-5,68,-5});
|
|
rules[79] = new Rule(-5, new int[]{-5,69,-5});
|
|
rules[80] = new Rule(-5, new int[]{-5,70,-5});
|
|
rules[81] = new Rule(-5, new int[]{-5,71,-5});
|
|
rules[82] = new Rule(-5, new int[]{-5,61,-5});
|
|
rules[83] = new Rule(-5, new int[]{-5,62,-5});
|
|
rules[84] = new Rule(-5, new int[]{-5,76,-5});
|
|
rules[85] = new Rule(-5, new int[]{-5,77,-5});
|
|
rules[86] = new Rule(-5, new int[]{-5,78,-5});
|
|
rules[87] = new Rule(-5, new int[]{-5,79,-5});
|
|
rules[88] = new Rule(-5, new int[]{-5,75,-5});
|
|
rules[89] = new Rule(-5, new int[]{-5,73,-5});
|
|
rules[90] = new Rule(-5, new int[]{-5,4,-5});
|
|
rules[91] = new Rule(-5, new int[]{-5,72,4,-5});
|
|
rules[92] = new Rule(-5, new int[]{58,-5});
|
|
rules[93] = new Rule(-5, new int[]{72,-5});
|
|
rules[94] = new Rule(-5, new int[]{74,-5});
|
|
rules[95] = new Rule(-5, new int[]{-9});
|
|
rules[96] = new Rule(-5, new int[]{-8});
|
|
rules[97] = new Rule(-5, new int[]{-13});
|
|
rules[98] = new Rule(-5, new int[]{-14});
|
|
rules[99] = new Rule(-5, new int[]{-65});
|
|
rules[100] = new Rule(-5, new int[]{34,-5,35});
|
|
rules[101] = new Rule(-65, new int[]{34,-5,41,-34,35});
|
|
rules[102] = new Rule(-67, new int[]{-5,41,-34});
|
|
rules[103] = new Rule(-14, new int[]{-9,22,-46});
|
|
rules[104] = new Rule(-13, new int[]{21,-46,34,-17,35});
|
|
rules[105] = new Rule(-8, new int[]{28});
|
|
rules[106] = new Rule(-8, new int[]{29});
|
|
rules[107] = new Rule(-8, new int[]{30});
|
|
rules[108] = new Rule(-8, new int[]{31});
|
|
rules[109] = new Rule(-8, new int[]{45});
|
|
rules[110] = new Rule(-8, new int[]{33});
|
|
rules[111] = new Rule(-8, new int[]{32});
|
|
rules[112] = new Rule(-34, new int[]{-5});
|
|
rules[113] = new Rule(-34, new int[]{-34,41,-5});
|
|
rules[114] = new Rule(-26, new int[]{6,-5,42,-36,-32});
|
|
rules[115] = new Rule(-32, new int[]{8,-5,42,-36,-32});
|
|
rules[116] = new Rule(-32, new int[]{-31});
|
|
rules[117] = new Rule(-31, new int[]{7,42,-36});
|
|
rules[118] = new Rule(-31, new int[]{});
|
|
rules[119] = new Rule(-29, new int[]{5,-5,42,-36});
|
|
rules[120] = new Rule(-30, new int[]{3,-1,4,-5,42,-36});
|
|
rules[121] = new Rule(-30, new int[]{3,-1,41,-44,4,-5,42,-36});
|
|
rules[122] = new Rule(-44, new int[]{-1});
|
|
rules[123] = new Rule(-44, new int[]{-44,41,-1});
|
|
rules[124] = new Rule(-2, new int[]{-1});
|
|
rules[125] = new Rule(-19, new int[]{10,-66});
|
|
rules[126] = new Rule(-19, new int[]{10});
|
|
rules[127] = new Rule(-20, new int[]{11});
|
|
rules[128] = new Rule(-21, new int[]{12});
|
|
rules[129] = new Rule(-28, new int[]{-7});
|
|
rules[130] = new Rule(-9, new int[]{-1});
|
|
rules[131] = new Rule(-9, new int[]{-7});
|
|
rules[132] = new Rule(-9, new int[]{-9,40,-1});
|
|
rules[133] = new Rule(-9, new int[]{-8,40,-1});
|
|
rules[134] = new Rule(-9, new int[]{-60});
|
|
rules[135] = new Rule(-9, new int[]{-61});
|
|
rules[136] = new Rule(-9, new int[]{-62});
|
|
rules[137] = new Rule(-9, new int[]{-9,38,-5,39});
|
|
rules[138] = new Rule(-9, new int[]{38,-63,39});
|
|
rules[139] = new Rule(-9, new int[]{36,-63,37});
|
|
rules[140] = new Rule(-9, new int[]{36,-64,37});
|
|
rules[141] = new Rule(-57, new int[]{-9});
|
|
rules[142] = new Rule(-57, new int[]{-57,41,-9});
|
|
rules[143] = new Rule(-63, new int[]{-5,3,-1,4,-5,-10});
|
|
rules[144] = new Rule(-64, new int[]{-59,3,-1,4,-5,-10});
|
|
rules[145] = new Rule(-62, new int[]{36,-54,37});
|
|
rules[146] = new Rule(-62, new int[]{36,37});
|
|
rules[147] = new Rule(-61, new int[]{36,-34,37});
|
|
rules[148] = new Rule(-60, new int[]{38,-34,39});
|
|
rules[149] = new Rule(-60, new int[]{38,39});
|
|
rules[150] = new Rule(-10, new int[]{});
|
|
rules[151] = new Rule(-10, new int[]{6,-5});
|
|
rules[152] = new Rule(-36, new int[]{23,-35,-56,24});
|
|
rules[153] = new Rule(-18, new int[]{-45,-36});
|
|
rules[154] = new Rule(-45, new int[]{9,-2,34,-41,35,42});
|
|
rules[155] = new Rule(-45, new int[]{9,-2,34,-41,35,44,-46,42});
|
|
rules[156] = new Rule(-7, new int[]{-9,34,-17,35});
|
|
rules[157] = new Rule(-47, new int[]{-1});
|
|
rules[158] = new Rule(-47, new int[]{-47,40,-1});
|
|
rules[159] = new Rule(-46, new int[]{-47});
|
|
rules[160] = new Rule(-46, new int[]{-48});
|
|
rules[161] = new Rule(-48, new int[]{-47,-50});
|
|
rules[162] = new Rule(-50, new int[]{38,-51,39});
|
|
rules[163] = new Rule(-51, new int[]{-46});
|
|
rules[164] = new Rule(-51, new int[]{-51,41,-46});
|
|
rules[165] = new Rule(-38, new int[]{-1});
|
|
rules[166] = new Rule(-39, new int[]{-38,42,-46});
|
|
rules[167] = new Rule(-39, new int[]{59,-38,42,-46});
|
|
rules[168] = new Rule(-39, new int[]{73,-38,42,-46});
|
|
rules[169] = new Rule(-40, new int[]{-39});
|
|
rules[170] = new Rule(-40, new int[]{-40,41,-39});
|
|
rules[171] = new Rule(-41, new int[]{-40});
|
|
rules[172] = new Rule(-41, new int[]{});
|
|
rules[173] = new Rule(-11, new int[]{-5});
|
|
rules[174] = new Rule(-11, new int[]{-1,46,-5});
|
|
rules[175] = new Rule(-16, new int[]{-11});
|
|
rules[176] = new Rule(-16, new int[]{-16,41,-11});
|
|
rules[177] = new Rule(-17, new int[]{-16});
|
|
rules[178] = new Rule(-17, new int[]{-63});
|
|
rules[179] = new Rule(-17, new int[]{});
|
|
rules[180] = new Rule(-56, new int[]{26});
|
|
rules[181] = new Rule(-56, new int[]{43});
|
|
rules[182] = new Rule(-55, new int[]{43});
|
|
rules[183] = new Rule(-55, 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 -> extended_new_expr
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 10: // extended_new_expr -> new_expr
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 11: // extended_new_expr -> NEW, type_ref
|
|
{
|
|
CurrentSemanticValue.ex = new new_expr(ValueStack[ValueStack.Depth-1].td, null, false, null, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 12: // type_decl_identifier -> ident
|
|
{
|
|
CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id;
|
|
}
|
|
break;
|
|
case 13: // 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 14: // variable_as_type -> dotted_ident
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 15: // 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 16: // stmt_or_expression -> expr
|
|
{ CurrentSemanticValue.stn = new expression_as_statement(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan);}
|
|
break;
|
|
case 17: // stmt_or_expression -> assign_stmt
|
|
{ CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; }
|
|
break;
|
|
case 18: // stmt_or_expression -> var_stmt
|
|
{ CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; }
|
|
break;
|
|
case 19: // stmt_list -> stmt
|
|
{
|
|
CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 20: // 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 21: // stmt -> assign_stmt
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 22: // stmt -> var_stmt
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 23: // stmt -> if_stmt
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 24: // stmt -> proc_func_call_stmt
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 25: // stmt -> while_stmt
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 26: // stmt -> for_stmt
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 27: // stmt -> return_stmt
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 28: // stmt -> break_stmt
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 29: // stmt -> continue_stmt
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 30: // stmt -> global_stmt
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 31: // stmt -> pass_stmt
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 32: // stmt -> exit_stmt
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 33: // stmt -> proc_func_decl
|
|
{
|
|
CurrentSemanticValue.stn = new declarations_as_statement(new declarations(ValueStack[ValueStack.Depth-1].stn as procedure_definition, CurrentLocationSpan), CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 34: // stmt -> import_clause
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 35: // import_clause -> IMPORT, ident_as_ident_list
|
|
{
|
|
CurrentSemanticValue.stn = new import_statement(ValueStack[ValueStack.Depth-1].stn as as_statement_list, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 36: // 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 37: // import_clause -> FROM, ident, IMPORT, STAR
|
|
{
|
|
CurrentSemanticValue.stn = new from_import_statement(ValueStack[ValueStack.Depth-3].id as ident, true, null, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 38: // pass_stmt -> PASS
|
|
{
|
|
CurrentSemanticValue.stn = new empty_statement();
|
|
}
|
|
break;
|
|
case 39: // exit_stmt -> EXIT, LPAR, optional_act_param_list, RPAR
|
|
{
|
|
parserTools.AddErrorFromResource("UNSUPPORTED_CONSTRUCTION_{0}", CurrentLocationSpan, "exit");
|
|
}
|
|
break;
|
|
case 40: // global_stmt -> GLOBAL, ident_list
|
|
{
|
|
CurrentSemanticValue.stn = new global_statement(ValueStack[ValueStack.Depth-1].stn as ident_list, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 41: // ident -> ID
|
|
{
|
|
CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id;
|
|
}
|
|
break;
|
|
case 42: // dotted_ident -> ident
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id;
|
|
}
|
|
break;
|
|
case 43: // 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 44: // ident_as_ident -> ident, AS, ident
|
|
{
|
|
CurrentSemanticValue.stn = new as_statement(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 45: // ident_as_ident -> ident
|
|
{
|
|
CurrentSemanticValue.stn = new as_statement(ValueStack[ValueStack.Depth-1].id, ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 46: // ident_as_ident_list -> ident_as_ident
|
|
{
|
|
CurrentSemanticValue.stn = new as_statement_list(ValueStack[ValueStack.Depth-1].stn as as_statement, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 47: // 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 48: // 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 49: // expr_mapping_list -> expr_mapping
|
|
{
|
|
CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 50: // 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 51: // 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 52: // 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 53: // assign_right_part -> expr
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 54: // assign_right_part -> turbo_tuple_expr
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 55: // 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 56: // 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 57: // 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 58: // 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 59: // assign_type -> PLUSEQUAL
|
|
{
|
|
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
|
|
}
|
|
break;
|
|
case 60: // assign_type -> MINUSEQUAL
|
|
{
|
|
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
|
|
}
|
|
break;
|
|
case 61: // assign_type -> STAREQUAL
|
|
{
|
|
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
|
|
}
|
|
break;
|
|
case 62: // assign_type -> DIVEQUAL
|
|
{
|
|
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
|
|
}
|
|
break;
|
|
case 63: // assign_type -> BINXOREQUAL
|
|
{
|
|
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
|
|
}
|
|
break;
|
|
case 64: // assign_type -> SHLEQUAL
|
|
{
|
|
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
|
|
}
|
|
break;
|
|
case 65: // assign_type -> SHREQUAL
|
|
{
|
|
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
|
|
}
|
|
break;
|
|
case 66: // assign_type -> BINANDEQUAL
|
|
{
|
|
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
|
|
}
|
|
break;
|
|
case 67: // assign_type -> BINOREQUAL
|
|
{
|
|
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
|
|
}
|
|
break;
|
|
case 68: // assign_type -> INTDIVISIONEQUAL
|
|
{
|
|
CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op;
|
|
}
|
|
break;
|
|
case 69: // 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 70: // 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 71: // 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 72: // 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 73: // 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 74: // 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 75: // 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 76: // 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 77: // 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 78: // 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 79: // 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 80: // 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 81: // 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 82: // 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 83: // 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 84: // 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 85: // 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 86: // 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 87: // 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 88: // 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 89: // expr -> expr, STARSTAR, expr
|
|
{
|
|
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("!pow", CurrentLocationSpan, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex);
|
|
}
|
|
break;
|
|
case 90: // expr -> expr, IN, expr
|
|
{
|
|
CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, Operators.In, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 91: // 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 92: // expr -> MINUS, expr
|
|
{
|
|
CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 93: // 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 94: // expr -> BINNOT, expr
|
|
{
|
|
CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 95: // expr -> variable
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 96: // expr -> const_value
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 97: // expr -> new_expr
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 98: // expr -> is_expr
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 99: // expr -> tuple_expr
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 100: // expr -> LPAR, expr, RPAR
|
|
{
|
|
CurrentSemanticValue.ex = new bracket_expr(ValueStack[ValueStack.Depth-2].ex, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 101: // 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 102: // 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 103: // 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 104: // 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 105: // const_value -> INTNUM
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 106: // const_value -> REALNUM
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 107: // const_value -> TRUE
|
|
{
|
|
CurrentSemanticValue.ex = new ident("true", CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 108: // const_value -> FALSE
|
|
{
|
|
CurrentSemanticValue.ex = new ident("false", CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 109: // const_value -> STRINGNUM
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal;
|
|
}
|
|
break;
|
|
case 110: // const_value -> FSTRINGNUM
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 111: // const_value -> BIGINT
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 112: // expr_list -> expr
|
|
{
|
|
CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 113: // 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 114: // 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 115: // 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 116: // optional_elif -> optional_else
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 117: // optional_else -> ELSE, COLON, block
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 118: // optional_else -> /* empty */
|
|
{
|
|
CurrentSemanticValue.stn = null;
|
|
}
|
|
break;
|
|
case 119: // 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 120: // 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 121: // 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 122: // ident_list -> ident
|
|
{
|
|
CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 123: // 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 124: // func_name_ident -> ident
|
|
{
|
|
CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id;
|
|
}
|
|
break;
|
|
case 125: // return_stmt -> RETURN, assign_right_part
|
|
{
|
|
CurrentSemanticValue.stn = new return_statement(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 126: // return_stmt -> RETURN
|
|
{
|
|
CurrentSemanticValue.stn = new return_statement(null, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 127: // break_stmt -> BREAK
|
|
{
|
|
CurrentSemanticValue.stn = new procedure_call(new ident("break", CurrentLocationSpan), true, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 128: // continue_stmt -> CONTINUE
|
|
{
|
|
CurrentSemanticValue.stn = new procedure_call(new ident("continue", CurrentLocationSpan), true, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 129: // 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 130: // variable -> ident
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id;
|
|
}
|
|
break;
|
|
case 131: // variable -> proc_func_call
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 132: // 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 133: // 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 134: // variable -> list_constant
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 135: // variable -> set_constant
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 136: // variable -> dict_constant
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 137: // 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 138: // variable -> LBRACKET, generator_object, RBRACKET
|
|
{
|
|
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("list", ValueStack[ValueStack.Depth-2].ex.source_context, ValueStack[ValueStack.Depth-2].ex);
|
|
}
|
|
break;
|
|
case 139: // variable -> LBRACE, generator_object, RBRACE
|
|
{
|
|
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("set", ValueStack[ValueStack.Depth-2].ex.source_context, ValueStack[ValueStack.Depth-2].ex);
|
|
}
|
|
break;
|
|
case 140: // 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 141: // variable_list -> variable
|
|
{
|
|
CurrentSemanticValue.ob = new addressed_value_list(ValueStack[ValueStack.Depth-1].ex as addressed_value,LocationStack[LocationStack.Depth-1]);
|
|
}
|
|
break;
|
|
case 142: // 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 143: // 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 144: // 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 145: // dict_constant -> LBRACE, expr_mapping_list, RBRACE
|
|
{
|
|
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("dict", CurrentLocationSpan, (expression_list)ValueStack[ValueStack.Depth-2].stn);
|
|
}
|
|
break;
|
|
case 146: // dict_constant -> LBRACE, RBRACE
|
|
{
|
|
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("!empty_dict", CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 147: // 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 148: // 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 149: // list_constant -> LBRACKET, RBRACKET
|
|
{
|
|
CurrentSemanticValue.ex = SubtreeCreator.CreateMethodCall("!empty_list", CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 150: // optional_condition -> /* empty */
|
|
{
|
|
CurrentSemanticValue.ex = null;
|
|
}
|
|
break;
|
|
case 151: // optional_condition -> IF, expr
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 152: // 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 153: // 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 154: // 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 155: // 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 156: // 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 157: // simple_type_identifier -> ident
|
|
{
|
|
CurrentSemanticValue.td = new named_type_reference(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 158: // 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 159: // type_ref -> simple_type_identifier
|
|
{
|
|
CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td as named_type_reference;
|
|
}
|
|
break;
|
|
case 160: // type_ref -> template_type
|
|
{
|
|
CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td;
|
|
}
|
|
break;
|
|
case 161: // 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 162: // template_type_params -> LBRACKET, template_param_list, RBRACKET
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn;
|
|
CurrentSemanticValue.stn.source_context = CurrentLocationSpan;
|
|
}
|
|
break;
|
|
case 163: // template_param_list -> type_ref
|
|
{
|
|
CurrentSemanticValue.stn = new template_param_list(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 164: // 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 165: // param_name -> ident
|
|
{
|
|
CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 166: // 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 167: // 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 168: // 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 169: // form_param_list -> form_param_sect
|
|
{
|
|
CurrentSemanticValue.stn = new formal_parameters(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 170: // 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 171: // optional_form_param_list -> form_param_list
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 172: // optional_form_param_list -> /* empty */
|
|
{
|
|
CurrentSemanticValue.stn = null;
|
|
}
|
|
break;
|
|
case 173: // act_param -> expr
|
|
{
|
|
CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;
|
|
}
|
|
break;
|
|
case 174: // act_param -> ident, ASSIGN, expr
|
|
{
|
|
CurrentSemanticValue.ex = new name_assign_expr(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 175: // act_param_list -> act_param
|
|
{
|
|
CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 176: // 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 177: // optional_act_param_list -> act_param_list
|
|
{
|
|
CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn;
|
|
}
|
|
break;
|
|
case 178: // optional_act_param_list -> generator_object
|
|
{
|
|
CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
|
|
}
|
|
break;
|
|
case 179: // optional_act_param_list -> /* empty */
|
|
{
|
|
CurrentSemanticValue.stn = null;
|
|
}
|
|
break;
|
|
case 180: // end_of_line -> END_OF_LINE
|
|
{
|
|
CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ti;
|
|
}
|
|
break;
|
|
case 181: // end_of_line -> SEMICOLON
|
|
{
|
|
CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ti;
|
|
}
|
|
break;
|
|
case 182: // optional_semicolon -> SEMICOLON
|
|
{
|
|
CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ti;
|
|
}
|
|
break;
|
|
case 183: // 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;
|
|
}
|
|
}
|
|
}
|