Исправления конфликтов в грамматике ::

Исправлен баг #99
This commit is contained in:
miks1965 2016-04-03 22:04:35 +03:00
parent 8d7c9fca46
commit 75836746bf
21 changed files with 293 additions and 425 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "1";
public const string Build = "0";
public const string Revision = "1207";
public const string Revision = "1211";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%COREVERSION%=0
%REVISION%=1207
%REVISION%=1211
%MINOR%=1
%MAJOR%=3

Binary file not shown.

View file

@ -2,7 +2,7 @@
// This CSharp output file generated by Gardens Point LEX
// Version: 1.1.3.301
// Machine: SSM
// DateTime: 16.03.2016 1:44:10
// DateTime: 03.04.2016 21:59:35
// UserName: ?????????
// GPLEX input file <ABCPascal.lex>
// GPLEX frame file <embedded resource>

View file

@ -1932,6 +1932,8 @@ proc_func_decl_noclass
}
| tkProcedure proc_name fp_list tkAssign unlabelled_stmt tkSemiColon
{
if ($5 is empty_statement)
parsertools.AddErrorFromResource("EMPTY_STATEMENT_IN_SHORT_PROC_DEFINITION",@6);
$$ = SyntaxTreeBuilder.BuildShortProcDefinition($3 as formal_parameters, new procedure_attributes_list(), $2 as method_name, $5 as statement, @1.Merge(@3));
}
| proc_func_header tkForward tkSemiColon
@ -2782,7 +2784,7 @@ simple_expr_or_nothing
}
|
{
$$ = null;
$$ = new int32_const(int.MaxValue);
}
;
@ -2791,9 +2793,9 @@ format_expr
{
$$ = new format_expr($1, $3, null, @$);
}
| tkColon simple_expr
| tkColon simple_expr_or_nothing
{
$$ = new format_expr(null, $2, null, @$);
$$ = new format_expr(new int32_const(int.MaxValue), $2, null, @$);
}
| simple_expr tkColon simple_expr_or_nothing tkColon simple_expr
{
@ -2801,7 +2803,7 @@ format_expr
}
| tkColon simple_expr_or_nothing tkColon simple_expr
{
$$ = new format_expr(null, $2, $4, @$);
$$ = new format_expr(new int32_const(int.MaxValue), $2, $4, @$);
}
;

View file

