Commit graph

1160 commits

Author SHA1 Message Date
nevermind322 75e79d9a82
Assign tuple optimizer (#3160)
* branch init

* add BindCollectLightSymInfo

* moved lightsyminfo to syntaxVisitors

* LIghtSymInfo fixes

* binder 0.1

* Attributes -> SymbolAttributes

* AssignTupleOptimizer -> AssignTupleDesugar

* moved algorithm classes to AssignTupleDesugarAlgorithm namespace

* fixes and refactoring

* LightSymInfo rework

* add rebuildDebug and build units

* enable VarNamesInMethodsWithSameNameAsClassGenericParamsReplacer

* remove CollectFullLightSymInfo call

* bind now return BindResult

* change BindResult path type

* path testing

* fix Current in BindCollectLightSymInfo

* fix Current in BindCollectLightSymInfo

* fix #3116

* (the rest of the fix)

* potential symomyms handling without assigns count minimization

* assign count minimization

* rename AssignTuplesDesugar

* move NewAssignTupleDesugar

* add optimization switch

* delete AssignTupleDesugar project

* remove comments

* collect symbols from var tuples

* optimize var_tuple_def_statement and assign_var_tuple

* fix

* fix Tuple Visitor

* #3091

* #3125

* revert #3125

* #3125

* #3123

* #3123

* #3127

* fix

* del doc

* await переместил

* Перегенерировал грамматику

* s.ToLines
RenameDirectory

* Исправление ToLines

* Убрал из грамматики узлы await - случайно оставались

* Sync `.ToLines` with `System.IO.StringReader` (#3154)

* 3.9.0.3494

* add const optimization

* #3152

* #3152

---------

Co-authored-by: Sun Serega <sunserega2@gmail.com>
Co-authored-by: Ivan Bondarev <ibond84@googlemail.com>
Co-authored-by: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Co-authored-by: Артём Филонов <afilono@sfedu.ru>
2024-06-24 19:54:40 +03:00
Mikhalkovich Stanislav 54f8db8ce2 3.9.0.3489 2024-06-08 20:54:30 +03:00
Mikhalkovich Stanislav bda964c3af fix #3133 2024-05-31 22:01:54 +03:00
Mikhalkovich Stanislav 497566e325 В инсталляторе пока mini версия заменена обычной
из-за ложных срабатываний антивируса Яндекса

ProgrammRunner переписан на C# по той же причине

В Linux-версии убран rc.exe по той же причине
2024-05-28 16:45:53 +03:00
Mikhalkovich Stanislav 303a3cdb32 3.9.0.3485 2024-05-25 12:52:06 +03:00
AlexanderZemlyak 342375501b
New languages engine (#3120)
* Implement first version of languages interfaces and classes

ParsersController заменен на LanguageProvider.

* Update ParserTools.csproj

* Update RemoteCompiler.cs

* Update TestRunner

* Rename LanguageIntegrator project to Languages

* Update TestRunner

* Rename Parsers folder

* Rename PascalABCParser.dll to PascalABCLanguage.dll

* Reorganise LanguageIntegrator and rename DocTagsParser

* Update Release Generators

* Update language loading messages

* Update linux version

* Move BaseParser fields to ILanguage interface

* Revert "Update Release Generators"

This reverts commit 26a991c71b81e643d9fbd9a815ddca222768dda9.

* Revert "Rename PascalABCParser.dll to PascalABCLanguage.dll"

* Clean the mess in parser folders

* Organize namespaces properly

* Revert "Rename LanguageIntegrator project to Languages"

* Add new enclosing folders for standard languages

* Organize namespaces of LanguageIntegrator properly

* Rename StandardLanguages to Languages

* Comment the rest of Visual basic source code

* Update OutputPath in pascal parser project

* Move BaseParser methods to IParser

* Restore Pascal parser project initial structure

* Add PascalLanguage project

* Move SyntaxTreeConverters project to Languages\Pascal folder

* Rename SemanticRules in parser project

* Rename Errors1 to Errors in parser project

* Delete LambdaConverter dll from installer

* Update language integrator to load *Language.dll files

* Move lambda converter project to pascal lanuage dir

* Revert "Delete LambdaConverter dll from installer"

This reverts commit dd56f559ebe4f8c4c5c33752d44e6953001b96a5.

* Switch off VBNETParser building

* Delete syntax tree converters controller

* Delete lambda converter dll from repository

* Reorganize syntax tree to semantic tree conversion stage

* Add BaseLanguage class to make language initialization more neat

* Delete syntax tree post processors entity from ILanguage and refactor ABCStatistics calls

* Add new IDocParser interface for documentation comments parser

* Clean up folders

* Add helper data structures to reduce parameters amount in CompileInterface and CompileImplementation

* Add documentation to language classes

* Move Union struct in global namespace and project (ParserTools)

* Add more comments and a safe select language method

* Rename SemanticRules class

* Fix directives format null bug

* Add System.Linq ref to LanguageIntegrator

* Delete SyntaxToSemanticTreeConverter interface

* Add BaseSyntaxTreeConverter

* Call safe select language method in intellisence

* Delete source files providers from parsers

* Rename GetSyntaxTree method

* Change Prebuild tree to be virtual - not abstract

* Refresh documentation a bit

* Add temporary language check for ABCHealth button

* Add parser reference to parser tools

* Move current compilation unit assigning higher to avoid bug with unit check

* Delete null DirectiveInfo's and refactor directives' code

* Add a few more comments
2024-05-25 12:26:32 +03:00
Mikhalkovich Stanislav c8e5e58cff 3.9.0.3483 2024-05-21 20:47:45 +03:00
Mikhalkovich Stanislav 8a02d07fc3 3.9.0.3482 2024-05-18 00:05:32 +03:00
Mikhalkovich Stanislav e71b3cf188 Исправил вывод records, Tuples, Complex в Print 2024-05-17 23:48:28 +03:00
Mikhalkovich Stanislav 38c4901787 DrawMan исправления падения при запуске 2024-05-08 23:44:49 +03:00
Mikhalkovich Stanislav 6f4f3a8aa0 3.9.0.3478 2024-05-07 23:31:47 +03:00
Mikhalkovich Stanislav 443ed6d3d7 ObjectToString - убрал подчеркивание
TypeName - убрал артефакты реализации в implementation и тесты, это использующие
2024-05-07 12:19:23 +03:00
Mikhalkovich Stanislav 7681391663 TypeName - оставил в интерфейсе только необходимое 2024-05-06 22:30:41 +03:00
Mikhalkovich Stanislav 27fc10ab0f Странные комментарии к TypeName
LightPT - SetMessagesOn
2024-05-05 23:51:09 +03:00
AlexanderZemlyak efb4a4338f
New checks for directives added (#3099)
* Extract base classes from ParserTools (local) and GPPGParserHelper

* Fix string resources error

* Extract base class for unexpected token error

* Update ParserTools project file

* Add comments for compiler directives usages in compiler

* Add directives checks

* Move string constants to new project

* Implement scalable directives checks

* Remove known directives from compiler

* Fix PABCSystem namespace error

* Allow region and endregion with no params

* Allow parameters to endif directive

* Delete directive parameters extension checks

* Replace error with warning for uknown directive case

* Fix generate native code (semantic rule) assigning

* Improve error messages for directives

* Rename RunParseThread to SwitchOnIntellisence

Для отладки может требоваться отключение Intellisence на уровне кода. Для понятности метод назван SwitchOnIntellisence.

* Resolve merge conflicts

* Add new compiler errors for unsupported target framework and output file type

* Add documentation to directives checks

* Fix directives check loop
2024-05-04 20:21:50 +03:00
Mikhalkovich Stanislav 99845ad152 fix #3102 2024-04-29 23:02:34 +03:00
Mikhalkovich Stanislav 4eb6462fd9 3.9.0.3463 2024-04-26 00:40:48 +03:00
Mikhalkovich Stanislav e0085ece15 3.9.0.3461 2024-04-23 21:13:01 +03:00
Mikhalkovich Stanislav 9f9c2a85bd fix #3086
CompilerOptions.StandardModules.ContainsKey(currentCompilationUnit.languageName) - проверка

convert_semantic_strong - раскомментировал try чтобы лучше перехватывать параметры Exception
2024-04-23 20:51:25 +03:00
Mikhalkovich Stanislav 1e66c4d740 mre.Set(); в GraphABC.pas
(ttt[0].sym_info as var_definition_node).type = from0.type; В Assign.cs
2024-04-22 22:41:12 +03:00
Mikhalkovich Stanislav 9c2a6c1e8f Help 2024-04-16 19:31:30 +03:00
Mikhalkovich Stanislav d61d7fe017 Zip вместо ZipTuple 2024-04-14 20:15:34 +03:00
Mikhalkovich Stanislav 73d0f3528a 3.9.0.3454 2024-04-07 22:51:11 +03:00
Mikhalkovich Stanislav c56442339e ! Hidden 2024-04-07 21:42:57 +03:00
Mikhalkovich Stanislav 813c7aece7 New version 2024-04-07 20:35:51 +03:00
Mikhalkovich Stanislav 0d3ca8cdc4 dict.GeT(key,default) 2024-04-01 19:27:58 +03:00
Mikhalkovich Stanislav f2d4637338 assign с first_assignment_defines_type и тестовым примером 2024-03-29 13:53:46 +03:00
Mikhalkovich Stanislav 9a05812c1e LanguageKit в установщики
ParseXaml WPF
2024-03-24 17:02:55 +03:00
Mikhalkovich Stanislav cedb575c1b 3.9.0.3445 2024-03-23 01:24:09 +03:00
Mikhalkovich Stanislav 132ceb37b9 Println(F) исправление 2 2024-03-23 01:05:49 +03:00
Mikhalkovich Stanislav 124ae0d87a Вернул назад в связи с Pullом 2024-03-22 23:24:19 +03:00
Mikhalkovich Stanislav 76ade31e63 Исправление Println 2024-03-22 23:08:14 +03:00
Mikhalkovich Stanislav 613cb428f5 3.9.0.3440 2024-03-21 22:02:00 +03:00
Mikhalkovich Stanislav c66bfa7d92 Многострочные строковые литералы 2024-03-21 21:21:59 +03:00
Mikhalkovich Stanislav 6f158a6bef Буферизация ввода в строку
Исправление ошибки вывода лишнего пробела при s.Println
2024-03-19 18:46:20 +03:00
Mikhalkovich Stanislav f811066d7e Scan исправление 2024-03-15 21:00:39 +03:00
Mikhalkovich Stanislav a7598b50cd Scan стандартный метод расширения 2024-03-14 22:02:59 +03:00
Mikhalkovich Stanislav 5ae855a0da Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet 2024-03-13 22:23:39 +03:00
Mikhalkovich Stanislav ce2e98afdc Модуль WPF.pas 2024-03-13 22:23:17 +03:00
AlexanderZemlyak 0ae7595f0d
Implement programming languages integration functionality (#3001)
* Make standardModules Dictionary instead of LanguageId usage

* Create new common string constants for pascal language

* Add LanguagesData class template

* Move some compiler directive string constants to Compiler project

* Extract LanguagesData class to separate file

Also extracted RuntimeServiceModule (IO-modules) management to new functions.

* Fix pabcnetc crashing (KeyNotFoundException)

* Make similar change in pabcnetc_clear

* Return PABCExtensions in DomConverter.cs

* Return compiler string constants to Tree Converter

* Rename MoveSystemUnitForward method

* Rename system unit variable

* Add new parser load error (localized versions)

* Fix pascal language name constant

* Add system units property to parsers

* Add LanguageKits directory with a test file

* Implement language integrator

Был реализован загрузчик комплектов дополнительных языков (всех кроме Pascal). Был пересмотрен подход к реализации ParsersController и этот класс сделан синглтоном. Добавлена загрузка стандартных модулей языков в CompilerOptions.

* Squashed commit of the following:

commit 8f9dc7e5a0
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date:   Mon Mar 11 20:33:13 2024 +0300

    fix #3050

commit 90363ced45
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date:   Sun Mar 3 21:37:25 2024 +0300

    Недобитки при сортировке строк

commit c9d7ba7758
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date:   Sat Mar 2 13:32:14 2024 +0300

    Order и OrderDescending для строк с Ordinal

commit 6fbc0200bf
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date:   Tue Feb 27 23:21:26 2024 +0300

    Fix interface loop dependency check (#3047)

    Tests for problematic case were added

commit e4d63bfef9
Author: bormant <bormant@mail.ru>
Date:   Tue Feb 27 23:18:25 2024 +0300

    Fix typo: C (ru) -> C (en) (#3042)

commit 0d37232d21
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date:   Tue Feb 27 19:15:08 2024 +0300

    School - исправление пустого диапазона простых и IP-адресов

commit 9fd4c7f338
Merge: 3cca2a89 6027083b
Author: Ivan Bondarev <ibond84@googlemail.com>
Date:   Wed Feb 21 20:57:10 2024 +0100

    Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet

commit 3cca2a8949
Author: Ivan Bondarev <ibond84@googlemail.com>
Date:   Wed Feb 21 20:56:49 2024 +0100

    fix in formatter
2024-03-13 22:16:40 +03:00
Mikhalkovich Stanislav 8f9dc7e5a0 fix #3050 2024-03-11 20:33:13 +03:00
Mikhalkovich Stanislav 90363ced45 Недобитки при сортировке строк 2024-03-03 21:37:25 +03:00
Mikhalkovich Stanislav c9d7ba7758 Order и OrderDescending для строк с Ordinal 2024-03-02 13:32:14 +03:00
Mikhalkovich Stanislav 0d37232d21 School - исправление пустого диапазона простых и IP-адресов 2024-02-27 19:15:08 +03:00
Mikhalkovich Stanislav acc59f9c87 3.9.0.3422 2024-02-09 00:03:16 +03:00
Mikhalkovich Stanislav 72988ff4cc CRT и документация 2024-02-04 19:17:30 +03:00
Mikhalkovich Stanislav 087a00b636 Shuffle - оптимальнее 2024-01-22 14:49:04 +03:00
Mikhalkovich Stanislav 733c9e80e5 merge 2024-01-22 14:15:19 +03:00
Mikhalkovich Stanislav 564ece3614 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
# Conflicts:
#	Configuration/GlobalAssemblyInfo.cs
#	Configuration/Version.defs
#	Release/pabcversion.txt
#	ReleaseGenerators/PascalABCNET_version.nsh
2024-01-07 17:20:39 +03:00
Mikhalkovich Stanislav a868d9106f Подготовка к for как foreach 2024-01-07 17:16:29 +03:00