diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 6344bb059..acb2c5f1a 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "2"; public const string Minor = "2"; public const string Build = "0"; - public const string Revision = "1019"; + public const string Revision = "1022"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index 19fd861c9..ccee83330 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %MINOR%=2 -%REVISION%=1019 +%REVISION%=1022 %MAJOR%=2 %COREVERSION%=0 diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index f4cd15ac6..139ae233c 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -2,7 +2,7 @@ // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 // Machine: SSM -// DateTime: 25.08.2015 22:41:39 +// DateTime: 26.08.2015 21:42:03 // UserName: ????????? // GPLEX input file // GPLEX frame file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 226d1f438..b1e76c6e2 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: SSM -// DateTime: 25.08.2015 22:41:40 +// DateTime: 26.08.2015 21:42:04 // UserName: ????????? // Input file diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 844cb1156..a3b110dcd 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '2.2.0.1019' \ No newline at end of file +!define VERSION '2.2.0.1022' \ No newline at end of file diff --git a/TreeConverter/TreeConversion/compilation_context.cs b/TreeConverter/TreeConversion/compilation_context.cs index 3a15407d4..a3c2285b4 100644 --- a/TreeConverter/TreeConversion/compilation_context.cs +++ b/TreeConverter/TreeConversion/compilation_context.cs @@ -48,6 +48,7 @@ namespace PascalABCCompiler.TreeConverter public class compilation_context { private ContextState SavedContext = null; // сохраненный контекст, используется при переходе к другому контексту при компиляции и последующем возврате к первоначальному контексту + public Stack SavedContextStack = new Stack(); // SSM 26/08/15 - пробую сделать стек контекстов. Может, что-то надо удет клонировать? // Существуют 3 перехода вверх: // Из блока в раздел описаний до beginа этого блока (если это глобальный блок, то - на глобальный уровень). Обнуляется convertion_data_and_alghoritms.statement_list_stack. Поля func_stack и _ctn остаются нетронутыми @@ -96,6 +97,8 @@ namespace PascalABCCompiler.TreeConverter SavedContext.member_decls = member_decls; SavedContext.types_predefined = _types_predefined; SavedContext.ret_value = syntax_tree_visitor.ret.get_result(); + + SavedContextStack.Push(SavedContext); // SavedContext.type_stack = type_stack; convertion_data_and_alghoritms.statement_list_stack = new statement_list_stack(); @@ -127,6 +130,7 @@ namespace PascalABCCompiler.TreeConverter public void RestoreCurrentContext() { + SavedContext = SavedContextStack.Pop(); convertion_data_and_alghoritms.statement_list_stack = SavedContext.stlist_stack; _cmn = SavedContext.cmn; _ctn = SavedContext.ctn; @@ -151,7 +155,8 @@ namespace PascalABCCompiler.TreeConverter _types_predefined = SavedContext.types_predefined; syntax_tree_visitor.ret.return_value(SavedContext.ret_value); - SavedContext = null; + if (SavedContextStack.Count == 0) + SavedContext = null; // type_stack = cs.type_stack; оно почему-то readonly - ну и ладно } diff --git a/bin/AspectCore.dll b/bin/AspectCore.dll index 39f6c0e88..3f1f0ddeb 100644 Binary files a/bin/AspectCore.dll and b/bin/AspectCore.dll differ diff --git a/bin/Lib/PABCRtl.dll b/bin/Lib/PABCRtl.dll index a65531364..ab0577dfd 100644 Binary files a/bin/Lib/PABCRtl.dll and b/bin/Lib/PABCRtl.dll differ diff --git a/bin/Lib/PABCSystem.axml b/bin/Lib/PABCSystem.axml index a2166fc1f..98172c413 100644 --- a/bin/Lib/PABCSystem.axml +++ b/bin/Lib/PABCSystem.axml @@ -1,34 +1,114 @@ - - - + + + Раздел интерфейса - \PABCSystem.pas - MaxShortInt = shortint.MaxValue; Стандартные константы + \PABCSystem.pas + + + const + + + + + + MaxShortInt + = + shortint + . + MaxValue + + + MaxByte + = + byte + . + MaxValue + + + MaxSmallInt + = + smallint + . + MaxValue + + + MaxWord + = + word + . + MaxValue + + + MaxLongWord + = + longword + . + MaxValue + + + MaxInt64 + = + int64 + . + MaxValue + + + MaxUInt64 + = + uint64 + . + MaxValue + + + MaxDouble + = + real + . + MaxValue + + + MinDouble + = + real + . + Epsilon + + + MaxReal + = + real + . + MaxValue + + - - - - - PAS_TreeNode + Стандартные типы \PABCSystem.pas object = System.Object; - Стандартные типы + + + object + = + System + . + Object + + + + Классы коллекций \PABCSystem.pas List<T> = System.Collections.Generic.List<T>; - Классы коллекций - - - - + + List < T @@ -44,37 +124,33 @@ < T > - - - - Field + + + + + Action, Func и Predicate \PABCSystem.pas Action0 = System.Action; - Action, Func и Predicate - - - - + + Action0 = System . Action - - - - Field + + + + + Regex \PABCSystem.pas Regex = System.Text.RegularExpressions.Regex; - Regex - - - - + + Regex = System @@ -84,52 +160,46 @@ RegularExpressions . Regex - - - - Field + + + + + Типы указателей \PABCSystem.pas PBoolean = ^boolean;//bool - Типы указателей - - - - + + PBoolean = ^ boolean - - - - Field + + + + + Класс текстового файла \PABCSystem.pas Text = class - Класс текстового файла - - - - + + Text = class - - - - Class + + + + + Класс стандартного множества \PABCSystem.pas TypedSet = class (System.Collections.IEnumerable) - Класс стандартного множества - - - - + + TypedSet = class @@ -140,35 +210,31 @@ . IEnumerable ) - - - - Class + + + + + Класс AbstractBinaryFile \PABCSystem.pas AbstractBinaryFile = class - Класс AbstractBinaryFile - - - - + + AbstractBinaryFile = class - - - - Class + + + + + Класс TypedFile \PABCSystem.pas TypedFile = sealed class(AbstractBinaryFile) - Класс TypedFile - - - - + + TypedFile = sealed @@ -176,19 +242,17 @@ ( AbstractBinaryFile ) - - - - Class + + + + + Класс BinaryFile \PABCSystem.pas BinaryFile = sealed class(AbstractBinaryFile) - Класс BinaryFile - - - - + + BinaryFile = sealed @@ -196,33 +260,19 @@ ( AbstractBinaryFile ) - - - - Class + + + + - - - - object - = - System - . - Object - - - - Field + Функции работы со стандартными множествами \PABCSystem.pas function Union(s1, s2: TypedSet): TypedSet; - Функции работы со стандартными множествами - - - - + + function Union ( @@ -234,24 +284,25 @@ ) : TypedSet - - - - MethodHeader + + + + + Подпрограммы ввода read \PABCSystem.pas // read - readln - Подпрограммы ввода read + + + + Ввод из текстового файла \PABCSystem.pas procedure Read(f: Text); - Ввод из текстового файла - - - - + + procedure Read ( @@ -259,37 +310,28 @@ : Text ) - - - - MethodHeader + + + + - - - - - PAS_TreeNode + Подпрограммы ввода write \PABCSystem.pas // write - writeln - Подпрограммы ввода write + + + - - - - - PAS_TreeNode + Процедуры Print \PABCSystem.pas procedure Print(params args: array of object); - Процедуры Print - - - - + + procedure Print ( @@ -300,19 +342,17 @@ of object ) - - - - MethodHeader + + + + + Подпрограммы для работы с текстовыми файлами \PABCSystem.pas procedure Assign(f: Text; name: string); - Подпрограммы для работы с текстовыми файлами - - - - + + procedure Assign ( @@ -324,19 +364,17 @@ : string ) - - - - MethodHeader + + + + + Подпрограммы для работы с двоичными файлами \PABCSystem.pas procedure Assign(f: AbstractBinaryFile; name: string); - Подпрограммы для работы с двоичными файлами - - - - + + procedure Assign ( @@ -348,19 +386,17 @@ : string ) - - - - MethodHeader + + + + + Подпрограммы для работы с типизированными файлами \PABCSystem.pas function FilePos(f: TypedFile): int64; - Подпрограммы для работы с типизированными файлами - - - - + + function FilePos ( @@ -370,19 +406,17 @@ ) : int64 - - - - MethodHeader + + + + + Подпрограммы для работы с бестиповыми файлами \PABCSystem.pas function FilePos(f: BinaryFile): int64; - Подпрограммы для работы с бестиповыми файлами - - - - + + function FilePos ( @@ -392,36 +426,32 @@ ) : int64 - - - - MethodHeader + + + + + Cистемные подпрограммы \PABCSystem.pas function ParamCount: integer; - Cистемные подпрограммы - - - - + + function ParamCount : integer - - - - MethodHeader + + + + + Функции для работы с именами файлов \PABCSystem.pas function ExtractFileName(fname: string): string; - Функции для работы с именами файлов - - - - + + function ExtractFileName ( @@ -431,19 +461,17 @@ ) : string - - - - MethodHeader + + + + + Математические подпрограммы \PABCSystem.pas function Sign(x: shortint): integer; - Математические подпрограммы - - - - + + function Sign ( @@ -453,19 +481,17 @@ ) : integer - - - - MethodHeader + + + + + Подпрограммы для работы с символами и строками \PABCSystem.pas function Chr(a: byte): char; - Подпрограммы для работы с символами и строками - - - - + + function Chr ( @@ -475,19 +501,17 @@ ) : char - - - - MethodHeader + + + + + Общие подпрограммы \PABCSystem.pas procedure Inc(var i: integer); - Общие подпрограммы - - - - + + procedure Inc ( @@ -496,19 +520,17 @@ : integer ) - - - - MethodHeader + + + + + Подпрограммы для работы с динамическими массивами \PABCSystem.pas function Low(i: System.Array): integer; - Подпрограммы для работы с динамическими массивами - - - - + + function Low ( @@ -520,19 +542,17 @@ ) : integer - - - - MethodHeader + + + + + Подпрограммы для работы с последовательностями \PABCSystem.pas function Range(a,b: integer): IEnumerable<integer>; - Подпрограммы для работы с последовательностями - - - - + + function Range ( @@ -547,130 +567,111 @@ < integer > - - - - MethodHeader + + + + + Подпрограммы для работы с Tuplами \PABCSystem.pas // Tuples - Подпрограммы для работы с Tuplами + + + - - - - - PAS_TreeNode + Подпрограммы работы со словарями \PABCSystem.pas // Dict - Подпрограммы работы со словарями + + + - - - - - PAS_TreeNode + Общедоступные переменные \PABCSystem.pas CurrentIOSystem: IOSystem; - Общедоступные переменные - - - - + + CurrentIOSystem : IOSystem - - - - Field + + + + - + Раздел реализации \PABCSystem.pas implementation - Раздел реализации + + + - - - - - PAS_TreeNode Подсистема ввода-вывода + Интерфейс IOSystem подсистемы ввода/вывода \PABCSystem.pas /// Интерфейс подсистемы ввода/вывода - Интерфейс IOSystem подсистемы ввода/вывода + + + - - - - - PAS_TreeNode + IOStandardSystem = class(IOSystem) \PABCSystem.pas IOStandardSystem = class(IOSystem) - IOStandardSystem = class(IOSystem) - - - \PABCSystem.pas - function IOStandardSystem.peek: integer; - IOStandardSystem - реализация - - - - - function - IOStandardSystem - . - peek - : - integer - - - - Method - - - - - + + IOStandardSystem = class ( IOSystem ) - - - - Class + + + + + + IOStandardSystem - реализация + \PABCSystem.pas + function IOStandardSystem.peek: integer; + + + function + IOStandardSystem + . + peek + : + integer + + + + + + - Функции Seq - \PABCSystem.pas - function Seq<T>(params a: array of T): array of T; Seq - интерфейс - - - - + \PABCSystem.pas + + function Seq < @@ -688,19 +689,16 @@ sequence of T - - - - MethodHeader + + + + - \PABCSystem.pas - function Seq<T>(params a: array of T): array of T; Seq - реализация - - - - + \PABCSystem.pas + + function Seq < @@ -718,40 +716,75 @@ sequence of T - - - - MethodHeader + + + + - Обработка ошибок в PABCSystem - \PABCSystem.pas - WRITELN_IN_BINARYFILE_ERROR_MESSAGE = 'Операция Writeln не применима к бинарным файлам'; Константы ошибок - - - - + \PABCSystem.pas + + + const + + + + + WRITELN_IN_BINARYFILE_ERROR_MESSAGE = - - - - Field + + + InternalNullBasedArrayName + = + + + FILE_NOT_ASSIGNED + = + + + FILE_NOT_OPENED + = + + + FILE_NOT_OPENED_FOR_READING + = + + + FILE_NOT_OPENED_FOR_WRITING + = + + + RANGE_ERROR_MESSAGE + = + + + EOF_FOR_TEXT_WRITEOPENED + = + + + EOLN_FOR_TEXT_WRITEOPENED + = + + + SEEKEOF_FOR_TEXT_WRITEOPENED + = + + + + GetTranslation \PABCSystem.pas function GetTranslation(message: string): string; - GetTranslation - - - - + + function GetTranslation ( @@ -761,13 +794,12 @@ ) : string - - - - Method + + + + - Ввод-вывод в текстовый файл @@ -776,13 +808,11 @@ read (f: Text ... + read(f: Text) \PABCSystem.pas procedure read(f: Text); - read(f: Text) - - - - + + procedure read ( @@ -790,19 +820,17 @@ : Text ) - - - - Method + + + + + read_lexem \PABCSystem.pas function read_lexem(f: Text): string; - read_lexem - - - - + + function read_lexem ( @@ -812,19 +840,17 @@ ) : string - - - - Method + + + + + procedure read(f: Text; var x: string); \PABCSystem.pas procedure read(f: Text; var x: string); - procedure read(f: Text; var x: string); - - - - + + procedure read ( @@ -837,25 +863,22 @@ : string ) - - - - Method + + + + - write (f: Text ... + procedure write(f: Text); \PABCSystem.pas procedure write(f: Text); - procedure write(f: Text); - - - - + + procedure write ( @@ -863,19 +886,17 @@ : Text ) - - - - Method + + + + + procedure write(f: Text; val: object); \PABCSystem.pas procedure write(f: Text; val: object); - procedure write(f: Text; val: object); - - - - + + procedure write ( @@ -887,16 +908,14 @@ : object ) - - - - Method + + + + - - Методы расширения @@ -905,35 +924,29 @@ Методы расширения для string + Extension methods for String 1 \PABCSystem.pas // Linq ext - Extension methods for String 1 + + + - - - - - PAS_TreeNode + Операции со строками как методы расширения \PABCSystem.pas // Extension methods for String - Операции со строками как методы расширения + + + - - - - - PAS_TreeNode + Extension methods for String 3 - read \PABCSystem.pas function string.ReadInteger(var from: integer): integer; - Extension methods for String 3 - read - - - - + + function string . @@ -946,50 +959,42 @@ ) : integer - - - - Method + + + + - + Extension methods for BigInteger \PABCSystem.pas // Extension methods for BigInteger - Extension methods for BigInteger + + + - - - - - PAS_TreeNode + Extension methods for IEnumerable<T> \PABCSystem.pas // Extension methods for IEnumerable<T> - Extension methods for IEnumerable<T> + + + - - - - - PAS_TreeNode - Операции + Операции над строками \PABCSystem.pas procedure string.operator+=(var left: string; right: string); - Операции над строками - - - - + + procedure string . @@ -1006,19 +1011,17 @@ : string ) - - - - Method + + + + + Операции с IEnumerable<T> \PABCSystem.pas function System.Collections.Generic.IEnumerable<T>.operator+(a,b: IEnumerable<T>): IEnumerable<T>; - Операции с IEnumerable<T> - - - - + + function System . @@ -1048,19 +1051,17 @@ < T > - - - - Method + + + + + Операции с BigInteger \PABCSystem.pas procedure BigInteger.operator+=(var p: BigInteger; q: BigInteger); - Операции с BigInteger - - - - + + procedure BigInteger . @@ -1077,22 +1078,19 @@ : BigInteger ) - - - - Method + + + + - + StructuredObjectToString \PABCSystem.pas function StructuredObjectToString(o: Object; n: integer := 0): string; - StructuredObjectToString - - - - + + function StructuredObjectToString ( @@ -1109,36 +1107,32 @@ ) : string - - - - Method + + + + + read_lexem \PABCSystem.pas function read_lexem: string;// SSM 08.03.11 - пытаюсь исправить с peekом ситуацию с вводом '1 hello'. Должно работать - read_lexem - - - - + + function read_lexem : string - - - - Method + + + + + Функция Ident \PABCSystem.pas function Ident<T1>(x: T1): T1; - Функция Ident - - - - + + function Ident < @@ -1151,19 +1145,17 @@ ) : T - - - - Method + + + + + function Copy(a: &Array) \PABCSystem.pas function Copy(a: &Array): &Array; - function Copy(a: &Array) - - - - + + function Copy ( @@ -1173,53 +1165,52 @@ ) : &Array - - - - Method + + + + + procedure Sort \PABCSystem.pas procedure Sort(a: &Array); - procedure Sort - - - - + + procedure Sort + < + T + > ( a : - &Array + array + of + T ) - - - - MethodHeader + + + + BigInteger + Операции с BigInteger \PABCSystem.pas // Extension methods for BigInteger - Операции с BigInteger + + + - - - - - PAS_TreeNode + Abs \PABCSystem.pas function Abs(x: BigInteger): BigInteger; - Abs - - - - + + function Abs ( @@ -1229,19 +1220,17 @@ ) : BigInteger - - - - MethodHeader + + + + + Power \PABCSystem.pas function Power(x: BigInteger; y: integer): BigInteger; - Power - - - - + + function Power ( @@ -1255,19 +1244,17 @@ ) : BigInteger - - - - MethodHeader + + + + + Sqr \PABCSystem.pas function Sqr(x: BigInteger): BigInteger; - Sqr - - - - + + function Sqr ( @@ -1277,19 +1264,17 @@ ) : BigInteger - - - - MethodHeader + + + + + Odd \PABCSystem.pas function Odd(i: BigInteger): boolean; - Odd - - - - + + function Odd ( @@ -1299,19 +1284,17 @@ ) : boolean - - - - MethodHeader + + + + + Max \PABCSystem.pas function Max(a, b: BigInteger): BigInteger; - Max - - - - + + function Max ( @@ -1323,19 +1306,17 @@ ) : BigInteger - - - - MethodHeader + + + + + Min \PABCSystem.pas function Min(a, b: BigInteger): BigInteger; - Min - - - - + + function Min ( @@ -1347,15 +1328,13 @@ ) : BigInteger - - - - MethodHeader + + + + - - - + \ No newline at end of file diff --git a/bin/PascalABCAspects.dll b/bin/PascalABCAspects.dll index 739e50b40..9daff5aa8 100644 Binary files a/bin/PascalABCAspects.dll and b/bin/PascalABCAspects.dll differ