Commit graph

300 commits

Author SHA1 Message Date
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
AlexanderZemlyak a6a25d955d
Preprocessor removal (#3113)
* Remove preprocessor

* Delete preprocessor localization files

* Clean up code

* Remove adding directive in EXCLUDETEXT section

* Fix directive adding in EXCLUDETEXT

* Remove preprocessor leftovers

* More clean up

* Rename preprocessor to ifdef_directive

* Fix building tree for formatter variable assigning

* Restore convert4.exe

* Rework adding directive in EXCLUDETEXT

Более логично будет все-таки так.
2024-05-09 19:04:31 +03:00
Sun Serega 42fd1da870
+1 2024-05-06 01:41:52 +02:00
Sun Serega ba8a510185
fix SEMICOLON_BEFORE_ELSE 2024-05-06 01:40:53 +02:00
Sun Serega 2358149c70 convert all Lng files to UTF8+BOM 2024-05-06 01:15:29 +02:00
AlexanderZemlyak acb1be8c92
Directives fixes (#3110)
* Unify directive errors

* Add new quotesAreSpecialSymbols field to DirectifeInfo

* Rewrite directive parsing and checks

* Delete R+ directive from pascal tests
2024-05-05 18:12:35 +03:00
Sun Serega edf3358b39
Предупреждения для $else и $endif, у которых не совпадает имя дефайна (#3109)
* `$ifdef`: add warnings

* save directive name casing
2024-05-05 18:09:39 +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 d985949db1 Многострочные строки локализация и добавление сообщений об ошибках 2024-03-21 21:40:00 +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
bormant e4d63bfef9
Fix typo: C (ru) -> C (en) (#3042) 2024-02-27 23:18:25 +03:00
bormant 84dc17a37c
Fix typo: math -> match (#3040) 2024-02-09 00:03:50 +03:00
Ivan Bondarev be92ef2104 #3023 2024-01-14 14:03:47 +01:00
Ivan Bondarev 2dbe47c613 #2728 2024-01-05 16:34:30 +01:00
Ivan Bondarev 66ba00972f #2785 2024-01-04 15:32:19 +01:00
Mikhalkovich Stanislav b33efb5915 Разделители _ в числовых константах 2023-09-13 11:16:18 +03:00
Ivan Bondarev e6b6a72dc7
Merge pull request #2821 from samuraiGH/TargetFramework
Директива {$TargetFramework}
2023-07-16 12:11:05 +02:00
Mikhalkovich Stanislav 522b744236 Примеры для 3.9.0
CartesianPower(Self: string
Некоторые проверки именованных аргументов
2023-05-08 20:05:55 +03:00
Mikhalkovich Stanislav 432cb51212 Именованные параметра подчищены.
Исправлены мелкие ошибки
Исправлены сообщения об ошибках в сторону понятности
2023-05-07 14:49:52 +03:00
Ivan Bondarev 110a19ff90 fix #2827 2023-04-02 11:52:04 +02:00
samuraiGH 3e83d3e3b5 добавление директивы TargetFramework 2023-03-12 16:37:50 +03:00
Ivan Bondarev 5c5572897d #2808 2023-03-05 12:21:51 +01:00
Ivan Bondarev 4129ba6bb0
Merge pull request #2806 from samuraiGH/fix-2494
fix #2494
2023-02-19 12:44:12 +01:00
samuraiGH 342b8d5272 fix #2494 2023-02-18 12:31:48 +03:00
大眼仔旭 493c1d2948
Update Simplified Chinese language translation
Update Simplified Chinese language translation
2023-02-18 11:55:53 +08:00
Mikhalkovich Stanislav fb8384428a Попробовал сделать ковариантность
Обновил год до 2023
2023-01-06 23:09:01 +03:00
Mikhalkovich Stanislav c1c4e4499a Исправлены RobotField, DrawmanField - в CorrectWHLT
Поправлено окно About - улучшено оформление и добавлена гипетрссылка на Telegram канал
2022-12-21 00:12:59 +03:00
Sun Serega 258d8d6c6a fix #2725 2022-09-27 17:47:23 +03:00
Ivan Bondarev d602e87f18 #2688
#2678
2022-07-29 12:32:48 +02:00
Mikhalkovich Stanislav 6e34bc00fa TeacherControlPlugin в проекте
GraphABCLinux
Поправил иконку PABCHealth
Изменения в LightPT.pas
Цветной вывод в окне вывода (только для Windows)
Console.OutputEncoding := new System.Text.UTF8Encoding(false); в __RedirectIOMode.pas чтобы в Linux нормально выводилось
2022-07-10 14:51:51 +03:00
Sun Serega 64f3ccd6c9 Check where interfaces 2022-03-20 22:05:29 +02:00
Ivan Bondarev 759112e495 #2639 2022-03-20 11:17:00 +01:00
Sun Serega 0d3a4e3b9e fix #2640 2022-03-20 00:55:39 +02:00
Mikhalkovich Stanislav aece73f33c for var i:=1 to 5 step 2 do 2022-02-21 17:03:34 +03:00
Mikhalkovich Stanislav 0f25d86303 fix #2586 2021-12-25 22:08:55 +03:00
Ivan Bondarev 7e18d092e8 bug fix #2568 2021-11-21 12:43:55 +01:00
Ivan Bondarev 945e34bc3f Временная опция "Использовать компилятор для Intellisense" 2021-11-14 11:34:27 +01:00
Mikhalkovich Stanislav ecf7ef3663 [Cache] может работать с exit и использует d.TryGetValue 2021-08-28 23:15:33 +03:00
Mikhalkovich Stanislav de55f99304 Различные ограничения на функции с параметром [Cache] 2021-08-09 22:37:53 +03:00
Ivan Bondarev a1fa68d9a0 #2481 2021-05-13 10:45:30 +02:00
Ivan Bondarev 156f905cfe
Merge pull request #2465 from SunSerega/sealed-abstract-err
Нормальная ошибка при неявно-абстрактом классе
2021-03-31 20:37:06 +02:00
Ivan Bondarev b1adbc3933 some semantic checks for explicit implemented properties 2021-03-28 14:52:18 +02:00
Ivan Bondarev 18e948a328 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
# Conflicts:
#	Parsers/PascalABCParserNewSaushkin/ABCPascal.cs
#	Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs
2021-03-28 14:10:45 +02:00
Ivan Bondarev 31cf309e4e fix #2038
fix #2033
2021-03-28 14:08:47 +02:00
Sun Serega eab2825ab8 proper errors for sealed-abstract 2021-03-28 01:08:17 +02:00
Mikhalkovich Stanislav f85758a059 Исправлена ошибка при распаковке параметров лямбд с несколькими параметрами
Divizors переименован в Divisors
2021-03-26 00:12:48 +03:00
Ivan Bondarev 9fdf8bc04b #2035 2021-03-21 14:29:43 +01:00
Mikhalkovich Stanislav 83526f7268 Сообщение "Срезы многомерных массивов разрешены только для массивов размерности < 5" 2021-03-02 16:23:15 +03:00
Mikhalkovich Stanislav c77b124cce Версия с неверно форматирующимся
##
{asg}
uses School;

procedure p := Print(1);

p;

Код с ### пока без процедур и функций
2021-02-27 23:44:07 +03:00
Ivan Bondarev fbf11aea9a fix #2437 2021-02-08 20:30:22 +01:00