@ -2,7 +2,7 @@
// GPPG version 1.3.6
// Machine: SSM
// DateTime: 16.03.2016 1:44:11
// DateTime: 03.04.2016 21:59:36
// UserName: ?????????
// Input file <D:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y>
@ -74,7 +74,7 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
private static Dictionary<int, string> aliasses;
#pragma warning restore 649
private static Rule[] rules = new Rule[794];
private static State[] states = new State[1263];
private static State[] states = new State[1262];
private static string[] nonTerms = new string[] {
"parse_goal", "unit_key_word", "assignment", "optional_array_initializer",
"attribute_declarations", "ot_visibility_specifier", "one_attribute", "attribute_variable",
@ -150,13 +150,13 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
"rem_lambda", "variable_list", "tkAssignOrEqual", "$accept", };
static GPPGParser() {
states[0] = new State(new int[]{53,1176,11,646,77,1247,79,1249,78,1256,3,-24,44,-24,80,-24,51,-24,23,-24,59,-24,42,-24,45,-24,54,-24,36,-24,31,-24,21,-24,24,-24,25,-24,94,-195,95,-195},new int[]{-1,1,-204,3,-205,4,-267,1188,-5,1189,-219,658,-149,1246});
states[0] = new State(new int[]{53,1175,11,646,77,1246,79,1248,78,1255,3,-24,44,-24,80,-24,51,-24,23,-24,59,-24,42,-24,45,-24,54,-24,36,-24,31,-24,21,-24,24,-24,25,-24,94,-195,95,-195},new int[]{-1,1,-204,3,-205,4,-267,1187,-5,1188,-219,658,-149,1245});
states[1] = new State(new int[]{2,2});
states[2] = new State(-1);
states[3] = new State(-2);
states[4] = new State(new int[]{3,1172,44,-11,80,-11,51,-11,23,-11,59,-11,42,-11,45,-11,54,-11,11,-11,36,-11,31,-11,21,-11,24,-11,25,-11},new int[]{-159,5,-160,1170,-158,1175});
states[4] = new State(new int[]{3,1171,44,-11,80,-11,51,-11,23,-11,59,-11,42,-11,45,-11,54,-11,11,-11,36,-11,31,-11,21,-11,24,-11,25,-11},new int[]{-159,5,-160,1169,-158,1174});
states[5] = new State(-35,new int[]{-265,6});
states[6] = new State(new int[]{44,14,51,-58,23,-58,59,-58,42,-58,45,-58,54,-58,11,-58,36,-58,31,-58,21,-58,24,-58,25,-58,80,-58},new int[]{-15,7,-32,108,-36,1117,-37,1118});
states[6] = new State(new int[]{44,14,51,-58,23,-58,59,-58,42,-58,45,-58,54,-58,11,-58,36,-58,31,-58,21,-58,24,-58,25,-58,80,-58},new int[]{-15,7,-32,108,-36,1116,-37,1117});
states[7] = new State(new int[]{7,9,10,10,5,11,89,12,6,13,2,-23},new int[]{-162,8});
states[8] = new State(-17);
states[9] = new State(-18);
@ -317,7 +317,7 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
states[164] = new State(-232);
states[165] = new State(-219);
states[166] = new State(-216);
states[167] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288,5,304,12,-621},new int[]{-61,168,-69,170,-79,1116,-77,173,-85,120,-84,125,-86,176,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301,-210,302,-96,303});
states[167] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288,5,304,12,-621},new int[]{-61,168,-69,170,-79,1115,-77,173,-85,120,-84,125,-86,176,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301,-210,302,-96,303});
states[168] = new State(new int[]{12,169});
states[169] = new State(-589);
states[170] = new State(new int[]{89,171,12,-620});
@ -327,7 +327,7 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
states[174] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288,5,304},new int[]{-77,175,-85,120,-84,125,-86,176,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301,-210,302,-96,303});
states[175] = new State(-625);
states[176] = new State(new int[]{5,177,104,181,103,182,115,183,116,184,113,185,81,-548,10,-548,87,-548,90,-548,27,-548,93,-548,106,-548,105,-548,118,-548,119,-548,120,-548,121,-548,117,-548,123,-548,125,-548,14,-548,107,-548,112,-548,110,-548,108,-548,111,-548,109,-548,124,-548,13,-548,6,-548,89,-548,12,-548,9,-548,88,-548,26,-548,2,-548,74,-548,73,-548,72,-548,71,-548,43,-548,50,-548,128,-548,130,-548,75,-548,76,-548,70,-548,68,-548,37,-548,34,-548,8,-548,16,-548,17,-548,131,-548,132,-548,140,-548,142,-548,141,-548,49,-548,80,-548,32,-548,20,-548,86,-548,46,-548,29,-548,47,-548,91,-548,39,-548,30,-548,45,-548,52,-548,67,-548,63,-548,64,-548},new int[]{-171,128});
states[177] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288,81,-552,10,-552,87,-552,90,-552,27,-552,93,-552,106,-552,105,-552,118,-552,119,-552,120,-552,121,-552,117,-552,123,-552,125,-552,5,-552,115,-552,116,-552,113,-552,14,-552,107,-552,112,-552,110,-552,108,-552,111,-552,109,-552,124,-552,13,-552,6,-552,89,-552,12,-552,9,-552,88,-552,26,-552,2,-552,74,-552,73,-552,72,-552,71,-552,43,-552,50,-552,49,-552,80,-552,32,-552,20,-552,86,-552,46,-552,29,-552,47,-552,91,-552,39,-552,30,-552,45,-552,52,-552,67,-552,63,-552,64,-552},new int[]{-94,178,-86,1115,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301});
states[177] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288,81,-552,10,-552,87,-552,90,-552,27,-552,93,-552,106,-552,105,-552,118,-552,119,-552,120,-552,121,-552,117,-552,123,-552,125,-552,5,-552,115,-552,116,-552,113,-552,14,-552,107,-552,112,-552,110,-552,108,-552,111,-552,109,-552,124,-552,13,-552,6,-552,89,-552,12,-552,9,-552,88,-552,26,-552,2,-552,74,-552,73,-552,72,-552,71,-552,43,-552,50,-552,49,-552,80,-552,32,-552,20,-552,86,-552,46,-552,29,-552,47,-552,91,-552,39,-552,30,-552,45,-552,52,-552,67,-552,63,-552,64,-552},new int[]{-94,178,-86,308,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301});
states[178] = new State(new int[]{5,179,81,-553,10,-553,87,-553,90,-553,27,-553,93,-553,106,-553,105,-553,118,-553,119,-553,120,-553,121,-553,117,-553,123,-553,125,-553,104,-553,103,-553,115,-553,116,-553,113,-553,14,-553,107,-553,112,-553,110,-553,108,-553,111,-553,109,-553,124,-553,13,-553,6,-553,89,-553,12,-553,9,-553,88,-553,26,-553,2,-553,74,-553,73,-553,72,-553,71,-553,43,-553,50,-553,128,-553,130,-553,75,-553,76,-553,70,-553,68,-553,37,-553,34,-553,8,-553,16,-553,17,-553,131,-553,132,-553,140,-553,142,-553,141,-553,49,-553,80,-553,32,-553,20,-553,86,-553,46,-553,29,-553,47,-553,91,-553,39,-553,30,-553,45,-553,52,-553,67,-553,63,-553,64,-553});
states[179] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288},new int[]{-86,180,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301});
states[180] = new State(new int[]{104,181,103,182,115,183,116,184,113,185,81,-555,10,-555,87,-555,90,-555,27,-555,93,-555,106,-555,105,-555,118,-555,119,-555,120,-555,121,-555,117,-555,123,-555,125,-555,5,-555,14,-555,107,-555,112,-555,110,-555,108,-555,111,-555,109,-555,124,-555,13,-555,6,-555,89,-555,12,-555,9,-555,88,-555,26,-555,2,-555,74,-555,73,-555,72,-555,71,-555,43,-555,50,-555,128,-555,130,-555,75,-555,76,-555,70,-555,68,-555,37,-555,34,-555,8,-555,16,-555,17,-555,131,-555,132,-555,140,-555,142,-555,141,-555,49,-555,80,-555,32,-555,20,-555,86,-555,46,-555,29,-555,47,-555,91,-555,39,-555,30,-555,45,-555,52,-555,67,-555,63,-555,64,-555},new int[]{-171,128});
@ -454,11 +454,11 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
states[301] = new State(-577);
states[302] = new State(-528);
states[303] = new State(-526);
states[304] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288,5,-552},new int[]{-86,305,-94,306,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301});
states[305] = new State(new int[]{104,181,103,182,115,183,116,184,113,185,81,-554,10,-554,87,-554,90,-554,27,-554,93,-554,106,-554,105,-554,118,-554,119,-554,120,-554,121,-554,117,-554,123,-554,125,-554,5,-551,14,-554,107,-554,112,-554,110,-554,108,-554,111,-554,109,-554,124,-554,13,-554,6,-554,89,-554,12,-554,9,-554,88,-554,26,-554,2,-554,74,-554,73,-554,72,-554,71,-554,43,-554,50,-554,128,-554,130,-554,75,-554,76,-554,70,-554,68,-554,37,-554,34,-554,8,-554,16,-554,17,-554,131,-554,132,-554,140,-554,142,-554,141,-554,49,-554,80,-554,32,-554,20,-554,86,-554,46,-554,29,-554,47,-554,91,-554,39,-554,30,-554,45,-554,52,-554,67,-554,63,-554,64,-554},new int[]{-171,128});
states[306] = new State(new int[]{5,307});
states[307] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288},new int[]{-86,308,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301});
states[308] = new State(new int[]{104,181,103,182,115,183,116,184,113,185,81,-556,10,-556,87,-556,90,-556,27,-556,93,-556,106,-556,105,-556,118,-556,119,-556,120,-556,121,-556,117,-556,123,-556,125,-556,5,-556,14,-556,107,-556,112,-556,110,-556,108,-556,111,-556,109,-556,124,-556,13,-556,6,-556,89,-556,12,-556,9,-556,88,-556,26,-556,2,-556,74,-556,73,-556,72,-556,71,-556,43,-556,50,-556,128,-556,130,-556,75,-556,76,-556,70,-556,68,-556,37,-556,34,-556,8,-556,16,-556,17,-556,131,-556,132,-556,140,-556,142,-556,141,-556,49,-556,80,-556,32,-556,20,-556,86,-556,46,-556,29,-556,47,-556,91,-556,39,-556,30,-556,45,-556,52,-556,67,-556,63,-556,64,-556},new int[]{-171,128});
states[304] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288,81,-552,10,-552,87,-552,90,-552,27,-552,93,-552,106,-552,105,-552,118,-552,119,-552,120,-552,121,-552,117,-552,123,-552,125,-552,5,-552,115,-552,116,-552,113,-552,14,-552,107,-552,112,-552,110,-552,108,-552,111,-552,109,-552,124,-552,13,-552,6,-552,89,-552,12,-552,9,-552,88,-552,26,-552,2,-552,74,-552,73,-552,72,-552,71,-552,43,-552,50,-552,49,-552,80,-552,32,-552,20,-552,86,-552,46,-552,29,-552,47,-552,91,-552,39,-552,30,-552,45,-552,52,-552,67,-552,63,-552,64,-552},new int[]{-94,305,-86,308,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301});
states[305] = new State(new int[]{5,306,81,-554,10,-554,87,-554,90,-554,27,-554,93,-554,106,-554,105,-554,118,-554,119,-554,120,-554,121,-554,117,-554,123,-554,125,-554,104,-554,103,-554,115,-554,116,-554,113,-554,14,-554,107,-554,112,-554,110,-554,108,-554,111,-554,109,-554,124,-554,13,-554,6,-554,89,-554,12,-554,9,-554,88,-554,26,-554,2,-554,74,-554,73,-554,72,-554,71,-554,43,-554,50,-554,128,-554,130,-554,75,-554,76,-554,70,-554,68,-554,37,-554,34,-554,8,-554,16,-554,17,-554,131,-554,132,-554,140,-554,142,-554,141,-554,49,-554,80,-554,32,-554,20,-554,86,-554,46,-554,29,-554,47,-554,91,-554,39,-554,30,-554,45,-554,52,-554,67,-554,63,-554,64,-554});
states[306] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288},new int[]{-86,307,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301});
states[307] = new State(new int[]{104,181,103,182,115,183,116,184,113,185,81,-556,10,-556,87,-556,90,-556,27,-556,93,-556,106,-556,105,-556,118,-556,119,-556,120,-556,121,-556,117,-556,123,-556,125,-556,5,-556,14,-556,107,-556,112,-556,110,-556,108,-556,111,-556,109,-556,124,-556,13,-556,6,-556,89,-556,12,-556,9,-556,88,-556,26,-556,2,-556,74,-556,73,-556,72,-556,71,-556,43,-556,50,-556,128,-556,130,-556,75,-556,76,-556,70,-556,68,-556,37,-556,34,-556,8,-556,16,-556,17,-556,131,-556,132,-556,140,-556,142,-556,141,-556,49,-556,80,-556,32,-556,20,-556,86,-556,46,-556,29,-556,47,-556,91,-556,39,-556,30,-556,45,-556,52,-556,67,-556,63,-556,64,-556},new int[]{-171,128});
states[308] = new State(new int[]{104,181,103,182,115,183,116,184,113,185,81,-551,10,-551,87,-551,90,-551,27,-551,93,-551,106,-551,105,-551,118,-551,119,-551,120,-551,121,-551,117,-551,123,-551,125,-551,5,-551,14,-551,107,-551,112,-551,110,-551,108,-551,111,-551,109,-551,124,-551,13,-551,6,-551,89,-551,12,-551,9,-551,88,-551,26,-551,2,-551,74,-551,73,-551,72,-551,71,-551,43,-551,50,-551,128,-551,130,-551,75,-551,76,-551,70,-551,68,-551,37,-551,34,-551,8,-551,16,-551,17,-551,131,-551,132,-551,140,-551,142,-551,141,-551,49,-551,80,-551,32,-551,20,-551,86,-551,46,-551,29,-551,47,-551,91,-551,39,-551,30,-551,45,-551,52,-551,67,-551,63,-551,64,-551},new int[]{-171,128});
states[309] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,37,234,34,263,8,319,16,273,17,278,131,139,132,140,140,143,142,144,141,145},new int[]{-92,310,-119,292,-124,24,-125,27,-165,233,-226,272,-259,277,-13,320,-138,136,-140,137,-139,141,-14,142});
states[310] = new State(new int[]{11,210,8,217,7,311,129,316,4,317,9,-467,89,-467});
states[311] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,74,32,73,33,72,34,71,35,61,36,56,37,115,38,17,39,16,40,55,41,18,42,116,43,117,44,118,45,119,46,120,47,121,48,122,49,123,50,124,51,125,52,19,53,66,54,80,55,20,56,21,57,23,58,24,59,25,60,64,61,88,62,26,63,27,64,28,65,22,66,93,67,90,68,29,69,30,70,31,71,32,72,33,73,34,74,92,75,35,76,36,77,38,78,39,79,40,80,86,81,41,82,91,83,42,84,43,85,63,86,87,87,44,88,45,89,46,90,47,91,48,92,49,93,50,94,51,95,53,96,94,97,95,98,96,99,97,100,37,234},new int[]{-120,312,-119,313,-124,24,-125,27,-257,314,-123,31,-165,315});
@ -1265,154 +1265,153 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
states[1112] = new State(-545);
states[1113] = new State(new int[]{50,938});
states[1114] = new State(-600);
states[1115] = new State(new int[]{104,181,103,182,115,183,116,184,113,185,81,-551,10,-551,87,-551,90,-551,27,-551,93,-551,106,-551,105,-551,118,-551,119,-551,120,-551,121,-551,117,-551,123,-551,125,-551,5,-551,14,-551,107,-551,112,-551,110,-551,108,-551,111,-551,109,-551,124,-551,13,-551,6,-551,89,-551,12,-551,9,-551,88,-551,26,-551,2,-551,74,-551,73,-551,72,-551,71,-551,43,-551,50,-551,128,-551,130,-551,75,-551,76,-551,70,-551,68,-551,37,-551,34,-551,8,-551,16,-551,17,-551,131,-551,132,-551,140,-551,142,-551,141,-551,49,-551,80,-551,32,-551,20,-551,86,-551,46,-551,29,-551,47,-551,91,-551,39,-551,30,-551,45,-551,52,-551,67,-551,63,-551,64,-551},new int[]{-171,128});
states[1116] = new State(-622);
states[1117] = new State(-32);
states[1118] = new State(new int[]{51,690,23,739,59,743,42,924,45,930,54,932,11,646,80,-57,81,-57,92,-57,36,-195,31,-195,21,-195,24,-195,25,-195},new int[]{-41,1119,-141,1120,-24,1121,-46,1122,-253,1123,-270,1124,-190,1125,-5,1126,-219,658});
states[1119] = new State(-59);
states[1120] = new State(-69);
states[1121] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,51,-70,23,-70,59,-70,42,-70,45,-70,54,-70,11,-70,36,-70,31,-70,21,-70,24,-70,25,-70,80,-70,81,-70,92,-70},new int[]{-22,697,-23,698,-113,700,-119,738,-124,24,-125,27});
states[1122] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,51,-71,23,-71,59,-71,42,-71,45,-71,54,-71,11,-71,36,-71,31,-71,21,-71,24,-71,25,-71,80,-71,81,-71,92,-71},new int[]{-22,742,-23,698,-113,700,-119,738,-124,24,-125,27});
states[1123] = new State(new int[]{11,646,51,-72,23,-72,59,-72,42,-72,45,-72,54,-72,36,-72,31,-72,21,-72,24,-72,25,-72,80,-72,81,-72,92,-72,130,-195,75,-195,76,-195,70,-195,68,-195},new int[]{-43,746,-5,747,-219,658});
states[1124] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,51,-73,23,-73,59,-73,42,-73,45,-73,54,-73,11,-73,36,-73,31,-73,21,-73,24,-73,25,-73,80,-73,81,-73,92,-73},new int[]{-271,927,-272,928,-131,403,-119,671,-124,24,-125,27});
states[1125] = new State(-74);
states[1126] = new State(new int[]{36,1148,31,1154,21,1165,24,888,25,892,11,646},new int[]{-183,1127,-219,559,-184,1128,-191,1129,-198,1130,-195,780,-199,826,-187,1167,-197,1168});
states[1127] = new State(-77);
states[1128] = new State(-75);
states[1129] = new State(-382);
states[1130] = new State(new int[]{134,1132,96,1139,51,-58,23,-58,59,-58,42,-58,45,-58,54,-58,11,-58,36,-58,31,-58,21,-58,24,-58,25,-58,80,-58},new int[]{-152,1131,-151,1134,-36,1135,-37,1118,-54,1138});
states[1131] = new State(-384);
states[1132] = new State(new int[]{10,1133});
states[1133] = new State(-388);
states[1134] = new State(-395);
states[1135] = new State(new int[]{80,110},new int[]{-224,1136});
states[1136] = new State(new int[]{10,1137});
states[1137] = new State(-417);
states[1138] = new State(-396);
states[1139] = new State(new int[]{10,1147,130,23,75,25,76,26,70,28,68,29,131,139,132,140},new int[]{-89,1140,-119,1144,-124,24,-125,27,-138,1145,-140,137,-139,141});
states[1140] = new State(new int[]{70,1141,10,1146});
states[1141] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,131,139,132,140},new int[]{-89,1142,-119,1144,-124,24,-125,27,-138,1145,-140,137,-139,141});
states[1142] = new State(new int[]{10,1143});
states[1143] = new State(-412);
states[1144] = new State(-415);
states[1145] = new State(-416);
states[1146] = new State(-413);
states[1147] = new State(-414);
states[1148] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,37,234},new int[]{-144,1149,-143,661,-114,662,-109,663,-106,664,-119,672,-124,24,-125,27,-165,673,-293,675,-121,679});
states[1149] = new State(new int[]{8,579,98,-419,10,-419},new int[]{-100,1150});
states[1150] = new State(new int[]{98,1151,10,568},new int[]{-179,784});
states[1151] = new State(new int[]{128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,330,8,293,16,273,17,278,131,139,132,140,140,143,142,144,141,145,49,333,80,110,32,324,20,341,86,353,46,362,29,367,47,377,91,383,39,390,30,393,45,401,52,817,67,822,10,-443},new int[]{-230,1152,-3,116,-93,117,-104,208,-92,216,-119,292,-124,24,-125,27,-165,233,-226,272,-259,277,-13,320,-138,136,-140,137,-139,141,-14,142,-182,331,-105,332,-224,338,-126,339,-30,340,-216,352,-278,361,-98,366,-279,376,-133,381,-264,382,-217,389,-97,392,-274,400,-52,813,-148,814,-147,815,-142,816,-99,821});
states[1152] = new State(new int[]{10,1153});
states[1153] = new State(-387);
states[1154] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,37,234},new int[]{-143,1155,-114,662,-109,663,-106,664,-119,672,-124,24,-125,27,-165,673,-293,675,-121,679});
states[1155] = new State(new int[]{8,579,5,-419,98,-419,10,-419},new int[]{-100,1156});
states[1156] = new State(new int[]{5,1157,98,1162,10,568},new int[]{-179,830});
states[1157] = new State(new int[]{130,512,75,25,76,26,70,28,68,29,140,143,142,144,141,145,104,203,103,204,131,139,132,140,8,516,129,530,19,535,40,543,41,593,28,603,66,607,57,610,36,615,31,617},new int[]{-241,1158,-242,475,-238,476,-80,477,-87,506,-88,499,-154,507,-119,164,-124,24,-125,27,-14,495,-173,496,-138,498,-140,137,-139,141,-225,528,-218,529,-246,532,-247,533,-244,534,-236,541,-26,542,-233,592,-102,602,-103,606,-196,612,-194,613,-193,614,-263,621});
states[1158] = new State(new int[]{98,1159,10,568},new int[]{-179,834});
states[1159] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288},new int[]{-84,1160,-86,226,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301});
states[1160] = new State(new int[]{10,1161,14,840,107,842,112,843,110,844,108,845,111,846,109,847,124,848},new int[]{-170,126});
states[1161] = new State(-385);
states[1162] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288},new int[]{-84,1163,-86,226,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301});
states[1163] = new State(new int[]{10,1164,14,840,107,842,112,843,110,844,108,845,111,846,109,847,124,848},new int[]{-170,126});
states[1164] = new State(-386);
states[1165] = new State(new int[]{24,564,36,1148,31,1154},new int[]{-191,1166,-198,1130,-195,780,-199,826});
states[1166] = new State(-383);
states[1167] = new State(-76);
states[1168] = new State(-58,new int[]{-151,1169,-36,1135,-37,1118});
states[1169] = new State(-380);
states[1170] = new State(new int[]{3,1172,44,-12,80,-12,51,-12,23,-12,59,-12,42,-12,45,-12,54,-12,11,-12,36,-12,31,-12,21,-12,24,-12,25,-12,35,-12,81,-12,92,-12},new int[]{-158,1171});
states[1171] = new State(-14);
states[1172] = new State(new int[]{130,1173,131,1174});
states[1173] = new State(-15);
states[1174] = new State(-16);
states[1175] = new State(-13);
states[1176] = new State(new int[]{130,23,75,25,76,26,70,28,68,29},new int[]{-119,1177,-124,24,-125,27});
states[1177] = new State(new int[]{10,1179,8,1180},new int[]{-161,1178});
states[1178] = new State(-25);
states[1179] = new State(-26);
states[1180] = new State(new int[]{130,23,75,25,76,26,70,28,68,29},new int[]{-163,1181,-118,1187,-119,1186,-124,24,-125,27});
states[1181] = new State(new int[]{9,1182,89,1184});
states[1182] = new State(new int[]{10,1183});
states[1183] = new State(-27);
states[1184] = new State(new int[]{130,23,75,25,76,26,70,28,68,29},new int[]{-118,1185,-119,1186,-124,24,-125,27});
states[1185] = new State(-29);
states[1186] = new State(-30);
states[1187] = new State(-28);
states[1188] = new State(-3);
states[1189] = new State(new int[]{94,1244,95,1245,11,646},new int[]{-269,1190,-219,559,-2,1239});
states[1190] = new State(new int[]{35,1211,44,-35,51,-35,23,-35,59,-35,42,-35,45,-35,54,-35,11,-35,36,-35,31,-35,21,-35,24,-35,25,-35,81,-35,92,-35,80,-35},new int[]{-135,1191,-136,1208,-265,1237});
states[1191] = new State(new int[]{33,1205},new int[]{-134,1192});
states[1192] = new State(new int[]{81,1195,92,1196,80,1202},new int[]{-127,1193});
states[1193] = new State(new int[]{7,1194});
states[1194] = new State(-41);
states[1195] = new State(-50);
states[1196] = new State(new int[]{128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,330,8,293,16,273,17,278,131,139,132,140,140,359,142,144,141,360,49,333,80,110,32,324,20,341,86,353,46,362,29,367,47,377,91,383,39,390,30,393,45,401,52,817,67,822,81,-443,93,-443,10,-443},new int[]{-221,1197,-231,357,-230,115,-3,116,-93,117,-104,208,-92,216,-119,358,-124,24,-125,27,-165,233,-226,272,-259,277,-13,320,-138,136,-140,137,-139,141,-14,142,-182,331,-105,332,-224,338,-126,339,-30,340,-216,352,-278,361,-98,366,-279,376,-133,381,-264,382,-217,389,-97,392,-274,400,-52,813,-148,814,-147,815,-142,816,-99,821,-115,978});
states[1197] = new State(new int[]{81,1198,93,1199,10,113});
states[1198] = new State(-51);
states[1199] = new State(new int[]{128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,330,8,293,16,273,17,278,131,139,132,140,140,359,142,144,141,360,49,333,80,110,32,324,20,341,86,353,46,362,29,367,47,377,91,383,39,390,30,393,45,401,52,817,67,822,81,-443,10,-443},new int[]{-221,1200,-231,357,-230,115,-3,116,-93,117,-104,208,-92,216,-119,358,-124,24,-125,27,-165,233,-226,272,-259,277,-13,320,-138,136,-140,137,-139,141,-14,142,-182,331,-105,332,-224,338,-126,339,-30,340,-216,352,-278,361,-98,366,-279,376,-133,381,-264,382,-217,389,-97,392,-274,400,-52,813,-148,814,-147,815,-142,816,-99,821,-115,978});
states[1200] = new State(new int[]{81,1201,10,113});
states[1201] = new State(-52);
states[1202] = new State(new int[]{128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,330,8,293,16,273,17,278,131,139,132,140,140,359,142,144,141,360,49,333,80,110,32,324,20,341,86,353,46,362,29,367,47,377,91,383,39,390,30,393,45,401,52,817,67,822,81,-443,10,-443},new int[]{-221,1203,-231,357,-230,115,-3,116,-93,117,-104,208,-92,216,-119,358,-124,24,-125,27,-165,233,-226,272,-259,277,-13,320,-138,136,-140,137,-139,141,-14,142,-182,331,-105,332,-224,338,-126,339,-30,340,-216,352,-278,361,-98,366,-279,376,-133,381,-264,382,-217,389,-97,392,-274,400,-52,813,-148,814,-147,815,-142,816,-99,821,-115,978});
states[1203] = new State(new int[]{81,1204,10,113});
states[1204] = new State(-53);
states[1205] = new State(-35,new int[]{-265,1206});
states[1206] = new State(new int[]{44,14,51,-58,23,-58,59,-58,42,-58,45,-58,54,-58,11,-58,36,-58,31,-58,21,-58,24,-58,25,-58,81,-58,92,-58,80,-58},new int[]{-36,1207,-37,1118});
states[1207] = new State(-48);
states[1208] = new State(new int[]{81,1195,92,1196,80,1202},new int[]{-127,1209});
states[1209] = new State(new int[]{7,1210});
states[1210] = new State(-42);
states[1211] = new State(-35,new int[]{-265,1212});
states[1212] = new State(new int[]{44,14,23,-55,59,-55,42,-55,45,-55,54,-55,11,-55,36,-55,31,-55,33,-55},new int[]{-35,1213,-33,1214});
states[1213] = new State(-47);
states[1214] = new State(new int[]{23,739,59,743,42,924,45,930,54,932,11,646,33,-54,36,-195,31,-195},new int[]{-42,1215,-24,1216,-46,1217,-253,1218,-270,1219,-202,1220,-5,1221,-219,658,-201,1236});
states[1215] = new State(-56);
states[1216] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,23,-63,59,-63,42,-63,45,-63,54,-63,11,-63,36,-63,31,-63,33,-63},new int[]{-22,697,-23,698,-113,700,-119,738,-124,24,-125,27});
states[1217] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,23,-64,59,-64,42,-64,45,-64,54,-64,11,-64,36,-64,31,-64,33,-64},new int[]{-22,742,-23,698,-113,700,-119,738,-124,24,-125,27});
states[1218] = new State(new int[]{11,646,23,-65,59,-65,42,-65,45,-65,54,-65,36,-65,31,-65,33,-65,130,-195,75,-195,76,-195,70,-195,68,-195},new int[]{-43,746,-5,747,-219,658});
states[1219] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,23,-66,59,-66,42,-66,45,-66,54,-66,11,-66,36,-66,31,-66,33,-66},new int[]{-271,927,-272,928,-131,403,-119,671,-124,24,-125,27});
states[1220] = new State(-67);
states[1221] = new State(new int[]{36,1228,11,646,31,1231},new int[]{-195,1222,-219,559,-199,1225});
states[1222] = new State(new int[]{134,1223,23,-83,59,-83,42,-83,45,-83,54,-83,11,-83,36,-83,31,-83,33,-83});
states[1223] = new State(new int[]{10,1224});
states[1224] = new State(-84);
states[1225] = new State(new int[]{134,1226,23,-85,59,-85,42,-85,45,-85,54,-85,11,-85,36,-85,31,-85,33,-85});
states[1226] = new State(new int[]{10,1227});
states[1227] = new State(-86);
states[1228] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,37,234},new int[]{-144,1229,-143,661,-114,662,-109,663,-106,664,-119,672,-124,24,-125,27,-165,673,-293,675,-121,679});
states[1229] = new State(new int[]{8,579,10,-419},new int[]{-100,1230});
states[1230] = new State(new int[]{10,568},new int[]{-179,784});
states[1231] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,37,234},new int[]{-143,1232,-114,662,-109,663,-106,664,-119,672,-124,24,-125,27,-165,673,-293,675,-121,679});
states[1232] = new State(new int[]{8,579,5,-419,10,-419},new int[]{-100,1233});
states[1233] = new State(new int[]{5,1234,10,568},new int[]{-179,830});
states[1234] = new State(new int[]{130,512,75,25,76,26,70,28,68,29,140,143,142,144,141,145,104,203,103,204,131,139,132,140,8,516,129,530,19,535,40,543,41,593,28,603,66,607,57,610,36,615,31,617},new int[]{-241,1235,-242,475,-238,476,-80,477,-87,506,-88,499,-154,507,-119,164,-124,24,-125,27,-14,495,-173,496,-138,498,-140,137,-139,141,-225,528,-218,529,-246,532,-247,533,-244,534,-236,541,-26,542,-233,592,-102,602,-103,606,-196,612,-194,613,-193,614,-263,621});
states[1235] = new State(new int[]{10,568},new int[]{-179,834});
states[1236] = new State(-68);
states[1237] = new State(new int[]{44,14,51,-58,23,-58,59,-58,42,-58,45,-58,54,-58,11,-58,36,-58,31,-58,21,-58,24,-58,25,-58,81,-58,92,-58,80,-58},new int[]{-36,1238,-37,1118});
states[1238] = new State(-49);
states[1239] = new State(new int[]{130,23,75,25,76,26,70,28,68,29},new int[]{-111,1240,-119,1243,-124,24,-125,27});
states[1240] = new State(new int[]{10,1241});
states[1241] = new State(new int[]{3,1172,35,-11,81,-11,92,-11,80,-11,44,-11,51,-11,23,-11,59,-11,42,-11,45,-11,54,-11,11,-11,36,-11,31,-11,21,-11,24,-11,25,-11},new int[]{-159,1242,-160,1170,-158,1175});
states[1242] = new State(-43);
states[1243] = new State(-46);
states[1244] = new State(-44);
states[1245] = new State(-45);
states[1246] = new State(-4);
states[1247] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288,5,304},new int[]{-77,1248,-85,120,-84,125,-86,176,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301,-210,302,-96,303});
states[1248] = new State(-5);
states[1249] = new State(new int[]{130,23,75,25,76,26,70,28,68,29},new int[]{-280,1250,-281,1251,-119,1255,-124,24,-125,27});
states[1250] = new State(-6);
states[1251] = new State(new int[]{7,1252,110,157,2,-604},new int[]{-262,1254});
states[1252] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,74,32,73,33,72,34,71,35,61,36,56,37,115,38,17,39,16,40,55,41,18,42,116,43,117,44,118,45,119,46,120,47,121,48,122,49,123,50,124,51,125,52,19,53,66,54,80,55,20,56,21,57,23,58,24,59,25,60,64,61,88,62,26,63,27,64,28,65,22,66,93,67,90,68,29,69,30,70,31,71,32,72,33,73,34,74,92,75,35,76,36,77,38,78,39,79,40,80,86,81,41,82,91,83,42,84,43,85,63,86,87,87,44,88,45,89,46,90,47,91,48,92,49,93,50,94,51,95,53,96,94,97,95,98,96,99,97,100,37,102,81,103},new int[]{-110,1253,-119,22,-124,24,-125,27,-257,30,-123,31,-258,101});
states[1253] = new State(-603);
states[1254] = new State(-605);
states[1255] = new State(-602);
states[1256] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,1260,16,273,17,278,31,284,36,288,5,304,45,401},new int[]{-229,1257,-77,1258,-85,120,-84,125,-86,176,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,1259,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301,-210,302,-96,303,-3,1261,-274,1262});
states[1257] = new State(-7);
states[1258] = new State(-8);
states[1259] = new State(new int[]{98,258,99,259,100,260,101,261,102,262,106,-593,105,-593,118,-593,119,-593,120,-593,121,-593,117,-593,123,-593,125,-593,5,-593,104,-593,103,-593,115,-593,116,-593,113,-593,14,-593,107,-593,112,-593,110,-593,108,-593,111,-593,109,-593,124,-593,13,-593,2,-593},new int[]{-168,118});
states[1260] = new State(new int[]{9,268,48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288,5,304},new int[]{-77,266,-119,1058,-85,1077,-92,294,-84,125,-86,176,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301,-210,302,-96,303});
states[1261] = new State(-9);
states[1262] = new State(-10);
states[1115] = new State(-622);
states[1116] = new State(-32);
states[1117] = new State(new int[]{51,690,23,739,59,743,42,924,45,930,54,932,11,646,80,-57,81,-57,92,-57,36,-195,31,-195,21,-195,24,-195,25,-195},new int[]{-41,1118,-141,1119,-24,1120,-46,1121,-253,1122,-270,1123,-190,1124,-5,1125,-219,658});
states[1118] = new State(-59);
states[1119] = new State(-69);
states[1120] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,51,-70,23,-70,59,-70,42,-70,45,-70,54,-70,11,-70,36,-70,31,-70,21,-70,24,-70,25,-70,80,-70,81,-70,92,-70},new int[]{-22,697,-23,698,-113,700,-119,738,-124,24,-125,27});
states[1121] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,51,-71,23,-71,59,-71,42,-71,45,-71,54,-71,11,-71,36,-71,31,-71,21,-71,24,-71,25,-71,80,-71,81,-71,92,-71},new int[]{-22,742,-23,698,-113,700,-119,738,-124,24,-125,27});
states[1122] = new State(new int[]{11,646,51,-72,23,-72,59,-72,42,-72,45,-72,54,-72,36,-72,31,-72,21,-72,24,-72,25,-72,80,-72,81,-72,92,-72,130,-195,75,-195,76,-195,70,-195,68,-195},new int[]{-43,746,-5,747,-219,658});
states[1123] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,51,-73,23,-73,59,-73,42,-73,45,-73,54,-73,11,-73,36,-73,31,-73,21,-73,24,-73,25,-73,80,-73,81,-73,92,-73},new int[]{-271,927,-272,928,-131,403,-119,671,-124,24,-125,27});
states[1124] = new State(-74);
states[1125] = new State(new int[]{36,1147,31,1153,21,1164,24,888,25,892,11,646},new int[]{-183,1126,-219,559,-184,1127,-191,1128,-198,1129,-195,780,-199,826,-187,1166,-197,1167});
states[1126] = new State(-77);
states[1127] = new State(-75);
states[1128] = new State(-382);
states[1129] = new State(new int[]{134,1131,96,1138,51,-58,23,-58,59,-58,42,-58,45,-58,54,-58,11,-58,36,-58,31,-58,21,-58,24,-58,25,-58,80,-58},new int[]{-152,1130,-151,1133,-36,1134,-37,1117,-54,1137});
states[1130] = new State(-384);
states[1131] = new State(new int[]{10,1132});
states[1132] = new State(-388);
states[1133] = new State(-395);
states[1134] = new State(new int[]{80,110},new int[]{-224,1135});
states[1135] = new State(new int[]{10,1136});
states[1136] = new State(-417);
states[1137] = new State(-396);
states[1138] = new State(new int[]{10,1146,130,23,75,25,76,26,70,28,68,29,131,139,132,140},new int[]{-89,1139,-119,1143,-124,24,-125,27,-138,1144,-140,137,-139,141});
states[1139] = new State(new int[]{70,1140,10,1145});
states[1140] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,131,139,132,140},new int[]{-89,1141,-119,1143,-124,24,-125,27,-138,1144,-140,137,-139,141});
states[1141] = new State(new int[]{10,1142});
states[1142] = new State(-412);
states[1143] = new State(-415);
states[1144] = new State(-416);
states[1145] = new State(-413);
states[1146] = new State(-414);
states[1147] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,37,234},new int[]{-144,1148,-143,661,-114,662,-109,663,-106,664,-119,672,-124,24,-125,27,-165,673,-293,675,-121,679});
states[1148] = new State(new int[]{8,579,98,-419,10,-419},new int[]{-100,1149});
states[1149] = new State(new int[]{98,1150,10,568},new int[]{-179,784});
states[1150] = new State(new int[]{128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,330,8,293,16,273,17,278,131,139,132,140,140,143,142,144,141,145,49,333,80,110,32,324,20,341,86,353,46,362,29,367,47,377,91,383,39,390,30,393,45,401,52,817,67,822,10,-443},new int[]{-230,1151,-3,116,-93,117,-104,208,-92,216,-119,292,-124,24,-125,27,-165,233,-226,272,-259,277,-13,320,-138,136,-140,137,-139,141,-14,142,-182,331,-105,332,-224,338,-126,339,-30,340,-216,352,-278,361,-98,366,-279,376,-133,381,-264,382,-217,389,-97,392,-274,400,-52,813,-148,814,-147,815,-142,816,-99,821});
states[1151] = new State(new int[]{10,1152});
states[1152] = new State(-387);
states[1153] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,37,234},new int[]{-143,1154,-114,662,-109,663,-106,664,-119,672,-124,24,-125,27,-165,673,-293,675,-121,679});
states[1154] = new State(new int[]{8,579,5,-419,98,-419,10,-419},new int[]{-100,1155});
states[1155] = new State(new int[]{5,1156,98,1161,10,568},new int[]{-179,830});
states[1156] = new State(new int[]{130,512,75,25,76,26,70,28,68,29,140,143,142,144,141,145,104,203,103,204,131,139,132,140,8,516,129,530,19,535,40,543,41,593,28,603,66,607,57,610,36,615,31,617},new int[]{-241,1157,-242,475,-238,476,-80,477,-87,506,-88,499,-154,507,-119,164,-124,24,-125,27,-14,495,-173,496,-138,498,-140,137,-139,141,-225,528,-218,529,-246,532,-247,533,-244,534,-236,541,-26,542,-233,592,-102,602,-103,606,-196,612,-194,613,-193,614,-263,621});
states[1157] = new State(new int[]{98,1158,10,568},new int[]{-179,834});
states[1158] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288},new int[]{-84,1159,-86,226,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301});
states[1159] = new State(new int[]{10,1160,14,840,107,842,112,843,110,844,108,845,111,846,109,847,124,848},new int[]{-170,126});
states[1160] = new State(-385);
states[1161] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288},new int[]{-84,1162,-86,226,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301});
states[1162] = new State(new int[]{10,1163,14,840,107,842,112,843,110,844,108,845,111,846,109,847,124,848},new int[]{-170,126});
states[1163] = new State(-386);
states[1164] = new State(new int[]{24,564,36,1147,31,1153},new int[]{-191,1165,-198,1129,-195,780,-199,826});
states[1165] = new State(-383);
states[1166] = new State(-76);
states[1167] = new State(-58,new int[]{-151,1168,-36,1134,-37,1117});
states[1168] = new State(-380);
states[1169] = new State(new int[]{3,1171,44,-12,80,-12,51,-12,23,-12,59,-12,42,-12,45,-12,54,-12,11,-12,36,-12,31,-12,21,-12,24,-12,25,-12,35,-12,81,-12,92,-12},new int[]{-158,1170});
states[1170] = new State(-14);
states[1171] = new State(new int[]{130,1172,131,1173});
states[1172] = new State(-15);
states[1173] = new State(-16);
states[1174] = new State(-13);
states[1175] = new State(new int[]{130,23,75,25,76,26,70,28,68,29},new int[]{-119,1176,-124,24,-125,27});
states[1176] = new State(new int[]{10,1178,8,1179},new int[]{-161,1177});
states[1177] = new State(-25);
states[1178] = new State(-26);
states[1179] = new State(new int[]{130,23,75,25,76,26,70,28,68,29},new int[]{-163,1180,-118,1186,-119,1185,-124,24,-125,27});
states[1180] = new State(new int[]{9,1181,89,1183});
states[1181] = new State(new int[]{10,1182});
states[1182] = new State(-27);
states[1183] = new State(new int[]{130,23,75,25,76,26,70,28,68,29},new int[]{-118,1184,-119,1185,-124,24,-125,27});
states[1184] = new State(-29);
states[1185] = new State(-30);
states[1186] = new State(-28);
states[1187] = new State(-3);
states[1188] = new State(new int[]{94,1243,95,1244,11,646},new int[]{-269,1189,-219,559,-2,1238});
states[1189] = new State(new int[]{35,1210,44,-35,51,-35,23,-35,59,-35,42,-35,45,-35,54,-35,11,-35,36,-35,31,-35,21,-35,24,-35,25,-35,81,-35,92,-35,80,-35},new int[]{-135,1190,-136,1207,-265,1236});
states[1190] = new State(new int[]{33,1204},new int[]{-134,1191});
states[1191] = new State(new int[]{81,1194,92,1195,80,1201},new int[]{-127,1192});
states[1192] = new State(new int[]{7,1193});
states[1193] = new State(-41);
states[1194] = new State(-50);
states[1195] = new State(new int[]{128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,330,8,293,16,273,17,278,131,139,132,140,140,359,142,144,141,360,49,333,80,110,32,324,20,341,86,353,46,362,29,367,47,377,91,383,39,390,30,393,45,401,52,817,67,822,81,-443,93,-443,10,-443},new int[]{-221,1196,-231,357,-230,115,-3,116,-93,117,-104,208,-92,216,-119,358,-124,24,-125,27,-165,233,-226,272,-259,277,-13,320,-138,136,-140,137,-139,141,-14,142,-182,331,-105,332,-224,338,-126,339,-30,340,-216,352,-278,361,-98,366,-279,376,-133,381,-264,382,-217,389,-97,392,-274,400,-52,813,-148,814,-147,815,-142,816,-99,821,-115,978});
states[1196] = new State(new int[]{81,1197,93,1198,10,113});
states[1197] = new State(-51);
states[1198] = new State(new int[]{128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,330,8,293,16,273,17,278,131,139,132,140,140,359,142,144,141,360,49,333,80,110,32,324,20,341,86,353,46,362,29,367,47,377,91,383,39,390,30,393,45,401,52,817,67,822,81,-443,10,-443},new int[]{-221,1199,-231,357,-230,115,-3,116,-93,117,-104,208,-92,216,-119,358,-124,24,-125,27,-165,233,-226,272,-259,277,-13,320,-138,136,-140,137,-139,141,-14,142,-182,331,-105,332,-224,338,-126,339,-30,340,-216,352,-278,361,-98,366,-279,376,-133,381,-264,382,-217,389,-97,392,-274,400,-52,813,-148,814,-147,815,-142,816,-99,821,-115,978});
states[1199] = new State(new int[]{81,1200,10,113});
states[1200] = new State(-52);
states[1201] = new State(new int[]{128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,330,8,293,16,273,17,278,131,139,132,140,140,359,142,144,141,360,49,333,80,110,32,324,20,341,86,353,46,362,29,367,47,377,91,383,39,390,30,393,45,401,52,817,67,822,81,-443,10,-443},new int[]{-221,1202,-231,357,-230,115,-3,116,-93,117,-104,208,-92,216,-119,358,-124,24,-125,27,-165,233,-226,272,-259,277,-13,320,-138,136,-140,137,-139,141,-14,142,-182,331,-105,332,-224,338,-126,339,-30,340,-216,352,-278,361,-98,366,-279,376,-133,381,-264,382,-217,389,-97,392,-274,400,-52,813,-148,814,-147,815,-142,816,-99,821,-115,978});
states[1202] = new State(new int[]{81,1203,10,113});
states[1203] = new State(-53);
states[1204] = new State(-35,new int[]{-265,1205});
states[1205] = new State(new int[]{44,14,51,-58,23,-58,59,-58,42,-58,45,-58,54,-58,11,-58,36,-58,31,-58,21,-58,24,-58,25,-58,81,-58,92,-58,80,-58},new int[]{-36,1206,-37,1117});
states[1206] = new State(-48);
states[1207] = new State(new int[]{81,1194,92,1195,80,1201},new int[]{-127,1208});
states[1208] = new State(new int[]{7,1209});
states[1209] = new State(-42);
states[1210] = new State(-35,new int[]{-265,1211});
states[1211] = new State(new int[]{44,14,23,-55,59,-55,42,-55,45,-55,54,-55,11,-55,36,-55,31,-55,33,-55},new int[]{-35,1212,-33,1213});
states[1212] = new State(-47);
states[1213] = new State(new int[]{23,739,59,743,42,924,45,930,54,932,11,646,33,-54,36,-195,31,-195},new int[]{-42,1214,-24,1215,-46,1216,-253,1217,-270,1218,-202,1219,-5,1220,-219,658,-201,1235});
states[1214] = new State(-56);
states[1215] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,23,-63,59,-63,42,-63,45,-63,54,-63,11,-63,36,-63,31,-63,33,-63},new int[]{-22,697,-23,698,-113,700,-119,738,-124,24,-125,27});
states[1216] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,23,-64,59,-64,42,-64,45,-64,54,-64,11,-64,36,-64,31,-64,33,-64},new int[]{-22,742,-23,698,-113,700,-119,738,-124,24,-125,27});
states[1217] = new State(new int[]{11,646,23,-65,59,-65,42,-65,45,-65,54,-65,36,-65,31,-65,33,-65,130,-195,75,-195,76,-195,70,-195,68,-195},new int[]{-43,746,-5,747,-219,658});
states[1218] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,23,-66,59,-66,42,-66,45,-66,54,-66,11,-66,36,-66,31,-66,33,-66},new int[]{-271,927,-272,928,-131,403,-119,671,-124,24,-125,27});
states[1219] = new State(-67);
states[1220] = new State(new int[]{36,1227,11,646,31,1230},new int[]{-195,1221,-219,559,-199,1224});
states[1221] = new State(new int[]{134,1222,23,-83,59,-83,42,-83,45,-83,54,-83,11,-83,36,-83,31,-83,33,-83});
states[1222] = new State(new int[]{10,1223});
states[1223] = new State(-84);
states[1224] = new State(new int[]{134,1225,23,-85,59,-85,42,-85,45,-85,54,-85,11,-85,36,-85,31,-85,33,-85});
states[1225] = new State(new int[]{10,1226});
states[1226] = new State(-86);
states[1227] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,37,234},new int[]{-144,1228,-143,661,-114,662,-109,663,-106,664,-119,672,-124,24,-125,27,-165,673,-293,675,-121,679});
states[1228] = new State(new int[]{8,579,10,-419},new int[]{-100,1229});
states[1229] = new State(new int[]{10,568},new int[]{-179,784});
states[1230] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,37,234},new int[]{-143,1231,-114,662,-109,663,-106,664,-119,672,-124,24,-125,27,-165,673,-293,675,-121,679});
states[1231] = new State(new int[]{8,579,5,-419,10,-419},new int[]{-100,1232});
states[1232] = new State(new int[]{5,1233,10,568},new int[]{-179,830});
states[1233] = new State(new int[]{130,512,75,25,76,26,70,28,68,29,140,143,142,144,141,145,104,203,103,204,131,139,132,140,8,516,129,530,19,535,40,543,41,593,28,603,66,607,57,610,36,615,31,617},new int[]{-241,1234,-242,475,-238,476,-80,477,-87,506,-88,499,-154,507,-119,164,-124,24,-125,27,-14,495,-173,496,-138,498,-140,137,-139,141,-225,528,-218,529,-246,532,-247,533,-244,534,-236,541,-26,542,-233,592,-102,602,-103,606,-196,612,-194,613,-193,614,-263,621});
states[1234] = new State(new int[]{10,568},new int[]{-179,834});
states[1235] = new State(-68);
states[1236] = new State(new int[]{44,14,51,-58,23,-58,59,-58,42,-58,45,-58,54,-58,11,-58,36,-58,31,-58,21,-58,24,-58,25,-58,81,-58,92,-58,80,-58},new int[]{-36,1237,-37,1117});
states[1237] = new State(-49);
states[1238] = new State(new int[]{130,23,75,25,76,26,70,28,68,29},new int[]{-111,1239,-119,1242,-124,24,-125,27});
states[1239] = new State(new int[]{10,1240});
states[1240] = new State(new int[]{3,1171,35,-11,81,-11,92,-11,80,-11,44,-11,51,-11,23,-11,59,-11,42,-11,45,-11,54,-11,11,-11,36,-11,31,-11,21,-11,24,-11,25,-11},new int[]{-159,1241,-160,1169,-158,1174});
states[1241] = new State(-43);
states[1242] = new State(-46);
states[1243] = new State(-44);
states[1244] = new State(-45);
states[1245] = new State(-4);
states[1246] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288,5,304},new int[]{-77,1247,-85,120,-84,125,-86,176,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301,-210,302,-96,303});
states[1247] = new State(-5);
states[1248] = new State(new int[]{130,23,75,25,76,26,70,28,68,29},new int[]{-280,1249,-281,1250,-119,1254,-124,24,-125,27});
states[1249] = new State(-6);
states[1250] = new State(new int[]{7,1251,110,157,2,-604},new int[]{-262,1253});
states[1251] = new State(new int[]{130,23,75,25,76,26,70,28,68,29,74,32,73,33,72,34,71,35,61,36,56,37,115,38,17,39,16,40,55,41,18,42,116,43,117,44,118,45,119,46,120,47,121,48,122,49,123,50,124,51,125,52,19,53,66,54,80,55,20,56,21,57,23,58,24,59,25,60,64,61,88,62,26,63,27,64,28,65,22,66,93,67,90,68,29,69,30,70,31,71,32,72,33,73,34,74,92,75,35,76,36,77,38,78,39,79,40,80,86,81,41,82,91,83,42,84,43,85,63,86,87,87,44,88,45,89,46,90,47,91,48,92,49,93,50,94,51,95,53,96,94,97,95,98,96,99,97,100,37,102,81,103},new int[]{-110,1252,-119,22,-124,24,-125,27,-257,30,-123,31,-258,101});
states[1252] = new State(-603);
states[1253] = new State(-605);
states[1254] = new State(-602);
states[1255] = new State(new int[]{48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,1259,16,273,17,278,31,284,36,288,5,304,45,401},new int[]{-229,1256,-77,1257,-85,120,-84,125,-86,176,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,1258,-104,208,-92,216,-119,222,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301,-210,302,-96,303,-3,1260,-274,1261});
states[1256] = new State(-7);
states[1257] = new State(-8);
states[1258] = new State(new int[]{98,258,99,259,100,260,101,261,102,262,106,-593,105,-593,118,-593,119,-593,120,-593,121,-593,117,-593,123,-593,125,-593,5,-593,104,-593,103,-593,115,-593,116,-593,113,-593,14,-593,107,-593,112,-593,110,-593,108,-593,111,-593,109,-593,124,-593,13,-593,2,-593},new int[]{-168,118});
states[1259] = new State(new int[]{9,268,48,132,131,139,132,140,140,143,142,144,141,145,55,147,11,167,122,199,104,203,103,204,129,205,128,215,130,23,75,25,76,26,70,28,68,227,37,234,34,263,8,265,16,273,17,278,31,284,36,288,5,304},new int[]{-77,266,-119,1058,-85,1077,-92,294,-84,125,-86,176,-74,186,-83,198,-13,133,-138,136,-140,137,-139,141,-14,142,-51,146,-173,201,-93,207,-104,208,-124,24,-125,27,-165,233,-226,272,-259,277,-282,282,-283,283,-147,300,-234,301,-210,302,-96,303});
states[1260] = new State(-9);
states[1261] = new State(-10);
rules[1] = new Rule(-297, new int[]{-1,2});
rules[2] = new Rule(-1, new int[]{-204});
@ -1967,7 +1966,7 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
rules[551] = new Rule(-94, new int[]{-86});
rules[552] = new Rule(-94, new int[]{});
rules[553] = new Rule(-96, new int[]{-86,5,-94});
rules[554] = new Rule(-96, new int[]{5,-86});
rules[554] = new Rule(-96, new int[]{5,-94});
rules[555] = new Rule(-96, new int[]{-86,5,-94,5,-86});
rules[556] = new Rule(-96, new int[]{5,-94,5,-86});
rules[557] = new Rule(-170, new int[]{107});
@ -3871,6 +3870,8 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
case 387: // proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, tkAssign,
// unlabelled_stmt, tkSemiColon
{
if (ValueStack[ValueStack.Depth-2].stn is empty_statement)
parsertools.AddErrorFromResource("EMPTY_STATEMENT_IN_SHORT_PROC_DEFINITION",LocationStack[LocationStack.Depth-1]);
CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortProcDefinition(ValueStack[ValueStack.Depth-4].stn as formal_parameters, new procedure_attributes_list(), ValueStack[ValueStack.Depth-5].stn as method_name, ValueStack[ValueStack.Depth-2].stn as statement, LocationStack[LocationStack.Depth-6].Merge(LocationStack[LocationStack.Depth-4]));
}
break;
@ -4667,7 +4668,7 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
break;
case 552: // simple_expr_or_nothing -> /* empty */
{
CurrentSemanticValue.ex = null;
CurrentSemanticValue.ex = new int32_const(int.MaxValue);
}
break;
case 553: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing
@ -4675,9 +4676,9 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
CurrentSemanticValue.ex = new format_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan);
}
break;
case 554: // format_expr -> tkColon, simple_expr
case 554: // format_expr -> tkColon, simple_expr_or_nothing
{
CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan);
CurrentSemanticValue.ex = new format_expr(new int32_const(int.MaxValue), ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan);
}
break;
case 555: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon,
@ -4688,7 +4689,7 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
break;
case 556: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr
{
CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
CurrentSemanticValue.ex = new format_expr(new int32_const(int.MaxValue), ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan);
}
break;
case 557: // relop -> tkEqual

