SPython 1.0 (#3274)
* Squashed commit of the following:
commit 115ed2e1b7b361b35f0b213688ad0838e0bffa69
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Thu Nov 7 10:21:08 2024 +0300
Add from import Handling
commit bdd3eb785e6c719201104497808e89dc20c4eacc
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sun Nov 3 12:59:29 2024 +0300
Add 'Import As'
commit e5747aa56e359633be366887d3cf67d1ec054701
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sun Nov 3 11:08:50 2024 +0300
Add Ident_list to import
commit 9d16fdb341b329adae45dec2bf6db04d8572675f
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sun Nov 3 10:01:13 2024 +0300
Move Import Handling to Visitor
commit d8a0e8f5ee840e3ff15caafd7a456f91e1f2a962
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sat Nov 2 18:36:10 2024 +0300
Rename of Productions Related to Import
commit 71282a457ab0c039a2f42c05249336d92ac76e7a
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sat Nov 2 18:33:41 2024 +0300
Move import to Statements
* Add new AST visitors call template
* Add syntax tree parameter
* Add SpecialSyntaxTreeConverter
* Add CollectNamesVisitor
* Read Symbols from Semantic Tree
* Add Visitor Renewaling
* Fix Usage of Standard Libraries
* Update AssignToVarConverterVisitor.cs
* Fix Foreach Node Visitor
* Refactor InterpreterVisitor (alpha version)
* Add Imports Nodes for Declarations
* Rename Method for Sending Object
* Fix Remove in interface_node
* Add ApplyConversionsAfterUsedModulesCompilation method to ILanguage interface
* Rename ApplyConcreteConversions to ApplyConversions
* Squashed commit of the following:
commit a484b0e82d
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624d
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 13:56:47 2024 +0300
Исправление мелких ошибок NewSet
Все тесты проходят.
Проблема, которая остаётся - в режиме ускорения такие программы падают:
begin
var s: set of byte;
Print(s = [1]);
end.
Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение
commit f8819665ba
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe60
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
commit fbd63efa89
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Nov 3 16:59:48 2024 +0300
NewSets
Некоторые тесты надо исправить
commit 746c4ae2c2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 21:00:42 2024 +0100
#3221
commit 350d07326d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:35:51 2024 +0100
#3221
commit aae9ab408b
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:25:06 2024 +0100
#3221
commit 1e4a811e04
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:42:59 2024 +0100
test for #3219
commit d1a1247ecd
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:24:16 2024 +0100
#3219
commit 13b3071d80
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Oct 28 22:42:17 2024 +0300
закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить
commit 6d5c18f457
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Oct 24 10:17:48 2024 +0300
SF XLSX.pas
commit 0c773a7ecb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 16 12:04:33 2024 +0300
tree.xml с парой новых узлов для Питона
commit 53b3fd0881
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 9 14:09:01 2024 +0300
Добавил временное преобразование от array of T в set of T
commit 271d5792ce
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Tue Oct 8 10:00:14 2024 +0300
Documentation (#3211)
* Add Compiler documentation
* Add Intellisense documentation
* Move documentation folder to root directory
commit 79f9ab73a0
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Oct 5 15:33:20 2024 +0300
PT4_32
commit 0a20c8d32c
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Sep 26 09:02:31 2024 +0200
Add `.DistinctBy` (#3122)
commit 11981dbf47
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Sep 25 11:53:02 2024 +0300
IndexMinBy, IndexMaxBy
MinBy, MaxBy - более эффективная реализация
GraphWPF - SaveToClipboard
commit 3eb1d2bd85
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 17:42:09 2024 +0200
#3197
commit 20edd487e3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 12:39:03 2024 +0200
#3204
commit 7261231c9c
Merge: 7debbe702 9ab932977
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 09:49:58 2024 +0200
Merge pull request #3207 from AlexanderZemlyak/fix_linux_version
Fix linux version
commit 9ab9329771
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Sep 22 10:23:18 2024 +0300
Add new projects in PascalACBNETLinux.sln
commit 7debbe702a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 21 14:29:38 2024 +0300
Критическое обновление LightPT
commit 40335b873e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Sep 20 22:58:46 2024 +0300
LightPT - OutputListIsClearedFromSpaces := False;
Coords - DrawLine
commit 078281db17
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 22:42:44 2024 +0300
coords suite
commit 8d51f999a5
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 20:28:28 2024 +0300
Автоклассы - разрешение наследования от классов без полей
Модуль Coords
commit 8f7e92d418
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Sep 16 08:25:43 2024 +0300
Turtle переделал на паттерн Команда
commit a6f6d8a90b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 23:11:54 2024 +0300
Правки рейтинга в TeacherPlugin
commit 2365eb3633
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 15:54:15 2024 +0300
LinkLabel в TeacherControlPlugin
commit 1835b811ef
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:51:44 2024 +0300
MathNet Signed
commit b23d6df9e9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:16:15 2024 +0300
MathNet.Numerics.dll
commit 790fba67b8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 27 17:56:09 2024 +0300
3.10.0
commit 1ec4204fd2
Author: Sun Serega <sunserega2@gmail.com>
Date: Mon Aug 26 09:20:27 2024 +0300
`.Batch` cleanup (#3108)
commit b5e674c311
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:12:14 2024 +0300
3_10_0
commit 7face043cf
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:11:08 2024 +0300
ToSet
commit e456ad528e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 23:13:57 2024 +0300
3.9.0.3530
commit 3247469e6d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 22:55:27 2024 +0300
Добавлен DrawPoints в Turtle
Исправлена ошибка с отображением подписей в Y-координате
commit 7548142623
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 14:27:53 2024 +0300
1. Глобально.
SetDecimalSeparator(',')
SetNumberFormat(DecimalSeparator := ',' и куча других параметров)
s.ToReal(nfi)
s.ToReals(nfi)
StrToReal(nfi)
StrToFloat(nfi)
FloatToStr(nfi)
var nfi := NumberFormat(DecimalSeparator := ',')
s.ToReal(DecimalSeparator := ',')
s.ToReals(DecimalSeparator := ',')
StrToReal(DecimalSeparator := ',')
commit d94885b950
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 12:13:09 2024 +0300
randomElement для строк
.ToReals - разделителями могут быть пробел табуляция и переход на новую строку
NumberFormat - функция, возвращающая nfi
commit ae2e26acf8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Aug 23 19:33:55 2024 +0300
PT4 - новые dll файлы старых заданий серий A
commit 0f8aa6fa3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 17:28:05 2024 +0300
SetOf как основной синоним HSet
commit db4b53be20
Merge: 86852e0a5 b9fd59a84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:42 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 86852e0a59
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:14 2024 +0300
School - ToBase(number: int64
commit b9fd59a840
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 15:08:44 2024 +0200
#2830
commit 4f0b0f8ba0
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 14:43:49 2024 +0200
#3194
commit e3ee0fed4c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 13:49:30 2024 +0200
#3097
commit d396c4a9fe
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 10:40:23 2024 +0200
#3178
commit 0d846d2335
Merge: e91e35398 a65a86921
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Mon Aug 12 15:24:11 2024 +0200
Merge pull request #3170 from samuraiGH/ForeachResolver-rework
Foreach resolver rework
commit a65a869211
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Aug 12 15:50:42 2024 +0300
increasing pcu file version
commit e91e353984
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 11 15:21:29 2024 +0300
Обновленный модуль Turtle.pas
commit c18238df39
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 20:18:57 2024 +0300
3.9.0.3523
commit 1da2b524a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 19:34:10 2024 +0300
School PrimeDivisors
commit 47c61d8b14
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:48:07 2024 +0300
New directive to disable linking pascal standard modules (#3186)
* Add new 'disable standard units' directive and it's processing
* Refactor InitializeNewUnit function
* Improve disable standard units directive checks
* Add null check in programs.cs to avoid error
* Rename error related to disable standard units directive
* Add referencing standard net libraries
* Add checks for duplicates when injecting references
commit fc3ab96cae
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:46:40 2024 +0300
Delete DocumentedUnits option and Exclude HelpBuilder project (#3192)
* Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug
Достаточно их аналогов из CompilerOptions.
* Add recreating CompilerOptions when reloading Compiler
* Change Rebuild checkbox logic
* Delete documented units fiels from CompilerInternalDebug
* Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug"
This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27.
* Exclude HelpBuilder
commit 64acde6460
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 18:21:04 2024 +0300
Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса)
School - IsPrime(n)
commit 3db5709101
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 10:56:18 2024 +0300
ZipCartesianFuncs.pas
commit c4fd47128b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jul 30 22:56:03 2024 +0300
Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией
Zip, Cartesian - методы расширения дополнены чтобы было как во внешних
Перегенерирована справка
commit 7d66f26d4f
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Jul 1 00:16:43 2024 +0300
cleanup and more tests
commit 464dc794a8
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 23:31:28 2024 +0300
cleanup and more comments
commit 32f126370c
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 21:35:06 2024 +0300
attempt to fix GetEnumerator resolving for Pascal types
commit fb3eeeb28b
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 16:26:35 2024 +0300
fix tests
commit 84b0dfe537
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 15:49:13 2024 +0300
fix getting MethodInfo
commit 5fa4d9fce7
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:45:07 2024 +0300
cold fix set of T resolving
commit 460ce636ab
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:21:06 2024 +0300
hot fix set of T resolving
commit 83c2f29ac6
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:53:11 2024 +0300
fix method filtering again
commit c840a1a47a
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:32:41 2024 +0300
fix type recovery
commit 2436627fdd
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 19:18:32 2024 +0300
fixing method filtering
commit 15a05360a4
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:25:39 2024 +0300
attempt to fix GetEnumerator resolving for compiled types
commit 4fd020d084
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:21:00 2024 +0300
adding tests
* Move unitNames dictionary to CompilationUnit class
* Implement Spython StringResorces for SyntaxTree Converters
* Move post conversion method to ISyntaxTreeConverter interface
* Override get_system_module in SpythonSyntaxTreeVisitor
* Fix Unit and Function Having Same Name Bug
* Add TimeMeasurements Programs
* Swap Visitors for Supporting New Imports
* Fix Function with Named Parameters Substitution
* Add Error for Using Global
* Fix yyloc Bug and Add SyntaxVisiters Errors
* Move List Desugar from Visiter to Parser (temp)
* Move List Generator Desugaring Back to Visitors
* Add Args after Kvarg Error Message
* Fix Parser and Visitors' Errors Messages
* Moved Examples Programs
* Update Name Substitution Logic
* Squashed commit of the following:
commit b68b8da970
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e1
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed2
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82d
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624d
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 13:56:47 2024 +0300
Исправление мелких ошибок NewSet
Все тесты проходят.
Проблема, которая остаётся - в режиме ускорения такие программы падают:
begin
var s: set of byte;
Print(s = [1]);
end.
Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение
commit f8819665ba
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe60
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
commit fbd63efa89
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Nov 3 16:59:48 2024 +0300
NewSets
Некоторые тесты надо исправить
commit 746c4ae2c2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 21:00:42 2024 +0100
#3221
commit 350d07326d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:35:51 2024 +0100
#3221
commit aae9ab408b
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:25:06 2024 +0100
#3221
commit 1e4a811e04
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:42:59 2024 +0100
test for #3219
commit d1a1247ecd
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:24:16 2024 +0100
#3219
commit 13b3071d80
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Oct 28 22:42:17 2024 +0300
закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить
commit 6d5c18f457
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Oct 24 10:17:48 2024 +0300
SF XLSX.pas
commit 0c773a7ecb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 16 12:04:33 2024 +0300
tree.xml с парой новых узлов для Питона
commit 53b3fd0881
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 9 14:09:01 2024 +0300
Добавил временное преобразование от array of T в set of T
commit 271d5792ce
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Tue Oct 8 10:00:14 2024 +0300
Documentation (#3211)
* Add Compiler documentation
* Add Intellisense documentation
* Move documentation folder to root directory
commit 79f9ab73a0
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Oct 5 15:33:20 2024 +0300
PT4_32
commit 0a20c8d32c
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Sep 26 09:02:31 2024 +0200
Add `.DistinctBy` (#3122)
commit 11981dbf47
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Sep 25 11:53:02 2024 +0300
IndexMinBy, IndexMaxBy
MinBy, MaxBy - более эффективная реализация
GraphWPF - SaveToClipboard
commit 3eb1d2bd85
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 17:42:09 2024 +0200
#3197
commit 20edd487e3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 12:39:03 2024 +0200
#3204
commit 7261231c9c
Merge: 7debbe702 9ab932977
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 09:49:58 2024 +0200
Merge pull request #3207 from AlexanderZemlyak/fix_linux_version
Fix linux version
commit 9ab9329771
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Sep 22 10:23:18 2024 +0300
Add new projects in PascalACBNETLinux.sln
commit 7debbe702a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 21 14:29:38 2024 +0300
Критическое обновление LightPT
commit 40335b873e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Sep 20 22:58:46 2024 +0300
LightPT - OutputListIsClearedFromSpaces := False;
Coords - DrawLine
commit 078281db17
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 22:42:44 2024 +0300
coords suite
commit 8d51f999a5
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 20:28:28 2024 +0300
Автоклассы - разрешение наследования от классов без полей
Модуль Coords
commit 8f7e92d418
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Sep 16 08:25:43 2024 +0300
Turtle переделал на паттерн Команда
commit a6f6d8a90b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 23:11:54 2024 +0300
Правки рейтинга в TeacherPlugin
commit 2365eb3633
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 15:54:15 2024 +0300
LinkLabel в TeacherControlPlugin
commit 1835b811ef
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:51:44 2024 +0300
MathNet Signed
commit b23d6df9e9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:16:15 2024 +0300
MathNet.Numerics.dll
commit 790fba67b8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 27 17:56:09 2024 +0300
3.10.0
commit 1ec4204fd2
Author: Sun Serega <sunserega2@gmail.com>
Date: Mon Aug 26 09:20:27 2024 +0300
`.Batch` cleanup (#3108)
commit b5e674c311
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:12:14 2024 +0300
3_10_0
commit 7face043cf
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:11:08 2024 +0300
ToSet
commit e456ad528e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 23:13:57 2024 +0300
3.9.0.3530
commit 3247469e6d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 22:55:27 2024 +0300
Добавлен DrawPoints в Turtle
Исправлена ошибка с отображением подписей в Y-координате
commit 7548142623
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 14:27:53 2024 +0300
1. Глобально.
SetDecimalSeparator(',')
SetNumberFormat(DecimalSeparator := ',' и куча других параметров)
s.ToReal(nfi)
s.ToReals(nfi)
StrToReal(nfi)
StrToFloat(nfi)
FloatToStr(nfi)
var nfi := NumberFormat(DecimalSeparator := ',')
s.ToReal(DecimalSeparator := ',')
s.ToReals(DecimalSeparator := ',')
StrToReal(DecimalSeparator := ',')
commit d94885b950
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 12:13:09 2024 +0300
randomElement для строк
.ToReals - разделителями могут быть пробел табуляция и переход на новую строку
NumberFormat - функция, возвращающая nfi
commit ae2e26acf8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Aug 23 19:33:55 2024 +0300
PT4 - новые dll файлы старых заданий серий A
commit 0f8aa6fa3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 17:28:05 2024 +0300
SetOf как основной синоним HSet
commit db4b53be20
Merge: 86852e0a5 b9fd59a84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:42 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 86852e0a59
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:14 2024 +0300
School - ToBase(number: int64
commit b9fd59a840
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 15:08:44 2024 +0200
#2830
commit 4f0b0f8ba0
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 14:43:49 2024 +0200
#3194
commit e3ee0fed4c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 13:49:30 2024 +0200
#3097
commit d396c4a9fe
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 10:40:23 2024 +0200
#3178
commit 0d846d2335
Merge: e91e35398 a65a86921
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Mon Aug 12 15:24:11 2024 +0200
Merge pull request #3170 from samuraiGH/ForeachResolver-rework
Foreach resolver rework
commit a65a869211
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Aug 12 15:50:42 2024 +0300
increasing pcu file version
commit e91e353984
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 11 15:21:29 2024 +0300
Обновленный модуль Turtle.pas
commit c18238df39
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 20:18:57 2024 +0300
3.9.0.3523
commit 1da2b524a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 19:34:10 2024 +0300
School PrimeDivisors
commit 47c61d8b14
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:48:07 2024 +0300
New directive to disable linking pascal standard modules (#3186)
* Add new 'disable standard units' directive and it's processing
* Refactor InitializeNewUnit function
* Improve disable standard units directive checks
* Add null check in programs.cs to avoid error
* Rename error related to disable standard units directive
* Add referencing standard net libraries
* Add checks for duplicates when injecting references
commit fc3ab96cae
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:46:40 2024 +0300
Delete DocumentedUnits option and Exclude HelpBuilder project (#3192)
* Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug
Достаточно их аналогов из CompilerOptions.
* Add recreating CompilerOptions when reloading Compiler
* Change Rebuild checkbox logic
* Delete documented units fiels from CompilerInternalDebug
* Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug"
This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27.
* Exclude HelpBuilder
commit 64acde6460
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 18:21:04 2024 +0300
Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса)
School - IsPrime(n)
commit 3db5709101
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 10:56:18 2024 +0300
ZipCartesianFuncs.pas
commit c4fd47128b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jul 30 22:56:03 2024 +0300
Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией
Zip, Cartesian - методы расширения дополнены чтобы было как во внешних
Перегенерирована справка
commit 7d66f26d4f
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Jul 1 00:16:43 2024 +0300
cleanup and more tests
commit 464dc794a8
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 23:31:28 2024 +0300
cleanup and more comments
commit 32f126370c
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 21:35:06 2024 +0300
attempt to fix GetEnumerator resolving for Pascal types
commit fb3eeeb28b
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 16:26:35 2024 +0300
fix tests
commit 84b0dfe537
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 15:49:13 2024 +0300
fix getting MethodInfo
commit 5fa4d9fce7
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:45:07 2024 +0300
cold fix set of T resolving
commit 460ce636ab
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:21:06 2024 +0300
hot fix set of T resolving
commit 83c2f29ac6
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:53:11 2024 +0300
fix method filtering again
commit c840a1a47a
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:32:41 2024 +0300
fix type recovery
commit 2436627fdd
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 19:18:32 2024 +0300
fixing method filtering
commit 15a05360a4
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:25:39 2024 +0300
attempt to fix GetEnumerator resolving for compiled types
commit 4fd020d084
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:21:00 2024 +0300
adding tests
* feat(bin/LanguageKits/SPython): add more things to installer
* Change get_system_module method visibility (and some more)
* Update SPython language names
* Add CaseSensitive boolean saving in pcu
* Implement case sensitive symbol table
* Fix Create function not found error
* Delete try/catch block in CollectNamesFromUsedUnits to make code cleaner
* Create languageCaseSensitive field in pcu
* Create CompilationArtifacts struct for passing data to ConvertAfterUsedModulesCompilation
* Fix GraphWPF importing problem by dirty workaround !!!
* Squashed commit of the following:
commit 57ff5ef37d04ce8fcac8705c5a693bddf2ecf10e
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Thu Feb 27 12:56:53 2025 +0300
Fix Global Variables Type Definition
Основная программа выносится в функцию, определяемой самой первой и first_assignment_defines_type выводит тип глобальных переменных корректно
commit 6f93ae8d6afc1c685d602b85ba6d455d862b35af
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Wed Feb 26 17:33:10 2025 +0300
Replace same_type_node, Fix Procedure Assignment
commit 52a096394cfdd4d8e4b27ddd36570b45b053c380
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Thu Feb 20 13:59:16 2025 +0300
Fix Local Scope in If Node
commit a0be5bed7f110314c0e512d28a76e3bd87328f01
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sat Feb 15 16:40:50 2025 +0300
Fix Bug with same_type_node
commit 04fd2b2a6667bf06af02614a2fd30d0b50172a0c
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sat Feb 15 16:09:27 2025 +0300
Fix Assignment for New Variables
commit ea591e243a5a458d6d94e665cec50d9ef60e1a08
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sat Feb 15 15:58:45 2025 +0300
Fix Assignment for Imported Variables in Functions
commit e5d71be7693c527e6f4cd88671503dafa0ac9777
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sat Feb 15 15:13:21 2025 +0300
Fix SPython's Syntax Node Erasion
commit c78649ac7e7883860ce459cb31f9d9e46194f203
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sat Feb 15 14:35:53 2025 +0300
Fix Variables from Module Assignment
commit 4890f7f163a2557bc58d6e9c48cb432c6436a3aa
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sat Feb 15 13:36:53 2025 +0300
Return RetainUsedGlobalVariablesVisitor
commit e5460edf2fae002ccc64d261bbb8fadb27deec12
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sat Feb 15 13:05:38 2025 +0300
Add Errors for Wrong Global Usage
commit e32387e1356cc1e330518c57ab895f89b9de1784
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sat Feb 15 12:33:55 2025 +0300
Update Comments about Syntax Visitors
commit 1f6c7ac2d8c891d582cbe957ed2ad6886de27de1
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sat Feb 15 12:27:59 2025 +0300
Fix Global Variables
read access for global variables in fuctions by default
commit e840610a25718ba12df144948bdda175cbc8d7c5
Merge: e70cb9914 6c81b45c0
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Fri Feb 14 19:51:38 2025 +0300
Merge branch 'SPython' into SPython-Context-Change
commit e70cb99145120df29d1ae172d1b00afa8ea5b18f
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Fri Feb 14 19:49:18 2025 +0300
Return Back Global Keyword
commit 7cf7a24b8f927cad72645e028f0e0ebc47cae328
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Wed Feb 12 13:15:35 2025 +0300
Fix Merge
commit 89cc4551a0bcdb55eb64d244e35035134e5f6e75
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Wed Feb 12 13:02:06 2025 +0300
Squashed commit of the following:
commit 41dfb6f187
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ff
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409eb
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Tue Jan 28 20:41:55 2025 +0300
Рефакторинг PascalABCNET.xshd (#3237)
* refactoring PascalABCNET.xshd
* removing extra characters
commit 8fbd7fdfc3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Jan 26 23:42:48 2025 +0300
3.10.3
faststrings
EmptyCollection и преобразование ее в List, Dictionary
t: (real,real) := (1,2)
commit bba132bd5d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da970
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e1
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed2
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82d
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624d
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 13:56:47 2024 +0300
Исправление мелких ошибок NewSet
Все тесты проходят.
Проблема, которая остаётся - в режиме ускорения такие программы падают:
begin
var s: set of byte;
Print(s = [1]);
end.
Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение
commit f8819665ba
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe60
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
commit fbd63efa89
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Nov 3 16:59:48 2024 +0300
NewSets
Некоторые тесты надо исправить
commit 746c4ae2c2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 21:00:42 2024 +0100
#3221
commit 350d07326d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:35:51 2024 +0100
#3221
commit aae9ab408b
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:25:06 2024 +0100
#3221
commit 1e4a811e04
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:42:59 2024 +0100
test for #3219
commit d1a1247ecd
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:24:16 2024 +0100
#3219
commit 13b3071d80
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Oct 28 22:42:17 2024 +0300
закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить
commit 6d5c18f457
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Oct 24 10:17:48 2024 +0300
SF XLSX.pas
commit 0c773a7ecb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 16 12:04:33 2024 +0300
tree.xml с парой новых узлов для Питона
commit 53b3fd0881
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 9 14:09:01 2024 +0300
Добавил временное преобразование от array of T в set of T
commit 271d5792ce
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Tue Oct 8 10:00:14 2024 +0300
Documentation (#3211)
* Add Compiler documentation
* Add Intellisense documentation
* Move documentation folder to root directory
commit 79f9ab73a0
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Oct 5 15:33:20 2024 +0300
PT4_32
commit 0a20c8d32c
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Sep 26 09:02:31 2024 +0200
Add `.DistinctBy` (#3122)
commit 11981dbf47
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Sep 25 11:53:02 2024 +0300
IndexMinBy, IndexMaxBy
MinBy, MaxBy - более эффективная реализация
GraphWPF - SaveToClipboard
commit 3eb1d2bd85
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 17:42:09 2024 +0200
#3197
commit 20edd487e3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 12:39:03 2024 +0200
#3204
commit 7261231c9c
Merge: 7debbe702 9ab932977
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 09:49:58 2024 +0200
Merge pull request #3207 from AlexanderZemlyak/fix_linux_version
Fix linux version
commit 9ab9329771
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Sep 22 10:23:18 2024 +0300
Add new projects in PascalACBNETLinux.sln
commit 7debbe702a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 21 14:29:38 2024 +0300
Критическое обновление LightPT
commit 40335b873e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Sep 20 22:58:46 2024 +0300
LightPT - OutputListIsClearedFromSpaces := False;
Coords - DrawLine
commit 078281db17
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 22:42:44 2024 +0300
coords suite
commit 8d51f999a5
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 20:28:28 2024 +0300
Автоклассы - разрешение наследования от классов без полей
Модуль Coords
commit 8f7e92d418
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Sep 16 08:25:43 2024 +0300
Turtle переделал на паттерн Команда
commit a6f6d8a90b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 23:11:54 2024 +0300
Правки рейтинга в TeacherPlugin
commit 2365eb3633
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 15:54:15 2024 +0300
LinkLabel в TeacherControlPlugin
commit 1835b811ef
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:51:44 2024 +0300
MathNet Signed
commit b23d6df9e9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:16:15 2024 +0300
MathNet.Numerics.dll
commit 790fba67b8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 27 17:56:09 2024 +0300
3.10.0
commit 1ec4204fd2
Author: Sun Serega <sunserega2@gmail.com>
Date: Mon Aug 26 09:20:27 2024 +0300
`.Batch` cleanup (#3108)
commit b5e674c311
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:12:14 2024 +0300
3_10_0
commit 7face043cf
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:11:08 2024 +0300
ToSet
commit e456ad528e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 23:13:57 2024 +0300
3.9.0.3530
commit 3247469e6d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 22:55:27 2024 +0300
Добавлен DrawPoints в Turtle
Исправлена ошибка с отображением подписей в Y-координате
commit 7548142623
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 14:27:53 2024 +0300
1. Глобально.
SetDecimalSeparator(',')
SetNumberFormat(DecimalSeparator := ',' и куча других параметров)
s.ToReal(nfi)
s.ToReals(nfi)
StrToReal(nfi)
StrToFloat(nfi)
FloatToStr(nfi)
var nfi := NumberFormat(DecimalSeparator := ',')
s.ToReal(DecimalSeparator := ',')
s.ToReals(DecimalSeparator := ',')
StrToReal(DecimalSeparator := ',')
commit d94885b950
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 12:13:09 2024 +0300
randomElement для строк
.ToReals - разделителями могут быть пробел табуляция и переход на новую строку
NumberFormat - функция, возвращающая nfi
commit ae2e26acf8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Aug 23 19:33:55 2024 +0300
PT4 - новые dll файлы старых заданий серий A
commit 0f8aa6fa3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 17:28:05 2024 +0300
SetOf как основной синоним HSet
commit db4b53be20
Merge: 86852e0a5 b9fd59a84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:42 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 86852e0a59
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:14 2024 +0300
School - ToBase(number: int64
commit b9fd59a840
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 15:08:44 2024 +0200
#2830
commit 4f0b0f8ba0
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 14:43:49 2024 +0200
#3194
commit e3ee0fed4c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 13:49:30 2024 +0200
#3097
commit d396c4a9fe
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 10:40:23 2024 +0200
#3178
commit 0d846d2335
Merge: e91e35398 a65a86921
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Mon Aug 12 15:24:11 2024 +0200
Merge pull request #3170 from samuraiGH/ForeachResolver-rework
Foreach resolver rework
commit a65a869211
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Aug 12 15:50:42 2024 +0300
increasing pcu file version
commit e91e353984
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 11 15:21:29 2024 +0300
Обновленный модуль Turtle.pas
commit c18238df39
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 20:18:57 2024 +0300
3.9.0.3523
commit 1da2b524a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 19:34:10 2024 +0300
School PrimeDivisors
commit 47c61d8b14
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:48:07 2024 +0300
New directive to disable linking pascal standard modules (#3186)
* Add new 'disable standard units' directive and it's processing
* Refactor InitializeNewUnit function
* Improve disable standard units directive checks
* Add null check in programs.cs to avoid error
* Rename error related to disable standard units directive
* Add referencing standard net libraries
* Add checks for duplicates when injecting references
commit fc3ab96cae
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:46:40 2024 +0300
Delete DocumentedUnits option and Exclude HelpBuilder project (#3192)
* Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug
Достаточно их аналогов из CompilerOptions.
* Add recreating CompilerOptions when reloading Compiler
* Change Rebuild checkbox logic
* Delete documented units fiels from CompilerInternalDebug
* Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug"
This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27.
* Exclude HelpBuilder
commit 64acde6460
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 18:21:04 2024 +0300
Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса)
School - IsPrime(n)
commit 3db5709101
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 10:56:18 2024 +0300
ZipCartesianFuncs.pas
commit c4fd47128b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jul 30 22:56:03 2024 +0300
Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией
Zip, Cartesian - методы расширения дополнены чтобы было как во внешних
Перегенерирована справка
commit 7d66f26d4f
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Jul 1 00:16:43 2024 +0300
cleanup and more tests
commit 464dc794a8
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 23:31:28 2024 +0300
cleanup and more comments
commit 32f126370c
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 21:35:06 2024 +0300
attempt to fix GetEnumerator resolving for Pascal types
commit fb3eeeb28b
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 16:26:35 2024 +0300
fix tests
commit 84b0dfe537
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 15:49:13 2024 +0300
fix getting MethodInfo
commit 5fa4d9fce7
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:45:07 2024 +0300
cold fix set of T resolving
commit 460ce636ab
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:21:06 2024 +0300
hot fix set of T resolving
commit 83c2f29ac6
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:53:11 2024 +0300
fix method filtering again
commit c840a1a47a
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:32:41 2024 +0300
fix type recovery
commit 2436627fdd
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 19:18:32 2024 +0300
fixing method filtering
commit 15a05360a4
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:25:39 2024 +0300
attempt to fix GetEnumerator resolving for compiled types
commit 4fd020d084
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:21:00 2024 +0300
adding tests
* Squashed commit of the following:
commit 1fd348ec3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f
Author: nevermind322 <81963698+nevermind322@users.noreply.github.com>
Date: Tue Feb 18 22:02:19 2025 +0300
fix build on mono (#3249)
* fix build on mono
* remove local func
* fix again
commit c3557e388c
Author: Nikolay Kuznetsov <adasoft@gmail.com>
Date: Sat Feb 15 20:32:46 2025 +0300
Update GraphABC.pas (#3244)
1. Быстрая реализация функции FloodFill
Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill
2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill
commit 9dbac389e1
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ff
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409eb
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Tue Jan 28 20:41:55 2025 +0300
Рефакторинг PascalABCNET.xshd (#3237)
* refactoring PascalABCNET.xshd
* removing extra characters
commit 8fbd7fdfc3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Jan 26 23:42:48 2025 +0300
3.10.3
faststrings
EmptyCollection и преобразование ее в List, Dictionary
t: (real,real) := (1,2)
commit bba132bd5d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da970
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e1
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed2
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82d
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624d
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 13:56:47 2024 +0300
Исправление мелких ошибок NewSet
Все тесты проходят.
Проблема, которая остаётся - в режиме ускорения такие программы падают:
begin
var s: set of byte;
Print(s = [1]);
end.
Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение
commit f8819665ba
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe60
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
commit fbd63efa89
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Nov 3 16:59:48 2024 +0300
NewSets
Некоторые тесты надо исправить
commit 746c4ae2c2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 21:00:42 2024 +0100
#3221
commit 350d07326d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:35:51 2024 +0100
#3221
commit aae9ab408b
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:25:06 2024 +0100
#3221
commit 1e4a811e04
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:42:59 2024 +0100
test for #3219
commit d1a1247ecd
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:24:16 2024 +0100
#3219
commit 13b3071d80
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Oct 28 22:42:17 2024 +0300
закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить
commit 6d5c18f457
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Oct 24 10:17:48 2024 +0300
SF XLSX.pas
commit 0c773a7ecb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 16 12:04:33 2024 +0300
tree.xml с парой новых узлов для Питона
commit 53b3fd0881
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 9 14:09:01 2024 +0300
Добавил временное преобразование от array of T в set of T
commit 271d5792ce
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Tue Oct 8 10:00:14 2024 +0300
Documentation (#3211)
* Add Compiler documentation
* Add Intellisense documentation
* Move documentation folder to root directory
commit 79f9ab73a0
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Oct 5 15:33:20 2024 +0300
PT4_32
commit 0a20c8d32c
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Sep 26 09:02:31 2024 +0200
Add `.DistinctBy` (#3122)
commit 11981dbf47
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Sep 25 11:53:02 2024 +0300
IndexMinBy, IndexMaxBy
MinBy, MaxBy - более эффективная реализация
GraphWPF - SaveToClipboard
commit 3eb1d2bd85
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 17:42:09 2024 +0200
#3197
commit 20edd487e3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 12:39:03 2024 +0200
#3204
commit 7261231c9c
Merge: 7debbe702 9ab932977
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 09:49:58 2024 +0200
Merge pull request #3207 from AlexanderZemlyak/fix_linux_version
Fix linux version
commit 9ab9329771
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Sep 22 10:23:18 2024 +0300
Add new projects in PascalACBNETLinux.sln
commit 7debbe702a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 21 14:29:38 2024 +0300
Критическое обновление LightPT
commit 40335b873e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Sep 20 22:58:46 2024 +0300
LightPT - OutputListIsClearedFromSpaces := False;
Coords - DrawLine
commit 078281db17
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 22:42:44 2024 +0300
coords suite
commit 8d51f999a5
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 20:28:28 2024 +0300
Автоклассы - разрешение наследования от классов без полей
Модуль Coords
commit 8f7e92d418
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Sep 16 08:25:43 2024 +0300
Turtle переделал на паттерн Команда
commit a6f6d8a90b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 23:11:54 2024 +0300
Правки рейтинга в TeacherPlugin
commit 2365eb3633
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 15:54:15 2024 +0300
LinkLabel в TeacherControlPlugin
commit 1835b811ef
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:51:44 2024 +0300
MathNet Signed
commit b23d6df9e9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:16:15 2024 +0300
MathNet.Numerics.dll
commit 790fba67b8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 27 17:56:09 2024 +0300
3.10.0
commit 1ec4204fd2
Author: Sun Serega <sunserega2@gmail.com>
Date: Mon Aug 26 09:20:27 2024 +0300
`.Batch` cleanup (#3108)
commit b5e674c311
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:12:14 2024 +0300
3_10_0
commit 7face043cf
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:11:08 2024 +0300
ToSet
commit e456ad528e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 23:13:57 2024 +0300
3.9.0.3530
commit 3247469e6d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 22:55:27 2024 +0300
Добавлен DrawPoints в Turtle
Исправлена ошибка с отображением подписей в Y-координате
commit 7548142623
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 14:27:53 2024 +0300
1. Глобально.
SetDecimalSeparator(',')
SetNumberFormat(DecimalSeparator := ',' и куча других параметров)
s.ToReal(nfi)
s.ToReals(nfi)
StrToReal(nfi)
StrToFloat(nfi)
FloatToStr(nfi)
var nfi := NumberFormat(DecimalSeparator := ',')
s.ToReal(DecimalSeparator := ',')
s.ToReals(DecimalSeparator := ',')
StrToReal(DecimalSeparator := ',')
commit d94885b950
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 12:13:09 2024 +0300
randomElement для строк
.ToReals - разделителями могут быть пробел табуляция и переход на новую строку
NumberFormat - функция, возвращающая nfi
commit ae2e26acf8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Aug 23 19:33:55 2024 +0300
PT4 - новые dll файлы старых заданий серий A
commit 0f8aa6fa3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 17:28:05 2024 +0300
SetOf как основной синоним HSet
commit db4b53be20
Merge: 86852e0a5 b9fd59a84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:42 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 86852e0a59
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:14 2024 +0300
School - ToBase(number: int64
commit b9fd59a840
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 15:08:44 2024 +0200
#2830
commit 4f0b0f8ba0
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 14:43:49 2024 +0200
#3194
commit e3ee0fed4c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 13:49:30 2024 +0200
#3097
commit d396c4a9fe
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 10:40:23 2024 +0200
#3178
commit 0d846d2335
Merge: e91e35398 a65a86921
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Mon Aug 12 15:24:11 2024 +0200
Merge pull request #3170 from samuraiGH/ForeachResolver-rework
Foreach resolver rework
commit a65a869211
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Aug 12 15:50:42 2024 +0300
increasing pcu file version
commit e91e353984
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 11 15:21:29 2024 +0300
Обновленный модуль Turtle.pas
commit c18238df39
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 20:18:57 2024 +0300
3.9.0.3523
commit 1da2b524a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 19:34:10 2024 +0300
School PrimeDivisors
commit 47c61d8b14
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:48:07 2024 +0300
New directive to disable linking pascal standard modules (#3186)
* Add new 'disable standard units' directive and it's processing
* Refactor InitializeNewUnit function
* Improve disable standard units directive checks
* Add null check in programs.cs to avoid error
* Rename error related to disable standard units directive
* Add referencing standard net libraries
* Add checks for duplicates when injecting references
commit fc3ab96cae
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:46:40 2024 +0300
Delete DocumentedUnits option and Exclude HelpBuilder project (#3192)
* Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug
Достаточно их аналогов из CompilerOptions.
* Add recreating CompilerOptions when reloading Compiler
* Change Rebuild checkbox logic
* Delete documented units fiels from CompilerInternalDebug
* Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug"
This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27.
* Exclude HelpBuilder
commit 64acde6460
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 18:21:04 2024 +0300
Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса)
School - IsPrime(n)
commit 3db5709101
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 10:56:18 2024 +0300
ZipCartesianFuncs.pas
commit c4fd47128b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jul 30 22:56:03 2024 +0300
Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией
Zip, Cartesian - методы расширения дополнены чтобы было как во внешних
Перегенерирована справка
commit 7d66f26d4f
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Jul 1 00:16:43 2024 +0300
cleanup and more tests
commit 464dc794a8
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 23:31:28 2024 +0300
cleanup and more comments
commit 32f126370c
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 21:35:06 2024 +0300
attempt to fix GetEnumerator resolving for Pascal types
commit fb3eeeb28b
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 16:26:35 2024 +0300
fix tests
commit 84b0dfe537
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 15:49:13 2024 +0300
fix getting MethodInfo
commit 5fa4d9fce7
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:45:07 2024 +0300
cold fix set of T resolving
commit 460ce636ab
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:21:06 2024 +0300
hot fix set of T resolving
commit 83c2f29ac6
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:53:11 2024 +0300
fix method filtering again
commit c840a1a47a
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:32:41 2024 +0300
fix type recovery
commit 2436627fdd
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 19:18:32 2024 +0300
fixing method filtering
commit 15a05360a4
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:25:39 2024 +0300
attempt to fix GetEnumerator resolving for compiled types
commit 4fd020d084
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:21:00 2024 +0300
adding tests
* Fix Merge Commit
* Fix Assignment to Imported Variable
* Add Compound Comparison (alpha)
* Fix Compound Comparison False Positive
конструкция '(a == b) == c' теперь не считается CompoundComparison
* Reconstruct NameInterpreterVisiter
* Parser and Visitors Refactoring 1
* Fix Modules
* Parser and Visitors Refactoring 2
* Update RetainUsedGlobalVariablesVisitor
* Update RetainUsedGlobalVariablesVisitor 2
* Add Variable Declaration without InitValue
a: float
a = 1.23
* Add Global Variables in Units
In units all variables defined in outermost scope are global
* Add Template Types (list[int])
* Add Errors for Using PascalABCnet Types
* Add Power Binary Operation
* Fix SourceContext in Parser and ImportToUsesVisitor
* Add pass Statement
* Fix Nested List Generators
* Fix NameCorrectVisitors in Complex Cases
fix in nested dot_nodes and lambda's inside list generator
* Fix IdentArranger for Complex Cases
now it handles correctly cases such as follows:
print(a, b,
c, d,
e, f)
* Add Ternary Conditional Operator
* Fix Lexer and New Line Error
* Add End File Token to Fix Errors Positioning
* Fix Errors Positioning
* Move AddForwardDeclarationsVisitor Lower
* Update Comments in StandardSyntaxTreeConverter
* Update Examples
* Fix CompoundComparisonDesugarVisitor
* Update Comments
* Create compound_conditions_example.pys
* Separate ';' and End_Of_Line Token
* Fix Error Line Positioning
* Fix Lexer Error Message with COLON
* Fix Error Positioning
* Fix Colon Error Positionning
* Fix Error Next Token Hints
* Fix Errors with 'in' and 'import'
* Add UnsupportedConstructsVisitor
* Add Error for Using class and lambda
* Refactor IndentArranger
* Add programBeginWithIndentToken
* Squashed commit of the following:
commit 7751fe7e75
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa7
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Mon Mar 3 20:34:51 2025 +0300
migration to new build system (#3241)
* converting project files into sdk style
* new build commands
* adding new dll into nsis
* removing unused .cs files
commit 1fd348ec3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f
Author: nevermind322 <81963698+nevermind322@users.noreply.github.com>
Date: Tue Feb 18 22:02:19 2025 +0300
fix build on mono (#3249)
* fix build on mono
* remove local func
* fix again
commit c3557e388c
Author: Nikolay Kuznetsov <adasoft@gmail.com>
Date: Sat Feb 15 20:32:46 2025 +0300
Update GraphABC.pas (#3244)
1. Быстрая реализация функции FloodFill
Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill
2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill
commit 9dbac389e1
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ff
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409eb
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Tue Jan 28 20:41:55 2025 +0300
Рефакторинг PascalABCNET.xshd (#3237)
* refactoring PascalABCNET.xshd
* removing extra characters
commit 8fbd7fdfc3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Jan 26 23:42:48 2025 +0300
3.10.3
faststrings
EmptyCollection и преобразование ее в List, Dictionary
t: (real,real) := (1,2)
commit bba132bd5d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da970
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e1
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed2
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82d
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624d
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 13:56:47 2024 +0300
Исправление мелких ошибок NewSet
Все тесты проходят.
Проблема, которая остаётся - в режиме ускорения такие программы падают:
begin
var s: set of byte;
Print(s = [1]);
end.
Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение
commit f8819665ba
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe60
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
commit fbd63efa89
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Nov 3 16:59:48 2024 +0300
NewSets
Некоторые тесты надо исправить
commit 746c4ae2c2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 21:00:42 2024 +0100
#3221
commit 350d07326d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:35:51 2024 +0100
#3221
commit aae9ab408b
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:25:06 2024 +0100
#3221
commit 1e4a811e04
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:42:59 2024 +0100
test for #3219
commit d1a1247ecd
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:24:16 2024 +0100
#3219
commit 13b3071d80
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Oct 28 22:42:17 2024 +0300
закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить
commit 6d5c18f457
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Oct 24 10:17:48 2024 +0300
SF XLSX.pas
commit 0c773a7ecb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 16 12:04:33 2024 +0300
tree.xml с парой новых узлов для Питона
commit 53b3fd0881
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 9 14:09:01 2024 +0300
Добавил временное преобразование от array of T в set of T
commit 271d5792ce
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Tue Oct 8 10:00:14 2024 +0300
Documentation (#3211)
* Add Compiler documentation
* Add Intellisense documentation
* Move documentation folder to root directory
commit 79f9ab73a0
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Oct 5 15:33:20 2024 +0300
PT4_32
commit 0a20c8d32c
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Sep 26 09:02:31 2024 +0200
Add `.DistinctBy` (#3122)
commit 11981dbf47
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Sep 25 11:53:02 2024 +0300
IndexMinBy, IndexMaxBy
MinBy, MaxBy - более эффективная реализация
GraphWPF - SaveToClipboard
commit 3eb1d2bd85
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 17:42:09 2024 +0200
#3197
commit 20edd487e3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 12:39:03 2024 +0200
#3204
commit 7261231c9c
Merge: 7debbe702 9ab932977
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 09:49:58 2024 +0200
Merge pull request #3207 from AlexanderZemlyak/fix_linux_version
Fix linux version
commit 9ab9329771
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Sep 22 10:23:18 2024 +0300
Add new projects in PascalACBNETLinux.sln
commit 7debbe702a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 21 14:29:38 2024 +0300
Критическое обновление LightPT
commit 40335b873e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Sep 20 22:58:46 2024 +0300
LightPT - OutputListIsClearedFromSpaces := False;
Coords - DrawLine
commit 078281db17
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 22:42:44 2024 +0300
coords suite
commit 8d51f999a5
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 20:28:28 2024 +0300
Автоклассы - разрешение наследования от классов без полей
Модуль Coords
commit 8f7e92d418
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Sep 16 08:25:43 2024 +0300
Turtle переделал на паттерн Команда
commit a6f6d8a90b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 23:11:54 2024 +0300
Правки рейтинга в TeacherPlugin
commit 2365eb3633
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 15:54:15 2024 +0300
LinkLabel в TeacherControlPlugin
commit 1835b811ef
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:51:44 2024 +0300
MathNet Signed
commit b23d6df9e9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:16:15 2024 +0300
MathNet.Numerics.dll
commit 790fba67b8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 27 17:56:09 2024 +0300
3.10.0
commit 1ec4204fd2
Author: Sun Serega <sunserega2@gmail.com>
Date: Mon Aug 26 09:20:27 2024 +0300
`.Batch` cleanup (#3108)
commit b5e674c311
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:12:14 2024 +0300
3_10_0
commit 7face043cf
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:11:08 2024 +0300
ToSet
commit e456ad528e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 23:13:57 2024 +0300
3.9.0.3530
commit 3247469e6d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 22:55:27 2024 +0300
Добавлен DrawPoints в Turtle
Исправлена ошибка с отображением подписей в Y-координате
commit 7548142623
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 14:27:53 2024 +0300
1. Глобально.
SetDecimalSeparator(',')
SetNumberFormat(DecimalSeparator := ',' и куча других параметров)
s.ToReal(nfi)
s.ToReals(nfi)
StrToReal(nfi)
StrToFloat(nfi)
FloatToStr(nfi)
var nfi := NumberFormat(DecimalSeparator := ',')
s.ToReal(DecimalSeparator := ',')
s.ToReals(DecimalSeparator := ',')
StrToReal(DecimalSeparator := ',')
commit d94885b950
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 12:13:09 2024 +0300
randomElement для строк
.ToReals - разделителями могут быть пробел табуляция и переход на новую строку
NumberFormat - функция, возвращающая nfi
commit ae2e26acf8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Aug 23 19:33:55 2024 +0300
PT4 - новые dll файлы старых заданий серий A
commit 0f8aa6fa3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 17:28:05 2024 +0300
SetOf как основной синоним HSet
commit db4b53be20
Merge: 86852e0a5 b9fd59a84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:42 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 86852e0a59
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:14 2024 +0300
School - ToBase(number: int64
commit b9fd59a840
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 15:08:44 2024 +0200
#2830
commit 4f0b0f8ba0
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 14:43:49 2024 +0200
#3194
commit e3ee0fed4c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 13:49:30 2024 +0200
#3097
commit d396c4a9fe
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 10:40:23 2024 +0200
#3178
commit 0d846d2335
Merge: e91e35398 a65a86921
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Mon Aug 12 15:24:11 2024 +0200
Merge pull request #3170 from samuraiGH/ForeachResolver-rework
Foreach resolver rework
commit a65a869211
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Aug 12 15:50:42 2024 +0300
increasing pcu file version
commit e91e353984
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 11 15:21:29 2024 +0300
Обновленный модуль Turtle.pas
commit c18238df39
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 20:18:57 2024 +0300
3.9.0.3523
commit 1da2b524a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 19:34:10 2024 +0300
School PrimeDivisors
commit 47c61d8b14
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:48:07 2024 +0300
New directive to disable linking pascal standard modules (#3186)
* Add new 'disable standard units' directive and it's processing
* Refactor InitializeNewUnit function
* Improve disable standard units directive checks
* Add null check in programs.cs to avoid error
* Rename error related to disable standard units directive
* Add referencing standard net libraries
* Add checks for duplicates when injecting references
commit fc3ab96cae
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:46:40 2024 +0300
Delete DocumentedUnits option and Exclude HelpBuilder project (#3192)
* Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug
Достаточно их аналогов из CompilerOptions.
* Add recreating CompilerOptions when reloading Compiler
* Change Rebuild checkbox logic
* Delete documented units fiels from CompilerInternalDebug
* Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug"
This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27.
* Exclude HelpBuilder
commit 64acde6460
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 18:21:04 2024 +0300
Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса)
School - IsPrime(n)
commit 3db5709101
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 10:56:18 2024 +0300
ZipCartesianFuncs.pas
commit c4fd47128b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jul 30 22:56:03 2024 +0300
Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией
Zip, Cartesian - методы расширения дополнены чтобы было как во внешних
Перегенерирована справка
commit 7d66f26d4f
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Jul 1 00:16:43 2024 +0300
cleanup and more tests
commit 464dc794a8
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 23:31:28 2024 +0300
cleanup and more comments
commit 32f126370c
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 21:35:06 2024 +0300
attempt to fix GetEnumerator resolving for Pascal types
commit fb3eeeb28b
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 16:26:35 2024 +0300
fix tests
commit 84b0dfe537
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 15:49:13 2024 +0300
fix getting MethodInfo
commit 5fa4d9fce7
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:45:07 2024 +0300
cold fix set of T resolving
commit 460ce636ab
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:21:06 2024 +0300
hot fix set of T resolving
commit 83c2f29ac6
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:53:11 2024 +0300
fix method filtering again
commit c840a1a47a
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:32:41 2024 +0300
fix type recovery
commit 2436627fdd
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 19:18:32 2024 +0300
fixing method filtering
commit 15a05360a4
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:25:39 2024 +0300
attempt to fix GetEnumerator resolving for compiled types
commit 4fd020d084
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:21:00 2024 +0300
adding tests
* Add units case sensitive search (Not implemented in Intellisense)
* Fix Functions Forward Declarations
* Update Wrong Module Name Error Positionning
* Fix Errors with Global Statements
* Fix Function Before Declaration Usage Error
* Add return_statement
* Add Return Wrong Usage Error
* Errors Hot Fix
* Add Bigint Type
* Squashed commit of the following:
commit 7751fe7e75
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa7
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Mon Mar 3 20:34:51 2025 +0300
migration to new build system (#3241)
* converting project files into sdk style
* new build commands
* adding new dll into nsis
* removing unused .cs files
commit 1fd348ec3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f
Author: nevermind322 <81963698+nevermind322@users.noreply.github.com>
Date: Tue Feb 18 22:02:19 2025 +0300
fix build on mono (#3249)
* fix build on mono
* remove local func
* fix again
commit c3557e388c
Author: Nikolay Kuznetsov <adasoft@gmail.com>
Date: Sat Feb 15 20:32:46 2025 +0300
Update GraphABC.pas (#3244)
1. Быстрая реализация функции FloodFill
Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill
2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill
commit 9dbac389e1
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ff
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409eb
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Tue Jan 28 20:41:55 2025 +0300
Рефакторинг PascalABCNET.xshd (#3237)
* refactoring PascalABCNET.xshd
* removing extra characters
commit 8fbd7fdfc3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Jan 26 23:42:48 2025 +0300
3.10.3
faststrings
EmptyCollection и преобразование ее в List, Dictionary
t: (real,real) := (1,2)
commit bba132bd5d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da970
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e1
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed2
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82d
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624d
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 13:56:47 2024 +0300
Исправление мелких ошибок NewSet
Все тесты проходят.
Проблема, которая остаётся - в режиме ускорения такие программы падают:
begin
var s: set of byte;
Print(s = [1]);
end.
Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение
commit f8819665ba
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe60
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
commit fbd63efa89
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Nov 3 16:59:48 2024 +0300
NewSets
Некоторые тесты надо исправить
commit 746c4ae2c2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 21:00:42 2024 +0100
#3221
commit 350d07326d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:35:51 2024 +0100
#3221
commit aae9ab408b
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:25:06 2024 +0100
#3221
commit 1e4a811e04
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:42:59 2024 +0100
test for #3219
commit d1a1247ecd
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:24:16 2024 +0100
#3219
commit 13b3071d80
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Oct 28 22:42:17 2024 +0300
закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить
commit 6d5c18f457
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Oct 24 10:17:48 2024 +0300
SF XLSX.pas
commit 0c773a7ecb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 16 12:04:33 2024 +0300
tree.xml с парой новых узлов для Питона
commit 53b3fd0881
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 9 14:09:01 2024 +0300
Добавил временное преобразование от array of T в set of T
commit 271d5792ce
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Tue Oct 8 10:00:14 2024 +0300
Documentation (#3211)
* Add Compiler documentation
* Add Intellisense documentation
* Move documentation folder to root directory
commit 79f9ab73a0
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Oct 5 15:33:20 2024 +0300
PT4_32
commit 0a20c8d32c
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Sep 26 09:02:31 2024 +0200
Add `.DistinctBy` (#3122)
commit 11981dbf47
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Sep 25 11:53:02 2024 +0300
IndexMinBy, IndexMaxBy
MinBy, MaxBy - более эффективная реализация
GraphWPF - SaveToClipboard
commit 3eb1d2bd85
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 17:42:09 2024 +0200
#3197
commit 20edd487e3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 12:39:03 2024 +0200
#3204
commit 7261231c9c
Merge: 7debbe702 9ab932977
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 09:49:58 2024 +0200
Merge pull request #3207 from AlexanderZemlyak/fix_linux_version
Fix linux version
commit 9ab9329771
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Sep 22 10:23:18 2024 +0300
Add new projects in PascalACBNETLinux.sln
commit 7debbe702a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 21 14:29:38 2024 +0300
Критическое обновление LightPT
commit 40335b873e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Sep 20 22:58:46 2024 +0300
LightPT - OutputListIsClearedFromSpaces := False;
Coords - DrawLine
commit 078281db17
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 22:42:44 2024 +0300
coords suite
commit 8d51f999a5
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 20:28:28 2024 +0300
Автоклассы - разрешение наследования от классов без полей
Модуль Coords
commit 8f7e92d418
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Sep 16 08:25:43 2024 +0300
Turtle переделал на паттерн Команда
commit a6f6d8a90b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 23:11:54 2024 +0300
Правки рейтинга в TeacherPlugin
commit 2365eb3633
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 15:54:15 2024 +0300
LinkLabel в TeacherControlPlugin
commit 1835b811ef
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:51:44 2024 +0300
MathNet Signed
commit b23d6df9e9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:16:15 2024 +0300
MathNet.Numerics.dll
commit 790fba67b8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 27 17:56:09 2024 +0300
3.10.0
commit 1ec4204fd2
Author: Sun Serega <sunserega2@gmail.com>
Date: Mon Aug 26 09:20:27 2024 +0300
`.Batch` cleanup (#3108)
commit b5e674c311
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:12:14 2024 +0300
3_10_0
commit 7face043cf
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:11:08 2024 +0300
ToSet
commit e456ad528e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 23:13:57 2024 +0300
3.9.0.3530
commit 3247469e6d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 22:55:27 2024 +0300
Добавлен DrawPoints в Turtle
Исправлена ошибка с отображением подписей в Y-координате
commit 7548142623
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 14:27:53 2024 +0300
1. Глобально.
SetDecimalSeparator(',')
SetNumberFormat(DecimalSeparator := ',' и куча других параметров)
s.ToReal(nfi)
s.ToReals(nfi)
StrToReal(nfi)
StrToFloat(nfi)
FloatToStr(nfi)
var nfi := NumberFormat(DecimalSeparator := ',')
s.ToReal(DecimalSeparator := ',')
s.ToReals(DecimalSeparator := ',')
StrToReal(DecimalSeparator := ',')
commit d94885b950
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 12:13:09 2024 +0300
randomElement для строк
.ToReals - разделителями могут быть пробел табуляция и переход на новую строку
NumberFormat - функция, возвращающая nfi
commit ae2e26acf8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Aug 23 19:33:55 2024 +0300
PT4 - новые dll файлы старых заданий серий A
commit 0f8aa6fa3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 17:28:05 2024 +0300
SetOf как основной синоним HSet
commit db4b53be20
Merge: 86852e0a5 b9fd59a84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:42 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 86852e0a59
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:14 2024 +0300
School - ToBase(number: int64
commit b9fd59a840
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 15:08:44 2024 +0200
#2830
commit 4f0b0f8ba0
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 14:43:49 2024 +0200
#3194
commit e3ee0fed4c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 13:49:30 2024 +0200
#3097
commit d396c4a9fe
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 10:40:23 2024 +0200
#3178
commit 0d846d2335
Merge: e91e35398 a65a86921
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Mon Aug 12 15:24:11 2024 +0200
Merge pull request #3170 from samuraiGH/ForeachResolver-rework
Foreach resolver rework
commit a65a869211
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Aug 12 15:50:42 2024 +0300
increasing pcu file version
commit e91e353984
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 11 15:21:29 2024 +0300
Обновленный модуль Turtle.pas
commit c18238df39
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 20:18:57 2024 +0300
3.9.0.3523
commit 1da2b524a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 19:34:10 2024 +0300
School PrimeDivisors
commit 47c61d8b14
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:48:07 2024 +0300
New directive to disable linking pascal standard modules (#3186)
* Add new 'disable standard units' directive and it's processing
* Refactor InitializeNewUnit function
* Improve disable standard units directive checks
* Add null check in programs.cs to avoid error
* Rename error related to disable standard units directive
* Add referencing standard net libraries
* Add checks for duplicates when injecting references
commit fc3ab96cae
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:46:40 2024 +0300
Delete DocumentedUnits option and Exclude HelpBuilder project (#3192)
* Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug
Достаточно их аналогов из CompilerOptions.
* Add recreating CompilerOptions when reloading Compiler
* Change Rebuild checkbox logic
* Delete documented units fiels from CompilerInternalDebug
* Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug"
This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27.
* Exclude HelpBuilder
commit 64acde6460
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 18:21:04 2024 +0300
Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса)
School - IsPrime(n)
commit 3db5709101
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 10:56:18 2024 +0300
ZipCartesianFuncs.pas
commit c4fd47128b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jul 30 22:56:03 2024 +0300
Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией
Zip, Cartesian - методы расширения дополнены чтобы было как во внешних
Перегенерирована справка
commit 7d66f26d4f
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Jul 1 00:16:43 2024 +0300
cleanup and more tests
commit 464dc794a8
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 23:31:28 2024 +0300
cleanup and more comments
commit 32f126370c
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 21:35:06 2024 +0300
attempt to fix GetEnumerator resolving for Pascal types
commit fb3eeeb28b
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 16:26:35 2024 +0300
fix tests
commit 84b0dfe537
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 15:49:13 2024 +0300
fix getting MethodInfo
commit 5fa4d9fce7
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:45:07 2024 +0300
cold fix set of T resolving
commit 460ce636ab
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:21:06 2024 +0300
hot fix set of T resolving
commit 83c2f29ac6
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:53:11 2024 +0300
fix method filtering again
commit c840a1a47a
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:32:41 2024 +0300
fix type recovery
commit 2436627fdd
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 19:18:32 2024 +0300
fixing method filtering
commit 15a05360a4
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:25:39 2024 +0300
attempt to fix GetEnumerator resolving for compiled types
commit 4fd020d084
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:21:00 2024 +0300
adding tests
* Fix Types Names in Errors
* Update Examples
* Try To Add Python's list[T]
* Add BackSlash Support
* Add ANIM examples
* Fix compilation context instance assigning
* Squashed commit of the following:
commit 771ea7b445
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Apr 6 14:32:17 2025 +0200
#3230
commit 28a1a03e8d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Apr 6 11:35:09 2025 +0200
#3251
commit af7abc770b
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Apr 6 08:33:34 2025 +0300
synchronization of namespaces and folders for TeacherControlPlugin (#3262)
commit aae723b982
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Thu Apr 3 12:00:04 2025 +0300
Create default syntax tree converter class (#3216)
Для удобства разработчиков простых языков, которым не требуются дополнительные обходы синтаксического дерева.
commit f9cc90e50f
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Apr 3 11:59:46 2025 +0300
fix errors (#3260)
commit f85bfad60f
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Thu Apr 3 11:58:19 2025 +0300
Intellisense memory leaks fix (#3257)
* Fix memory leaks found for PABCSystem.pas
Memory leaks of Interface and Implementation Unit Scopes fixed
* Change open_files and recomp_files variables type to be Dictionary (not HashTable)
* open_files Check simplification
* Move TypeTable.Clear call to CodeCompletion Compile method
commit 7751fe7e75
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa7
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Mon Mar 3 20:34:51 2025 +0300
migration to new build system (#3241)
* converting project files into sdk style
* new build commands
* adding new dll into nsis
* removing unused .cs files
commit 1fd348ec3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f
Author: nevermind322 <81963698+nevermind322@users.noreply.github.com>
Date: Tue Feb 18 22:02:19 2025 +0300
fix build on mono (#3249)
* fix build on mono
* remove local func
* fix again
commit c3557e388c
Author: Nikolay Kuznetsov <adasoft@gmail.com>
Date: Sat Feb 15 20:32:46 2025 +0300
Update GraphABC.pas (#3244)
1. Быстрая реализация функции FloodFill
Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill
2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill
commit 9dbac389e1
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ff
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409eb
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Tue Jan 28 20:41:55 2025 +0300
Рефакторинг PascalABCNET.xshd (#3237)
* refactoring PascalABCNET.xshd
* removing extra characters
commit 8fbd7fdfc3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Jan 26 23:42:48 2025 +0300
3.10.3
faststrings
EmptyCollection и преобразование ее в List, Dictionary
t: (real,real) := (1,2)
commit bba132bd5d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da970
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e1
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed2
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82d
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624d
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 13:56:47 2024 +0300
Исправление мелких ошибок NewSet
Все тесты проходят.
Проблема, которая остаётся - в режиме ускорения такие программы падают:
begin
var s: set of byte;
Print(s = [1]);
end.
Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение
commit f8819665ba
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe60
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
commit fbd63efa89
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Nov 3 16:59:48 2024 +0300
NewSets
Некоторые тесты надо исправить
commit 746c4ae2c2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 21:00:42 2024 +0100
#3221
commit 350d07326d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:35:51 2024 +0100
#3221
commit aae9ab408b
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:25:06 2024 +0100
#3221
commit 1e4a811e04
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:42:59 2024 +0100
test for #3219
commit d1a1247ecd
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:24:16 2024 +0100
#3219
commit 13b3071d80
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Oct 28 22:42:17 2024 +0300
закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить
commit 6d5c18f457
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Oct 24 10:17:48 2024 +0300
SF XLSX.pas
commit 0c773a7ecb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 16 12:04:33 2024 +0300
tree.xml с парой новых узлов для Питона
commit 53b3fd0881
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 9 14:09:01 2024 +0300
Добавил временное преобразование от array of T в set of T
commit 271d5792ce
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Tue Oct 8 10:00:14 2024 +0300
Documentation (#3211)
* Add Compiler documentation
* Add Intellisense documentation
* Move documentation folder to root directory
commit 79f9ab73a0
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Oct 5 15:33:20 2024 +0300
PT4_32
commit 0a20c8d32c
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Sep 26 09:02:31 2024 +0200
Add `.DistinctBy` (#3122)
commit 11981dbf47
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Sep 25 11:53:02 2024 +0300
IndexMinBy, IndexMaxBy
MinBy, MaxBy - более эффективная реализация
GraphWPF - SaveToClipboard
commit 3eb1d2bd85
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 17:42:09 2024 +0200
#3197
commit 20edd487e3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 12:39:03 2024 +0200
#3204
commit 7261231c9c
Merge: 7debbe702 9ab932977
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 09:49:58 2024 +0200
Merge pull request #3207 from AlexanderZemlyak/fix_linux_version
Fix linux version
commit 9ab9329771
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Sep 22 10:23:18 2024 +0300
Add new projects in PascalACBNETLinux.sln
commit 7debbe702a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 21 14:29:38 2024 +0300
Критическое обновление LightPT
commit 40335b873e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Sep 20 22:58:46 2024 +0300
LightPT - OutputListIsClearedFromSpaces := False;
Coords - DrawLine
commit 078281db17
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 22:42:44 2024 +0300
coords suite
commit 8d51f999a5
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 20:28:28 2024 +0300
Автоклассы - разрешение наследования от классов без полей
Модуль Coords
commit 8f7e92d418
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Sep 16 08:25:43 2024 +0300
Turtle переделал на паттерн Команда
commit a6f6d8a90b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 23:11:54 2024 +0300
Правки рейтинга в TeacherPlugin
commit 2365eb3633
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 15:54:15 2024 +0300
LinkLabel в TeacherControlPlugin
commit 1835b811ef
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:51:44 2024 +0300
MathNet Signed
commit b23d6df9e9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:16:15 2024 +0300
MathNet.Numerics.dll
commit 790fba67b8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 27 17:56:09 2024 +0300
3.10.0
commit 1ec4204fd2
Author: Sun Serega <sunserega2@gmail.com>
Date: Mon Aug 26 09:20:27 2024 +0300
`.Batch` cleanup (#3108)
commit b5e674c311
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:12:14 2024 +0300
3_10_0
commit 7face043cf
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:11:08 2024 +0300
ToSet
commit e456ad528e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 23:13:57 2024 +0300
3.9.0.3530
commit 3247469e6d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 22:55:27 2024 +0300
Добавлен DrawPoints в Turtle
Исправлена ошибка с отображением подписей в Y-координате
commit 7548142623
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 14:27:53 2024 +0300
1. Глобально.
SetDecimalSeparator(',')
SetNumberFormat(DecimalSeparator := ',' и куча других параметров)
s.ToReal(nfi)
s.ToReals(nfi)
StrToReal(nfi)
StrToFloat(nfi)
FloatToStr(nfi)
var nfi := NumberFormat(DecimalSeparator := ',')
s.ToReal(DecimalSeparator := ',')
s.ToReals(DecimalSeparator := ',')
StrToReal(DecimalSeparator := ',')
commit d94885b950
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 12:13:09 2024 +0300
randomElement для строк
.ToReals - разделителями могут быть пробел табуляция и переход на новую строку
NumberFormat - функция, возвращающая nfi
commit ae2e26acf8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Aug 23 19:33:55 2024 +0300
PT4 - новые dll файлы старых заданий серий A
commit 0f8aa6fa3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 17:28:05 2024 +0300
SetOf как основной синоним HSet
commit db4b53be20
Merge: 86852e0a5 b9fd59a84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:42 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 86852e0a59
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:14 2024 +0300
School - ToBase(number: int64
commit b9fd59a840
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 15:08:44 2024 +0200
#2830
commit 4f0b0f8ba0
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 14:43:49 2024 +0200
#3194
commit e3ee0fed4c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 13:49:30 2024 +0200
#3097
commit d396c4a9fe
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 10:40:23 2024 +0200
#3178
commit 0d846d2335
Merge: e91e35398 a65a86921
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Mon Aug 12 15:24:11 2024 +0200
Merge pull request #3170 from samuraiGH/ForeachResolver-rework
Foreach resolver rework
commit a65a869211
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Aug 12 15:50:42 2024 +0300
increasing pcu file version
commit e91e353984
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 11 15:21:29 2024 +0300
Обновленный модуль Turtle.pas
commit c18238df39
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 20:18:57 2024 +0300
3.9.0.3523
commit 1da2b524a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 19:34:10 2024 +0300
School PrimeDivisors
commit 47c61d8b14
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:48:07 2024 +0300
New directive to disable linking pascal standard modules (#3186)
* Add new 'disable standard units' directive and it's processing
* Refactor InitializeNewUnit function
* Improve disable standard units directive checks
* Add null check in programs.cs to avoid error
* Rename error related to disable standard units directive
* Add referencing standard net libraries
* Add checks for duplicates when injecting references
commit fc3ab96cae
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:46:40 2024 +0300
Delete DocumentedUnits option and Exclude HelpBuilder project (#3192)
* Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug
Достаточно их аналогов из CompilerOptions.
* Add recreating CompilerOptions when reloading Compiler
* Change Rebuild checkbox logic
* Delete documented units fiels from CompilerInternalDebug
* Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug"
This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27.
* Exclude HelpBuilder
commit 64acde6460
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 18:21:04 2024 +0300
Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса)
School - IsPrime(n)
commit 3db5709101
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 10:56:18 2024 +0300
ZipCartesianFuncs.pas
commit c4fd47128b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jul 30 22:56:03 2024 +0300
Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией
Zip, Cartesian - методы расширения дополнены чтобы было как во внешних
Перегенерирована справка
commit 7d66f26d4f
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Jul 1 00:16:43 2024 +0300
cleanup and more tests
commit 464dc794a8
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 23:31:28 2024 +0300
cleanup and more comments
commit 32f126370c
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 21:35:06 2024 +0300
attempt to fix GetEnumerator resolving for Pascal types
commit fb3eeeb28b
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 16:26:35 2024 +0300
fix tests
commit 84b0dfe537
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 15:49:13 2024 +0300
fix getting MethodInfo
commit 5fa4d9fce7
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:45:07 2024 +0300
cold fix set of T resolving
commit 460ce636ab
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:21:06 2024 +0300
hot fix set of T resolving
commit 83c2f29ac6
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:53:11 2024 +0300
fix method filtering again
commit c840a1a47a
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:32:41 2024 +0300
fix type recovery
commit 2436627fdd
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 19:18:32 2024 +0300
fixing method filtering
commit 15a05360a4
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:25:39 2024 +0300
attempt to fix GetEnumerator resolving for compiled types
commit 4fd020d084
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:21:00 2024 +0300
adding tests
* Fix DefaultSyntaxTreeConverter
* Update some comments in spython_syntax_tree_visitor
* Configure Intellisense - first step
* DomSyntaxTreeVisitor fixes
* Add implementation for parser methods used by Intellisense
* Add declarations_as_statement visit in DomSyntaxTreeVisitor implementation
* Refactor CodeCompletion.cs
* Fix Intellisense case sensitive units search
* Squashed commit of the following:
commit bb7962ff859946a71ded0df465d024c14559cb04
Merge: 71261ded1 aae723b98
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Thu Apr 3 12:23:21 2025 +0300
Merge branch 'master' into intellisense_refactoring
commit 71261ded190a40dcf2301f37b4ac70356cfb35af
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Thu Apr 3 12:16:52 2025 +0300
Update comments in PascalABCLanguageInformation
commit aae723b982
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Thu Apr 3 12:00:04 2025 +0300
Create default syntax tree converter class (#3216)
Для удобства разработчиков простых языков, которым не требуются дополнительные обходы синтаксического дерева.
commit f9cc90e50f
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Apr 3 11:59:46 2025 +0300
fix errors (#3260)
commit f85bfad60f
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Thu Apr 3 11:58:19 2025 +0300
Intellisense memory leaks fix (#3257)
* Fix memory leaks found for PABCSystem.pas
Memory leaks of Interface and Implementation Unit Scopes fixed
* Change open_files and recomp_files variables type to be Dictionary (not HashTable)
* open_files Check simplification
* Move TypeTable.Clear call to CodeCompletion Compile method
commit d52ce0d4c86ec1fb6962db33a8dc774b69fddd69
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Thu Apr 3 11:15:02 2025 +0300
Squashed commit of the following:
commit 7751fe7e75
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa7
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Mon Mar 3 20:34:51 2025 +0300
migration to new build system (#3241)
* converting project files into sdk style
* new build commands
* adding new dll into nsis
* removing unused .cs files
commit 1fd348ec3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f
Author: nevermind322 <81963698+nevermind322@users.noreply.github.com>
Date: Tue Feb 18 22:02:19 2025 +0300
fix build on mono (#3249)
* fix build on mono
* remove local func
* fix again
commit c3557e388c
Author: Nikolay Kuznetsov <adasoft@gmail.com>
Date: Sat Feb 15 20:32:46 2025 +0300
Update GraphABC.pas (#3244)
1. Быстрая реализация функции FloodFill
Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill
2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill
commit 9dbac389e1
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ff
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409eb
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Tue Jan 28 20:41:55 2025 +0300
Рефакторинг PascalABCNET.xshd (#3237)
* refactoring PascalABCNET.xshd
* removing extra characters
commit 8fbd7fdfc3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Jan 26 23:42:48 2025 +0300
3.10.3
faststrings
EmptyCollection и преобразование ее в List, Dictionary
t: (real,real) := (1,2)
commit bba132bd5d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da970
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e1
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed2
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82d
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624d
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 13:56:47 2024 +0300
Исправление мелких ошибок NewSet
Все тесты проходят.
Проблема, которая остаётся - в режиме ускорения такие программы падают:
begin
var s: set of byte;
Print(s = [1]);
end.
Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение
commit f8819665ba
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe60
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
commit 7751fe7e75
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa7
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Mon Mar 3 20:34:51 2025 +0300
migration to new build system (#3241)
* converting project files into sdk style
* new build commands
* adding new dll into nsis
* removing unused .cs files
commit 1fd348ec3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f
Author: nevermind322 <81963698+nevermind322@users.noreply.github.com>
Date: Tue Feb 18 22:02:19 2025 +0300
fix build on mono (#3249)
* fix build on mono
* remove local func
* fix again
commit c3557e388c
Author: Nikolay Kuznetsov <adasoft@gmail.com>
Date: Sat Feb 15 20:32:46 2025 +0300
Update GraphABC.pas (#3244)
1. Быстрая реализация функции FloodFill
Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill
2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill
commit 9dbac389e1
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ff
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409eb
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Tue Jan 28 20:41:55 2025 +0300
Рефакторинг PascalABCNET.xshd (#3237)
* refactoring PascalABCNET.xshd
* removing extra characters
commit 8fbd7fdfc3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Jan 26 23:42:48 2025 +0300
3.10.3
faststrings
EmptyCollection и преобразование ее в List, Dictionary
t: (real,real) := (1,2)
commit bba132bd5d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da970
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e1
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed2
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82d
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624d
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 13:56:47 2024 +0300
Исправление мелких ошибок NewSet
Все тесты проходят.
Проблема, которая остаётся - в режиме ускорения такие программы падают:
begin
var s: set of byte;
Print(s = [1]);
end.
Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение
commit f8819665ba
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe60
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit a11bb9e9c6271e359fde6050e95d98950e946fbd
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Nov 10 19:43:45 2024 +0300
Fix encoding
commit 2c0fba643e45914b8f5350356e1c24b3c3cf3685
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Nov 10 19:21:54 2024 +0300
Fix build error
commit f813a4ff99936dabdcfda40ce5beea2ba41aed53
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Nov 10 19:08:44 2024 +0300
Update intellisense documentation
commit 8414c7ae1d6ed296a86e56975d84949a6e471a25
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Nov 10 19:08:03 2024 +0300
Another iteration of refactoring in CodeCompletionProvider + comments
commit 340ef9a0e9bc40f7bda0cde8dccb86c94dc6c8cb
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Nov 10 14:51:56 2024 +0300
Fix GetCompletionDataByFirst behaviour when getting symInfos after uses keyword
commit 82776f3c77
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
commit 8e9e7f94d094e528aeb9bd0db322005b08e31ee3
Merge: ea3c878eb fbd63efa8
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Fri Nov 8 14:47:33 2024 +0300
Merge branch 'master' into intellisense_refactoring
commit fbd63efa89
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Nov 3 16:59:48 2024 +0300
NewSets
Некоторые тесты надо исправить
commit 746c4ae2c2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 21:00:42 2024 +0100
#3221
commit 350d07326d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:35:51 2024 +0100
#3221
commit aae9ab408b
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:25:06 2024 +0100
#3221
commit 1e4a811e04
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:42:59 2024 +0100
test for #3219
commit d1a1247ecd
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:24:16 2024 +0100
#3219
commit 13b3071d80
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Oct 28 22:42:17 2024 +0300
закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить
commit ea3c878eb27a268d50272838a36508511f1096ee
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Oct 27 22:40:40 2024 +0300
Refactor GetCompletionDataByFirst method
commit 6d5c18f457
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Oct 24 10:17:48 2024 +0300
SF XLSX.pas
commit 0ae57063a798ec7dc4979a1cea32371034794907
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Tue Oct 22 12:54:05 2024 +0300
Replace dollar service character in CodeCompletion by separate boolean (ctrlSpaceAfterDot))
commit 89a02c2867b41cb12020a31867667c89f9fbb848
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Tue Oct 22 10:48:21 2024 +0300
Extract shift space actions in separate class
commit cb24d274969f67255c7cb253fbc36d25d6aaa2be
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Oct 20 22:54:32 2024 +0300
Refactor CodeCompletionProvider (first iteration)
commit 10b16014b8e19fac339752466b1733359675a052
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Oct 20 18:14:06 2024 +0300
Add check that we parsing PascalABC.NET in GetPopupHintText
Временное решение, нужно будет вынести вторую попытку в интерфейс парсера.
commit 4057884d749788726bc095581d1519ff8fec7037
Merge: d95eab790 0c773a7ec
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Oct 20 17:33:07 2024 +0300
Merge branch 'master' into intellisense_refactoring
commit 0c773a7ecb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 16 12:04:33 2024 +0300
tree.xml с парой новых узлов для Питона
commit d95eab790c41cb2f8ac38be997ca81af30ee22be
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Thu Oct 10 14:14:43 2024 +0300
Delete other cases of ampersend inserting
commit b2aaa157c1ae1965ae2a20eb3e5454f4df37b1a8
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Oct 9 22:48:37 2024 +0300
Basic refactoring of GetPopupHintText + delete ampersend inserting
commit 4554bd5581bdf61601e454650a34422c8bf93c0c
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Oct 9 18:56:23 2024 +0300
Move ValidDirectives field to ILanguageInformation
commit 53b3fd0881
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 9 14:09:01 2024 +0300
Добавил временное преобразование от array of T в set of T
commit d8b05d3d80500fc10cb964a5ec62c7244e4993f8
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Oct 9 09:53:35 2024 +0300
Fix inaccuracy in BaseKeywords.cs
commit c45f66baf5a159d07ddc7ded63bad56387799fc1
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Oct 9 09:47:43 2024 +0300
Manage references in PascalABCLanguageInfo project
commit 342cb23f2eb33948cc7d058e04a10fd4b5c1e2a4
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Oct 9 00:06:25 2024 +0300
Fix string comparisons and null reference exception
commit 386f59d5fd5b29f010f59194ef1324d23a5651ca
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Tue Oct 8 23:18:53 2024 +0300
Fix build error
commit 851936f02544879644b3284cf472c8c9c2ea8fa9
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Tue Oct 8 23:12:16 2024 +0300
Refactor keywords managing to avoid repeating them twice
commit 271d5792ce
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Tue Oct 8 10:00:14 2024 +0300
Documentation (#3211)
* Add Compiler documentation
* Add Intellisense documentation
* Move documentation folder to root directory
commit 79f9ab73a0
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Oct 5 15:33:20 2024 +0300
PT4_32
commit 0a20c8d32c
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Sep 26 09:02:31 2024 +0200
Add `.DistinctBy` (#3122)
commit 11981dbf47
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Sep 25 11:53:02 2024 +0300
IndexMinBy, IndexMaxBy
MinBy, MaxBy - более эффективная реализация
GraphWPF - SaveToClipboard
commit 3eb1d2bd85
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 17:42:09 2024 +0200
#3197
commit 20edd487e3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 12:39:03 2024 +0200
#3204
commit 7261231c9c
Merge: 7debbe702 9ab932977
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 09:49:58 2024 +0200
Merge pull request #3207 from AlexanderZemlyak/fix_linux_version
Fix linux version
commit 9ab9329771
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Sep 22 10:23:18 2024 +0300
Add new projects in PascalACBNETLinux.sln
commit 7debbe702a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 21 14:29:38 2024 +0300
Критическое обновление LightPT
commit 40335b873e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Sep 20 22:58:46 2024 +0300
LightPT - OutputListIsClearedFromSpaces := False;
Coords - DrawLine
commit 078281db17
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 22:42:44 2024 +0300
coords suite
commit 8d51f999a5
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 20:28:28 2024 +0300
Автоклассы - разрешение наследования от классов без полей
Модуль Coords
commit 8f7e92d418
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Sep 16 08:25:43 2024 +0300
Turtle переделал на паттерн Команда
commit a6f6d8a90b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 23:11:54 2024 +0300
Правки рейтинга в TeacherPlugin
commit 2365eb3633
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 15:54:15 2024 +0300
LinkLabel в TeacherControlPlugin
commit 1835b811ef
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:51:44 2024 +0300
MathNet Signed
commit b23d6df9e9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:16:15 2024 +0300
MathNet.Numerics.dll
commit 790fba67b8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 27 17:56:09 2024 +0300
3.10.0
commit 1ec4204fd2
Author: Sun Serega <sunserega2@gmail.com>
Date: Mon Aug 26 09:20:27 2024 +0300
`.Batch` cleanup (#3108)
commit b5e674c311
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:12:14 2024 +0300
3_10_0
commit 7face043cf
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:11:08 2024 +0300
ToSet
commit e456ad528e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 23:13:57 2024 +0300
3.9.0.3530
commit 3247469e6d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 22:55:27 2024 +0300
Добавлен DrawPoints в Turtle
Исправлена ошибка с отображением подписей в Y-координате
commit 7548142623
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 14:27:53 2024 +0300
1. Глобально.
SetDecimalSeparator(',')
SetNumberFormat(DecimalSeparator := ',' и куча других параметров)
s.ToReal(nfi)
s.ToReals(nfi)
StrToReal(nfi)
StrToFloat(nfi)
FloatToStr(nfi)
var nfi := NumberFormat(DecimalSeparator := ',')
s.ToReal(DecimalSeparator := ',')
s.ToReals(DecimalSeparator := ',')
StrToReal(DecimalSeparator := ',')
commit d94885b950
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 12:13:09 2024 +0300
randomElement для строк
.ToReals - разделителями могут быть пробел табуляция и переход на новую строку
NumberFormat - функция, возвращающая nfi
commit ae2e26acf8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Aug 23 19:33:55 2024 +0300
PT4 - новые dll файлы старых заданий серий A
commit 0f8aa6fa3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 17:28:05 2024 +0300
SetOf как основной синоним HSet
commit db4b53be20
Merge: 86852e0a5 b9fd59a84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:42 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 86852e0a59
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:14 2024 +0300
School - ToBase(number: int64
commit b9fd59a840
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 15:08:44 2024 +0200
#2830
commit 4f0b0f8ba0
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 14:43:49 2024 +0200
#3194
commit e3ee0fed4c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 13:49:30 2024 +0200
#3097
commit d396c4a9fe
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 10:40:23 2024 +0200
#3178
commit 0d846d2335
Merge: e91e35398 a65a86921
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Mon Aug 12 15:24:11 2024 +0200
Merge pull request #3170 from samuraiGH/ForeachResolver-rework
Foreach resolver rework
commit a65a869211
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Aug 12 15:50:42 2024 +0300
increasing pcu file version
commit e91e353984
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 11 15:21:29 2024 +0300
Обновленный модуль Turtle.pas
commit c18238df39
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 20:18:57 2024 +0300
3.9.0.3523
commit 1da2b524a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 19:34:10 2024 +0300
School PrimeDivisors
commit 47c61d8b14
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:48:07 2024 +0300
New directive to disable linking pascal standard modules (#3186)
* Add new 'disable standard units' directive and it's processing
* Refactor InitializeNewUnit function
* Improve disable standard units directive checks
* Add null check in programs.cs to avoid error
* Rename error related to disable standard units directive
* Add referencing standard net libraries
* Add checks for duplicates when injecting references
commit fc3ab96cae
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:46:40 2024 +0300
Delete DocumentedUnits option and Exclude HelpBuilder project (#3192)
* Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug
Достаточно их аналогов из CompilerOptions.
* Add recreating CompilerOptions when reloading Compiler
* Change Rebuild checkbox logic
* Delete documented units fiels from CompilerInternalDebug
* Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug"
This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27.
* Exclude HelpBuilder
commit 64acde6460
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 18:21:04 2024 +0300
Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса)
School - IsPrime(n)
commit 3db5709101
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 10:56:18 2024 +0300
ZipCartesianFuncs.pas
commit c4fd47128b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jul 30 22:56:03 2024 +0300
Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией
Zip, Cartesian - методы расширения дополнены чтобы было как во внешних
Перегенерирована справка
commit 7d66f26d4f
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Jul 1 00:16:43 2024 +0300
cleanup and more tests
commit 464dc794a8
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 23:31:28 2024 +0300
cleanup and more comments
commit 32f126370c
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 21:35:06 2024 +0300
attempt to fix GetEnumerator resolving for Pascal types
commit fb3eeeb28b
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 16:26:35 2024 +0300
fix tests
commit 84b0dfe537
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 15:49:13 2024 +0300
fix getting MethodInfo
commit 5fa4d9fce7
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:45:07 2024 +0300
cold fix set of T resolving
commit 460ce636ab
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:21:06 2024 +0300
hot fix set of T resolving
commit 83c2f29ac6
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:53:11 2024 +0300
fix method filtering again
commit c840a1a47a
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:32:41 2024 +0300
fix type recovery
commit 2436627fdd
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 19:18:32 2024 +0300
fixing method filtering
commit 15a05360a4
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:25:39 2024 +0300
attempt to fix GetEnumerator resolving for compiled types
commit 4fd020d084
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:21:00 2024 +0300
adding tests
* Add BaseLanguageInformation and SPythonLanguageInformation
* Delete unnecessary TestSuite files
* Remove syntax_tree_visitor inner objects duplicates creation in spython_syntax_tree_visitor
* Move CompilationUnit.UnitFileName initialization to InitializeNewUnit function
* Override internal_reset method in spython_syntax_tree_visitor to fix pas test error
* Delete dll files from git
* Add standard SPython modules to compilation samples
* Add List Methods Names Mapping
* Add Grammar Rules for Intellisense
* Configure Intellisense - step 2
* Fix languages loading call position
* Change comments check in expression finding for SPython
* Add SPython standard types to SPythonSystem (implicitly)
* Add syntax tree converters calls for SPython in Intellisense
* Squash merge master branch
* Adapt SPython project files to new build system
* Update FunctionsWithNamedParametersDesugarVisitor.cs
* Fix output paths in SPython projects
* Update _ReBuild.bat
* Fix Main Function source_context
* Extract converters for Intellisense only usage
* Implement import statements in Intellisense
Алиасы пока не поддерживаются
* Remove Result varible for SPython in Intellisense
* Remove standard modules and net namespaces from user scope
* Adjust standard units to achieve not adding PABCSystem and Extenstions names to their scope
* Add Set, Operator in/not in
* Add Dict
* Add len Function and dict/set types
* Add list and set Functions
* Comment out TypeCorrectVisitor for Intellisense
* Fix New Types Names in Error Messages
* Add Set Methods
* Add special names renaming and excluding function in ILanguageInformation
Используется для убирания подсказки PABCSystem, корректирования типа biginteger в SPython.
* Add aliases support for import and from import in Intellisense
* Fix list_generator Desugaring in Intellisence
* Add dict Methods
* Fix List Generator
* Fix Assignment Declaration
* Move math And time Libs to bin\Lib
* Rename list_generator to generator_object
* Fix Parser to Use generator_object
* Add set generator
* Add any and all Functions
* Add Function Calls for generator objects
* Add dict generator
* Add empty containers initializations
* Fix empty_list/set/dict error message
* Fix type(obj) Function in Standard Library
* Add Error if Initialize with No Type Specification and Empty Collection
* Fix Initialization with Empty Collection for Global Variables
* Add round Function
* Add map Function
* Revert "Add map Function"
This reverts commit 4fb787a0122a6f404a4061fb6647561f0117739a.
* Fix map Function
* Update Visitor Name
* Add Bitwise Operators
* Add Bitwise Assignment Operations
* Fix Set Binary Operations
* Fix Global Assignments
* Add f-string for Strings without Format
* Update SPythonParser.dat
* Add Expression-Support in f-string
* Fix f-string Inner-Parser Call
* Add int and float Formats for f-string ('x', 'X', 'b', 'd', '.[num]f')
* Fix f-string regex
* Fix result Local Variable
* Add cont_int with Underscore
* Add Empty itertools.pas Unit
* Add args Parameters
* Add kvargs Function Declaration (pre-alpha)
* Update StandardSyntaxTreeConverter.cs
* Fix kvargs-functions Forward Declarations
* Add kvargs-functions Call (pre-alpha)
* Add kvargs-parameters Usage
* Add kvargs-function Call with no kvargs-arguments
* Move Standard print Function to Unit Written in SPython
* Update .dll's
* Hot Fix
* Update spython_syntax_tree_visitor.cs
* Add Multi-Variables foreach
* Fix create Name
* Big Kwarg-Update
* Change Create name in StringConstants and fix check in syntax_tree_visitor
* Update buildandruntests.yml
* Squashed commit of the following:
commit f7834348258fd70cb34949908f157a37c4e013db
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Thu Jun 12 15:55:53 2025 +0300
Delete language kits directory creation while installing PascalABC.NET
commit 78f40b7377fa6c62fbdd9a19754d8c14ae68cf7f
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Thu Jun 12 15:35:30 2025 +0300
Create time1.pas
commit ba6cc457366a96efa650eeb2ffb90c5735de13f3
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Thu Jun 12 14:54:36 2025 +0300
Move TypeCorrectVisitor
commit f9ae902f0df63aa2916683869ac0cff4dd71bd91
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Thu Jun 12 13:39:42 2025 +0300
Fix Mutual Functions Calls
commit da3b502df1b889c0b02a00815aa8a9df1bcbe31e
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Thu Jun 12 13:10:49 2025 +0300
Add Itertools Examples and fix Kwargs
commit a6d2f593a0e54b50d8b4b27fb56026b9ede740d0
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Jun 11 23:23:28 2025 +0300
Add special modules aliases support in Intellisense and switch off unit hints for import statements
commit 0d5122eef93cb2dbd9728b1877b0bfb0544ef9b8
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Jun 11 19:23:36 2025 +0300
Create FindScopeByLocation modification for SPython
Для нахождения вложенных в MAIN функций
commit af7235ce8bee4b45ffd6c3b479f8e828932f69b4
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Jun 11 17:59:22 2025 +0300
Add ExitParamVisitor in visitors pipeline
commit 3f5a4f4950a3d3f2035ec2b18081a01c734c1a96
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Jun 11 17:35:30 2025 +0300
Small fixes
commit 3f32348b2f4dd66edd372d3989d7651ac56a5d93
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Jun 11 17:11:07 2025 +0300
Fix merge error
commit 684d6a36912ef5c5ad82d4de0807683eac87debf
Merge: 8e506f409 eeb3116ae
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Jun 11 17:06:42 2025 +0300
Merge branch 'master' into Spython_refactoring
commit 8e506f409e4b34ad81620bf352813ab507e6134e
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Jun 11 16:44:37 2025 +0300
Implement visitors pipeline for PascalABC.NET
commit 0e8e4d5c786cbad5257804ce495fe410546ddf4c
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Wed Jun 11 14:10:22 2025 +0300
Refactor SPython StandardSyntaxTreeConverter to use pipeline approach
commit eeb3116aea
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jun 10 21:30:20 2025 +0300
3.10.3.3634
commit ea338d6bfe
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jun 10 20:30:42 2025 +0300
2025 in GlobalAssemblyInfo.cs
commit 4dc6bd72ef
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jun 10 20:19:18 2025 +0300
chm восстановил
commit fd139b4700
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Tue Jun 10 20:09:10 2025 +0300
fix SemanticTreeConverter.cs encoding (#3273)
commit d11674efc2
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jun 10 19:56:16 2025 +0300
Вернул старый css для справки
commit 9aee28f4f0
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jun 10 19:54:57 2025 +0300
2025
commit 07370e365f
Author: Sun Serega <sunserega2@gmail.com>
Date: Tue Jun 10 19:18:02 2025 +0300
Upgrade windows runner for CI/CD (#3271)
* Try upgrade windows runner for CI/CD
* Update names and BOM
commit 50fd3cb1ee
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed May 28 23:01:09 2025 +0300
* adding supports enumeration check for Pascal types in foreach resolver (#3272)
* fix naming
commit 5fec52615a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat May 24 21:36:36 2025 +0300
Распаковка KeyValuePair| И в foreach
commit fbb5dec9a9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat May 17 19:34:33 2025 +0300
Внешний Between
commit a914ab6ef5
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri May 16 16:57:00 2025 +0300
InRange изменение поведения и внешний
commit 04059ab235
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed May 14 19:57:30 2025 +0300
Исправлены библиотеки PT4Exam
commit 40bfc046a8
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed May 14 19:40:04 2025 +0300
Fix shift space action in Intellisense (#3269)
commit e3a64850ef
Author: dmkwketx <dmkwketx@gmail.com>
Date: Mon May 12 21:14:21 2025 +0300
Update GraphWPF.pas (#3270)
если title больше одной строки, показывалась только последняя. теперь все строки будут показаны.
commit e9cf278fdd
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon May 12 10:24:04 2025 +0300
IsOrdered в разных воплощениях
commit 255533f407
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri May 9 16:39:12 2025 +0300
IsOrdered метод расширения
commit 4c56298bfb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu May 8 22:53:34 2025 +0300
exit(param)
commit c22dee65fa
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed May 7 10:57:41 2025 +0300
sp2
commit 3f37c2cc4f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed May 7 10:56:51 2025 +0300
sp
commit cdfde69281
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri May 2 21:44:57 2025 +0300
2 chars
commit 2e27beef48
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Thu Apr 10 13:14:04 2025 +0300
Create generic instances cache (#3259)
* First attempt to create generic instances cache
* Change TypeScope equality check and add instance cache clearing
* Move instance cache clearing call to CodeCompletion Compile funciton
Шаблонные типы в instance_cache не должны пересекаться для различных модулей. Для улучшения производительности вызов очистки кэша расположен перед вызовом компиляции всех модулей.
* Squashed commit of the following:
commit 771ea7b445
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Apr 6 14:32:17 2025 +0200
#3230
commit 28a1a03e8d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Apr 6 11:35:09 2025 +0200
#3251
commit af7abc770b
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Apr 6 08:33:34 2025 +0300
synchronization of namespaces and folders for TeacherControlPlugin (#3262)
commit aae723b982
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Thu Apr 3 12:00:04 2025 +0300
Create default syntax tree converter class (#3216)
Для удобства разработчиков простых языков, которым не требуются дополнительные обходы синтаксического дерева.
commit f9cc90e50f
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Apr 3 11:59:46 2025 +0300
fix errors (#3260)
commit f85bfad60f
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Thu Apr 3 11:58:19 2025 +0300
Intellisense memory leaks fix (#3257)
* Fix memory leaks found for PABCSystem.pas
Memory leaks of Interface and Implementation Unit Scopes fixed
* Change open_files and recomp_files variables type to be Dictionary (not HashTable)
* open_files Check simplification
* Move TypeTable.Clear call to CodeCompletion Compile method
* Fix incorrect dictionary iteration
* Add one more dictionary keys copying
commit 69149f8c44
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Thu Apr 10 13:13:17 2025 +0300
Refactor intellisense (#3213)
* Refactor keywords managing to avoid repeating them twice
* Fix build error
* Fix string comparisons and null reference exception
* Manage references in PascalABCLanguageInfo project
* Fix inaccuracy in BaseKeywords.cs
* Move ValidDirectives field to ILanguageInformation
* Basic refactoring of GetPopupHintText + delete ampersend inserting
* Delete other cases of ampersend inserting
* Add check that we parsing PascalABC.NET in GetPopupHintText
Временное решение, нужно будет вынести вторую попытку в интерфейс парсера.
* Refactor CodeCompletionProvider (first iteration)
* Extract shift space actions in separate class
* Replace dollar service character in CodeCompletion by separate boolean (ctrlSpaceAfterDot))
* Refactor GetCompletionDataByFirst method
* Fix GetCompletionDataByFirst behaviour when getting symInfos after uses keyword
* Another iteration of refactoring in CodeCompletionProvider + comments
* Update intellisense documentation
* Fix build error
* Fix encoding
* Squashed commit of the following:
commit 7751fe7e75
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa7
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Mon Mar 3 20:34:51 2025 +0300
migration to new build system (#3241)
* converting project files into sdk style
* new build commands
* adding new dll into nsis
* removing unused .cs files
commit 1fd348ec3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f
Author: nevermind322 <81963698+nevermind322@users.noreply.github.com>
Date: Tue Feb 18 22:02:19 2025 +0300
fix build on mono (#3249)
* fix build on mono
* remove local func
* fix again
commit c3557e388c
Author: Nikolay Kuznetsov <adasoft@gmail.com>
Date: Sat Feb 15 20:32:46 2025 +0300
Update GraphABC.pas (#3244)
1. Быстрая реализация функции FloodFill
Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill
2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill
commit 9dbac389e1
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ff
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409eb
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Tue Jan 28 20:41:55 2025 +0300
Рефакторинг PascalABCNET.xshd (#3237)
* refactoring PascalABCNET.xshd
* removing extra characters
commit 8fbd7fdfc3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Jan 26 23:42:48 2025 +0300
3.10.3
faststrings
EmptyCollection и преобразование ее в List, Dictionary
t: (real,real) := (1,2)
commit bba132bd5d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da970
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e1
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed2
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82d
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624d
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 13:56:47 2024 +0300
Исправление мелких ошибок NewSet
Все тесты проходят.
Проблема, которая остаётся - в режиме ускорения такие программы падают:
begin
var s: set of byte;
Print(s = [1]);
end.
Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение
commit f8819665ba
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe60
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
* Update comments in PascalABCLanguageInformation
commit cc7d4472c6
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Thu Apr 10 12:19:31 2025 +0300
Write developer guide for integrating new language (#3264)
commit 5d842153a5
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Apr 10 12:17:52 2025 +0300
Add NSIS binaries to .gitignore exclude (#3265)
commit ee31ed94b3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Apr 10 12:06:40 2025 +0300
TeacherControlPlugin.cs - шифрованные модули
commit ba23a01e29
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Apr 9 10:59:16 2025 +0300
Закомментировал неверный обработчик
commit 3f70700d2b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Apr 7 22:07:13 2025 +0300
nsis новый - папка bin
TeacherControlPlugin.cs - добавление обработчика для последующей шифровки Tasks.pas
commit 0353abf57c
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Mon Apr 7 08:35:22 2025 +0300
fix caching Localization assembly (#3263)
commit 771ea7b445
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Apr 6 14:32:17 2025 +0200
#3230
commit 28a1a03e8d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Apr 6 11:35:09 2025 +0200
#3251
commit af7abc770b
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Apr 6 08:33:34 2025 +0300
synchronization of namespaces and folders for TeacherControlPlugin (#3262)
commit aae723b982
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Thu Apr 3 12:00:04 2025 +0300
Create default syntax tree converter class (#3216)
Для удобства разработчиков простых языков, которым не требуются дополнительные обходы синтаксического дерева.
commit f9cc90e50f
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Apr 3 11:59:46 2025 +0300
fix errors (#3260)
commit f85bfad60f
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Thu Apr 3 11:58:19 2025 +0300
Intellisense memory leaks fix (#3257)
* Fix memory leaks found for PABCSystem.pas
Memory leaks of Interface and Implementation Unit Scopes fixed
* Change open_files and recomp_files variables type to be Dictionary (not HashTable)
* open_files Check simplification
* Move TypeTable.Clear call to CodeCompletion Compile method
commit 7751fe7e75
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa7
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Mon Mar 3 20:34:51 2025 +0300
migration to new build system (#3241)
* converting project files into sdk style
* new build commands
* adding new dll into nsis
* removing unused .cs files
commit 1fd348ec3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f
Author: nevermind322 <81963698+nevermind322@users.noreply.github.com>
Date: Tue Feb 18 22:02:19 2025 +0300
fix build on mono (#3249)
* fix build on mono
* remove local func
* fix again
commit c3557e388c
Author: Nikolay Kuznetsov <adasoft@gmail.com>
Date: Sat Feb 15 20:32:46 2025 +0300
Update GraphABC.pas (#3244)
1. Быстрая реализация функции FloodFill
Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill
2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill
commit 9dbac389e1
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ff
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409eb
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Tue Jan 28 20:41:55 2025 +0300
Рефакторинг PascalABCNET.xshd (#3237)
* refactoring PascalABCNET.xshd
* removing extra characters
commit 8fbd7fdfc3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Jan 26 23:42:48 2025 +0300
3.10.3
faststrings
EmptyCollection и преобразование ее в List, Dictionary
t: (real,real) := (1,2)
commit bba132bd5d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da970
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e1
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed2
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82d
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624d
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da3
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 13:56:47 2024 +0300
Исправление мелких ошибок NewSet
Все тесты проходят.
Проблема, которая остаётся - в режиме ускорения такие программы падают:
begin
var s: set of byte;
Print(s = [1]);
end.
Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение
commit f8819665ba
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe60
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
commit fbd63efa89
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Nov 3 16:59:48 2024 +0300
NewSets
Некоторые тесты надо исправить
commit 746c4ae2c2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 21:00:42 2024 +0100
#3221
commit 350d07326d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:35:51 2024 +0100
#3221
commit aae9ab408b
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Thu Oct 31 18:25:06 2024 +0100
#3221
commit 1e4a811e04
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:42:59 2024 +0100
test for #3219
commit d1a1247ecd
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Oct 30 20:24:16 2024 +0100
#3219
commit 13b3071d80
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Oct 28 22:42:17 2024 +0300
закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить
commit 6d5c18f457
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Oct 24 10:17:48 2024 +0300
SF XLSX.pas
commit 0c773a7ecb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 16 12:04:33 2024 +0300
tree.xml с парой новых узлов для Питона
commit 53b3fd0881
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Oct 9 14:09:01 2024 +0300
Добавил временное преобразование от array of T в set of T
commit 271d5792ce
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Tue Oct 8 10:00:14 2024 +0300
Documentation (#3211)
* Add Compiler documentation
* Add Intellisense documentation
* Move documentation folder to root directory
commit 79f9ab73a0
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Oct 5 15:33:20 2024 +0300
PT4_32
commit 0a20c8d32c
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Sep 26 09:02:31 2024 +0200
Add `.DistinctBy` (#3122)
commit 11981dbf47
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Sep 25 11:53:02 2024 +0300
IndexMinBy, IndexMaxBy
MinBy, MaxBy - более эффективная реализация
GraphWPF - SaveToClipboard
commit 3eb1d2bd85
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 17:42:09 2024 +0200
#3197
commit 20edd487e3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 12:39:03 2024 +0200
#3204
commit 7261231c9c
Merge: 7debbe702 9ab932977
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Sep 22 09:49:58 2024 +0200
Merge pull request #3207 from AlexanderZemlyak/fix_linux_version
Fix linux version
commit 9ab9329771
Author: AlexanderZemlyak <zemlyaksanya@mail.ru>
Date: Sun Sep 22 10:23:18 2024 +0300
Add new projects in PascalACBNETLinux.sln
commit 7debbe702a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 21 14:29:38 2024 +0300
Критическое обновление LightPT
commit 40335b873e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Sep 20 22:58:46 2024 +0300
LightPT - OutputListIsClearedFromSpaces := False;
Coords - DrawLine
commit 078281db17
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 22:42:44 2024 +0300
coords suite
commit 8d51f999a5
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Sep 19 20:28:28 2024 +0300
Автоклассы - разрешение наследования от классов без полей
Модуль Coords
commit 8f7e92d418
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Sep 16 08:25:43 2024 +0300
Turtle переделал на паттерн Команда
commit a6f6d8a90b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 23:11:54 2024 +0300
Правки рейтинга в TeacherPlugin
commit 2365eb3633
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Sep 7 15:54:15 2024 +0300
LinkLabel в TeacherControlPlugin
commit 1835b811ef
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:51:44 2024 +0300
MathNet Signed
commit b23d6df9e9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Sep 3 23:16:15 2024 +0300
MathNet.Numerics.dll
commit 790fba67b8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 27 17:56:09 2024 +0300
3.10.0
commit 1ec4204fd2
Author: Sun Serega <sunserega2@gmail.com>
Date: Mon Aug 26 09:20:27 2024 +0300
`.Batch` cleanup (#3108)
commit b5e674c311
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:12:14 2024 +0300
3_10_0
commit 7face043cf
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Mon Aug 26 09:11:08 2024 +0300
ToSet
commit e456ad528e
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 23:13:57 2024 +0300
3.9.0.3530
commit 3247469e6d
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 22:55:27 2024 +0300
Добавлен DrawPoints в Turtle
Исправлена ошибка с отображением подписей в Y-координате
commit 7548142623
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 14:27:53 2024 +0300
1. Глобально.
SetDecimalSeparator(',')
SetNumberFormat(DecimalSeparator := ',' и куча других параметров)
s.ToReal(nfi)
s.ToReals(nfi)
StrToReal(nfi)
StrToFloat(nfi)
FloatToStr(nfi)
var nfi := NumberFormat(DecimalSeparator := ',')
s.ToReal(DecimalSeparator := ',')
s.ToReals(DecimalSeparator := ',')
StrToReal(DecimalSeparator := ',')
commit d94885b950
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Aug 24 12:13:09 2024 +0300
randomElement для строк
.ToReals - разделителями могут быть пробел табуляция и переход на новую строку
NumberFormat - функция, возвращающая nfi
commit ae2e26acf8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Aug 23 19:33:55 2024 +0300
PT4 - новые dll файлы старых заданий серий A
commit 0f8aa6fa3c
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 17:28:05 2024 +0300
SetOf как основной синоним HSet
commit db4b53be20
Merge: 86852e0a5 b9fd59a84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:42 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 86852e0a59
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 18 16:05:14 2024 +0300
School - ToBase(number: int64
commit b9fd59a840
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 15:08:44 2024 +0200
#2830
commit 4f0b0f8ba0
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 14:43:49 2024 +0200
#3194
commit e3ee0fed4c
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 13:49:30 2024 +0200
#3097
commit d396c4a9fe
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Aug 13 10:40:23 2024 +0200
#3178
commit 0d846d2335
Merge: e91e35398 a65a86921
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Mon Aug 12 15:24:11 2024 +0200
Merge pull request #3170 from samuraiGH/ForeachResolver-rework
Foreach resolver rework
commit a65a869211
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Aug 12 15:50:42 2024 +0300
increasing pcu file version
commit e91e353984
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Aug 11 15:21:29 2024 +0300
Обновленный модуль Turtle.pas
commit c18238df39
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 20:18:57 2024 +0300
3.9.0.3523
commit 1da2b524a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Aug 6 19:34:10 2024 +0300
School PrimeDivisors
commit 47c61d8b14
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:48:07 2024 +0300
New directive to disable linking pascal standard modules (#3186)
* Add new 'disable standard units' directive and it's processing
* Refactor InitializeNewUnit function
* Improve disable standard units directive checks
* Add null check in programs.cs to avoid error
* Rename error related to disable standard units directive
* Add referencing standard net libraries
* Add checks for duplicates when injecting references
commit fc3ab96cae
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Fri Aug 2 10:46:40 2024 +0300
Delete DocumentedUnits option and Exclude HelpBuilder project (#3192)
* Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug
Достаточно их аналогов из CompilerOptions.
* Add recreating CompilerOptions when reloading Compiler
* Change Rebuild checkbox logic
* Delete documented units fiels from CompilerInternalDebug
* Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug"
This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27.
* Exclude HelpBuilder
commit 64acde6460
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 18:21:04 2024 +0300
Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса)
School - IsPrime(n)
commit 3db5709101
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jul 31 10:56:18 2024 +0300
ZipCartesianFuncs.pas
commit c4fd47128b
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Jul 30 22:56:03 2024 +0300
Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией
Zip, Cartesian - методы расширения дополнены чтобы было как во внешних
Перегенерирована справка
commit 7d66f26d4f
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Mon Jul 1 00:16:43 2024 +0300
cleanup and more tests
commit 464dc794a8
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 23:31:28 2024 +0300
cleanup and more comments
commit 32f126370c
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sun Jun 30 21:35:06 2024 +0300
attempt to fix GetEnumerator resolving for Pascal types
commit fb3eeeb28b
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 16:26:35 2024 +0300
fix tests
commit 84b0dfe537
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Sat Jun 29 15:49:13 2024 +0300
fix getting MethodInfo
commit 5fa4d9fce7
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:45:07 2024 +0300
cold fix set of T resolving
commit 460ce636ab
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 22:21:06 2024 +0300
hot fix set of T resolving
commit 83c2f29ac6
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:53:11 2024 +0300
fix method filtering again
commit c840a1a47a
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 21:32:41 2024 +0300
fix type recovery
commit 2436627fdd
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 19:18:32 2024 +0300
fixing method filtering
commit 15a05360a4
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:25:39 2024 +0300
attempt to fix GetEnumerator resolving for compiled types
commit 4fd020d084
Author: samuraiGH <anonimajzer3@mail.ru>
Date: Fri Jun 28 17:21:00 2024 +0300
adding tests
* Fix merge error
* Delete extra files
* Move Examples to pascalabcnet\PABCNetHelp\Examples\SPython
* Update .dll
* Move examples to pascalabcnet\CodeExamples\SPython
* Revert pipeline visitors architecture for Pascal
* Add AssignIntegerDivisionOperation
* Revert pipeline visitors architecture for SPython
* Add len(str)
* Fix inaccuracies
* Fix case sensitive string comparison in some lambda classes
* Small fix in BaseLanguageInformation
* Revert changing Create string to constant in Pascal visitors
* Resolve some pull request issues
* Add Tuple-Type to Right Part of Assignment
* Add Tuple-Assignments a, b = 1, 2
* Delete unused function in DomSyntaxTreeVisitor
* Fix Tuple Assignment
* Add tuple TypeName
* Add turbo_tuple_expr to return_stmt
* Add Tuple-related Errors
* Update pabcnetc_clear/CommandConsoleCompiler.cs encoding
Co-authored-by: Sun Serega <sunserega2@gmail.com>
* Delete IndentArranger.exe
* Fix Generator in for Loop
* Fix Char-Assignment Type Inference
* Fix Collections Method Error Handling
* Fix result variable case sensitive comparing
* Fix Result Name Constants in Visitors
* Fix merge errors
* Resolve some pull request conversations
* Add SPython projects in pabcnetc.sln and PascalABCNETLinux.sln
* Delete Gplex.exe and Gppg.exe in SPython project
* Fix tuple-type Name in Errors
* Move time1.pas and Fix _ReBuild.bat
* Update _ReBuild.bat
* Fix method calls without parentheses in SPython
* Fix Localizations Files
* Remove SPythonParser.sln
* Refactor TipPainterTools to support inner parentheses in function parameters
* Update Linux TipPainterTools
* Fix dict Type Specialization
* Add GetDescriptionForCompiledMethod in SPython
---------
Co-authored-by: AlexanderZemlyak <zemlyaksanya@mail.ru>
Co-authored-by: Владислав Крылов <krylov@sfedu.ru>
Co-authored-by: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Co-authored-by: Sun Serega <sunserega2@gmail.com>
This commit is contained in:
parent
f3a14f3cb9
commit
080fca15bb
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -75,6 +75,12 @@
|
|||
**/PascalABCNETLinux.exe
|
||||
**/PascalABCNETLinux.exe.config
|
||||
|
||||
**/SPythonLanguageInfo.dll
|
||||
**/SPythonParser.dll
|
||||
**/SPythonParser.dll.config
|
||||
**/SPythonStandardTreeConverter.dll
|
||||
**/SPythonSyntaxTreeVisitor.dll
|
||||
|
||||
# external .dll files copied to bin
|
||||
/bin/AvalonDock.dll
|
||||
/bin/PT4Tools.dll
|
||||
|
|
|
|||
10
CodeExamples/SPython/GraphWPF_use_example.pys
Normal file
10
CodeExamples/SPython/GraphWPF_use_example.pys
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from GraphWPF import *
|
||||
|
||||
color = RandomColor()
|
||||
|
||||
def MouseMove(x: float, y: float, mb: int):
|
||||
if mb == 1:
|
||||
FillCircle(x, y, 10, color)
|
||||
|
||||
|
||||
OnMouseMove = MouseMove
|
||||
18
CodeExamples/SPython/argmin.pys
Normal file
18
CodeExamples/SPython/argmin.pys
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# индекс минимального элемента
|
||||
def argmin(arr: list[int]) -> int:
|
||||
if len(arr) == 0:
|
||||
return -1
|
||||
res = 0
|
||||
for i in range(1, len(arr)):
|
||||
if arr[i] < arr[res]:
|
||||
res = i
|
||||
return res
|
||||
|
||||
|
||||
|
||||
|
||||
print(argmin([1, 2, 3]))
|
||||
print(argmin([3, 2, 1]))
|
||||
# a = [4,9,16,8,2,15,13,13,15,2,8,16,9,4]
|
||||
a = [i ** 2 % 17 for i in range(2, 16)]
|
||||
print(argmin([i ** 2 % 17 for i in range(2, 16)]))
|
||||
27
CodeExamples/SPython/compound_conditions_example.pys
Normal file
27
CodeExamples/SPython/compound_conditions_example.pys
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
N = 7
|
||||
|
||||
# Выводит первые N чисел,
|
||||
# которые можно тремя различными
|
||||
# способами представить как
|
||||
# сумму двух квадратов целых чисел
|
||||
def print_sequence(N: int):
|
||||
a = 0
|
||||
while True:
|
||||
a += 1
|
||||
for b in range(1, a):
|
||||
for c in range(1, b):
|
||||
for d in range(1, c + 1):
|
||||
for e in range(1, d):
|
||||
for f in range(1, e):
|
||||
if a ** 2 + f ** 2 == b ** 2 + e ** 2 == c ** 2 + d ** 2:
|
||||
print(a ** 2 + f ** 2, '\t= ',
|
||||
a, '^2 + ', f, '^2 \t= ',
|
||||
b, '^2 + ', e, '^2 \t= ',
|
||||
c, '^2 + ', d, '^2', sep='')
|
||||
|
||||
N -= 1
|
||||
if N == 0:
|
||||
return
|
||||
|
||||
|
||||
print_sequence(N)
|
||||
42
CodeExamples/SPython/delete_by_mouse.pys
Normal file
42
CodeExamples/SPython/delete_by_mouse.pys
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
from WPFObjects import RectangleWPF, ObjectUnderPoint
|
||||
from WPFObjects import Colors, Window, OnMouseDown
|
||||
from PABCSystem import Random, Inc, Milliseconds
|
||||
|
||||
CountSquares = 10
|
||||
StatusRect: RectangleWPF
|
||||
CurrentDigit = 1
|
||||
Mistakes = 0
|
||||
|
||||
def DrawStatusText():
|
||||
if CurrentDigit <= CountSquares:
|
||||
StatusRect.Text = ('Удалено квадратов: ' + str(CurrentDigit-1)
|
||||
+ '\tОшибок: ' + str(Mistakes))
|
||||
else:
|
||||
StatusRect.Text = ('Игра окончена. Время: ' + str(Milliseconds // 1000)
|
||||
+ ' с.\tОшибок: ' + str(Mistakes))
|
||||
|
||||
|
||||
def MyMouseDown(x: float, y: float, mb: int):
|
||||
ob = ObjectUnderPoint(x, y)
|
||||
if ob is RectangleWPF and ob != StatusRect:
|
||||
if ob.Number == CurrentDigit:
|
||||
ob.Destroy()
|
||||
Inc(CurrentDigit)
|
||||
DrawStatusText()
|
||||
else:
|
||||
ob.Color = Colors.Red
|
||||
Inc(Mistakes)
|
||||
DrawStatusText()
|
||||
|
||||
|
||||
Window.Title = 'Игра: удали все квадраты по порядку'
|
||||
for i in range(1, CountSquares + 1):
|
||||
x = Random(Window.Width - 50)
|
||||
y = Random(Window.Height - 100)
|
||||
ob = new RectangleWPF(x, y, 50, 50, Colors.LightGreen, 1)
|
||||
ob.FontSize = 25
|
||||
ob.Number = i
|
||||
StatusRect = new RectangleWPF(0, Window.Height - 40,
|
||||
Window.Width, 40, Colors.LightBlue)
|
||||
DrawStatusText()
|
||||
OnMouseDown = MyMouseDown
|
||||
26
CodeExamples/SPython/game_example.pys
Normal file
26
CodeExamples/SPython/game_example.pys
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import random as rnd
|
||||
|
||||
hidden_number = rnd.randint(1, 100)
|
||||
print('Угадай число от 1 до 100')
|
||||
attempts = 0
|
||||
left_border = 1
|
||||
right_border = 100
|
||||
while True:
|
||||
attempts += 1
|
||||
guess = int(input('Попытка ' + str(attempts) + ':'))
|
||||
if guess < left_border or right_border < guess:
|
||||
print('Число', guess, 'не из диапазона',
|
||||
'[' + str(left_border) + ',', str(right_border) + ']')
|
||||
continue
|
||||
if guess < hidden_number:
|
||||
left_border = guess + 1
|
||||
print('Загаданное число больше', guess);
|
||||
elif guess > hidden_number:
|
||||
right_border = guess - 1
|
||||
print('Загаданное число меньше', guess);
|
||||
else:
|
||||
print('Победа!!!')
|
||||
break
|
||||
print('Попробуй число от', left_border,
|
||||
'до', right_border)
|
||||
print('Тебе понадобилось', attempts, 'попыток')
|
||||
24
CodeExamples/SPython/in_out_example.pys
Normal file
24
CodeExamples/SPython/in_out_example.pys
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
a = int(input('Введите первое число:'))
|
||||
b = int(input('Введите второе число:'))
|
||||
|
||||
def print_expressions(a: int, b: int):
|
||||
print(a, ' +', b, '=', a + b, end = '\n')
|
||||
print(a, ' -', b, '=', a - b, end = '\n')
|
||||
print(a, ' *', b, '=', a * b, end = '\n')
|
||||
print(a, ' %', b, '=', a % b, end = '\n')
|
||||
print(a, ' /', b, '=', a / b, end = '\n')
|
||||
print(a, '//', b, '=', a // b, end = '\n')
|
||||
print(a, '**', b, '=', a ** b, end = '\n')
|
||||
|
||||
print_expressions(a, b)
|
||||
|
||||
|
||||
# Введите первое число: 10
|
||||
# Введите второе число: 6
|
||||
# 10 + 6 = 16
|
||||
# 10 - 6 = 4
|
||||
# 10 * 6 = 60
|
||||
# 10 % 6 = 4
|
||||
# 10 / 6 = 1.66666666666667
|
||||
# 10 // 6 = 1
|
||||
# 10 ** 6 = 1000000
|
||||
13
CodeExamples/SPython/list_use_example.pys
Normal file
13
CodeExamples/SPython/list_use_example.pys
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
def print_matr(matr: list[list[int]]):
|
||||
for row in matr:
|
||||
for elem in row:
|
||||
print(elem, '\t', end=' ')
|
||||
print()
|
||||
|
||||
|
||||
matrix_of_integers: list[list[int]]
|
||||
matrix_of_integers = [
|
||||
[j * i for j in range(1, 10)]
|
||||
for i in range(1, 10) if i % 2 == 0
|
||||
]
|
||||
print_matr(matrix_of_integers)
|
||||
9
CodeExamples/SPython/new.pys
Normal file
9
CodeExamples/SPython/new.pys
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
a = [1, 2, 3]
|
||||
a.append(4)
|
||||
a.insert(4, 2)
|
||||
b = a.copy()
|
||||
b.reverse()
|
||||
print(b)
|
||||
print(a)
|
||||
print(a.count(2))
|
||||
print(a.pop(1))
|
||||
8
CodeExamples/SPython/random1.pys
Normal file
8
CodeExamples/SPython/random1.pys
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#unit random
|
||||
import PABCSystem
|
||||
|
||||
def random() -> float:
|
||||
return PABCSystem.random()
|
||||
|
||||
def randint(a: int, b: int) -> int:
|
||||
return PABCSystem.random(a, b)
|
||||
11
CodeExamples/SPython/set_example.pys
Normal file
11
CodeExamples/SPython/set_example.pys
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from time import time
|
||||
|
||||
s: set[int] = set()
|
||||
t1 = time()
|
||||
|
||||
for i in range(1, 10000):
|
||||
s |= {i}
|
||||
|
||||
t2 = time()
|
||||
print(t2 - t1)
|
||||
print(len(s))
|
||||
15
CodeExamples/SPython/time1.pas
Normal file
15
CodeExamples/SPython/time1.pas
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
unit time1;
|
||||
|
||||
interface
|
||||
|
||||
function time(): real;
|
||||
|
||||
function forty_two(): real;
|
||||
|
||||
implementation
|
||||
|
||||
function time() : real := DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds;
|
||||
|
||||
function forty_two() : real := 42;
|
||||
|
||||
end.
|
||||
18
CodeExamples/SPython/time_measurement_example.pas
Normal file
18
CodeExamples/SPython/time_measurement_example.pas
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
begin
|
||||
var n := 60000;
|
||||
var t1 := Milliseconds;
|
||||
var sm := 0.0;
|
||||
var i := 1.0;
|
||||
while i < n do
|
||||
begin
|
||||
var j := 1.0;
|
||||
while j < n do
|
||||
begin
|
||||
sm += 1.0 / i / j;
|
||||
j += 1;
|
||||
end;
|
||||
i += 1;
|
||||
end;
|
||||
var t2 := Milliseconds;
|
||||
print(t2 - t1);
|
||||
end.
|
||||
16
CodeExamples/SPython/time_measurement_example.pys
Normal file
16
CodeExamples/SPython/time_measurement_example.pys
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import time
|
||||
|
||||
n = 60000
|
||||
start = time.time()
|
||||
sm: float = 0
|
||||
|
||||
i = 1.0
|
||||
while i < n:
|
||||
j = 1.0
|
||||
while j < n:
|
||||
sm += 1.0 / i / j
|
||||
j += 1
|
||||
i += 1
|
||||
|
||||
end = time.time();
|
||||
print(end - start)
|
||||
18
CodeExamples/SPython/unit_example.pys
Normal file
18
CodeExamples/SPython/unit_example.pys
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Рекурсивная функция вычисления факториала
|
||||
def factorial(n: int)-> bigint:
|
||||
if n == 0:
|
||||
return 1
|
||||
return n * factorial(n - 1)
|
||||
|
||||
|
||||
# Не рекурсивная функция вычисления числа Фибоначчи
|
||||
def fibonacci(n: int)-> bigint:
|
||||
if n <= 1:
|
||||
return n
|
||||
f1: bigint = 0
|
||||
f2: bigint = 1
|
||||
for i in range(n - 1):
|
||||
t = f1 + f2
|
||||
f1 = f2
|
||||
f2 = t
|
||||
return f2
|
||||
15
CodeExamples/SPython/unit_use_example.pas
Normal file
15
CodeExamples/SPython/unit_use_example.pas
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
Uses unit_example;
|
||||
|
||||
const N: integer = 10;
|
||||
|
||||
begin
|
||||
println('Последовательность чисел Фибоначчи:');
|
||||
for var i := 1 to N do
|
||||
println('F(' + i + ')=', fibonacci(i));
|
||||
println();
|
||||
|
||||
println('Последовательность факториалов:');
|
||||
for var i := 1 to N do
|
||||
println(i + '!=', factorial(i));
|
||||
println();
|
||||
end.
|
||||
19
CodeExamples/SPython/unit_use_example.pys
Normal file
19
CodeExamples/SPython/unit_use_example.pys
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
from unit_example import fibonacci as F, factorial as fact
|
||||
|
||||
N = 10
|
||||
|
||||
fibs = [F(i) for i in range(1, N + 1)]
|
||||
print("Последовательность чисел Фибоначчи:")
|
||||
i = 0
|
||||
for fib_num in fibs:
|
||||
i += 1
|
||||
print('F(' + str(i) + ')\t=', fib_num)
|
||||
print()
|
||||
|
||||
facts = [fact(i) for i in range(1, N + 1)]
|
||||
print("Последовательность факториалов:")
|
||||
i = 0
|
||||
for fact_num in facts:
|
||||
i += 1
|
||||
print(str(i) + '!\t=', fact_num)
|
||||
print()
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Общие сведения об этой сборке предоставляются следующим набором
|
||||
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
|
||||
// связанные со сборкой.
|
||||
[assembly: AssemblyTitle("SPythonLanguage")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SPythonLanguage")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
|
||||
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
|
||||
// COM, задайте атрибуту ComVisible значение TRUE для этого типа.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
|
||||
[assembly: Guid("dff88e9f-afb3-4986-84fe-77f8a04cb6f0")]
|
||||
|
||||
// Сведения о версии сборки состоят из указанных ниже четырех значений:
|
||||
//
|
||||
// Основной номер версии
|
||||
// Дополнительный номер версии
|
||||
// Номер сборки
|
||||
// Редакция
|
||||
//
|
||||
// Можно задать все значения или принять номера сборки и редакции по умолчанию
|
||||
// используя "*", как показано ниже:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
using System.Collections.Generic;
|
||||
using Languages.Facade;
|
||||
using PascalABCCompiler.SyntaxTreeConverters;
|
||||
using PascalABCCompiler.SystemLibrary;
|
||||
using PascalABCCompiler.TreeConverter;
|
||||
|
||||
namespace Languages.SPython
|
||||
{
|
||||
public class SPythonLanguage : BaseLanguage
|
||||
{
|
||||
public SPythonLanguage() : base(
|
||||
name: "SPython",
|
||||
version: "0.0.1",
|
||||
copyright: "Copyright © 2023-2025 by Vladislav Krylov, Egor Movchan",
|
||||
|
||||
languageInformation: new Frontend.Data.SPythonLanguageInformation(),
|
||||
parser: new SPythonParser.SPythonLanguageParser(),
|
||||
docParser: null,
|
||||
|
||||
syntaxTreeConverters: new List<ISyntaxTreeConverter>() { new Frontend.Converters.StandardSyntaxTreeConverter(), new SyntaxSemanticVisitors.LambdaAnyConverter() },
|
||||
applySyntaxTreeConvertersForIntellisense: true,
|
||||
|
||||
filesExtensions: new string[] { ".pys" },
|
||||
caseSensitive: true,
|
||||
systemUnitNames: new string[] { "SPythonSystem", "SPythonHidden", "SPythonSystemPys" }
|
||||
)
|
||||
{
|
||||
((SPythonParser.SPythonLanguageParser)Parser).SyntaxTreeConvertersForIntellisense = SyntaxTreeConverters;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// TODO: требуется проверка и настройка работы EVA
|
||||
/// </summary>
|
||||
public override void SetSemanticConstants()
|
||||
{
|
||||
SemanticRulesConstants.ClassBaseType = SystemLibrary.object_type;
|
||||
SemanticRulesConstants.StructBaseType = SystemLibrary.value_type;
|
||||
SemanticRulesConstants.AddResultVariable = true;
|
||||
SemanticRulesConstants.ZeroBasedStrings = true;
|
||||
SemanticRulesConstants.FastStrings = false;
|
||||
SemanticRulesConstants.InitStringAsEmptyString = true;
|
||||
SemanticRulesConstants.UseDivisionAssignmentOperatorsForIntegerTypes = false;
|
||||
SemanticRulesConstants.ManyVariablesOneInitializator = false;
|
||||
SemanticRulesConstants.OrderIndependedMethodNames = true;
|
||||
SemanticRulesConstants.OrderIndependedFunctionNames = false;
|
||||
SemanticRulesConstants.OrderIndependedTypeNames = false;
|
||||
SemanticRulesConstants.EnableExitProcedure = true;
|
||||
SemanticRulesConstants.StrongPointersTypeCheckForDotNet = true;
|
||||
SemanticRulesConstants.AllowChangeLoopVariable = false;
|
||||
SemanticRulesConstants.AllowGlobalVisibilityForPABCDll = true;
|
||||
SemanticRulesConstants.AllowMethodCallsWithoutParentheses = false;
|
||||
}
|
||||
|
||||
public override void SetSyntaxTreeToSemanticTreeConverter()
|
||||
{
|
||||
SyntaxTreeToSemanticTreeConverter = new SPythonSyntaxTreeVisitor.spython_syntax_tree_visitor(LanguageProvider.Instance.MainLanguage.SyntaxTreeToSemanticTreeConverter);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net40</TargetFramework>
|
||||
|
||||
<RootNamespace>Languages.SPython</RootNamespace>
|
||||
|
||||
<OutputPath>..\..\..\bin\</OutputPath>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\LambdaAnySynToSemConverter\LambdaAnySynToSemConverter.csproj" />
|
||||
<ProjectReference Include="..\..\..\LanguageIntegrator\LanguageIntegrator.csproj" />
|
||||
<ProjectReference Include="..\..\..\Localization\Localization.csproj" />
|
||||
<ProjectReference Include="..\..\..\ParserTools\ParserTools.csproj" />
|
||||
<ProjectReference Include="..\..\..\SyntaxTree\SyntaxTree.csproj" />
|
||||
<ProjectReference Include="..\..\..\SyntaxVisitors\SyntaxVisitors.csproj" />
|
||||
<ProjectReference Include="..\..\..\TreeConverter\TreeConverter.csproj" />
|
||||
<ProjectReference Include="..\SemanticAnalyzers\SPythonSyntaxTreeVisitor\SPythonSyntaxTreeVisitor.csproj" />
|
||||
<ProjectReference Include="..\SPythonParserKrylovMovchan\SPythonParser.csproj" />
|
||||
<ProjectReference Include="..\SyntaxTreeConverters\SPythonStandardTreeConverter\SPythonStandardTreeConverter.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
File diff suppressed because it is too large
Load diff
42
LanguagePlugins/SPython/SPythonParserKrylovMovchan/Errors.cs
Normal file
42
LanguagePlugins/SPython/SPythonParserKrylovMovchan/Errors.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using PascalABCCompiler.Errors;
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
|
||||
namespace SPythonParser
|
||||
{
|
||||
public class SPythonUnexpectedToken : SyntaxError
|
||||
{
|
||||
private string _message;
|
||||
private string _expected;
|
||||
public SPythonUnexpectedToken(string _file_name, string expected, SourceContext _source_context, syntax_tree_node _node)
|
||||
: base("", _file_name, _source_context, _node)
|
||||
{
|
||||
_message = string.Format(StringResources.Get("EXPECTED{0}"), expected);
|
||||
_expected = expected;
|
||||
}
|
||||
|
||||
public override string Message
|
||||
{
|
||||
get
|
||||
{
|
||||
return _message;
|
||||
}
|
||||
}
|
||||
|
||||
public string Expected
|
||||
{
|
||||
get
|
||||
{
|
||||
return _expected;
|
||||
}
|
||||
set
|
||||
{
|
||||
_expected = value;
|
||||
_message = string.Format(StringResources.Get("EXPECTED{0}"), _expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,238 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections.Generic;
|
||||
using SyntaxVisitors;
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
|
||||
namespace SPythonParser
|
||||
{
|
||||
public class IndentArranger
|
||||
{
|
||||
private int lineCounter = -1;
|
||||
|
||||
// количество пробелов соответствующее одному \t (в одном отступе)
|
||||
private const int indentSpaceNumber = 4;
|
||||
private const string indentToken = "#{";
|
||||
private const string unindentToken = "#}";
|
||||
private const string badIndentToken = "#!";
|
||||
private const string programBeginWithIndentToken = "#b";
|
||||
private const string endOfLineToken = "#;";
|
||||
private const string endOfFIleToken = "#$";
|
||||
public const string createdFileNameAddition = "_processed";
|
||||
|
||||
// регулярное выражение разбивающее строку программы на группы, последняя из которых - комментарий в конце строки
|
||||
private static readonly Regex programLineRegex = new Regex("^(([^\n\"\'#])+|(\'([^\'\n\\\\]|\\\\.)*\')|(\"([^\"\n\\\\]|\\\\.)*\"))*(#.*)?$");
|
||||
|
||||
private static readonly Regex reg = new Regex(@"'([^'\\]*(\\.[^'\\]*)*)'|""([^""\\]*(\\.[^""\\]*)*)""");
|
||||
|
||||
|
||||
public IndentArranger() {}
|
||||
|
||||
public void ProcessSourceText(ref string sourceText)
|
||||
{
|
||||
//string[] programLines = sourceText.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
|
||||
// В редакторе в особых случаях добавляется \n вместо \r\n
|
||||
string[] programLines = sourceText.Split(new string[] { "\n" }, StringSplitOptions.None);
|
||||
|
||||
// удаляем комментарии в тексте программы
|
||||
EraseComments(ref programLines);
|
||||
|
||||
// добавляем токены для начала/конца отступов и ; в конце stmt
|
||||
ArrangeIndents(ref programLines);
|
||||
|
||||
sourceText = String.Join("\n", programLines);
|
||||
|
||||
// нужен токен в конце для правильного позиционирования ошибок,
|
||||
// допущенных в конце программы
|
||||
sourceText += endOfFIleToken;
|
||||
|
||||
// создание файла с полученным текстом для дебага
|
||||
//File.WriteAllText("./processed_file.txt", sourceText);
|
||||
}
|
||||
|
||||
private void EraseComments(ref string[] programLines)
|
||||
{
|
||||
for (int i = 0; i < programLines.Length; ++i)
|
||||
{
|
||||
Match programLineMatch = programLineRegex.Match(programLines[i]);
|
||||
if (programLineMatch.Success)
|
||||
{
|
||||
Group programLineComment = programLineMatch.Groups[programLineMatch.Groups.Count - 1];
|
||||
if (programLineComment.Success)
|
||||
programLines[i] = programLines[i].Substring(0, programLineComment.Index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int bracketCount = 0;
|
||||
int prevBracketCount = 0;
|
||||
|
||||
private void CountBrackets(string programLine)
|
||||
{
|
||||
string cleanLine = reg.Replace(programLine, match => "");
|
||||
|
||||
foreach (char c in cleanLine)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case '(':
|
||||
case '{':
|
||||
case '[':
|
||||
++bracketCount;
|
||||
break;
|
||||
|
||||
case ')':
|
||||
case '}':
|
||||
case ']':
|
||||
--bracketCount;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// считывает первый токен в строке (с первого символа латиницы или _)
|
||||
// возвращает тип этого токена
|
||||
private bool IsFirstTokenElseOrElif(string line)
|
||||
{
|
||||
int beginIndex = 0;
|
||||
for (beginIndex = 0; beginIndex < line.Length; ++beginIndex)
|
||||
if (!Char.IsWhiteSpace(line[beginIndex]))
|
||||
break;
|
||||
if (line.Length < beginIndex + 4) return false;
|
||||
|
||||
// получаем строковое представление токена
|
||||
string firstToken = line.Substring(beginIndex, 4);
|
||||
return firstToken == "else" || firstToken == "elif";
|
||||
}
|
||||
|
||||
private void ArrangeIndents(ref string[] programLines)
|
||||
{
|
||||
Stack<int> indentStack = new Stack<int>();
|
||||
indentStack.Push(0);
|
||||
bool skipped_first = false;
|
||||
|
||||
foreach (var line in programLines)
|
||||
{
|
||||
lineCounter++;
|
||||
prevBracketCount = bracketCount;
|
||||
CountBrackets(line);
|
||||
if (lineCounter > 0 && LineEndsWithBackSlash(ref programLines[lineCounter - 1]))
|
||||
continue;
|
||||
if (prevBracketCount != 0)
|
||||
continue;
|
||||
|
||||
bool isEmptyLine = true; // строка не содержит символов кроме \s\t\n\r
|
||||
int currentLineSpaceCounter = 0;
|
||||
|
||||
for (int i = 0; i < line.Length; ++i)
|
||||
{
|
||||
if (line[i] == '\t')
|
||||
{
|
||||
// один \t выравнивает до следующего отступа
|
||||
currentLineSpaceCounter += indentSpaceNumber;
|
||||
currentLineSpaceCounter &= ~(indentSpaceNumber - 1);
|
||||
}
|
||||
else if (char.IsWhiteSpace(line[i]))
|
||||
currentLineSpaceCounter++;
|
||||
else
|
||||
{
|
||||
isEmptyLine = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isEmptyLine) continue;
|
||||
|
||||
int previosSpaceCounter = indentStack.Peek();
|
||||
// текущий отступ соответствует предыдущему отступу
|
||||
if (currentLineSpaceCounter == previosSpaceCounter)
|
||||
{
|
||||
if (!skipped_first)
|
||||
{
|
||||
skipped_first = true;
|
||||
continue;
|
||||
}
|
||||
AddSemicolonIfNeeded(ref programLines[lineCounter - 1]);
|
||||
}
|
||||
// текущий отступ соответствует увеличению
|
||||
else if (currentLineSpaceCounter > previosSpaceCounter)
|
||||
{
|
||||
if (skipped_first && lineCounter != 0)
|
||||
{
|
||||
programLines[lineCounter - 1] += indentToken;
|
||||
indentStack.Push(currentLineSpaceCounter);
|
||||
}
|
||||
else
|
||||
programLines[lineCounter] = programBeginWithIndentToken;
|
||||
}
|
||||
// оставшиеся случаи: отступ некорректный или уменьшение на один или несколько отступов
|
||||
else
|
||||
{
|
||||
int unindentCounter = 0;
|
||||
while (currentLineSpaceCounter < previosSpaceCounter)
|
||||
{
|
||||
indentStack.Pop();
|
||||
unindentCounter++;
|
||||
previosSpaceCounter = indentStack.Peek();
|
||||
}
|
||||
|
||||
// текущий отступ соответствует уменьшению на один или несколько отступов
|
||||
if (currentLineSpaceCounter == previosSpaceCounter)
|
||||
{
|
||||
// если сейчас ветка elif/else, то это не конец команды
|
||||
// поэтому ставить ; в конце не надо (она будет после блока elif/else)
|
||||
bool isEndOfStatement = !IsFirstTokenElseOrElif(line);
|
||||
|
||||
unindentCounter--;
|
||||
AddSemicolonIfNeeded(ref programLines[lineCounter - 1]);
|
||||
|
||||
programLines[lineCounter - 1] += unindentToken +
|
||||
string.Concat(Enumerable.Repeat(endOfLineToken + unindentToken, unindentCounter))
|
||||
+ (isEndOfStatement ? endOfLineToken : "");
|
||||
}
|
||||
// количество пробелов в строке является некорректным
|
||||
// (не соответствует количеству пробелов в строке с любым отступом)
|
||||
else // currentLineSpaceCounter > indentStack.Peek()
|
||||
{
|
||||
if (lineCounter != 0)
|
||||
programLines[lineCounter - 1] += badIndentToken;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (lineCounter != -1 && indentStack.Count() > 1)
|
||||
{
|
||||
// закрытие всех отступов в конце файла
|
||||
AddSemicolonIfNeeded(ref programLines[lineCounter]);
|
||||
programLines[lineCounter] += unindentToken +
|
||||
string.Concat(Enumerable.Repeat(endOfLineToken + unindentToken, indentStack.Count() - 2));
|
||||
}
|
||||
}
|
||||
|
||||
private int IndexOfLastSignificantSymbol(string s)
|
||||
{
|
||||
int i = s.Length - 1;
|
||||
while (i > -1 && Char.IsWhiteSpace(s[i])) --i;
|
||||
return i;
|
||||
}
|
||||
|
||||
private bool LineEndsWithBackSlash(ref string s)
|
||||
{
|
||||
int i = IndexOfLastSignificantSymbol(s);
|
||||
if (i == -1 || s[i] != '\\')
|
||||
return false;
|
||||
s = s.Substring(0, i);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void AddSemicolonIfNeeded(ref string s)
|
||||
{
|
||||
int i = IndexOfLastSignificantSymbol(s);
|
||||
if (i == -1 || s[i] != ';')
|
||||
s += endOfLineToken;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
using PascalABCCompiler.Parsers;
|
||||
using SPythonParserYacc;
|
||||
|
||||
namespace SPythonParser
|
||||
{
|
||||
|
||||
public class SPythonKeywords : BaseKeywords
|
||||
{
|
||||
|
||||
protected override string FileName => "keywordsmap.pys";
|
||||
|
||||
public SPythonKeywords() : base(true)
|
||||
{
|
||||
CreateNewKeyword("if", Tokens.IF);
|
||||
CreateNewKeyword("elif", Tokens.ELIF);
|
||||
CreateNewKeyword("else", Tokens.ELSE);
|
||||
CreateNewKeyword("while", Tokens.WHILE);
|
||||
CreateNewKeyword("for", Tokens.FOR);
|
||||
CreateNewKeyword("in", Tokens.IN);
|
||||
CreateNewKeyword("def", Tokens.DEF, KeywordKind.Function, true);
|
||||
CreateNewKeyword("return", Tokens.RETURN);
|
||||
CreateNewKeyword("break", Tokens.BREAK);
|
||||
CreateNewKeyword("continue", Tokens.CONTINUE);
|
||||
CreateNewKeyword("and", Tokens.AND);
|
||||
CreateNewKeyword("or", Tokens.OR);
|
||||
CreateNewKeyword("not", Tokens.NOT);
|
||||
CreateNewKeyword("import", Tokens.IMPORT /*, KeywordKind.Uses*/);
|
||||
CreateNewKeyword("from", Tokens.FROM);
|
||||
CreateNewKeyword("global", Tokens.GLOBAL);
|
||||
CreateNewKeyword("True", Tokens.TRUE);
|
||||
CreateNewKeyword("False", Tokens.FALSE);
|
||||
CreateNewKeyword("as", Tokens.AS);
|
||||
CreateNewKeyword("pass", Tokens.PASS);
|
||||
CreateNewKeyword("class", Tokens.CLASS, isTypeKeyword: true);
|
||||
CreateNewKeyword("lambda", Tokens.LAMBDA);
|
||||
CreateNewKeyword("exit", Tokens.EXIT);
|
||||
CreateNewKeyword("new", Tokens.NEW, KeywordKind.New);
|
||||
CreateNewKeyword("is", Tokens.IS);
|
||||
CreateNewKeyword("decltype", Tokens.DECLTYPE);
|
||||
}
|
||||
|
||||
protected override int GetIdToken() => (int)Tokens.ID;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Общие сведения об этой сборке предоставляются следующим набором
|
||||
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
|
||||
// связанные с этой сборкой.
|
||||
[assembly: AssemblyTitle("SPythonParser")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SPythonParser")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
|
||||
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
|
||||
// из модели COM задайте для атрибута ComVisible этого типа значение true.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM
|
||||
[assembly: Guid("81fe2baa-d100-4596-a392-f03bbe30f829")]
|
||||
|
||||
// Сведения о версии сборки состоят из указанных ниже четырех значений:
|
||||
//
|
||||
// Основной номер версии
|
||||
// Дополнительный номер версии
|
||||
// Номер сборки
|
||||
// Номер редакции
|
||||
//
|
||||
// Можно задать все значения или принять номера сборки и редакции по умолчанию
|
||||
// используя "*", как показано ниже:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
2798
LanguagePlugins/SPython/SPythonParserKrylovMovchan/SPythonLexer.cs
Normal file
2798
LanguagePlugins/SPython/SPythonParserKrylovMovchan/SPythonLexer.cs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,240 @@
|
|||
%using SPythonParser;
|
||||
%using QUT.Gppg;
|
||||
%using PascalABCCompiler.SyntaxTree;
|
||||
%using PascalABCCompiler.ParserTools;
|
||||
%using SPythonParserYacc;
|
||||
%using SPythonParser;
|
||||
|
||||
%namespace SPythonParser
|
||||
|
||||
Alpha [[:IsLetter:]_]
|
||||
NonZeroDigit [1-9]
|
||||
Digit 0|{NonZeroDigit}
|
||||
AlphaDigit {Alpha}|{Digit}
|
||||
INTNUM ({NonZeroDigit}(_?{Digit})*)|0
|
||||
REALNUM ({INTNUM}?\.{INTNUM})|({INTNUM}\.)
|
||||
STRINGNUM (\'([^\'\n\\]|\\.)*\')|(\"([^\"\n\\]|\\.)*\")
|
||||
FSTRINGNUM f((\'([^\'\n\\]|\\.)*\')|(\"([^\"\n\\]|\\.)*\"))
|
||||
ID {Alpha}{AlphaDigit}*
|
||||
BIGINTNUM {INTNUM}bi
|
||||
|
||||
%{
|
||||
private SPythonKeywords keywords;
|
||||
public SPythonParserTools parserTools;
|
||||
public List<string> Defines = new List<string>();
|
||||
private int last_line_needed_colon = -1;
|
||||
private LexLocation currentLexLocation;
|
||||
private LexLocation prevLexLocation
|
||||
= new LexLocation(-1, -1, -1, -1, "");
|
||||
|
||||
public Scanner(string text, SPythonParserTools parserTools, PascalABCCompiler.Parsers.BaseKeywords keywords, List<string> defines = null)
|
||||
{
|
||||
this.parserTools = parserTools;
|
||||
this.keywords = (SPythonKeywords)keywords;
|
||||
if (defines != null)
|
||||
this.Defines.AddRange(defines);
|
||||
SetSource(text, 0);
|
||||
}
|
||||
%}
|
||||
|
||||
%%
|
||||
|
||||
{INTNUM} {
|
||||
yylval = new SPythonParserYacc.ValueType();
|
||||
currentLexLocation = CurrentLexLocation;
|
||||
yylval.ex = parserTools.create_spy_int_const(yytext,currentLexLocation);
|
||||
return (int)Tokens.INTNUM;
|
||||
}
|
||||
|
||||
{BIGINTNUM} {
|
||||
yylval = new SPythonParserYacc.ValueType();
|
||||
currentLexLocation = CurrentLexLocation;
|
||||
yylval.ex = parserTools.create_bigint_const(yytext,currentLexLocation);
|
||||
return (int)Tokens.BIGINT;
|
||||
}
|
||||
|
||||
{REALNUM} {
|
||||
yylval = new SPythonParserYacc.ValueType();
|
||||
currentLexLocation = CurrentLexLocation;
|
||||
yylval.ex = parserTools.create_double_const(yytext,currentLexLocation);
|
||||
return (int)Tokens.REALNUM;
|
||||
}
|
||||
|
||||
{STRINGNUM} {
|
||||
yylval = new SPythonParserYacc.ValueType();
|
||||
currentLexLocation = CurrentLexLocation;
|
||||
yylval.stn = parserTools.create_string_const(yytext,currentLexLocation);
|
||||
return (int)Tokens.STRINGNUM;
|
||||
}
|
||||
|
||||
{FSTRINGNUM} {
|
||||
yylval = new SPythonParserYacc.ValueType();
|
||||
currentLexLocation = CurrentLexLocation;
|
||||
yylval.ex = parserTools.create_fstring(yytext,currentLexLocation);
|
||||
return (int)Tokens.FSTRINGNUM;
|
||||
}
|
||||
|
||||
{ID} {
|
||||
string cur_yytext = yytext;
|
||||
int res = keywords.KeywordOrIDToken(cur_yytext);
|
||||
currentLexLocation = CurrentLexLocation;
|
||||
yylval = new SPythonParserYacc.ValueType();
|
||||
switch (res)
|
||||
{
|
||||
case (int)Tokens.ID:
|
||||
yylval.id = parserTools.create_ident(cur_yytext, currentLexLocation);
|
||||
break;
|
||||
case (int)Tokens.AND:
|
||||
yylval.op = new op_type_node(Operators.LogicalAND, currentLexLocation);
|
||||
yylval.op.text = cur_yytext;
|
||||
break;
|
||||
case (int)Tokens.OR:
|
||||
yylval.op = new op_type_node(Operators.LogicalOR, currentLexLocation);
|
||||
yylval.op.text = cur_yytext;
|
||||
break;
|
||||
case (int)Tokens.NOT:
|
||||
yylval.op = new op_type_node(Operators.LogicalNOT, currentLexLocation);
|
||||
yylval.op.text = cur_yytext;
|
||||
break;
|
||||
case (int)Tokens.IF:
|
||||
case (int)Tokens.ELIF:
|
||||
case (int)Tokens.ELSE:
|
||||
case (int)Tokens.WHILE:
|
||||
case (int)Tokens.FOR:
|
||||
case (int)Tokens.DEF:
|
||||
last_line_needed_colon = CurrentLexLocation.StartLine;
|
||||
break;
|
||||
case (int)Tokens.CLASS:
|
||||
case (int)Tokens.LAMBDA:
|
||||
parserTools.AddErrorFromResource("UNSUPPORTED_CONSTRUCTION_{0}", currentLexLocation, yytext);
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
"//=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.AssignmentIntDivision); return (int)Tokens.INTDIVISIONEQUAL; }
|
||||
|
||||
"+=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.AssignmentAddition); return (int)Tokens.PLUSEQUAL; }
|
||||
"-=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.AssignmentSubtraction); return (int)Tokens.MINUSEQUAL; }
|
||||
"*=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.AssignmentMultiplication); return (int)Tokens.STAREQUAL; }
|
||||
"/=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.AssignmentDivision); return (int)Tokens.DIVEQUAL; }
|
||||
|
||||
"+" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.Plus); return (int)Tokens.PLUS; }
|
||||
"-" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.Minus); return (int)Tokens.MINUS; }
|
||||
"*" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.Multiplication); return (int)Tokens.STAR; }
|
||||
"//" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.IntegerDivision); return (int)Tokens.SLASHSLASH; }
|
||||
"/" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.Division); return (int)Tokens.DIVIDE; }
|
||||
"%" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.ModulusRemainder); return (int)Tokens.PERCENTAGE; }
|
||||
|
||||
"<=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.LessEqual); return (int)Tokens.LESSEQUAL; }
|
||||
">=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.GreaterEqual); return (int)Tokens.GREATEREQUAL; }
|
||||
"<" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.Less); return (int)Tokens.LESS; }
|
||||
">" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.Greater); return (int)Tokens.GREATER; }
|
||||
"==" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.Equal); return (int)Tokens.EQUAL; }
|
||||
"!=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.NotEqual); return (int)Tokens.NOTEQUAL; }
|
||||
"=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.Assignment); return (int)Tokens.ASSIGN; }
|
||||
|
||||
//"~" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.BitwiseNOT); return (int)Tokens.BINNOT; }
|
||||
"~" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.LogicalNOT); return (int)Tokens.BINNOT; }
|
||||
//"&" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.BitwiseAND); return (int)Tokens.BINAND; }
|
||||
"&" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.LogicalAND); return (int)Tokens.BINAND; }
|
||||
//"|" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.BitwiseOR); return (int)Tokens.BINOR; }
|
||||
"|" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.LogicalOR); return (int)Tokens.BINOR; }
|
||||
"<<" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.BitwiseLeftShift); return (int)Tokens.SHL; }
|
||||
">>" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.BitwiseRightShift); return (int)Tokens.SHR; }
|
||||
"^" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.BitwiseXOR); return (int)Tokens.BINXOR; }
|
||||
|
||||
//"&" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.BitwiseAND); return (int)Tokens.BINAND; }
|
||||
"&=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.AssignmentBitwiseAND); return (int)Tokens.BINANDEQUAL; }
|
||||
//"|" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.BitwiseOR); return (int)Tokens.BINOR; }
|
||||
"|=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.AssignmentBitwiseOR); return (int)Tokens.BINOREQUAL; }
|
||||
"<<=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.AssignmentBitwiseLeftShift); return (int)Tokens.SHLEQUAL; }
|
||||
">>=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.AssignmentBitwiseRightShift); return (int)Tokens.SHREQUAL; }
|
||||
"^=" { yylval = new SPythonParserYacc.ValueType(); yylval.op = new op_type_node(Operators.AssignmentBitwiseXOR); return (int)Tokens.BINXOREQUAL; }
|
||||
|
||||
|
||||
"#{" { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.INDENT; }
|
||||
"#}" { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.UNINDENT; }
|
||||
"#;" { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.END_OF_LINE; }
|
||||
|
||||
"{" { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.LBRACE; }
|
||||
"}" { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.RBRACE; }
|
||||
"[" { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.LBRACKET; }
|
||||
"]" { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.RBRACKET; }
|
||||
|
||||
"->" { yylval = new SPythonParserYacc.ValueType(); yylval.ti = new token_info(yytext); return (int)Tokens.ARROW; }
|
||||
|
||||
"." { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.DOT; }
|
||||
"," { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.COMMA; }
|
||||
":" { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.COLON; }
|
||||
";" { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.SEMICOLON; }
|
||||
"(" { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.LPAR; }
|
||||
")" { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.RPAR; }
|
||||
"**" { yylval = new SPythonParserYacc.ValueType(); return (int)Tokens.STARSTAR; }
|
||||
|
||||
\<\<expression\>\> { return (int)Tokens.tkParseModeExpression; }
|
||||
\<\<statement\>\> { return (int)Tokens.tkParseModeStatement; }
|
||||
\<\<type\>\> { return (int)Tokens.tkParseModeType; }
|
||||
|
||||
"#!" {
|
||||
parserTools.AddErrorFromResource("WRONG_INDENT",
|
||||
new LexLocation(CurrentLexLocation.StartLine + 1, 0, CurrentLexLocation.StartLine + 1, 0));
|
||||
return (int)Tokens.EOF;
|
||||
}
|
||||
|
||||
"#b" {
|
||||
parserTools.AddErrorFromResource("PROGRAM_BEGIN_WITH_INDENT",
|
||||
CurrentLexLocation);
|
||||
return (int)Tokens.EOF;
|
||||
}
|
||||
|
||||
"#$" {
|
||||
return (int)Tokens.END_OF_FILE;
|
||||
}
|
||||
|
||||
[^ \r\n] {
|
||||
parserTools.AddErrorFromResource("UNEXPECTED_TOKEN_{0}", CurrentLexLocation, yytext);
|
||||
return (int)Tokens.EOF;
|
||||
}
|
||||
|
||||
%{
|
||||
//yylloc = new LexLocation(tokLin, tokCol, tokELin, tokECol);
|
||||
prevLexLocation = yylloc;
|
||||
if (currentLexLocation != null)
|
||||
yylloc = currentLexLocation;
|
||||
else
|
||||
yylloc = CurrentLexLocation;
|
||||
|
||||
currentLexLocation = null;
|
||||
%}
|
||||
|
||||
%%
|
||||
|
||||
public LexLocation CurrentLexLocation
|
||||
{
|
||||
get {
|
||||
return new LexLocation(tokLin, tokCol, tokELin, tokECol, parserTools.currentFileName);
|
||||
}
|
||||
}
|
||||
|
||||
public override void yyerror(string format, params object[] args)
|
||||
{
|
||||
string expected = parserTools.ExpectedToken(last_line_needed_colon == prevLexLocation.StartLine, args);
|
||||
LexLocation lexLocation = parserTools.GetLexLocation(
|
||||
yytext, expected, prevLexLocation, CurrentLexLocation);
|
||||
|
||||
if (yytext == "#{" && expected == "END_OF_LINE") {
|
||||
parserTools.AddErrorFromResource("WRONG_INDENT", lexLocation);
|
||||
}
|
||||
else {
|
||||
string errorMsg = parserTools.CreateErrorString(yytext, expected);
|
||||
parserTools.AddError(errorMsg, lexLocation);
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool yywrap()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
using PascalABCCompiler.Parsers;
|
||||
using SPythonParserYacc;
|
||||
using PascalABCCompiler.SyntaxTreeConverters;
|
||||
|
||||
|
||||
|
||||
namespace SPythonParser
|
||||
{
|
||||
|
||||
public class SPythonLanguageParser : BaseParser
|
||||
{
|
||||
public List<ISyntaxTreeConverter> SyntaxTreeConvertersForIntellisense { get; set; }
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
CompilerDirectives = new List<compiler_directive>();
|
||||
|
||||
Errors.Clear();
|
||||
}
|
||||
|
||||
protected override void PreBuildTree(string FileName)
|
||||
{
|
||||
CompilerDirectives = new List<compiler_directive>();
|
||||
|
||||
}
|
||||
|
||||
protected override syntax_tree_node BuildTreeInNormalMode(string FileName, string Text, bool compilingNotMainProgram, List<string> DefinesList = null)
|
||||
{
|
||||
Errors.Clear();
|
||||
Warnings.Clear();
|
||||
|
||||
syntax_tree_node root = Parse(Text, FileName, false, compilingNotMainProgram, DefinesList);
|
||||
|
||||
if (Errors.Count > 0)
|
||||
return null;
|
||||
|
||||
if (root != null && root is compilation_unit)
|
||||
(root as compilation_unit).file_name = FileName;
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
public syntax_tree_node Parse(string Text, string fileName, bool buildTreeForFormatter = false, bool compilingNotMainProgram = false, List<string> definesList = null)
|
||||
{
|
||||
#if DEBUG
|
||||
#if _ERR
|
||||
FileInfo f = new FileInfo(FileName);
|
||||
var sv = Path.ChangeExtension(FileName,".grmtrack1");
|
||||
var sw = new StreamWriter(sv);
|
||||
Console.SetError(sw);
|
||||
#endif
|
||||
#endif
|
||||
SPythonParserTools parserTools = new SPythonParserTools(Errors, Warnings, LanguageInformation.ValidDirectives, buildTreeForFormatter, false,
|
||||
Path.GetFullPath(fileName), CompilerDirectives); // контекст сканера и парсера
|
||||
|
||||
|
||||
IndentArranger ia = new IndentArranger();
|
||||
ia.ProcessSourceText(ref Text);
|
||||
|
||||
var scanner = new Scanner(Text, parserTools, LanguageInformation.KeywordsStorage, definesList);
|
||||
|
||||
SPythonGPPGParser parser = new SPythonGPPGParser(scanner, parserTools, compilingNotMainProgram);
|
||||
|
||||
if (!parser.Parse())
|
||||
if (Errors.Count == 0)
|
||||
parserTools.AddErrorFromResource("UNEXPECTED_SYNTAX_ERROR", null);
|
||||
#if DEBUG
|
||||
#if _ERR
|
||||
sw.Close();
|
||||
#endif
|
||||
#endif
|
||||
return parser.root;
|
||||
}
|
||||
|
||||
protected override syntax_tree_node BuildTreeInTypeExprMode(string FileName, string Text)
|
||||
{
|
||||
Text = string.Concat("<<type>>", Text);
|
||||
|
||||
var expr = Parse(Text, FileName) as expression;
|
||||
|
||||
if (expr == null)
|
||||
return null;
|
||||
|
||||
foreach (ISyntaxTreeConverter converter in SyntaxTreeConvertersForIntellisense)
|
||||
{
|
||||
expr = (expression)converter.Convert(expr, true);
|
||||
}
|
||||
|
||||
return expr;
|
||||
}
|
||||
|
||||
protected override syntax_tree_node BuildTreeInExprMode(string FileName, string Text)
|
||||
{
|
||||
if (Text == string.Empty)
|
||||
return null;
|
||||
|
||||
Text = string.Concat("<<expression>>", Text);
|
||||
|
||||
var expr = Parse(Text, FileName) as expression;
|
||||
|
||||
if (expr == null)
|
||||
return null;
|
||||
|
||||
foreach (ISyntaxTreeConverter converter in SyntaxTreeConvertersForIntellisense)
|
||||
{
|
||||
expr = (expression)converter.Convert(expr, true);
|
||||
}
|
||||
|
||||
return expr;
|
||||
}
|
||||
|
||||
protected override syntax_tree_node BuildTreeInSpecialMode(string FileName, string Text, bool compilingNotMainProgram)
|
||||
{
|
||||
Errors.Clear();
|
||||
|
||||
return Parse(Text, FileName, compilingNotMainProgram);
|
||||
}
|
||||
|
||||
protected override syntax_tree_node BuildTreeInFormatterMode(string FileName, string Text)
|
||||
{
|
||||
Errors.Clear();
|
||||
|
||||
return Parse(Text, FileName, true);
|
||||
}
|
||||
|
||||
protected override syntax_tree_node BuildTreeInStatementMode(string FileName, string Text)
|
||||
{
|
||||
Text = string.Concat("<<statement>>", Text);
|
||||
|
||||
var st = Parse(Text, FileName) as statement;
|
||||
|
||||
if (st == null)
|
||||
return null;
|
||||
|
||||
foreach (ISyntaxTreeConverter converter in SyntaxTreeConvertersForIntellisense)
|
||||
{
|
||||
st = (statement)converter.Convert(st, true);
|
||||
}
|
||||
|
||||
return st;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net40</TargetFramework>
|
||||
|
||||
<RootNamespace>Languages.SPython.Frontend.Wrapping</RootNamespace>
|
||||
|
||||
<OutputPath>..\..\..\bin\</OutputPath>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Errors\Errors.csproj" />
|
||||
<ProjectReference Include="..\..\..\LanguageIntegrator\LanguageIntegrator.csproj" />
|
||||
<ProjectReference Include="..\..\..\Localization\Localization.csproj" />
|
||||
<ProjectReference Include="..\..\..\ParserTools\ParserTools.csproj" />
|
||||
<ProjectReference Include="..\..\..\SyntaxTree\SyntaxTree.csproj" />
|
||||
<ProjectReference Include="..\..\..\SyntaxVisitors\SyntaxVisitors.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
1098
LanguagePlugins/SPython/SPythonParserKrylovMovchan/SPythonParser.y
Normal file
1098
LanguagePlugins/SPython/SPythonParserKrylovMovchan/SPythonParser.y
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,434 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
using PascalABCCompiler.ParserTools;
|
||||
using PascalABCCompiler.Parsers;
|
||||
using System.Text;
|
||||
using PascalABCCompiler.Errors;
|
||||
using PascalABCCompiler.ParserTools.Directives;
|
||||
using QUT.Gppg;
|
||||
using System.Text.RegularExpressions;
|
||||
using Languages.Facade;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace SPythonParser
|
||||
{
|
||||
public static class StringResources
|
||||
{
|
||||
private static string prefix = "SPYTHONPARSER_";
|
||||
public static string Get(string Id)
|
||||
{
|
||||
string ret = PascalABCCompiler.StringResources.Get(prefix + Id);
|
||||
if (ret == prefix + Id)
|
||||
return Id;
|
||||
else
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public class SymbolTable
|
||||
{
|
||||
private SymbolTable outerScope;
|
||||
private SortedSet<string> symbols = new SortedSet<string>();
|
||||
public SymbolTable(SymbolTable outerScope = null)
|
||||
{
|
||||
this.outerScope = outerScope;
|
||||
}
|
||||
|
||||
public bool Contains(string ident)
|
||||
{
|
||||
SymbolTable curr = this;
|
||||
|
||||
while (curr != null)
|
||||
{
|
||||
if (curr.symbols.Contains(ident))
|
||||
return true;
|
||||
curr = curr.outerScope;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Add(string ident)
|
||||
{
|
||||
symbols.Add(ident);
|
||||
}
|
||||
|
||||
public SymbolTable OuterScope { get { return outerScope; } }
|
||||
}
|
||||
public class SPythonParserTools : BaseParserTools
|
||||
{
|
||||
public bool build_tree_for_formatter = false;
|
||||
public bool build_tree_for_format_strings = false;
|
||||
|
||||
public override Dictionary<string, string> TokenNum { get; protected set; }
|
||||
|
||||
private void InitializeTokenNum()
|
||||
{
|
||||
TokenNum = new Dictionary<string, string>();
|
||||
TokenNum["STATEMENT"] = StringResources.Get("STMT");
|
||||
TokenNum["EXPRESSION"] = StringResources.Get("EXPR");
|
||||
TokenNum["EOF"] = StringResources.Get("EOF1");
|
||||
TokenNum["ID"] = StringResources.Get("IDENTIFIER");
|
||||
TokenNum["INTNUM"] = StringResources.Get("INTNUM");
|
||||
TokenNum["REALNUM"] = StringResources.Get("REALNUM");
|
||||
TokenNum["STRINGNUM"] = StringResources.Get("STRINGNUM");
|
||||
TokenNum["END_OF_FILE"] = StringResources.Get("#$");
|
||||
TokenNum["#$"] = StringResources.Get("#$");
|
||||
TokenNum["INDENT"] = StringResources.Get("#{");
|
||||
TokenNum["#{"] = StringResources.Get("#{");
|
||||
TokenNum["UNINDENT"] = StringResources.Get("#}");
|
||||
TokenNum["#}"] = StringResources.Get("#}");
|
||||
TokenNum["END_OF_LINE"] = StringResources.Get("#;");
|
||||
TokenNum["#;"] = StringResources.Get("#;");
|
||||
//TokenNum["tkStringLiteral"] = StringResources.Get("TKSTRINGLITERAL");
|
||||
TokenNum["IN"] = "'in'";
|
||||
TokenNum["IMPORT"] = "'import'";
|
||||
TokenNum["SEMICOLON"] = "';'";
|
||||
TokenNum["ASSIGN"] = "'='";
|
||||
TokenNum["COLON"] = "':'";
|
||||
TokenNum["DOT"] = "'.'";
|
||||
TokenNum["LPAR"] = "'('";
|
||||
TokenNum["RPAR"] = "')'";
|
||||
TokenNum["LBRACKET"] = "'['";
|
||||
TokenNum["RBRACKET"] = "']'";
|
||||
TokenNum["tkQuestion"] = "'?'";
|
||||
TokenNum["COMMA"] = "','";
|
||||
TokenNum["PERCENTAGE"] = "'%'";
|
||||
TokenNum["DIVIDE"] = "'/'";
|
||||
TokenNum["MINUS"] = "'-'";
|
||||
TokenNum["PLUS"] = "'+'";
|
||||
TokenNum["SLASHSLASH"] = "'//'";
|
||||
TokenNum["STAR"] = "'*'";
|
||||
TokenNum["EQUAL"] = "'=='";
|
||||
TokenNum["NOTEQUAL"] = "'!='";
|
||||
TokenNum["GREATER"] = "'>'";
|
||||
TokenNum["GREATEREQUAL"] = "'>='";
|
||||
TokenNum["LESS"] = "'<'";
|
||||
TokenNum["LESSEQUAL"] = "'<='";
|
||||
TokenNum["ARROW"] = "'->'";
|
||||
}
|
||||
|
||||
public SPythonParserTools(List<Error> errors, List<CompilerWarning> warnings,
|
||||
Dictionary<string, DirectiveInfo> validDirectives, bool buildTreeForFormatter = false, bool buildTreeForFormatterStrings = false,
|
||||
string currentFileName = null, List<compiler_directive> compilerDirectives = null)
|
||||
: base(errors, warnings, validDirectives, buildTreeForFormatter, buildTreeForFormatterStrings, currentFileName, compilerDirectives)
|
||||
{
|
||||
|
||||
InitializeTokenNum();
|
||||
}
|
||||
|
||||
public int TokenPriority(string tok)
|
||||
{
|
||||
switch (tok)
|
||||
{
|
||||
case "END_OF_LINE":
|
||||
return 300;
|
||||
case "STATEMENT":
|
||||
return 100;
|
||||
case "EXPRESSION":
|
||||
return 100;
|
||||
case "EQUAL":
|
||||
return 90;
|
||||
case "COLON":
|
||||
return 200;
|
||||
case "ASSIGN":
|
||||
return 70;
|
||||
case "ID":
|
||||
return 60;
|
||||
case "LPAR":
|
||||
return 100;
|
||||
case "RPAR":
|
||||
return 130;
|
||||
case "DOT":
|
||||
return 20;
|
||||
case "RBRACKET":
|
||||
return 10;
|
||||
case "GREATER":
|
||||
return 5;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected override string ReplaceSpecialSymbols(string text)
|
||||
{
|
||||
StringBuilder new_text = new StringBuilder(text);
|
||||
int curr = 0;
|
||||
for (int i = 0; i < text.Length; ++i)
|
||||
{
|
||||
if (text[i] != '\\') new_text[curr++] = text[i];
|
||||
else switch (text[i + 1])
|
||||
{
|
||||
case 'a': new_text[curr++] = '\a'; ++i; break;
|
||||
case '0': new_text[curr++] = '\0'; ++i; break;
|
||||
case 'b': new_text[curr++] = '\b'; ++i; break;
|
||||
case 't': new_text[curr++] = '\t'; ++i; break;
|
||||
case 'n': new_text[curr++] = '\n'; ++i; break;
|
||||
case 'v': new_text[curr++] = '\v'; ++i; break;
|
||||
case 'f': new_text[curr++] = '\f'; ++i; break;
|
||||
case 'r': new_text[curr++] = '\r'; ++i; break;
|
||||
|
||||
case '\'': new_text[curr++] = '\''; ++i; break;
|
||||
case '"': new_text[curr++] = '"'; ++i; break;
|
||||
case '\\': new_text[curr++] = '\\'; ++i; break;
|
||||
|
||||
default: new_text[curr++] = '\\'; break;
|
||||
}
|
||||
}
|
||||
return new_text.ToString().Substring(0, curr);
|
||||
}
|
||||
|
||||
public override literal create_string_const(string text, SourceContext sc)
|
||||
{
|
||||
literal lt;
|
||||
text = ReplaceSpecialSymbols(text.Substring(1, text.Length - 2));
|
||||
lt = new string_const(text);
|
||||
lt.source_context = sc;
|
||||
return lt;
|
||||
}
|
||||
|
||||
private int num1 = 0;
|
||||
|
||||
public ident NewId(string prefix, SourceContext sc = null)
|
||||
{
|
||||
num1++;
|
||||
return new ident(prefix + num1.ToString(),sc);
|
||||
}
|
||||
|
||||
private expression RemoveBracesAndContent(string input, SourceContext sc)
|
||||
{
|
||||
var regex = new Regex(@"\{([^}]+)\}");
|
||||
var parts = new List<expression>();
|
||||
|
||||
int lastIndex = 0;
|
||||
foreach (Match m in regex.Matches(input))
|
||||
{
|
||||
var innerRegex = new Regex(@"^([^:]*)(?::(.*))?$");
|
||||
|
||||
SourceContext expr_sc = new SourceContext(sc.LeftSourceContext, sc.RightSourceContext);
|
||||
expr_sc.begin_position.column_num += m.Index + 3;
|
||||
|
||||
var raw = m.Groups[1].Value;
|
||||
var innerMatch = innerRegex.Match(raw);
|
||||
|
||||
if (!innerMatch.Success)
|
||||
{
|
||||
AddErrorFromResource("ILL_FORMED_FSTRING_{0}", expr_sc, raw);
|
||||
return null;
|
||||
}
|
||||
|
||||
string expr_text = innerMatch.Groups[1].Value;
|
||||
string format = innerMatch.Groups[2].Success ? innerMatch.Groups[2].Value : null;
|
||||
|
||||
SourceContext format_sc = new SourceContext(sc.LeftSourceContext, sc.RightSourceContext);
|
||||
format_sc.begin_position.column_num += m.Index + 4 + expr_text.Length;
|
||||
|
||||
if (format != null)
|
||||
{
|
||||
var formatRegex = new Regex(@"^(x|X|d|b|\.(0|([1-9][0-9]*))f)$");
|
||||
var formatMatch = formatRegex.Match(format);
|
||||
if (!formatMatch.Success)
|
||||
AddErrorFromResource("FSTRING_UNNKOWN_FORMAT_{0}", format_sc, format);
|
||||
format = formatMatch.Value;
|
||||
}
|
||||
|
||||
if (m.Index > lastIndex)
|
||||
{
|
||||
var text = input.Substring(lastIndex, m.Index - lastIndex);
|
||||
if (text != "")
|
||||
parts.Add(new string_const(text, sc));
|
||||
}
|
||||
|
||||
List<Error> errors = new List<Error>();
|
||||
expression expr =
|
||||
LanguageProvider.Instance.SelectLanguageByExtension(currentFileName).Parser
|
||||
.GetExpression(currentFileName, expr_text, errors, new List<CompilerWarning>());
|
||||
|
||||
if (expr == null)
|
||||
{
|
||||
AddErrorFromResource("FSTRING_NESTED_EXPRESSION_{0}_PARSING_FAILURE", expr_sc, expr_text);
|
||||
expr = new expression();
|
||||
}
|
||||
|
||||
expr.source_context = expr_sc;
|
||||
method_call mc;
|
||||
if (format == null)
|
||||
{
|
||||
mc = new method_call(new ident("str"), new expression_list(expr, sc), sc);
|
||||
}
|
||||
else
|
||||
{
|
||||
mc = new method_call(new ident("!format"),
|
||||
new expression_list(new List<expression> { expr, new string_const(format, sc) }, sc), sc);
|
||||
}
|
||||
parts.Add(mc);
|
||||
lastIndex = m.Index + m.Length;
|
||||
}
|
||||
|
||||
if (lastIndex < input.Length)
|
||||
{
|
||||
var text = input.Substring(lastIndex);
|
||||
if (text != "")
|
||||
parts.Add(new string_const(text, sc));
|
||||
}
|
||||
|
||||
expression result = parts[parts.Count - 1];
|
||||
for (int i = parts.Count - 2; i >= 0; i--)
|
||||
{
|
||||
result = new bin_expr(parts[i], result, Operators.Plus, sc);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public expression create_fstring(string text, SourceContext sc)
|
||||
{
|
||||
text = ReplaceSpecialSymbols(text.Substring(2, text.Length - 3));
|
||||
expression res = RemoveBracesAndContent(text, sc);
|
||||
res.source_context = sc;
|
||||
return res;
|
||||
}
|
||||
|
||||
public LexLocation GetLexLocation(string found, string expected, LexLocation prev_loc, LexLocation curr_loc)
|
||||
{
|
||||
// жертвы, чтобы достать имя файла
|
||||
SourceContext sc = curr_loc;
|
||||
if (found == "#{" && expected == "END_OF_LINE" ||
|
||||
found == "#;" && expected == "INDENT")
|
||||
return new LexLocation(curr_loc.StartLine + 1, 0, curr_loc.StartLine + 1, 0, sc.FileName);
|
||||
if (found == "#{" || found == "#;")
|
||||
return new LexLocation(prev_loc.EndLine, prev_loc.EndColumn, prev_loc.EndLine, prev_loc.EndColumn + 1, sc.FileName);
|
||||
return curr_loc;
|
||||
}
|
||||
|
||||
public string ExpectedToken(bool line_needs_colon, params object[] args) {
|
||||
string found = args[0].ToString();
|
||||
List<string> tokens = new List<string>(args.Skip(1).Cast<string>());
|
||||
|
||||
if (tokens.Count != 1) {
|
||||
tokens = tokens.Except((new string[] { found })).ToList();
|
||||
}
|
||||
|
||||
// Это - временное решение, пока эти слова относятся к идентификаторам (что неправильно)
|
||||
//if (tokens.Contains("ID"))
|
||||
// tokens = tokens.Except((new string[] { "tkAbstract", "tkOverload", "tkReintroduce", "tkOverride", "tkVirtual", "tkAt", "tkOn", "tkName", "tkForward", "tkRead", "tkWrite" })).ToList();
|
||||
|
||||
if (tokens.Contains("FOR") && tokens.Contains("IF") && tokens.Contains("WHILE") && tokens.Contains("DEF"))
|
||||
return "STATEMENT";
|
||||
|
||||
if (tokens.Contains("ID") && tokens.Contains("INTNUM") && tokens.Contains("REALNUM") && tokens.Contains("STRINGNUM"))
|
||||
return "EXPRESSION";
|
||||
|
||||
if (line_needs_colon && tokens.Contains("COLON"))
|
||||
return "COLON";
|
||||
|
||||
tokens = tokens.OrderByDescending(s => TokenPriority(s)).ToList();
|
||||
|
||||
return tokens.First();
|
||||
}
|
||||
|
||||
public const_node create_spy_int_const(string text, SourceContext sc) {
|
||||
|
||||
return create_int_const(text.Replace("_", ""), sc);
|
||||
}
|
||||
|
||||
public string CreateErrorString(string yytext, string exp_token)
|
||||
{
|
||||
if (yytext.Equals("#;") && exp_token.Equals("INDENT"))
|
||||
{
|
||||
return StringResources.Get("LINE_WITHOUT_INDENT");
|
||||
}
|
||||
|
||||
if (yytext.Equals("#{") && !exp_token.Equals("END_OF_LINE"))
|
||||
{
|
||||
yytext = "#;";
|
||||
}
|
||||
if (exp_token.Equals("INDENT"))
|
||||
{
|
||||
exp_token = "END_OF_LINE";
|
||||
}
|
||||
|
||||
string prefix = "";
|
||||
if (yytext != "")
|
||||
prefix = StringResources.Get("FOUND{0}");
|
||||
else
|
||||
prefix = StringResources.Get("FOUNDEOF");
|
||||
|
||||
var ExpectedString = StringResources.Get("EXPECTED{1}");
|
||||
|
||||
if (exp_token.Equals("STATEMENT") ||
|
||||
exp_token.Equals("ID") ||
|
||||
exp_token.Equals("INDENT") ||
|
||||
exp_token.Equals("UNINDENT") ||
|
||||
exp_token.Equals("UNINDENT") ||
|
||||
exp_token.Equals("END_OF_LINE") ||
|
||||
exp_token.Equals("END_OF_FILE"))
|
||||
ExpectedString = StringResources.Get("EXPECTEDR{1}");
|
||||
else if (exp_token.Equals("STRINGNUM"))
|
||||
ExpectedString = StringResources.Get("EXPECTEDF{1}");
|
||||
var MaxTokHuman = ConvertToHumanName(exp_token);
|
||||
|
||||
if (yytext == "#{" || yytext == "#}" || yytext == "#;" || yytext == "#$")
|
||||
{
|
||||
prefix = StringResources.Get("FOUNDM{0}");
|
||||
yytext = ConvertToHumanName(yytext);
|
||||
return string.Format(prefix + ExpectedString, yytext, MaxTokHuman);
|
||||
}
|
||||
|
||||
return string.Format(prefix + ExpectedString, "'" + yytext + "'", MaxTokHuman);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* public string CreateErrorString(string yytext, LexLocation yyloc, params object[] args)
|
||||
{
|
||||
string expected = String.Join(", ", args.Skip(1).Select(x => x.ToString()));
|
||||
string err = $"PARSER ERROR \"{yytext}\" AT LINE #{yyloc.StartLine}: EXPECTED {expected}, FOUND {args[0]}";
|
||||
return err;
|
||||
}*/
|
||||
|
||||
protected override string GetFromStringResources(string id)
|
||||
{
|
||||
return StringResources.Get(id);
|
||||
}
|
||||
|
||||
protected override string ExtractDirectiveTextWithoutSpecialSymbols(string directive)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public typecast_node NewAsIsExpr(syntax_tree_node term, op_typecast typecast_op, type_definition simple_or_template_type_reference, LexLocation loc)
|
||||
{
|
||||
var naie = new typecast_node((addressed_value)term, simple_or_template_type_reference, typecast_op, loc);
|
||||
|
||||
return naie;
|
||||
}
|
||||
}
|
||||
|
||||
// temp
|
||||
public class ParserLambdaHelper
|
||||
{
|
||||
private int lambda_num = 0;
|
||||
public List<function_lambda_definition> lambdaDefinitions;
|
||||
public static string lambdaPrefix = "<>lambda";
|
||||
|
||||
public ParserLambdaHelper()
|
||||
{
|
||||
lambdaDefinitions = new List<function_lambda_definition>();
|
||||
}
|
||||
|
||||
public string CreateLambdaName()
|
||||
{
|
||||
lambda_num++;
|
||||
return lambdaPrefix + lambda_num.ToString();
|
||||
}
|
||||
|
||||
public bool IsLambdaName(ident id)
|
||||
{
|
||||
return id.name.StartsWith(lambdaPrefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,4 @@
|
|||
call generateParser.bat
|
||||
dotnet build -c Release --no-incremental -v d SPythonParser.csproj
|
||||
|
||||
@IF %ERRORLEVEL% NEQ 0 PAUSE
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
cls
|
||||
..\..\..\Utils\GPLex_GPPG\Gplex.exe /unicode SPythonLexer.lex
|
||||
..\..\..\Utils\GPLex_GPPG\Gppg.exe /no-lines /gplex SPythonParser.y
|
||||
pause
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using PascalABCCompiler.Errors;
|
||||
using PascalABCCompiler.TreeConverter;
|
||||
using PascalABCCompiler.TreeRealization;
|
||||
|
||||
namespace SPythonSyntaxTreeVisitor
|
||||
{
|
||||
class SPythonSemanticError : SimpleSemanticError
|
||||
{
|
||||
public SPythonSemanticError(location loc, string ErrResourceString, params object[] values) : base(loc, ErrResourceString, values) { }
|
||||
public override string ToString()
|
||||
{
|
||||
string err_res = ErrorResourceString;
|
||||
if (!ErrorResourceString.StartsWith("SPYTHONSEMANTIC_"))
|
||||
{
|
||||
err_res = "SEMANTICERROR_" + ErrorResourceString;
|
||||
}
|
||||
if (values != null)
|
||||
return string.Format(PascalABCCompiler.StringResources.Get(err_res), values);
|
||||
else
|
||||
return string.Format(PascalABCCompiler.StringResources.Get(err_res), "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Общие сведения об этой сборке предоставляются следующим набором
|
||||
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
|
||||
// связанные со сборкой.
|
||||
[assembly: AssemblyTitle("SPythonSyntaxTreeVisitor")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SPythonSyntaxTreeVisitor")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
|
||||
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
|
||||
// COM, задайте атрибуту ComVisible значение TRUE для этого типа.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
|
||||
[assembly: Guid("d38a21e0-1d61-4905-82b3-1800e1991d57")]
|
||||
|
||||
// Сведения о версии сборки состоят из указанных ниже четырех значений:
|
||||
//
|
||||
// Основной номер версии
|
||||
// Дополнительный номер версии
|
||||
// Номер сборки
|
||||
// Редакция
|
||||
//
|
||||
// Можно задать все значения или принять номера сборки и редакции по умолчанию
|
||||
// используя "*", как показано ниже:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net40</TargetFramework>
|
||||
|
||||
<RootNamespace>Languages.SPython.Backend.Conversion</RootNamespace>
|
||||
|
||||
<OutputPath>..\..\..\..\bin\</OutputPath>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\CompilerTools\CompilerTools.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\Errors\Errors.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\Localization\Localization.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\SemanticTree\SemanticTree.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\SyntaxTree\SyntaxTree.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\SyntaxVisitors\SyntaxVisitors.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\TreeConverter\TreeConverter.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,349 @@
|
|||
using System.Collections.Generic;
|
||||
using PascalABCCompiler.SemanticTree;
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
using PascalABCCompiler.SystemLibrary;
|
||||
using PascalABCCompiler.TreeConverter;
|
||||
using PascalABCCompiler.TreeRealization;
|
||||
using PascalABCCompiler.Errors;
|
||||
using System.ComponentModel.Design;
|
||||
using System;
|
||||
|
||||
namespace SPythonSyntaxTreeVisitor
|
||||
{
|
||||
// Возможно, стоит заменить на декоратор или стратегию вместо наследования EVA
|
||||
public class spython_syntax_tree_visitor : syntax_tree_visitor
|
||||
{
|
||||
syntax_tree_visitor mainVisitor;
|
||||
|
||||
public spython_syntax_tree_visitor(syntax_tree_visitor mainSyntaxTreeVisitor) : base(false)
|
||||
{
|
||||
|
||||
mainVisitor = mainSyntaxTreeVisitor;
|
||||
convertion_data_and_alghoritms = mainSyntaxTreeVisitor.convertion_data_and_alghoritms;
|
||||
ret = mainSyntaxTreeVisitor.ret;
|
||||
context = mainSyntaxTreeVisitor.context;
|
||||
contextChanger = mainSyntaxTreeVisitor.contextChanger;
|
||||
|
||||
OnLeave = RunAdditionalChecks;
|
||||
}
|
||||
|
||||
private void RunAdditionalChecks(syntax_tree_node node)
|
||||
{
|
||||
switch (node)
|
||||
{
|
||||
case bin_expr _bin_expr:
|
||||
expression_node left = convert_strong(_bin_expr.left);
|
||||
expression_node right = convert_strong(_bin_expr.right);
|
||||
if (_bin_expr.operation_type == Operators.Plus)
|
||||
{
|
||||
if ((left.type.name == "string" && right.type.name == "integer") || (left.type.name == "integer" && right.type.name == "string"))
|
||||
{
|
||||
AddError(left.location, "SPYTHONSEMANTIC_NOT_ALLOWED_{0}_DIFF_TYPES_{1}_{2}", '+', left.type, right.type); ;
|
||||
//base.AddError(left.location, "SPYTHONSEMANTIC_NOT_ALLOWED_{0}_DIFF_TYPES_{1}_{2}", Operators.Plus, left.type, right.type); ;
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
protected override void get_system_module(common_unit_node psystem_unit)
|
||||
{
|
||||
init_system_module(psystem_unit);
|
||||
|
||||
//esli zapustili v otladke, to vosstanovim mnozhestvo i procedury sozdanija diapasonov, inache ne budet rabotat
|
||||
if (debugging)
|
||||
{
|
||||
List<SymbolInfo> si = SystemLibInitializer.CreateDiapason.SymbolInfo;
|
||||
si = SystemLibInitializer.CreateObjDiapason.SymbolInfo;
|
||||
si = SystemLibInitializer.TypedSetType.SymbolInfo;
|
||||
}
|
||||
|
||||
// SystemUnitAssigned = true; - убрали для SPython
|
||||
CreateSpecialFields(psystem_unit);
|
||||
}
|
||||
|
||||
// Инициализируем только переменные экземпляра, не влияем на глобальное состояние в отличие от визитора Паскаля EVA
|
||||
protected override void internal_reset()
|
||||
{
|
||||
_system_unit = mainVisitor._system_unit;
|
||||
SystemLibrary.system_unit = _system_unit;
|
||||
ResetSelfFields();
|
||||
}
|
||||
|
||||
public override void AddError(location loc, string ErrResourceString, params object[] values)
|
||||
{
|
||||
Error err = new SPythonSemanticError(loc, ErrResourceString, values);
|
||||
if (ErrResourceString == "FORWARD_DECLARATION_{0}_AS_BASE_TYPE")
|
||||
{
|
||||
throw err;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.AddError(err);
|
||||
}
|
||||
}
|
||||
|
||||
private type_node ConvertTypeNameToSPythonTypeName(type_node tn)
|
||||
{
|
||||
string new_name = tn.PrintableName;
|
||||
new_name = new_name
|
||||
.Replace(",", ", ")
|
||||
.Replace("<", "[")
|
||||
.Replace(">", "]")
|
||||
.Replace("Tuple", "tuple")
|
||||
.Replace("List", "list")
|
||||
.Replace("NewSet", "set")
|
||||
.Replace("Dictionary", "dict")
|
||||
.Replace("empty_list", "list[anytype]")
|
||||
.Replace("empty_set", "set[anytype]")
|
||||
.Replace("empty_dict", "dict[anytype]")
|
||||
.Replace("integer", "int")
|
||||
.Replace("string", "str")
|
||||
.Replace("real", "float")
|
||||
.Replace("boolean", "bool")
|
||||
.Replace("System.Numerics.BigInteger", "bigint")
|
||||
;
|
||||
return new common_type_node(new_name, type_access_level.tal_public, null, null, tn.location);
|
||||
}
|
||||
|
||||
public override void AddError(Error err, bool shouldReturn = false)
|
||||
{
|
||||
// TODO : Add Error Rerouting according to SPython semantics
|
||||
switch (err)
|
||||
{
|
||||
case OperatorCanNotBeAppliedToThisTypes _op_err:
|
||||
if (_op_err.operator_name == "mod")
|
||||
base.AddError(new OperatorCanNotBeAppliedToThisTypes("%", _op_err.left, _op_err.right, _op_err.loc), shouldReturn);
|
||||
else if (_op_err.operator_name == "div")
|
||||
base.AddError(new OperatorCanNotBeAppliedToThisTypes("//", _op_err.left, _op_err.right, _op_err.loc), shouldReturn);
|
||||
return;
|
||||
case FunctionExpectedProcedureMeet _proc_meet:
|
||||
base.AddError(new SPythonSemanticError(_proc_meet.loc, "SPYTHONSEMANTIC_FUNCTION_{0}_NO_RETURN", _proc_meet.function.name));
|
||||
return;
|
||||
case CanNotConvertTypes conv_err:
|
||||
base.AddError(new CanNotConvertTypes(conv_err.expression_node,
|
||||
ConvertTypeNameToSPythonTypeName(conv_err.from),
|
||||
ConvertTypeNameToSPythonTypeName(conv_err.to),
|
||||
conv_err.loc));
|
||||
return;
|
||||
}
|
||||
base.AddError(err, shouldReturn);
|
||||
|
||||
}
|
||||
|
||||
private Dictionary<string, Dictionary<string, string>> containersNamesMapping = new Dictionary<string, Dictionary<string, string>>
|
||||
{
|
||||
{"List",
|
||||
new Dictionary<string, string> {
|
||||
{ "append", "Add" },
|
||||
{ "clear", "Clear" },
|
||||
{ "insert", "Insert" },
|
||||
{ "remove", "Remove" },
|
||||
{ "pop", "pop" },
|
||||
{ "index", "IndexOf" },
|
||||
{ "count", "!count" },
|
||||
{ "sort", "Sort" },
|
||||
{ "reverse", "Reverse" },
|
||||
{ "copy", "ToList" },
|
||||
{ "Select", "Select" },
|
||||
{ "Where", "Where" },
|
||||
} },
|
||||
|
||||
{"NewSet",
|
||||
new Dictionary<string, string> {
|
||||
{ "add", "add" },
|
||||
{ "remove", "remove" },
|
||||
{ "copy", "copy" },
|
||||
{ "Select", "Select" },
|
||||
{ "Where", "Where" },
|
||||
} },
|
||||
|
||||
{"Dictionary",
|
||||
new Dictionary<string, string> {
|
||||
{ "keys", "get_keys" },
|
||||
{ "values", "get_values" },
|
||||
{ "copy", "copy" },
|
||||
{ "Select", "Select" },
|
||||
{ "Where", "Where" },
|
||||
} }
|
||||
};
|
||||
|
||||
|
||||
HashSet<method_call> visited_method_calls = new HashSet<method_call>();
|
||||
|
||||
public override void visit(method_call _method_call)
|
||||
{
|
||||
if (visited_method_calls.Contains(_method_call))
|
||||
{
|
||||
base.visit(_method_call);
|
||||
return;
|
||||
}
|
||||
visited_method_calls.Add(_method_call);
|
||||
if (_method_call.dereferencing_value is dot_node dn && dn.right is ident id)
|
||||
{
|
||||
try
|
||||
{
|
||||
expression_node left = convert_strong(dn.left);
|
||||
//dn.left = new semantic_addr_value(left);
|
||||
if (left?.type != null)
|
||||
foreach (string tName in containersNamesMapping.Keys)
|
||||
{
|
||||
if (left.type.name.StartsWith(tName))
|
||||
{
|
||||
if (!containersNamesMapping[tName].ContainsKey(id.name))
|
||||
{
|
||||
AddError(left.location, "SPYTHONSEMANTIC_TYPE_{0}_HAS_NO_{1}_METHOD", ConvertTypeNameToSPythonTypeName(left.type), id.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
id.name = containersNamesMapping[tName][id.name];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (ExpectedAnotherKindOfObject e)
|
||||
{
|
||||
}
|
||||
}
|
||||
base.visit(_method_call);
|
||||
}
|
||||
|
||||
public override void visit(assign _assign)
|
||||
{
|
||||
|
||||
if (_assign.from is bin_expr be &&
|
||||
_assign.to is ident il &&
|
||||
be.left is ident ir &&
|
||||
il.name == ir.name)
|
||||
{
|
||||
expression_node to = convert_strong(_assign.to);
|
||||
SourceContext sc = _assign.source_context;
|
||||
|
||||
if (to.type.name.StartsWith("NewSet"))
|
||||
{
|
||||
if (be.operation_type == Operators.LogicalAND)
|
||||
{
|
||||
var replace = new assign(new semantic_addr_value(to), be.right, Operators.AssignmentMultiplication, sc);
|
||||
base.visit(replace);
|
||||
return;
|
||||
}
|
||||
if (be.operation_type == Operators.LogicalOR)
|
||||
{
|
||||
var replace = new assign(new semantic_addr_value(to), be.right, Operators.AssignmentAddition, sc);
|
||||
base.visit(replace);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
base.visit(_assign);
|
||||
}
|
||||
|
||||
public override void visit(bin_expr _bin_expr)
|
||||
{
|
||||
expression_node left = convert_strong(_bin_expr.left);
|
||||
expression_node right = convert_strong(_bin_expr.right);
|
||||
|
||||
var new_bin_expr = new bin_expr(new semantic_addr_value(left), new semantic_addr_value(right), _bin_expr.operation_type, _bin_expr.source_context);
|
||||
|
||||
RunAdditionalChecks(new_bin_expr);
|
||||
|
||||
switch (_bin_expr.operation_type)
|
||||
{
|
||||
case Operators.LogicalOR:
|
||||
if (left.type.name.StartsWith("NewSet") && left.type.name == right.type.name)
|
||||
{
|
||||
new_bin_expr.operation_type = Operators.Plus;
|
||||
}
|
||||
break;
|
||||
case Operators.LogicalAND:
|
||||
if (left.type.name.StartsWith("NewSet") && left.type.name == right.type.name)
|
||||
{
|
||||
new_bin_expr.operation_type = Operators.Multiplication;
|
||||
}
|
||||
break;
|
||||
/*case Operators.Plus:
|
||||
if (left.type == right.type && left.type.name == "boolean")
|
||||
{
|
||||
var int_left = new method_call(new ident("int"), new expression_list(new semantic_addr_value(left, left.location)), left.location);
|
||||
var int_right = new method_call(new ident("int"), new expression_list(new semantic_addr_value(right, right.location)), right.location);
|
||||
var bti_bin_expr = new bin_expr(int_left, int_right, _bin_expr.operation_type, _bin_expr.source_context);
|
||||
visit(bti_bin_expr);
|
||||
return;
|
||||
}
|
||||
break;*/
|
||||
case Operators.Division:
|
||||
if (left.type == right.type && left.type.name == "string")
|
||||
{
|
||||
var mcn = new method_call(new dot_node(new semantic_addr_value(left, left.location), new ident("IndexOf")),
|
||||
new expression_list(new semantic_addr_value(right, right.location)), _bin_expr.source_context);
|
||||
visit(mcn);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Operators.IntegerDivision:
|
||||
if (left.type == right.type && left.type.name == "real")
|
||||
{
|
||||
var exprlist = new expression_list(); exprlist.source_context = _bin_expr.source_context;
|
||||
exprlist.Add(new semantic_addr_value(left, left.location));
|
||||
exprlist.Add(new semantic_addr_value(right, right.location));
|
||||
var floornode = new method_call(new ident("!FloorDiv"), exprlist, _bin_expr.source_context);
|
||||
visit(floornode);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Operators.ModulusRemainder:
|
||||
if (left.type == right.type && left.type.name == "real")
|
||||
{
|
||||
//var divnode = new bin_expr(new semantic_addr_value(left, left.location), new semantic_addr_value(right, right.location), Operators.IntegerDivision, _bin_expr.source_context);
|
||||
//var multnode = new bin_expr(new semantic_addr_value(right, right.location), divnode, Operators.Multiplication);
|
||||
//var modnode = new bin_expr(new semantic_addr_value(left, left.location), multnode, Operators.Minus);
|
||||
var exprlist = new expression_list(); exprlist.source_context = _bin_expr.source_context;
|
||||
exprlist.Add(new semantic_addr_value(left, left.location));
|
||||
exprlist.Add(new semantic_addr_value(right, right.location));
|
||||
var modnode = new method_call(new ident("!FloorMod"), exprlist, _bin_expr.source_context);
|
||||
visit(modnode);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
base.visit(new_bin_expr);
|
||||
}
|
||||
|
||||
// Реализация глобальных переменных для семантики. Возможно, пригодится позже EVA
|
||||
/*public override void visit(var_def_statement _var_def_statement)
|
||||
{
|
||||
if (_var_def_statement.vars_type != null)
|
||||
{
|
||||
var loc = get_location(_var_def_statement.vars_type);
|
||||
type_node tn = find_type(_var_def_statement.vars_type as named_type_reference, loc);
|
||||
_var_def_statement.vars_type = new semantic_type_node(tn);
|
||||
}
|
||||
base.visit(_var_def_statement);
|
||||
}
|
||||
|
||||
public override void visit(ident _ident)
|
||||
{
|
||||
var si = context.find_first(_ident.name)?.sym_info as var_definition_node;
|
||||
if (si != null && si.type.name == "@UnknownType")
|
||||
{
|
||||
var loc = get_location(_ident);
|
||||
AddError(loc, "SPYTHONSEMANTIC_USING_VARIABLE_BEFORE_ASSIGNMENT");
|
||||
}
|
||||
base.visit(_ident);
|
||||
}*/
|
||||
|
||||
/*public override void visit(named_type_reference _named_type_reference)
|
||||
{
|
||||
var loc = get_location(_named_type_reference);
|
||||
type_node tn = find_type(_named_type_reference, loc);
|
||||
if (tn.name == "UnknownType")
|
||||
{
|
||||
base.AddError(loc, "USING_VARIABLE_BEFORE_ASSIGNMENT");
|
||||
}
|
||||
var _new_ntr = new semantic_addr_value(tn);
|
||||
base.visit(_named_type_reference);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class AddForwardDeclarationsVisitor : BaseChangeVisitor
|
||||
{
|
||||
private declarations decls;
|
||||
|
||||
public override void Enter(syntax_tree_node stn)
|
||||
{
|
||||
if (stn is program_module pm)
|
||||
{
|
||||
decls = pm.program_block.defs;
|
||||
}
|
||||
if (stn is interface_node intn)
|
||||
{
|
||||
decls = intn.interface_definitions;
|
||||
}
|
||||
|
||||
base.Enter(stn);
|
||||
}
|
||||
|
||||
public override void visit(procedure_header _procedure_header)
|
||||
{
|
||||
SourceContext context = _procedure_header.source_context;
|
||||
var pd = new procedure_definition(_procedure_header.TypedClone(), null, context);
|
||||
pd.proc_header.proc_attributes.Add(new procedure_attribute(proc_attribute.attr_forward, context));
|
||||
decls.Add(pd, context);
|
||||
}
|
||||
|
||||
public override void visit(function_header _function_header)
|
||||
{
|
||||
visit(_function_header as procedure_header);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class AssignmentCharAsStringVisitor : BaseChangeVisitor
|
||||
{
|
||||
public AssignmentCharAsStringVisitor() { }
|
||||
|
||||
public override void visit(assign _assign)
|
||||
{
|
||||
if (_assign.from is string_const sc
|
||||
&& sc.Value.Length == 1)
|
||||
{
|
||||
_assign.from = new method_call(new ident("str"), new expression_list(sc, sc.source_context), sc.source_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
using PascalABCCompiler.SyntaxTreeConverters;
|
||||
using System;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class BitwiseAssignmentDesugarVisitor : BaseChangeVisitor
|
||||
{
|
||||
public BitwiseAssignmentDesugarVisitor() { }
|
||||
|
||||
public override void visit(assign _assign)
|
||||
{
|
||||
Operators bin_op_type;
|
||||
|
||||
switch (_assign.operator_type)
|
||||
{
|
||||
case Operators.AssignmentBitwiseAND: {
|
||||
bin_op_type = Operators.LogicalAND;
|
||||
break; }
|
||||
case Operators.AssignmentBitwiseOR: {
|
||||
bin_op_type = Operators.LogicalOR;
|
||||
break; }
|
||||
case Operators.AssignmentBitwiseXOR: {
|
||||
bin_op_type = Operators.BitwiseXOR;
|
||||
break; }
|
||||
case Operators.AssignmentBitwiseLeftShift: {
|
||||
bin_op_type = Operators.BitwiseLeftShift;
|
||||
break; }
|
||||
case Operators.AssignmentBitwiseRightShift: {
|
||||
bin_op_type = Operators.BitwiseRightShift;
|
||||
break; }
|
||||
case Operators.AssignmentIntDivision: {
|
||||
bin_op_type = Operators.IntegerDivision;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
return; }
|
||||
}
|
||||
|
||||
SourceContext sc = _assign.source_context;
|
||||
bin_expr from = new bin_expr(_assign.to.TypedClone(), _assign.from, bin_op_type, sc);
|
||||
assign new_assign = new assign(_assign.to, from, sc);
|
||||
Replace(_assign, new_assign);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class CompoundComparisonDesugarVisitor : BaseChangeVisitor
|
||||
{
|
||||
private int curr_sl_index;
|
||||
|
||||
public CompoundComparisonDesugarVisitor() { }
|
||||
|
||||
public override void visit(statement_list sl)
|
||||
{
|
||||
if (sl == null) return;
|
||||
for (var i = sl.subnodes_count - 1; i >= 0; i--)
|
||||
{
|
||||
curr_sl_index = i;
|
||||
ProcessNode(sl[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private static statement_list GetCurrentStatementList(syntax_tree_node curr)
|
||||
{
|
||||
while (!(curr is statement_list)) curr = curr.Parent;
|
||||
return curr as statement_list;
|
||||
}
|
||||
|
||||
private static bool IsComparison(bin_expr _bin_expr)
|
||||
{
|
||||
Operators Operator = _bin_expr.operation_type;
|
||||
switch (Operator)
|
||||
{
|
||||
case Operators.Less:
|
||||
case Operators.Greater:
|
||||
case Operators.LessEqual:
|
||||
case Operators.GreaterEqual:
|
||||
case Operators.Equal:
|
||||
case Operators.NotEqual:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool IsCompoundComparison(bin_expr _bin_expr)
|
||||
{
|
||||
return (_bin_expr.left is bin_expr left) && IsComparison(_bin_expr) && IsComparison(left);
|
||||
}
|
||||
|
||||
private int createdIdentsCounter = 0;
|
||||
|
||||
private string NewIdentName()
|
||||
{
|
||||
string result = '%' + createdIdentsCounter.ToString();
|
||||
createdIdentsCounter++;
|
||||
return result;
|
||||
}
|
||||
|
||||
public override void visit(bin_expr _bin_expr)
|
||||
{
|
||||
if (IsCompoundComparison(_bin_expr))
|
||||
{
|
||||
// transform
|
||||
//
|
||||
// ((left comp1 middle) comp2 right)
|
||||
//
|
||||
// to
|
||||
//
|
||||
// var id: typeof(middle);
|
||||
// ((left comp1 !assign(id, middle)) && (id comp2 right))
|
||||
//
|
||||
// then recursive call for left
|
||||
// P.S. !assign(a, b) assigns b to a and return a
|
||||
|
||||
bin_expr left_comp_middle = _bin_expr.left as bin_expr;
|
||||
expression left = left_comp_middle.left;
|
||||
Operators comp1 = left_comp_middle.operation_type;
|
||||
expression middle = left_comp_middle.right;
|
||||
Operators comp2 = _bin_expr.operation_type;
|
||||
expression right = _bin_expr.right;
|
||||
ident id = new ident(NewIdentName(), middle.source_context);
|
||||
type_definition td = new same_type_node(middle.TypedClone(), middle.source_context);
|
||||
var_def_statement vds = new var_def_statement(id, td, middle.source_context);
|
||||
statement_list curr_statement_list = GetCurrentStatementList(_bin_expr);
|
||||
int index = curr_sl_index - curr_statement_list.subnodes_without_list_elements_count;
|
||||
curr_statement_list.list.Insert(index, new var_statement(vds, middle.source_context));
|
||||
curr_sl_index++;
|
||||
|
||||
addressed_value method_name = new ident("!assign", middle.source_context);
|
||||
expression_list el = new expression_list(new List<expression> { id, middle }, middle.source_context);
|
||||
method_call method_call = new method_call(method_name, el, middle.source_context);
|
||||
bin_expr new_left = new bin_expr(left, method_call, comp1, new SourceContext(left.source_context, method_call.source_context));
|
||||
bin_expr new_right = new bin_expr(id, right, comp2, new SourceContext(id.source_context, right.source_context));
|
||||
bin_expr new_bin_expr = new bin_expr(new_left, new_right, Operators.LogicalAND, _bin_expr.source_context);
|
||||
_bin_expr.Parent.ReplaceDescendant(_bin_expr, new_bin_expr);
|
||||
new_bin_expr.left.visit(this);
|
||||
}
|
||||
else
|
||||
base.visit(_bin_expr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
using System;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
public class EraseSpythonOnlyNodesVisitor : BaseChangeVisitor
|
||||
{
|
||||
public EraseSpythonOnlyNodesVisitor() {}
|
||||
|
||||
public override void visit(global_statement _global_statement)
|
||||
{
|
||||
DeleteInStatementList(_global_statement);
|
||||
}
|
||||
|
||||
public override void visit(import_statement _import_statement)
|
||||
{
|
||||
var upper = UpperNode();
|
||||
if (upper is interface_node _interface_node)
|
||||
_interface_node.interface_definitions.ReplaceDescendant<syntax_tree_node, syntax_tree_node>(
|
||||
_import_statement, new empty_statement());
|
||||
else Replace(_import_statement, new empty_statement());
|
||||
}
|
||||
|
||||
public override void visit(from_import_statement _from_import_statement)
|
||||
{
|
||||
var upper = UpperNode();
|
||||
if (upper is interface_node _interface_node)
|
||||
_interface_node.interface_definitions.ReplaceDescendant<syntax_tree_node, syntax_tree_node>(
|
||||
_from_import_statement, new empty_statement());
|
||||
else Replace(_from_import_statement, new empty_statement());
|
||||
}
|
||||
|
||||
public override void visit(tuple_node tup)
|
||||
{
|
||||
var dn = new ident("CreateTuple", tup.source_context);
|
||||
var mc = new method_call(dn, tup.el, tup.source_context);
|
||||
|
||||
//var sug = new sugared_expression(tup, mc, tup.source_context); - нет никакой семантической проверки - всё - на уровне синтаксиса!
|
||||
|
||||
//ReplaceUsingParent(tup, mc); - исправление #1199. Оказывается, ReplaceUsingParent и Replace не эквивалентны - у копии Parent на старого родителя
|
||||
Replace(tup, mc);
|
||||
visit(mc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class FindFunctionsNamesVisitor : BaseChangeVisitor
|
||||
{
|
||||
public HashSet<string> definedFunctionsNames = new HashSet<string>();
|
||||
|
||||
public override void visit(procedure_definition pd)
|
||||
{
|
||||
definedFunctionsNames.Add(pd.proc_header.name.meth_name.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class FunctionsWithNamedParametersDesugarVisitor : BaseChangeVisitor
|
||||
{
|
||||
public FunctionsWithNamedParametersDesugarVisitor() { }
|
||||
|
||||
public override void visit(method_call _method_call)
|
||||
{
|
||||
if (_method_call.parameters is expression_list exprl) {
|
||||
expression_list args = new expression_list();
|
||||
expression_list kwargs_names_array = new expression_list();
|
||||
expression_list kwargs = new expression_list();
|
||||
|
||||
foreach (var expr in exprl.expressions)
|
||||
{
|
||||
if (expr is name_assign_expr nae)
|
||||
{
|
||||
kwargs_names_array.Add(new string_const(nae.name.name));
|
||||
kwargs_names_array.source_context
|
||||
= new SourceContext(kwargs_names_array.source_context, expr.source_context);
|
||||
kwargs.Add(nae.expr);
|
||||
kwargs.source_context
|
||||
= new SourceContext(kwargs.source_context, expr.source_context);
|
||||
}
|
||||
else if (kwargs.expressions.Count() == 0)
|
||||
{
|
||||
args.Add(expr);
|
||||
args.source_context = new SourceContext(args.source_context, expr.source_context);
|
||||
}
|
||||
else throw new SPythonSyntaxVisitorError("ARG_AFTER_KWARGS", expr.source_context);
|
||||
}
|
||||
|
||||
if (kwargs.expressions.Count() != 0)
|
||||
{
|
||||
array_const_new acn = new array_const_new(kwargs_names_array, '|');
|
||||
kwargs.expressions.Insert(0, acn);
|
||||
|
||||
ident method_name = new ident();
|
||||
if (_method_call.dereferencing_value is ident id)
|
||||
{
|
||||
method_name = id;
|
||||
}
|
||||
else if (_method_call.dereferencing_value is dot_node dnn)
|
||||
{
|
||||
method_name = dnn.right as ident;
|
||||
}
|
||||
|
||||
ident class_name = new ident("!" + method_name);
|
||||
new_expr ne = new new_expr(new named_type_reference(class_name), kwargs, false, null);
|
||||
|
||||
dot_node dn = new dot_node(ne, new ident(method_name.name), _method_call.source_context);
|
||||
method_call new_method_call = new method_call(dn, args, _method_call.source_context);
|
||||
Replace(_method_call, new_method_call);
|
||||
return;
|
||||
}
|
||||
}
|
||||
base.visit(_method_call);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
using PascalABCCompiler;
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class GeneratorObjectDesugarVisitor : BaseChangeVisitor
|
||||
{
|
||||
private ParserLambdaHelper lambdaHelper = new ParserLambdaHelper();
|
||||
private syntax_tree_node root;
|
||||
private bool replaceRoot = false;
|
||||
private syntax_tree_node lastDesugaredNode = null;
|
||||
|
||||
public GeneratorObjectDesugarVisitor(syntax_tree_node root)
|
||||
{
|
||||
this.root = root;
|
||||
}
|
||||
|
||||
public syntax_tree_node UpdatedRoot()
|
||||
{
|
||||
if (replaceRoot) return lastDesugaredNode;
|
||||
return root;
|
||||
}
|
||||
|
||||
public override void visit(generator_object _generator_object)
|
||||
{
|
||||
base.visit(_generator_object);
|
||||
|
||||
dot_node dn;
|
||||
ident_list idList;
|
||||
formal_parameters formalPars;
|
||||
statement_list sl;
|
||||
function_lambda_definition lambda;
|
||||
method_call mc;
|
||||
|
||||
// [ expr1 for ident in expr2 if expr3 ] -> expr2.Where(ident -> expr3).Select(ident -> expr1)
|
||||
if (_generator_object._condition != null)
|
||||
{
|
||||
string ident_name = _generator_object._ident.name;
|
||||
idList = new ident_list(new ident(ident_name), _generator_object._ident.source_context);
|
||||
formalPars = new formal_parameters(new typed_parameters(idList, new lambda_inferred_type(new lambda_any_type_node_syntax(), _generator_object._ident.source_context), parametr_kind.none, null, _generator_object._ident.source_context), _generator_object._ident.source_context);
|
||||
|
||||
dn = new dot_node(_generator_object._range as addressed_value, (new ident("Where")) as addressed_value, _generator_object.source_context);
|
||||
|
||||
sl = new statement_list(new assign(StringConstants.result_var_name, _generator_object._condition, _generator_object._condition.source_context), _generator_object._condition.source_context); //!
|
||||
sl.expr_lambda_body = true;
|
||||
lambda = new function_lambda_definition(
|
||||
lambdaHelper.CreateLambdaName(), formalPars,
|
||||
new lambda_inferred_type(new lambda_any_type_node_syntax(), _generator_object._ident.source_context), sl, _generator_object.source_context);
|
||||
|
||||
mc = new method_call(dn as addressed_value, new expression_list(lambda as expression), _generator_object.source_context);
|
||||
dn = new dot_node(mc as addressed_value, (new ident("Select")) as addressed_value, _generator_object.source_context);
|
||||
}
|
||||
// [ expr1 for ident in expr2 ] -> expr2.Select(ident -> expr1)
|
||||
else
|
||||
dn = new dot_node(_generator_object._range as addressed_value, (new ident("Select")) as addressed_value, _generator_object.source_context);
|
||||
|
||||
|
||||
idList = new ident_list(_generator_object._ident, _generator_object._ident.source_context);
|
||||
formalPars = new formal_parameters(new typed_parameters(idList, new lambda_inferred_type(new lambda_any_type_node_syntax(), _generator_object._ident.source_context), parametr_kind.none, null, _generator_object._ident.source_context), _generator_object._ident.source_context);
|
||||
|
||||
sl = new statement_list(new assign(StringConstants.result_var_name, _generator_object._expr, _generator_object._expr.source_context), _generator_object._expr.source_context);
|
||||
sl.expr_lambda_body = true;
|
||||
|
||||
lambda = new function_lambda_definition(
|
||||
lambdaHelper.CreateLambdaName(), formalPars,
|
||||
new lambda_inferred_type(new lambda_any_type_node_syntax(), _generator_object._ident.source_context), sl, _generator_object.source_context);
|
||||
|
||||
|
||||
method_call replaceTo = new method_call(dn as addressed_value, new expression_list(lambda as expression), _generator_object.source_context);
|
||||
|
||||
if (root != _generator_object)
|
||||
Replace(_generator_object, replaceTo);
|
||||
else
|
||||
{
|
||||
replaceRoot = true;
|
||||
lastDesugaredNode = replaceTo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ParserLambdaHelper
|
||||
{
|
||||
private int lambda_num = 0;
|
||||
public List<function_lambda_definition> lambdaDefinitions;
|
||||
public static string lambdaPrefix = "<>lambda";
|
||||
|
||||
public ParserLambdaHelper()
|
||||
{
|
||||
lambdaDefinitions = new List<function_lambda_definition>();
|
||||
}
|
||||
|
||||
public string CreateLambdaName()
|
||||
{
|
||||
lambda_num++;
|
||||
return lambdaPrefix + lambda_num.ToString();
|
||||
}
|
||||
|
||||
public bool IsLambdaName(ident id)
|
||||
{
|
||||
return id.name.StartsWith(lambdaPrefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class ImportToUsesVisitor : BaseChangeVisitor
|
||||
{
|
||||
Dictionary<string, SourceContext> modulesNames = new Dictionary<string, SourceContext>();
|
||||
|
||||
public ImportToUsesVisitor() { }
|
||||
|
||||
private Dictionary<string, string> specialModulesAliases = Facade.LanguageProvider.Instance.SelectLanguageByName("SPython").LanguageInformation.SpecialModulesAliases;
|
||||
|
||||
private string GetNameToImport(string nameToImport)
|
||||
{
|
||||
if (!specialModulesAliases.ContainsKey(nameToImport))
|
||||
return nameToImport;
|
||||
else
|
||||
return specialModulesAliases[nameToImport];
|
||||
}
|
||||
|
||||
private void AddName(ident id)
|
||||
{
|
||||
string nameToImport = GetNameToImport(id.name);
|
||||
if (!modulesNames.ContainsKey(nameToImport))
|
||||
modulesNames.Add(nameToImport, id.source_context);
|
||||
}
|
||||
|
||||
public override void visit(import_statement _import_statement)
|
||||
{
|
||||
foreach (as_statement as_Statement in _import_statement.modules_names.as_statements)
|
||||
AddName(as_Statement.real_name);
|
||||
}
|
||||
|
||||
public override void visit(from_import_statement _from_import_statement)
|
||||
{
|
||||
AddName(_from_import_statement.module_name);
|
||||
}
|
||||
|
||||
public void AddUsesToUsesList(uses_list _uses_list)
|
||||
{
|
||||
foreach (string module_name in modulesNames.Keys)
|
||||
{
|
||||
SourceContext sc = modulesNames[module_name];
|
||||
uses_list us = new uses_list(new unit_or_namespace(module_name, sc), sc);
|
||||
us[0].source_context = sc;
|
||||
_uses_list.AddUsesList(us, sc);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Exit(syntax_tree_node stn)
|
||||
{
|
||||
if (stn is program_module pm)
|
||||
{
|
||||
AddUsesToUsesList(pm.used_units);
|
||||
}
|
||||
if (stn is unit_module um)
|
||||
{
|
||||
AddUsesToUsesList(um.interface_part.uses_modules);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,205 @@
|
|||
using PascalABCCompiler;
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class KwargsFunctionDesugarVisitor: BaseChangeVisitor
|
||||
{
|
||||
public KwargsFunctionDesugarVisitor() { }
|
||||
|
||||
private declarations decls;
|
||||
private declarations current_decls;
|
||||
|
||||
public override void Enter(syntax_tree_node stn)
|
||||
{
|
||||
if (stn is program_module pm)
|
||||
{
|
||||
decls = pm.program_block.defs;
|
||||
}
|
||||
if (stn is interface_node intn)
|
||||
{
|
||||
decls = intn.interface_definitions;
|
||||
}
|
||||
if (stn is declarations_as_statement das)
|
||||
{
|
||||
current_decls = das.defs;
|
||||
}
|
||||
|
||||
base.Enter(stn);
|
||||
}
|
||||
|
||||
private typed_parameters LastParameter(procedure_definition pd)
|
||||
{
|
||||
return pd.proc_header.parameters.Last();
|
||||
}
|
||||
|
||||
private bool HasParameters(procedure_definition pd)
|
||||
{
|
||||
return pd.proc_header.parameters != null;
|
||||
}
|
||||
|
||||
private bool IsKwargsParameter(typed_parameters tp)
|
||||
{
|
||||
return tp.param_kind == parametr_kind.kwargs_parameter;
|
||||
}
|
||||
|
||||
private bool HasKwargsParameter(procedure_definition pd)
|
||||
{
|
||||
if (!HasParameters(pd))
|
||||
return false;
|
||||
|
||||
foreach (typed_parameters param in pd.proc_header.parameters.params_list)
|
||||
{
|
||||
if (IsKwargsParameter(param))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
string renameFrom = "";
|
||||
|
||||
private void RenameKwargParametor(procedure_definition pd)
|
||||
{
|
||||
renameFrom = LastParameter(pd).idents.idents[0].name;
|
||||
var body = pd.proc_body;
|
||||
base.visit(pd);
|
||||
renameFrom = "";
|
||||
}
|
||||
|
||||
public override void visit(ident id)
|
||||
{
|
||||
// сомнительно, лучше сделать другим визитором
|
||||
if (renameFrom != "" && id.name == renameFrom)
|
||||
{
|
||||
id.name = "!kwargs";
|
||||
}
|
||||
}
|
||||
|
||||
private void AddNoKwargsVersion(procedure_definition pd)
|
||||
{
|
||||
procedure_definition noKwargsVersion = pd.TypedClone();
|
||||
typed_parameters kwargs_parameter = LastParameter(noKwargsVersion);
|
||||
noKwargsVersion.proc_header.parameters.Remove(kwargs_parameter);
|
||||
ident name = noKwargsVersion.proc_header.name.meth_name;
|
||||
ident class_name = "!" + name;
|
||||
|
||||
if (IsForwardDeclaration(noKwargsVersion.proc_header))
|
||||
{
|
||||
decls.Add(noKwargsVersion);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<typed_parameters> tp_list = noKwargsVersion.proc_header.parameters.params_list;
|
||||
expression_list args = new expression_list();
|
||||
foreach (typed_parameters tp in tp_list)
|
||||
{
|
||||
foreach (ident id in tp.idents.list)
|
||||
{
|
||||
args.Add(id);
|
||||
}
|
||||
}
|
||||
|
||||
new_expr ne = new new_expr(new named_type_reference(class_name), null, false, null);
|
||||
|
||||
dot_node dn = new dot_node(ne, new ident(name.name));
|
||||
method_call method_call = new method_call(dn, args);
|
||||
|
||||
statement stmt;
|
||||
|
||||
if (pd.proc_header is function_header)
|
||||
{
|
||||
stmt = new assign(new ident(StringConstants.result_var_name), method_call, Operators.Assignment);
|
||||
}
|
||||
else
|
||||
{
|
||||
stmt = new procedure_call(method_call, false);
|
||||
}
|
||||
|
||||
statement_list stmtlist = new statement_list(stmt);
|
||||
|
||||
declarations empty_declarations = new declarations();
|
||||
block block = new block(empty_declarations, stmtlist);
|
||||
noKwargsVersion.proc_body = block;
|
||||
current_decls.Add(noKwargsVersion);
|
||||
}
|
||||
}
|
||||
|
||||
void CheckIfKwargParametorIsUsedCorrectly(procedure_definition pd)
|
||||
{
|
||||
var params_list = pd.proc_header.parameters.params_list;
|
||||
for (int i = 0; i < params_list.Count() - 1; ++i)
|
||||
{
|
||||
if (IsKwargsParameter(params_list[i]))
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("KWARG_PARAMETOR_NOT_LAST",
|
||||
params_list[i].source_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void visit(procedure_definition pd)
|
||||
{
|
||||
if (!HasKwargsParameter(pd))
|
||||
return;
|
||||
|
||||
// Проверяем что kwarg-параметр только последний
|
||||
CheckIfKwargParametorIsUsedCorrectly(pd);
|
||||
|
||||
RenameKwargParametor(pd);
|
||||
|
||||
declaration d = CreateTypeDefinitionForKwargsFunction(pd);
|
||||
AddNoKwargsVersion(pd);
|
||||
Replace(pd, d);
|
||||
}
|
||||
|
||||
private bool IsForwardDeclaration(procedure_header _procedure_header)
|
||||
{
|
||||
foreach (procedure_attribute attr in _procedure_header.proc_attributes.proc_attributes)
|
||||
if (attr.attribute_type is proc_attribute.attr_forward)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private declaration CreateTypeDefinitionForKwargsFunction(procedure_definition pd)
|
||||
{
|
||||
procedure_definition new_pd = pd.TypedClone();
|
||||
typed_parameters kwargs_parameter = LastParameter(new_pd);
|
||||
new_pd.proc_header.parameters.Remove(kwargs_parameter);
|
||||
ident name = new_pd.proc_header.name.meth_name;
|
||||
ident class_name = "!" + name;
|
||||
|
||||
if (IsForwardDeclaration(new_pd.proc_header))
|
||||
{
|
||||
// base class type
|
||||
template_param_list tpl = new template_param_list(kwargs_parameter.vars_type, kwargs_parameter.source_context);
|
||||
ident base_class_name = new ident("kwargs_gen`1");
|
||||
named_type_reference ntr = new named_type_reference(base_class_name);
|
||||
template_type_reference ttr = new template_type_reference(ntr, tpl);
|
||||
named_type_reference_list ntrl = new named_type_reference_list(ttr);
|
||||
|
||||
// class body
|
||||
access_modifer_node amn = new access_modifer_node(access_modifer.public_modifer);
|
||||
new_pd.proc_header.name.meth_name = new_pd.proc_header.name.meth_name;
|
||||
class_members cm = new class_members(new_pd.proc_header);
|
||||
class_body_list cbl = new class_body_list(cm);
|
||||
|
||||
// type class declaration
|
||||
class_definition cd = new class_definition(ntrl, cbl);
|
||||
type_declaration td = new type_declaration(class_name, cd);
|
||||
type_declarations result = new type_declarations(td);
|
||||
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_pd.proc_header.name = new method_name(null, class_name, name, null);
|
||||
return new_pd;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class MapDesugarVisitor : BaseChangeVisitor
|
||||
{
|
||||
public MapDesugarVisitor() { }
|
||||
|
||||
public override void visit(method_call mc)
|
||||
{
|
||||
base.visit(mc);
|
||||
|
||||
if (mc.dereferencing_value is ident map && map.name == "map" &&
|
||||
mc.parameters.Count == 2 && mc.parameters[0] is addressed_value av &&
|
||||
mc.parameters[1] is expression range)
|
||||
{
|
||||
ident ident = new ident("!map_iterable_element", mc.source_context);
|
||||
expression expr = new method_call(av, new expression_list(ident), mc.source_context);
|
||||
|
||||
generator_object go = new generator_object(expr, ident, range, null, mc.source_context);
|
||||
|
||||
Replace(mc, go);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,205 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class NameCorrectVisitor : SymbolTableFillingVisitor
|
||||
{
|
||||
public HashSet<string> variablesUsedAsGlobal = new HashSet<string>();
|
||||
|
||||
public NameCorrectVisitor(Dictionary<string, HashSet<string>> namesFromUsedUnits, HashSet<string> definedFunctionsNames) : base(namesFromUsedUnits)
|
||||
{
|
||||
foreach (string definedFunctionName in definedFunctionsNames)
|
||||
{
|
||||
symbolTable.Add(definedFunctionName, NameKind.ForwardDeclaredFunction);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Enter(syntax_tree_node stn)
|
||||
{
|
||||
if (stn is ident && stn.Parent is dot_node dn && dn.right == stn)
|
||||
{
|
||||
visitNode = false;
|
||||
}
|
||||
|
||||
base.Enter(stn);
|
||||
}
|
||||
|
||||
public override void visit(var_statement _var_statement)
|
||||
{
|
||||
if (symbolTable.IsOutermostScope())
|
||||
{
|
||||
// не работает для нескольких переменных (var a1, a2, ...: type;)
|
||||
ident id = _var_statement.var_def.vars.idents[0];
|
||||
symbolTable.Add(id.name, NameKind.GlobalVariable);
|
||||
ProcessNode(_var_statement.var_def);
|
||||
}
|
||||
else base.visit(_var_statement);
|
||||
}
|
||||
|
||||
public override void visit(name_assign_expr _name_assign_expr)
|
||||
{
|
||||
ProcessNode(_name_assign_expr[1]);
|
||||
}
|
||||
|
||||
public override void visit(unit_or_namespace _unit_or_namespace)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void visit(unit_name _unit_name)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void visit(global_statement _global_statement)
|
||||
{
|
||||
foreach (ident _ident in _global_statement.idents.idents)
|
||||
{
|
||||
NameKind nameType = symbolTable[_ident.name];
|
||||
switch (nameType)
|
||||
{
|
||||
case NameKind.GlobalVariable:
|
||||
case NameKind.ImportedNameAlias:
|
||||
break;
|
||||
case NameKind.Unknown:
|
||||
throw new SPythonSyntaxVisitorError("UNKNOWN_NAME_{0}",
|
||||
_ident.source_context, _ident.name);
|
||||
default:
|
||||
throw new SPythonSyntaxVisitorError("SCOPE_CONTAINS_NAME_{0}",
|
||||
_ident.source_context, _ident.name);
|
||||
}
|
||||
}
|
||||
|
||||
base.visit(_global_statement);
|
||||
}
|
||||
|
||||
public override void visit(named_type_reference _named_type_reference)
|
||||
{
|
||||
ident id = _named_type_reference.names[0];
|
||||
string name = id.name;
|
||||
|
||||
if (name == "int" || name == "str" || name == "bool" || name == "float" || name == "set" || name == "list" || name == "dict")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
NameKind nameKind = symbolTable[name];
|
||||
switch (nameKind)
|
||||
{
|
||||
case NameKind.ModuleAlias:
|
||||
id.name = symbolTable.AliasToRealName(id.name);
|
||||
break;
|
||||
|
||||
case NameKind.ImportedNameAlias:
|
||||
_named_type_reference.names.Insert(0, new ident(symbolTable.AliasToModuleName(id.name), id.source_context));
|
||||
_named_type_reference.names[1].name = symbolTable.AliasToRealName(_named_type_reference.names[1].name);
|
||||
break;
|
||||
|
||||
case NameKind.Unknown:
|
||||
throw new SPythonSyntaxVisitorError("UNKNOWN_NAME_{0}",
|
||||
id.source_context, id.name);
|
||||
}
|
||||
}
|
||||
|
||||
public override void visit(ident _ident)
|
||||
{
|
||||
SourceContext sc = _ident.source_context;
|
||||
NameKind nameKind = symbolTable[_ident.name];
|
||||
switch (nameKind)
|
||||
{
|
||||
case NameKind.ModuleAlias:
|
||||
_ident.name = symbolTable.AliasToRealName(_ident.name);
|
||||
break;
|
||||
|
||||
case NameKind.ImportedNameAlias:
|
||||
Replace(_ident, new dot_node(new ident(symbolTable.AliasToModuleName(_ident.name), sc)
|
||||
, new ident(symbolTable.AliasToRealName(_ident.name), sc), sc));
|
||||
break;
|
||||
|
||||
case NameKind.GlobalVariable:
|
||||
if (symbolTable.IsInFunctionBody &&
|
||||
!variablesUsedAsGlobal.Contains(_ident.name))
|
||||
variablesUsedAsGlobal.Add(_ident.name);
|
||||
break;
|
||||
|
||||
case NameKind.ForwardDeclaredFunction:
|
||||
if (!symbolTable.IsInFunctionBody)
|
||||
throw new SPythonSyntaxVisitorError("FUNCTION_{0}_USED_BEFORE_DECLARATION",
|
||||
sc, _ident.name);
|
||||
break;
|
||||
|
||||
case NameKind.Unknown:
|
||||
throw new SPythonSyntaxVisitorError("UNKNOWN_NAME_{0}",
|
||||
sc, _ident.name);
|
||||
}
|
||||
}
|
||||
|
||||
// кидает ошибки если инициализировать пустой коллекцией
|
||||
// не указывая типа переменной
|
||||
private void CheckInitializationWithEmptyCollection(assign _assign)
|
||||
{
|
||||
// a = []
|
||||
// a = !empty_list()
|
||||
// a = {}
|
||||
// a = !empty_dict()
|
||||
// a = set()
|
||||
if (_assign.from is method_call mc &&
|
||||
mc.dereferencing_value is ident id &&
|
||||
mc.parameters == null)
|
||||
{
|
||||
if (id.name == "!empty_list")
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("IMPOSSIBLE_TO_INFER_LIST_TYPE",
|
||||
_assign.from.source_context);
|
||||
}
|
||||
else if (id.name == "!empty_dict")
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("IMPOSSIBLE_TO_INFER_DICT_TYPE",
|
||||
_assign.from.source_context);
|
||||
}
|
||||
if (id.name == "set")
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("IMPOSSIBLE_TO_INFER_SET_TYPE",
|
||||
_assign.from.source_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//public override void visit(assign_tuple _assign_tuple)
|
||||
//{
|
||||
//
|
||||
//}
|
||||
|
||||
public override void visit(assign _assign)
|
||||
{
|
||||
if (_assign.operator_type == Operators.Assignment && _assign.to is ident _ident)
|
||||
{
|
||||
if (!symbolTable.IsVisibleToAssign(_ident.name))
|
||||
{
|
||||
// инициализация новой переменной с присвоением
|
||||
if (symbolTable.IsOutermostScope())
|
||||
symbolTable.Add(_ident.name, NameKind.GlobalVariable);
|
||||
else
|
||||
symbolTable.Add(_ident.name, NameKind.LocalVariable);
|
||||
|
||||
CheckInitializationWithEmptyCollection(_assign);
|
||||
|
||||
var _var_statement = SyntaxTreeBuilder.BuildVarStatementNodeFromAssignNode(_assign);
|
||||
|
||||
ReplaceStatement(_assign, _var_statement);
|
||||
|
||||
ProcessNode(_var_statement);
|
||||
return;
|
||||
}
|
||||
else if (symbolTable.IsInFunctionBody
|
||||
&& symbolTable[_ident.name] == NameKind.GlobalVariable
|
||||
&& !variablesUsedAsGlobal.Contains(_ident.name))
|
||||
{
|
||||
variablesUsedAsGlobal.Add(_ident.name);
|
||||
}
|
||||
}
|
||||
base.visit(_assign);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Общие сведения об этой сборке предоставляются следующим набором
|
||||
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
|
||||
// связанные со сборкой.
|
||||
[assembly: AssemblyTitle("SPythonStandardTreeConverter")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SPythonStandardTreeConverter")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
|
||||
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
|
||||
// COM, задайте атрибуту ComVisible значение TRUE для этого типа.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
|
||||
[assembly: Guid("431aa1a0-81b9-4d93-9cb1-219bdf7825c9")]
|
||||
|
||||
// Сведения о версии сборки состоят из указанных ниже четырех значений:
|
||||
//
|
||||
// Основной номер версии
|
||||
// Дополнительный номер версии
|
||||
// Номер сборки
|
||||
// Редакция
|
||||
//
|
||||
// Можно задать все значения или принять номера сборки и редакции по умолчанию
|
||||
// используя "*", как показано ниже:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
public class RetainUsedGlobalVariablesVisitor : BaseChangeVisitor
|
||||
{
|
||||
private HashSet<string> variablesUsedAsGlobal = new HashSet<string>();
|
||||
private int scopeCounter = 0;
|
||||
private declarations decls;
|
||||
private bool isUnitCompiled = false;
|
||||
|
||||
public RetainUsedGlobalVariablesVisitor(HashSet<string> variablesUsedAsGlobal)
|
||||
{
|
||||
this.variablesUsedAsGlobal = variablesUsedAsGlobal;
|
||||
}
|
||||
|
||||
// нужны методы из BaseChangeVisitor, но порядок обхода из WalkingVisitorNew
|
||||
public override void DefaultVisit(syntax_tree_node n)
|
||||
{
|
||||
for (var i = 0; i < n.subnodes_count; i++)
|
||||
ProcessNode(n[i]);
|
||||
}
|
||||
|
||||
public override void Enter(syntax_tree_node stn)
|
||||
{
|
||||
if (stn is statement_list)
|
||||
{
|
||||
scopeCounter++;
|
||||
}
|
||||
if (stn is program_module pm)
|
||||
{
|
||||
decls = pm.program_block.defs;
|
||||
}
|
||||
if (stn is interface_node intn)
|
||||
{
|
||||
isUnitCompiled = true;
|
||||
decls = intn.interface_definitions;
|
||||
}
|
||||
|
||||
base.Enter(stn);
|
||||
}
|
||||
|
||||
public override void Exit(syntax_tree_node stn)
|
||||
{
|
||||
if (stn is statement_list)
|
||||
{
|
||||
scopeCounter--;
|
||||
}
|
||||
base.Exit(stn);
|
||||
}
|
||||
|
||||
public override void visit(var_statement _var_statement)
|
||||
{
|
||||
ident id = _var_statement.var_def.vars.idents[0];
|
||||
if (scopeCounter == 1 && (isUnitCompiled || variablesUsedAsGlobal.Contains(id.name)))
|
||||
{
|
||||
//variablesUsedAsGlobal.Remove(id.name);
|
||||
SourceContext sc = _var_statement.source_context;
|
||||
statement replace_to = new empty_statement();
|
||||
type_definition td = _var_statement.var_def.vars_type;
|
||||
if (_var_statement.var_def.inital_value != null)
|
||||
{
|
||||
replace_to = new assign(id, _var_statement.var_def.inital_value, sc);
|
||||
}
|
||||
if (td == null)
|
||||
{
|
||||
(replace_to as assign).first_assignment_defines_type = true;
|
||||
td = new named_type_reference(new ident("integer"));
|
||||
}
|
||||
var vds = new var_def_statement(new ident_list(id, id.source_context), td, null, definition_attribute.None, false, sc);
|
||||
decls.Add(new variable_definitions(vds, sc), sc);
|
||||
|
||||
ReplaceStatement(_var_statement, replace_to);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
using PascalABCCompiler;
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class ReturnDesugarVisitor : BaseChangeVisitor
|
||||
{
|
||||
public ReturnDesugarVisitor() { }
|
||||
|
||||
public override void visit(return_statement _return_statement)
|
||||
{
|
||||
SourceContext sc = _return_statement.source_context;
|
||||
|
||||
// return;
|
||||
if (_return_statement.expr == null)
|
||||
{
|
||||
procedure_call pc = new procedure_call(new ident("exit", sc), true, sc);
|
||||
Replace(_return_statement, pc);
|
||||
}
|
||||
// return expr;
|
||||
else
|
||||
{
|
||||
statement res_assign = new assign(new ident(StringConstants.result_var_name), _return_statement.expr, Operators.Assignment, sc);
|
||||
statement exit_call = new procedure_call(new ident("exit"), true, sc);
|
||||
statement_list new_statement = new statement_list(res_assign, sc);
|
||||
new_statement.Add(exit_call, sc);
|
||||
Replace(_return_statement, new_statement);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net40</TargetFramework>
|
||||
|
||||
<RootNamespace>Languages.SPython.Frontend.Converters</RootNamespace>
|
||||
|
||||
<OutputPath>..\..\..\..\bin\</OutputPath>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Errors\Errors.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\LanguageIntegrator\LanguageIntegrator.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\Localization\Localization.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\SyntaxTree\SyntaxTree.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\SyntaxVisitors\SyntaxVisitors.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
using Languages.Pascal.Frontend.Converters;
|
||||
using PascalABCCompiler;
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
using PascalABCCompiler.SyntaxTreeConverters;
|
||||
using SyntaxVisitors;
|
||||
using SyntaxVisitors.SugarVisitors;
|
||||
using System;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
public class StandardSyntaxTreeConverter : BaseSyntaxTreeConverter
|
||||
{
|
||||
public override string Name { get; } = "Standard";
|
||||
|
||||
protected override syntax_tree_node ApplyConversions(syntax_tree_node root, bool forIntellisense)
|
||||
{
|
||||
// кидает ошибки за использование
|
||||
// неподдерживаемых конструкций языка
|
||||
if (!forIntellisense)
|
||||
new UnsupportedConstructsVisitor().ProcessNode(root);
|
||||
|
||||
// добавление всех import ..., from ... import ...
|
||||
// как uses в начале программы для сбора имён из этих модулей
|
||||
if (!forIntellisense)
|
||||
new ImportToUsesVisitor().ProcessNode(root);
|
||||
|
||||
// замена
|
||||
// name bin_bit_op= expr
|
||||
// на
|
||||
// name = name bin_bit_op (expr)
|
||||
new TryCatchDecorator(new BitwiseAssignmentDesugarVisitor(), forIntellisense).ProcessNode(root);
|
||||
|
||||
// замена return; на { exit(); }
|
||||
// замена return expr; на { result := expr; exit(); }
|
||||
new TryCatchDecorator(new ReturnDesugarVisitor(), forIntellisense).ProcessNode(root);
|
||||
|
||||
// замена вызова функции map(func, sequence)
|
||||
// на func(element) for element in sequence
|
||||
new TryCatchDecorator(new MapDesugarVisitor(), forIntellisense).ProcessNode(root);
|
||||
|
||||
// замена генерации последовательностей на Select.Where
|
||||
// (не работает из-за лямбд (скорее всего), если переместить в ConvertAfterUsedModulesCompilation)
|
||||
new TryCatchDecorator(new GeneratorObjectDesugarVisitor(root), forIntellisense).ProcessNode(root);
|
||||
|
||||
// Выносим выражения с лямбдами из заголовка foreach + считаем максимум 10 вложенных лямбд
|
||||
// украл из паскаля
|
||||
StandOutExprWithLambdaInForeachSequenceAndNestedLambdasVisitor.New.ProcessNode(root);
|
||||
new VarNamesInMethodsWithSameNameAsClassGenericParamsReplacer(root as compilation_unit).ProcessNode(root);
|
||||
FindOnExceptVarsAndApplyRenameVisitor.New.ProcessNode(root);
|
||||
|
||||
// дешугаризация составных сравнительных операций (e.g. a == b == c)
|
||||
new TryCatchDecorator(new CompoundComparisonDesugarVisitor(), forIntellisense).ProcessNode(root);
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
public override syntax_tree_node ConvertAfterUsedModulesCompilation(syntax_tree_node root, bool forIntellisense, in CompilationArtifactsUsedBySyntaxConverters compilationArtifacts)
|
||||
{
|
||||
// украл из паскаля, нужны для работы 'for i1, i2 in expr' (работает с кортежными присваиваниями)
|
||||
var binder = new BindCollectLightSymInfo(root as compilation_unit);
|
||||
new TryCatchDecorator(binder, forIntellisense).ProcessNode(root);
|
||||
new TryCatchDecorator(new NewAssignTuplesDesugarVisitor(binder), forIntellisense).ProcessNode(root);
|
||||
|
||||
// Заменяет
|
||||
// variable_name = single_length_string
|
||||
// на
|
||||
// variable_name = str(single_length_string)
|
||||
// чтобы при выведении типа правильно вывел str, а не char
|
||||
new AssignmentCharAsStringVisitor().ProcessNode(root);
|
||||
|
||||
// Сохраняет множество имён функций, которые объявлены в программе для NameCorrectVisitor
|
||||
var ffv = new FindFunctionsNamesVisitor();
|
||||
|
||||
new TryCatchDecorator(ffv, forIntellisense).ProcessNode(root);
|
||||
|
||||
// проверка корректности имён, разрешение неоднозначности
|
||||
// сохранение множества переменных, использующихся как глобальные в ncv.variablesUsedAsGlobal
|
||||
var ncv = new NameCorrectVisitor(compilationArtifacts.NamesFromUsedUnits, ffv.definedFunctionsNames);
|
||||
|
||||
if (!new TryCatchDecorator(ncv, forIntellisense).ProcessNode(root))
|
||||
return root;
|
||||
|
||||
// замена типов из SPython на типы из PascalABC.NET
|
||||
new TryCatchDecorator(new TypeCorrectVisitor(forIntellisense), forIntellisense).ProcessNode(root);
|
||||
|
||||
// вынос forward объявлений для всех функций в начало
|
||||
new TryCatchDecorator(new AddForwardDeclarationsVisitor(), forIntellisense).ProcessNode(root);
|
||||
|
||||
// выполняет генерацию кода для функций с kwarg-аргументами
|
||||
new TryCatchDecorator(new KwargsFunctionDesugarVisitor(), forIntellisense).ProcessNode(root);
|
||||
|
||||
// замена вызова функций с kwarg-аргументами на вызов метода класса
|
||||
new TryCatchDecorator(new FunctionsWithNamedParametersDesugarVisitor(), forIntellisense).ProcessNode(root);
|
||||
|
||||
// выносит объявлений переменных из ncv.variablesUsedAsGlobal на глобальный уровень
|
||||
// (в модулях все переменные, объявленные на глобальном уровне являются глобальными)
|
||||
new TryCatchDecorator(new RetainUsedGlobalVariablesVisitor(ncv.variablesUsedAsGlobal), forIntellisense).ProcessNode(root);
|
||||
|
||||
// удаление специфичных синтаксических узлов Spython'a перед конвертацией в семантическое дерево
|
||||
if (!forIntellisense)
|
||||
new EraseSpythonOnlyNodesVisitor().ProcessNode(root);
|
||||
|
||||
// перестроение структуры дерева, для последующих этапов компиляции
|
||||
// итоговое представление:
|
||||
// 1) forward объявления функций
|
||||
// 2) объявления глобальных переменных (без присваиваний)
|
||||
// 3) объявление функции %%MAIN%%, содержащей компилируемую программу
|
||||
// 4) объявления функций, объявленных в программе
|
||||
// 5) begin %%MAIN%%() end.
|
||||
new TryCatchDecorator(new TreeNodesRearrangementVisitor(), forIntellisense).ProcessNode(root);
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
private class TryCatchDecorator
|
||||
{
|
||||
private WalkingVisitorNew internalVisitor;
|
||||
private bool forIntellisense;
|
||||
|
||||
public TryCatchDecorator(WalkingVisitorNew internalVisitor, bool forIntellisense)
|
||||
{
|
||||
this.internalVisitor = internalVisitor;
|
||||
this.forIntellisense = forIntellisense;
|
||||
}
|
||||
|
||||
public bool ProcessNode(syntax_tree_node root)
|
||||
{
|
||||
if (forIntellisense)
|
||||
{
|
||||
try
|
||||
{
|
||||
internalVisitor.ProcessNode(root);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
internalVisitor.ProcessNode(root);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using PascalABCCompiler.Errors;
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
public static class SPythonStringResources
|
||||
{
|
||||
public static string Get(string key)
|
||||
{
|
||||
return PascalABCCompiler.StringResources.Get("SPYTHONSYNTAXTREEVISITORSERROR_" + key);
|
||||
}
|
||||
|
||||
public static string Get(string key, params object[] values)
|
||||
{
|
||||
return (string.Format(Get(key), values));
|
||||
}
|
||||
}
|
||||
|
||||
public class SPythonSyntaxVisitorError : SyntaxError
|
||||
{
|
||||
public SPythonSyntaxVisitorError(string resourcestring, SourceContext sc, params object[] values) : base(SPythonStringResources.Get(resourcestring, values), "", sc, null)
|
||||
{
|
||||
|
||||
}
|
||||
public SPythonSyntaxVisitorError(string resourcestring, PascalABCCompiler.SyntaxTree.syntax_tree_node bad_node)
|
||||
: base(SPythonStringResources.Get(resourcestring), "", bad_node.source_context, bad_node)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,459 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PascalABCCompiler;
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
// заполняет таблицу символов динамически, при проходе по дереву сверху вниз
|
||||
public class SymbolTableFillingVisitor : BaseChangeVisitor
|
||||
{
|
||||
protected SymbolTable symbolTable;
|
||||
|
||||
public SymbolTableFillingVisitor(Dictionary<string, HashSet<string>> par) {
|
||||
symbolTable = new SymbolTable(par);
|
||||
}
|
||||
|
||||
// нужны методы из BaseChangeVisitor, но порядок обхода из WalkingVisitorNew
|
||||
public override void DefaultVisit(syntax_tree_node n)
|
||||
{
|
||||
if (n == null) return;
|
||||
for (var i = 0; i < n.subnodes_count; i++)
|
||||
ProcessNode(n[i]);
|
||||
}
|
||||
|
||||
public override void Enter(syntax_tree_node stn)
|
||||
{
|
||||
if (stn is statement_list)
|
||||
{
|
||||
symbolTable.OpenLocalScope();
|
||||
}
|
||||
if (stn is procedure_definition || stn is function_lambda_definition)
|
||||
{
|
||||
symbolTable.OpenLocalScope();
|
||||
symbolTable.IsInFunctionBody = true;
|
||||
}
|
||||
|
||||
base.Enter(stn);
|
||||
}
|
||||
|
||||
public override void Exit(syntax_tree_node stn)
|
||||
{
|
||||
if (stn is procedure_definition || stn is function_lambda_definition)
|
||||
{
|
||||
symbolTable.IsInFunctionBody = false;
|
||||
symbolTable.CloseLocalScope();
|
||||
}
|
||||
if (stn is statement_list)
|
||||
{
|
||||
symbolTable.CloseLocalScope();
|
||||
}
|
||||
|
||||
base.Exit(stn);
|
||||
}
|
||||
|
||||
public override void visit(semantic_check_sugared_statement_node _)
|
||||
{
|
||||
// Скипаем. Узел нужен на семантике, здесь порождает лишние ошибки.
|
||||
}
|
||||
|
||||
private bool IsForwardDeclaration(procedure_header _procedure_header)
|
||||
{
|
||||
foreach (procedure_attribute attr in _procedure_header.proc_attributes.proc_attributes)
|
||||
if (attr.attribute_type is proc_attribute.attr_forward)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void visit(procedure_header _procedure_header)
|
||||
{
|
||||
string procedure_name = _procedure_header.name.meth_name.name;
|
||||
// Сейчас здесь не могут быть встречены forward-объявления функций
|
||||
// но на будущее...
|
||||
if (IsForwardDeclaration(_procedure_header))
|
||||
{
|
||||
symbolTable.Add(procedure_name, NameKind.ForwardDeclaredFunction);
|
||||
}
|
||||
else
|
||||
{
|
||||
symbolTable.Add(procedure_name, NameKind.GlobalFunction);
|
||||
}
|
||||
base.visit(_procedure_header);
|
||||
}
|
||||
|
||||
public override void visit(function_header _function_header)
|
||||
{
|
||||
visit(_function_header as procedure_header);
|
||||
}
|
||||
|
||||
public override void visit(function_lambda_definition _function_lambda_definition)
|
||||
{
|
||||
foreach (ident id in _function_lambda_definition.ident_list.list)
|
||||
symbolTable.Add(id.name, NameKind.LocalVariable);
|
||||
|
||||
base.visit(_function_lambda_definition);
|
||||
}
|
||||
|
||||
public override void visit(foreach_stmt _foreach_stmt)
|
||||
{
|
||||
symbolTable.OpenLocalScope();
|
||||
symbolTable.Add(_foreach_stmt.identifier.name, NameKind.LocalVariable);
|
||||
|
||||
if (_foreach_stmt.ext is ident_list _ident_list)
|
||||
{
|
||||
foreach (ident _ident in _ident_list.idents)
|
||||
{
|
||||
symbolTable.Add(_ident.name, NameKind.LocalVariable);
|
||||
}
|
||||
}
|
||||
|
||||
base.visit(_foreach_stmt);
|
||||
symbolTable.CloseLocalScope();
|
||||
}
|
||||
|
||||
public override void visit(interface_node _interface_node)
|
||||
{
|
||||
ProcessNode(_interface_node.uses_modules);
|
||||
ProcessNode(_interface_node.using_namespaces);
|
||||
ProcessNode(_interface_node.interface_definitions);
|
||||
}
|
||||
|
||||
public override void visit(global_statement _global_statement)
|
||||
{
|
||||
foreach (ident _ident in _global_statement.idents.idents)
|
||||
{
|
||||
symbolTable.MakeVisibleForAssignment(_ident.name);
|
||||
}
|
||||
}
|
||||
|
||||
public override void visit(typed_parameters _typed_parameters)
|
||||
{
|
||||
foreach (ident id in _typed_parameters.idents.idents)
|
||||
symbolTable.Add(id.name, NameKind.LocalVariable);
|
||||
|
||||
base.visit(_typed_parameters);
|
||||
}
|
||||
|
||||
public override void visit(var_statement _var_statement)
|
||||
{
|
||||
foreach (ident id in _var_statement.var_def.vars.idents)
|
||||
symbolTable.Add(id.name, NameKind.LocalVariable);
|
||||
|
||||
base.visit(_var_statement);
|
||||
}
|
||||
|
||||
public override void visit(import_statement _import_statement)
|
||||
{
|
||||
foreach (as_statement as_Statement in _import_statement.modules_names.as_statements)
|
||||
{
|
||||
string real_name = as_Statement.real_name.name;
|
||||
string alias = as_Statement.alias.name;
|
||||
if (SymbolTable.specialModulesAliases.ContainsKey(real_name))
|
||||
real_name = SymbolTable.specialModulesAliases[real_name];
|
||||
symbolTable.AddModuleAlias(real_name, alias);
|
||||
}
|
||||
}
|
||||
|
||||
public override void visit(from_import_statement _from_import_statement)
|
||||
{
|
||||
string module_real_name = _from_import_statement.module_name.name;
|
||||
string module_name = module_real_name;
|
||||
if (SymbolTable.specialModulesAliases.ContainsKey(module_name))
|
||||
module_name = SymbolTable.specialModulesAliases[module_name];
|
||||
|
||||
if (_from_import_statement.is_star)
|
||||
{
|
||||
foreach (string name in symbolTable.ModuleNameToSymbols[module_name])
|
||||
symbolTable.AddAlias(name, name, module_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (as_statement as_Statement in _from_import_statement.imported_names.as_statements)
|
||||
{
|
||||
if (!symbolTable.ModuleNameToSymbols[module_name].Contains(as_Statement.real_name.name))
|
||||
throw new SPythonSyntaxVisitorError("MODULE_{0}_HAS_NO_NAME_{1}",
|
||||
_from_import_statement.source_context, module_real_name, as_Statement.real_name.name);
|
||||
|
||||
symbolTable.AddAlias(as_Statement.real_name.name, as_Statement.alias.name, module_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void visit(variable_definitions _variable_definitions)
|
||||
{
|
||||
foreach (var_def_statement vds in _variable_definitions.var_definitions)
|
||||
{
|
||||
foreach (ident id in vds.vars.idents)
|
||||
{
|
||||
symbolTable.Add(id.name, NameKind.GlobalVariable);
|
||||
base.visit(_variable_definitions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Flags]
|
||||
protected enum NameKind
|
||||
{
|
||||
// Имя отсутствует в текущем контексте
|
||||
Unknown = 0b_0000_0000,
|
||||
// Ключевые слова языка
|
||||
Keyword = 0b_0000_0001,
|
||||
// Имя глобальной переменной
|
||||
GlobalVariable = 0b_0000_0010,
|
||||
// Имя глобальной функции
|
||||
GlobalFunction = 0b_0000_0100,
|
||||
// Имя подключённого модуля или его псевдоним
|
||||
ModuleAlias = 0b_0000_1000,
|
||||
// Имя, подключённое из модуля, или его псевдоним
|
||||
ImportedNameAlias = 0b_0001_0000,
|
||||
// Локальня переменная
|
||||
LocalVariable = 0b_0010_0000,
|
||||
// Имя глобальной forward-объявленной функции
|
||||
ForwardDeclaredFunction = 0b_0100_0000,
|
||||
}
|
||||
|
||||
protected class SymbolTable
|
||||
{
|
||||
private Dictionary<string, NameKind> nameTypes = new Dictionary<string, NameKind>();
|
||||
private HashSet<string> forwardDeclaredFunctions = new HashSet<string>();
|
||||
|
||||
static string[] Keywords = {
|
||||
"int", "float", "str", "bool", "tuple", // standard types
|
||||
"break", "continue", "exit", "halt", // standard ops
|
||||
"true", "false", // constants
|
||||
};
|
||||
|
||||
private void FillKeywords()
|
||||
{
|
||||
foreach (var keyword in Keywords)
|
||||
nameTypes.Add(keyword, NameKind.Keyword);
|
||||
}
|
||||
|
||||
public SymbolTable(Dictionary<string, HashSet<string>> par)
|
||||
{
|
||||
ModuleNameToSymbols = par;
|
||||
FillKeywords();
|
||||
AddAliasesFromStandartLibraries();
|
||||
}
|
||||
|
||||
public static Dictionary<string, string> specialModulesAliases = new Dictionary<string, string>
|
||||
{
|
||||
{ "time", "time1" },
|
||||
{ "random", "random1" },
|
||||
};
|
||||
|
||||
// names added to current function with global statements
|
||||
private HashSet<string> NamesAddedByGlobal = new HashSet<string>();
|
||||
|
||||
private bool isInFunctionBody = false;
|
||||
|
||||
public bool IsInFunctionBody {
|
||||
get { return isInFunctionBody; }
|
||||
set
|
||||
{
|
||||
isInFunctionBody = value;
|
||||
if (isInFunctionBody)
|
||||
{
|
||||
Add(StringConstants.result_var_name, NameKind.LocalVariable);
|
||||
}
|
||||
else
|
||||
{
|
||||
NamesAddedByGlobal.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// module alias -> module real name
|
||||
private Dictionary<string, string> modulesAliases = new Dictionary<string, string>();
|
||||
|
||||
private List<string> StandardLibraries = new List<string> { "SPythonSystem", "SPythonHidden", "SPythonSystemPys" };
|
||||
|
||||
// alias of function or global variable from module -> real name and module real name
|
||||
private Dictionary<string, Tuple<string, string>> aliasToRealNameAndModuleName = new Dictionary<string, Tuple<string, string>>();
|
||||
|
||||
private LocalScope localVariables = new LocalScope();
|
||||
|
||||
// moduleRealName -> functions and global variables in this module real names
|
||||
private Dictionary<string, HashSet<string>> moduleNameToSymbols;
|
||||
|
||||
public Dictionary<string, HashSet<string>> ModuleNameToSymbols
|
||||
{
|
||||
get => moduleNameToSymbols;
|
||||
set
|
||||
{ moduleNameToSymbols = value; }
|
||||
}
|
||||
|
||||
private void AddAliasesFromStandartLibraries()
|
||||
{
|
||||
foreach (string standardLibrary in StandardLibraries)
|
||||
{
|
||||
if (moduleNameToSymbols.ContainsKey(standardLibrary))
|
||||
foreach (string name in moduleNameToSymbols[standardLibrary])
|
||||
AddAlias(name, name, standardLibrary);
|
||||
}
|
||||
}
|
||||
|
||||
public string AliasToRealName(string alias)
|
||||
{
|
||||
if (modulesAliases.ContainsKey(alias))
|
||||
return modulesAliases[alias];
|
||||
else
|
||||
return aliasToRealNameAndModuleName[alias].Item1;
|
||||
}
|
||||
|
||||
public string AliasToModuleName(string alias)
|
||||
{
|
||||
return aliasToRealNameAndModuleName[alias].Item2;
|
||||
}
|
||||
|
||||
public void MakeVisibleForAssignment(string name)
|
||||
{
|
||||
NamesAddedByGlobal.Add(name);
|
||||
}
|
||||
|
||||
public bool IsVisibleToAssign(string name)
|
||||
{
|
||||
NameKind kind = this[name];
|
||||
if (kind == NameKind.Unknown) return false;
|
||||
if (!isInFunctionBody) return true;
|
||||
return (kind != NameKind.GlobalVariable &&
|
||||
kind != NameKind.ImportedNameAlias) ||
|
||||
NamesAddedByGlobal.Contains(name);
|
||||
}
|
||||
|
||||
public NameKind this[string name]
|
||||
{
|
||||
get {
|
||||
if (localVariables.Contains(name))
|
||||
return NameKind.LocalVariable;
|
||||
if (nameTypes.ContainsKey(name))
|
||||
return nameTypes[name];
|
||||
if (forwardDeclaredFunctions.Contains(name))
|
||||
return NameKind.ForwardDeclaredFunction;
|
||||
return NameKind.Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
public void Add(string name, NameKind nameType)
|
||||
{
|
||||
switch (nameType)
|
||||
{
|
||||
case NameKind.LocalVariable:
|
||||
localVariables.Add(name);
|
||||
break;
|
||||
case NameKind.GlobalVariable:
|
||||
case NameKind.GlobalFunction:
|
||||
AddGlobalName(name, nameType);
|
||||
break;
|
||||
case NameKind.ForwardDeclaredFunction:
|
||||
forwardDeclaredFunctions.Add(name);
|
||||
break;
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
private void AddGlobalName(string name, NameKind nameType)
|
||||
{
|
||||
EraseNameAsLocal(name);
|
||||
|
||||
if (nameTypes.ContainsKey(name))
|
||||
nameTypes[name] = nameType;
|
||||
else nameTypes.Add(name, nameType);
|
||||
}
|
||||
|
||||
public void AddAlias(string realName, string alias, string moduleName)
|
||||
{
|
||||
if (aliasToRealNameAndModuleName.ContainsKey(alias))
|
||||
aliasToRealNameAndModuleName[alias] = Tuple.Create(realName, moduleName);
|
||||
else aliasToRealNameAndModuleName.Add(alias, Tuple.Create(realName, moduleName));
|
||||
AddGlobalName(alias, NameKind.ImportedNameAlias);
|
||||
}
|
||||
|
||||
public void AddModuleAlias(string realName, string alias)
|
||||
{
|
||||
if (modulesAliases.ContainsKey(alias))
|
||||
modulesAliases[alias] = realName;
|
||||
else modulesAliases.Add(alias, realName);
|
||||
AddGlobalName(alias, NameKind.ModuleAlias);
|
||||
}
|
||||
|
||||
private void EraseNameAsLocal(string name)
|
||||
{
|
||||
localVariables.EraseName(name);
|
||||
}
|
||||
|
||||
public void OpenLocalScope()
|
||||
{
|
||||
localVariables = new LocalScope(localVariables);
|
||||
}
|
||||
|
||||
public void CloseLocalScope()
|
||||
{
|
||||
localVariables.ClearScope();
|
||||
}
|
||||
|
||||
public bool IsOutermostScope()
|
||||
{
|
||||
return localVariables.IsOutermostScope();
|
||||
}
|
||||
|
||||
public class LocalScope
|
||||
{
|
||||
private LocalScope outerScope;
|
||||
private HashSet<string> symbols = new HashSet<string>();
|
||||
|
||||
public LocalScope(LocalScope outerScope = null)
|
||||
{
|
||||
this.outerScope = outerScope;
|
||||
}
|
||||
|
||||
public bool Contains(string name)
|
||||
{
|
||||
LocalScope curr = this;
|
||||
|
||||
while (curr != null)
|
||||
{
|
||||
if (curr.symbols.Contains(name))
|
||||
return true;
|
||||
curr = curr.outerScope;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void EraseName(string name)
|
||||
{
|
||||
LocalScope curr = this;
|
||||
|
||||
while (curr != null)
|
||||
{
|
||||
//if (curr.symbols.Contains(name))
|
||||
curr.symbols.Remove(name);
|
||||
curr = curr.outerScope;
|
||||
}
|
||||
}
|
||||
|
||||
public void Add(string ident)
|
||||
{
|
||||
symbols.Add(ident);
|
||||
}
|
||||
|
||||
public void ClearScope()
|
||||
{
|
||||
if (outerScope != null)
|
||||
{
|
||||
symbols = outerScope.symbols;
|
||||
outerScope = outerScope.outerScope;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsOutermostScope()
|
||||
{
|
||||
return outerScope.outerScope == null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
internal class TreeNodesRearrangementVisitor : BaseChangeVisitor
|
||||
{
|
||||
private procedure_definition mainFunction;
|
||||
|
||||
// declaration после объявления мейна (объявления функций с определениями)
|
||||
private List<declaration> suffix = new List<declaration>();
|
||||
|
||||
private declarations decls;
|
||||
|
||||
private const string mainFunctionName = "%%MAIN%%";
|
||||
|
||||
private bool isInFunction = false;
|
||||
private int scopeCounter = 0;
|
||||
|
||||
public TreeNodesRearrangementVisitor() { }
|
||||
|
||||
// нужны методы из BaseChangeVisitor, но порядок обхода из WalkingVisitorNew
|
||||
public override void DefaultVisit(syntax_tree_node n)
|
||||
{
|
||||
if (n == null) return;
|
||||
for (var i = 0; i < n.subnodes_count; i++)
|
||||
ProcessNode(n[i]);
|
||||
}
|
||||
|
||||
public override void Enter(syntax_tree_node stn)
|
||||
{
|
||||
if (stn is procedure_definition)
|
||||
{
|
||||
isInFunction = true;
|
||||
scopeCounter++;
|
||||
}
|
||||
if (stn is statement_list)
|
||||
{
|
||||
scopeCounter++;
|
||||
}
|
||||
if (stn is program_module pm)
|
||||
{
|
||||
decls = pm.program_block.defs;
|
||||
}
|
||||
if (stn is interface_node intn)
|
||||
{
|
||||
decls = intn.interface_definitions;
|
||||
}
|
||||
|
||||
base.Enter(stn);
|
||||
}
|
||||
|
||||
private void BuildMainFunction(statement_list _statement_list)
|
||||
{
|
||||
statement_list mainBody = _statement_list.TypedClone();
|
||||
procedure_header _procedure_header = new procedure_header(mainFunctionName);
|
||||
block _block = new block(null, mainBody, mainBody.source_context);
|
||||
//block _block = new block(null, new statement_list(), _statement_list.source_context);
|
||||
mainFunction = new procedure_definition(_procedure_header, _block, false, _block.source_context);
|
||||
}
|
||||
|
||||
public override void Exit(syntax_tree_node stn)
|
||||
{
|
||||
if (stn is procedure_definition)
|
||||
{
|
||||
isInFunction = false;
|
||||
scopeCounter--;
|
||||
}
|
||||
if (stn is statement_list sl)
|
||||
{
|
||||
scopeCounter--;
|
||||
// вышли из внешнего statement_list внутри begin end.
|
||||
if (!isInFunction && scopeCounter == 0)
|
||||
{
|
||||
BuildMainFunction(sl);
|
||||
decls.list.Add(mainFunction);
|
||||
foreach (declaration decl in suffix)
|
||||
decls.list.Add(decl);
|
||||
sl.list.Clear();
|
||||
sl.Add(new procedure_call(new method_call(new ident(mainFunctionName), null), true));
|
||||
}
|
||||
}
|
||||
|
||||
base.Exit(stn);
|
||||
}
|
||||
|
||||
public override void visit(declarations_as_statement _declarations_as_statement)
|
||||
{
|
||||
foreach (declaration decl in _declarations_as_statement.defs.defs)
|
||||
{
|
||||
suffix.Add(decl);
|
||||
}
|
||||
ReplaceStatement(_declarations_as_statement, new empty_statement());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
using PascalABCCompiler.SyntaxTree;
|
||||
|
||||
namespace Languages.SPython.Frontend.Converters
|
||||
{
|
||||
public class TypeCorrectVisitor : BaseChangeVisitor
|
||||
{
|
||||
|
||||
private bool forIntellisense;
|
||||
|
||||
public TypeCorrectVisitor(bool forIntellisense)
|
||||
{
|
||||
this.forIntellisense = forIntellisense;
|
||||
}
|
||||
|
||||
public override void visit(template_type_reference ttr)
|
||||
{
|
||||
int index = ttr.name.names.Count - 1;
|
||||
if (ttr.name.names[index].name == "tuple")
|
||||
{
|
||||
int cnt = ttr.params_list.Count;
|
||||
if (cnt > 7)
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("LONG_TUPLE_TYPENAME",
|
||||
ttr.source_context, cnt);
|
||||
}
|
||||
ttr.name.names[index].name += cnt;
|
||||
}
|
||||
base.visit(ttr);
|
||||
}
|
||||
|
||||
public override void visit(named_type_reference _named_type_reference)
|
||||
{
|
||||
ident id = _named_type_reference.names[_named_type_reference.names.Count - 1];
|
||||
|
||||
if (!forIntellisense)
|
||||
{
|
||||
switch (id.name)
|
||||
{
|
||||
case "int":
|
||||
id.name = "integer";
|
||||
break;
|
||||
case "float":
|
||||
id.name = "real";
|
||||
break;
|
||||
case "str":
|
||||
id.name = "string";
|
||||
break;
|
||||
case "bool":
|
||||
id.name = "boolean";
|
||||
break;
|
||||
case "bigint":
|
||||
id.name = "biginteger";
|
||||
break;
|
||||
|
||||
case "integer":
|
||||
throw new SPythonSyntaxVisitorError("PASCALABCNET_TYPE_{0}_INSTEAD_OF_SPYTHON_TYPE_{1}",
|
||||
id.source_context, id.name, "int");
|
||||
case "real":
|
||||
throw new SPythonSyntaxVisitorError("PASCALABCNET_TYPE_{0}_INSTEAD_OF_SPYTHON_TYPE_{1}",
|
||||
id.source_context, id.name, "float");
|
||||
case "string":
|
||||
throw new SPythonSyntaxVisitorError("PASCALABCNET_TYPE_{0}_INSTEAD_OF_SPYTHON_TYPE_{1}",
|
||||
id.source_context, id.name, "str");
|
||||
case "boolean":
|
||||
throw new SPythonSyntaxVisitorError("PASCALABCNET_TYPE_{0}_INSTEAD_OF_SPYTHON_TYPE_{1}",
|
||||
id.source_context, id.name, "bool");
|
||||
case "biginteger":
|
||||
throw new SPythonSyntaxVisitorError("PASCALABCNET_TYPE_{0}_INSTEAD_OF_SPYTHON_TYPE_{1}",
|
||||
id.source_context, id.name, "bigint");
|
||||
}
|
||||
}
|
||||
|
||||
switch (id.name)
|
||||
{
|
||||
case "list":
|
||||
id.name = "!list";
|
||||
break;
|
||||
case "dict":
|
||||
id.name = "!dict";
|
||||
break;
|
||||
case "set":
|
||||
id.name = "!set";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
using Languages.SPython.Frontend.Converters;
|
||||
using PascalABCCompiler.SyntaxTree;
|
||||
|
||||
namespace Languages.Pascal.Frontend.Converters
|
||||
{
|
||||
public class UnsupportedConstructsVisitor : BaseEnterExitVisitor
|
||||
{
|
||||
private int blockLevel = 0;
|
||||
// function returns a value
|
||||
private bool isInFunction = false;
|
||||
// procedure doesn't return value
|
||||
private bool isInProcedure = false;
|
||||
|
||||
public UnsupportedConstructsVisitor() { }
|
||||
|
||||
public override void Enter(syntax_tree_node st)
|
||||
{
|
||||
if (st is statement_list)
|
||||
{
|
||||
++blockLevel;
|
||||
}
|
||||
if (st is procedure_definition pd)
|
||||
{
|
||||
if (pd.proc_header is function_header)
|
||||
isInFunction = true;
|
||||
else
|
||||
isInProcedure = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Exit(syntax_tree_node st)
|
||||
{
|
||||
if (st is statement_list)
|
||||
{
|
||||
--blockLevel;
|
||||
}
|
||||
if (st is procedure_definition)
|
||||
{
|
||||
isInProcedure = isInFunction = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void visit(return_statement _return_statement)
|
||||
{
|
||||
// 'return' или 'return expr' вне функции
|
||||
if (!isInFunction && !isInProcedure)
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("RETURN_NOT_IN_FUNCTION",
|
||||
_return_statement.source_context);
|
||||
}
|
||||
// 'return' внутри функции, которая должна возвращать значение
|
||||
if (isInFunction && _return_statement.expr == null)
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("RETURN_NOT_RETURN_VALUE",
|
||||
_return_statement.source_context);
|
||||
}
|
||||
// 'return expr' внутри функции, которая не возвращает значение
|
||||
if (isInProcedure && _return_statement.expr != null)
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("RETURN_HAS_RETURN_VALUE",
|
||||
_return_statement.expr.source_context);
|
||||
}
|
||||
|
||||
base.visit(_return_statement);
|
||||
}
|
||||
|
||||
public override void visit(global_statement _global_statement)
|
||||
{
|
||||
// конструкция 'global ...' используется вне функции
|
||||
if (!isInProcedure && !isInFunction)
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("GLOBAL_NOT_IN_FUNCTION",
|
||||
_global_statement.source_context);
|
||||
}
|
||||
// конструкция 'global ...' используется
|
||||
// не на самом внешнем блоке внутри функции
|
||||
if (blockLevel != 2)
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("GLOBAL_IN_NOT_OUTERMOST_BLOCK",
|
||||
_global_statement.source_context);
|
||||
}
|
||||
|
||||
base.visit(_global_statement);
|
||||
}
|
||||
|
||||
public override void visit(import_statement _import_statement)
|
||||
{
|
||||
// конструкция 'import ...'
|
||||
// используется не на глобальном уровне
|
||||
if (blockLevel > 1)
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("LOCAL_IMPORT_USE",
|
||||
_import_statement.source_context);
|
||||
}
|
||||
|
||||
base.visit(_import_statement);
|
||||
}
|
||||
|
||||
public override void visit(from_import_statement _from_import_statement)
|
||||
{
|
||||
// конструкция 'from ... import ...'
|
||||
// используется не на глобальном уровне
|
||||
if (blockLevel > 1)
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("LOCAL_FROM_IMPORT_USE",
|
||||
_from_import_statement.source_context);
|
||||
}
|
||||
|
||||
base.visit(_from_import_statement);
|
||||
}
|
||||
|
||||
public override void visit(procedure_definition _procedure_definition)
|
||||
{
|
||||
// объявление функции не на глобальном уровне
|
||||
if (blockLevel > 1)
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("LOCAL_FUNCTION_DECLARATION",
|
||||
_procedure_definition.source_context);
|
||||
}
|
||||
|
||||
base.visit(_procedure_definition);
|
||||
}
|
||||
|
||||
public override void visit(assign_tuple _assign_tuple)
|
||||
{
|
||||
// выявление ошибок типа
|
||||
// a, b = 1, 2, 3
|
||||
if (_assign_tuple.expr is tuple_node right_part
|
||||
&& _assign_tuple.vars.Count < right_part.el.Count
|
||||
)
|
||||
{
|
||||
throw new SPythonSyntaxVisitorError("LEFT_SIZE_TUPLE_ASSIGNMENT_LESS_THAN_RIGHT",
|
||||
_assign_tuple.source_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -27,6 +27,9 @@ namespace PascalABCCompiler.Parsers
|
|||
|
||||
public abstract string ReturnTypeDelimiter { get; }
|
||||
|
||||
public abstract string ProcedureName { get; }
|
||||
public abstract string FunctionName { get; }
|
||||
|
||||
public abstract bool CaseSensitive { get; }
|
||||
|
||||
public abstract bool IncludeDotNetEntities { get; }
|
||||
|
|
@ -199,6 +202,362 @@ namespace PascalABCCompiler.Parsers
|
|||
return scope.Name + template_str;
|
||||
}
|
||||
|
||||
// TODO: Адаптировать к многоязычности EVA
|
||||
protected string GetDescriptionForCompiledMethod(ICompiledMethodScope scope)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
string extensionType = null;
|
||||
if (scope.IsExtension && scope.Parameters.Length > 0)
|
||||
{
|
||||
extensionType = GetSimpleDescription(scope.Parameters[0].Type);
|
||||
}
|
||||
if (scope.IsExtension)
|
||||
{
|
||||
if (extensionType.IndexOf(' ') != -1)
|
||||
{
|
||||
sb.Append("(" + PascalABCCompiler.StringResources.Get("CODE_COMPLETION_EXTENSION") + " " + extensionType + ") ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append("(" + PascalABCCompiler.StringResources.Get("CODE_COMPLETION_EXTENSION") + ") ");
|
||||
extensionType = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (scope.IsStatic && !scope.IsGlobal) sb.Append("static ");
|
||||
if (scope.ReturnType == null && ProcedureName != null)
|
||||
sb.Append(ProcedureName + " ");
|
||||
else
|
||||
sb.Append(FunctionName + " ");
|
||||
Dictionary<string, string> generic_param_args = null;
|
||||
Dictionary<string, int> class_generic_table = new Dictionary<string, int>();
|
||||
ParameterInfo[] pis = scope.CompiledMethod.GetParameters();
|
||||
Type[] tt = scope.CompiledMethod.GetGenericArguments();
|
||||
int gen_ind = 0;
|
||||
if (!scope.IsExtension)
|
||||
{
|
||||
sb.Append(GetShortTypeName(scope.CompiledMethod.DeclaringType));
|
||||
int ind = 0;
|
||||
foreach (Type gen_arg in scope.CompiledMethod.DeclaringType.GetGenericArguments())
|
||||
{
|
||||
if (gen_arg.IsGenericParameter)
|
||||
{
|
||||
if (generic_param_args == null)
|
||||
generic_param_args = new Dictionary<string, string>();
|
||||
if (scope.GenericArgs != null && scope.GenericArgs.Count > ind)
|
||||
generic_param_args.Add(gen_arg.Name, scope.GenericArgs[ind]);
|
||||
else if (scope.DeclaringType.TemplateArguments != null && scope.DeclaringType.TemplateArguments.Length > ind)
|
||||
generic_param_args.Add(gen_arg.Name, scope.DeclaringType.TemplateArguments[ind]);
|
||||
}
|
||||
ind++;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
gen_ind = 0;
|
||||
generic_param_args = new Dictionary<string, string>();
|
||||
for (int i = 0; i < pis.Length; i++)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
Type[] class_generic_args = pis[i].ParameterType.GetGenericArguments();
|
||||
for (int j = 0; j < class_generic_args.Length; j++)
|
||||
{
|
||||
if (!class_generic_table.ContainsKey(class_generic_args[i].Name))
|
||||
class_generic_table.Add(class_generic_args[i].Name, j);
|
||||
if (scope.GenericArgs != null && scope.GenericArgs.Count > j)
|
||||
{
|
||||
if (scope.DeclaringType.GenericInstances.Length > 0)
|
||||
generic_param_args[class_generic_args[i].Name] = GetSimpleDescription(scope.DeclaringType.GenericInstances[0]);
|
||||
else if (scope.DeclaringType is ICompiledTypeScope)
|
||||
{
|
||||
Type ctn = (scope.DeclaringType as ICompiledTypeScope).CompiledType;
|
||||
if (ctn.IsGenericType && !ctn.IsGenericTypeDefinition)
|
||||
generic_param_args[class_generic_args[i].Name] = GetSimpleDescriptionForCompiledType((scope.DeclaringType as ICompiledTypeScope).GetCompiledGenericArguments()[0]);
|
||||
}
|
||||
}
|
||||
else if (scope.DeclaringType.TemplateArguments != null && scope.DeclaringType.TemplateArguments.Length > j)
|
||||
generic_param_args[class_generic_args[i].Name] = scope.DeclaringType.TemplateArguments[j];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (extensionType == null)
|
||||
sb.Append(GetShortTypeName(scope.CompiledMethod.GetParameters()[0].ParameterType));
|
||||
}
|
||||
//if (scope.Name != "Invoke")
|
||||
{
|
||||
if (extensionType == null)
|
||||
sb.Append(".");
|
||||
sb.Append(scope.Name);
|
||||
}
|
||||
|
||||
if (scope.CompiledMethod.GetGenericArguments().Length > 0)
|
||||
{
|
||||
sb.Append(GenericTypesStartBracket);
|
||||
for (int i = gen_ind; i < tt.Length; i++)
|
||||
{
|
||||
if (class_generic_table.ContainsKey(tt[i].Name))
|
||||
{
|
||||
int ind = class_generic_table[tt[i].Name];
|
||||
if (scope.GenericArgs != null && scope.GenericArgs.Count > ind)
|
||||
{
|
||||
if (scope.DeclaringType.GenericInstances.Length > ind)
|
||||
{
|
||||
sb.Append(GetSimpleDescription(scope.DeclaringType.GenericInstances[ind]));
|
||||
if (!generic_param_args.ContainsKey(tt[i].Name))
|
||||
generic_param_args.Add(tt[i].Name, GetSimpleDescription(scope.DeclaringType.GenericInstances[ind]));
|
||||
}
|
||||
else if (scope.DeclaringType is ICompiledTypeScope)
|
||||
{
|
||||
Type ctn = (scope.DeclaringType as ICompiledTypeScope).CompiledType;
|
||||
if (ctn.IsGenericType && !ctn.IsGenericTypeDefinition)
|
||||
{
|
||||
sb.Append(GetSimpleDescription((scope.DeclaringType as ICompiledTypeScope).GetCompiledGenericArguments()[ind]));
|
||||
if (!generic_param_args.ContainsKey(tt[i].Name))
|
||||
generic_param_args.Add(tt[i].Name, GetSimpleDescription((scope.DeclaringType as ICompiledTypeScope).GetCompiledGenericArguments()[ind]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
sb.Append(tt[i].Name);
|
||||
if (i < tt.Length - 1) sb.Append(", ");
|
||||
}
|
||||
sb.Append(GenericTypesEndBracket);
|
||||
}
|
||||
sb.Append('(');
|
||||
|
||||
for (int i = 0; i < pis.Length; i++)
|
||||
{
|
||||
if (i == 0 && scope.IsExtension)
|
||||
continue;
|
||||
if (pis[i].ParameterType.IsByRef)
|
||||
sb.Append("var ");
|
||||
else if (IsParams(pis[i]))
|
||||
sb.Append("params ");
|
||||
sb.Append(pis[i].Name);
|
||||
sb.Append(": ");
|
||||
string inst_type = null;
|
||||
if (!pis[i].ParameterType.IsByRef)
|
||||
{
|
||||
if (scope.GenericArgs != null)
|
||||
{
|
||||
inst_type = get_type_instance(pis[i].ParameterType, scope.GenericArgs, generic_param_args);
|
||||
}
|
||||
if (inst_type == null)
|
||||
sb.Append(GetShortTypeName(pis[i].ParameterType, false));
|
||||
else
|
||||
sb.Append(inst_type);
|
||||
if (pis[i].IsOptional)
|
||||
{
|
||||
sb.Append(" := ");
|
||||
if (pis[i].DefaultValue != null)
|
||||
{
|
||||
if (pis[i].DefaultValue is string) sb.Append($"'{pis[i].DefaultValue.ToString()}'");
|
||||
else sb.Append(pis[i].DefaultValue.ToString());
|
||||
}
|
||||
else sb.Append("nil");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Type t = pis[i].ParameterType.GetElementType();
|
||||
if (scope.GenericArgs != null)
|
||||
{
|
||||
inst_type = get_type_instance(t, scope.GenericArgs, generic_param_args);
|
||||
}
|
||||
if (inst_type == null)
|
||||
sb.Append(GetShortTypeName(t, false));
|
||||
else
|
||||
sb.Append(inst_type);
|
||||
}
|
||||
if (i < pis.Length - 1)
|
||||
sb.Append(ParameterDelimiter + " ");
|
||||
}
|
||||
sb.Append(')');
|
||||
string ret_inst_type = null;
|
||||
if (scope.ReturnType != null)
|
||||
{
|
||||
if (scope.GenericArgs != null)
|
||||
{
|
||||
ret_inst_type = get_type_instance(scope.CompiledMethod.ReturnType, scope.GenericArgs, generic_param_args);
|
||||
}
|
||||
if (ret_inst_type == null)
|
||||
{
|
||||
if (scope.ReturnType is ICompiledTypeScope)
|
||||
sb.Append(ReturnTypeDelimiter + " " + GetFullTypeName((scope.ReturnType as ICompiledTypeScope).CompiledType, false));
|
||||
else
|
||||
sb.Append(ReturnTypeDelimiter + " " + GetSimpleDescription(scope.ReturnType));
|
||||
}
|
||||
else
|
||||
sb.Append(ReturnTypeDelimiter + " " + ret_inst_type);
|
||||
}
|
||||
//if (scope.CompiledMethod.IsStatic) sb.Append("; static");
|
||||
if (scope.IsVirtual) sb.Append("; ");
|
||||
else if (scope.IsAbstract) sb.Append("; abstract");
|
||||
//else if (scope.CompiledMethod.IsHideBySig) sb.Append("; reintroduce");
|
||||
sb.Append(';');
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
// TODO: Адаптировать к многоязычности EVA
|
||||
protected string GetDescriptionForCompiledMethod(MethodInfo mi)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
|
||||
if (mi.IsPublic)
|
||||
sb.Append("public ");
|
||||
else if (mi.IsFamily)
|
||||
sb.Append("protected ");
|
||||
if (mi.IsStatic) sb.Append("static ");
|
||||
if (mi.ReturnType == typeof(void) && ProcedureName != null)
|
||||
sb.Append(ProcedureName + " ");
|
||||
else
|
||||
sb.Append(FunctionName + " ");
|
||||
sb.Append(prepare_member_name(mi.Name));
|
||||
if (mi.GetGenericArguments().Length > 0)
|
||||
{
|
||||
Type[] tt = mi.GetGenericArguments();
|
||||
sb.Append(GenericTypesStartBracket);
|
||||
for (int i = 0; i < tt.Length; i++)
|
||||
{
|
||||
sb.Append(tt[i].Name);
|
||||
if (i < tt.Length - 1) sb.Append(", ");
|
||||
}
|
||||
sb.Append(GenericTypesEndBracket);
|
||||
}
|
||||
sb.Append('(');
|
||||
ParameterInfo[] pis = mi.GetParameters();
|
||||
for (int i = 0; i < pis.Length; i++)
|
||||
{
|
||||
if (pis[i].ParameterType.IsByRef)
|
||||
sb.Append("var ");
|
||||
else if (IsParams(pis[i]))
|
||||
sb.Append("params ");
|
||||
sb.Append(prepare_member_name(pis[i].Name));
|
||||
sb.Append(": ");
|
||||
string inst_type = null;
|
||||
if (!pis[i].ParameterType.IsByRef)
|
||||
{
|
||||
sb.Append(GetFullTypeName(pis[i].ParameterType));
|
||||
if (pis[i].IsOptional)
|
||||
{
|
||||
sb.Append(" := ");
|
||||
if (pis[i].DefaultValue != null)
|
||||
{
|
||||
if (pis[i].DefaultValue is string) sb.Append($"'{pis[i].DefaultValue.ToString()}'");
|
||||
else sb.Append(pis[i].DefaultValue.ToString());
|
||||
}
|
||||
else sb.Append("nil");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Type t = pis[i].ParameterType.GetElementType();
|
||||
sb.Append(GetFullTypeName(t));
|
||||
}
|
||||
|
||||
if (i < pis.Length - 1)
|
||||
sb.Append(ParameterDelimiter + " ");
|
||||
}
|
||||
sb.Append(')');
|
||||
string ret_inst_type = null;
|
||||
if (mi.ReturnType != typeof(void))
|
||||
{
|
||||
sb.Append(ReturnTypeDelimiter + " " + GetFullTypeName(mi.ReturnType));
|
||||
}
|
||||
//if (scope.CompiledMethod.IsStatic) sb.Append("; static");
|
||||
if (mi.IsVirtual && !mi.IsFinal) sb.Append("; ");
|
||||
else if (mi.IsAbstract) sb.Append("; abstract");
|
||||
//else if (scope.CompiledMethod.IsHideBySig) sb.Append("; reintroduce");
|
||||
sb.Append(';');
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
protected string prepare_member_name(string s)
|
||||
{
|
||||
if (IsKeyword(s))
|
||||
return "&" + s;
|
||||
return s;
|
||||
}
|
||||
|
||||
// TODO: Адаптировать к многоязычности EVA
|
||||
protected string GetSimpleDescriptionForCompiledType(ICompiledTypeScope scope, bool fullName)
|
||||
{
|
||||
if (scope.CompiledType.Name != null && scope.CompiledType.Name.Contains("Func`"))
|
||||
{
|
||||
return getLambdaRepresentation(scope, true);
|
||||
}
|
||||
else if (scope.CompiledType.Name != null && scope.CompiledType.Name.Contains("Action`"))
|
||||
{
|
||||
return getLambdaRepresentation(scope, false);
|
||||
}
|
||||
else if (scope.CompiledType.Name != null && scope.CompiledType.Name.Contains("Predicate`1"))
|
||||
{
|
||||
return getLambdaRepresentation(scope, false);
|
||||
}
|
||||
else if (scope.CompiledType.Name == "IEnumerable`1")
|
||||
{
|
||||
ITypeScope[] instances = scope.GenericInstances;
|
||||
if (instances != null && instances.Length > 0)
|
||||
{
|
||||
return "sequence of " + GetSimpleDescriptionWithoutNamespace(instances[0]);
|
||||
}
|
||||
else
|
||||
return "sequence of T";
|
||||
}
|
||||
else if (scope.CompiledType.Name != null && scope.CompiledType.Name.Contains("Tuple`"))
|
||||
{
|
||||
ITypeScope[] instances = scope.GenericInstances;
|
||||
if (instances != null && instances.Length > 0)
|
||||
{
|
||||
return get_tuple_string(instances);
|
||||
}
|
||||
else
|
||||
return "(T1,...)";
|
||||
}
|
||||
else
|
||||
{
|
||||
string s = !fullName ? GetShortTypeName(scope.CompiledType) : GetFullTypeName(scope.CompiledType);
|
||||
ITypeScope[] instances = scope.GenericInstances;
|
||||
if (instances != null && instances.Length > 0)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
int ind = s.IndexOf(GenericTypesStartBracket);
|
||||
if (ind != -1) sb.Append(s.Substring(0, ind));
|
||||
else
|
||||
sb.Append(s);
|
||||
sb.Append(GenericTypesStartBracket);
|
||||
for (int i = 0; i < instances.Length; i++)
|
||||
{
|
||||
sb.Append(GetSimpleDescriptionWithoutNamespace(instances[i]));
|
||||
if (i < instances.Length - 1) sb.Append(", ");
|
||||
}
|
||||
sb.Append(GenericTypesEndBracket);
|
||||
s = sb.ToString();
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
protected string GetSimpleDescriptionForCompiledType(ICompiledTypeScope scope)
|
||||
{
|
||||
return GetSimpleDescriptionForCompiledType(scope, false);
|
||||
}
|
||||
|
||||
protected bool IsParams(ParameterInfo _par)
|
||||
{
|
||||
object[] objarr = _par.GetCustomAttributes(typeof(ParamArrayAttribute), true);
|
||||
if ((objarr == null) || (objarr.Length == 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected string GetTopScopeName(IBaseScope sc)
|
||||
{
|
||||
if (sc == null) return "";
|
||||
|
|
|
|||
|
|
@ -131,6 +131,10 @@ namespace Languages.Pascal.Frontend.Data
|
|||
|
||||
public override string ResultVariableName => "Result";
|
||||
|
||||
public override string ProcedureName => "procedure";
|
||||
|
||||
public override string FunctionName => "function";
|
||||
|
||||
public override string GenericTypesStartBracket => "<";
|
||||
|
||||
public override string GenericTypesEndBracket => ">";
|
||||
|
|
@ -1007,69 +1011,6 @@ namespace Languages.Pascal.Frontend.Data
|
|||
return s;
|
||||
}
|
||||
|
||||
protected string GetSimpleDescriptionForCompiledType(ICompiledTypeScope scope, bool fullName)
|
||||
{
|
||||
if (scope.CompiledType.Name != null && scope.CompiledType.Name.Contains("Func`"))
|
||||
{
|
||||
return getLambdaRepresentation(scope, true);
|
||||
}
|
||||
else if (scope.CompiledType.Name != null && scope.CompiledType.Name.Contains("Action`"))
|
||||
{
|
||||
return getLambdaRepresentation(scope, false);
|
||||
}
|
||||
else if (scope.CompiledType.Name != null && scope.CompiledType.Name.Contains("Predicate`1"))
|
||||
{
|
||||
return getLambdaRepresentation(scope, false);
|
||||
}
|
||||
else if (scope.CompiledType.Name == "IEnumerable`1")
|
||||
{
|
||||
ITypeScope[] instances = scope.GenericInstances;
|
||||
if (instances != null && instances.Length > 0)
|
||||
{
|
||||
return "sequence of " + GetSimpleDescriptionWithoutNamespace(instances[0]);
|
||||
}
|
||||
else
|
||||
return "sequence of T";
|
||||
}
|
||||
else if (scope.CompiledType.Name != null && scope.CompiledType.Name.Contains("Tuple`"))
|
||||
{
|
||||
ITypeScope[] instances = scope.GenericInstances;
|
||||
if (instances != null && instances.Length > 0)
|
||||
{
|
||||
return get_tuple_string(instances);
|
||||
}
|
||||
else
|
||||
return "(T1,...)";
|
||||
}
|
||||
else
|
||||
{
|
||||
string s = !fullName ? GetShortTypeName(scope.CompiledType) : GetFullTypeName(scope.CompiledType);
|
||||
ITypeScope[] instances = scope.GenericInstances;
|
||||
if (instances != null && instances.Length > 0)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
int ind = s.IndexOf(GenericTypesStartBracket);
|
||||
if (ind != -1) sb.Append(s.Substring(0, ind));
|
||||
else
|
||||
sb.Append(s);
|
||||
sb.Append(GenericTypesStartBracket);
|
||||
for (int i = 0; i < instances.Length; i++)
|
||||
{
|
||||
sb.Append(GetSimpleDescriptionWithoutNamespace(instances[i]));
|
||||
if (i < instances.Length - 1) sb.Append(", ");
|
||||
}
|
||||
sb.Append(GenericTypesEndBracket);
|
||||
s = sb.ToString();
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
protected string GetSimpleDescriptionForCompiledType(ICompiledTypeScope scope)
|
||||
{
|
||||
return GetSimpleDescriptionForCompiledType(scope, false);
|
||||
}
|
||||
|
||||
protected string GetDescriptionForArray(IArrayScope scope)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
|
@ -1376,289 +1317,6 @@ namespace Languages.Pascal.Frontend.Data
|
|||
return sb.ToString();
|
||||
}
|
||||
|
||||
private bool is_params(ParameterInfo _par)
|
||||
{
|
||||
object[] objarr = _par.GetCustomAttributes(typeof(ParamArrayAttribute), true);
|
||||
if ((objarr == null) || (objarr.Length == 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public string GetDescriptionForCompiledMethod(MethodInfo mi)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
|
||||
if (mi.IsPublic)
|
||||
sb.Append("public ");
|
||||
else if (mi.IsFamily)
|
||||
sb.Append("protected ");
|
||||
if (mi.IsStatic) sb.Append("static ");
|
||||
if (mi.ReturnType == typeof(void))
|
||||
sb.Append("procedure ");
|
||||
else
|
||||
sb.Append("function ");
|
||||
sb.Append(prepare_member_name(mi.Name));
|
||||
if (mi.GetGenericArguments().Length > 0)
|
||||
{
|
||||
Type[] tt = mi.GetGenericArguments();
|
||||
sb.Append(GenericTypesStartBracket);
|
||||
for (int i = 0; i < tt.Length; i++)
|
||||
{
|
||||
sb.Append(tt[i].Name);
|
||||
if (i < tt.Length - 1) sb.Append(", ");
|
||||
}
|
||||
sb.Append(GenericTypesEndBracket);
|
||||
}
|
||||
sb.Append('(');
|
||||
ParameterInfo[] pis = mi.GetParameters();
|
||||
for (int i = 0; i < pis.Length; i++)
|
||||
{
|
||||
if (pis[i].ParameterType.IsByRef)
|
||||
sb.Append("var ");
|
||||
else if (is_params(pis[i]))
|
||||
sb.Append("params ");
|
||||
sb.Append(prepare_member_name(pis[i].Name));
|
||||
sb.Append(": ");
|
||||
string inst_type = null;
|
||||
if (!pis[i].ParameterType.IsByRef)
|
||||
{
|
||||
sb.Append(GetFullTypeName(pis[i].ParameterType));
|
||||
if (pis[i].IsOptional)
|
||||
{
|
||||
sb.Append(" := ");
|
||||
if (pis[i].DefaultValue != null)
|
||||
{
|
||||
if (pis[i].DefaultValue is string) sb.Append($"'{pis[i].DefaultValue.ToString()}'");
|
||||
else sb.Append(pis[i].DefaultValue.ToString());
|
||||
}
|
||||
else sb.Append("nil");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Type t = pis[i].ParameterType.GetElementType();
|
||||
sb.Append(GetFullTypeName(t));
|
||||
}
|
||||
|
||||
if (i < pis.Length - 1)
|
||||
sb.Append("; ");
|
||||
}
|
||||
sb.Append(')');
|
||||
string ret_inst_type = null;
|
||||
if (mi.ReturnType != typeof(void))
|
||||
{
|
||||
sb.Append(ReturnTypeDelimiter + " " + GetFullTypeName(mi.ReturnType));
|
||||
}
|
||||
//if (scope.CompiledMethod.IsStatic) sb.Append("; static");
|
||||
if (mi.IsVirtual && !mi.IsFinal) sb.Append("; ");
|
||||
else if (mi.IsAbstract) sb.Append("; abstract");
|
||||
//else if (scope.CompiledMethod.IsHideBySig) sb.Append("; reintroduce");
|
||||
sb.Append(';');
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
protected string GetDescriptionForCompiledMethod(ICompiledMethodScope scope)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
string extensionType = null;
|
||||
if (scope.IsExtension && scope.Parameters.Length > 0)
|
||||
{
|
||||
extensionType = GetSimpleDescription(scope.Parameters[0].Type);
|
||||
}
|
||||
if (scope.IsExtension)
|
||||
{
|
||||
if (extensionType.IndexOf(' ') != -1)
|
||||
{
|
||||
sb.Append("(" + PascalABCCompiler.StringResources.Get("CODE_COMPLETION_EXTENSION") + " " + extensionType + ") ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append("(" + PascalABCCompiler.StringResources.Get("CODE_COMPLETION_EXTENSION") + ") ");
|
||||
extensionType = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (scope.IsStatic && !scope.IsGlobal) sb.Append("static ");
|
||||
if (scope.ReturnType == null)
|
||||
sb.Append("procedure ");
|
||||
else
|
||||
sb.Append("function ");
|
||||
Dictionary<string, string> generic_param_args = null;
|
||||
Dictionary<string, int> class_generic_table = new Dictionary<string, int>();
|
||||
ParameterInfo[] pis = scope.CompiledMethod.GetParameters();
|
||||
Type[] tt = scope.CompiledMethod.GetGenericArguments();
|
||||
int gen_ind = 0;
|
||||
if (!scope.IsExtension)
|
||||
{
|
||||
sb.Append(GetShortTypeName(scope.CompiledMethod.DeclaringType));
|
||||
int ind = 0;
|
||||
foreach (Type gen_arg in scope.CompiledMethod.DeclaringType.GetGenericArguments())
|
||||
{
|
||||
if (gen_arg.IsGenericParameter)
|
||||
{
|
||||
if (generic_param_args == null)
|
||||
generic_param_args = new Dictionary<string, string>();
|
||||
if (scope.GenericArgs != null && scope.GenericArgs.Count > ind)
|
||||
generic_param_args.Add(gen_arg.Name, scope.GenericArgs[ind]);
|
||||
else if (scope.DeclaringType.TemplateArguments != null && scope.DeclaringType.TemplateArguments.Length > ind)
|
||||
generic_param_args.Add(gen_arg.Name, scope.DeclaringType.TemplateArguments[ind]);
|
||||
}
|
||||
ind++;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
gen_ind = 0;
|
||||
generic_param_args = new Dictionary<string, string>();
|
||||
for (int i = 0; i < pis.Length; i++)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
Type[] class_generic_args = pis[i].ParameterType.GetGenericArguments();
|
||||
for (int j = 0; j < class_generic_args.Length; j++)
|
||||
{
|
||||
if (!class_generic_table.ContainsKey(class_generic_args[i].Name))
|
||||
class_generic_table.Add(class_generic_args[i].Name, j);
|
||||
if (scope.GenericArgs != null && scope.GenericArgs.Count > j)
|
||||
{
|
||||
if (scope.DeclaringType.GenericInstances.Length > 0)
|
||||
generic_param_args[class_generic_args[i].Name] = GetSimpleDescription(scope.DeclaringType.GenericInstances[0]);
|
||||
else if (scope.DeclaringType is ICompiledTypeScope)
|
||||
{
|
||||
Type ctn = (scope.DeclaringType as ICompiledTypeScope).CompiledType;
|
||||
if (ctn.IsGenericType && !ctn.IsGenericTypeDefinition)
|
||||
generic_param_args[class_generic_args[i].Name] = GetSimpleDescriptionForCompiledType((scope.DeclaringType as ICompiledTypeScope).GetCompiledGenericArguments()[0]);
|
||||
}
|
||||
}
|
||||
else if (scope.DeclaringType.TemplateArguments != null && scope.DeclaringType.TemplateArguments.Length > j)
|
||||
generic_param_args[class_generic_args[i].Name] = scope.DeclaringType.TemplateArguments[j];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (extensionType == null)
|
||||
sb.Append(GetShortTypeName(scope.CompiledMethod.GetParameters()[0].ParameterType));
|
||||
}
|
||||
//if (scope.Name != "Invoke")
|
||||
{
|
||||
if (extensionType == null)
|
||||
sb.Append(".");
|
||||
sb.Append(scope.Name);
|
||||
}
|
||||
|
||||
if (scope.CompiledMethod.GetGenericArguments().Length > 0)
|
||||
{
|
||||
sb.Append(GenericTypesStartBracket);
|
||||
for (int i = gen_ind; i < tt.Length; i++)
|
||||
{
|
||||
if (class_generic_table.ContainsKey(tt[i].Name))
|
||||
{
|
||||
int ind = class_generic_table[tt[i].Name];
|
||||
if (scope.GenericArgs != null && scope.GenericArgs.Count > ind)
|
||||
{
|
||||
if (scope.DeclaringType.GenericInstances.Length > ind)
|
||||
{
|
||||
sb.Append(GetSimpleDescription(scope.DeclaringType.GenericInstances[ind]));
|
||||
if (!generic_param_args.ContainsKey(tt[i].Name))
|
||||
generic_param_args.Add(tt[i].Name, GetSimpleDescription(scope.DeclaringType.GenericInstances[ind]));
|
||||
}
|
||||
else if (scope.DeclaringType is ICompiledTypeScope)
|
||||
{
|
||||
Type ctn = (scope.DeclaringType as ICompiledTypeScope).CompiledType;
|
||||
if (ctn.IsGenericType && !ctn.IsGenericTypeDefinition)
|
||||
{
|
||||
sb.Append(GetSimpleDescription((scope.DeclaringType as ICompiledTypeScope).GetCompiledGenericArguments()[ind]));
|
||||
if (!generic_param_args.ContainsKey(tt[i].Name))
|
||||
generic_param_args.Add(tt[i].Name, GetSimpleDescription((scope.DeclaringType as ICompiledTypeScope).GetCompiledGenericArguments()[ind]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
sb.Append(tt[i].Name);
|
||||
if (i < tt.Length - 1) sb.Append(", ");
|
||||
}
|
||||
sb.Append(GenericTypesEndBracket);
|
||||
}
|
||||
sb.Append('(');
|
||||
|
||||
for (int i = 0; i < pis.Length; i++)
|
||||
{
|
||||
if (i == 0 && scope.IsExtension)
|
||||
continue;
|
||||
if (pis[i].ParameterType.IsByRef)
|
||||
sb.Append("var ");
|
||||
else if (is_params(pis[i]))
|
||||
sb.Append("params ");
|
||||
sb.Append(pis[i].Name);
|
||||
sb.Append(": ");
|
||||
string inst_type = null;
|
||||
if (!pis[i].ParameterType.IsByRef)
|
||||
{
|
||||
if (scope.GenericArgs != null)
|
||||
{
|
||||
inst_type = get_type_instance(pis[i].ParameterType, scope.GenericArgs, generic_param_args);
|
||||
}
|
||||
if (inst_type == null)
|
||||
sb.Append(GetShortTypeName(pis[i].ParameterType, false));
|
||||
else
|
||||
sb.Append(inst_type);
|
||||
if (pis[i].IsOptional)
|
||||
{
|
||||
sb.Append(" := ");
|
||||
if (pis[i].DefaultValue != null)
|
||||
{
|
||||
if (pis[i].DefaultValue is string) sb.Append($"'{pis[i].DefaultValue.ToString()}'");
|
||||
else sb.Append(pis[i].DefaultValue.ToString());
|
||||
}
|
||||
else sb.Append("nil");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Type t = pis[i].ParameterType.GetElementType();
|
||||
if (scope.GenericArgs != null)
|
||||
{
|
||||
inst_type = get_type_instance(t, scope.GenericArgs, generic_param_args);
|
||||
}
|
||||
if (inst_type == null)
|
||||
sb.Append(GetShortTypeName(t, false));
|
||||
else
|
||||
sb.Append(inst_type);
|
||||
}
|
||||
if (i < pis.Length - 1)
|
||||
sb.Append("; ");
|
||||
}
|
||||
sb.Append(')');
|
||||
string ret_inst_type = null;
|
||||
if (scope.ReturnType != null)
|
||||
{
|
||||
if (scope.GenericArgs != null)
|
||||
{
|
||||
ret_inst_type = get_type_instance(scope.CompiledMethod.ReturnType, scope.GenericArgs, generic_param_args);
|
||||
}
|
||||
if (ret_inst_type == null)
|
||||
{
|
||||
if (scope.ReturnType is ICompiledTypeScope)
|
||||
sb.Append(ReturnTypeDelimiter + " " + GetFullTypeName((scope.ReturnType as ICompiledTypeScope).CompiledType, false));
|
||||
else
|
||||
sb.Append(ReturnTypeDelimiter + " " + GetSimpleDescription(scope.ReturnType));
|
||||
}
|
||||
else
|
||||
sb.Append(ReturnTypeDelimiter + " " + ret_inst_type);
|
||||
}
|
||||
//if (scope.CompiledMethod.IsStatic) sb.Append("; static");
|
||||
if (scope.IsVirtual) sb.Append("; ");
|
||||
else if (scope.IsAbstract) sb.Append("; abstract");
|
||||
//else if (scope.CompiledMethod.IsHideBySig) sb.Append("; reintroduce");
|
||||
sb.Append(';');
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private string GetDescriptionForNamespace(INamespaceScope scope)
|
||||
{
|
||||
return "namespace " + scope.Name;
|
||||
|
|
@ -1747,13 +1405,6 @@ namespace Languages.Pascal.Frontend.Data
|
|||
return sb.ToString();
|
||||
}
|
||||
|
||||
private string prepare_member_name(string s)
|
||||
{
|
||||
if (IsKeyword(s))
|
||||
return "&" + s;
|
||||
return s;
|
||||
}
|
||||
|
||||
protected string GetDescriptionForCompiledEvent(EventInfo ei)
|
||||
{
|
||||
MethodInfo add_meth = ei.GetAddMethod(true);
|
||||
|
|
@ -1789,7 +1440,7 @@ namespace Languages.Pascal.Frontend.Data
|
|||
{
|
||||
if (pis[i].ParameterType.IsByRef)
|
||||
sb.Append("var ");
|
||||
else if (is_params(pis[i]))
|
||||
else if (IsParams(pis[i]))
|
||||
sb.Append("params ");
|
||||
sb.Append(prepare_member_name(pis[i].Name));
|
||||
sb.Append(": ");
|
||||
|
|
@ -1817,7 +1468,7 @@ namespace Languages.Pascal.Frontend.Data
|
|||
{
|
||||
if (pis[i].ParameterType.IsByRef)
|
||||
sb.Append("var ");
|
||||
else if (is_params(pis[i]))
|
||||
else if (IsParams(pis[i]))
|
||||
sb.Append("params ");
|
||||
sb.Append(pis[i].Name);
|
||||
sb.Append(": ");
|
||||
|
|
@ -1984,7 +1635,7 @@ namespace Languages.Pascal.Frontend.Data
|
|||
{
|
||||
if (pis[i].ParameterType.IsByRef)
|
||||
sb.Append("var ");
|
||||
else if (is_params(pis[i]))
|
||||
else if (IsParams(pis[i]))
|
||||
sb.Append("params ");
|
||||
sb.Append(pis[i].Name);
|
||||
sb.Append(": ");
|
||||
|
|
@ -2046,7 +1697,7 @@ namespace Languages.Pascal.Frontend.Data
|
|||
{
|
||||
if (pis[i].ParameterType.IsByRef)
|
||||
sb.Append("var ");
|
||||
else if (is_params(pis[i]))
|
||||
else if (IsParams(pis[i]))
|
||||
sb.Append("params ");
|
||||
sb.Append(pis[i].Name);
|
||||
sb.Append(": ");
|
||||
|
|
|
|||
|
|
@ -103,6 +103,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StringConstants", "StringCo
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LambdaAnySynToSemConverter", "LambdaAnySynToSemConverter\LambdaAnySynToSemConverter.csproj", "{27D9800E-2689-4AA1-A2D6-128E4A9BAE98}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SemanticAnalyzers", "SemanticAnalyzers", "{AAA3A0F7-2990-4C44-BAC7-0C4BAA053E8A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Parsers", "Parsers", "{E952792F-B9F0-450C-B0D8-3128DF95EF19}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PascalABCSaushkinParser", "Parsers\PascalABCParserNewSaushkin\PascalABCSaushkinParser.csproj", "{0ED020FF-D28E-4791-BBDD-B8B9BA714096}"
|
||||
|
|
@ -111,6 +113,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PascalABCLanguageInfo", "Pa
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyntaxTreeConverters", "SyntaxTreeConverters\SyntaxTreeConverters.csproj", "{F10A5330-DCF4-4533-877C-7B1B1BE23884}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SPython", "SPython", "{C12F6C91-460E-4C66-9572-D4D5AB169DF9}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SyntaxTreeConverters", "SyntaxTreeConverters", "{E51C8CE6-9785-4666-9CD2-BADB728933E3}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPythonSyntaxTreeVisitor", "LanguagePlugins\SPython\SemanticAnalyzers\SPythonSyntaxTreeVisitor\SPythonSyntaxTreeVisitor.csproj", "{D38A21E0-1D61-4905-82B3-1800E1991D57}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPythonStandardTreeConverter", "LanguagePlugins\SPython\SyntaxTreeConverters\SPythonStandardTreeConverter\SPythonStandardTreeConverter.csproj", "{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPythonParser", "LanguagePlugins\SPython\SPythonParserKrylovMovchan\SPythonParser.csproj", "{81FE2BAA-D100-4596-A392-F03BBE30F829}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPythonLanguageInfo", "LanguagePlugins\SPython\SPythonLanguageInfo\SPythonLanguageInfo.csproj", "{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -523,6 +537,54 @@ Global
|
|||
{F10A5330-DCF4-4533-877C-7B1B1BE23884}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{F10A5330-DCF4-4533-877C-7B1B1BE23884}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{F10A5330-DCF4-4533-877C-7B1B1BE23884}.Release|x86.Build.0 = Release|Any CPU
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57}.Release|x86.Build.0 = Release|Any CPU
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9}.Release|x86.Build.0 = Release|Any CPU
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829}.Release|x86.Build.0 = Release|Any CPU
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -566,10 +628,17 @@ Global
|
|||
{A48D9069-D569-4110-9252-A10F139B669B} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{E8AEFBF9-0113-4FA4-BE45-6CDA555498B7} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{27D9800E-2689-4AA1-A2D6-128E4A9BAE98} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{AAA3A0F7-2990-4C44-BAC7-0C4BAA053E8A} = {C12F6C91-460E-4C66-9572-D4D5AB169DF9}
|
||||
{E952792F-B9F0-450C-B0D8-3128DF95EF19} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{0ED020FF-D28E-4791-BBDD-B8B9BA714096} = {E952792F-B9F0-450C-B0D8-3128DF95EF19}
|
||||
{BD902586-E0D5-407A-904A-32249B8B709E} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{F10A5330-DCF4-4533-877C-7B1B1BE23884} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{C12F6C91-460E-4C66-9572-D4D5AB169DF9} = {BB6973BA-B3A2-4B31-A986-7CB008F22C4F}
|
||||
{E51C8CE6-9785-4666-9CD2-BADB728933E3} = {C12F6C91-460E-4C66-9572-D4D5AB169DF9}
|
||||
{D38A21E0-1D61-4905-82B3-1800E1991D57} = {AAA3A0F7-2990-4C44-BAC7-0C4BAA053E8A}
|
||||
{431AA1A0-81B9-4D93-9CB1-219BDF7825C9} = {E51C8CE6-9785-4666-9CD2-BADB728933E3}
|
||||
{81FE2BAA-D100-4596-A392-F03BBE30F829} = {C12F6C91-460E-4C66-9572-D4D5AB169DF9}
|
||||
{DFF88E9F-AFB3-4986-84FE-77F8A04CB6F0} = {C12F6C91-460E-4C66-9572-D4D5AB169DF9}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {68E993E6-EE86-4DDF-B0A1-4FE884F8AC39}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LanguageIntegrator", "Langu
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PascalABCLanguageInfo", "PascalABCLanguageInfo\PascalABCLanguageInfo.csproj", "{BD902586-E0D5-407A-904A-32249B8B709E}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LanguagePlugins", "LanguagePlugins", "{36D591C7-65C7-A0D1-1CBC-10CDE441BDC8}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SPython", "SPython", "{D71D6350-AEE9-491F-A99E-9A2D00071020}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SemanticAnalyzers", "SemanticAnalyzers", "{9D2B6297-A896-40D0-BEED-2D28C2DE9A4D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SyntaxTreeConverters", "SyntaxTreeConverters", "{C4104880-9AC0-42F5-9962-D0C3FD143139}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPythonSyntaxTreeVisitor", "LanguagePlugins\SPython\SemanticAnalyzers\SPythonSyntaxTreeVisitor\SPythonSyntaxTreeVisitor.csproj", "{26DB8340-9A8F-16E1-6E6D-D59E97D05142}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPythonLanguageInfo", "LanguagePlugins\SPython\SPythonLanguageInfo\SPythonLanguageInfo.csproj", "{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPythonStandardTreeConverter", "LanguagePlugins\SPython\SyntaxTreeConverters\SPythonStandardTreeConverter\SPythonStandardTreeConverter.csproj", "{6883EC33-B9FD-6D48-B0C3-16F451552C9F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPythonParser", "LanguagePlugins\SPython\SPythonParserKrylovMovchan\SPythonParser.csproj", "{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -329,6 +345,54 @@ Global
|
|||
{BD902586-E0D5-407A-904A-32249B8B709E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{BD902586-E0D5-407A-904A-32249B8B709E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{BD902586-E0D5-407A-904A-32249B8B709E}.Release|x86.Build.0 = Release|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Release|x86.Build.0 = Release|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -360,6 +424,14 @@ Global
|
|||
{E8AEFBF9-0113-4FA4-BE45-6CDA555498B7} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{A48D9069-D569-4110-9252-A10F139B669B} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{BD902586-E0D5-407A-904A-32249B8B709E} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{36D591C7-65C7-A0D1-1CBC-10CDE441BDC8} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{D71D6350-AEE9-491F-A99E-9A2D00071020} = {36D591C7-65C7-A0D1-1CBC-10CDE441BDC8}
|
||||
{9D2B6297-A896-40D0-BEED-2D28C2DE9A4D} = {D71D6350-AEE9-491F-A99E-9A2D00071020}
|
||||
{C4104880-9AC0-42F5-9962-D0C3FD143139} = {D71D6350-AEE9-491F-A99E-9A2D00071020}
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142} = {9D2B6297-A896-40D0-BEED-2D28C2DE9A4D}
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F} = {D71D6350-AEE9-491F-A99E-9A2D00071020}
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F} = {C4104880-9AC0-42F5-9962-D0C3FD143139}
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446} = {D71D6350-AEE9-491F-A99E-9A2D00071020}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {68E993E6-EE86-4DDF-B0A1-4FE884F8AC39}
|
||||
|
|
|
|||
304
bin/Highlighting/SPython.xshd
Normal file
304
bin/Highlighting/SPython.xshd
Normal file
|
|
@ -0,0 +1,304 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<SyntaxDefinition name = "Spython" extensions = ".pys">
|
||||
|
||||
<Properties>
|
||||
<Property name="LineComment" value="#"/>
|
||||
</Properties>
|
||||
|
||||
<Digits name = "Digits" bold = "false" italic = "false" color = "DarkGreen"/>
|
||||
|
||||
<RuleSets>
|
||||
<RuleSet ignorecase="false">
|
||||
|
||||
<Delimiters>&<>~!%^*()-+=|\#/{}[]:;"' , .?</Delimiters>
|
||||
|
||||
<Span name = "LineComment" rule = "CommentMarkerSet" bold = "false" italic = "false" color = "Gray" stopateol = "true">
|
||||
<Begin>#</Begin>
|
||||
</Span>
|
||||
|
||||
<Span name = "MultilineString1" bold = "false" italic = "false" color = "Green" stopateol = "false">
|
||||
<Begin>'''</Begin>
|
||||
<End>'''</End>
|
||||
</Span>
|
||||
|
||||
<Span name = "MultilineString2" bold = "false" italic = "false" color = "Green" stopateol = "false">
|
||||
<Begin>"""</Begin>
|
||||
<End>"""</End>
|
||||
</Span>
|
||||
|
||||
<Span name = "String1" bold = "false" italic = "false" color = "Green" stopateol = "true">
|
||||
<Begin>'</Begin>
|
||||
<End>'</End>
|
||||
</Span>
|
||||
|
||||
<Span name = "String2" bold = "false" italic = "false" color = "Green" stopateol = "true">
|
||||
<Begin>"</Begin>
|
||||
<End>"</End>
|
||||
</Span>
|
||||
|
||||
<KeyWords name = "KeyWords" bold = "true" italic = "false" color = "#ff7700">
|
||||
<Key word = "del" />
|
||||
<Key word = "from" />
|
||||
<Key word = "import" />
|
||||
<Key word = "pass" />
|
||||
<Key word = "return" />
|
||||
<Key word = "with" />
|
||||
<Key word = "yield" />
|
||||
|
||||
<Key word = "python" />
|
||||
<Key word = "nohtyp" />
|
||||
<Key word = "fed" />
|
||||
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "BeginEnd" bold = "true" italic = "false" color = "Black">
|
||||
<Key word = "#begin" />
|
||||
<Key word = "#end" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "Punctuation123" bold = "true" italic = "false" color = "Orange">
|
||||
<Key word = "((" />
|
||||
<Key word = ".Where" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "Punctuation2" bold = "true" italic = "false" color = "Black">
|
||||
<Key word = "," />
|
||||
<Key word = "." />
|
||||
<Key word = ";" />
|
||||
<Key word = "(" />
|
||||
<Key word = ")" />
|
||||
<Key word = "[" />
|
||||
<Key word = "]" />
|
||||
<Key word = "{" />
|
||||
<Key word = "}" />
|
||||
<Key word = "+" />
|
||||
<Key word = "-" />
|
||||
<Key word = "//" />
|
||||
<Key word = "/" />
|
||||
<Key word = "*" />
|
||||
<Key word = "**" />
|
||||
<Key word = ":" />
|
||||
<Key word = "|" />
|
||||
<Key word = "<" />
|
||||
<Key word = ">" />
|
||||
<Key word = "<=" />
|
||||
<Key word = ">=" />
|
||||
<Key word = "^" />
|
||||
<Key word = "^=" />
|
||||
<Key word = "=" />
|
||||
<Key word = "%" />
|
||||
<Key word = "~" />
|
||||
<Key word = "&" />
|
||||
<Key word = "&=" />
|
||||
<Key word = "<<=" />
|
||||
<Key word = ">>=" />
|
||||
<Key word = "+=" />
|
||||
<Key word = "-=" />
|
||||
<Key word = "/=" />
|
||||
<Key word = "//=" />
|
||||
<Key word = "*=" />
|
||||
<Key word = "**=" />
|
||||
<Key word = "|=" />
|
||||
<Key word = "!=" />
|
||||
<Key word = "==" />
|
||||
<Key word = "->" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "OperatorKeywords" bold="true" italic="false" color = "#ff7700">
|
||||
<Key word = "or" />
|
||||
<Key word = "and" />
|
||||
<Key word = "not" />
|
||||
<Key word = "as" />
|
||||
<Key word = "is" />
|
||||
<Key word = "in" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "SelectionStatements" bold="true" italic="false" color = "#ff7700">
|
||||
<Key word = "else" />
|
||||
<Key word = "if" />
|
||||
<Key word = "elif" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "IterationStatements" bold="true" italic="false" color = "#ff7700">
|
||||
<Key word = "while" />
|
||||
<Key word = "for" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "ExceptionHandlingStatements" bold="true" italic="false" color = "#ff7700">
|
||||
<Key word = "except" />
|
||||
<Key word = "finally" />
|
||||
<Key word = "try" />
|
||||
<Key word = "assert" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "RaiseStatement" bold="true" italic="false" color = "#ff7700">
|
||||
<Key word = "raise" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "JumpProcedures" bold="true" italic="false" color = "#ff7700">
|
||||
<Key word = "break" />
|
||||
<Key word = "continue" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "InternalConstant" bold = "false" italic = "false" color = "#ff7700">
|
||||
<Key word = "True" />
|
||||
<Key word = "False" />
|
||||
<Key word = "None" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "Builtins" bold="false" italic="false" color = "#900090"> <!--python original is color="#900090"-->
|
||||
<Key word = "ArithmeticError" />
|
||||
<Key word = "AssertionError" />
|
||||
<Key word = "AttributeError" />
|
||||
<Key word = "BaseException" />
|
||||
<Key word = "BufferError" />
|
||||
<Key word = "BytesWarning" />
|
||||
<Key word = "DeprecationWarning" />
|
||||
<Key word = "EOFError" />
|
||||
<Key word = "Ellipsis" />
|
||||
<Key word = "EnvironmentError" />
|
||||
<Key word = "Exception" />
|
||||
<Key word = "False" />
|
||||
<Key word = "FloatingPointError" />
|
||||
<Key word = "FutureWarning" />
|
||||
<Key word = "GeneratorExit" />
|
||||
<Key word = "IOError" />
|
||||
<Key word = "ImportError" />
|
||||
<Key word = "ImportWarning" />
|
||||
<Key word = "IndentationError" />
|
||||
<Key word = "IndexError" />
|
||||
<Key word = "KeyError" />
|
||||
<Key word = "KeyboardInterrupt" />
|
||||
<Key word = "LookupError" />
|
||||
<Key word = "MemoryError" />
|
||||
<Key word = "NameError" />
|
||||
<Key word = "None" />
|
||||
<Key word = "NotImplemented" />
|
||||
<Key word = "NotImplementedError" />
|
||||
<Key word = "OSError" />
|
||||
<Key word = "OverflowError" />
|
||||
<Key word = "PendingDeprecationWarning" />
|
||||
<Key word = "ReferenceError" />
|
||||
<Key word = "RuntimeError" />
|
||||
<Key word = "RuntimeWarning" />
|
||||
<Key word = "StopIteration" />
|
||||
<Key word = "SyntaxError" />
|
||||
<Key word = "SyntaxWarning" />
|
||||
<Key word = "SystemError" />
|
||||
<Key word = "SystemExit" />
|
||||
<Key word = "TabError" />
|
||||
<Key word = "True" />
|
||||
<Key word = "TypeError" />
|
||||
<Key word = "UnboundLocalError" />
|
||||
<Key word = "UnicodeDecodeError" />
|
||||
<Key word = "UnicodeEncodeError" />
|
||||
<Key word = "UnicodeError" />
|
||||
<Key word = "UnicodeTranslateError" />
|
||||
<Key word = "UnicodeWarning" />
|
||||
<Key word = "UserWarning" />
|
||||
<Key word = "ValueError" />
|
||||
<Key word = "Warning" />
|
||||
<Key word = "WindowsError" />
|
||||
<Key word = "ZeroDivisionError" />
|
||||
<Key word = "abs" />
|
||||
<Key word = "all" />
|
||||
<Key word = "any" />
|
||||
<Key word = "ascii" />
|
||||
<Key word = "bigint" />
|
||||
<Key word = "bin" />
|
||||
<Key word = "bool" />
|
||||
<Key word = "bytearray" />
|
||||
<Key word = "bytes" />
|
||||
<Key word = "chr" />
|
||||
<Key word = "classmethod" />
|
||||
<Key word = "compile" />
|
||||
<Key word = "complex" />
|
||||
<Key word = "copyright" />
|
||||
<Key word = "credits" />
|
||||
<Key word = "delattr" />
|
||||
<Key word = "dict" />
|
||||
<Key word = "dir" />
|
||||
<Key word = "divmod" />
|
||||
<Key word = "enumerate" />
|
||||
<Key word = "eval" />
|
||||
<Key word = "exec" />
|
||||
<Key word = "exit" />
|
||||
<Key word = "filter" />
|
||||
<Key word = "float" />
|
||||
<Key word = "format" />
|
||||
<Key word = "frozenset" />
|
||||
<Key word = "getattr" />
|
||||
<Key word = "globals" />
|
||||
<Key word = "hasattr" />
|
||||
<Key word = "hash" />
|
||||
<Key word = "help" />
|
||||
<Key word = "hex" />
|
||||
<Key word = "id" />
|
||||
<Key word = "input" />
|
||||
<Key word = "int" />
|
||||
<Key word = "isinstance" />
|
||||
<Key word = "issubclass" />
|
||||
<Key word = "iter" />
|
||||
<Key word = "len" />
|
||||
<Key word = "license" />
|
||||
<Key word = "list" />
|
||||
<Key word = "locals" />
|
||||
<Key word = "map" />
|
||||
<Key word = "max" />
|
||||
<Key word = "memoryview" />
|
||||
<Key word = "min" />
|
||||
<Key word = "next" />
|
||||
<Key word = "object" />
|
||||
<Key word = "oct" />
|
||||
<Key word = "open" />
|
||||
<Key word = "ord" />
|
||||
<Key word = "pow" />
|
||||
<Key word = "print" />
|
||||
<Key word = "property" />
|
||||
<Key word = "quit" />
|
||||
<Key word = "range" />
|
||||
<Key word = "repr" />
|
||||
<Key word = "reversed" />
|
||||
<Key word = "round" />
|
||||
<Key word = "set" />
|
||||
<Key word = "setattr" />
|
||||
<Key word = "slice" />
|
||||
<Key word = "sorted" />
|
||||
<Key word = "staticmethod" />
|
||||
<Key word = "str" />
|
||||
<Key word = "sum" />
|
||||
<Key word = "super" />
|
||||
<Key word = "tuple" />
|
||||
<Key word = "type" />
|
||||
<Key word = "vars" />
|
||||
<Key word = "zip" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "ReferenceTypes" bold="true" italic="false" color = "#ff7700">
|
||||
<Key word = "class" />
|
||||
<Key word = "lambda" />
|
||||
<Key word = "def" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "Modifiers" bold="true" italic="false" color="#ff7700">
|
||||
<Key word = "global" />
|
||||
<Key word = "nonlocal" />
|
||||
</KeyWords>
|
||||
|
||||
</RuleSet>
|
||||
|
||||
<RuleSet name = "CommentMarkerSet" ignorecase = "true">
|
||||
<Delimiters><>~!@%^*()-+=|\#/{}[]:;"' , .?</Delimiters>
|
||||
<KeyWords name = "ErrorWords" bold="true" italic="false" color="Red">
|
||||
<Key word = "TODO" />
|
||||
<Key word = "FIXME" />
|
||||
</KeyWords>
|
||||
<KeyWords name = "WarningWords" bold="true" italic="false" color="#EEE0E000">
|
||||
<Key word = "HACK" />
|
||||
<Key word = "UNDONE" />
|
||||
</KeyWords>
|
||||
</RuleSet>
|
||||
|
||||
</RuleSets>
|
||||
</SyntaxDefinition>
|
||||
25
bin/Lib/SPythonHidden.pas
Normal file
25
bin/Lib/SPythonHidden.pas
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{$HiddenIdents}
|
||||
unit SPythonHidden;
|
||||
|
||||
interface
|
||||
|
||||
// uses PABCSystem;
|
||||
|
||||
function !Floor(x : real) : integer;
|
||||
|
||||
function !FloorDiv(x: real; y: real): integer;
|
||||
|
||||
function !FloorMod(x: real; y: real): real;
|
||||
|
||||
type !UnknownType = class
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
function !Floor(x : real) : integer := PABCSystem.Floor(x);
|
||||
|
||||
function !FloorDiv(x: real; y: real): integer := PABCSystem.Floor(x / y);
|
||||
|
||||
function !FloorMod(x: real; y: real): real := x - PABCSystem.Floor(x / y) * y;
|
||||
|
||||
end.
|
||||
561
bin/Lib/SPythonSystem.pas
Normal file
561
bin/Lib/SPythonSystem.pas
Normal file
|
|
@ -0,0 +1,561 @@
|
|||
{$HiddenIdents}
|
||||
unit SPythonSystem;
|
||||
|
||||
{$reference '%GAC%\System.dll'}
|
||||
{$reference '%GAC%\mscorlib.dll'}
|
||||
{$reference '%GAC%\System.Core.dll'}
|
||||
{$reference '%GAC%\System.Numerics.dll'}
|
||||
|
||||
interface
|
||||
|
||||
// uses PABCSystem;
|
||||
|
||||
// Basic IO methods
|
||||
|
||||
function input(): string;
|
||||
|
||||
function input(s: string): string;
|
||||
|
||||
type kwargs_gen<T> = class
|
||||
public !kwargs: Dictionary<string, T>
|
||||
:= new Dictionary<string, T>();
|
||||
|
||||
constructor Create(
|
||||
keys: array of string;
|
||||
params values: array of T
|
||||
);
|
||||
begin
|
||||
for var i := 0 to keys.count() - 1 do
|
||||
!kwargs[keys[i]] := values[i];
|
||||
end;
|
||||
|
||||
constructor Create(
|
||||
keys: array of char;
|
||||
params values: array of T
|
||||
);
|
||||
begin
|
||||
for var i := 0 to keys.count() - 1 do
|
||||
!kwargs[keys[i]] := values[i];
|
||||
end;
|
||||
|
||||
constructor Create(); begin end;
|
||||
end;
|
||||
|
||||
function all(s: sequence of boolean): boolean;
|
||||
function any(s: sequence of boolean): boolean;
|
||||
|
||||
function __NewSetCreatorInternal<T>(params a: array of T): NewSet<T>;
|
||||
|
||||
procedure clear<T>(var st: set of T);
|
||||
|
||||
function int(val: string): integer;
|
||||
|
||||
function int(val: real): integer;
|
||||
|
||||
function round(val: real): integer;
|
||||
|
||||
function split(s: string): sequence of string;
|
||||
|
||||
function get_keys<K, V>(dct: Dictionary<K, V>): sequence of K;
|
||||
function get_values<K, V>(dct: Dictionary<K, V>): sequence of V;
|
||||
|
||||
function &type(obj: object): string;
|
||||
|
||||
//function int(val: string): integer;
|
||||
function int(b: boolean): integer;
|
||||
|
||||
function str(val: object): string;
|
||||
|
||||
function float(val: string): real;
|
||||
|
||||
function float(x: integer): real;
|
||||
|
||||
// Basic sequence functions
|
||||
|
||||
function range(s: integer; e: integer; step: integer): sequence of integer;
|
||||
|
||||
function range(e: integer): sequence of integer;
|
||||
|
||||
function range(s: integer; e: integer): sequence of integer;
|
||||
|
||||
function !format(obj: object; fmt: string): string;
|
||||
|
||||
function !format(i: integer; fmt: string): string;
|
||||
|
||||
function !format(val: real; fmt: string): string;
|
||||
|
||||
//function all<T>(seq: sequence of T): boolean;
|
||||
|
||||
//function any<T>(seq: sequence of T): boolean;
|
||||
|
||||
// Standard Math functions
|
||||
|
||||
function abs(x: integer): integer;
|
||||
|
||||
function abs(x: real): real;
|
||||
|
||||
// function floor(x: real): real;
|
||||
|
||||
//Standard functions with Lists
|
||||
|
||||
function len<T>(lst: PABCSystem.List<T>): integer;
|
||||
function len<T>(st: set of T): integer;
|
||||
function len<K, V>(dct: PABCSystem.Dictionary<K, V>): integer;
|
||||
function len<T>(arr: array of T): integer;
|
||||
function len(s: string): integer;
|
||||
|
||||
function &set<T>(sq: sequence of T): set of T;
|
||||
function &list<T>(sq: sequence of T): PABCSystem.List<T>;
|
||||
|
||||
function sorted<T>(lst: PABCSystem.List<T>): PABCSystem.List<T>;
|
||||
|
||||
function sum(lst: sequence of integer): integer;
|
||||
|
||||
function sum(lst: sequence of real): real;
|
||||
|
||||
function !assign<T>(var a: T; b: T): T;
|
||||
|
||||
function !pow(x, n: integer): integer;
|
||||
|
||||
function !pow(x, n: biginteger): biginteger;
|
||||
|
||||
function !pow(x: integer; y: real): real;
|
||||
|
||||
function !pow(x: real; y: real): real;
|
||||
|
||||
function bigint(x: integer): biginteger;
|
||||
|
||||
function !pow_recursion(x, n: integer): integer;
|
||||
|
||||
function !pow_recursion(x, n: biginteger): biginteger;
|
||||
|
||||
// TUPLES BEGIN
|
||||
function CreateTuple<T1, T2>(
|
||||
v1: T1; v2: T2
|
||||
): System.Tuple<T1, T2>;
|
||||
|
||||
function CreateTuple<T1, T2, T3>(
|
||||
v1: T1; v2: T2; v3: T3
|
||||
): System.Tuple<T1, T2, T3>;
|
||||
|
||||
function CreateTuple<T1, T2, T3, T4>(
|
||||
v1: T1; v2: T2; v3: T3; v4: T4
|
||||
): System.Tuple<T1, T2, T3, T4>;
|
||||
|
||||
function CreateTuple<T1, T2, T3, T4, T5>(
|
||||
v1: T1; v2: T2; v3: T3; v4: T4; v5: T5
|
||||
): System.Tuple<T1, T2, T3, T4, T5>;
|
||||
|
||||
function CreateTuple<T1, T2, T3, T4, T5, T6>(
|
||||
v1: T1; v2: T2; v3: T3; v4: T4; v5: T5; v6: T6
|
||||
): System.Tuple<T1, T2, T3, T4, T5, T6>;
|
||||
|
||||
function CreateTuple<T1, T2, T3, T4, T5, T6, T7>(
|
||||
v1: T1; v2: T2; v3: T3; v4: T4; v5: T5; v6: T6; v7: T7
|
||||
): System.Tuple<T1, T2, T3, T4, T5, T6, T7>;
|
||||
|
||||
// TUPLES END
|
||||
|
||||
function Dict<TKey, TVal>(params pairs: array of (TKey, TVal)): Dictionary<TKey, TVal>;
|
||||
|
||||
type
|
||||
biginteger = PABCSystem.BigInteger;
|
||||
!list<T> = PABCSystem.List<T>;
|
||||
!dict<K, V> = PABCSystem.Dictionary<K, V>;
|
||||
!set<T> = set of T;
|
||||
tuple2<T1, T2> = System.Tuple<T1, T2>;
|
||||
tuple3<T1, T2, T3> = System.Tuple<T1, T2, T3>;
|
||||
tuple4<T1, T2, T3, T4> = System.Tuple<T1, T2, T3, T4>;
|
||||
tuple5<T1, T2, T3, T4, T5> = System.Tuple<T1, T2, T3, T4, T5>;
|
||||
tuple6<T1, T2, T3, T4, T5, T6> = System.Tuple<T1, T2, T3, T4, T5, T6>;
|
||||
tuple7<T1, T2, T3, T4, T5, T6, T7> = System.Tuple<T1, T2, T3, T4, T5, T6, T7>;
|
||||
|
||||
empty_list = class
|
||||
class function operator implicit<T>(x: empty_list): !list<T>;
|
||||
begin
|
||||
Result := new !list<T>();
|
||||
end;
|
||||
end;
|
||||
|
||||
empty_set = class
|
||||
class function operator implicit<T>(x: empty_set): !set<T>;
|
||||
begin
|
||||
Result := new !set<T>;
|
||||
end;
|
||||
end;
|
||||
|
||||
empty_dict = class
|
||||
class function operator implicit<K, V>(x: empty_dict): !dict<K, V>;
|
||||
begin
|
||||
Result := new !dict<K, V>();
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function !empty_list(): empty_list;
|
||||
function !empty_dict(): empty_dict;
|
||||
function &set(): empty_set;
|
||||
|
||||
implementation
|
||||
|
||||
function input(): string;
|
||||
begin
|
||||
PABCSystem.Print();
|
||||
Result := PABCSystem.ReadlnString();
|
||||
end;
|
||||
|
||||
function input(s: string): string;
|
||||
begin
|
||||
PABCSystem.Print(s);
|
||||
Result := PABCSystem.ReadlnString();
|
||||
end;
|
||||
|
||||
function int(val: string): integer := integer.Parse(val);
|
||||
|
||||
function int(val: real): integer := round(val);
|
||||
|
||||
function int(b: boolean): integer;
|
||||
begin
|
||||
if b then
|
||||
Result := 1
|
||||
else
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function &type(obj: object): string;
|
||||
begin
|
||||
Result := TypeName(obj)
|
||||
.Replace('<', '[')
|
||||
.Replace('>', ']')
|
||||
.Replace('List', 'list')
|
||||
.Replace('Tuple', 'tuple')
|
||||
.Replace('Dictionary', 'dict')
|
||||
.Replace('empty_list', 'list[anytype]')
|
||||
.Replace('empty_set', 'set[anytype]')
|
||||
.Replace('empty_dict', 'dict[anytype]')
|
||||
.Replace('integer', 'int')
|
||||
.Replace('string', 'str')
|
||||
.Replace('real', 'float')
|
||||
.Replace('boolean', 'bool')
|
||||
.Replace('System.Numerics.BigInteger', 'bigint');
|
||||
end;
|
||||
|
||||
function int(obj: object): integer := Convert.ToInt32(obj);
|
||||
|
||||
function str(val: object): string := val.ToString();
|
||||
|
||||
function float(val: string): real := real.Parse(val);
|
||||
|
||||
function float(x: integer): real := PABCSystem.Floor(x);
|
||||
|
||||
function range(s: integer; e: integer; step: integer): sequence of integer;
|
||||
begin
|
||||
Result := PABCSystem.Range(s, e - 1, step);
|
||||
end;
|
||||
|
||||
function range(s: integer; e: integer): sequence of integer;
|
||||
begin
|
||||
Result := PABCSystem.Range(s, e - 1);
|
||||
end;
|
||||
|
||||
function range(e: integer): sequence of integer;
|
||||
begin
|
||||
Result := PABCSystem.Range(0, e - 1);
|
||||
end;
|
||||
|
||||
//function all<T>(seq: sequence of T): boolean := seq.All(x -> x);
|
||||
|
||||
//function any<T>(seq: sequence of T): boolean := seq.Any(x -> x);
|
||||
|
||||
function abs(x: integer): integer := if x >= 0 then x else -x;
|
||||
|
||||
function abs(x: real): real := PABCSystem.Abs(x);
|
||||
|
||||
function len<T>(lst: PABCSystem.List<T>): integer := lst.Count();
|
||||
function len<T>(st: set of T): integer := st.Count();
|
||||
function len<K, V>(dct: PABCSystem.Dictionary<K, V>): integer := dct.Count();
|
||||
function len<T>(arr: array of T): integer := arr.Count();
|
||||
function len(s: string): integer := s.Length;
|
||||
|
||||
function sorted<T>(lst: PABCSystem.List<T>): PABCSystem.List<T>;
|
||||
begin
|
||||
var new_list := new PABCSystem.List<T>(lst);
|
||||
new_list.sort();
|
||||
Result := new_list;
|
||||
end;
|
||||
|
||||
function sum(lst: sequence of integer): integer := lst.sum();
|
||||
function sum(lst: sequence of real): real := lst.sum();
|
||||
|
||||
function !assign<T>(var a: T; b: T): T;
|
||||
begin
|
||||
a := b;
|
||||
Result := a;
|
||||
end;
|
||||
|
||||
function !pow(x, n: biginteger): biginteger;
|
||||
begin
|
||||
if (n < 0) then
|
||||
raise new System.ArgumentException('возведение в степень не работает для целой отрицательной степени типа bigint.');
|
||||
Result := !pow_recursion(x, n);
|
||||
end;
|
||||
|
||||
function !pow_recursion(x, n: biginteger): biginteger;
|
||||
begin
|
||||
|
||||
if (n = 0) then
|
||||
Result := 1
|
||||
else begin
|
||||
Result := !pow_recursion(x, n div 2);
|
||||
Result *= Result;
|
||||
if ((n mod 2) = 1) then
|
||||
Result *= x;
|
||||
end;
|
||||
end;
|
||||
|
||||
function !pow(x, n: integer): integer;
|
||||
begin
|
||||
if (n < 0) then
|
||||
raise new System.ArgumentException('возведение в степень не работает для целой отрицательной степени, используйте привидение к типу с плавающей точкой.');
|
||||
Result := !pow_recursion(x, n);
|
||||
end;
|
||||
|
||||
function !pow(x: integer; y: real): real := Power(x, y);
|
||||
|
||||
function !pow(x: real; y: real): real := Power(x, y);
|
||||
|
||||
function !pow_recursion(x, n: integer): integer;
|
||||
begin
|
||||
|
||||
if (n = 0) then
|
||||
Result := 1
|
||||
else begin
|
||||
Result := !pow_recursion(x, n div 2);
|
||||
Result *= Result;
|
||||
if ((n mod 2) = 1) then
|
||||
Result *= x;
|
||||
end;
|
||||
end;
|
||||
|
||||
function bigint(x: integer): biginteger;
|
||||
begin
|
||||
Result := x;
|
||||
end;
|
||||
|
||||
function !count<T>(Self: PABCSystem.List<T>; val: T): integer; extensionmethod;
|
||||
begin
|
||||
Result := 0;
|
||||
for var i := 0 to Self.Count - 1 do
|
||||
if val = Self[i] then
|
||||
Result += 1;
|
||||
end;
|
||||
|
||||
function pop<T>(Self: PABCSystem.List<T>; ind: integer): T; extensionmethod;
|
||||
begin
|
||||
Result := Self[ind];
|
||||
Self.RemoveAt(ind);
|
||||
end;
|
||||
|
||||
procedure add<T>(Self: set of T; val: T); extensionmethod;
|
||||
begin
|
||||
Self += val;
|
||||
end;
|
||||
|
||||
procedure remove<T>(Self: set of T; val: T); extensionmethod;
|
||||
begin
|
||||
Self -= val;
|
||||
end;
|
||||
|
||||
function get_keys<K, V>(dct: Dictionary<K, V>):= dct.keys;
|
||||
function get_values<K, V>(dct: Dictionary<K, V>):= dct.values;
|
||||
|
||||
function copy<T>(Self: set of T): set of T; extensionmethod;
|
||||
begin
|
||||
Result := Self;
|
||||
end;
|
||||
|
||||
procedure clear<T>(var st: set of T);
|
||||
begin
|
||||
st := [];
|
||||
end;
|
||||
|
||||
function __NewSetCreatorInternal<T>(params a: array of T): NewSet<T>;
|
||||
begin
|
||||
//Result._hs := new HashSet<T>;
|
||||
Result._hs.UnionWith(a);
|
||||
end;
|
||||
|
||||
// TUPLES BEGIN
|
||||
function CreateTuple<T1, T2>(
|
||||
v1: T1; v2: T2
|
||||
): System.Tuple<T1, T2>
|
||||
:= (v1, v2);
|
||||
|
||||
function CreateTuple<T1, T2, T3>(
|
||||
v1: T1; v2: T2; v3: T3
|
||||
): System.Tuple<T1, T2, T3>
|
||||
:= (v1, v2, v3);
|
||||
|
||||
function CreateTuple<T1, T2, T3, T4>(
|
||||
v1: T1; v2: T2; v3: T3; v4: T4
|
||||
): System.Tuple<T1, T2, T3, T4>
|
||||
:= (v1, v2, v3, v4);
|
||||
|
||||
function CreateTuple<T1, T2, T3, T4, T5>(
|
||||
v1: T1; v2: T2; v3: T3; v4: T4; v5: T5
|
||||
): System.Tuple<T1, T2, T3, T4, T5>
|
||||
:= (v1, v2, v3, v4, v5);
|
||||
|
||||
function CreateTuple<T1, T2, T3, T4, T5, T6>(
|
||||
v1: T1; v2: T2; v3: T3; v4: T4; v5: T5; v6: T6
|
||||
): System.Tuple<T1, T2, T3, T4, T5, T6>
|
||||
:= (v1, v2, v3, v4, v5, v6);
|
||||
|
||||
function CreateTuple<T1, T2, T3, T4, T5, T6, T7>(
|
||||
v1: T1; v2: T2; v3: T3; v4: T4; v5: T5; v6: T6; v7: T7
|
||||
): System.Tuple<T1, T2, T3, T4, T5, T6, T7>
|
||||
:= (v1, v2, v3, v4, v5, v6, v7);
|
||||
|
||||
// TUPLES END
|
||||
|
||||
function Dict<TKey, TVal>(params pairs: array of (TKey, TVal)): Dictionary<TKey, TVal>;
|
||||
begin
|
||||
Result := new Dictionary<TKey, TVal>();
|
||||
for var i := 0 to pairs.Length - 1 do
|
||||
Result.Add(pairs[i][0], pairs[i][1]);
|
||||
end;
|
||||
|
||||
function &set<T>(sq: sequence of T): set of T;
|
||||
begin
|
||||
foreach var e in sq do
|
||||
Result.Add(e);
|
||||
end;
|
||||
|
||||
function &list<T>(sq: sequence of T): PABCSystem.List<T> := sq.ToList();
|
||||
|
||||
function all(s: sequence of boolean): boolean;
|
||||
begin
|
||||
Result := true;
|
||||
foreach var elem in s do
|
||||
if (not elem) then
|
||||
begin
|
||||
Result := false;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
|
||||
function any(s: sequence of boolean): boolean;
|
||||
begin
|
||||
Result := false;
|
||||
foreach var elem in s do
|
||||
if (elem) then
|
||||
begin
|
||||
Result := true;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ToDictionary<T, U>(Self: sequence of System.tuple<T, U>): Dictionary<T, U>; extensionmethod;
|
||||
begin
|
||||
Result := Self.ToDictionary(x->x[0],x->x[1]);
|
||||
end;
|
||||
|
||||
function !empty_list(): empty_list := new empty_list();
|
||||
function !empty_dict(): empty_dict := new empty_dict();
|
||||
function &set(): empty_set := new empty_set;
|
||||
|
||||
function round(val: real): integer := PABCSystem.round(val);
|
||||
|
||||
function split(s: string): sequence of string;
|
||||
begin
|
||||
var temp := '';
|
||||
var i := 0;
|
||||
|
||||
while i <= s.Length - 1 do
|
||||
begin
|
||||
if (i <= s.Length - 1) and (s.Substring(i, 1) = ' ') then
|
||||
begin
|
||||
yield temp;
|
||||
temp := '';
|
||||
i += 1;
|
||||
end
|
||||
else
|
||||
begin
|
||||
temp += s[i];
|
||||
i += 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
yield temp;
|
||||
end;
|
||||
|
||||
function !format(i: integer; fmt: string): string;
|
||||
begin
|
||||
if ((fmt.ToLower() = 'x') or (fmt = 'b') or (fmt = 'd')) then
|
||||
begin
|
||||
var HexChars := '0123456789abcdef';
|
||||
if (fmt = 'X') then
|
||||
HexChars := HexChars.ToUpper();
|
||||
var value := Cardinal(i);
|
||||
var radix := 10;
|
||||
if (fmt.ToLower() = 'x') then radix := 16;
|
||||
if (fmt = 'b') then radix := 2;
|
||||
if value = 0 then
|
||||
begin
|
||||
Result := '0';
|
||||
Exit;
|
||||
end;
|
||||
|
||||
while value > 0 do
|
||||
begin
|
||||
var digit := value mod radix;
|
||||
Result := HexChars[digit + 1] + Result;
|
||||
value := value div radix;
|
||||
end;
|
||||
Exit;
|
||||
end;
|
||||
if (fmt[1] = '.') then
|
||||
begin
|
||||
Result := !format(i + 0.0, fmt);
|
||||
Exit;
|
||||
end;
|
||||
raise new System.ArgumentException('Неверный формат для целочисленного аргумента');
|
||||
end;
|
||||
|
||||
function !format(val: real; fmt: string): string;
|
||||
begin
|
||||
var digits: integer;
|
||||
if (fmt.Length >= 3) and (fmt[1] = '.') and (fmt.EndsWith('f')) then
|
||||
begin
|
||||
var numStr := fmt.Substring(1, fmt.Length - 2);
|
||||
if TryStrToInt(numStr, digits) then
|
||||
begin
|
||||
var intPart := Trunc(val);
|
||||
if (digits = 0) then
|
||||
begin
|
||||
Result := intPart.ToString;
|
||||
Exit;
|
||||
end;
|
||||
var frac := Abs(val - intPart);
|
||||
|
||||
var fracPart := Round(frac * Power(10, digits));
|
||||
|
||||
var fracStr := fracPart.ToString;
|
||||
while fracStr.Length < digits do
|
||||
fracStr := '0' + fracStr;
|
||||
|
||||
Result := intPart.ToString + '.' + fracStr;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
raise new System.ArgumentException('Неверный формат для вещественного аргумента');
|
||||
end;
|
||||
|
||||
function !format(obj: object; fmt: string): string;
|
||||
begin
|
||||
Result := '';
|
||||
raise new System.ArgumentException('Формат не соответствует типу данных выражения в f-строке');
|
||||
end;
|
||||
|
||||
end.
|
||||
18
bin/Lib/SPythonSystemPys.pys
Normal file
18
bin/Lib/SPythonSystemPys.pys
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from PABCSystem import Object as obj, Write as pas_print
|
||||
from SPythonSystem import range, len
|
||||
|
||||
def print(*args: obj, **kwargs: str):
|
||||
sep: str = ' '
|
||||
end: str = '\n'
|
||||
if 'sep' in kwargs.keys():
|
||||
sep = kwargs['sep']
|
||||
if 'end' in kwargs.keys():
|
||||
end = kwargs['end']
|
||||
|
||||
for i in range(0, len(args) - 1):
|
||||
pas_print(args[i])
|
||||
pas_print(sep)
|
||||
|
||||
if len(args) != 0:
|
||||
pas_print(args[len(args) - 1])
|
||||
pas_print(end)
|
||||
32
bin/Lib/itertools.pys
Normal file
32
bin/Lib/itertools.pys
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# объединяет списки целых в один
|
||||
def chain(*args: list[int]) -> list[int]:
|
||||
sz = 0
|
||||
for arg in args:
|
||||
sz += len(arg)
|
||||
|
||||
res = [0 for i in range(sz)]
|
||||
i = 0
|
||||
for arg in args:
|
||||
for j in range(len(arg)):
|
||||
res[i] = arg[j]
|
||||
i += 1
|
||||
return res
|
||||
|
||||
# если вызвать как repeat(10, times=12)
|
||||
def repeat(val: int, **kwargs: int) -> list[int]:
|
||||
times = 1
|
||||
if 'times' in kwargs.keys():
|
||||
times = kwargs['times']
|
||||
return [val for i in range(times)]
|
||||
|
||||
# если вызвать как repeat(10, 12)
|
||||
def repeat(val: int, times: int) -> list[int]:
|
||||
return repeat(val, times=times)
|
||||
# можно просто так
|
||||
# return [val for i in range(times)]
|
||||
|
||||
|
||||
# просто функция, чтобы показать как итерироваться по kwargs
|
||||
def print_int_kwargs(**kwargs: int):
|
||||
for key, value in kwargs:
|
||||
print(f'kwargs[{key}] = {value}')
|
||||
99
bin/Lib/math.pys
Normal file
99
bin/Lib/math.pys
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
import PABCSystem
|
||||
|
||||
pi = 3.14
|
||||
|
||||
def sqrt(x: float) -> float:
|
||||
return PABCSystem.sqrt(x)
|
||||
|
||||
def trunc(x: float) -> int:
|
||||
return PABCSystem.trunc(x)
|
||||
|
||||
def floor(x: float) -> int:
|
||||
return PABCSystem.floor(x)
|
||||
|
||||
def ceil(x: float) -> int:
|
||||
return PABCSystem.ceil(x)
|
||||
|
||||
def log(x: float) -> float:
|
||||
return PABCSystem.Log(x)
|
||||
|
||||
def log1p(x: float) -> float:
|
||||
return PABCSystem.Log(1+ x)
|
||||
|
||||
def log2(x: float) -> float:
|
||||
return PABCSystem.Log2(x)
|
||||
|
||||
def log10(x: float) -> float:
|
||||
return PABCSystem.Log10(x)
|
||||
|
||||
def log(x: float, base: int) -> float:
|
||||
return PABCSystem.LogN(base, x)
|
||||
|
||||
def exp(x: float) -> float:
|
||||
return PABCSystem.exp(x)
|
||||
|
||||
def expm1(x: float) -> float:
|
||||
return PABCSystem.exp(x - 1)
|
||||
|
||||
def exp2(x: float) -> float:
|
||||
return PABCSystem.exp(log(2) * x)
|
||||
|
||||
def sin(x: float) -> float:
|
||||
return PABCSystem.sin(x)
|
||||
|
||||
def sinh(x: float) -> float:
|
||||
return PABCSystem.sinh(x)
|
||||
|
||||
def cos(x: float) -> float:
|
||||
return PABCSystem.cos(x)
|
||||
|
||||
def cosh(x: float) -> float:
|
||||
return PABCSystem.cosh(x)
|
||||
|
||||
def tan(x: float) -> float:
|
||||
return PABCSystem.tan(x)
|
||||
|
||||
def tanh(x: float) -> float:
|
||||
return PABCSystem.tanh(x)
|
||||
|
||||
def acos(x: float) -> float:
|
||||
return PABCSystem.arccos(x)
|
||||
|
||||
def asin(x: float) -> float:
|
||||
return PABCSystem.arcsin(x)
|
||||
|
||||
def atan(x: float) -> float:
|
||||
return PABCSystem.arctan(x)
|
||||
|
||||
def atan2(y: float, x: float) -> float:
|
||||
return PABCSystem.arctan(y / x)
|
||||
|
||||
def pow(x: float, y: int) -> float:
|
||||
return PABCSystem.power(x, y)
|
||||
|
||||
def cbrt(x: float) -> float:
|
||||
return pow(x, 1/3)
|
||||
|
||||
def fabs(x: float) -> float:
|
||||
return PABCSystem.abs(x)
|
||||
|
||||
def pow(x: float, y: float) -> float:
|
||||
return PABCSystem.power(x, y)
|
||||
|
||||
def isqrt(x: int) -> int:
|
||||
return floor(sqrt(x))
|
||||
|
||||
def remainder(x: int, y: int) -> int:
|
||||
return x - (x // y) * y
|
||||
|
||||
def factorial(n: int) -> int:
|
||||
if n == 0:
|
||||
return 1
|
||||
return n * factorial(n - 1)
|
||||
|
||||
def perm(n: int, k: int) -> int:
|
||||
return factorial(n) // factorial(n - k)
|
||||
|
||||
def comb(n: int, k: int) -> int:
|
||||
return perm(n, k) // factorial(k)
|
||||
|
||||
34
bin/Lng/Eng/SPythonParser.dat
Normal file
34
bin/Lng/Eng/SPythonParser.dat
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
%PREFIX%=SPYTHONPARSER_
|
||||
FOUND{0}=Found {0} but
|
||||
FOUNDM{0}=Found {0} but
|
||||
FOUNDEOF=Found end of file but
|
||||
EXPECTED{0}=Expected {0}
|
||||
EXPECTED{1}=expected {1}
|
||||
EXPECTEDR{1}=expected {1}
|
||||
EXPECTEDF{1}=expected {1}
|
||||
GLOBAL_VAR_{0}_SIM_PARAMETER=global variable name {0} is the same as parameter name
|
||||
USING_VARIABLE_{0}_BEFORE_ASSIGNMENT=Variable {0} used before declaration
|
||||
NO_GLOBAL_VAR_{0}=Unknown global name {0}
|
||||
WRONG_INDENT=Indent does not match any block of code
|
||||
PROGRAM_BEGIN_WITH_INDENT=Program can not begin with indent
|
||||
UNEXPECTED_TOKEN_{0}=Unknown symbol {0}
|
||||
UNSUPPORTED_CONSTRUCTION_{0}=Construction {0} is not support in current compiler version
|
||||
LINE_WITHOUT_INDENT=Expected code block with indent
|
||||
ILL_FORMED_FSTRING_{0}=Wrong f-string format {0}
|
||||
FSTRING_UNNKOWN_FORMAT_{0}=Unknown format {0}
|
||||
FSTRING_NESTED_EXPRESSION_{0}_PARSING_FAILURE=Expression '{0}' has an error
|
||||
|
||||
IDENTIFIER=identifier
|
||||
EOF1=end of file
|
||||
EOL=end of line
|
||||
STRINGNUM=string constant
|
||||
INTNUM=integer
|
||||
REALNUM=float
|
||||
#{=indent
|
||||
#}=end of indent
|
||||
#$=end of file
|
||||
#;=end of line
|
||||
|
||||
|
||||
EXPR=expression
|
||||
STMT=statement
|
||||
4
bin/Lng/Eng/SPythonSemantic.dat
Normal file
4
bin/Lng/Eng/SPythonSemantic.dat
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
%PREFIX%=SPYTHONSEMANTIC_
|
||||
NOT_ALLOWED_{0}_DIFF_TYPES_{1}_{2}=Operation {0} is not supported for types {1} and {2}
|
||||
FUNCTION_{0}_NO_RETURN=Function {0} does not return a value
|
||||
TYPE_{0}_HAS_NO_{1}_METHOD=Type {0} does not have method {1}
|
||||
23
bin/Lng/Eng/SPythonSyntaxTreeVisitorErrors.dat
Normal file
23
bin/Lng/Eng/SPythonSyntaxTreeVisitorErrors.dat
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// Syntax tree conversion errors
|
||||
%PREFIX%=SPYTHONSYNTAXTREEVISITORSERROR_
|
||||
|
||||
UNKNOWN_NAME_{0}=Unknown name '{0}'
|
||||
MODULE_{0}_HAS_NO_NAME_{1}=Module '{0}' does not contains name '{1}'
|
||||
SCOPE_CONTAINS_NAME_{0}=Name '{0}' is already in current scope
|
||||
ARG_AFTER_KWARGS=Unnamed argument can not be after named one
|
||||
PASCALABCNET_TYPE_{0}_INSTEAD_OF_SPYTHON_TYPE_{1}=Unknown type '{0}'. Maybe you meant '{1}'
|
||||
LOCAL_IMPORT_USE=Current compile version supports 'import ...' only on outerscope
|
||||
LOCAL_FROM_IMPORT_USE=Current compile version supports 'from ... import ...' only on global level
|
||||
LOCAL_FUNCTION_DECLARATION=Current compile version supports function declaration on global level
|
||||
GLOBAL_NOT_IN_FUNCTION=Construction 'global ...' may be used only inside a function
|
||||
GLOBAL_IN_NOT_OUTERMOST_BLOCK=Construction 'global ...' is supported only on function outerscope
|
||||
FUNCTION_{0}_USED_BEFORE_DECLARATION=Function '{0}' is declared later; its use before declaration is allowed only inside other functions
|
||||
RETURN_NOT_RETURN_VALUE=The function must return a value
|
||||
RETURN_HAS_RETURN_VALUE=The function must not return a value
|
||||
RETURN_NOT_IN_FUNCTION='return ...' statement must be inside a function
|
||||
IMPOSSIBLE_TO_INFER_LIST_TYPE=Cannot infer the type of the list
|
||||
IMPOSSIBLE_TO_INFER_SET_TYPE=Cannot infer the type of the set
|
||||
IMPOSSIBLE_TO_INFER_DICT_TYPE=Cannot infer the type of the dictionary
|
||||
KWARG_PARAMETOR_NOT_LAST=Keyword argument parameter must be the last one
|
||||
LONG_TUPLE_TYPENAME=Tuple size should be less than or equal to seven
|
||||
LEFT_SIZE_TUPLE_ASSIGNMENT_LESS_THAN_RIGHT=Tuple assignment must have the same number of elements on both sides
|
||||
34
bin/Lng/Rus/SPythonParser.dat
Normal file
34
bin/Lng/Rus/SPythonParser.dat
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
%PREFIX%=SPYTHONPARSER_
|
||||
FOUND{0}=Встречено {0}, а
|
||||
FOUNDM{0}=Встречен {0}, а
|
||||
FOUNDEOF=Встречен конец файла, а
|
||||
EXPECTED{0}=Ожидалось {0}
|
||||
EXPECTED{1}=ожидалось {1}
|
||||
EXPECTEDR{1}=ожидался {1}
|
||||
EXPECTEDF{1}=ожидалась {1}
|
||||
GLOBAL_VAR_{0}_SIM_PARAMETER=имя глобальной переменной {0} совпадает с именем параметра функции
|
||||
USING_VARIABLE_{0}_BEFORE_ASSIGNMENT=Использование переменной {0} до объявления
|
||||
NO_GLOBAL_VAR_{0}=Неизвестная глобальная переменная {0}
|
||||
WRONG_INDENT=Отступ не соответствует ни одному из блоков кода
|
||||
PROGRAM_BEGIN_WITH_INDENT=Программа не может начинаться с отступа
|
||||
UNEXPECTED_TOKEN_{0}=Неизвестный символ {0}
|
||||
UNSUPPORTED_CONSTRUCTION_{0}=Конструкция {0} не поддерживается текущей версией компилятора
|
||||
LINE_WITHOUT_INDENT=Ожидалось начало блока кода с отступом
|
||||
ILL_FORMED_FSTRING_{0}=Неверный формат строки {0}
|
||||
FSTRING_UNNKOWN_FORMAT_{0}=Неизвестный формат {0}
|
||||
FSTRING_NESTED_EXPRESSION_{0}_PARSING_FAILURE=Ошибка в выражении '{0}'
|
||||
|
||||
IDENTIFIER=идентификатор
|
||||
EOF1=конец файла
|
||||
EOL=конец строки
|
||||
STRINGNUM=строковая константа
|
||||
INTNUM=целое число
|
||||
REALNUM=вещественное число
|
||||
#{=отступ
|
||||
#}=конец отступа
|
||||
#$=конец файла
|
||||
#;=конец строки
|
||||
|
||||
|
||||
EXPR=выражение
|
||||
STMT=оператор
|
||||
23
bin/Lng/Rus/SPythonSyntaxTreeVisitorErrors.dat
Normal file
23
bin/Lng/Rus/SPythonSyntaxTreeVisitorErrors.dat
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// Syntax tree conversion errors
|
||||
%PREFIX%=SPYTHONSYNTAXTREEVISITORSERROR_
|
||||
|
||||
UNKNOWN_NAME_{0}=Неизвестное имя '{0}'
|
||||
MODULE_{0}_HAS_NO_NAME_{1}=В модуле '{0}' не объявлено имя '{1}'
|
||||
SCOPE_CONTAINS_NAME_{0}=Имя '{0}' присутствует в текущем пространстве имён
|
||||
ARG_AFTER_KWARGS=После именованного аргумента может идти только именованный аргумент
|
||||
PASCALABCNET_TYPE_{0}_INSTEAD_OF_SPYTHON_TYPE_{1}=Неизвестный тип '{0}', возможно Вы имели в виду '{1}'
|
||||
LOCAL_IMPORT_USE=В текущей версии компилятора конструкция 'import ...' допустима только на глобальном уровне
|
||||
LOCAL_FROM_IMPORT_USE=В текущей версии компилятора конструкция 'from ... import ...' допустима только на глобальном уровне
|
||||
LOCAL_FUNCTION_DECLARATION=В текущей версии компилятора объявление функции допустимо только на глобальном уровне
|
||||
GLOBAL_NOT_IN_FUNCTION=конструкция 'global ...' допустима только внутри функции
|
||||
GLOBAL_IN_NOT_OUTERMOST_BLOCK=конструкция 'global ...' недопустима во вложенном блоке кода
|
||||
FUNCTION_{0}_USED_BEFORE_DECLARATION='{0}' объявлена позже как функция, её использование до объявления допустимо только в теле других функций
|
||||
RETURN_NOT_RETURN_VALUE=Функция должна возвращать значение
|
||||
RETURN_HAS_RETURN_VALUE=Попытка вернуть значение из функции, у которой не указан тип возвращаемого значения
|
||||
RETURN_NOT_IN_FUNCTION=Конструкция 'return ...' должна быть внутри функции
|
||||
IMPOSSIBLE_TO_INFER_LIST_TYPE=Нельзя вычислить тип списка
|
||||
IMPOSSIBLE_TO_INFER_SET_TYPE=Нельзя вычислить тип множества
|
||||
IMPOSSIBLE_TO_INFER_DICT_TYPE=Нельзя вычислить тип словаря
|
||||
KWARG_PARAMETOR_NOT_LAST=kwarg-параметр должен быть последним в списке параметров
|
||||
LONG_TUPLE_TYPENAME=Размер кортежа не может быть больше семи
|
||||
LEFT_SIZE_TUPLE_ASSIGNMENT_LESS_THAN_RIGHT=Количество переменных в левой части кортежного присваивания должно совпадать с размером кортежа в правой части
|
||||
4
bin/Lng/Rus/SpythonSemantic.dat
Normal file
4
bin/Lng/Rus/SpythonSemantic.dat
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
%PREFIX%=SPYTHONSEMANTIC_
|
||||
NOT_ALLOWED_{0}_DIFF_TYPES_{1}_{2}=Операция {0} неприменима к типам {1} и {2}
|
||||
FUNCTION_{0}_NO_RETURN=Функция {0} не возвращает значение
|
||||
TYPE_{0}_HAS_NO_{1}_METHOD=В типе {0} не определён метод {1}
|
||||
87
pabcnetc.sln
87
pabcnetc.sln
|
|
@ -45,8 +45,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyntaxTreeConverters", "Syn
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyntaxVisitors", "SyntaxVisitors\SyntaxVisitors.csproj", "{A9AB4282-83B4-41A7-86C3-E5BF6A45E7E2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YieldConversionSyntax", "Yield\YieldConversionSyntax\YieldConversionSyntax.csproj", "{276EE073-60F6-46D2-8811-1B8026BCAADA}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LambdaAnySynToSemConverter", "LambdaAnySynToSemConverter\LambdaAnySynToSemConverter.csproj", "{27D9800E-2689-4AA1-A2D6-128E4A9BAE98}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PascalABCLanguageInfo", "PascalABCLanguageInfo\PascalABCLanguageInfo.csproj", "{BD902586-E0D5-407A-904A-32249B8B709E}"
|
||||
|
|
@ -55,6 +53,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StringConstants", "StringCo
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LanguageIntegrator", "LanguageIntegrator\LanguageIntegrator.csproj", "{A48D9069-D569-4110-9252-A10F139B669B}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LanguagePlugins", "LanguagePlugins", "{36D591C7-65C7-A0D1-1CBC-10CDE441BDC8}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SPython", "SPython", "{DFCE8D21-EF89-4922-B662-65CF93E0F61B}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SemanticAnalyzers", "SemanticAnalyzers", "{571693BE-5B2B-4383-BDD8-130ABDCC0B3A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SyntaxTreeConverters", "SyntaxTreeConverters", "{D7D9CC20-E09F-4FBC-8EEE-9FAB8406FCBB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPythonSyntaxTreeVisitor", "LanguagePlugins\SPython\SemanticAnalyzers\SPythonSyntaxTreeVisitor\SPythonSyntaxTreeVisitor.csproj", "{26DB8340-9A8F-16E1-6E6D-D59E97D05142}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPythonStandardTreeConverter", "LanguagePlugins\SPython\SyntaxTreeConverters\SPythonStandardTreeConverter\SPythonStandardTreeConverter.csproj", "{6883EC33-B9FD-6D48-B0C3-16F451552C9F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPythonLanguageInfo", "LanguagePlugins\SPython\SPythonLanguageInfo\SPythonLanguageInfo.csproj", "{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPythonParser", "LanguagePlugins\SPython\SPythonParserKrylovMovchan\SPythonParser.csproj", "{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -231,18 +245,6 @@ Global
|
|||
{A9AB4282-83B4-41A7-86C3-E5BF6A45E7E2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{A9AB4282-83B4-41A7-86C3-E5BF6A45E7E2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A9AB4282-83B4-41A7-86C3-E5BF6A45E7E2}.Release|x86.Build.0 = Release|Any CPU
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA}.Release|x86.Build.0 = Release|Any CPU
|
||||
{27D9800E-2689-4AA1-A2D6-128E4A9BAE98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{27D9800E-2689-4AA1-A2D6-128E4A9BAE98}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{27D9800E-2689-4AA1-A2D6-128E4A9BAE98}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -291,6 +293,54 @@ Global
|
|||
{A48D9069-D569-4110-9252-A10F139B669B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{A48D9069-D569-4110-9252-A10F139B669B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A48D9069-D569-4110-9252-A10F139B669B}.Release|x86.Build.0 = Release|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142}.Release|x86.Build.0 = Release|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -313,11 +363,18 @@ Global
|
|||
{CE5C55C2-A11C-4E94-A9FA-3FC6CA3E4C09} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{F10A5330-DCF4-4533-877C-7B1B1BE23884} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{A9AB4282-83B4-41A7-86C3-E5BF6A45E7E2} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{276EE073-60F6-46D2-8811-1B8026BCAADA} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{27D9800E-2689-4AA1-A2D6-128E4A9BAE98} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{BD902586-E0D5-407A-904A-32249B8B709E} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{E8AEFBF9-0113-4FA4-BE45-6CDA555498B7} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{A48D9069-D569-4110-9252-A10F139B669B} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{36D591C7-65C7-A0D1-1CBC-10CDE441BDC8} = {F8CE2712-826B-450B-A72F-D32D80C99858}
|
||||
{DFCE8D21-EF89-4922-B662-65CF93E0F61B} = {36D591C7-65C7-A0D1-1CBC-10CDE441BDC8}
|
||||
{571693BE-5B2B-4383-BDD8-130ABDCC0B3A} = {DFCE8D21-EF89-4922-B662-65CF93E0F61B}
|
||||
{D7D9CC20-E09F-4FBC-8EEE-9FAB8406FCBB} = {DFCE8D21-EF89-4922-B662-65CF93E0F61B}
|
||||
{26DB8340-9A8F-16E1-6E6D-D59E97D05142} = {571693BE-5B2B-4383-BDD8-130ABDCC0B3A}
|
||||
{6883EC33-B9FD-6D48-B0C3-16F451552C9F} = {D7D9CC20-E09F-4FBC-8EEE-9FAB8406FCBB}
|
||||
{15D55C2B-37A6-850E-D0CF-74C43CBB9E3F} = {DFCE8D21-EF89-4922-B662-65CF93E0F61B}
|
||||
{CEEEDB1E-B0E1-283E-13C3-BFE73FE8A446} = {DFCE8D21-EF89-4922-B662-65CF93E0F61B}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {761C7A47-891E-47CF-B674-0C2B53D2E48C}
|
||||
|
|
|
|||
Loading…
Reference in a new issue