Skip to content

Commit

Permalink
a?[2:10:2]
Browse files Browse the repository at this point in the history
  • Loading branch information
miks1965 committed Jan 10, 2017
1 parent 813e061 commit 32cc3ed
Show file tree
Hide file tree
Showing 25 changed files with 2,790 additions and 2,030 deletions.
2 changes: 1 addition & 1 deletion Configuration/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "2";
public const string Build = "0";
public const string Revision = "1371";
public const string Revision = "1372";

public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
Expand Down
4 changes: 2 additions & 2 deletions Configuration/Version.defs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%COREVERSION%=0
%REVISION%=1371
%MINOR%=2
%REVISION%=1372
%COREVERSION%=0
%MAJOR%=3
3 changes: 2 additions & 1 deletion NETGenerator/NETGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9210,7 +9210,8 @@ public override void visit(SemanticTree.ICompiledConstructorCall value)
}
else
{
mi = helper.GetMethod(ifc.function).mi;
var meth = helper.GetMethod(ifc.function);
mi = meth.mi;
}
}
PushObjectCommand(ifc);
Expand Down
184 changes: 94 additions & 90 deletions Parsers/PascalABCParserNewSaushkin/ABCPascal.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//
// This CSharp output file generated by Gardens Point LEX
// Version: 1.1.3.301
// Machine: IVAN-PC
// DateTime: 18.12.2016 12:52:06
// UserName: Ivan
// Machine: DESKTOP-8EAQPI9
// DateTime: 09.01.2017 15:07:29
// UserName: ?????????
// GPLEX input file <ABCPascal.lex>
// GPLEX frame file <embedded resource>
//
Expand Down Expand Up @@ -124,8 +124,8 @@ private static int GetMaxParseToken() {

enum Result {accept, noMatch, contextFound};

const int maxAccept = 62;
const int initial = 63;
const int maxAccept = 63;
const int initial = 64;
const int eofNum = 0;
const int goStart = -1;
const int INITIAL = 0;
Expand Down Expand Up @@ -177,7 +177,7 @@ public Table(int m, int x, int d, sbyte[] n) {
}
};

static int[] startState = new int[] {63, 97, 98, 99, 99, 100,
static int[] startState = new int[] {64, 98, 99, 100, 100, 101,
0};

#region TwoLevelCharacterMap
Expand Down Expand Up @@ -1177,52 +1177,52 @@ static sbyte Map(int code)
return MapC(code);
}

