Commit graph

1398 commits

Author SHA1 Message Date
Mikhalkovich Stanislav 0c997a59db Merge branch 'async-await' of https://github.com/pascalabcnet/pascalabcnet into async-await 2024-07-06 21:30:04 +03:00
Mikhalkovich Stanislav 6b1b7d6792 visit(SyntaxTree.sugared_expression - обработка await_node 2024-07-06 21:27:30 +03:00
AlexanderZemlyak ba4d274058
Async await merge (#3177)
* s.ToLines
RenameDirectory

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

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

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

* 3.9.0.3494

* add tests

* #3152

* #3152

* Don't skip PCU errors in `CompileAllUnits`

* fix #3155

* Create the array types outside of any unit/scope

* Add `use` test

* RobotField - try в блоке создания

* Исправлена Range(a, b, step: real)

LightPT - CheckOutput может принимать параметры типа последователльность - они будут вытягиваться в одну последовательность
  Для этого исправлен FlattenElement
  FlattenOutput применяется автоматически - его теперь не надо вызывать явно
TaskLoops поправлен и упрощен в соответствии с CheckOutput

* Поправлен LightPT

Упрощены TasksArr.pas TasksMatr.pas TasksStr.pas

* fix `GetReferenceFileName` dll copy (#3173)

* Исправление зависимостей проектов (#3174)

* Add workflow to build each project separately

* Make `Compiler` depend on `PascalLanguage` and `PascalABCSaushkinParser`  06e595

* Make IDE's depend on `PABCNETC`

It's launched as a separate process from IDE

* Revert pascal language moving to language plugins (#3175)

* Return Parsers folder with standard parsers and move SyntaxTreeConverters back to Core

* Rename PascalLanguage project to PascalABCLanguageInfo

* Fix pascal dll loading

* Поправлены Tasks1Arr.pas Tasks1Begin.pas Tasks1BoolIfCase.pas

* Поправил в трех проектах пути к bin

LightPT - Read...(prompt) - больше комбинаций

Loop_If_2_Sum в Tasks1Loops.pas

* #3172

* 3.9.0.3500
Хороший коммит )

* Remove extra tests

* Fix dependencies in Compiler project

* LightPT - убрал CheckOutputNew
TasksArr.pas, TasksStr.pas - правки

* #3164

* Убрали зависимость компилятора от парсера Паскаля

---------

Co-authored-by: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Co-authored-by: Sun Serega <sunserega2@gmail.com>
Co-authored-by: Ivan Bondarev <ibond84@googlemail.com>
2024-07-05 23:04:23 +03:00
Ivan Bondarev 502f74467a #3123 2024-06-09 21:30:02 +02:00
Ivan Bondarev 8bddc9e62a #3123 2024-06-09 19:35:35 +02:00
Ivan Bondarev acab4c7c01 #3091 2024-06-09 10:50:26 +02:00
AlexanderZemlyak 9f8f982cc2
Delete xml documentation of standard modules (#3140) 2024-06-04 21:49:19 +02:00
Mikhalkovich Stanislav bda964c3af fix #3133 2024-05-31 22:01:54 +03:00
AlexanderZemlyak 8acf536300
Make changes for spython compatibility (#3131)
* Update parser tools

* Update NodesBuilder

* Update syntax_tree_visitor

* Update CompilationErrors
2024-05-28 14:16:03 +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
Vladislav Krylov 5c38a46f7c
changed accces modifiers for outside visitors (#3128) 2024-05-21 20:17:57 +03:00
Vladislav Krylov 1daa515b4e
Интерфейс семантических проверок + делегат на проверку, является ли файл модулем (#3112)
* changes to fit multi semantic analyzer architecture

* Added CheckIfParsingUnit delegate to Compiler
2024-05-05 18:12:50 +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 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
Ivan Bondarev 08c5c765b7 #3080 2024-04-14 14:14:46 +02:00
Ivan Bondarev 13872fafa8 fix in read 2024-04-14 11:34:51 +02:00
Ivan Bondarev c00a0f2c85 fix in read 2024-04-14 11:10:22 +02:00
Mikhalkovich Stanislav 6d96161be1 Директива HiddenParams для скрытых модулей 2024-04-04 14:00:54 +03:00
Ivan Bondarev 22779adbf9 fix #2610 2024-04-01 14:01:09 +02:00
Ivan Bondarev ba0b0f8c39 fix #2976
fix #2881
2024-04-01 12:31:21 +02:00
Ivan Bondarev 019cd031c6 test for #3062 2024-03-31 14:25:10 +02:00
Ivan Bondarev e948a54bf4 #3062 2024-03-31 11:47:31 +02:00
Ivan Bondarev 1609eddc9d #3064 2024-03-31 10:31:22 +02:00
Mikhalkovich Stanislav f2d4637338 assign с first_assignment_defines_type и тестовым примером 2024-03-29 13:53:46 +03:00
Ivan Bondarev 031f868124 #3061 2024-03-27 20:51:01 +01:00
Ivan Bondarev a969d6de9c #3063 2024-03-26 21:49:51 +01: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 b3990e304c Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
# Conflicts:
#	Localization/DefaultLang.resources
2024-01-22 14:17:54 +03:00
Mikhalkovich Stanislav 733c9e80e5 merge 2024-01-22 14:15:19 +03:00
Ivan Bondarev be92ef2104 #3023 2024-01-14 14:03:47 +01:00
Ivan Bondarev cea1d58af6 #3013
l2.dll sources
2024-01-14 12:28:36 +01:00
Ivan Bondarev acc6458a82 fix #3008 2024-01-14 12:07:16 +01:00
Ivan Bondarev 2dbe47c613 #2728 2024-01-05 16:34:30 +01:00
Ivan Bondarev 9b3cc5ceaa #2731 2024-01-05 14:09:30 +01:00
Ivan Bondarev f2b2268866 #2729 2024-01-05 12:18:10 +01:00
Ivan Bondarev 909f5599b8 #2844 2024-01-04 19:42:14 +01:00
Ivan Bondarev 3823906c2d fix #2815 2024-01-04 17:44:29 +01:00
Ivan Bondarev 66ba00972f #2785 2024-01-04 15:32:19 +01:00
Ivan Bondarev 73de1ce639 #2677 2024-01-04 12:06:00 +01:00
Ivan Bondarev 7e0a13c6d0 #2757 2024-01-04 11:36:59 +01:00
Mikhalkovich Stanislav 4bf9c36d49 Исправление реализации (var b := 1) методом синтаксического сахара 2024-01-02 14:43:48 +03:00
Mikhalkovich Stanislav 30668e650a function f(n: integer): integer;
begin
  if n = 0 then Result := 1
  else Result := n*f(n-1);
end;

begin
  var a := (var b := f(5)) + b;
  Print(a,b);
end.
2023-12-31 21:56:13 +03:00
Ivan Bondarev 9fd8c001ce #2184 2023-12-28 14:17:25 +01:00
Ivan Bondarev a25a8bfe0e #2676 2023-12-28 11:46:18 +01:00
Ivan Bondarev 0e3a3c232e fix #2736 2023-12-28 11:24:30 +01:00
Ivan Bondarev 4f3fcec941 #2829 2023-12-27 19:30:22 +01:00