Commit graph

58 commits

Author SHA1 Message Date
AlexanderZemlyak 35c7bc5877
Add constructors to scanner, parser and parserTools (#3185)
* Add constructors to scanner, parser and parserTools

Добавил конструкторы, чтобы код был почище

* Change type of keywords in Scanner

* Make cast explicit

* Rebuild ABCPascal.cs
2024-07-21 13:36:15 +03:00
AlexanderZemlyak 97c29a4e1b
Compiler tiding up, refactoring Keywords class and uniting errors in Errors file (#3179)
* Tidy up first part of compiler code

* Rename Net Compiler Options

* Move CompilationErrors to Errors project

* Return default constructor to compiler warning

* Rename semantic check for include namespaces in unit

* Create two Errors files instead of one in Errors project

* Fix current unit is not main program check

* Add documentation to compilation errors in Errors project

* Return compiler thrown errors to Compiler project

* Refactor keywords class - extract base keywords functionality

* Fix keywords case sensitivity

* Fix case sensitivity again...

* Optimize keywords initialization

* Fix parse expression error because of wrong constructor call
2024-07-13 18:44:49 +03:00
AlexanderZemlyak d5e9994ff2
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
2024-07-02 16:10:50 +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
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 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
AlexanderZemlyak 4609a6dfd2
Extract base classes from ParserTools (local) and GPPGParserHelper (#3092)
* Extract base classes from ParserTools (local) and GPPGParserHelper

* Fix string resources error

* Extract base class for unexpected token error

* Update ParserTools project file
2024-04-23 10:47:48 +03:00
Mikhalkovich Stanislav c56442339e ! Hidden 2024-04-07 21:42:57 +03:00
Ivan Bondarev 21c317b303 intellisense for hiddennames 2024-04-07 11:02:01 +02:00
Mikhalkovich Stanislav 6d96161be1 Директива HiddenParams для скрытых модулей 2024-04-04 14:00:54 +03:00
Mikhalkovich Stanislav c66bfa7d92 Многострочные строковые литералы 2024-03-21 21:21:59 +03:00
Mikhalkovich Stanislav 771e1f799c первая версия async в грамматике 2023-12-08 19:37:39 +03:00
Mikhalkovich Stanislav b33efb5915 Разделители _ в числовых константах 2023-09-13 11:16:18 +03:00
Mikhalkovich Stanislav 8b60c3ced5 Убрал слово packed. Захламляет грамматику 2022-05-08 20:44:14 +03:00
Mikhalkovich Stanislav 3240593d2e Реализован foreach index
Исправлена ошибка for step
Дополнена справка по for step и foreach index
J,yjdkty ntrcnjdsq htlfrnjh? gjlcdtxbdf.obq ыеуз b штвуч rjyntrcnyj d hfvrf[ jlyjq cnhjrb
2022-02-26 12:33:53 +03:00
Mikhalkovich Stanislav aece73f33c for var i:=1 to 5 step 2 do 2022-02-21 17:03:34 +03:00
Ivan Bondarev 29a2fb4156 #2521 2021-10-10 09:53:41 +02:00
Mikhalkovich Stanislav 8eadef3cf5 tkBackSlashRoundOpen 2021-03-02 22:46:43 +03:00
Mikhalkovich Stanislav e3b59ae5a1 Константы 123bi
В модуле School - ToBase(BigInteger)
2020-11-20 14:23:49 +03:00
Mikhalkovich Stanislav 15a9445216 x → x (стрелочка :))
|1,2,3|.Print
2020-07-29 11:29:51 +03:00
Mikhalkovich Stanislav c957f65eb4 Controls - доработки
Форматирование ## и ###
2020-07-24 22:00:21 +03:00
Mikhalkovich Stanislav 8d9ad8ddef |1,2..3| запрещено
|1,'v'| запрещено
## - коррекции в Intellisense
2020-07-06 21:43:26 +03:00
Mikhalkovich Stanislav 2794392e83 Короткие программы вида
##
Print(1)

Преддверие литеральных массивов в виде |1,2,3| - пока без форматирования

Rot Triangle 1.vertex.glsl
2020-07-04 22:49:42 +03:00
Alexandr Pogorelov 8a432eee6e
Улучшение паттерн матчинга (#1949)
Матчинг констант, таплов, коллекций. Улучшение матчинга по типам.
2019-05-24 10:04:17 +03:00
Voloshin Bogdan 9ba7308c1a Remove typeclasses 2018-12-25 23:18:49 +03:00
miks1965 02991b622f fix #1419 2018-10-26 20:12:42 +03:00
Бондарев Иван 3dc45ff403 static classes #772 2018-09-22 17:49:47 +02:00
Voloshin Bogdan 12ee45f0fc Exclude typeclasses from master, because of new workflow. 2018-07-23 02:08:38 +03:00
Bogdan Voloshin a315f9f063 Merge commit '082a998786a49e4e3f3ce0ad799fe1c7b6a90fb7' into features/typeclasses-another-approach
# Conflicts:
#	Parsers/PascalABCParserNewSaushkin/ABCPascal.cs
#	Parsers/PascalABCParserNewSaushkin/ABCPascal.lex
#	Parsers/PascalABCParserNewSaushkin/ABCPascal.y
#	Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs
#	SyntaxTree/tree/AbstractVisitor.cs
#	SyntaxTree/tree/HierarchyVisitor.cs
#	SyntaxTree/tree/SyntaxTreeStreamReader.cs
#	SyntaxTree/tree/SyntaxTreeStreamWriter.cs
#	SyntaxTree/tree/Tree.cs
#	SyntaxTree/tree/Visitor.cs
#	SyntaxTree/tree/tree.xml
#	TestSuite/CompilationSamples/PABCSystem.pas
#	bin/Lib/PABCSystem.pas
2018-05-14 18:01:14 +03:00
Alexander Zakharenko 5aff52feeb Add deconstruct pattern to grammar 2018-05-01 19:29:39 +03:00
Alexander Zakharenko 3f93bfa24b Merge 'master' into 'features/patterns' 2018-04-08 13:42:32 +03:00
Bogdan Voloshin 4444cf2689 Add grammar rules and syntax nodes 2018-04-05 20:02:37 +03:00
Бондарев Иван 1e648d5a43 Форматные строки (#285) 2018-03-21 21:01:54 +01:00
miks1965 a08322e1c1 bug fix #641 2018-01-06 00:29:19 +03:00
Бондарев Иван f59c462fe7 power operator (#169) 2017-12-29 22:31:00 +01:00
Alexander Zakharenko 597ef862bc Merge branch 'master' into features/patterns
# Conflicts:
#	Parsers/PascalABCParserNewSaushkin/ABCPascal.cs
#	Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs
#	Parsers/PascalABCParserNewSaushkin/Keywords.cs
#	SyntaxTree/tree/AbstractVisitor.cs
#	SyntaxTreeConverters/StandardSyntaxConverter.cs
#	TestSuite/CompilationSamples/PABCSystem.pas
#	TestSuite/intellisense_tests/PABCSystem.pas
#	bin/Lib/PABCSystem.pas
2017-10-05 18:48:57 +03:00
Бондарев Иван d48c84f28d namespaces (alpha) 2017-09-24 12:12:27 +02:00
Alexander Zakharenko 11f69bbf44 Merge branch 'master' into features/patterns
# Conflicts:
#	CodeCompletion/CodeFormatter.cs
#	Parsers/PascalABCParserNewSaushkin/ABCPascal.y
#	SyntaxTree/tree/AbstractVisitor.cs
#	SyntaxTree/tree/HierarchyVisitor.cs
#	SyntaxTree/tree/SyntaxTreeStreamReader.cs
#	SyntaxTree/tree/SyntaxTreeStreamWriter.cs
#	SyntaxTree/tree/Tree.cs
#	SyntaxTree/tree/Visitor.cs
#	SyntaxTree/tree/tree.xml
#	SyntaxVisitors/SyntaxVisitors.csproj
#	TestSuite/CompilationSamples/PABCSystem.pas
#	bin/Lib/PABCSystem.pas
2017-07-23 22:29:24 +03:00
miks1965 389e9d27b2 Удалил коммит со step 2017-06-21 21:19:38 +03:00
miks1965 4a448b38eb Небольшие изменения в Роботе и Чертежнике
Заготовка для step в for
2017-06-20 20:29:43 +03:00
miks1965 00646f89a5 loop 5 do
write(1)
2017-06-08 17:56:17 +03:00
janise93 d6fd84b935 Add: ??, integer? and semantic checks for ?. 2017-06-03 10:19:52 +03:00
Alexander Zakharenko a45199256d Add Match...with construction 2017-02-20 13:57:13 +03:00
miks1965 32cc3ed88f a?[2:10:2] 2017-01-10 08:49:49 +03:00
miks1965 33d748adf0 Лямбды перенесены в грамматике на верхний уровень везде.
Некоторые переносы Replace между визиторами и присваивания Parent
2016-12-01 23:46:54 +03:00
miks1965 79883887d5 Всякая всячина 2016-08-27 11:14:39 +03:00
Бондарев Иван 6ccd4448d4 #159 2016-05-26 13:16:32 +02:00
miks1965 194b4fde0b event и yield теперь не требуют экранирования & в a.event, b.yield
Убрал также подсказку по Iterate  и Repeat, расширяющих ЛЮБОЙ класс
2016-04-14 22:11:30 +03:00
miks1965 e8cf5f6274 Добавление кодировки к Reset Rewrite... 2016-02-11 22:49:12 +03:00