static Table[] NxS = new Table[102] {
static Table[] NxS = new Table[103] {
/* NxS[ 0] */ new Table(0, 0, 0, null),
/* NxS[ 1] */ new Table(1, 19, -1, new sbyte[] {51, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 52}),
/* NxS[ 1] */ new Table(1, 19, -1, new sbyte[] {52, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53}),
/* NxS[ 2] */ new Table(0, 0, -1, null),
/* NxS[ 3] */ new Table(4, 1, -1, new sbyte[] {96}),
/* NxS[ 4] */ new Table(26, 19, -1, new sbyte[] {49, 49, 49, -1, -1, -1,
-1, -1, -1, -1, -1, 49, -1, -1, -1, -1, 49, 49, 49}),
/* NxS[ 5] */ new Table(8, 1, -1, new sbyte[] {48}),
/* NxS[ 6] */ new Table(19, 1, -1, new sbyte[] {47}),
/* NxS[ 3] */ new Table(4, 1, -1, new sbyte[] {97}),
/* NxS[ 4] */ new Table(26, 19, -1, new sbyte[] {50, 50, 50, -1, -1, -1,
-1, -1, -1, -1, -1, 50, -1, -1, -1, -1, 50, 50, 50}),
/* NxS[ 5] */ new Table(8, 1, -1, new sbyte[] {49}),
/* NxS[ 6] */ new Table(19, 1, -1, new sbyte[] {48}),
/* NxS[ 7] */ new Table(0, 0, -1, null),
/* NxS[ 8] */ new Table(28, 17, -1, new sbyte[] {25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, -1, 25, -1, 25, 25}),
/* NxS[ 9] */ new Table(0, 0, -1, null),
/* NxS[ 10] */ new Table(19, 1, -1, new sbyte[] {46}),
/* NxS[ 11] */ new Table(13, 1, -1, new sbyte[] {45}),
/* NxS[ 10] */ new Table(19, 1, -1, new sbyte[] {47}),
/* NxS[ 11] */ new Table(13, 1, -1, new sbyte[] {46}),
/* NxS[ 12] */ new Table(0, 0, -1, null),
/* NxS[ 13] */ new Table(0, 0, -1, null),
/* NxS[ 14] */ new Table(0, 0, -1, null),
/* NxS[ 15] */ new Table(13, 1, -1, new sbyte[] {44}),
/* NxS[ 15] */ new Table(13, 3, -1, new sbyte[] {44, -1, 45}),
/* NxS[ 16] */ new Table(0, 0, -1, null),
/* NxS[ 17] */ new Table(0, 0, -1, null),
/* NxS[ 18] */ new Table(19, 1, -1, new sbyte[] {43}),
/* NxS[ 19] */ new Table(19, 4, -1, new sbyte[] {41, -1, -1, 42}),
/* NxS[ 20] */ new Table(19, 1, -1, new sbyte[] {40}),
/* NxS[ 21] */ new Table(19, 5, -1, new sbyte[] {35, -1, -1, 36, 69}),
/* NxS[ 21] */ new Table(19, 5, -1, new sbyte[] {35, -1, -1, 36, 70}),
/* NxS[ 22] */ new Table(0, 0, -1, null),
/* NxS[ 23] */ new Table(26, 1, -1, new sbyte[] {68}),
/* NxS[ 24] */ new Table(13, 32, -1, new sbyte[] {65, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 24, 24, 66, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 24, -1, 66}),
/* NxS[ 23] */ new Table(26, 1, -1, new sbyte[] {69}),
/* NxS[ 24] */ new Table(13, 32, -1, new sbyte[] {66, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 24, 24, 67, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 24, -1, 67}),
/* NxS[ 25] */ new Table(26, 19, -1, new sbyte[] {25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, -1, 25, 25, 25, 25}),
/* NxS[ 26] */ new Table(0, 0, -1, null),
/* NxS[ 27] */ new Table(45, 4, 64, new sbyte[] {31, 64, 64, -1}),
/* NxS[ 27] */ new Table(45, 4, 65, new sbyte[] {31, 65, 65, -1}),
/* NxS[ 28] */ new Table(26, 19, -1, new sbyte[] {29, 29, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, -1, 30, 29, 30, 30}),
/* NxS[ 29] */ new Table(26, 17, -1, new sbyte[] {29, 29, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 29}),
/* NxS[ 30] */ new Table(26, 19, -1, new sbyte[] {30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, -1, 30, 30, 30, 30}),
/* NxS[ 31] */ new Table(45, 1, -1, new sbyte[] {64}),
/* NxS[ 31] */ new Table(45, 1, -1, new sbyte[] {65}),
/* NxS[ 32] */ new Table(26, 17, -1, new sbyte[] {32, 32, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32}),
/* NxS[ 33] */ new Table(26, 19, -1, new sbyte[] {33, 33, 66, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, 66}),
/* NxS[ 33] */ new Table(26, 19, -1, new sbyte[] {33, 33, 67, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, 67}),
/* NxS[ 34] */ new Table(0, 0, -1, null),
/* NxS[ 35] */ new Table(0, 0, -1, null),
/* NxS[ 36] */ new Table(0, 0, -1, null),
Expand All @@ -1238,70 +1238,71 @@ static sbyte Map(int code)
/* NxS[ 46] */ new Table(0, 0, -1, null),
/* NxS[ 47] */ new Table(0, 0, -1, null),
/* NxS[ 48] */ new Table(0, 0, -1, null),
/* NxS[ 49] */ new Table(26, 19, -1, new sbyte[] {49, 49, 49, -1, -1, -1,
-1, -1, -1, -1, -1, 49, -1, -1, -1, -1, 49, 49, 49}),
/* NxS[ 50] */ new Table(0, 0, -1, null),
/* NxS[ 51] */ new Table(0, 7, 51, new sbyte[] {-1, 51, 51, 51, 51, 51,
/* NxS[ 49] */ new Table(0, 0, -1, null),
/* NxS[ 50] */ new Table(26, 19, -1, new sbyte[] {50, 50, 50, -1, -1, -1,
-1, -1, -1, -1, -1, 50, -1, -1, -1, -1, 50, 50, 50}),
/* NxS[ 51] */ new Table(0, 0, -1, null),
/* NxS[ 52] */ new Table(0, 7, 52, new sbyte[] {-1, 52, 52, 52, 52, 52,
-1}),
/* NxS[ 52] */ new Table(0, 0, -1, null),
/* NxS[ 53] */ new Table(0, 0, -1, null),
/* NxS[ 54] */ new Table(0, 0, -1, null),
/* NxS[ 55] */ new Table(0, 0, -1, null),
/* NxS[ 56] */ new Table(9, 1, -1, new sbyte[] {57}),
/* NxS[ 57] */ new Table(0, 0, -1, null),
/* NxS[ 56] */ new Table(0, 0, -1, null),
/* NxS[ 57] */ new Table(9, 1, -1, new sbyte[] {58}),
/* NxS[ 58] */ new Table(0, 0, -1, null),
/* NxS[ 59] */ new Table(1, 1, -1, new sbyte[] {62}),
/* NxS[ 60] */ new Table(4, 1, -1, new sbyte[] {101}),
/* NxS[ 61] */ new Table(0, 0, -1, null),
/* NxS[ 62] */ new Table(0, 7, 62, new sbyte[] {-1, 62, 62, 62, 62, 62,
/* NxS[ 59] */ new Table(0, 0, -1, null),
/* NxS[ 60] */ new Table(1, 1, -1, new sbyte[] {63}),
/* NxS[ 61] */ new Table(4, 1, -1, new sbyte[] {102}),
/* NxS[ 62] */ new Table(0, 0, -1, null),
/* NxS[ 63] */ new Table(0, 7, 63, new sbyte[] {-1, 63, 63, 63, 63, 63,
-1}),
/* NxS[ 63] */ new Table(40, 36, 25, new sbyte[] {26, 25, 24, 25, 25, 27,
/* NxS[ 64] */ new Table(40, 36, 25, new sbyte[] {26, 25, 24, 25, 25, 27,
28, 2, -1, 1, 2, 3, 4, -1, -1, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 24}),
/* NxS[ 64] */ new Table(45, 4, 64, new sbyte[] {31, 64, 64, -1}),
/* NxS[ 65] */ new Table(26, 17, -1, new sbyte[] {33, 33, -1, -1, -1, -1,
/* NxS[ 65] */ new Table(45, 4, 65, new sbyte[] {31, 65, 65, -1}),
/* NxS[ 66] */ new Table(26, 17, -1, new sbyte[] {33, 33, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33}),
/* NxS[ 66] */ new Table(20, 23, -1, new sbyte[] {67, 67, -1, -1, -1, -1,
/* NxS[ 67] */ new Table(20, 23, -1, new sbyte[] {68, 68, -1, -1, -1, -1,
32, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
32}),
/* NxS[ 67] */ new Table(26, 17, -1, new sbyte[] {32, 32, -1, -1, -1, -1,
/* NxS[ 68] */ new Table(26, 17, -1, new sbyte[] {32, 32, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32}),
/* NxS[ 68] */ new Table(27, 1, -1, new sbyte[] {34}),
/* NxS[ 69] */ new Table(28, 9, -1, new sbyte[] {70, -1, -1, -1, 71, -1,
-1, -1, 72}),
/* NxS[ 70] */ new Table(29, 1, -1, new sbyte[] {86}),
/* NxS[ 71] */ new Table(36, 1, -1, new sbyte[] {77}),
/* NxS[ 72] */ new Table(39, 1, -1, new sbyte[] {73}),
/* NxS[ 73] */ new Table(30, 1, -1, new sbyte[] {74}),
/* NxS[ 74] */ new Table(28, 1, -1, new sbyte[] {75}),
/* NxS[ 75] */ new Table(22, 1, -1, new sbyte[] {76}),
/* NxS[ 76] */ new Table(22, 1, -1, new sbyte[] {37}),
/* NxS[ 77] */ new Table(37, 1, -1, new sbyte[] {78}),
/* NxS[ 78] */ new Table(36, 1, -1, new sbyte[] {79}),
/* NxS[ 79] */ new Table(28, 1, -1, new sbyte[] {80}),
/* NxS[ 80] */ new Table(38, 1, -1, new sbyte[] {81}),
/* NxS[ 81] */ new Table(28, 1, -1, new sbyte[] {82}),
/* NxS[ 82] */ new Table(35, 1, -1, new sbyte[] {83}),
/* NxS[ 83] */ new Table(36, 1, -1, new sbyte[] {84}),
/* NxS[ 84] */ new Table(22, 1, -1, new sbyte[] {85}),
/* NxS[ 85] */ new Table(22, 1, -1, new sbyte[] {38}),
/* NxS[ 86] */ new Table(30, 1, -1, new sbyte[] {87}),
/* NxS[ 87] */ new Table(31, 1, -1, new sbyte[] {88}),
/* NxS[ 88] */ new Table(28, 1, -1, new sbyte[] {89}),
/* NxS[ 89] */ new Table(32, 1, -1, new sbyte[] {90}),
/* NxS[ 69] */ new Table(27, 1, -1, new sbyte[] {34}),
/* NxS[ 70] */ new Table(28, 9, -1, new sbyte[] {71, -1, -1, -1, 72, -1,
-1, -1, 73}),
/* NxS[ 71] */ new Table(29, 1, -1, new sbyte[] {87}),
/* NxS[ 72] */ new Table(36, 1, -1, new sbyte[] {78}),
/* NxS[ 73] */ new Table(39, 1, -1, new sbyte[] {74}),
/* NxS[ 74] */ new Table(30, 1, -1, new sbyte[] {75}),
/* NxS[ 75] */ new Table(28, 1, -1, new sbyte[] {76}),
/* NxS[ 76] */ new Table(22, 1, -1, new sbyte[] {77}),
/* NxS[ 77] */ new Table(22, 1, -1, new sbyte[] {37}),
/* NxS[ 78] */ new Table(37, 1, -1, new sbyte[] {79}),
/* NxS[ 79] */ new Table(36, 1, -1, new sbyte[] {80}),
/* NxS[ 80] */ new Table(28, 1, -1, new sbyte[] {81}),
/* NxS[ 81] */ new Table(38, 1, -1, new sbyte[] {82}),
/* NxS[ 82] */ new Table(28, 1, -1, new sbyte[] {83}),
/* NxS[ 83] */ new Table(35, 1, -1, new sbyte[] {84}),
/* NxS[ 84] */ new Table(36, 1, -1, new sbyte[] {85}),
/* NxS[ 85] */ new Table(22, 1, -1, new sbyte[] {86}),
/* NxS[ 86] */ new Table(22, 1, -1, new sbyte[] {38}),
/* NxS[ 87] */ new Table(30, 1, -1, new sbyte[] {88}),
/* NxS[ 88] */ new Table(31, 1, -1, new sbyte[] {89}),
/* NxS[ 89] */ new Table(28, 1, -1, new sbyte[] {90}),
/* NxS[ 90] */ new Table(32, 1, -1, new sbyte[] {91}),
/* NxS[ 91] */ new Table(33, 1, -1, new sbyte[] {92}),
/* NxS[ 92] */ new Table(34, 1, -1, new sbyte[] {93}),
/* NxS[ 93] */ new Table(35, 1, -1, new sbyte[] {94}),
/* NxS[ 94] */ new Table(22, 1, -1, new sbyte[] {95}),
/* NxS[ 95] */ new Table(22, 1, -1, new sbyte[] {39}),
/* NxS[ 96] */ new Table(0, 7, 96, new sbyte[] {-1, 96, 50, 96, 96, 96,
/* NxS[ 91] */ new Table(32, 1, -1, new sbyte[] {92}),
/* NxS[ 92] */ new Table(33, 1, -1, new sbyte[] {93}),
/* NxS[ 93] */ new Table(34, 1, -1, new sbyte[] {94}),
/* NxS[ 94] */ new Table(35, 1, -1, new sbyte[] {95}),
/* NxS[ 95] */ new Table(22, 1, -1, new sbyte[] {96}),
/* NxS[ 96] */ new Table(22, 1, -1, new sbyte[] {39}),
/* NxS[ 97] */ new Table(0, 7, 97, new sbyte[] {-1, 97, 51, 97, 97, 97,
-1}),
/* NxS[ 97] */ new Table(2, 1, 53, new sbyte[] {54}),
/* NxS[ 98] */ new Table(8, 1, 55, new sbyte[] {56}),
/* NxS[ 99] */ new Table(0, 0, -1, null),
/* NxS[ 100] */ new Table(1, 3, 58, new sbyte[] {59, 58, 60}),
/* NxS[ 101] */ new Table(0, 7, 101, new sbyte[] {-1, 101, 61, 101, 101, 101,
/* NxS[ 98] */ new Table(2, 1, 54, new sbyte[] {55}),
/* NxS[ 99] */ new Table(8, 1, 56, new sbyte[] {57}),
/* NxS[ 100] */ new Table(0, 0, -1, null),
/* NxS[ 101] */ new Table(1, 3, 59, new sbyte[] {60, 59, 61}),
/* NxS[ 102] */ new Table(0, 7, 102, new sbyte[] {-1, 102, 62, 102, 102, 102,
-1}),
};

Expand Down Expand Up @@ -2064,24 +2065,27 @@ int Scan()
return (int)Tokens.tkQuestionPoint;
break;
case 45:
return (int)Tokens.tkDotDot;
return (int)Tokens.tkQuestionSquareOpen;
break;
case 46:
yylval = new Union(); yylval.op = new op_type_node(Operators.Assignment); return (int)Tokens.tkAssign;
return (int)Tokens.tkDotDot;
break;
case 47:
yylval = new Union(); yylval.op = new op_type_node(Operators.AssignmentMultiplication); return (int)Tokens.tkMultEqual;
yylval = new Union(); yylval.op = new op_type_node(Operators.Assignment); return (int)Tokens.tkAssign;
break;
case 48:
BEGIN(COMMENT1);
yylval = new Union(); yylval.op = new op_type_node(Operators.AssignmentMultiplication); return (int)Tokens.tkMultEqual;
break;
case 49:
BEGIN(COMMENT1);
break;
case 50:
yylval = new Union();
currentLexLocation = CurrentLexLocation;
yylval.ex = parsertools.create_hex_const(yytext,currentLexLocation);
return (int)Tokens.tkHex;
break;
case 50:
case 51:
if (parsertools.build_tree_for_formatter)
break;

Expand Down Expand Up @@ -2132,36 +2136,36 @@ int Scan()
Defines.Add(directiveparam);
}
break;
case 51:
case 52:
{

}
break;
case 52:
case 53:
yylval = new Union(); yylval.op = new op_type_node(Operators.AssignmentDivision); return (int)Tokens.tkDivEqual;
break;
case 53:
case 54:
{
}
break;
case 54:
case 55:
BEGIN(INITIAL);
break;
case 55:
case 56:
case 57:
{
}
break;
case 57:
case 58:
BEGIN(INITIAL);
break;
case 58:
case 59:
case 60:
case 61:
{
}
break;
case 61:
case 62:
parsertools.DivideDirectiveOn(yytext,out directivename,out directiveparam);
parsertools.CheckDirectiveParams(directivename,directiveparam); // directivename in UPPERCASE!
if (directivename == "IFDEF")
Expand Down Expand Up @@ -2193,7 +2197,7 @@ int Scan()
BEGIN(INITIAL);
}
break;
case 62:
case 63:
{

}
Expand Down
1 change: 1 addition & 0 deletions Parsers/PascalABCParserNewSaushkin/ABCPascal.lex
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ UNICODEARROW \x890
"]" { return (int)Tokens.tkSquareClose; }
"?" { return (int)Tokens.tkQuestion; }
"?." { return (int)Tokens.tkQuestionPoint; }
"?[" { return (int)Tokens.tkQuestionSquareOpen; }
"@" { yylval = new Union(); yylval.op = new op_type_node(Operators.AddressOf); return (int)Tokens.tkAddressOf; }
":=" { yylval = new Union(); yylval.op = new op_type_node(Operators.Assignment); return (int)Tokens.tkAssign; }
"+=" { yylval = new Union(); yylval.op = new op_type_node(Operators.AssignmentAddition); return (int)Tokens.tkPlusEqual; }
Expand Down
7 changes: 6 additions & 1 deletion Parsers/PascalABCParserNewSaushkin/ABCPascal.y
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

%start parse_goal

%token <ti> tkDirectiveName tkAmpersend tkColon tkDotDot tkPoint tkRoundOpen tkRoundClose tkSemiColon tkSquareOpen tkSquareClose tkQuestion tkQuestionPoint
%token <ti> tkDirectiveName tkAmpersend tkColon tkDotDot tkPoint tkRoundOpen tkRoundClose tkSemiColon tkSquareOpen tkSquareClose tkQuestion tkQuestionPoint tkQuestionSquareOpen
%token <ti> tkSizeOf tkTypeOf tkWhere tkArray tkCase tkClass tkAuto tkConst tkConstructor tkDestructor tkElse tkExcept tkFile tkFor tkForeach tkFunction
%token <ti> tkIf tkImplementation tkInherited tkInterface tkProcedure tkOperator tkProperty tkRaise tkRecord tkSet tkType tkThen tkUses tkVar tkWhile tkWith tkNil
%token <ti> tkGoto tkOf tkLabel tkLock tkProgram tkEvent tkDefault tkTemplate tkPacked tkExports tkResourceString tkThreadvar tkSealed tkPartial tkTo tkDownto
Expand Down Expand Up @@ -3090,6 +3090,11 @@ variable
}
else $$ = new indexer($1 as addressed_value,el, @$);
}
| variable tkQuestionSquareOpen format_expr tkSquareClose
{
var fe = $3 as format_expr; // SSM 9/01/17
$$ = new slice_expr_question($1 as addressed_value,fe.expr,fe.format1,fe.format2,@$);
}
| variable tkRoundOpen optional_expr_list tkRoundClose
{
$$ = new method_call($1 as addressed_value,$3 as expression_list, @$);
Expand Down
Loading

0 comments on commit 32cc3ed

Please sign in to comment.