View file

@ -123,6 +123,8 @@ script=

View file

@ -1 +1 @@
!define VERSION '3.1.0.1207'
!define VERSION '3.1.0.1211'

View file

@ -265,9 +265,12 @@ namespace PascalABCCompiler.SyntaxTree
_begin_position = _end_position;
if (right == null)
_end_position = _begin_position;
this._begin_symbol_position = left._begin_symbol_position;
this._end_symbol_position = right._end_symbol_position;
this.FileName = left.FileName == right.FileName ? left.FileName : null;
if (left != null)
this._begin_symbol_position = left._begin_symbol_position;
if (right != null)
this._end_symbol_position = right._end_symbol_position;
if (left != null && right != null)
this.FileName = left.FileName == right.FileName ? left.FileName : null;
}
public SourceContext Merge(SourceContext right)

View file

@ -1609,19 +1609,23 @@ function Rec<T1,T2,T3,T4,T5,T6>(x1: T1; x2: T2; x3: T3; x4: T4; x5: T5; x6: T6):
function Rec<T1,T2,T3,T4,T5,T6,T7>(x1: T1; x2: T2; x3: T3; x4: T4; x5: T5; x6: T6; x7: T7): (T1,T2,T3,T4,T5,T6,T7);
// -----------------------------------------------------
//>> Короткие функции Lst, HSet, SSet, Dict, KV # Short functions Lst, HSet, SSet, Dict, KV
//>> Короткие функции Lst, LLst, HSet, SSet, Dict, KV # Short functions Lst, HSet, SSet, Dict, KV
// -----------------------------------------------------
/// Возвращает список, заполненный указанными значениями
function Lst<T>(params a: array of T): List<T>;
/// Возвращает список, заполненное значениями из последовательности
/// Возвращает список, заполненный значениями из последовательности
function Lst<T>(a: sequence of T): List<T>;
/// Возвращает двусвязный список, заполненный указанными значениями
function LLst<T>(params a: array of T): LinkedList<T>;
/// Возвращает двусвязный список, заполненный значениями из последовательности
function LLst<T>(a: sequence of T): LinkedList<T>;
/// Возвращает множество на базе хеш таблицы, заполненное указанными значениями
function HSet<T>(params a: array of T): HashSet<T>;
/// Возвращает множество на базе бинарного дерева поиска, заполненное значениями из последовательности
function SSet<T>(params a: array of T): SortedSet<T>;
/// Возвращает множество на базе хеш таблицы, заполненное значениями из последовательности
function HSet<T>(a: sequence of T): HashSet<T>;
/// Возвращает множество на базе бинарного дерева поиска, заполненное значениями из последовательности
function SSet<T>(params a: array of T): SortedSet<T>;
/// Возвращает множество на базе бинарного дерева поиска, заполненное значениями из последовательности
function SSet<T>(a: sequence of T): SortedSet<T>;
/// Возвращает словарь пар элементов (ключ, значение)
function Dict<TKey, TVal>(params pairs: array of KeyValuePair<TKey, TVal>): Dictionary<TKey, TVal>;
@ -4028,7 +4032,7 @@ begin
end;
// -----------------------------------------------------------------------------
// Функции Lst, Dict, KV, HSet, SSet
// Функции Lst, LLst, Dict, KV, HSet, SSet
// -----------------------------------------------------------------------------
function Lst<T>(params a: array of T): List<T>;
begin
@ -4040,6 +4044,16 @@ begin
Result := new List<T>(a);
end;
function LLst<T>(params a: array of T): LinkedList<T>;
begin
Result := new LinkedList<T>(a);
end;
function LLst<T>(a: sequence of T): LinkedList<T>;
begin
Result := new LinkedList<T>(a);
end;
function HSet<T>(params a: array of T): HashSet<T>;
begin
Result := new HashSet<T>(a);
@ -7914,6 +7928,12 @@ begin
Result := new SortedSet<T>(Self);
end;
/// Возвращает LinkedList по данной последовательности
function ToLinkedList<T>(Self: sequence of T): LinkedList<T>; extensionmethod;
begin
Result := new LinkedList<T>(Self);
end;
// Дополнения февраль 2016: MinBy, MaxBy, TakeLast, Slice, Cartesian, SplitAt,
// Partition, ZipTuple, UnZipTuple, Interleave, Numerate, Tabulate, Pairwise, Batch
@ -8116,6 +8136,7 @@ begin
Result := SeqWhile(Self,v->v.Skip(size),v->v.Count>0).Select(v->v.Take(size)).Select(ss->proj(ss));
end;
///--
function SliceSeqImpl<T>(Self: sequence of T; from,step,count: integer): sequence of T;
begin
if step <= 0 then
@ -8127,27 +8148,9 @@ begin
Result := Self.Skip(from).Where((x,i)->i mod step = 0)
end;
/// Возвращает срез последовательности от номера from с шагом step
/// Возвращает срез последовательности от номера from с шагом step > 0
function Slice<T>(Self: sequence of T; from,step: integer): sequence of T; extensionmethod;
begin
{if step=0 then
raise new ArgumentException(GetTranslation(PARAMETER_STEP_MUST_BE_NOT_EQUAL_0));
if step<0 then
begin
if from<0 then
Result := Self.Take(0)
else
begin
step := -step;
var bb := from mod step;
Result := Self.Skip(bb).Where((x,i)->(i mod step = 0) and (i<=from-bb)).Reverse;
end;
end
else
if from<=0 then
Result := Self.Where((x,i)->(i-from) mod step = 0)
else Result := Self.Skip(from).Where((x,i)->i mod step = 0);}
if step <= 0 then
raise new ArgumentException(GetTranslation(PARAMETER_STEP_MUST_BE_GREATER_0));
@ -8157,34 +8160,9 @@ begin
Result := Self.Skip(from).Where((x,i)->i mod step = 0)
end;
/// Возвращает срез последовательности от номера from с шагом step длины не более count
/// Возвращает срез последовательности от номера from с шагом step > 0 длины не более count
function Slice<T>(Self: sequence of T; from,step,count: integer): sequence of T; extensionmethod;
begin
{if step=0 then
raise new ArgumentException(GetTranslation(PARAMETER_STEP_MUST_BE_NOT_EQUAL_0));
if step<0 then
begin
if from<0 then
Result := Self.Take(0)
else
begin
step := -step;
var bb := from - (count - 1)*step;
if bb<0 then
bb := bb mod step;
if bb < 0 then
bb += step;
Result := Self.Skip(bb).Where((x,i)->(i mod step = 0) and (i<=from-bb)).Reverse;
end;
end
else
if from<0 then
begin
count -= abs(from+1) div step + 1;
Result := Self.Where((x,i)->(i-from) mod step = 0).Take(count)
end
else Result := Self.Skip(from).Where((x,i)->i mod step = 0).Take(count);}
if step <= 0 then
raise new ArgumentException(GetTranslation(PARAMETER_STEP_MUST_BE_GREATER_0));
@ -8225,6 +8203,7 @@ begin
end;
end;
///--
procedure CorrectCountForSlice(Len,from,step: integer; var count: integer);
begin
if step = 0 then
@ -8289,11 +8268,13 @@ begin
if step = 0 then
raise new ArgumentException(GetTranslation(PARAMETER_STEP_MUST_BE_NOT_EQUAL_0));
if (from < 0) or (from > Len - 1) then
raise new ArgumentException(GetTranslation(PARAMETER_FROM_OUT_OF_RANGE));
if (situation=0) or (situation=2) then
if (from < 0) or (from > Len - 1) then
raise new ArgumentException(GetTranslation(PARAMETER_FROM_OUT_OF_RANGE));
if (&to < -1) or (&to > Len) then
raise new ArgumentException(GetTranslation(PARAMETER_TO_OUT_OF_RANGE));
if (situation=0) or (situation=1) then
if (&to < -1) or (&to > Len) then
raise new ArgumentException(GetTranslation(PARAMETER_TO_OUT_OF_RANGE));
var count: integer;
@ -8507,6 +8488,7 @@ begin
end;
end;
///--
function SliceArrayImpl<T>(Self: array of T; from,step,count: integer): array of T;
begin
{if step = 0 then
@ -8855,7 +8837,7 @@ begin
Result := res.ToString;
end;
///--
function SliceStringImpl(Self: string; from,step,count: integer): string;
begin
{if step = 0 then

View file

@ -18929,14 +18929,6 @@ namespace PascalABCCompiler.TreeConverter
public override void visit(SyntaxTree.slice_expr sl)
{
// Устарело
// Преобразуется в вызов a.Slice
// from, step сохраняются, count вычисляется как count = (to-from+step-sign(step)) div step
// Для a: нужно to присвоить очень большое целое
// Для :b нужно from присвоить -1
// Для a::step нужно использовать a.Slice(from,step)
// Для :b:step нужно закодировать from - from := -MaxInt div 2 и в методе Slice это проверить и поправить from в зависимости от знака step
// Новое
// Последовательности исключены
// Преобразуется в вызов a.SystemSlice(situation,from,to,step)
@ -18944,155 +18936,47 @@ namespace PascalABCCompiler.TreeConverter
// situation = 1 - пропущен from
// situation = 2 - пропущен to
// situation = 3 - пропущены from и to
// пропущенность кодируется тем, что в соответствующем поле int.MaxValue
var semvar = convert_strong(sl.v);
if (semvar is typed_expression)
semvar = convert_typed_expression_to_function_call(semvar as typed_expression);
var semvartype = semvar.type;
// semvartype должен быть array of T, List<T> или string
var IsSlicedType = false; // проверим, является ли semvartype интерфейсом IEnumerable<T> или реализует его
var IsSlicedType = 0; // проверим, является ли semvartype динамическим массивом, списком List или строкой
var t = ConvertSemanticTypeNodeToNETType(semvartype);
if (t.IsArray)
IsSlicedType = true;
IsSlicedType = 1;
else if (t == typeof(System.String))
IsSlicedType = true;
IsSlicedType = 2;
else if (t.IsGenericType && t.GetGenericTypeDefinition()==typeof(System.Collections.Generic.List<>))
IsSlicedType = true;
IsSlicedType = 3;
/*var ct = semvartype as compiled_type_node;
if (ct != null && ct.compiled_type.IsGenericType && ct.compiled_type.GetGenericTypeDefinition() == typeof(System.Collections.Generic.IEnumerable<>)) // это он и есть
IsSlicedType = true;
if (!IsSlicedType)
foreach (SemanticTree.ITypeNode itn in semvartype.ImplementingInterfaces) // Ищем интерфейс IEnumerable<T>
{
if (itn is compiled_generic_instance_type_node)
{
var itnc = (itn as compiled_generic_instance_type_node);
var tt = (itnc.original_generic as compiled_type_node).compiled_type;
if (tt == typeof(System.Collections.Generic.IEnumerable<>))
{
IsSlicedType = true;
break;
}
}
else if (itn is compiled_type_node)
{
var itnc = (itn as compiled_type_node);
var tt = itnc.compiled_type;
if (!tt.IsGenericType)
continue;
var tt1 = tt.GetGenericTypeDefinition();
if (tt1 == typeof(System.Collections.Generic.IEnumerable<>))
{
IsSlicedType = true;
break;
}
}
}
*/
if (!IsSlicedType)
if (IsSlicedType==0)
AddError(get_location(sl.v), "BAD_SLICE_OBJECT");
int situation = 0;
if (sl.from == null && sl.to != null)
situation = 1;
else if (sl.from != null && sl.to == null)
situation = 2;
else if (sl.from == null && sl.to == null)
situation = 3;
var zero = new int32_const(0);
// заполняем пустые чем-нибудь
if (sl.from == null)
sl.from = zero;
if (sl.to == null)
sl.to = zero;
if (sl.step == null)
sl.step = new int32_const(1);
if ((sl.from is int32_const) && (sl.from as int32_const).val==int.MaxValue)
situation += 1;
if ((sl.to is int32_const) && (sl.to as int32_const).val == int.MaxValue)
situation += 2;
var el = new SyntaxTree.expression_list();
el.Add(new int32_const(situation));
el.Add(sl.from);
el.Add(sl.to);
el.Add(sl.step);
if (sl.step != null)
el.Add(sl.step);
var mc = new method_call(new dot_node(sl.v, new ident("SystemSlice", sl.v.source_context), sl.v.source_context), el, sl.source_context);
visit(mc);
/*
// Ситуация from::step - вызвать Slice с двумя параметрами - пропустить вычисление и добавление count
bool SituationFromSpaceStep = (sl.from != null) && (sl.to == null) && (sl.step != null);
// Ситуация :to:step - закодировать from = -MaxInt div 2 и в Slice сделато коррекцию если step<0 !!!
bool SituationSpaceToStep = (sl.from == null) && (sl.to != null) && (sl.step != null);
SyntaxTree.expression synfrom;
if (sl.from != null)
{
var semfrom = convert_strong(sl.from);
convertion_data_and_alghoritms.check_convert_type(semfrom, SystemLibrary.SystemLibrary.integer_type, get_location(sl.from));
synfrom = new SyntaxTree.semantic_addr_value(semfrom);
}
else
{
synfrom = new int32_const(-1);
}
var int1 = new int32_const(1);
var el = new SyntaxTree.expression_list();
if (semvartype == SystemLibrary.SystemLibrary.string_type) // Сдвинуть from на 1
el.Add(new bin_expr(synfrom, int1, Operators.Minus));
else el.Add(synfrom);
SyntaxTree.expression synstep;
if (sl.step != null)
{
var semstep = convert_strong(sl.step);
convertion_data_and_alghoritms.check_convert_type(semstep, SystemLibrary.SystemLibrary.integer_type, get_location(sl.step));
synstep = new SyntaxTree.semantic_addr_value(semstep);
}
else
{
synstep = int1;
}
el.Add(synstep);
SyntaxTree.expression synto;
if (sl.to != null)
{
var semto = convert_strong(sl.to);
convertion_data_and_alghoritms.check_convert_type(semto, SystemLibrary.SystemLibrary.integer_type, get_location(sl.to));
synto = new SyntaxTree.semantic_addr_value(semto);
}
else
{
synto = new int32_const(Int32.MaxValue/2);
}
if (!SituationFromSpaceStep) // если не from::step то вычислить count и вызвать Slice с тремя параметрами
{
// count = (to-from+step-sign(step)) div step
SyntaxTree.expression ex = new bin_expr(synto, synfrom, Operators.Minus);
SyntaxTree.expression signstep = new method_call(new ident("sign"), new expression_list(synstep));
ex = new bin_expr(ex, synstep, Operators.Plus);
ex = new bin_expr(ex, signstep, Operators.Minus);
ex = new bin_expr(ex, synstep, Operators.IntegerDivision);
el.Add(ex); // Параметр count
}
var mc = new method_call(new dot_node(sl.v, new ident("Slice", sl.v.source_context), sl.v.source_context), el, sl.source_context);
visit(mc);
*/
}
/*public SyntaxTree.question_colon_expression ConvertToQCE(dot_question_node dqn)

View file

@ -8,7 +8,13 @@ function Len(x1,y1,x2,y2: real) := Hypot(x2-x1,y2-y1);
function DigitCount(x: integer) := abs(x).ToString.Length;
function Ìèíèìóì(a,b,c: real): real := Min(Min(a,b),c);
procedure Âûâîä<ËþáîéÒèï>(x: ËþáîéÒèï) := Println(x);
begin
writeln(Hypot(3,4));
writeln(DigitCount(-1234));
Println(Sqr3(2),CircleLen(1));
Println(Hypot(3,4),Len(1,1,3,4));
Println(DigitCount(-1234));
Âûâîä(Ìèíèìóì(5,3,8));
end.

View file

@ -1,6 +1,9 @@
function QuickSort(a: sequence of integer): sequence of integer;
begin
Result := a.Count = 0 ? a : QuickSort(a.Skip(1).Where(x->x<=a.First())) + a.First() + QuickSort(a.Skip(1).Where(x->x>a.First()));
Result := a.Count = 0 ? a :
QuickSort(a.Skip(1).Where(x -> x <= a.First))
+ a.First +
QuickSort(a.Skip(1).Where(x -> x > a.First));
end;
begin

Binary file not shown.

View file

@ -2459,9 +2459,9 @@
</Node>
<Node Name="SystemSliceArrayImpl">
<FileName>\PABCSystem.pas</FileName>
<Text>function SystemSliceListImpl&lt;T&gt;(Self: List&lt;T&gt;; situation: integer; from,&amp;to: integer; step: integer := 1): List&lt;T&gt;;</Text>
<Text>function SystemSliceArrayImpl&lt;T&gt;(Self: array of T; situation: integer; from,&amp;to: integer; step: integer := 1): array of T;</Text>
<OCtx>
<i Type="Method">function SystemSliceListImpl &lt; T &gt; ( Self : List &lt; T &gt; ; situation : integer ; from , &amp;to : integer ; step : integer : = 1 ) : List &lt; T &gt;</i>
<i Type="Method">function SystemSliceArrayImpl &lt; T &gt; ( Self : array of T ; situation : integer ; from , &amp;to : integer ; step : integer : = 1 ) : array of T</i>
<i Type="PAS_TreeNode">
</i>
</OCtx>

View file

@ -1609,19 +1609,23 @@ function Rec<T1,T2,T3,T4,T5,T6>(x1: T1; x2: T2; x3: T3; x4: T4; x5: T5; x6: T6):
function Rec<T1,T2,T3,T4,T5,T6,T7>(x1: T1; x2: T2; x3: T3; x4: T4; x5: T5; x6: T6; x7: T7): (T1,T2,T3,T4,T5,T6,T7);
// -----------------------------------------------------
//>> Короткие функции Lst, HSet, SSet, Dict, KV # Short functions Lst, HSet, SSet, Dict, KV
//>> Короткие функции Lst, LLst, HSet, SSet, Dict, KV # Short functions Lst, HSet, SSet, Dict, KV
// -----------------------------------------------------
/// Возвращает список, заполненный указанными значениями
function Lst<T>(params a: array of T): List<T>;
/// Возвращает список, заполненное значениями из последовательности
/// Возвращает список, заполненный значениями из последовательности
function Lst<T>(a: sequence of T): List<T>;
/// Возвращает двусвязный список, заполненный указанными значениями
function LLst<T>(params a: array of T): LinkedList<T>;
/// Возвращает двусвязный список, заполненный значениями из последовательности
function LLst<T>(a: sequence of T): LinkedList<T>;
/// Возвращает множество на базе хеш таблицы, заполненное указанными значениями
function HSet<T>(params a: array of T): HashSet<T>;
/// Возвращает множество на базе бинарного дерева поиска, заполненное значениями из последовательности
function SSet<T>(params a: array of T): SortedSet<T>;
/// Возвращает множество на базе хеш таблицы, заполненное значениями из последовательности
function HSet<T>(a: sequence of T): HashSet<T>;
/// Возвращает множество на базе бинарного дерева поиска, заполненное значениями из последовательности
function SSet<T>(params a: array of T): SortedSet<T>;
/// Возвращает множество на базе бинарного дерева поиска, заполненное значениями из последовательности
function SSet<T>(a: sequence of T): SortedSet<T>;
/// Возвращает словарь пар элементов (ключ, значение)
function Dict<TKey, TVal>(params pairs: array of KeyValuePair<TKey, TVal>): Dictionary<TKey, TVal>;
@ -4028,7 +4032,7 @@ begin
end;
// -----------------------------------------------------------------------------
// Функции Lst, Dict, KV, HSet, SSet
// Функции Lst, LLst, Dict, KV, HSet, SSet
// -----------------------------------------------------------------------------
function Lst<T>(params a: array of T): List<T>;
begin
@ -4040,6 +4044,16 @@ begin
Result := new List<T>(a);
end;
function LLst<T>(params a: array of T): LinkedList<T>;
begin
Result := new LinkedList<T>(a);
end;
function LLst<T>(a: sequence of T): LinkedList<T>;
begin
Result := new LinkedList<T>(a);
end;
function HSet<T>(params a: array of T): HashSet<T>;
begin
Result := new HashSet<T>(a);
@ -7914,6 +7928,12 @@ begin
Result := new SortedSet<T>(Self);
end;
/// Возвращает LinkedList по данной последовательности
function ToLinkedList<T>(Self: sequence of T): LinkedList<T>; extensionmethod;
begin
Result := new LinkedList<T>(Self);
end;
// Дополнения февраль 2016: MinBy, MaxBy, TakeLast, Slice, Cartesian, SplitAt,
// Partition, ZipTuple, UnZipTuple, Interleave, Numerate, Tabulate, Pairwise, Batch
@ -8116,6 +8136,7 @@ begin
Result := SeqWhile(Self,v->v.Skip(size),v->v.Count>0).Select(v->v.Take(size)).Select(ss->proj(ss));
end;
///--
function SliceSeqImpl<T>(Self: sequence of T; from,step,count: integer): sequence of T;
begin
if step <= 0 then
@ -8127,27 +8148,9 @@ begin
Result := Self.Skip(from).Where((x,i)->i mod step = 0)
end;
/// Возвращает срез последовательности от номера from с шагом step
/// Возвращает срез последовательности от номера from с шагом step > 0
function Slice<T>(Self: sequence of T; from,step: integer): sequence of T; extensionmethod;
begin
{if step=0 then
raise new ArgumentException(GetTranslation(PARAMETER_STEP_MUST_BE_NOT_EQUAL_0));
if step<0 then
begin
if from<0 then
Result := Self.Take(0)
else
begin
step := -step;
var bb := from mod step;
Result := Self.Skip(bb).Where((x,i)->(i mod step = 0) and (i<=from-bb)).Reverse;
end;
end
else
if from<=0 then
Result := Self.Where((x,i)->(i-from) mod step = 0)
else Result := Self.Skip(from).Where((x,i)->i mod step = 0);}
if step <= 0 then
raise new ArgumentException(GetTranslation(PARAMETER_STEP_MUST_BE_GREATER_0));
@ -8157,34 +8160,9 @@ begin
Result := Self.Skip(from).Where((x,i)->i mod step = 0)
end;
/// Возвращает срез последовательности от номера from с шагом step длины не более count
/// Возвращает срез последовательности от номера from с шагом step > 0 длины не более count
function Slice<T>(Self: sequence of T; from,step,count: integer): sequence of T; extensionmethod;
begin
{if step=0 then
raise new ArgumentException(GetTranslation(PARAMETER_STEP_MUST_BE_NOT_EQUAL_0));
if step<0 then
begin
if from<0 then
Result := Self.Take(0)
else
begin
step := -step;
var bb := from - (count - 1)*step;
if bb<0 then
bb := bb mod step;
if bb < 0 then
bb += step;
Result := Self.Skip(bb).Where((x,i)->(i mod step = 0) and (i<=from-bb)).Reverse;
end;
end
else
if from<0 then
begin
count -= abs(from+1) div step + 1;
Result := Self.Where((x,i)->(i-from) mod step = 0).Take(count)
end
else Result := Self.Skip(from).Where((x,i)->i mod step = 0).Take(count);}
if step <= 0 then
raise new ArgumentException(GetTranslation(PARAMETER_STEP_MUST_BE_GREATER_0));
@ -8225,6 +8203,7 @@ begin
end;
end;
///--
procedure CorrectCountForSlice(Len,from,step: integer; var count: integer);
begin
if step = 0 then
@ -8289,11 +8268,13 @@ begin
if step = 0 then
raise new ArgumentException(GetTranslation(PARAMETER_STEP_MUST_BE_NOT_EQUAL_0));
if (from < 0) or (from > Len - 1) then
raise new ArgumentException(GetTranslation(PARAMETER_FROM_OUT_OF_RANGE));
if (situation=0) or (situation=2) then
if (from < 0) or (from > Len - 1) then
raise new ArgumentException(GetTranslation(PARAMETER_FROM_OUT_OF_RANGE));
if (&to < -1) or (&to > Len) then
raise new ArgumentException(GetTranslation(PARAMETER_TO_OUT_OF_RANGE));
if (situation=0) or (situation=1) then
if (&to < -1) or (&to > Len) then
raise new ArgumentException(GetTranslation(PARAMETER_TO_OUT_OF_RANGE));
var count: integer;
@ -8507,6 +8488,7 @@ begin
end;
end;
///--
function SliceArrayImpl<T>(Self: array of T; from,step,count: integer): array of T;
begin
{if step = 0 then
@ -8855,7 +8837,7 @@ begin
Result := res.ToString;
end;
///--
function SliceStringImpl(Self: string; from,step,count: integer): string;
begin
{if step = 0 then

View file

@ -50,6 +50,8 @@ ONE_OPERATOR=Expected operator
ONE_STMT=Expected statement
BAD_TUPLE=Badly formed Tuple
TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7=Count of Tuple elements must be <=7
EMPTY_STATEMENT_IN_SHORT_PROC_DEFINITION=Statement expected
DUPLICATE_NAMES_IN_ANON_TYPE=Duplicate field names in anonymous type
BAD_ANON_TYPE=Bad field name in anonymous type

View file

@ -5,4 +5,4 @@ TOO_MANY_ELEMENTS_ON_LEFT_SIDE_OF_TUPLE_ASSIGNMRNT=Too many elements on the left
ONLY_BASE_ASSIGNMENT_FOR_TUPLE=Tuple allows only base assignment :=
TUPLE_TYPE_ERROR=Bad element in Tuple type
INTEGER_VALUE_EXPECTED=Integer value expected
BAD_SLICE_OBJECT=Slices are allowed for strings, dynamic arrays, lists and sequences only
BAD_SLICE_OBJECT=Slices are allowed for strings, dynamic arrays and lists only

View file

@ -50,6 +50,7 @@ ONE_OPERATOR=Ожидался оператор
ONE_STMT=Ожидался оператор
BAD_TUPLE=Неправильно сформированный кортеж
TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7=Количество элементов кортежа не должно быть больше 7
EMPTY_STATEMENT_IN_SHORT_PROC_DEFINITION=Ожидался оператор
DUPLICATE_NAMES_IN_ANON_TYPE=Анонимный тип не может содержать поля с одинаковыми именами
BAD_ANON_TYPE=Неверное определение имени поля анонимного типа

View file

@ -5,4 +5,4 @@ TOO_MANY_ELEMENTS_ON_LEFT_SIDE_OF_TUPLE_ASSIGNMRNT=Слишком много э
ONLY_BASE_ASSIGNMENT_FOR_TUPLE=Для кортежа допустимо только обычное присваивание :=
TUPLE_TYPE_ERROR=Ошибочная конструкция при построении типа кортежа
INTEGER_VALUE_EXPECTED=Ожидалось значение целого типа
BAD_SLICE_OBJECT=Срезы допустимы только для строк, динамических массивов, списков и последовательностей
BAD_SLICE_OBJECT=Срезы допустимы только для строк, динамических массивов и списков

Binary file not shown.