From ae1d0593f660ef2c55b76769a410c6fadf49ed8a Mon Sep 17 00:00:00 2001
From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com>
Date: Sat, 25 Feb 2023 16:44:13 +0000
Subject: [PATCH 001/122] WOW IT CREATES A CBA
- Added CB and updated RFASM statements in Crimson ANTLR
- More verbose error handling in Flattener and JumpEqualBStatement
- FunctionCStatement Name property now correctly gets and sets backing property in Header
- Converted NotImplementedException stubs to CommentBStatement stubs
---
Crimson/Antlr/Input/Crimson.g4 | 15 +-
Crimson/Antlr/Output/Crimson.interp | 9 +-
Crimson/Antlr/Output/Crimson.tokens | 74 +-
Crimson/Antlr/Output/CrimsonBaseListener.cs | 26 +
Crimson/Antlr/Output/CrimsonBaseVisitor.cs | 21 +
Crimson/Antlr/Output/CrimsonLexer.cs | 265 +++----
Crimson/Antlr/Output/CrimsonLexer.interp | 11 +-
Crimson/Antlr/Output/CrimsonLexer.tokens | 74 +-
Crimson/Antlr/Output/CrimsonListener.cs | 22 +
Crimson/Antlr/Output/CrimsonParser.cs | 686 ++++++++++--------
Crimson/Antlr/Output/CrimsonVisitor.cs | 13 +
Crimson/CSharp/Core/Flattener.cs | 21 +-
Crimson/CSharp/Core/LinkerHelper.cs | 2 +-
Crimson/CSharp/Core/TranslationUnitVisitor.cs | 21 +-
.../Grammar/Statements/BasicCallCStatement.cs | 28 +
.../Grammar/Statements/FunctionCStatement.cs | 5 +-
.../VariableAssignmentCStatement.cs | 16 +-
.../CSharp/Grammar/Tokens/ConditionCToken.cs | 1 +
.../CSharp/Grammar/Tokens/FullNameCToken.cs | 8 +-
.../FunctionCallResolvableValueCToken.cs | 5 +-
.../Tokens/OperationResolvableValueCToken.cs | 5 +-
Crimson/Crimson.csproj | 1 +
Crimson/Resources/Test Compilations/main.crm | 11 +-
.../Test Compilations/result/main.cba | 150 ++--
.../CSharp/Statements/JumpEqualBStatement.cs | 6 +-
CrimsonBasic/CrimsonBasic.csproj | 1 +
.../Documentation/TestPrograms/TestAll.rfb | Bin 242 -> 242 bytes
RedFoxVM.sln | 6 +-
28 files changed, 870 insertions(+), 633 deletions(-)
create mode 100644 Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs
diff --git a/Crimson/Antlr/Input/Crimson.g4 b/Crimson/Antlr/Input/Crimson.g4
index 4ee8ed9..275b75a 100644
--- a/Crimson/Antlr/Input/Crimson.g4
+++ b/Crimson/Antlr/Input/Crimson.g4
@@ -7,10 +7,10 @@ translationUnit
// Compilation-Unit statements
importUnit
- : Hashtag Using path=String As identifier=fullName
+ : Hashtag Using path=String As identifier=fullName SemiColon
;
operationHandler
- : Hashtag OpHandler OpenBracket t1=type op=Operator t2=type CloseBracket RightArrow OpenBrace identifier=fullName CloseBrace
+ : Hashtag OpHandler OpenBracket t1=type op=Operator t2=type CloseBracket RightArrow OpenBrace identifier=fullName CloseBrace SemiColon
;
globalStatement
: globalVariableDeclaration #GlobalVariableUnitStatement
@@ -38,6 +38,7 @@ internalStatement
| functionCall SemiColon #FunctionFunctionCallStatement
| ifBlock #FunctionIfStatement
| whileBlock #FunctionWhileStatement
+ | basicCall #FunctionBasicCallStatement
| assemblyCall #FunctionAssemblyCallStatement
;
internalVariableDeclaration
@@ -62,8 +63,11 @@ elseIfBlock
elseBlock
: Else functionBody
;
+basicCall
+ : BasicCall basicText=~('\r' | '\n')*
+ ;
assemblyCall
- : Tilda assemblyText=~('\r' | '\n')*
+ : AssemblyCall assemblyText=~('\r' | '\n')*
;
// Function
@@ -171,7 +175,8 @@ fragment EqualTo: '==';
Comparator: Less | LessEqual | Greater | GreaterEqual | EqualTo;
RightArrow: '->';
-Tilda: '~';
+BasicCall: 'B~';
+AssemblyCall: 'A~';
DirectEquals: '=';
PointerEquals: '*=';
OpenBracket: '(';
@@ -203,7 +208,7 @@ String
: Quote ~('"')* Quote
;
ShortName
- : (Alphabetic) (Alphabetic | Number | Underscore)+?
+ : (Alphabetic) (Alphabetic | Number | Underscore)*
;
fragment Alphabetic
: [a-zA-Z]
diff --git a/Crimson/Antlr/Output/Crimson.interp b/Crimson/Antlr/Output/Crimson.interp
index b314f57..577490c 100644
--- a/Crimson/Antlr/Output/Crimson.interp
+++ b/Crimson/Antlr/Output/Crimson.interp
@@ -23,7 +23,8 @@ null
null
null
'->'
-'~'
+'B~'
+'A~'
'='
'*='
'('
@@ -70,7 +71,8 @@ Asterisk
MathsOperator
Comparator
RightArrow
-Tilda
+BasicCall
+AssemblyCall
DirectEquals
PointerEquals
OpenBracket
@@ -109,6 +111,7 @@ whileBlock
condition
elseIfBlock
elseBlock
+basicCall
assemblyCall
functionCall
arguments
@@ -127,4 +130,4 @@ fullName
atn:
-[4, 1, 44, 281, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 1, 0, 5, 0, 64, 8, 0, 10, 0, 12, 0, 67, 9, 0, 1, 0, 5, 0, 70, 8, 0, 10, 0, 12, 0, 73, 9, 0, 1, 0, 5, 0, 76, 8, 0, 10, 0, 12, 0, 79, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 3, 3, 104, 8, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 5, 7, 119, 8, 7, 10, 7, 12, 7, 122, 9, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 135, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 142, 8, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 150, 8, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 158, 8, 10, 1, 10, 1, 10, 3, 10, 162, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 169, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 5, 16, 187, 8, 16, 10, 16, 12, 16, 190, 9, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 3, 18, 197, 8, 18, 1, 18, 1, 18, 5, 18, 201, 8, 18, 10, 18, 12, 18, 204, 9, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 214, 8, 19, 1, 20, 1, 20, 3, 20, 218, 8, 20, 1, 20, 3, 20, 221, 8, 20, 1, 21, 1, 21, 3, 21, 225, 8, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 239, 8, 24, 10, 24, 12, 24, 242, 9, 24, 1, 24, 1, 24, 3, 24, 246, 8, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 5, 27, 257, 8, 27, 10, 27, 12, 27, 260, 9, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 269, 8, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 3, 30, 277, 8, 30, 1, 30, 1, 30, 1, 30, 0, 0, 31, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 0, 2, 1, 0, 1, 2, 2, 0, 17, 18, 42, 42, 282, 0, 65, 1, 0, 0, 0, 2, 82, 1, 0, 0, 0, 4, 88, 1, 0, 0, 0, 6, 103, 1, 0, 0, 0, 8, 105, 1, 0, 0, 0, 10, 108, 1, 0, 0, 0, 12, 113, 1, 0, 0, 0, 14, 116, 1, 0, 0, 0, 16, 134, 1, 0, 0, 0, 18, 136, 1, 0, 0, 0, 20, 161, 1, 0, 0, 0, 22, 163, 1, 0, 0, 0, 24, 170, 1, 0, 0, 0, 26, 174, 1, 0, 0, 0, 28, 178, 1, 0, 0, 0, 30, 181, 1, 0, 0, 0, 32, 184, 1, 0, 0, 0, 34, 191, 1, 0, 0, 0, 36, 194, 1, 0, 0, 0, 38, 213, 1, 0, 0, 0, 40, 220, 1, 0, 0, 0, 42, 224, 1, 0, 0, 0, 44, 226, 1, 0, 0, 0, 46, 228, 1, 0, 0, 0, 48, 245, 1, 0, 0, 0, 50, 247, 1, 0, 0, 0, 52, 250, 1, 0, 0, 0, 54, 254, 1, 0, 0, 0, 56, 268, 1, 0, 0, 0, 58, 270, 1, 0, 0, 0, 60, 276, 1, 0, 0, 0, 62, 64, 3, 2, 1, 0, 63, 62, 1, 0, 0, 0, 64, 67, 1, 0, 0, 0, 65, 63, 1, 0, 0, 0, 65, 66, 1, 0, 0, 0, 66, 71, 1, 0, 0, 0, 67, 65, 1, 0, 0, 0, 68, 70, 3, 4, 2, 0, 69, 68, 1, 0, 0, 0, 70, 73, 1, 0, 0, 0, 71, 69, 1, 0, 0, 0, 71, 72, 1, 0, 0, 0, 72, 77, 1, 0, 0, 0, 73, 71, 1, 0, 0, 0, 74, 76, 3, 6, 3, 0, 75, 74, 1, 0, 0, 0, 76, 79, 1, 0, 0, 0, 77, 75, 1, 0, 0, 0, 77, 78, 1, 0, 0, 0, 78, 80, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 80, 81, 5, 0, 0, 1, 81, 1, 1, 0, 0, 0, 82, 83, 5, 37, 0, 0, 83, 84, 5, 8, 0, 0, 84, 85, 5, 43, 0, 0, 85, 86, 5, 10, 0, 0, 86, 87, 3, 60, 30, 0, 87, 3, 1, 0, 0, 0, 88, 89, 5, 37, 0, 0, 89, 90, 5, 9, 0, 0, 90, 91, 5, 27, 0, 0, 91, 92, 3, 56, 28, 0, 92, 93, 5, 19, 0, 0, 93, 94, 3, 56, 28, 0, 94, 95, 5, 28, 0, 0, 95, 96, 5, 23, 0, 0, 96, 97, 5, 31, 0, 0, 97, 98, 3, 60, 30, 0, 98, 99, 5, 32, 0, 0, 99, 5, 1, 0, 0, 0, 100, 104, 3, 8, 4, 0, 101, 104, 3, 10, 5, 0, 102, 104, 3, 52, 26, 0, 103, 100, 1, 0, 0, 0, 103, 101, 1, 0, 0, 0, 103, 102, 1, 0, 0, 0, 104, 7, 1, 0, 0, 0, 105, 106, 5, 5, 0, 0, 106, 107, 3, 18, 9, 0, 107, 9, 1, 0, 0, 0, 108, 109, 5, 4, 0, 0, 109, 110, 3, 56, 28, 0, 110, 111, 3, 12, 6, 0, 111, 112, 3, 14, 7, 0, 112, 11, 1, 0, 0, 0, 113, 114, 3, 60, 30, 0, 114, 115, 3, 48, 24, 0, 115, 13, 1, 0, 0, 0, 116, 120, 5, 31, 0, 0, 117, 119, 3, 16, 8, 0, 118, 117, 1, 0, 0, 0, 119, 122, 1, 0, 0, 0, 120, 118, 1, 0, 0, 0, 120, 121, 1, 0, 0, 0, 121, 123, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 123, 124, 5, 32, 0, 0, 124, 15, 1, 0, 0, 0, 125, 135, 3, 18, 9, 0, 126, 135, 3, 38, 19, 0, 127, 135, 3, 20, 10, 0, 128, 129, 3, 34, 17, 0, 129, 130, 5, 35, 0, 0, 130, 135, 1, 0, 0, 0, 131, 135, 3, 22, 11, 0, 132, 135, 3, 24, 12, 0, 133, 135, 3, 32, 16, 0, 134, 125, 1, 0, 0, 0, 134, 126, 1, 0, 0, 0, 134, 127, 1, 0, 0, 0, 134, 128, 1, 0, 0, 0, 134, 131, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 134, 133, 1, 0, 0, 0, 135, 17, 1, 0, 0, 0, 136, 137, 3, 56, 28, 0, 137, 138, 3, 60, 30, 0, 138, 141, 5, 25, 0, 0, 139, 142, 3, 42, 21, 0, 140, 142, 3, 40, 20, 0, 141, 139, 1, 0, 0, 0, 141, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 144, 5, 35, 0, 0, 144, 19, 1, 0, 0, 0, 145, 146, 3, 60, 30, 0, 146, 149, 5, 25, 0, 0, 147, 150, 3, 42, 21, 0, 148, 150, 3, 40, 20, 0, 149, 147, 1, 0, 0, 0, 149, 148, 1, 0, 0, 0, 150, 151, 1, 0, 0, 0, 151, 152, 5, 35, 0, 0, 152, 162, 1, 0, 0, 0, 153, 154, 3, 60, 30, 0, 154, 157, 5, 26, 0, 0, 155, 158, 3, 42, 21, 0, 156, 158, 3, 40, 20, 0, 157, 155, 1, 0, 0, 0, 157, 156, 1, 0, 0, 0, 158, 159, 1, 0, 0, 0, 159, 160, 5, 35, 0, 0, 160, 162, 1, 0, 0, 0, 161, 145, 1, 0, 0, 0, 161, 153, 1, 0, 0, 0, 162, 21, 1, 0, 0, 0, 163, 164, 5, 11, 0, 0, 164, 165, 3, 26, 13, 0, 165, 168, 3, 14, 7, 0, 166, 169, 3, 30, 15, 0, 167, 169, 3, 28, 14, 0, 168, 166, 1, 0, 0, 0, 168, 167, 1, 0, 0, 0, 168, 169, 1, 0, 0, 0, 169, 23, 1, 0, 0, 0, 170, 171, 5, 12, 0, 0, 171, 172, 3, 26, 13, 0, 172, 173, 3, 14, 7, 0, 173, 25, 1, 0, 0, 0, 174, 175, 5, 27, 0, 0, 175, 176, 3, 46, 23, 0, 176, 177, 5, 28, 0, 0, 177, 27, 1, 0, 0, 0, 178, 179, 5, 13, 0, 0, 179, 180, 3, 22, 11, 0, 180, 29, 1, 0, 0, 0, 181, 182, 5, 13, 0, 0, 182, 183, 3, 14, 7, 0, 183, 31, 1, 0, 0, 0, 184, 188, 5, 24, 0, 0, 185, 187, 8, 0, 0, 0, 186, 185, 1, 0, 0, 0, 187, 190, 1, 0, 0, 0, 188, 186, 1, 0, 0, 0, 188, 189, 1, 0, 0, 0, 189, 33, 1, 0, 0, 0, 190, 188, 1, 0, 0, 0, 191, 192, 3, 60, 30, 0, 192, 193, 3, 36, 18, 0, 193, 35, 1, 0, 0, 0, 194, 196, 5, 27, 0, 0, 195, 197, 3, 40, 20, 0, 196, 195, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 202, 1, 0, 0, 0, 198, 199, 5, 33, 0, 0, 199, 201, 3, 40, 20, 0, 200, 198, 1, 0, 0, 0, 201, 204, 1, 0, 0, 0, 202, 200, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 205, 1, 0, 0, 0, 204, 202, 1, 0, 0, 0, 205, 206, 5, 28, 0, 0, 206, 37, 1, 0, 0, 0, 207, 208, 5, 6, 0, 0, 208, 209, 3, 40, 20, 0, 209, 210, 5, 35, 0, 0, 210, 214, 1, 0, 0, 0, 211, 212, 5, 6, 0, 0, 212, 214, 5, 35, 0, 0, 213, 207, 1, 0, 0, 0, 213, 211, 1, 0, 0, 0, 214, 39, 1, 0, 0, 0, 215, 217, 3, 60, 30, 0, 216, 218, 5, 20, 0, 0, 217, 216, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 221, 1, 0, 0, 0, 219, 221, 3, 44, 22, 0, 220, 215, 1, 0, 0, 0, 220, 219, 1, 0, 0, 0, 221, 41, 1, 0, 0, 0, 222, 225, 3, 46, 23, 0, 223, 225, 3, 34, 17, 0, 224, 222, 1, 0, 0, 0, 224, 223, 1, 0, 0, 0, 225, 43, 1, 0, 0, 0, 226, 227, 7, 1, 0, 0, 227, 45, 1, 0, 0, 0, 228, 229, 3, 40, 20, 0, 229, 230, 5, 19, 0, 0, 230, 231, 3, 40, 20, 0, 231, 47, 1, 0, 0, 0, 232, 233, 5, 27, 0, 0, 233, 246, 5, 28, 0, 0, 234, 235, 5, 27, 0, 0, 235, 240, 3, 50, 25, 0, 236, 237, 5, 33, 0, 0, 237, 239, 3, 50, 25, 0, 238, 236, 1, 0, 0, 0, 239, 242, 1, 0, 0, 0, 240, 238, 1, 0, 0, 0, 240, 241, 1, 0, 0, 0, 241, 243, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 243, 244, 5, 28, 0, 0, 244, 246, 1, 0, 0, 0, 245, 232, 1, 0, 0, 0, 245, 234, 1, 0, 0, 0, 246, 49, 1, 0, 0, 0, 247, 248, 3, 56, 28, 0, 248, 249, 3, 60, 30, 0, 249, 51, 1, 0, 0, 0, 250, 251, 5, 7, 0, 0, 251, 252, 3, 60, 30, 0, 252, 253, 3, 54, 27, 0, 253, 53, 1, 0, 0, 0, 254, 258, 5, 31, 0, 0, 255, 257, 3, 18, 9, 0, 256, 255, 1, 0, 0, 0, 257, 260, 1, 0, 0, 0, 258, 256, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 261, 1, 0, 0, 0, 260, 258, 1, 0, 0, 0, 261, 262, 5, 32, 0, 0, 262, 55, 1, 0, 0, 0, 263, 269, 5, 15, 0, 0, 264, 269, 5, 16, 0, 0, 265, 269, 3, 60, 30, 0, 266, 269, 3, 58, 29, 0, 267, 269, 5, 17, 0, 0, 268, 263, 1, 0, 0, 0, 268, 264, 1, 0, 0, 0, 268, 265, 1, 0, 0, 0, 268, 266, 1, 0, 0, 0, 268, 267, 1, 0, 0, 0, 269, 57, 1, 0, 0, 0, 270, 271, 5, 29, 0, 0, 271, 272, 3, 56, 28, 0, 272, 273, 5, 30, 0, 0, 273, 59, 1, 0, 0, 0, 274, 275, 5, 44, 0, 0, 275, 277, 5, 34, 0, 0, 276, 274, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 279, 5, 44, 0, 0, 279, 61, 1, 0, 0, 0, 23, 65, 71, 77, 103, 120, 134, 141, 149, 157, 161, 168, 188, 196, 202, 213, 217, 220, 224, 240, 245, 258, 268, 276]
\ No newline at end of file
+[4, 1, 45, 293, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 1, 0, 5, 0, 66, 8, 0, 10, 0, 12, 0, 69, 9, 0, 1, 0, 5, 0, 72, 8, 0, 10, 0, 12, 0, 75, 9, 0, 1, 0, 5, 0, 78, 8, 0, 10, 0, 12, 0, 81, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 3, 3, 108, 8, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 5, 7, 123, 8, 7, 10, 7, 12, 7, 126, 9, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 140, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 147, 8, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 155, 8, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 163, 8, 10, 1, 10, 1, 10, 3, 10, 167, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 174, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 5, 16, 192, 8, 16, 10, 16, 12, 16, 195, 9, 16, 1, 17, 1, 17, 5, 17, 199, 8, 17, 10, 17, 12, 17, 202, 9, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 209, 8, 19, 1, 19, 1, 19, 5, 19, 213, 8, 19, 10, 19, 12, 19, 216, 9, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 226, 8, 20, 1, 21, 1, 21, 3, 21, 230, 8, 21, 1, 21, 3, 21, 233, 8, 21, 1, 22, 1, 22, 3, 22, 237, 8, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 251, 8, 25, 10, 25, 12, 25, 254, 9, 25, 1, 25, 1, 25, 3, 25, 258, 8, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 5, 28, 269, 8, 28, 10, 28, 12, 28, 272, 9, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 281, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 3, 31, 289, 8, 31, 1, 31, 1, 31, 1, 31, 0, 0, 32, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 0, 2, 1, 0, 1, 2, 2, 0, 17, 18, 43, 43, 295, 0, 67, 1, 0, 0, 0, 2, 84, 1, 0, 0, 0, 4, 91, 1, 0, 0, 0, 6, 107, 1, 0, 0, 0, 8, 109, 1, 0, 0, 0, 10, 112, 1, 0, 0, 0, 12, 117, 1, 0, 0, 0, 14, 120, 1, 0, 0, 0, 16, 139, 1, 0, 0, 0, 18, 141, 1, 0, 0, 0, 20, 166, 1, 0, 0, 0, 22, 168, 1, 0, 0, 0, 24, 175, 1, 0, 0, 0, 26, 179, 1, 0, 0, 0, 28, 183, 1, 0, 0, 0, 30, 186, 1, 0, 0, 0, 32, 189, 1, 0, 0, 0, 34, 196, 1, 0, 0, 0, 36, 203, 1, 0, 0, 0, 38, 206, 1, 0, 0, 0, 40, 225, 1, 0, 0, 0, 42, 232, 1, 0, 0, 0, 44, 236, 1, 0, 0, 0, 46, 238, 1, 0, 0, 0, 48, 240, 1, 0, 0, 0, 50, 257, 1, 0, 0, 0, 52, 259, 1, 0, 0, 0, 54, 262, 1, 0, 0, 0, 56, 266, 1, 0, 0, 0, 58, 280, 1, 0, 0, 0, 60, 282, 1, 0, 0, 0, 62, 288, 1, 0, 0, 0, 64, 66, 3, 2, 1, 0, 65, 64, 1, 0, 0, 0, 66, 69, 1, 0, 0, 0, 67, 65, 1, 0, 0, 0, 67, 68, 1, 0, 0, 0, 68, 73, 1, 0, 0, 0, 69, 67, 1, 0, 0, 0, 70, 72, 3, 4, 2, 0, 71, 70, 1, 0, 0, 0, 72, 75, 1, 0, 0, 0, 73, 71, 1, 0, 0, 0, 73, 74, 1, 0, 0, 0, 74, 79, 1, 0, 0, 0, 75, 73, 1, 0, 0, 0, 76, 78, 3, 6, 3, 0, 77, 76, 1, 0, 0, 0, 78, 81, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 80, 82, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 82, 83, 5, 0, 0, 1, 83, 1, 1, 0, 0, 0, 84, 85, 5, 38, 0, 0, 85, 86, 5, 8, 0, 0, 86, 87, 5, 44, 0, 0, 87, 88, 5, 10, 0, 0, 88, 89, 3, 62, 31, 0, 89, 90, 5, 36, 0, 0, 90, 3, 1, 0, 0, 0, 91, 92, 5, 38, 0, 0, 92, 93, 5, 9, 0, 0, 93, 94, 5, 28, 0, 0, 94, 95, 3, 58, 29, 0, 95, 96, 5, 19, 0, 0, 96, 97, 3, 58, 29, 0, 97, 98, 5, 29, 0, 0, 98, 99, 5, 23, 0, 0, 99, 100, 5, 32, 0, 0, 100, 101, 3, 62, 31, 0, 101, 102, 5, 33, 0, 0, 102, 103, 5, 36, 0, 0, 103, 5, 1, 0, 0, 0, 104, 108, 3, 8, 4, 0, 105, 108, 3, 10, 5, 0, 106, 108, 3, 54, 27, 0, 107, 104, 1, 0, 0, 0, 107, 105, 1, 0, 0, 0, 107, 106, 1, 0, 0, 0, 108, 7, 1, 0, 0, 0, 109, 110, 5, 5, 0, 0, 110, 111, 3, 18, 9, 0, 111, 9, 1, 0, 0, 0, 112, 113, 5, 4, 0, 0, 113, 114, 3, 58, 29, 0, 114, 115, 3, 12, 6, 0, 115, 116, 3, 14, 7, 0, 116, 11, 1, 0, 0, 0, 117, 118, 3, 62, 31, 0, 118, 119, 3, 50, 25, 0, 119, 13, 1, 0, 0, 0, 120, 124, 5, 32, 0, 0, 121, 123, 3, 16, 8, 0, 122, 121, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 127, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 127, 128, 5, 33, 0, 0, 128, 15, 1, 0, 0, 0, 129, 140, 3, 18, 9, 0, 130, 140, 3, 40, 20, 0, 131, 140, 3, 20, 10, 0, 132, 133, 3, 36, 18, 0, 133, 134, 5, 36, 0, 0, 134, 140, 1, 0, 0, 0, 135, 140, 3, 22, 11, 0, 136, 140, 3, 24, 12, 0, 137, 140, 3, 32, 16, 0, 138, 140, 3, 34, 17, 0, 139, 129, 1, 0, 0, 0, 139, 130, 1, 0, 0, 0, 139, 131, 1, 0, 0, 0, 139, 132, 1, 0, 0, 0, 139, 135, 1, 0, 0, 0, 139, 136, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 139, 138, 1, 0, 0, 0, 140, 17, 1, 0, 0, 0, 141, 142, 3, 58, 29, 0, 142, 143, 3, 62, 31, 0, 143, 146, 5, 26, 0, 0, 144, 147, 3, 44, 22, 0, 145, 147, 3, 42, 21, 0, 146, 144, 1, 0, 0, 0, 146, 145, 1, 0, 0, 0, 147, 148, 1, 0, 0, 0, 148, 149, 5, 36, 0, 0, 149, 19, 1, 0, 0, 0, 150, 151, 3, 62, 31, 0, 151, 154, 5, 26, 0, 0, 152, 155, 3, 44, 22, 0, 153, 155, 3, 42, 21, 0, 154, 152, 1, 0, 0, 0, 154, 153, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 157, 5, 36, 0, 0, 157, 167, 1, 0, 0, 0, 158, 159, 3, 62, 31, 0, 159, 162, 5, 27, 0, 0, 160, 163, 3, 44, 22, 0, 161, 163, 3, 42, 21, 0, 162, 160, 1, 0, 0, 0, 162, 161, 1, 0, 0, 0, 163, 164, 1, 0, 0, 0, 164, 165, 5, 36, 0, 0, 165, 167, 1, 0, 0, 0, 166, 150, 1, 0, 0, 0, 166, 158, 1, 0, 0, 0, 167, 21, 1, 0, 0, 0, 168, 169, 5, 11, 0, 0, 169, 170, 3, 26, 13, 0, 170, 173, 3, 14, 7, 0, 171, 174, 3, 30, 15, 0, 172, 174, 3, 28, 14, 0, 173, 171, 1, 0, 0, 0, 173, 172, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 23, 1, 0, 0, 0, 175, 176, 5, 12, 0, 0, 176, 177, 3, 26, 13, 0, 177, 178, 3, 14, 7, 0, 178, 25, 1, 0, 0, 0, 179, 180, 5, 28, 0, 0, 180, 181, 3, 48, 24, 0, 181, 182, 5, 29, 0, 0, 182, 27, 1, 0, 0, 0, 183, 184, 5, 13, 0, 0, 184, 185, 3, 22, 11, 0, 185, 29, 1, 0, 0, 0, 186, 187, 5, 13, 0, 0, 187, 188, 3, 14, 7, 0, 188, 31, 1, 0, 0, 0, 189, 193, 5, 24, 0, 0, 190, 192, 8, 0, 0, 0, 191, 190, 1, 0, 0, 0, 192, 195, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 33, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, 196, 200, 5, 25, 0, 0, 197, 199, 8, 0, 0, 0, 198, 197, 1, 0, 0, 0, 199, 202, 1, 0, 0, 0, 200, 198, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 35, 1, 0, 0, 0, 202, 200, 1, 0, 0, 0, 203, 204, 3, 62, 31, 0, 204, 205, 3, 38, 19, 0, 205, 37, 1, 0, 0, 0, 206, 208, 5, 28, 0, 0, 207, 209, 3, 42, 21, 0, 208, 207, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 214, 1, 0, 0, 0, 210, 211, 5, 34, 0, 0, 211, 213, 3, 42, 21, 0, 212, 210, 1, 0, 0, 0, 213, 216, 1, 0, 0, 0, 214, 212, 1, 0, 0, 0, 214, 215, 1, 0, 0, 0, 215, 217, 1, 0, 0, 0, 216, 214, 1, 0, 0, 0, 217, 218, 5, 29, 0, 0, 218, 39, 1, 0, 0, 0, 219, 220, 5, 6, 0, 0, 220, 221, 3, 42, 21, 0, 221, 222, 5, 36, 0, 0, 222, 226, 1, 0, 0, 0, 223, 224, 5, 6, 0, 0, 224, 226, 5, 36, 0, 0, 225, 219, 1, 0, 0, 0, 225, 223, 1, 0, 0, 0, 226, 41, 1, 0, 0, 0, 227, 229, 3, 62, 31, 0, 228, 230, 5, 20, 0, 0, 229, 228, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 233, 1, 0, 0, 0, 231, 233, 3, 46, 23, 0, 232, 227, 1, 0, 0, 0, 232, 231, 1, 0, 0, 0, 233, 43, 1, 0, 0, 0, 234, 237, 3, 48, 24, 0, 235, 237, 3, 36, 18, 0, 236, 234, 1, 0, 0, 0, 236, 235, 1, 0, 0, 0, 237, 45, 1, 0, 0, 0, 238, 239, 7, 1, 0, 0, 239, 47, 1, 0, 0, 0, 240, 241, 3, 42, 21, 0, 241, 242, 5, 19, 0, 0, 242, 243, 3, 42, 21, 0, 243, 49, 1, 0, 0, 0, 244, 245, 5, 28, 0, 0, 245, 258, 5, 29, 0, 0, 246, 247, 5, 28, 0, 0, 247, 252, 3, 52, 26, 0, 248, 249, 5, 34, 0, 0, 249, 251, 3, 52, 26, 0, 250, 248, 1, 0, 0, 0, 251, 254, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 252, 253, 1, 0, 0, 0, 253, 255, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 255, 256, 5, 29, 0, 0, 256, 258, 1, 0, 0, 0, 257, 244, 1, 0, 0, 0, 257, 246, 1, 0, 0, 0, 258, 51, 1, 0, 0, 0, 259, 260, 3, 58, 29, 0, 260, 261, 3, 62, 31, 0, 261, 53, 1, 0, 0, 0, 262, 263, 5, 7, 0, 0, 263, 264, 3, 62, 31, 0, 264, 265, 3, 56, 28, 0, 265, 55, 1, 0, 0, 0, 266, 270, 5, 32, 0, 0, 267, 269, 3, 18, 9, 0, 268, 267, 1, 0, 0, 0, 269, 272, 1, 0, 0, 0, 270, 268, 1, 0, 0, 0, 270, 271, 1, 0, 0, 0, 271, 273, 1, 0, 0, 0, 272, 270, 1, 0, 0, 0, 273, 274, 5, 33, 0, 0, 274, 57, 1, 0, 0, 0, 275, 281, 5, 15, 0, 0, 276, 281, 5, 16, 0, 0, 277, 281, 3, 62, 31, 0, 278, 281, 3, 60, 30, 0, 279, 281, 5, 17, 0, 0, 280, 275, 1, 0, 0, 0, 280, 276, 1, 0, 0, 0, 280, 277, 1, 0, 0, 0, 280, 278, 1, 0, 0, 0, 280, 279, 1, 0, 0, 0, 281, 59, 1, 0, 0, 0, 282, 283, 5, 30, 0, 0, 283, 284, 3, 58, 29, 0, 284, 285, 5, 31, 0, 0, 285, 61, 1, 0, 0, 0, 286, 287, 5, 45, 0, 0, 287, 289, 5, 35, 0, 0, 288, 286, 1, 0, 0, 0, 288, 289, 1, 0, 0, 0, 289, 290, 1, 0, 0, 0, 290, 291, 5, 45, 0, 0, 291, 63, 1, 0, 0, 0, 24, 67, 73, 79, 107, 124, 139, 146, 154, 162, 166, 173, 193, 200, 208, 214, 225, 229, 232, 236, 252, 257, 270, 280, 288]
\ No newline at end of file
diff --git a/Crimson/Antlr/Output/Crimson.tokens b/Crimson/Antlr/Output/Crimson.tokens
index c0b3af8..8940016 100644
--- a/Crimson/Antlr/Output/Crimson.tokens
+++ b/Crimson/Antlr/Output/Crimson.tokens
@@ -21,27 +21,28 @@ Asterisk=20
MathsOperator=21
Comparator=22
RightArrow=23
-Tilda=24
-DirectEquals=25
-PointerEquals=26
-OpenBracket=27
-CloseBracket=28
-OpenSquare=29
-CloseSquare=30
-OpenBrace=31
-CloseBrace=32
-Comma=33
-Dot=34
-SemiColon=35
-Underscore=36
-Hashtag=37
-Quote=38
-SkipTokens=39
-LineComment=40
-BlockComment=41
-Number=42
-String=43
-ShortName=44
+BasicCall=24
+AssemblyCall=25
+DirectEquals=26
+PointerEquals=27
+OpenBracket=28
+CloseBracket=29
+OpenSquare=30
+CloseSquare=31
+OpenBrace=32
+CloseBrace=33
+Comma=34
+Dot=35
+SemiColon=36
+Underscore=37
+Hashtag=38
+Quote=39
+SkipTokens=40
+LineComment=41
+BlockComment=42
+Number=43
+String=44
+ShortName=45
'\r'=1
'\n'=2
'allocator'=3
@@ -61,18 +62,19 @@ ShortName=44
'null'=17
'*'=20
'->'=23
-'~'=24
-'='=25
-'*='=26
-'('=27
-')'=28
-'['=29
-']'=30
-'{'=31
-'}'=32
-','=33
-'.'=34
-';'=35
-'_'=36
-'#'=37
-'"'=38
+'B~'=24
+'A~'=25
+'='=26
+'*='=27
+'('=28
+')'=29
+'['=30
+']'=31
+'{'=32
+'}'=33
+','=34
+'.'=35
+';'=36
+'_'=37
+'#'=38
+'"'=39
diff --git a/Crimson/Antlr/Output/CrimsonBaseListener.cs b/Crimson/Antlr/Output/CrimsonBaseListener.cs
index 949fb12..3eb994d 100644
--- a/Crimson/Antlr/Output/CrimsonBaseListener.cs
+++ b/Crimson/Antlr/Output/CrimsonBaseListener.cs
@@ -247,6 +247,20 @@ public virtual void EnterFunctionWhileStatement([NotNull] CrimsonParser.Function
/// The parse tree.
public virtual void ExitFunctionWhileStatement([NotNull] CrimsonParser.FunctionWhileStatementContext context) { }
///
+ /// Enter a parse tree produced by the FunctionBasicCallStatement
+ /// labeled alternative in .
+ /// The default implementation does nothing.
+ ///
+ /// The parse tree.
+ public virtual void EnterFunctionBasicCallStatement([NotNull] CrimsonParser.FunctionBasicCallStatementContext context) { }
+ ///
+ /// Exit a parse tree produced by the FunctionBasicCallStatement
+ /// labeled alternative in .
+ /// The default implementation does nothing.
+ ///
+ /// The parse tree.
+ public virtual void ExitFunctionBasicCallStatement([NotNull] CrimsonParser.FunctionBasicCallStatementContext context) { }
+ ///
/// Enter a parse tree produced by the FunctionAssemblyCallStatement
/// labeled alternative in .
/// The default implementation does nothing.
@@ -361,6 +375,18 @@ public virtual void EnterElseBlock([NotNull] CrimsonParser.ElseBlockContext cont
/// The parse tree.
public virtual void ExitElseBlock([NotNull] CrimsonParser.ElseBlockContext context) { }
///
+ /// Enter a parse tree produced by .
+ /// The default implementation does nothing.
+ ///
+ /// The parse tree.
+ public virtual void EnterBasicCall([NotNull] CrimsonParser.BasicCallContext context) { }
+ ///
+ /// Exit a parse tree produced by .
+ /// The default implementation does nothing.
+ ///
+ /// The parse tree.
+ public virtual void ExitBasicCall([NotNull] CrimsonParser.BasicCallContext context) { }
+ ///
/// Enter a parse tree produced by .
/// The default implementation does nothing.
///
diff --git a/Crimson/Antlr/Output/CrimsonBaseVisitor.cs b/Crimson/Antlr/Output/CrimsonBaseVisitor.cs
index dd71e52..0144bdc 100644
--- a/Crimson/Antlr/Output/CrimsonBaseVisitor.cs
+++ b/Crimson/Antlr/Output/CrimsonBaseVisitor.cs
@@ -205,6 +205,17 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitorThe visitor result.
public virtual Result VisitFunctionWhileStatement([NotNull] CrimsonParser.FunctionWhileStatementContext context) { return VisitChildren(context); }
///
+ /// Visit a parse tree produced by the FunctionBasicCallStatement
+ /// labeled alternative in .
+ ///
+ /// The default implementation returns the result of calling
+ /// on .
+ ///
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ public virtual Result VisitFunctionBasicCallStatement([NotNull] CrimsonParser.FunctionBasicCallStatementContext context) { return VisitChildren(context); }
+ ///
/// Visit a parse tree produced by the FunctionAssemblyCallStatement
/// labeled alternative in .
///
@@ -298,6 +309,16 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitorThe visitor result.
public virtual Result VisitElseBlock([NotNull] CrimsonParser.ElseBlockContext context) { return VisitChildren(context); }
///
+ /// Visit a parse tree produced by .
+ ///
+ /// The default implementation returns the result of calling
+ /// on .
+ ///
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ public virtual Result VisitBasicCall([NotNull] CrimsonParser.BasicCallContext context) { return VisitChildren(context); }
+ ///
/// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
diff --git a/Crimson/Antlr/Output/CrimsonLexer.cs b/Crimson/Antlr/Output/CrimsonLexer.cs
index ef1d200..541a61b 100644
--- a/Crimson/Antlr/Output/CrimsonLexer.cs
+++ b/Crimson/Antlr/Output/CrimsonLexer.cs
@@ -37,11 +37,11 @@ public const int
T__0=1, T__1=2, Allocator=3, Function=4, Global=5, Return=6, Structure=7,
Using=8, OpHandler=9, As=10, If=11, While=12, Else=13, Elif=14, Integer=15,
Boolean=16, Null=17, BooleanValue=18, Operator=19, Asterisk=20, MathsOperator=21,
- Comparator=22, RightArrow=23, Tilda=24, DirectEquals=25, PointerEquals=26,
- OpenBracket=27, CloseBracket=28, OpenSquare=29, CloseSquare=30, OpenBrace=31,
- CloseBrace=32, Comma=33, Dot=34, SemiColon=35, Underscore=36, Hashtag=37,
- Quote=38, SkipTokens=39, LineComment=40, BlockComment=41, Number=42, String=43,
- ShortName=44;
+ Comparator=22, RightArrow=23, BasicCall=24, AssemblyCall=25, DirectEquals=26,
+ PointerEquals=27, OpenBracket=28, CloseBracket=29, OpenSquare=30, CloseSquare=31,
+ OpenBrace=32, CloseBrace=33, Comma=34, Dot=35, SemiColon=36, Underscore=37,
+ Hashtag=38, Quote=39, SkipTokens=40, LineComment=41, BlockComment=42,
+ Number=43, String=44, ShortName=45;
public static string[] channelNames = {
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
};
@@ -55,12 +55,12 @@ public const int
"Using", "OpHandler", "As", "If", "While", "Else", "Elif", "Integer",
"Boolean", "Null", "True", "False", "BooleanValue", "Operator", "Plus",
"Minus", "Asterisk", "Slash", "MathsOperator", "Less", "LessEqual", "Greater",
- "GreaterEqual", "EqualTo", "Comparator", "RightArrow", "Tilda", "DirectEquals",
- "PointerEquals", "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare",
- "OpenBrace", "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore",
- "Hashtag", "Quote", "SkipTokens", "LineComment", "BlockComment", "Number",
- "String", "ShortName", "Alphabetic", "Digit", "Punctuation", "WhiteSpace",
- "Newline"
+ "GreaterEqual", "EqualTo", "Comparator", "RightArrow", "BasicCall", "AssemblyCall",
+ "DirectEquals", "PointerEquals", "OpenBracket", "CloseBracket", "OpenSquare",
+ "CloseSquare", "OpenBrace", "CloseBrace", "Comma", "Dot", "SemiColon",
+ "Underscore", "Hashtag", "Quote", "SkipTokens", "LineComment", "BlockComment",
+ "Number", "String", "ShortName", "Alphabetic", "Digit", "Punctuation",
+ "WhiteSpace", "Newline"
};
@@ -77,17 +77,18 @@ public CrimsonLexer(ICharStream input, TextWriter output, TextWriter errorOutput
null, "'\\r'", "'\\n'", "'allocator'", "'function'", "'global'", "'return'",
"'structure'", "'using'", "'ophandler'", "'as'", "'if'", "'while'", "'else'",
"'elif'", "'int'", "'bool'", "'null'", null, null, "'*'", null, null,
- "'->'", "'~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'", "'}'",
- "','", "'.'", "';'", "'_'", "'#'", "'\"'"
+ "'->'", "'B~'", "'A~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'",
+ "'}'", "','", "'.'", "';'", "'_'", "'#'", "'\"'"
};
private static readonly string[] _SymbolicNames = {
null, null, null, "Allocator", "Function", "Global", "Return", "Structure",
"Using", "OpHandler", "As", "If", "While", "Else", "Elif", "Integer",
"Boolean", "Null", "BooleanValue", "Operator", "Asterisk", "MathsOperator",
- "Comparator", "RightArrow", "Tilda", "DirectEquals", "PointerEquals",
- "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare", "OpenBrace",
- "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore", "Hashtag", "Quote",
- "SkipTokens", "LineComment", "BlockComment", "Number", "String", "ShortName"
+ "Comparator", "RightArrow", "BasicCall", "AssemblyCall", "DirectEquals",
+ "PointerEquals", "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare",
+ "OpenBrace", "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore",
+ "Hashtag", "Quote", "SkipTokens", "LineComment", "BlockComment", "Number",
+ "String", "ShortName"
};
public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames);
@@ -117,7 +118,7 @@ static CrimsonLexer() {
}
}
private static int[] _serializedATN = {
- 4,0,44,375,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,
+ 4,0,45,382,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,
6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,
7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,
7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,
@@ -125,119 +126,121 @@ static CrimsonLexer() {
7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,
7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,
7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,
- 7,56,2,57,7,57,2,58,7,58,1,0,1,0,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,
- 2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,
- 1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,
- 6,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,
- 1,9,1,9,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,
- 12,1,12,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,
- 15,1,15,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,
- 18,1,18,1,18,1,18,1,19,1,19,3,19,232,8,19,1,20,1,20,3,20,236,8,20,1,21,
- 1,21,1,22,1,22,1,23,1,23,1,24,1,24,1,25,1,25,1,25,1,25,3,25,250,8,25,1,
- 26,1,26,1,27,1,27,1,27,1,28,1,28,1,29,1,29,1,29,1,30,1,30,1,30,1,31,1,
- 31,1,31,1,31,1,31,3,31,270,8,31,1,32,1,32,1,32,1,33,1,33,1,34,1,34,1,35,
- 1,35,1,35,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,1,40,1,40,1,41,1,41,
- 1,42,1,42,1,43,1,43,1,44,1,44,1,45,1,45,1,46,1,46,1,47,1,47,1,48,1,48,
- 1,48,1,48,3,48,310,8,48,1,48,1,48,1,49,1,49,1,49,1,49,5,49,318,8,49,10,
- 49,12,49,321,9,49,1,50,1,50,1,50,1,50,5,50,327,8,50,10,50,12,50,330,9,
- 50,1,50,1,50,1,50,1,51,4,51,336,8,51,11,51,12,51,337,1,52,1,52,5,52,342,
- 8,52,10,52,12,52,345,9,52,1,52,1,52,1,53,1,53,1,53,1,53,4,53,353,8,53,
- 11,53,12,53,354,1,54,1,54,1,55,1,55,1,56,1,56,1,57,4,57,364,8,57,11,57,
- 12,57,365,1,58,4,58,369,8,58,11,58,12,58,370,1,58,3,58,374,8,58,2,328,
- 354,0,59,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,
- 13,27,14,29,15,31,16,33,17,35,0,37,0,39,18,41,19,43,0,45,0,47,20,49,0,
- 51,21,53,0,55,0,57,0,59,0,61,0,63,22,65,23,67,24,69,25,71,26,73,27,75,
- 28,77,29,79,30,81,31,83,32,85,33,87,34,89,35,91,36,93,37,95,38,97,39,99,
- 40,101,41,103,42,105,43,107,44,109,0,111,0,113,0,115,0,117,0,1,0,6,2,0,
- 10,10,13,13,1,0,34,34,2,0,65,90,97,122,1,0,48,57,2,0,46,46,95,95,2,0,9,
- 9,32,32,381,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,
- 0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,
- 1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,
- 0,0,33,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,47,1,0,0,0,0,51,1,0,0,0,0,63,
- 1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,
- 0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,
- 1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,
- 0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,
- 0,107,1,0,0,0,1,119,1,0,0,0,3,121,1,0,0,0,5,123,1,0,0,0,7,133,1,0,0,0,
- 9,142,1,0,0,0,11,149,1,0,0,0,13,156,1,0,0,0,15,166,1,0,0,0,17,172,1,0,
- 0,0,19,182,1,0,0,0,21,185,1,0,0,0,23,188,1,0,0,0,25,194,1,0,0,0,27,199,
- 1,0,0,0,29,204,1,0,0,0,31,208,1,0,0,0,33,213,1,0,0,0,35,218,1,0,0,0,37,
- 223,1,0,0,0,39,231,1,0,0,0,41,235,1,0,0,0,43,237,1,0,0,0,45,239,1,0,0,
- 0,47,241,1,0,0,0,49,243,1,0,0,0,51,249,1,0,0,0,53,251,1,0,0,0,55,253,1,
- 0,0,0,57,256,1,0,0,0,59,258,1,0,0,0,61,261,1,0,0,0,63,269,1,0,0,0,65,271,
- 1,0,0,0,67,274,1,0,0,0,69,276,1,0,0,0,71,278,1,0,0,0,73,281,1,0,0,0,75,
- 283,1,0,0,0,77,285,1,0,0,0,79,287,1,0,0,0,81,289,1,0,0,0,83,291,1,0,0,
- 0,85,293,1,0,0,0,87,295,1,0,0,0,89,297,1,0,0,0,91,299,1,0,0,0,93,301,1,
- 0,0,0,95,303,1,0,0,0,97,309,1,0,0,0,99,313,1,0,0,0,101,322,1,0,0,0,103,
- 335,1,0,0,0,105,339,1,0,0,0,107,348,1,0,0,0,109,356,1,0,0,0,111,358,1,
- 0,0,0,113,360,1,0,0,0,115,363,1,0,0,0,117,373,1,0,0,0,119,120,5,13,0,0,
- 120,2,1,0,0,0,121,122,5,10,0,0,122,4,1,0,0,0,123,124,5,97,0,0,124,125,
- 5,108,0,0,125,126,5,108,0,0,126,127,5,111,0,0,127,128,5,99,0,0,128,129,
- 5,97,0,0,129,130,5,116,0,0,130,131,5,111,0,0,131,132,5,114,0,0,132,6,1,
- 0,0,0,133,134,5,102,0,0,134,135,5,117,0,0,135,136,5,110,0,0,136,137,5,
- 99,0,0,137,138,5,116,0,0,138,139,5,105,0,0,139,140,5,111,0,0,140,141,5,
- 110,0,0,141,8,1,0,0,0,142,143,5,103,0,0,143,144,5,108,0,0,144,145,5,111,
- 0,0,145,146,5,98,0,0,146,147,5,97,0,0,147,148,5,108,0,0,148,10,1,0,0,0,
- 149,150,5,114,0,0,150,151,5,101,0,0,151,152,5,116,0,0,152,153,5,117,0,
- 0,153,154,5,114,0,0,154,155,5,110,0,0,155,12,1,0,0,0,156,157,5,115,0,0,
- 157,158,5,116,0,0,158,159,5,114,0,0,159,160,5,117,0,0,160,161,5,99,0,0,
- 161,162,5,116,0,0,162,163,5,117,0,0,163,164,5,114,0,0,164,165,5,101,0,
- 0,165,14,1,0,0,0,166,167,5,117,0,0,167,168,5,115,0,0,168,169,5,105,0,0,
- 169,170,5,110,0,0,170,171,5,103,0,0,171,16,1,0,0,0,172,173,5,111,0,0,173,
- 174,5,112,0,0,174,175,5,104,0,0,175,176,5,97,0,0,176,177,5,110,0,0,177,
- 178,5,100,0,0,178,179,5,108,0,0,179,180,5,101,0,0,180,181,5,114,0,0,181,
- 18,1,0,0,0,182,183,5,97,0,0,183,184,5,115,0,0,184,20,1,0,0,0,185,186,5,
- 105,0,0,186,187,5,102,0,0,187,22,1,0,0,0,188,189,5,119,0,0,189,190,5,104,
- 0,0,190,191,5,105,0,0,191,192,5,108,0,0,192,193,5,101,0,0,193,24,1,0,0,
- 0,194,195,5,101,0,0,195,196,5,108,0,0,196,197,5,115,0,0,197,198,5,101,
- 0,0,198,26,1,0,0,0,199,200,5,101,0,0,200,201,5,108,0,0,201,202,5,105,0,
- 0,202,203,5,102,0,0,203,28,1,0,0,0,204,205,5,105,0,0,205,206,5,110,0,0,
- 206,207,5,116,0,0,207,30,1,0,0,0,208,209,5,98,0,0,209,210,5,111,0,0,210,
- 211,5,111,0,0,211,212,5,108,0,0,212,32,1,0,0,0,213,214,5,110,0,0,214,215,
- 5,117,0,0,215,216,5,108,0,0,216,217,5,108,0,0,217,34,1,0,0,0,218,219,5,
- 116,0,0,219,220,5,114,0,0,220,221,5,117,0,0,221,222,5,101,0,0,222,36,1,
- 0,0,0,223,224,5,102,0,0,224,225,5,97,0,0,225,226,5,108,0,0,226,227,5,115,
- 0,0,227,228,5,101,0,0,228,38,1,0,0,0,229,232,3,35,17,0,230,232,3,37,18,
- 0,231,229,1,0,0,0,231,230,1,0,0,0,232,40,1,0,0,0,233,236,3,63,31,0,234,
- 236,3,51,25,0,235,233,1,0,0,0,235,234,1,0,0,0,236,42,1,0,0,0,237,238,5,
- 43,0,0,238,44,1,0,0,0,239,240,5,45,0,0,240,46,1,0,0,0,241,242,5,42,0,0,
- 242,48,1,0,0,0,243,244,5,47,0,0,244,50,1,0,0,0,245,250,3,43,21,0,246,250,
- 3,45,22,0,247,250,3,47,23,0,248,250,3,49,24,0,249,245,1,0,0,0,249,246,
- 1,0,0,0,249,247,1,0,0,0,249,248,1,0,0,0,250,52,1,0,0,0,251,252,5,60,0,
- 0,252,54,1,0,0,0,253,254,5,60,0,0,254,255,5,61,0,0,255,56,1,0,0,0,256,
- 257,5,62,0,0,257,58,1,0,0,0,258,259,5,62,0,0,259,260,5,61,0,0,260,60,1,
- 0,0,0,261,262,5,61,0,0,262,263,5,61,0,0,263,62,1,0,0,0,264,270,3,53,26,
- 0,265,270,3,55,27,0,266,270,3,57,28,0,267,270,3,59,29,0,268,270,3,61,30,
- 0,269,264,1,0,0,0,269,265,1,0,0,0,269,266,1,0,0,0,269,267,1,0,0,0,269,
- 268,1,0,0,0,270,64,1,0,0,0,271,272,5,45,0,0,272,273,5,62,0,0,273,66,1,
- 0,0,0,274,275,5,126,0,0,275,68,1,0,0,0,276,277,5,61,0,0,277,70,1,0,0,0,
- 278,279,5,42,0,0,279,280,5,61,0,0,280,72,1,0,0,0,281,282,5,40,0,0,282,
- 74,1,0,0,0,283,284,5,41,0,0,284,76,1,0,0,0,285,286,5,91,0,0,286,78,1,0,
- 0,0,287,288,5,93,0,0,288,80,1,0,0,0,289,290,5,123,0,0,290,82,1,0,0,0,291,
- 292,5,125,0,0,292,84,1,0,0,0,293,294,5,44,0,0,294,86,1,0,0,0,295,296,5,
- 46,0,0,296,88,1,0,0,0,297,298,5,59,0,0,298,90,1,0,0,0,299,300,5,95,0,0,
- 300,92,1,0,0,0,301,302,5,35,0,0,302,94,1,0,0,0,303,304,5,34,0,0,304,96,
- 1,0,0,0,305,310,3,115,57,0,306,310,3,117,58,0,307,310,3,99,49,0,308,310,
- 3,101,50,0,309,305,1,0,0,0,309,306,1,0,0,0,309,307,1,0,0,0,309,308,1,0,
- 0,0,310,311,1,0,0,0,311,312,6,48,0,0,312,98,1,0,0,0,313,314,5,47,0,0,314,
- 315,5,47,0,0,315,319,1,0,0,0,316,318,8,0,0,0,317,316,1,0,0,0,318,321,1,
- 0,0,0,319,317,1,0,0,0,319,320,1,0,0,0,320,100,1,0,0,0,321,319,1,0,0,0,
- 322,323,5,47,0,0,323,324,5,42,0,0,324,328,1,0,0,0,325,327,9,0,0,0,326,
- 325,1,0,0,0,327,330,1,0,0,0,328,329,1,0,0,0,328,326,1,0,0,0,329,331,1,
- 0,0,0,330,328,1,0,0,0,331,332,5,42,0,0,332,333,5,47,0,0,333,102,1,0,0,
- 0,334,336,3,111,55,0,335,334,1,0,0,0,336,337,1,0,0,0,337,335,1,0,0,0,337,
- 338,1,0,0,0,338,104,1,0,0,0,339,343,3,95,47,0,340,342,8,1,0,0,341,340,
- 1,0,0,0,342,345,1,0,0,0,343,341,1,0,0,0,343,344,1,0,0,0,344,346,1,0,0,
- 0,345,343,1,0,0,0,346,347,3,95,47,0,347,106,1,0,0,0,348,352,3,109,54,0,
- 349,353,3,109,54,0,350,353,3,103,51,0,351,353,3,91,45,0,352,349,1,0,0,
- 0,352,350,1,0,0,0,352,351,1,0,0,0,353,354,1,0,0,0,354,355,1,0,0,0,354,
- 352,1,0,0,0,355,108,1,0,0,0,356,357,7,2,0,0,357,110,1,0,0,0,358,359,7,
- 3,0,0,359,112,1,0,0,0,360,361,7,4,0,0,361,114,1,0,0,0,362,364,7,5,0,0,
- 363,362,1,0,0,0,364,365,1,0,0,0,365,363,1,0,0,0,365,366,1,0,0,0,366,116,
- 1,0,0,0,367,369,7,0,0,0,368,367,1,0,0,0,369,370,1,0,0,0,370,368,1,0,0,
- 0,370,371,1,0,0,0,371,374,1,0,0,0,372,374,5,0,0,1,373,368,1,0,0,0,373,
- 372,1,0,0,0,374,118,1,0,0,0,15,0,231,235,249,269,309,319,328,337,343,352,
- 354,365,370,373,1,6,0,0
+ 7,56,2,57,7,57,2,58,7,58,2,59,7,59,1,0,1,0,1,1,1,1,1,2,1,2,1,2,1,2,1,2,
+ 1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,
+ 4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,
+ 1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,
+ 8,1,8,1,9,1,9,1,9,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,12,1,
+ 12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,15,1,
+ 15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,
+ 18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,3,19,234,8,19,1,20,1,20,3,20,238,
+ 8,20,1,21,1,21,1,22,1,22,1,23,1,23,1,24,1,24,1,25,1,25,1,25,1,25,3,25,
+ 252,8,25,1,26,1,26,1,27,1,27,1,27,1,28,1,28,1,29,1,29,1,29,1,30,1,30,1,
+ 30,1,31,1,31,1,31,1,31,1,31,3,31,272,8,31,1,32,1,32,1,32,1,33,1,33,1,33,
+ 1,34,1,34,1,34,1,35,1,35,1,36,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,
+ 1,40,1,40,1,41,1,41,1,42,1,42,1,43,1,43,1,44,1,44,1,45,1,45,1,46,1,46,
+ 1,47,1,47,1,48,1,48,1,49,1,49,1,49,1,49,3,49,316,8,49,1,49,1,49,1,50,1,
+ 50,1,50,1,50,5,50,324,8,50,10,50,12,50,327,9,50,1,51,1,51,1,51,1,51,5,
+ 51,333,8,51,10,51,12,51,336,9,51,1,51,1,51,1,51,1,52,4,52,342,8,52,11,
+ 52,12,52,343,1,53,1,53,5,53,348,8,53,10,53,12,53,351,9,53,1,53,1,53,1,
+ 54,1,54,1,54,1,54,5,54,359,8,54,10,54,12,54,362,9,54,1,55,1,55,1,56,1,
+ 56,1,57,1,57,1,58,4,58,371,8,58,11,58,12,58,372,1,59,4,59,376,8,59,11,
+ 59,12,59,377,1,59,3,59,381,8,59,1,334,0,60,1,1,3,2,5,3,7,4,9,5,11,6,13,
+ 7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,0,37,0,
+ 39,18,41,19,43,0,45,0,47,20,49,0,51,21,53,0,55,0,57,0,59,0,61,0,63,22,
+ 65,23,67,24,69,25,71,26,73,27,75,28,77,29,79,30,81,31,83,32,85,33,87,34,
+ 89,35,91,36,93,37,95,38,97,39,99,40,101,41,103,42,105,43,107,44,109,45,
+ 111,0,113,0,115,0,117,0,119,0,1,0,6,2,0,10,10,13,13,1,0,34,34,2,0,65,90,
+ 97,122,1,0,48,57,2,0,46,46,95,95,2,0,9,9,32,32,388,0,1,1,0,0,0,0,3,1,0,
+ 0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,
+ 1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,
+ 0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,39,1,0,0,0,0,41,
+ 1,0,0,0,0,47,1,0,0,0,0,51,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,
+ 0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,
+ 1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,
+ 0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,
+ 1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,1,121,
+ 1,0,0,0,3,123,1,0,0,0,5,125,1,0,0,0,7,135,1,0,0,0,9,144,1,0,0,0,11,151,
+ 1,0,0,0,13,158,1,0,0,0,15,168,1,0,0,0,17,174,1,0,0,0,19,184,1,0,0,0,21,
+ 187,1,0,0,0,23,190,1,0,0,0,25,196,1,0,0,0,27,201,1,0,0,0,29,206,1,0,0,
+ 0,31,210,1,0,0,0,33,215,1,0,0,0,35,220,1,0,0,0,37,225,1,0,0,0,39,233,1,
+ 0,0,0,41,237,1,0,0,0,43,239,1,0,0,0,45,241,1,0,0,0,47,243,1,0,0,0,49,245,
+ 1,0,0,0,51,251,1,0,0,0,53,253,1,0,0,0,55,255,1,0,0,0,57,258,1,0,0,0,59,
+ 260,1,0,0,0,61,263,1,0,0,0,63,271,1,0,0,0,65,273,1,0,0,0,67,276,1,0,0,
+ 0,69,279,1,0,0,0,71,282,1,0,0,0,73,284,1,0,0,0,75,287,1,0,0,0,77,289,1,
+ 0,0,0,79,291,1,0,0,0,81,293,1,0,0,0,83,295,1,0,0,0,85,297,1,0,0,0,87,299,
+ 1,0,0,0,89,301,1,0,0,0,91,303,1,0,0,0,93,305,1,0,0,0,95,307,1,0,0,0,97,
+ 309,1,0,0,0,99,315,1,0,0,0,101,319,1,0,0,0,103,328,1,0,0,0,105,341,1,0,
+ 0,0,107,345,1,0,0,0,109,354,1,0,0,0,111,363,1,0,0,0,113,365,1,0,0,0,115,
+ 367,1,0,0,0,117,370,1,0,0,0,119,380,1,0,0,0,121,122,5,13,0,0,122,2,1,0,
+ 0,0,123,124,5,10,0,0,124,4,1,0,0,0,125,126,5,97,0,0,126,127,5,108,0,0,
+ 127,128,5,108,0,0,128,129,5,111,0,0,129,130,5,99,0,0,130,131,5,97,0,0,
+ 131,132,5,116,0,0,132,133,5,111,0,0,133,134,5,114,0,0,134,6,1,0,0,0,135,
+ 136,5,102,0,0,136,137,5,117,0,0,137,138,5,110,0,0,138,139,5,99,0,0,139,
+ 140,5,116,0,0,140,141,5,105,0,0,141,142,5,111,0,0,142,143,5,110,0,0,143,
+ 8,1,0,0,0,144,145,5,103,0,0,145,146,5,108,0,0,146,147,5,111,0,0,147,148,
+ 5,98,0,0,148,149,5,97,0,0,149,150,5,108,0,0,150,10,1,0,0,0,151,152,5,114,
+ 0,0,152,153,5,101,0,0,153,154,5,116,0,0,154,155,5,117,0,0,155,156,5,114,
+ 0,0,156,157,5,110,0,0,157,12,1,0,0,0,158,159,5,115,0,0,159,160,5,116,0,
+ 0,160,161,5,114,0,0,161,162,5,117,0,0,162,163,5,99,0,0,163,164,5,116,0,
+ 0,164,165,5,117,0,0,165,166,5,114,0,0,166,167,5,101,0,0,167,14,1,0,0,0,
+ 168,169,5,117,0,0,169,170,5,115,0,0,170,171,5,105,0,0,171,172,5,110,0,
+ 0,172,173,5,103,0,0,173,16,1,0,0,0,174,175,5,111,0,0,175,176,5,112,0,0,
+ 176,177,5,104,0,0,177,178,5,97,0,0,178,179,5,110,0,0,179,180,5,100,0,0,
+ 180,181,5,108,0,0,181,182,5,101,0,0,182,183,5,114,0,0,183,18,1,0,0,0,184,
+ 185,5,97,0,0,185,186,5,115,0,0,186,20,1,0,0,0,187,188,5,105,0,0,188,189,
+ 5,102,0,0,189,22,1,0,0,0,190,191,5,119,0,0,191,192,5,104,0,0,192,193,5,
+ 105,0,0,193,194,5,108,0,0,194,195,5,101,0,0,195,24,1,0,0,0,196,197,5,101,
+ 0,0,197,198,5,108,0,0,198,199,5,115,0,0,199,200,5,101,0,0,200,26,1,0,0,
+ 0,201,202,5,101,0,0,202,203,5,108,0,0,203,204,5,105,0,0,204,205,5,102,
+ 0,0,205,28,1,0,0,0,206,207,5,105,0,0,207,208,5,110,0,0,208,209,5,116,0,
+ 0,209,30,1,0,0,0,210,211,5,98,0,0,211,212,5,111,0,0,212,213,5,111,0,0,
+ 213,214,5,108,0,0,214,32,1,0,0,0,215,216,5,110,0,0,216,217,5,117,0,0,217,
+ 218,5,108,0,0,218,219,5,108,0,0,219,34,1,0,0,0,220,221,5,116,0,0,221,222,
+ 5,114,0,0,222,223,5,117,0,0,223,224,5,101,0,0,224,36,1,0,0,0,225,226,5,
+ 102,0,0,226,227,5,97,0,0,227,228,5,108,0,0,228,229,5,115,0,0,229,230,5,
+ 101,0,0,230,38,1,0,0,0,231,234,3,35,17,0,232,234,3,37,18,0,233,231,1,0,
+ 0,0,233,232,1,0,0,0,234,40,1,0,0,0,235,238,3,63,31,0,236,238,3,51,25,0,
+ 237,235,1,0,0,0,237,236,1,0,0,0,238,42,1,0,0,0,239,240,5,43,0,0,240,44,
+ 1,0,0,0,241,242,5,45,0,0,242,46,1,0,0,0,243,244,5,42,0,0,244,48,1,0,0,
+ 0,245,246,5,47,0,0,246,50,1,0,0,0,247,252,3,43,21,0,248,252,3,45,22,0,
+ 249,252,3,47,23,0,250,252,3,49,24,0,251,247,1,0,0,0,251,248,1,0,0,0,251,
+ 249,1,0,0,0,251,250,1,0,0,0,252,52,1,0,0,0,253,254,5,60,0,0,254,54,1,0,
+ 0,0,255,256,5,60,0,0,256,257,5,61,0,0,257,56,1,0,0,0,258,259,5,62,0,0,
+ 259,58,1,0,0,0,260,261,5,62,0,0,261,262,5,61,0,0,262,60,1,0,0,0,263,264,
+ 5,61,0,0,264,265,5,61,0,0,265,62,1,0,0,0,266,272,3,53,26,0,267,272,3,55,
+ 27,0,268,272,3,57,28,0,269,272,3,59,29,0,270,272,3,61,30,0,271,266,1,0,
+ 0,0,271,267,1,0,0,0,271,268,1,0,0,0,271,269,1,0,0,0,271,270,1,0,0,0,272,
+ 64,1,0,0,0,273,274,5,45,0,0,274,275,5,62,0,0,275,66,1,0,0,0,276,277,5,
+ 66,0,0,277,278,5,126,0,0,278,68,1,0,0,0,279,280,5,65,0,0,280,281,5,126,
+ 0,0,281,70,1,0,0,0,282,283,5,61,0,0,283,72,1,0,0,0,284,285,5,42,0,0,285,
+ 286,5,61,0,0,286,74,1,0,0,0,287,288,5,40,0,0,288,76,1,0,0,0,289,290,5,
+ 41,0,0,290,78,1,0,0,0,291,292,5,91,0,0,292,80,1,0,0,0,293,294,5,93,0,0,
+ 294,82,1,0,0,0,295,296,5,123,0,0,296,84,1,0,0,0,297,298,5,125,0,0,298,
+ 86,1,0,0,0,299,300,5,44,0,0,300,88,1,0,0,0,301,302,5,46,0,0,302,90,1,0,
+ 0,0,303,304,5,59,0,0,304,92,1,0,0,0,305,306,5,95,0,0,306,94,1,0,0,0,307,
+ 308,5,35,0,0,308,96,1,0,0,0,309,310,5,34,0,0,310,98,1,0,0,0,311,316,3,
+ 117,58,0,312,316,3,119,59,0,313,316,3,101,50,0,314,316,3,103,51,0,315,
+ 311,1,0,0,0,315,312,1,0,0,0,315,313,1,0,0,0,315,314,1,0,0,0,316,317,1,
+ 0,0,0,317,318,6,49,0,0,318,100,1,0,0,0,319,320,5,47,0,0,320,321,5,47,0,
+ 0,321,325,1,0,0,0,322,324,8,0,0,0,323,322,1,0,0,0,324,327,1,0,0,0,325,
+ 323,1,0,0,0,325,326,1,0,0,0,326,102,1,0,0,0,327,325,1,0,0,0,328,329,5,
+ 47,0,0,329,330,5,42,0,0,330,334,1,0,0,0,331,333,9,0,0,0,332,331,1,0,0,
+ 0,333,336,1,0,0,0,334,335,1,0,0,0,334,332,1,0,0,0,335,337,1,0,0,0,336,
+ 334,1,0,0,0,337,338,5,42,0,0,338,339,5,47,0,0,339,104,1,0,0,0,340,342,
+ 3,113,56,0,341,340,1,0,0,0,342,343,1,0,0,0,343,341,1,0,0,0,343,344,1,0,
+ 0,0,344,106,1,0,0,0,345,349,3,97,48,0,346,348,8,1,0,0,347,346,1,0,0,0,
+ 348,351,1,0,0,0,349,347,1,0,0,0,349,350,1,0,0,0,350,352,1,0,0,0,351,349,
+ 1,0,0,0,352,353,3,97,48,0,353,108,1,0,0,0,354,360,3,111,55,0,355,359,3,
+ 111,55,0,356,359,3,105,52,0,357,359,3,93,46,0,358,355,1,0,0,0,358,356,
+ 1,0,0,0,358,357,1,0,0,0,359,362,1,0,0,0,360,358,1,0,0,0,360,361,1,0,0,
+ 0,361,110,1,0,0,0,362,360,1,0,0,0,363,364,7,2,0,0,364,112,1,0,0,0,365,
+ 366,7,3,0,0,366,114,1,0,0,0,367,368,7,4,0,0,368,116,1,0,0,0,369,371,7,
+ 5,0,0,370,369,1,0,0,0,371,372,1,0,0,0,372,370,1,0,0,0,372,373,1,0,0,0,
+ 373,118,1,0,0,0,374,376,7,0,0,0,375,374,1,0,0,0,376,377,1,0,0,0,377,375,
+ 1,0,0,0,377,378,1,0,0,0,378,381,1,0,0,0,379,381,5,0,0,1,380,375,1,0,0,
+ 0,380,379,1,0,0,0,381,120,1,0,0,0,15,0,233,237,251,271,315,325,334,343,
+ 349,358,360,372,377,380,1,6,0,0
};
public static readonly ATN _ATN =
diff --git a/Crimson/Antlr/Output/CrimsonLexer.interp b/Crimson/Antlr/Output/CrimsonLexer.interp
index 1217d78..1853249 100644
--- a/Crimson/Antlr/Output/CrimsonLexer.interp
+++ b/Crimson/Antlr/Output/CrimsonLexer.interp
@@ -23,7 +23,8 @@ null
null
null
'->'
-'~'
+'B~'
+'A~'
'='
'*='
'('
@@ -70,7 +71,8 @@ Asterisk
MathsOperator
Comparator
RightArrow
-Tilda
+BasicCall
+AssemblyCall
DirectEquals
PointerEquals
OpenBracket
@@ -126,7 +128,8 @@ GreaterEqual
EqualTo
Comparator
RightArrow
-Tilda
+BasicCall
+AssemblyCall
DirectEquals
PointerEquals
OpenBracket
@@ -161,4 +164,4 @@ mode names:
DEFAULT_MODE
atn:
-[4, 0, 44, 375, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 232, 8, 19, 1, 20, 1, 20, 3, 20, 236, 8, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 250, 8, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 270, 8, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 310, 8, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 5, 49, 318, 8, 49, 10, 49, 12, 49, 321, 9, 49, 1, 50, 1, 50, 1, 50, 1, 50, 5, 50, 327, 8, 50, 10, 50, 12, 50, 330, 9, 50, 1, 50, 1, 50, 1, 50, 1, 51, 4, 51, 336, 8, 51, 11, 51, 12, 51, 337, 1, 52, 1, 52, 5, 52, 342, 8, 52, 10, 52, 12, 52, 345, 9, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 4, 53, 353, 8, 53, 11, 53, 12, 53, 354, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 4, 57, 364, 8, 57, 11, 57, 12, 57, 365, 1, 58, 4, 58, 369, 8, 58, 11, 58, 12, 58, 370, 1, 58, 3, 58, 374, 8, 58, 2, 328, 354, 0, 59, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 0, 37, 0, 39, 18, 41, 19, 43, 0, 45, 0, 47, 20, 49, 0, 51, 21, 53, 0, 55, 0, 57, 0, 59, 0, 61, 0, 63, 22, 65, 23, 67, 24, 69, 25, 71, 26, 73, 27, 75, 28, 77, 29, 79, 30, 81, 31, 83, 32, 85, 33, 87, 34, 89, 35, 91, 36, 93, 37, 95, 38, 97, 39, 99, 40, 101, 41, 103, 42, 105, 43, 107, 44, 109, 0, 111, 0, 113, 0, 115, 0, 117, 0, 1, 0, 6, 2, 0, 10, 10, 13, 13, 1, 0, 34, 34, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 2, 0, 46, 46, 95, 95, 2, 0, 9, 9, 32, 32, 381, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 1, 119, 1, 0, 0, 0, 3, 121, 1, 0, 0, 0, 5, 123, 1, 0, 0, 0, 7, 133, 1, 0, 0, 0, 9, 142, 1, 0, 0, 0, 11, 149, 1, 0, 0, 0, 13, 156, 1, 0, 0, 0, 15, 166, 1, 0, 0, 0, 17, 172, 1, 0, 0, 0, 19, 182, 1, 0, 0, 0, 21, 185, 1, 0, 0, 0, 23, 188, 1, 0, 0, 0, 25, 194, 1, 0, 0, 0, 27, 199, 1, 0, 0, 0, 29, 204, 1, 0, 0, 0, 31, 208, 1, 0, 0, 0, 33, 213, 1, 0, 0, 0, 35, 218, 1, 0, 0, 0, 37, 223, 1, 0, 0, 0, 39, 231, 1, 0, 0, 0, 41, 235, 1, 0, 0, 0, 43, 237, 1, 0, 0, 0, 45, 239, 1, 0, 0, 0, 47, 241, 1, 0, 0, 0, 49, 243, 1, 0, 0, 0, 51, 249, 1, 0, 0, 0, 53, 251, 1, 0, 0, 0, 55, 253, 1, 0, 0, 0, 57, 256, 1, 0, 0, 0, 59, 258, 1, 0, 0, 0, 61, 261, 1, 0, 0, 0, 63, 269, 1, 0, 0, 0, 65, 271, 1, 0, 0, 0, 67, 274, 1, 0, 0, 0, 69, 276, 1, 0, 0, 0, 71, 278, 1, 0, 0, 0, 73, 281, 1, 0, 0, 0, 75, 283, 1, 0, 0, 0, 77, 285, 1, 0, 0, 0, 79, 287, 1, 0, 0, 0, 81, 289, 1, 0, 0, 0, 83, 291, 1, 0, 0, 0, 85, 293, 1, 0, 0, 0, 87, 295, 1, 0, 0, 0, 89, 297, 1, 0, 0, 0, 91, 299, 1, 0, 0, 0, 93, 301, 1, 0, 0, 0, 95, 303, 1, 0, 0, 0, 97, 309, 1, 0, 0, 0, 99, 313, 1, 0, 0, 0, 101, 322, 1, 0, 0, 0, 103, 335, 1, 0, 0, 0, 105, 339, 1, 0, 0, 0, 107, 348, 1, 0, 0, 0, 109, 356, 1, 0, 0, 0, 111, 358, 1, 0, 0, 0, 113, 360, 1, 0, 0, 0, 115, 363, 1, 0, 0, 0, 117, 373, 1, 0, 0, 0, 119, 120, 5, 13, 0, 0, 120, 2, 1, 0, 0, 0, 121, 122, 5, 10, 0, 0, 122, 4, 1, 0, 0, 0, 123, 124, 5, 97, 0, 0, 124, 125, 5, 108, 0, 0, 125, 126, 5, 108, 0, 0, 126, 127, 5, 111, 0, 0, 127, 128, 5, 99, 0, 0, 128, 129, 5, 97, 0, 0, 129, 130, 5, 116, 0, 0, 130, 131, 5, 111, 0, 0, 131, 132, 5, 114, 0, 0, 132, 6, 1, 0, 0, 0, 133, 134, 5, 102, 0, 0, 134, 135, 5, 117, 0, 0, 135, 136, 5, 110, 0, 0, 136, 137, 5, 99, 0, 0, 137, 138, 5, 116, 0, 0, 138, 139, 5, 105, 0, 0, 139, 140, 5, 111, 0, 0, 140, 141, 5, 110, 0, 0, 141, 8, 1, 0, 0, 0, 142, 143, 5, 103, 0, 0, 143, 144, 5, 108, 0, 0, 144, 145, 5, 111, 0, 0, 145, 146, 5, 98, 0, 0, 146, 147, 5, 97, 0, 0, 147, 148, 5, 108, 0, 0, 148, 10, 1, 0, 0, 0, 149, 150, 5, 114, 0, 0, 150, 151, 5, 101, 0, 0, 151, 152, 5, 116, 0, 0, 152, 153, 5, 117, 0, 0, 153, 154, 5, 114, 0, 0, 154, 155, 5, 110, 0, 0, 155, 12, 1, 0, 0, 0, 156, 157, 5, 115, 0, 0, 157, 158, 5, 116, 0, 0, 158, 159, 5, 114, 0, 0, 159, 160, 5, 117, 0, 0, 160, 161, 5, 99, 0, 0, 161, 162, 5, 116, 0, 0, 162, 163, 5, 117, 0, 0, 163, 164, 5, 114, 0, 0, 164, 165, 5, 101, 0, 0, 165, 14, 1, 0, 0, 0, 166, 167, 5, 117, 0, 0, 167, 168, 5, 115, 0, 0, 168, 169, 5, 105, 0, 0, 169, 170, 5, 110, 0, 0, 170, 171, 5, 103, 0, 0, 171, 16, 1, 0, 0, 0, 172, 173, 5, 111, 0, 0, 173, 174, 5, 112, 0, 0, 174, 175, 5, 104, 0, 0, 175, 176, 5, 97, 0, 0, 176, 177, 5, 110, 0, 0, 177, 178, 5, 100, 0, 0, 178, 179, 5, 108, 0, 0, 179, 180, 5, 101, 0, 0, 180, 181, 5, 114, 0, 0, 181, 18, 1, 0, 0, 0, 182, 183, 5, 97, 0, 0, 183, 184, 5, 115, 0, 0, 184, 20, 1, 0, 0, 0, 185, 186, 5, 105, 0, 0, 186, 187, 5, 102, 0, 0, 187, 22, 1, 0, 0, 0, 188, 189, 5, 119, 0, 0, 189, 190, 5, 104, 0, 0, 190, 191, 5, 105, 0, 0, 191, 192, 5, 108, 0, 0, 192, 193, 5, 101, 0, 0, 193, 24, 1, 0, 0, 0, 194, 195, 5, 101, 0, 0, 195, 196, 5, 108, 0, 0, 196, 197, 5, 115, 0, 0, 197, 198, 5, 101, 0, 0, 198, 26, 1, 0, 0, 0, 199, 200, 5, 101, 0, 0, 200, 201, 5, 108, 0, 0, 201, 202, 5, 105, 0, 0, 202, 203, 5, 102, 0, 0, 203, 28, 1, 0, 0, 0, 204, 205, 5, 105, 0, 0, 205, 206, 5, 110, 0, 0, 206, 207, 5, 116, 0, 0, 207, 30, 1, 0, 0, 0, 208, 209, 5, 98, 0, 0, 209, 210, 5, 111, 0, 0, 210, 211, 5, 111, 0, 0, 211, 212, 5, 108, 0, 0, 212, 32, 1, 0, 0, 0, 213, 214, 5, 110, 0, 0, 214, 215, 5, 117, 0, 0, 215, 216, 5, 108, 0, 0, 216, 217, 5, 108, 0, 0, 217, 34, 1, 0, 0, 0, 218, 219, 5, 116, 0, 0, 219, 220, 5, 114, 0, 0, 220, 221, 5, 117, 0, 0, 221, 222, 5, 101, 0, 0, 222, 36, 1, 0, 0, 0, 223, 224, 5, 102, 0, 0, 224, 225, 5, 97, 0, 0, 225, 226, 5, 108, 0, 0, 226, 227, 5, 115, 0, 0, 227, 228, 5, 101, 0, 0, 228, 38, 1, 0, 0, 0, 229, 232, 3, 35, 17, 0, 230, 232, 3, 37, 18, 0, 231, 229, 1, 0, 0, 0, 231, 230, 1, 0, 0, 0, 232, 40, 1, 0, 0, 0, 233, 236, 3, 63, 31, 0, 234, 236, 3, 51, 25, 0, 235, 233, 1, 0, 0, 0, 235, 234, 1, 0, 0, 0, 236, 42, 1, 0, 0, 0, 237, 238, 5, 43, 0, 0, 238, 44, 1, 0, 0, 0, 239, 240, 5, 45, 0, 0, 240, 46, 1, 0, 0, 0, 241, 242, 5, 42, 0, 0, 242, 48, 1, 0, 0, 0, 243, 244, 5, 47, 0, 0, 244, 50, 1, 0, 0, 0, 245, 250, 3, 43, 21, 0, 246, 250, 3, 45, 22, 0, 247, 250, 3, 47, 23, 0, 248, 250, 3, 49, 24, 0, 249, 245, 1, 0, 0, 0, 249, 246, 1, 0, 0, 0, 249, 247, 1, 0, 0, 0, 249, 248, 1, 0, 0, 0, 250, 52, 1, 0, 0, 0, 251, 252, 5, 60, 0, 0, 252, 54, 1, 0, 0, 0, 253, 254, 5, 60, 0, 0, 254, 255, 5, 61, 0, 0, 255, 56, 1, 0, 0, 0, 256, 257, 5, 62, 0, 0, 257, 58, 1, 0, 0, 0, 258, 259, 5, 62, 0, 0, 259, 260, 5, 61, 0, 0, 260, 60, 1, 0, 0, 0, 261, 262, 5, 61, 0, 0, 262, 263, 5, 61, 0, 0, 263, 62, 1, 0, 0, 0, 264, 270, 3, 53, 26, 0, 265, 270, 3, 55, 27, 0, 266, 270, 3, 57, 28, 0, 267, 270, 3, 59, 29, 0, 268, 270, 3, 61, 30, 0, 269, 264, 1, 0, 0, 0, 269, 265, 1, 0, 0, 0, 269, 266, 1, 0, 0, 0, 269, 267, 1, 0, 0, 0, 269, 268, 1, 0, 0, 0, 270, 64, 1, 0, 0, 0, 271, 272, 5, 45, 0, 0, 272, 273, 5, 62, 0, 0, 273, 66, 1, 0, 0, 0, 274, 275, 5, 126, 0, 0, 275, 68, 1, 0, 0, 0, 276, 277, 5, 61, 0, 0, 277, 70, 1, 0, 0, 0, 278, 279, 5, 42, 0, 0, 279, 280, 5, 61, 0, 0, 280, 72, 1, 0, 0, 0, 281, 282, 5, 40, 0, 0, 282, 74, 1, 0, 0, 0, 283, 284, 5, 41, 0, 0, 284, 76, 1, 0, 0, 0, 285, 286, 5, 91, 0, 0, 286, 78, 1, 0, 0, 0, 287, 288, 5, 93, 0, 0, 288, 80, 1, 0, 0, 0, 289, 290, 5, 123, 0, 0, 290, 82, 1, 0, 0, 0, 291, 292, 5, 125, 0, 0, 292, 84, 1, 0, 0, 0, 293, 294, 5, 44, 0, 0, 294, 86, 1, 0, 0, 0, 295, 296, 5, 46, 0, 0, 296, 88, 1, 0, 0, 0, 297, 298, 5, 59, 0, 0, 298, 90, 1, 0, 0, 0, 299, 300, 5, 95, 0, 0, 300, 92, 1, 0, 0, 0, 301, 302, 5, 35, 0, 0, 302, 94, 1, 0, 0, 0, 303, 304, 5, 34, 0, 0, 304, 96, 1, 0, 0, 0, 305, 310, 3, 115, 57, 0, 306, 310, 3, 117, 58, 0, 307, 310, 3, 99, 49, 0, 308, 310, 3, 101, 50, 0, 309, 305, 1, 0, 0, 0, 309, 306, 1, 0, 0, 0, 309, 307, 1, 0, 0, 0, 309, 308, 1, 0, 0, 0, 310, 311, 1, 0, 0, 0, 311, 312, 6, 48, 0, 0, 312, 98, 1, 0, 0, 0, 313, 314, 5, 47, 0, 0, 314, 315, 5, 47, 0, 0, 315, 319, 1, 0, 0, 0, 316, 318, 8, 0, 0, 0, 317, 316, 1, 0, 0, 0, 318, 321, 1, 0, 0, 0, 319, 317, 1, 0, 0, 0, 319, 320, 1, 0, 0, 0, 320, 100, 1, 0, 0, 0, 321, 319, 1, 0, 0, 0, 322, 323, 5, 47, 0, 0, 323, 324, 5, 42, 0, 0, 324, 328, 1, 0, 0, 0, 325, 327, 9, 0, 0, 0, 326, 325, 1, 0, 0, 0, 327, 330, 1, 0, 0, 0, 328, 329, 1, 0, 0, 0, 328, 326, 1, 0, 0, 0, 329, 331, 1, 0, 0, 0, 330, 328, 1, 0, 0, 0, 331, 332, 5, 42, 0, 0, 332, 333, 5, 47, 0, 0, 333, 102, 1, 0, 0, 0, 334, 336, 3, 111, 55, 0, 335, 334, 1, 0, 0, 0, 336, 337, 1, 0, 0, 0, 337, 335, 1, 0, 0, 0, 337, 338, 1, 0, 0, 0, 338, 104, 1, 0, 0, 0, 339, 343, 3, 95, 47, 0, 340, 342, 8, 1, 0, 0, 341, 340, 1, 0, 0, 0, 342, 345, 1, 0, 0, 0, 343, 341, 1, 0, 0, 0, 343, 344, 1, 0, 0, 0, 344, 346, 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 346, 347, 3, 95, 47, 0, 347, 106, 1, 0, 0, 0, 348, 352, 3, 109, 54, 0, 349, 353, 3, 109, 54, 0, 350, 353, 3, 103, 51, 0, 351, 353, 3, 91, 45, 0, 352, 349, 1, 0, 0, 0, 352, 350, 1, 0, 0, 0, 352, 351, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 354, 352, 1, 0, 0, 0, 355, 108, 1, 0, 0, 0, 356, 357, 7, 2, 0, 0, 357, 110, 1, 0, 0, 0, 358, 359, 7, 3, 0, 0, 359, 112, 1, 0, 0, 0, 360, 361, 7, 4, 0, 0, 361, 114, 1, 0, 0, 0, 362, 364, 7, 5, 0, 0, 363, 362, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 363, 1, 0, 0, 0, 365, 366, 1, 0, 0, 0, 366, 116, 1, 0, 0, 0, 367, 369, 7, 0, 0, 0, 368, 367, 1, 0, 0, 0, 369, 370, 1, 0, 0, 0, 370, 368, 1, 0, 0, 0, 370, 371, 1, 0, 0, 0, 371, 374, 1, 0, 0, 0, 372, 374, 5, 0, 0, 1, 373, 368, 1, 0, 0, 0, 373, 372, 1, 0, 0, 0, 374, 118, 1, 0, 0, 0, 15, 0, 231, 235, 249, 269, 309, 319, 328, 337, 343, 352, 354, 365, 370, 373, 1, 6, 0, 0]
\ No newline at end of file
+[4, 0, 45, 382, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 234, 8, 19, 1, 20, 1, 20, 3, 20, 238, 8, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 252, 8, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 272, 8, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 316, 8, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 5, 50, 324, 8, 50, 10, 50, 12, 50, 327, 9, 50, 1, 51, 1, 51, 1, 51, 1, 51, 5, 51, 333, 8, 51, 10, 51, 12, 51, 336, 9, 51, 1, 51, 1, 51, 1, 51, 1, 52, 4, 52, 342, 8, 52, 11, 52, 12, 52, 343, 1, 53, 1, 53, 5, 53, 348, 8, 53, 10, 53, 12, 53, 351, 9, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 5, 54, 359, 8, 54, 10, 54, 12, 54, 362, 9, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 4, 58, 371, 8, 58, 11, 58, 12, 58, 372, 1, 59, 4, 59, 376, 8, 59, 11, 59, 12, 59, 377, 1, 59, 3, 59, 381, 8, 59, 1, 334, 0, 60, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 0, 37, 0, 39, 18, 41, 19, 43, 0, 45, 0, 47, 20, 49, 0, 51, 21, 53, 0, 55, 0, 57, 0, 59, 0, 61, 0, 63, 22, 65, 23, 67, 24, 69, 25, 71, 26, 73, 27, 75, 28, 77, 29, 79, 30, 81, 31, 83, 32, 85, 33, 87, 34, 89, 35, 91, 36, 93, 37, 95, 38, 97, 39, 99, 40, 101, 41, 103, 42, 105, 43, 107, 44, 109, 45, 111, 0, 113, 0, 115, 0, 117, 0, 119, 0, 1, 0, 6, 2, 0, 10, 10, 13, 13, 1, 0, 34, 34, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 2, 0, 46, 46, 95, 95, 2, 0, 9, 9, 32, 32, 388, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 1, 121, 1, 0, 0, 0, 3, 123, 1, 0, 0, 0, 5, 125, 1, 0, 0, 0, 7, 135, 1, 0, 0, 0, 9, 144, 1, 0, 0, 0, 11, 151, 1, 0, 0, 0, 13, 158, 1, 0, 0, 0, 15, 168, 1, 0, 0, 0, 17, 174, 1, 0, 0, 0, 19, 184, 1, 0, 0, 0, 21, 187, 1, 0, 0, 0, 23, 190, 1, 0, 0, 0, 25, 196, 1, 0, 0, 0, 27, 201, 1, 0, 0, 0, 29, 206, 1, 0, 0, 0, 31, 210, 1, 0, 0, 0, 33, 215, 1, 0, 0, 0, 35, 220, 1, 0, 0, 0, 37, 225, 1, 0, 0, 0, 39, 233, 1, 0, 0, 0, 41, 237, 1, 0, 0, 0, 43, 239, 1, 0, 0, 0, 45, 241, 1, 0, 0, 0, 47, 243, 1, 0, 0, 0, 49, 245, 1, 0, 0, 0, 51, 251, 1, 0, 0, 0, 53, 253, 1, 0, 0, 0, 55, 255, 1, 0, 0, 0, 57, 258, 1, 0, 0, 0, 59, 260, 1, 0, 0, 0, 61, 263, 1, 0, 0, 0, 63, 271, 1, 0, 0, 0, 65, 273, 1, 0, 0, 0, 67, 276, 1, 0, 0, 0, 69, 279, 1, 0, 0, 0, 71, 282, 1, 0, 0, 0, 73, 284, 1, 0, 0, 0, 75, 287, 1, 0, 0, 0, 77, 289, 1, 0, 0, 0, 79, 291, 1, 0, 0, 0, 81, 293, 1, 0, 0, 0, 83, 295, 1, 0, 0, 0, 85, 297, 1, 0, 0, 0, 87, 299, 1, 0, 0, 0, 89, 301, 1, 0, 0, 0, 91, 303, 1, 0, 0, 0, 93, 305, 1, 0, 0, 0, 95, 307, 1, 0, 0, 0, 97, 309, 1, 0, 0, 0, 99, 315, 1, 0, 0, 0, 101, 319, 1, 0, 0, 0, 103, 328, 1, 0, 0, 0, 105, 341, 1, 0, 0, 0, 107, 345, 1, 0, 0, 0, 109, 354, 1, 0, 0, 0, 111, 363, 1, 0, 0, 0, 113, 365, 1, 0, 0, 0, 115, 367, 1, 0, 0, 0, 117, 370, 1, 0, 0, 0, 119, 380, 1, 0, 0, 0, 121, 122, 5, 13, 0, 0, 122, 2, 1, 0, 0, 0, 123, 124, 5, 10, 0, 0, 124, 4, 1, 0, 0, 0, 125, 126, 5, 97, 0, 0, 126, 127, 5, 108, 0, 0, 127, 128, 5, 108, 0, 0, 128, 129, 5, 111, 0, 0, 129, 130, 5, 99, 0, 0, 130, 131, 5, 97, 0, 0, 131, 132, 5, 116, 0, 0, 132, 133, 5, 111, 0, 0, 133, 134, 5, 114, 0, 0, 134, 6, 1, 0, 0, 0, 135, 136, 5, 102, 0, 0, 136, 137, 5, 117, 0, 0, 137, 138, 5, 110, 0, 0, 138, 139, 5, 99, 0, 0, 139, 140, 5, 116, 0, 0, 140, 141, 5, 105, 0, 0, 141, 142, 5, 111, 0, 0, 142, 143, 5, 110, 0, 0, 143, 8, 1, 0, 0, 0, 144, 145, 5, 103, 0, 0, 145, 146, 5, 108, 0, 0, 146, 147, 5, 111, 0, 0, 147, 148, 5, 98, 0, 0, 148, 149, 5, 97, 0, 0, 149, 150, 5, 108, 0, 0, 150, 10, 1, 0, 0, 0, 151, 152, 5, 114, 0, 0, 152, 153, 5, 101, 0, 0, 153, 154, 5, 116, 0, 0, 154, 155, 5, 117, 0, 0, 155, 156, 5, 114, 0, 0, 156, 157, 5, 110, 0, 0, 157, 12, 1, 0, 0, 0, 158, 159, 5, 115, 0, 0, 159, 160, 5, 116, 0, 0, 160, 161, 5, 114, 0, 0, 161, 162, 5, 117, 0, 0, 162, 163, 5, 99, 0, 0, 163, 164, 5, 116, 0, 0, 164, 165, 5, 117, 0, 0, 165, 166, 5, 114, 0, 0, 166, 167, 5, 101, 0, 0, 167, 14, 1, 0, 0, 0, 168, 169, 5, 117, 0, 0, 169, 170, 5, 115, 0, 0, 170, 171, 5, 105, 0, 0, 171, 172, 5, 110, 0, 0, 172, 173, 5, 103, 0, 0, 173, 16, 1, 0, 0, 0, 174, 175, 5, 111, 0, 0, 175, 176, 5, 112, 0, 0, 176, 177, 5, 104, 0, 0, 177, 178, 5, 97, 0, 0, 178, 179, 5, 110, 0, 0, 179, 180, 5, 100, 0, 0, 180, 181, 5, 108, 0, 0, 181, 182, 5, 101, 0, 0, 182, 183, 5, 114, 0, 0, 183, 18, 1, 0, 0, 0, 184, 185, 5, 97, 0, 0, 185, 186, 5, 115, 0, 0, 186, 20, 1, 0, 0, 0, 187, 188, 5, 105, 0, 0, 188, 189, 5, 102, 0, 0, 189, 22, 1, 0, 0, 0, 190, 191, 5, 119, 0, 0, 191, 192, 5, 104, 0, 0, 192, 193, 5, 105, 0, 0, 193, 194, 5, 108, 0, 0, 194, 195, 5, 101, 0, 0, 195, 24, 1, 0, 0, 0, 196, 197, 5, 101, 0, 0, 197, 198, 5, 108, 0, 0, 198, 199, 5, 115, 0, 0, 199, 200, 5, 101, 0, 0, 200, 26, 1, 0, 0, 0, 201, 202, 5, 101, 0, 0, 202, 203, 5, 108, 0, 0, 203, 204, 5, 105, 0, 0, 204, 205, 5, 102, 0, 0, 205, 28, 1, 0, 0, 0, 206, 207, 5, 105, 0, 0, 207, 208, 5, 110, 0, 0, 208, 209, 5, 116, 0, 0, 209, 30, 1, 0, 0, 0, 210, 211, 5, 98, 0, 0, 211, 212, 5, 111, 0, 0, 212, 213, 5, 111, 0, 0, 213, 214, 5, 108, 0, 0, 214, 32, 1, 0, 0, 0, 215, 216, 5, 110, 0, 0, 216, 217, 5, 117, 0, 0, 217, 218, 5, 108, 0, 0, 218, 219, 5, 108, 0, 0, 219, 34, 1, 0, 0, 0, 220, 221, 5, 116, 0, 0, 221, 222, 5, 114, 0, 0, 222, 223, 5, 117, 0, 0, 223, 224, 5, 101, 0, 0, 224, 36, 1, 0, 0, 0, 225, 226, 5, 102, 0, 0, 226, 227, 5, 97, 0, 0, 227, 228, 5, 108, 0, 0, 228, 229, 5, 115, 0, 0, 229, 230, 5, 101, 0, 0, 230, 38, 1, 0, 0, 0, 231, 234, 3, 35, 17, 0, 232, 234, 3, 37, 18, 0, 233, 231, 1, 0, 0, 0, 233, 232, 1, 0, 0, 0, 234, 40, 1, 0, 0, 0, 235, 238, 3, 63, 31, 0, 236, 238, 3, 51, 25, 0, 237, 235, 1, 0, 0, 0, 237, 236, 1, 0, 0, 0, 238, 42, 1, 0, 0, 0, 239, 240, 5, 43, 0, 0, 240, 44, 1, 0, 0, 0, 241, 242, 5, 45, 0, 0, 242, 46, 1, 0, 0, 0, 243, 244, 5, 42, 0, 0, 244, 48, 1, 0, 0, 0, 245, 246, 5, 47, 0, 0, 246, 50, 1, 0, 0, 0, 247, 252, 3, 43, 21, 0, 248, 252, 3, 45, 22, 0, 249, 252, 3, 47, 23, 0, 250, 252, 3, 49, 24, 0, 251, 247, 1, 0, 0, 0, 251, 248, 1, 0, 0, 0, 251, 249, 1, 0, 0, 0, 251, 250, 1, 0, 0, 0, 252, 52, 1, 0, 0, 0, 253, 254, 5, 60, 0, 0, 254, 54, 1, 0, 0, 0, 255, 256, 5, 60, 0, 0, 256, 257, 5, 61, 0, 0, 257, 56, 1, 0, 0, 0, 258, 259, 5, 62, 0, 0, 259, 58, 1, 0, 0, 0, 260, 261, 5, 62, 0, 0, 261, 262, 5, 61, 0, 0, 262, 60, 1, 0, 0, 0, 263, 264, 5, 61, 0, 0, 264, 265, 5, 61, 0, 0, 265, 62, 1, 0, 0, 0, 266, 272, 3, 53, 26, 0, 267, 272, 3, 55, 27, 0, 268, 272, 3, 57, 28, 0, 269, 272, 3, 59, 29, 0, 270, 272, 3, 61, 30, 0, 271, 266, 1, 0, 0, 0, 271, 267, 1, 0, 0, 0, 271, 268, 1, 0, 0, 0, 271, 269, 1, 0, 0, 0, 271, 270, 1, 0, 0, 0, 272, 64, 1, 0, 0, 0, 273, 274, 5, 45, 0, 0, 274, 275, 5, 62, 0, 0, 275, 66, 1, 0, 0, 0, 276, 277, 5, 66, 0, 0, 277, 278, 5, 126, 0, 0, 278, 68, 1, 0, 0, 0, 279, 280, 5, 65, 0, 0, 280, 281, 5, 126, 0, 0, 281, 70, 1, 0, 0, 0, 282, 283, 5, 61, 0, 0, 283, 72, 1, 0, 0, 0, 284, 285, 5, 42, 0, 0, 285, 286, 5, 61, 0, 0, 286, 74, 1, 0, 0, 0, 287, 288, 5, 40, 0, 0, 288, 76, 1, 0, 0, 0, 289, 290, 5, 41, 0, 0, 290, 78, 1, 0, 0, 0, 291, 292, 5, 91, 0, 0, 292, 80, 1, 0, 0, 0, 293, 294, 5, 93, 0, 0, 294, 82, 1, 0, 0, 0, 295, 296, 5, 123, 0, 0, 296, 84, 1, 0, 0, 0, 297, 298, 5, 125, 0, 0, 298, 86, 1, 0, 0, 0, 299, 300, 5, 44, 0, 0, 300, 88, 1, 0, 0, 0, 301, 302, 5, 46, 0, 0, 302, 90, 1, 0, 0, 0, 303, 304, 5, 59, 0, 0, 304, 92, 1, 0, 0, 0, 305, 306, 5, 95, 0, 0, 306, 94, 1, 0, 0, 0, 307, 308, 5, 35, 0, 0, 308, 96, 1, 0, 0, 0, 309, 310, 5, 34, 0, 0, 310, 98, 1, 0, 0, 0, 311, 316, 3, 117, 58, 0, 312, 316, 3, 119, 59, 0, 313, 316, 3, 101, 50, 0, 314, 316, 3, 103, 51, 0, 315, 311, 1, 0, 0, 0, 315, 312, 1, 0, 0, 0, 315, 313, 1, 0, 0, 0, 315, 314, 1, 0, 0, 0, 316, 317, 1, 0, 0, 0, 317, 318, 6, 49, 0, 0, 318, 100, 1, 0, 0, 0, 319, 320, 5, 47, 0, 0, 320, 321, 5, 47, 0, 0, 321, 325, 1, 0, 0, 0, 322, 324, 8, 0, 0, 0, 323, 322, 1, 0, 0, 0, 324, 327, 1, 0, 0, 0, 325, 323, 1, 0, 0, 0, 325, 326, 1, 0, 0, 0, 326, 102, 1, 0, 0, 0, 327, 325, 1, 0, 0, 0, 328, 329, 5, 47, 0, 0, 329, 330, 5, 42, 0, 0, 330, 334, 1, 0, 0, 0, 331, 333, 9, 0, 0, 0, 332, 331, 1, 0, 0, 0, 333, 336, 1, 0, 0, 0, 334, 335, 1, 0, 0, 0, 334, 332, 1, 0, 0, 0, 335, 337, 1, 0, 0, 0, 336, 334, 1, 0, 0, 0, 337, 338, 5, 42, 0, 0, 338, 339, 5, 47, 0, 0, 339, 104, 1, 0, 0, 0, 340, 342, 3, 113, 56, 0, 341, 340, 1, 0, 0, 0, 342, 343, 1, 0, 0, 0, 343, 341, 1, 0, 0, 0, 343, 344, 1, 0, 0, 0, 344, 106, 1, 0, 0, 0, 345, 349, 3, 97, 48, 0, 346, 348, 8, 1, 0, 0, 347, 346, 1, 0, 0, 0, 348, 351, 1, 0, 0, 0, 349, 347, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 352, 1, 0, 0, 0, 351, 349, 1, 0, 0, 0, 352, 353, 3, 97, 48, 0, 353, 108, 1, 0, 0, 0, 354, 360, 3, 111, 55, 0, 355, 359, 3, 111, 55, 0, 356, 359, 3, 105, 52, 0, 357, 359, 3, 93, 46, 0, 358, 355, 1, 0, 0, 0, 358, 356, 1, 0, 0, 0, 358, 357, 1, 0, 0, 0, 359, 362, 1, 0, 0, 0, 360, 358, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 110, 1, 0, 0, 0, 362, 360, 1, 0, 0, 0, 363, 364, 7, 2, 0, 0, 364, 112, 1, 0, 0, 0, 365, 366, 7, 3, 0, 0, 366, 114, 1, 0, 0, 0, 367, 368, 7, 4, 0, 0, 368, 116, 1, 0, 0, 0, 369, 371, 7, 5, 0, 0, 370, 369, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0, 372, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 118, 1, 0, 0, 0, 374, 376, 7, 0, 0, 0, 375, 374, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 375, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 381, 1, 0, 0, 0, 379, 381, 5, 0, 0, 1, 380, 375, 1, 0, 0, 0, 380, 379, 1, 0, 0, 0, 381, 120, 1, 0, 0, 0, 15, 0, 233, 237, 251, 271, 315, 325, 334, 343, 349, 358, 360, 372, 377, 380, 1, 6, 0, 0]
\ No newline at end of file
diff --git a/Crimson/Antlr/Output/CrimsonLexer.tokens b/Crimson/Antlr/Output/CrimsonLexer.tokens
index c0b3af8..8940016 100644
--- a/Crimson/Antlr/Output/CrimsonLexer.tokens
+++ b/Crimson/Antlr/Output/CrimsonLexer.tokens
@@ -21,27 +21,28 @@ Asterisk=20
MathsOperator=21
Comparator=22
RightArrow=23
-Tilda=24
-DirectEquals=25
-PointerEquals=26
-OpenBracket=27
-CloseBracket=28
-OpenSquare=29
-CloseSquare=30
-OpenBrace=31
-CloseBrace=32
-Comma=33
-Dot=34
-SemiColon=35
-Underscore=36
-Hashtag=37
-Quote=38
-SkipTokens=39
-LineComment=40
-BlockComment=41
-Number=42
-String=43
-ShortName=44
+BasicCall=24
+AssemblyCall=25
+DirectEquals=26
+PointerEquals=27
+OpenBracket=28
+CloseBracket=29
+OpenSquare=30
+CloseSquare=31
+OpenBrace=32
+CloseBrace=33
+Comma=34
+Dot=35
+SemiColon=36
+Underscore=37
+Hashtag=38
+Quote=39
+SkipTokens=40
+LineComment=41
+BlockComment=42
+Number=43
+String=44
+ShortName=45
'\r'=1
'\n'=2
'allocator'=3
@@ -61,18 +62,19 @@ ShortName=44
'null'=17
'*'=20
'->'=23
-'~'=24
-'='=25
-'*='=26
-'('=27
-')'=28
-'['=29
-']'=30
-'{'=31
-'}'=32
-','=33
-'.'=34
-';'=35
-'_'=36
-'#'=37
-'"'=38
+'B~'=24
+'A~'=25
+'='=26
+'*='=27
+'('=28
+')'=29
+'['=30
+']'=31
+'{'=32
+'}'=33
+','=34
+'.'=35
+';'=36
+'_'=37
+'#'=38
+'"'=39
diff --git a/Crimson/Antlr/Output/CrimsonListener.cs b/Crimson/Antlr/Output/CrimsonListener.cs
index 2615900..84685cf 100644
--- a/Crimson/Antlr/Output/CrimsonListener.cs
+++ b/Crimson/Antlr/Output/CrimsonListener.cs
@@ -210,6 +210,18 @@ public interface ICrimsonListener : IParseTreeListener {
/// The parse tree.
void ExitFunctionWhileStatement([NotNull] CrimsonParser.FunctionWhileStatementContext context);
///
+ /// Enter a parse tree produced by the FunctionBasicCallStatement
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ void EnterFunctionBasicCallStatement([NotNull] CrimsonParser.FunctionBasicCallStatementContext context);
+ ///
+ /// Exit a parse tree produced by the FunctionBasicCallStatement
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ void ExitFunctionBasicCallStatement([NotNull] CrimsonParser.FunctionBasicCallStatementContext context);
+ ///
/// Enter a parse tree produced by the FunctionAssemblyCallStatement
/// labeled alternative in .
///
@@ -306,6 +318,16 @@ public interface ICrimsonListener : IParseTreeListener {
/// The parse tree.
void ExitElseBlock([NotNull] CrimsonParser.ElseBlockContext context);
///
+ /// Enter a parse tree produced by .
+ ///
+ /// The parse tree.
+ void EnterBasicCall([NotNull] CrimsonParser.BasicCallContext context);
+ ///
+ /// Exit a parse tree produced by .
+ ///
+ /// The parse tree.
+ void ExitBasicCall([NotNull] CrimsonParser.BasicCallContext context);
+ ///
/// Enter a parse tree produced by .
///
/// The parse tree.
diff --git a/Crimson/Antlr/Output/CrimsonParser.cs b/Crimson/Antlr/Output/CrimsonParser.cs
index 3e8e295..a7247f1 100644
--- a/Crimson/Antlr/Output/CrimsonParser.cs
+++ b/Crimson/Antlr/Output/CrimsonParser.cs
@@ -40,46 +40,48 @@ public const int
T__0=1, T__1=2, Allocator=3, Function=4, Global=5, Return=6, Structure=7,
Using=8, OpHandler=9, As=10, If=11, While=12, Else=13, Elif=14, Integer=15,
Boolean=16, Null=17, BooleanValue=18, Operator=19, Asterisk=20, MathsOperator=21,
- Comparator=22, RightArrow=23, Tilda=24, DirectEquals=25, PointerEquals=26,
- OpenBracket=27, CloseBracket=28, OpenSquare=29, CloseSquare=30, OpenBrace=31,
- CloseBrace=32, Comma=33, Dot=34, SemiColon=35, Underscore=36, Hashtag=37,
- Quote=38, SkipTokens=39, LineComment=40, BlockComment=41, Number=42, String=43,
- ShortName=44;
+ Comparator=22, RightArrow=23, BasicCall=24, AssemblyCall=25, DirectEquals=26,
+ PointerEquals=27, OpenBracket=28, CloseBracket=29, OpenSquare=30, CloseSquare=31,
+ OpenBrace=32, CloseBrace=33, Comma=34, Dot=35, SemiColon=36, Underscore=37,
+ Hashtag=38, Quote=39, SkipTokens=40, LineComment=41, BlockComment=42,
+ Number=43, String=44, ShortName=45;
public const int
RULE_translationUnit = 0, RULE_importUnit = 1, RULE_operationHandler = 2,
RULE_globalStatement = 3, RULE_globalVariableDeclaration = 4, RULE_functionDeclaration = 5,
RULE_functionHeader = 6, RULE_functionBody = 7, RULE_internalStatement = 8,
RULE_internalVariableDeclaration = 9, RULE_assignVariable = 10, RULE_ifBlock = 11,
RULE_whileBlock = 12, RULE_condition = 13, RULE_elseIfBlock = 14, RULE_elseBlock = 15,
- RULE_assemblyCall = 16, RULE_functionCall = 17, RULE_arguments = 18, RULE_functionReturn = 19,
- RULE_simpleValue = 20, RULE_complexValue = 21, RULE_rawValue = 22, RULE_operation = 23,
- RULE_parameterList = 24, RULE_parameter = 25, RULE_structureDeclaration = 26,
- RULE_structureBody = 27, RULE_type = 28, RULE_array = 29, RULE_fullName = 30;
+ RULE_basicCall = 16, RULE_assemblyCall = 17, RULE_functionCall = 18, RULE_arguments = 19,
+ RULE_functionReturn = 20, RULE_simpleValue = 21, RULE_complexValue = 22,
+ RULE_rawValue = 23, RULE_operation = 24, RULE_parameterList = 25, RULE_parameter = 26,
+ RULE_structureDeclaration = 27, RULE_structureBody = 28, RULE_type = 29,
+ RULE_array = 30, RULE_fullName = 31;
public static readonly string[] ruleNames = {
"translationUnit", "importUnit", "operationHandler", "globalStatement",
"globalVariableDeclaration", "functionDeclaration", "functionHeader",
"functionBody", "internalStatement", "internalVariableDeclaration", "assignVariable",
- "ifBlock", "whileBlock", "condition", "elseIfBlock", "elseBlock", "assemblyCall",
- "functionCall", "arguments", "functionReturn", "simpleValue", "complexValue",
- "rawValue", "operation", "parameterList", "parameter", "structureDeclaration",
- "structureBody", "type", "array", "fullName"
+ "ifBlock", "whileBlock", "condition", "elseIfBlock", "elseBlock", "basicCall",
+ "assemblyCall", "functionCall", "arguments", "functionReturn", "simpleValue",
+ "complexValue", "rawValue", "operation", "parameterList", "parameter",
+ "structureDeclaration", "structureBody", "type", "array", "fullName"
};
private static readonly string[] _LiteralNames = {
null, "'\\r'", "'\\n'", "'allocator'", "'function'", "'global'", "'return'",
"'structure'", "'using'", "'ophandler'", "'as'", "'if'", "'while'", "'else'",
"'elif'", "'int'", "'bool'", "'null'", null, null, "'*'", null, null,
- "'->'", "'~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'", "'}'",
- "','", "'.'", "';'", "'_'", "'#'", "'\"'"
+ "'->'", "'B~'", "'A~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'",
+ "'}'", "','", "'.'", "';'", "'_'", "'#'", "'\"'"
};
private static readonly string[] _SymbolicNames = {
null, null, null, "Allocator", "Function", "Global", "Return", "Structure",
"Using", "OpHandler", "As", "If", "While", "Else", "Elif", "Integer",
"Boolean", "Null", "BooleanValue", "Operator", "Asterisk", "MathsOperator",
- "Comparator", "RightArrow", "Tilda", "DirectEquals", "PointerEquals",
- "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare", "OpenBrace",
- "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore", "Hashtag", "Quote",
- "SkipTokens", "LineComment", "BlockComment", "Number", "String", "ShortName"
+ "Comparator", "RightArrow", "BasicCall", "AssemblyCall", "DirectEquals",
+ "PointerEquals", "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare",
+ "OpenBrace", "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore",
+ "Hashtag", "Quote", "SkipTokens", "LineComment", "BlockComment", "Number",
+ "String", "ShortName"
};
public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames);
@@ -172,54 +174,54 @@ public TranslationUnitContext translationUnit() {
int _alt;
EnterOuterAlt(_localctx, 1);
{
- State = 65;
+ State = 67;
ErrorHandler.Sync(this);
_alt = Interpreter.AdaptivePredict(TokenStream,0,Context);
while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
- State = 62;
+ State = 64;
_localctx._importUnit = importUnit();
_localctx._imports.Add(_localctx._importUnit);
}
}
}
- State = 67;
+ State = 69;
ErrorHandler.Sync(this);
_alt = Interpreter.AdaptivePredict(TokenStream,0,Context);
}
- State = 71;
+ State = 73;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
while (_la==Hashtag) {
{
{
- State = 68;
+ State = 70;
_localctx._operationHandler = operationHandler();
_localctx._opHandlers.Add(_localctx._operationHandler);
}
}
- State = 73;
+ State = 75;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
}
- State = 77;
+ State = 79;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
while (((_la) & ~0x3f) == 0 && ((1L << _la) & 176L) != 0) {
{
{
- State = 74;
+ State = 76;
_localctx._globalStatement = globalStatement();
_localctx._statements.Add(_localctx._globalStatement);
}
}
- State = 79;
+ State = 81;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
}
- State = 80;
+ State = 82;
_localctx.eof = Match(Eof);
}
}
@@ -240,6 +242,7 @@ public partial class ImportUnitContext : ParserRuleContext {
[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Hashtag() { return GetToken(CrimsonParser.Hashtag, 0); }
[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Using() { return GetToken(CrimsonParser.Using, 0); }
[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode As() { return GetToken(CrimsonParser.As, 0); }
+ [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SemiColon() { return GetToken(CrimsonParser.SemiColon, 0); }
[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode String() { return GetToken(CrimsonParser.String, 0); }
[System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() {
return GetRuleContext(0);
@@ -274,16 +277,18 @@ public ImportUnitContext importUnit() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 82;
+ State = 84;
Match(Hashtag);
- State = 83;
+ State = 85;
Match(Using);
- State = 84;
+ State = 86;
_localctx.path = Match(String);
- State = 85;
+ State = 87;
Match(As);
- State = 86;
+ State = 88;
_localctx.identifier = fullName();
+ State = 89;
+ Match(SemiColon);
}
}
catch (RecognitionException re) {
@@ -309,6 +314,7 @@ public partial class OperationHandlerContext : ParserRuleContext {
[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RightArrow() { return GetToken(CrimsonParser.RightArrow, 0); }
[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpenBrace() { return GetToken(CrimsonParser.OpenBrace, 0); }
[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CloseBrace() { return GetToken(CrimsonParser.CloseBrace, 0); }
+ [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SemiColon() { return GetToken(CrimsonParser.SemiColon, 0); }
[System.Diagnostics.DebuggerNonUserCode] public TypeContext[] type() {
return GetRuleContexts();
}
@@ -349,28 +355,30 @@ public OperationHandlerContext operationHandler() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 88;
+ State = 91;
Match(Hashtag);
- State = 89;
+ State = 92;
Match(OpHandler);
- State = 90;
+ State = 93;
Match(OpenBracket);
- State = 91;
+ State = 94;
_localctx.t1 = type();
- State = 92;
+ State = 95;
_localctx.op = Match(Operator);
- State = 93;
+ State = 96;
_localctx.t2 = type();
- State = 94;
+ State = 97;
Match(CloseBracket);
- State = 95;
+ State = 98;
Match(RightArrow);
- State = 96;
+ State = 99;
Match(OpenBrace);
- State = 97;
+ State = 100;
_localctx.identifier = fullName();
- State = 98;
+ State = 101;
Match(CloseBrace);
+ State = 102;
+ Match(SemiColon);
}
}
catch (RecognitionException re) {
@@ -468,14 +476,14 @@ public GlobalStatementContext globalStatement() {
GlobalStatementContext _localctx = new GlobalStatementContext(Context, State);
EnterRule(_localctx, 6, RULE_globalStatement);
try {
- State = 103;
+ State = 107;
ErrorHandler.Sync(this);
switch (TokenStream.LA(1)) {
case Global:
_localctx = new GlobalVariableUnitStatementContext(_localctx);
EnterOuterAlt(_localctx, 1);
{
- State = 100;
+ State = 104;
globalVariableDeclaration();
}
break;
@@ -483,7 +491,7 @@ public GlobalStatementContext globalStatement() {
_localctx = new FunctionUnitStatementContext(_localctx);
EnterOuterAlt(_localctx, 2);
{
- State = 101;
+ State = 105;
functionDeclaration();
}
break;
@@ -491,7 +499,7 @@ public GlobalStatementContext globalStatement() {
_localctx = new StructureUnitStatementContext(_localctx);
EnterOuterAlt(_localctx, 3);
{
- State = 102;
+ State = 106;
structureDeclaration();
}
break;
@@ -546,9 +554,9 @@ public GlobalVariableDeclarationContext globalVariableDeclaration() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 105;
+ State = 109;
Match(Global);
- State = 106;
+ State = 110;
_localctx.declaration = internalVariableDeclaration();
}
}
@@ -607,13 +615,13 @@ public FunctionDeclarationContext functionDeclaration() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 108;
+ State = 112;
Match(Function);
- State = 109;
+ State = 113;
_localctx.returnType = type();
- State = 110;
+ State = 114;
_localctx.header = functionHeader();
- State = 111;
+ State = 115;
_localctx.body = functionBody();
}
}
@@ -667,9 +675,9 @@ public FunctionHeaderContext functionHeader() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 113;
+ State = 117;
_localctx.name = fullName();
- State = 114;
+ State = 118;
_localctx.parameters = parameterList();
}
}
@@ -726,24 +734,24 @@ public FunctionBodyContext functionBody() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 116;
- Match(OpenBrace);
State = 120;
+ Match(OpenBrace);
+ State = 124;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
- while (((_la) & ~0x3f) == 0 && ((1L << _la) & 17592739928128L) != 0) {
+ while (((_la) & ~0x3f) == 0 && ((1L << _la) & 35185496397888L) != 0) {
{
{
- State = 117;
+ State = 121;
_localctx._internalStatement = internalStatement();
_localctx._statements.Add(_localctx._internalStatement);
}
}
- State = 122;
+ State = 126;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
}
- State = 123;
+ State = 127;
Match(CloseBrace);
}
}
@@ -837,6 +845,28 @@ public override TResult Accept(IParseTreeVisitor visitor) {
else return visitor.VisitChildren(this);
}
}
+ public partial class FunctionBasicCallStatementContext : InternalStatementContext {
+ [System.Diagnostics.DebuggerNonUserCode] public BasicCallContext basicCall() {
+ return GetRuleContext(0);
+ }
+ public FunctionBasicCallStatementContext(InternalStatementContext context) { CopyFrom(context); }
+ [System.Diagnostics.DebuggerNonUserCode]
+ public override void EnterRule(IParseTreeListener listener) {
+ ICrimsonListener typedListener = listener as ICrimsonListener;
+ if (typedListener != null) typedListener.EnterFunctionBasicCallStatement(this);
+ }
+ [System.Diagnostics.DebuggerNonUserCode]
+ public override void ExitRule(IParseTreeListener listener) {
+ ICrimsonListener typedListener = listener as ICrimsonListener;
+ if (typedListener != null) typedListener.ExitFunctionBasicCallStatement(this);
+ }
+ [System.Diagnostics.DebuggerNonUserCode]
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitFunctionBasicCallStatement(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
public partial class FunctionVariableDeclarationStatementContext : InternalStatementContext {
[System.Diagnostics.DebuggerNonUserCode] public InternalVariableDeclarationContext internalVariableDeclaration() {
return GetRuleContext(0);
@@ -931,14 +961,14 @@ public InternalStatementContext internalStatement() {
InternalStatementContext _localctx = new InternalStatementContext(Context, State);
EnterRule(_localctx, 16, RULE_internalStatement);
try {
- State = 134;
+ State = 139;
ErrorHandler.Sync(this);
switch ( Interpreter.AdaptivePredict(TokenStream,5,Context) ) {
case 1:
_localctx = new FunctionVariableDeclarationStatementContext(_localctx);
EnterOuterAlt(_localctx, 1);
{
- State = 125;
+ State = 129;
internalVariableDeclaration();
}
break;
@@ -946,7 +976,7 @@ public InternalStatementContext internalStatement() {
_localctx = new FunctionReturnStatementContext(_localctx);
EnterOuterAlt(_localctx, 2);
{
- State = 126;
+ State = 130;
functionReturn();
}
break;
@@ -954,7 +984,7 @@ public InternalStatementContext internalStatement() {
_localctx = new FunctionAssignVariableStatementContext(_localctx);
EnterOuterAlt(_localctx, 3);
{
- State = 127;
+ State = 131;
assignVariable();
}
break;
@@ -962,9 +992,9 @@ public InternalStatementContext internalStatement() {
_localctx = new FunctionFunctionCallStatementContext(_localctx);
EnterOuterAlt(_localctx, 4);
{
- State = 128;
+ State = 132;
functionCall();
- State = 129;
+ State = 133;
Match(SemiColon);
}
break;
@@ -972,7 +1002,7 @@ public InternalStatementContext internalStatement() {
_localctx = new FunctionIfStatementContext(_localctx);
EnterOuterAlt(_localctx, 5);
{
- State = 131;
+ State = 135;
ifBlock();
}
break;
@@ -980,15 +1010,23 @@ public InternalStatementContext internalStatement() {
_localctx = new FunctionWhileStatementContext(_localctx);
EnterOuterAlt(_localctx, 6);
{
- State = 132;
+ State = 136;
whileBlock();
}
break;
case 7:
- _localctx = new FunctionAssemblyCallStatementContext(_localctx);
+ _localctx = new FunctionBasicCallStatementContext(_localctx);
EnterOuterAlt(_localctx, 7);
{
- State = 133;
+ State = 137;
+ basicCall();
+ }
+ break;
+ case 8:
+ _localctx = new FunctionAssemblyCallStatementContext(_localctx);
+ EnterOuterAlt(_localctx, 8);
+ {
+ State = 138;
assemblyCall();
}
break;
@@ -1052,29 +1090,29 @@ public InternalVariableDeclarationContext internalVariableDeclaration() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 136;
+ State = 141;
type();
- State = 137;
+ State = 142;
fullName();
- State = 138;
+ State = 143;
Match(DirectEquals);
- State = 141;
+ State = 146;
ErrorHandler.Sync(this);
switch ( Interpreter.AdaptivePredict(TokenStream,6,Context) ) {
case 1:
{
- State = 139;
+ State = 144;
_localctx.complex = complexValue();
}
break;
case 2:
{
- State = 140;
+ State = 145;
_localctx.simple = simpleValue();
}
break;
}
- State = 143;
+ State = 148;
Match(SemiColon);
}
}
@@ -1173,34 +1211,34 @@ public AssignVariableContext assignVariable() {
AssignVariableContext _localctx = new AssignVariableContext(Context, State);
EnterRule(_localctx, 20, RULE_assignVariable);
try {
- State = 161;
+ State = 166;
ErrorHandler.Sync(this);
switch ( Interpreter.AdaptivePredict(TokenStream,9,Context) ) {
case 1:
_localctx = new AssignVariableDirectContext(_localctx);
EnterOuterAlt(_localctx, 1);
{
- State = 145;
+ State = 150;
((AssignVariableDirectContext)_localctx).name = fullName();
- State = 146;
+ State = 151;
Match(DirectEquals);
- State = 149;
+ State = 154;
ErrorHandler.Sync(this);
switch ( Interpreter.AdaptivePredict(TokenStream,7,Context) ) {
case 1:
{
- State = 147;
+ State = 152;
((AssignVariableDirectContext)_localctx).complex = complexValue();
}
break;
case 2:
{
- State = 148;
+ State = 153;
((AssignVariableDirectContext)_localctx).simple = simpleValue();
}
break;
}
- State = 151;
+ State = 156;
Match(SemiColon);
}
break;
@@ -1208,27 +1246,27 @@ public AssignVariableContext assignVariable() {
_localctx = new AssignVariableAtPointerContext(_localctx);
EnterOuterAlt(_localctx, 2);
{
- State = 153;
+ State = 158;
((AssignVariableAtPointerContext)_localctx).name = fullName();
- State = 154;
+ State = 159;
Match(PointerEquals);
- State = 157;
+ State = 162;
ErrorHandler.Sync(this);
switch ( Interpreter.AdaptivePredict(TokenStream,8,Context) ) {
case 1:
{
- State = 155;
+ State = 160;
((AssignVariableAtPointerContext)_localctx).complex = complexValue();
}
break;
case 2:
{
- State = 156;
+ State = 161;
((AssignVariableAtPointerContext)_localctx).simple = simpleValue();
}
break;
}
- State = 159;
+ State = 164;
Match(SemiColon);
}
break;
@@ -1289,24 +1327,24 @@ public IfBlockContext ifBlock() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 163;
+ State = 168;
Match(If);
- State = 164;
+ State = 169;
condition();
- State = 165;
+ State = 170;
functionBody();
- State = 168;
+ State = 173;
ErrorHandler.Sync(this);
switch ( Interpreter.AdaptivePredict(TokenStream,10,Context) ) {
case 1:
{
- State = 166;
+ State = 171;
elseBlock();
}
break;
case 2:
{
- State = 167;
+ State = 172;
elseIfBlock();
}
break;
@@ -1362,11 +1400,11 @@ public WhileBlockContext whileBlock() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 170;
+ State = 175;
Match(While);
- State = 171;
+ State = 176;
condition();
- State = 172;
+ State = 177;
functionBody();
}
}
@@ -1418,11 +1456,11 @@ public ConditionContext condition() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 174;
+ State = 179;
Match(OpenBracket);
- State = 175;
+ State = 180;
_localctx.op = operation();
- State = 176;
+ State = 181;
Match(CloseBracket);
}
}
@@ -1472,9 +1510,9 @@ public ElseIfBlockContext elseIfBlock() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 178;
+ State = 183;
Match(Else);
- State = 179;
+ State = 184;
ifBlock();
}
}
@@ -1524,9 +1562,9 @@ public ElseBlockContext elseBlock() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 181;
+ State = 186;
Match(Else);
- State = 182;
+ State = 187;
functionBody();
}
}
@@ -1541,9 +1579,83 @@ public ElseBlockContext elseBlock() {
return _localctx;
}
+ public partial class BasicCallContext : ParserRuleContext {
+ public IToken basicText;
+ [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BasicCall() { return GetToken(CrimsonParser.BasicCall, 0); }
+ public BasicCallContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_basicCall; } }
+ [System.Diagnostics.DebuggerNonUserCode]
+ public override void EnterRule(IParseTreeListener listener) {
+ ICrimsonListener typedListener = listener as ICrimsonListener;
+ if (typedListener != null) typedListener.EnterBasicCall(this);
+ }
+ [System.Diagnostics.DebuggerNonUserCode]
+ public override void ExitRule(IParseTreeListener listener) {
+ ICrimsonListener typedListener = listener as ICrimsonListener;
+ if (typedListener != null) typedListener.ExitBasicCall(this);
+ }
+ [System.Diagnostics.DebuggerNonUserCode]
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitBasicCall(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public BasicCallContext basicCall() {
+ BasicCallContext _localctx = new BasicCallContext(Context, State);
+ EnterRule(_localctx, 32, RULE_basicCall);
+ int _la;
+ try {
+ int _alt;
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 189;
+ Match(BasicCall);
+ State = 193;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,11,Context);
+ while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ {
+ {
+ State = 190;
+ _localctx.basicText = TokenStream.LT(1);
+ _la = TokenStream.LA(1);
+ if ( _la <= 0 || (_la==T__0 || _la==T__1) ) {
+ _localctx.basicText = ErrorHandler.RecoverInline(this);
+ }
+ else {
+ ErrorHandler.ReportMatch(this);
+ Consume();
+ }
+ }
+ }
+ }
+ State = 195;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,11,Context);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
public partial class AssemblyCallContext : ParserRuleContext {
public IToken assemblyText;
- [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Tilda() { return GetToken(CrimsonParser.Tilda, 0); }
+ [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AssemblyCall() { return GetToken(CrimsonParser.AssemblyCall, 0); }
public AssemblyCallContext(ParserRuleContext parent, int invokingState)
: base(parent, invokingState)
{
@@ -1570,22 +1682,22 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public AssemblyCallContext assemblyCall() {
AssemblyCallContext _localctx = new AssemblyCallContext(Context, State);
- EnterRule(_localctx, 32, RULE_assemblyCall);
+ EnterRule(_localctx, 34, RULE_assemblyCall);
int _la;
try {
int _alt;
EnterOuterAlt(_localctx, 1);
{
- State = 184;
- Match(Tilda);
- State = 188;
+ State = 196;
+ Match(AssemblyCall);
+ State = 200;
ErrorHandler.Sync(this);
- _alt = Interpreter.AdaptivePredict(TokenStream,11,Context);
+ _alt = Interpreter.AdaptivePredict(TokenStream,12,Context);
while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
- State = 185;
+ State = 197;
_localctx.assemblyText = TokenStream.LT(1);
_la = TokenStream.LA(1);
if ( _la <= 0 || (_la==T__0 || _la==T__1) ) {
@@ -1598,9 +1710,9 @@ public AssemblyCallContext assemblyCall() {
}
}
}
- State = 190;
+ State = 202;
ErrorHandler.Sync(this);
- _alt = Interpreter.AdaptivePredict(TokenStream,11,Context);
+ _alt = Interpreter.AdaptivePredict(TokenStream,12,Context);
}
}
}
@@ -1650,13 +1762,13 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public FunctionCallContext functionCall() {
FunctionCallContext _localctx = new FunctionCallContext(Context, State);
- EnterRule(_localctx, 34, RULE_functionCall);
+ EnterRule(_localctx, 36, RULE_functionCall);
try {
EnterOuterAlt(_localctx, 1);
{
- State = 191;
+ State = 203;
_localctx.name = fullName();
- State = 192;
+ State = 204;
_localctx.args = arguments();
}
}
@@ -1710,42 +1822,42 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public ArgumentsContext arguments() {
ArgumentsContext _localctx = new ArgumentsContext(Context, State);
- EnterRule(_localctx, 36, RULE_arguments);
+ EnterRule(_localctx, 38, RULE_arguments);
int _la;
try {
EnterOuterAlt(_localctx, 1);
{
- State = 194;
+ State = 206;
Match(OpenBracket);
- State = 196;
+ State = 208;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
- if (((_la) & ~0x3f) == 0 && ((1L << _la) & 21990232948736L) != 0) {
+ if (((_la) & ~0x3f) == 0 && ((1L << _la) & 43980465504256L) != 0) {
{
- State = 195;
+ State = 207;
simpleValue();
}
}
- State = 202;
+ State = 214;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
while (_la==Comma) {
{
{
- State = 198;
+ State = 210;
Match(Comma);
{
- State = 199;
+ State = 211;
simpleValue();
}
}
}
- State = 204;
+ State = 216;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
}
- State = 205;
+ State = 217;
Match(CloseBracket);
}
}
@@ -1792,28 +1904,28 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public FunctionReturnContext functionReturn() {
FunctionReturnContext _localctx = new FunctionReturnContext(Context, State);
- EnterRule(_localctx, 38, RULE_functionReturn);
+ EnterRule(_localctx, 40, RULE_functionReturn);
try {
- State = 213;
+ State = 225;
ErrorHandler.Sync(this);
- switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) {
+ switch ( Interpreter.AdaptivePredict(TokenStream,15,Context) ) {
case 1:
EnterOuterAlt(_localctx, 1);
{
- State = 207;
+ State = 219;
Match(Return);
- State = 208;
+ State = 220;
simpleValue();
- State = 209;
+ State = 221;
Match(SemiColon);
}
break;
case 2:
EnterOuterAlt(_localctx, 2);
{
- State = 211;
+ State = 223;
Match(Return);
- State = 212;
+ State = 224;
Match(SemiColon);
}
break;
@@ -1867,23 +1979,23 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public SimpleValueContext simpleValue() {
SimpleValueContext _localctx = new SimpleValueContext(Context, State);
- EnterRule(_localctx, 40, RULE_simpleValue);
+ EnterRule(_localctx, 42, RULE_simpleValue);
int _la;
try {
- State = 220;
+ State = 232;
ErrorHandler.Sync(this);
switch (TokenStream.LA(1)) {
case ShortName:
EnterOuterAlt(_localctx, 1);
{
- State = 215;
+ State = 227;
_localctx.id = fullName();
- State = 217;
+ State = 229;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
if (_la==Asterisk) {
{
- State = 216;
+ State = 228;
_localctx.pointer = Match(Asterisk);
}
}
@@ -1895,7 +2007,7 @@ public SimpleValueContext simpleValue() {
case Number:
EnterOuterAlt(_localctx, 2);
{
- State = 219;
+ State = 231;
_localctx.raw = rawValue();
}
break;
@@ -1949,22 +2061,22 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public ComplexValueContext complexValue() {
ComplexValueContext _localctx = new ComplexValueContext(Context, State);
- EnterRule(_localctx, 42, RULE_complexValue);
+ EnterRule(_localctx, 44, RULE_complexValue);
try {
- State = 224;
+ State = 236;
ErrorHandler.Sync(this);
- switch ( Interpreter.AdaptivePredict(TokenStream,17,Context) ) {
+ switch ( Interpreter.AdaptivePredict(TokenStream,18,Context) ) {
case 1:
EnterOuterAlt(_localctx, 1);
{
- State = 222;
+ State = 234;
_localctx.op = operation();
}
break;
case 2:
EnterOuterAlt(_localctx, 2);
{
- State = 223;
+ State = 235;
_localctx.func = functionCall();
}
break;
@@ -2011,14 +2123,14 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public RawValueContext rawValue() {
RawValueContext _localctx = new RawValueContext(Context, State);
- EnterRule(_localctx, 44, RULE_rawValue);
+ EnterRule(_localctx, 46, RULE_rawValue);
int _la;
try {
EnterOuterAlt(_localctx, 1);
{
- State = 226;
+ State = 238;
_la = TokenStream.LA(1);
- if ( !(((_la) & ~0x3f) == 0 && ((1L << _la) & 4398046904320L) != 0) ) {
+ if ( !(((_la) & ~0x3f) == 0 && ((1L << _la) & 8796093415424L) != 0) ) {
ErrorHandler.RecoverInline(this);
}
else {
@@ -2075,15 +2187,15 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public OperationContext operation() {
OperationContext _localctx = new OperationContext(Context, State);
- EnterRule(_localctx, 46, RULE_operation);
+ EnterRule(_localctx, 48, RULE_operation);
try {
EnterOuterAlt(_localctx, 1);
{
- State = 228;
+ State = 240;
_localctx.leftValue = simpleValue();
- State = 229;
+ State = 241;
_localctx.@operator = Match(Operator);
- State = 230;
+ State = 242;
_localctx.rightValue = simpleValue();
}
}
@@ -2137,45 +2249,45 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public ParameterListContext parameterList() {
ParameterListContext _localctx = new ParameterListContext(Context, State);
- EnterRule(_localctx, 48, RULE_parameterList);
+ EnterRule(_localctx, 50, RULE_parameterList);
int _la;
try {
- State = 245;
+ State = 257;
ErrorHandler.Sync(this);
- switch ( Interpreter.AdaptivePredict(TokenStream,19,Context) ) {
+ switch ( Interpreter.AdaptivePredict(TokenStream,20,Context) ) {
case 1:
EnterOuterAlt(_localctx, 1);
{
- State = 232;
+ State = 244;
Match(OpenBracket);
- State = 233;
+ State = 245;
Match(CloseBracket);
}
break;
case 2:
EnterOuterAlt(_localctx, 2);
{
- State = 234;
+ State = 246;
Match(OpenBracket);
- State = 235;
+ State = 247;
parameter();
- State = 240;
+ State = 252;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
while (_la==Comma) {
{
{
- State = 236;
+ State = 248;
Match(Comma);
- State = 237;
+ State = 249;
parameter();
}
}
- State = 242;
+ State = 254;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
}
- State = 243;
+ State = 255;
Match(CloseBracket);
}
break;
@@ -2227,13 +2339,13 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public ParameterContext parameter() {
ParameterContext _localctx = new ParameterContext(Context, State);
- EnterRule(_localctx, 50, RULE_parameter);
+ EnterRule(_localctx, 52, RULE_parameter);
try {
EnterOuterAlt(_localctx, 1);
{
- State = 247;
+ State = 259;
_localctx.t = type();
- State = 248;
+ State = 260;
_localctx.name = fullName();
}
}
@@ -2284,15 +2396,15 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public StructureDeclarationContext structureDeclaration() {
StructureDeclarationContext _localctx = new StructureDeclarationContext(Context, State);
- EnterRule(_localctx, 52, RULE_structureDeclaration);
+ EnterRule(_localctx, 54, RULE_structureDeclaration);
try {
EnterOuterAlt(_localctx, 1);
{
- State = 250;
+ State = 262;
Match(Structure);
- State = 251;
+ State = 263;
_localctx.name = fullName();
- State = 252;
+ State = 264;
_localctx.body = structureBody();
}
}
@@ -2342,28 +2454,28 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public StructureBodyContext structureBody() {
StructureBodyContext _localctx = new StructureBodyContext(Context, State);
- EnterRule(_localctx, 54, RULE_structureBody);
+ EnterRule(_localctx, 56, RULE_structureBody);
int _la;
try {
EnterOuterAlt(_localctx, 1);
{
- State = 254;
+ State = 266;
Match(OpenBrace);
- State = 258;
+ State = 270;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
- while (((_la) & ~0x3f) == 0 && ((1L << _la) & 17592723144704L) != 0) {
+ while (((_la) & ~0x3f) == 0 && ((1L << _la) & 35185446060032L) != 0) {
{
{
- State = 255;
+ State = 267;
internalVariableDeclaration();
}
}
- State = 260;
+ State = 272;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
}
- State = 261;
+ State = 273;
Match(CloseBrace);
}
}
@@ -2414,43 +2526,43 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public TypeContext type() {
TypeContext _localctx = new TypeContext(Context, State);
- EnterRule(_localctx, 56, RULE_type);
+ EnterRule(_localctx, 58, RULE_type);
try {
- State = 268;
+ State = 280;
ErrorHandler.Sync(this);
switch (TokenStream.LA(1)) {
case Integer:
EnterOuterAlt(_localctx, 1);
{
- State = 263;
+ State = 275;
Match(Integer);
}
break;
case Boolean:
EnterOuterAlt(_localctx, 2);
{
- State = 264;
+ State = 276;
Match(Boolean);
}
break;
case ShortName:
EnterOuterAlt(_localctx, 3);
{
- State = 265;
+ State = 277;
fullName();
}
break;
case OpenSquare:
EnterOuterAlt(_localctx, 4);
{
- State = 266;
+ State = 278;
array();
}
break;
case Null:
EnterOuterAlt(_localctx, 5);
{
- State = 267;
+ State = 279;
Match(Null);
}
break;
@@ -2501,15 +2613,15 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public ArrayContext array() {
ArrayContext _localctx = new ArrayContext(Context, State);
- EnterRule(_localctx, 58, RULE_array);
+ EnterRule(_localctx, 60, RULE_array);
try {
EnterOuterAlt(_localctx, 1);
{
- State = 270;
+ State = 282;
Match(OpenSquare);
- State = 271;
+ State = 283;
type();
- State = 272;
+ State = 284;
Match(CloseSquare);
}
}
@@ -2558,23 +2670,23 @@ public override TResult Accept(IParseTreeVisitor visitor) {
[RuleVersion(0)]
public FullNameContext fullName() {
FullNameContext _localctx = new FullNameContext(Context, State);
- EnterRule(_localctx, 60, RULE_fullName);
+ EnterRule(_localctx, 62, RULE_fullName);
try {
EnterOuterAlt(_localctx, 1);
{
- State = 276;
+ State = 288;
ErrorHandler.Sync(this);
- switch ( Interpreter.AdaptivePredict(TokenStream,22,Context) ) {
+ switch ( Interpreter.AdaptivePredict(TokenStream,23,Context) ) {
case 1:
{
- State = 274;
+ State = 286;
_localctx.libraryName = Match(ShortName);
- State = 275;
+ State = 287;
Match(Dot);
}
break;
}
- State = 278;
+ State = 290;
_localctx.memberName = Match(ShortName);
}
}
@@ -2590,94 +2702,98 @@ public FullNameContext fullName() {
}
private static int[] _serializedATN = {
- 4,1,44,281,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,
+ 4,1,45,293,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,
7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,
2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,
2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,
- 2,29,7,29,2,30,7,30,1,0,5,0,64,8,0,10,0,12,0,67,9,0,1,0,5,0,70,8,0,10,
- 0,12,0,73,9,0,1,0,5,0,76,8,0,10,0,12,0,79,9,0,1,0,1,0,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,3,
- 3,104,8,3,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,7,1,7,5,7,119,
- 8,7,10,7,12,7,122,9,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,3,8,
- 135,8,8,1,9,1,9,1,9,1,9,1,9,3,9,142,8,9,1,9,1,9,1,10,1,10,1,10,1,10,3,
- 10,150,8,10,1,10,1,10,1,10,1,10,1,10,1,10,3,10,158,8,10,1,10,1,10,3,10,
- 162,8,10,1,11,1,11,1,11,1,11,1,11,3,11,169,8,11,1,12,1,12,1,12,1,12,1,
- 13,1,13,1,13,1,13,1,14,1,14,1,14,1,15,1,15,1,15,1,16,1,16,5,16,187,8,16,
- 10,16,12,16,190,9,16,1,17,1,17,1,17,1,18,1,18,3,18,197,8,18,1,18,1,18,
- 5,18,201,8,18,10,18,12,18,204,9,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,
- 1,19,3,19,214,8,19,1,20,1,20,3,20,218,8,20,1,20,3,20,221,8,20,1,21,1,21,
- 3,21,225,8,21,1,22,1,22,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,
- 24,5,24,239,8,24,10,24,12,24,242,9,24,1,24,1,24,3,24,246,8,24,1,25,1,25,
- 1,25,1,26,1,26,1,26,1,26,1,27,1,27,5,27,257,8,27,10,27,12,27,260,9,27,
- 1,27,1,27,1,28,1,28,1,28,1,28,1,28,3,28,269,8,28,1,29,1,29,1,29,1,29,1,
- 30,1,30,3,30,277,8,30,1,30,1,30,1,30,0,0,31,0,2,4,6,8,10,12,14,16,18,20,
- 22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,0,2,1,0,1,
- 2,2,0,17,18,42,42,282,0,65,1,0,0,0,2,82,1,0,0,0,4,88,1,0,0,0,6,103,1,0,
- 0,0,8,105,1,0,0,0,10,108,1,0,0,0,12,113,1,0,0,0,14,116,1,0,0,0,16,134,
- 1,0,0,0,18,136,1,0,0,0,20,161,1,0,0,0,22,163,1,0,0,0,24,170,1,0,0,0,26,
- 174,1,0,0,0,28,178,1,0,0,0,30,181,1,0,0,0,32,184,1,0,0,0,34,191,1,0,0,
- 0,36,194,1,0,0,0,38,213,1,0,0,0,40,220,1,0,0,0,42,224,1,0,0,0,44,226,1,
- 0,0,0,46,228,1,0,0,0,48,245,1,0,0,0,50,247,1,0,0,0,52,250,1,0,0,0,54,254,
- 1,0,0,0,56,268,1,0,0,0,58,270,1,0,0,0,60,276,1,0,0,0,62,64,3,2,1,0,63,
- 62,1,0,0,0,64,67,1,0,0,0,65,63,1,0,0,0,65,66,1,0,0,0,66,71,1,0,0,0,67,
- 65,1,0,0,0,68,70,3,4,2,0,69,68,1,0,0,0,70,73,1,0,0,0,71,69,1,0,0,0,71,
- 72,1,0,0,0,72,77,1,0,0,0,73,71,1,0,0,0,74,76,3,6,3,0,75,74,1,0,0,0,76,
- 79,1,0,0,0,77,75,1,0,0,0,77,78,1,0,0,0,78,80,1,0,0,0,79,77,1,0,0,0,80,
- 81,5,0,0,1,81,1,1,0,0,0,82,83,5,37,0,0,83,84,5,8,0,0,84,85,5,43,0,0,85,
- 86,5,10,0,0,86,87,3,60,30,0,87,3,1,0,0,0,88,89,5,37,0,0,89,90,5,9,0,0,
- 90,91,5,27,0,0,91,92,3,56,28,0,92,93,5,19,0,0,93,94,3,56,28,0,94,95,5,
- 28,0,0,95,96,5,23,0,0,96,97,5,31,0,0,97,98,3,60,30,0,98,99,5,32,0,0,99,
- 5,1,0,0,0,100,104,3,8,4,0,101,104,3,10,5,0,102,104,3,52,26,0,103,100,1,
- 0,0,0,103,101,1,0,0,0,103,102,1,0,0,0,104,7,1,0,0,0,105,106,5,5,0,0,106,
- 107,3,18,9,0,107,9,1,0,0,0,108,109,5,4,0,0,109,110,3,56,28,0,110,111,3,
- 12,6,0,111,112,3,14,7,0,112,11,1,0,0,0,113,114,3,60,30,0,114,115,3,48,
- 24,0,115,13,1,0,0,0,116,120,5,31,0,0,117,119,3,16,8,0,118,117,1,0,0,0,
- 119,122,1,0,0,0,120,118,1,0,0,0,120,121,1,0,0,0,121,123,1,0,0,0,122,120,
- 1,0,0,0,123,124,5,32,0,0,124,15,1,0,0,0,125,135,3,18,9,0,126,135,3,38,
- 19,0,127,135,3,20,10,0,128,129,3,34,17,0,129,130,5,35,0,0,130,135,1,0,
- 0,0,131,135,3,22,11,0,132,135,3,24,12,0,133,135,3,32,16,0,134,125,1,0,
- 0,0,134,126,1,0,0,0,134,127,1,0,0,0,134,128,1,0,0,0,134,131,1,0,0,0,134,
- 132,1,0,0,0,134,133,1,0,0,0,135,17,1,0,0,0,136,137,3,56,28,0,137,138,3,
- 60,30,0,138,141,5,25,0,0,139,142,3,42,21,0,140,142,3,40,20,0,141,139,1,
- 0,0,0,141,140,1,0,0,0,142,143,1,0,0,0,143,144,5,35,0,0,144,19,1,0,0,0,
- 145,146,3,60,30,0,146,149,5,25,0,0,147,150,3,42,21,0,148,150,3,40,20,0,
- 149,147,1,0,0,0,149,148,1,0,0,0,150,151,1,0,0,0,151,152,5,35,0,0,152,162,
- 1,0,0,0,153,154,3,60,30,0,154,157,5,26,0,0,155,158,3,42,21,0,156,158,3,
- 40,20,0,157,155,1,0,0,0,157,156,1,0,0,0,158,159,1,0,0,0,159,160,5,35,0,
- 0,160,162,1,0,0,0,161,145,1,0,0,0,161,153,1,0,0,0,162,21,1,0,0,0,163,164,
- 5,11,0,0,164,165,3,26,13,0,165,168,3,14,7,0,166,169,3,30,15,0,167,169,
- 3,28,14,0,168,166,1,0,0,0,168,167,1,0,0,0,168,169,1,0,0,0,169,23,1,0,0,
- 0,170,171,5,12,0,0,171,172,3,26,13,0,172,173,3,14,7,0,173,25,1,0,0,0,174,
- 175,5,27,0,0,175,176,3,46,23,0,176,177,5,28,0,0,177,27,1,0,0,0,178,179,
- 5,13,0,0,179,180,3,22,11,0,180,29,1,0,0,0,181,182,5,13,0,0,182,183,3,14,
- 7,0,183,31,1,0,0,0,184,188,5,24,0,0,185,187,8,0,0,0,186,185,1,0,0,0,187,
- 190,1,0,0,0,188,186,1,0,0,0,188,189,1,0,0,0,189,33,1,0,0,0,190,188,1,0,
- 0,0,191,192,3,60,30,0,192,193,3,36,18,0,193,35,1,0,0,0,194,196,5,27,0,
- 0,195,197,3,40,20,0,196,195,1,0,0,0,196,197,1,0,0,0,197,202,1,0,0,0,198,
- 199,5,33,0,0,199,201,3,40,20,0,200,198,1,0,0,0,201,204,1,0,0,0,202,200,
- 1,0,0,0,202,203,1,0,0,0,203,205,1,0,0,0,204,202,1,0,0,0,205,206,5,28,0,
- 0,206,37,1,0,0,0,207,208,5,6,0,0,208,209,3,40,20,0,209,210,5,35,0,0,210,
- 214,1,0,0,0,211,212,5,6,0,0,212,214,5,35,0,0,213,207,1,0,0,0,213,211,1,
- 0,0,0,214,39,1,0,0,0,215,217,3,60,30,0,216,218,5,20,0,0,217,216,1,0,0,
- 0,217,218,1,0,0,0,218,221,1,0,0,0,219,221,3,44,22,0,220,215,1,0,0,0,220,
- 219,1,0,0,0,221,41,1,0,0,0,222,225,3,46,23,0,223,225,3,34,17,0,224,222,
- 1,0,0,0,224,223,1,0,0,0,225,43,1,0,0,0,226,227,7,1,0,0,227,45,1,0,0,0,
- 228,229,3,40,20,0,229,230,5,19,0,0,230,231,3,40,20,0,231,47,1,0,0,0,232,
- 233,5,27,0,0,233,246,5,28,0,0,234,235,5,27,0,0,235,240,3,50,25,0,236,237,
- 5,33,0,0,237,239,3,50,25,0,238,236,1,0,0,0,239,242,1,0,0,0,240,238,1,0,
- 0,0,240,241,1,0,0,0,241,243,1,0,0,0,242,240,1,0,0,0,243,244,5,28,0,0,244,
- 246,1,0,0,0,245,232,1,0,0,0,245,234,1,0,0,0,246,49,1,0,0,0,247,248,3,56,
- 28,0,248,249,3,60,30,0,249,51,1,0,0,0,250,251,5,7,0,0,251,252,3,60,30,
- 0,252,253,3,54,27,0,253,53,1,0,0,0,254,258,5,31,0,0,255,257,3,18,9,0,256,
- 255,1,0,0,0,257,260,1,0,0,0,258,256,1,0,0,0,258,259,1,0,0,0,259,261,1,
- 0,0,0,260,258,1,0,0,0,261,262,5,32,0,0,262,55,1,0,0,0,263,269,5,15,0,0,
- 264,269,5,16,0,0,265,269,3,60,30,0,266,269,3,58,29,0,267,269,5,17,0,0,
- 268,263,1,0,0,0,268,264,1,0,0,0,268,265,1,0,0,0,268,266,1,0,0,0,268,267,
- 1,0,0,0,269,57,1,0,0,0,270,271,5,29,0,0,271,272,3,56,28,0,272,273,5,30,
- 0,0,273,59,1,0,0,0,274,275,5,44,0,0,275,277,5,34,0,0,276,274,1,0,0,0,276,
- 277,1,0,0,0,277,278,1,0,0,0,278,279,5,44,0,0,279,61,1,0,0,0,23,65,71,77,
- 103,120,134,141,149,157,161,168,188,196,202,213,217,220,224,240,245,258,
- 268,276
+ 2,29,7,29,2,30,7,30,2,31,7,31,1,0,5,0,66,8,0,10,0,12,0,69,9,0,1,0,5,0,
+ 72,8,0,10,0,12,0,75,9,0,1,0,5,0,78,8,0,10,0,12,0,81,9,0,1,0,1,0,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
+ 1,2,1,3,1,3,1,3,3,3,108,8,3,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,
+ 6,1,7,1,7,5,7,123,8,7,10,7,12,7,126,9,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,
+ 8,1,8,1,8,1,8,1,8,3,8,140,8,8,1,9,1,9,1,9,1,9,1,9,3,9,147,8,9,1,9,1,9,
+ 1,10,1,10,1,10,1,10,3,10,155,8,10,1,10,1,10,1,10,1,10,1,10,1,10,3,10,163,
+ 8,10,1,10,1,10,3,10,167,8,10,1,11,1,11,1,11,1,11,1,11,3,11,174,8,11,1,
+ 12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,15,1,15,1,15,1,
+ 16,1,16,5,16,192,8,16,10,16,12,16,195,9,16,1,17,1,17,5,17,199,8,17,10,
+ 17,12,17,202,9,17,1,18,1,18,1,18,1,19,1,19,3,19,209,8,19,1,19,1,19,5,19,
+ 213,8,19,10,19,12,19,216,9,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,
+ 3,20,226,8,20,1,21,1,21,3,21,230,8,21,1,21,3,21,233,8,21,1,22,1,22,3,22,
+ 237,8,22,1,23,1,23,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,5,
+ 25,251,8,25,10,25,12,25,254,9,25,1,25,1,25,3,25,258,8,25,1,26,1,26,1,26,
+ 1,27,1,27,1,27,1,27,1,28,1,28,5,28,269,8,28,10,28,12,28,272,9,28,1,28,
+ 1,28,1,29,1,29,1,29,1,29,1,29,3,29,281,8,29,1,30,1,30,1,30,1,30,1,31,1,
+ 31,3,31,289,8,31,1,31,1,31,1,31,0,0,32,0,2,4,6,8,10,12,14,16,18,20,22,
+ 24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,0,2,1,0,1,
+ 2,2,0,17,18,43,43,295,0,67,1,0,0,0,2,84,1,0,0,0,4,91,1,0,0,0,6,107,1,0,
+ 0,0,8,109,1,0,0,0,10,112,1,0,0,0,12,117,1,0,0,0,14,120,1,0,0,0,16,139,
+ 1,0,0,0,18,141,1,0,0,0,20,166,1,0,0,0,22,168,1,0,0,0,24,175,1,0,0,0,26,
+ 179,1,0,0,0,28,183,1,0,0,0,30,186,1,0,0,0,32,189,1,0,0,0,34,196,1,0,0,
+ 0,36,203,1,0,0,0,38,206,1,0,0,0,40,225,1,0,0,0,42,232,1,0,0,0,44,236,1,
+ 0,0,0,46,238,1,0,0,0,48,240,1,0,0,0,50,257,1,0,0,0,52,259,1,0,0,0,54,262,
+ 1,0,0,0,56,266,1,0,0,0,58,280,1,0,0,0,60,282,1,0,0,0,62,288,1,0,0,0,64,
+ 66,3,2,1,0,65,64,1,0,0,0,66,69,1,0,0,0,67,65,1,0,0,0,67,68,1,0,0,0,68,
+ 73,1,0,0,0,69,67,1,0,0,0,70,72,3,4,2,0,71,70,1,0,0,0,72,75,1,0,0,0,73,
+ 71,1,0,0,0,73,74,1,0,0,0,74,79,1,0,0,0,75,73,1,0,0,0,76,78,3,6,3,0,77,
+ 76,1,0,0,0,78,81,1,0,0,0,79,77,1,0,0,0,79,80,1,0,0,0,80,82,1,0,0,0,81,
+ 79,1,0,0,0,82,83,5,0,0,1,83,1,1,0,0,0,84,85,5,38,0,0,85,86,5,8,0,0,86,
+ 87,5,44,0,0,87,88,5,10,0,0,88,89,3,62,31,0,89,90,5,36,0,0,90,3,1,0,0,0,
+ 91,92,5,38,0,0,92,93,5,9,0,0,93,94,5,28,0,0,94,95,3,58,29,0,95,96,5,19,
+ 0,0,96,97,3,58,29,0,97,98,5,29,0,0,98,99,5,23,0,0,99,100,5,32,0,0,100,
+ 101,3,62,31,0,101,102,5,33,0,0,102,103,5,36,0,0,103,5,1,0,0,0,104,108,
+ 3,8,4,0,105,108,3,10,5,0,106,108,3,54,27,0,107,104,1,0,0,0,107,105,1,0,
+ 0,0,107,106,1,0,0,0,108,7,1,0,0,0,109,110,5,5,0,0,110,111,3,18,9,0,111,
+ 9,1,0,0,0,112,113,5,4,0,0,113,114,3,58,29,0,114,115,3,12,6,0,115,116,3,
+ 14,7,0,116,11,1,0,0,0,117,118,3,62,31,0,118,119,3,50,25,0,119,13,1,0,0,
+ 0,120,124,5,32,0,0,121,123,3,16,8,0,122,121,1,0,0,0,123,126,1,0,0,0,124,
+ 122,1,0,0,0,124,125,1,0,0,0,125,127,1,0,0,0,126,124,1,0,0,0,127,128,5,
+ 33,0,0,128,15,1,0,0,0,129,140,3,18,9,0,130,140,3,40,20,0,131,140,3,20,
+ 10,0,132,133,3,36,18,0,133,134,5,36,0,0,134,140,1,0,0,0,135,140,3,22,11,
+ 0,136,140,3,24,12,0,137,140,3,32,16,0,138,140,3,34,17,0,139,129,1,0,0,
+ 0,139,130,1,0,0,0,139,131,1,0,0,0,139,132,1,0,0,0,139,135,1,0,0,0,139,
+ 136,1,0,0,0,139,137,1,0,0,0,139,138,1,0,0,0,140,17,1,0,0,0,141,142,3,58,
+ 29,0,142,143,3,62,31,0,143,146,5,26,0,0,144,147,3,44,22,0,145,147,3,42,
+ 21,0,146,144,1,0,0,0,146,145,1,0,0,0,147,148,1,0,0,0,148,149,5,36,0,0,
+ 149,19,1,0,0,0,150,151,3,62,31,0,151,154,5,26,0,0,152,155,3,44,22,0,153,
+ 155,3,42,21,0,154,152,1,0,0,0,154,153,1,0,0,0,155,156,1,0,0,0,156,157,
+ 5,36,0,0,157,167,1,0,0,0,158,159,3,62,31,0,159,162,5,27,0,0,160,163,3,
+ 44,22,0,161,163,3,42,21,0,162,160,1,0,0,0,162,161,1,0,0,0,163,164,1,0,
+ 0,0,164,165,5,36,0,0,165,167,1,0,0,0,166,150,1,0,0,0,166,158,1,0,0,0,167,
+ 21,1,0,0,0,168,169,5,11,0,0,169,170,3,26,13,0,170,173,3,14,7,0,171,174,
+ 3,30,15,0,172,174,3,28,14,0,173,171,1,0,0,0,173,172,1,0,0,0,173,174,1,
+ 0,0,0,174,23,1,0,0,0,175,176,5,12,0,0,176,177,3,26,13,0,177,178,3,14,7,
+ 0,178,25,1,0,0,0,179,180,5,28,0,0,180,181,3,48,24,0,181,182,5,29,0,0,182,
+ 27,1,0,0,0,183,184,5,13,0,0,184,185,3,22,11,0,185,29,1,0,0,0,186,187,5,
+ 13,0,0,187,188,3,14,7,0,188,31,1,0,0,0,189,193,5,24,0,0,190,192,8,0,0,
+ 0,191,190,1,0,0,0,192,195,1,0,0,0,193,191,1,0,0,0,193,194,1,0,0,0,194,
+ 33,1,0,0,0,195,193,1,0,0,0,196,200,5,25,0,0,197,199,8,0,0,0,198,197,1,
+ 0,0,0,199,202,1,0,0,0,200,198,1,0,0,0,200,201,1,0,0,0,201,35,1,0,0,0,202,
+ 200,1,0,0,0,203,204,3,62,31,0,204,205,3,38,19,0,205,37,1,0,0,0,206,208,
+ 5,28,0,0,207,209,3,42,21,0,208,207,1,0,0,0,208,209,1,0,0,0,209,214,1,0,
+ 0,0,210,211,5,34,0,0,211,213,3,42,21,0,212,210,1,0,0,0,213,216,1,0,0,0,
+ 214,212,1,0,0,0,214,215,1,0,0,0,215,217,1,0,0,0,216,214,1,0,0,0,217,218,
+ 5,29,0,0,218,39,1,0,0,0,219,220,5,6,0,0,220,221,3,42,21,0,221,222,5,36,
+ 0,0,222,226,1,0,0,0,223,224,5,6,0,0,224,226,5,36,0,0,225,219,1,0,0,0,225,
+ 223,1,0,0,0,226,41,1,0,0,0,227,229,3,62,31,0,228,230,5,20,0,0,229,228,
+ 1,0,0,0,229,230,1,0,0,0,230,233,1,0,0,0,231,233,3,46,23,0,232,227,1,0,
+ 0,0,232,231,1,0,0,0,233,43,1,0,0,0,234,237,3,48,24,0,235,237,3,36,18,0,
+ 236,234,1,0,0,0,236,235,1,0,0,0,237,45,1,0,0,0,238,239,7,1,0,0,239,47,
+ 1,0,0,0,240,241,3,42,21,0,241,242,5,19,0,0,242,243,3,42,21,0,243,49,1,
+ 0,0,0,244,245,5,28,0,0,245,258,5,29,0,0,246,247,5,28,0,0,247,252,3,52,
+ 26,0,248,249,5,34,0,0,249,251,3,52,26,0,250,248,1,0,0,0,251,254,1,0,0,
+ 0,252,250,1,0,0,0,252,253,1,0,0,0,253,255,1,0,0,0,254,252,1,0,0,0,255,
+ 256,5,29,0,0,256,258,1,0,0,0,257,244,1,0,0,0,257,246,1,0,0,0,258,51,1,
+ 0,0,0,259,260,3,58,29,0,260,261,3,62,31,0,261,53,1,0,0,0,262,263,5,7,0,
+ 0,263,264,3,62,31,0,264,265,3,56,28,0,265,55,1,0,0,0,266,270,5,32,0,0,
+ 267,269,3,18,9,0,268,267,1,0,0,0,269,272,1,0,0,0,270,268,1,0,0,0,270,271,
+ 1,0,0,0,271,273,1,0,0,0,272,270,1,0,0,0,273,274,5,33,0,0,274,57,1,0,0,
+ 0,275,281,5,15,0,0,276,281,5,16,0,0,277,281,3,62,31,0,278,281,3,60,30,
+ 0,279,281,5,17,0,0,280,275,1,0,0,0,280,276,1,0,0,0,280,277,1,0,0,0,280,
+ 278,1,0,0,0,280,279,1,0,0,0,281,59,1,0,0,0,282,283,5,30,0,0,283,284,3,
+ 58,29,0,284,285,5,31,0,0,285,61,1,0,0,0,286,287,5,45,0,0,287,289,5,35,
+ 0,0,288,286,1,0,0,0,288,289,1,0,0,0,289,290,1,0,0,0,290,291,5,45,0,0,291,
+ 63,1,0,0,0,24,67,73,79,107,124,139,146,154,162,166,173,193,200,208,214,
+ 225,229,232,236,252,257,270,280,288
};
public static readonly ATN _ATN =
diff --git a/Crimson/Antlr/Output/CrimsonVisitor.cs b/Crimson/Antlr/Output/CrimsonVisitor.cs
index cedc03a..7e9d73a 100644
--- a/Crimson/Antlr/Output/CrimsonVisitor.cs
+++ b/Crimson/Antlr/Output/CrimsonVisitor.cs
@@ -138,6 +138,13 @@ public interface ICrimsonVisitor : IParseTreeVisitor {
/// The visitor result.
Result VisitFunctionWhileStatement([NotNull] CrimsonParser.FunctionWhileStatementContext context);
///
+ /// Visit a parse tree produced by the FunctionBasicCallStatement
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitFunctionBasicCallStatement([NotNull] CrimsonParser.FunctionBasicCallStatementContext context);
+ ///
/// Visit a parse tree produced by the FunctionAssemblyCallStatement
/// labeled alternative in .
///
@@ -195,6 +202,12 @@ public interface ICrimsonVisitor : IParseTreeVisitor {
/// The visitor result.
Result VisitElseBlock([NotNull] CrimsonParser.ElseBlockContext context);
///
+ /// Visit a parse tree produced by .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitBasicCall([NotNull] CrimsonParser.BasicCallContext context);
+ ///
/// Visit a parse tree produced by .
///
/// The parse tree.
diff --git a/Crimson/CSharp/Core/Flattener.cs b/Crimson/CSharp/Core/Flattener.cs
index d86c926..8e431cf 100644
--- a/Crimson/CSharp/Core/Flattener.cs
+++ b/Crimson/CSharp/Core/Flattener.cs
@@ -116,10 +116,23 @@ private FunctionCStatement GetEntryFunction(Compilation compilation)
Regex regex = new Regex(pattern);
IList funcs = rootUnit.Functions.Values.Where(func => regex.IsMatch(func.Name.ToString())).ToList();
- if (funcs.Count < 1) throw new FlatteningException($"Found {funcs.Count} (exactly 1 required) valid entry methods {funcs} for root unit {rootUnit} of compilation {compilation}");
- if (funcs.Count > 1) throw new FlatteningException($"Multiple ({funcs.Count}) valid entry methods (maximum permissable 1) {funcs} for root unit {rootUnit} of compilation {compilation}");
- FunctionCStatement entry = funcs.Single();
- return entry;
+ if (funcs.Count == 0)
+ {
+ throw new FlatteningException($"No valid entry function found. Invalid contenders were: [{String.Join(',', rootUnit.Functions.Values.Select(f => f.Name))}]. Searched for Crimson name '{Options.EntryFunctionName}' using Regex: '{pattern}'.");
+ }
+ else if (funcs.Count == 1)
+ {
+ FunctionCStatement entry = funcs.Single();
+ return entry;
+ }
+ else if (funcs.Count > 1)
+ {
+ throw new FlatteningException($"Cannot determine correct entry function. Found {funcs.Count} valid contenders: [{String.Join(',', funcs.Select(f => f.Name))}].");
+ }
+ else
+ {
+ throw new FlatteningException($"Congratulations, you've managed to find a very strange number of entry functions: {funcs.Count}");
+ }
}
private void FixNameAndAdd(Dictionary map, GS gs) where GS: GlobalCStatement
diff --git a/Crimson/CSharp/Core/LinkerHelper.cs b/Crimson/CSharp/Core/LinkerHelper.cs
index 2eb82e6..d4860b8 100644
--- a/Crimson/CSharp/Core/LinkerHelper.cs
+++ b/Crimson/CSharp/Core/LinkerHelper.cs
@@ -76,7 +76,7 @@ internal static FullNameCToken LinkIdentifier (FullNameCToken identifier, Linkin
*/
if (identifier.HasLibrary() && identifier.HasMember())
{
- string alias = identifier.LibraryName;
+ string alias = identifier.LibraryName!;
CompilationUnit unit = ctx.GetUnit(alias);
string call = identifier.MemberName;
diff --git a/Crimson/CSharp/Core/TranslationUnitVisitor.cs b/Crimson/CSharp/Core/TranslationUnitVisitor.cs
index 7a66de3..c904d4a 100644
--- a/Crimson/CSharp/Core/TranslationUnitVisitor.cs
+++ b/Crimson/CSharp/Core/TranslationUnitVisitor.cs
@@ -224,9 +224,14 @@ private InternalStatement ParseInternalStatement(CrimsonParser.InternalStatement
CrimsonParser.WhileBlockContext whileCtx = context.whileBlock();
return VisitWhileBlock(whileCtx);
}
- else if (stCtx is CrimsonParser.FunctionAssemblyCallStatementContext context)
+ else if (stCtx is CrimsonParser.FunctionBasicCallStatementContext fbcsc)
{
- CrimsonParser.AssemblyCallContext acCtx = context.assemblyCall();
+ CrimsonParser.BasicCallContext bcCtx = fbcsc.basicCall();
+ return VisitBasicCall(bcCtx);
+ }
+ else if (stCtx is CrimsonParser.FunctionAssemblyCallStatementContext facsc)
+ {
+ CrimsonParser.AssemblyCallContext acCtx = facsc.assemblyCall();
return VisitAssemblyCall(acCtx);
}
else
@@ -317,8 +322,7 @@ public override ComplexValueCToken VisitComplexValue([NotNull] CrimsonParser.Com
public override SimpleValueCToken VisitSimpleValue([NotNull] CrimsonParser.SimpleValueContext context)
{
- FullNameCToken identifier = VisitFullName(context.fullName());
- if (context.id != null) return new IdentifierSimpleValueCToken(VisitFullName(context.fullName()));
+ if (context.id != null) return new IdentifierSimpleValueCToken(VisitFullName(context.id));
else if (context.raw != null) return VisitRawValue(context.raw);
throw new CrimsonParserException("Cannot parse SimpleValueContext " + context.GetText());
}
@@ -339,6 +343,13 @@ public override OperationResolvableValueCToken VisitOperation([NotNull] CrimsonP
// return new ResolvableValueCToken(context.GetText(), ResolvableValueCToken.ValueType.OPERATION);
}
+ public override BasicCallCStatement VisitBasicCall ([NotNull] CrimsonParser.BasicCallContext context)
+ {
+ string assemblyText = context.basicText.Text;
+ BasicCallCStatement call = new BasicCallCStatement(assemblyText);
+ return call;
+ }
+
public override AssemblyCallCStatement VisitAssemblyCall([NotNull] CrimsonParser.AssemblyCallContext context)
{
string assemblyText = context.assemblyText.Text;
@@ -397,7 +408,7 @@ public override ElseBlockCToken VisitElseBlock([NotNull] CrimsonParser.ElseBlock
public override FullNameCToken VisitFullName ([NotNull] CrimsonParser.FullNameContext context)
{
- return new FullNameCToken(context.libraryName.Text, context.memberName.Text);
+ return new FullNameCToken(context.libraryName != null ? context.libraryName.Text : "", context.memberName.Text);
}
}
}
diff --git a/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs
new file mode 100644
index 0000000..de766b6
--- /dev/null
+++ b/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs
@@ -0,0 +1,28 @@
+using Crimson.CSharp.Core;
+using CrimsonBasic.CSharp.Core;
+using CrimsonBasic.CSharp.Statements;
+
+namespace Crimson.CSharp.Grammar.Statements
+{
+ internal class BasicCallCStatement : InternalStatement
+ {
+ public string AssemblyText { get; protected set; }
+
+ public BasicCallCStatement (string assemblyText)
+ {
+ AssemblyText = assemblyText;
+ }
+
+ public Fragment GetCrimsonBasic()
+ {
+ Fragment f = new Fragment(0);
+ f.Add(new CommentBStatement("BasicCallCStatement: " + AssemblyText));
+ return f;
+ }
+
+ public override void Link(LinkingContext ctx)
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs
index f9f807c..021d310 100644
--- a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs
@@ -16,11 +16,10 @@ namespace Crimson.CSharp.Grammar.Statements
public class FunctionCStatement : GlobalCStatement
{
-
public CrimsonTypeCToken ReturnType { get; }
public Header FunctionHeader { get; }
public IList Statements { get; }
- public override FullNameCToken Name { get => FunctionHeader.Identifier; }
+ public override FullNameCToken Name { get => FunctionHeader.Identifier; set { FunctionHeader.Identifier = value; } }
public FunctionCStatement(CrimsonTypeCToken returnType, Header header, IList statements)
{
@@ -90,7 +89,7 @@ void ICrimsonToken.Link(LinkingContext ctx)
public class Header : ICrimsonToken
{
- public FullNameCToken Identifier { get; protected set; }
+ public FullNameCToken Identifier { get; set; }
public List Parameters { get; protected set; }
public Header(FullNameCToken identifier, List parameters)
diff --git a/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs b/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs
index 3e78ccc..325d7ab 100644
--- a/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs
@@ -37,9 +37,19 @@ public override Fragment GetCrimsonBasic()
{
Fragment result = new Fragment(0);
- if (Complex == null) throw new FlatteningException("Illegal value assignment to " + Identifier + " (Proposed value is compiler-null)");
- result.Add(Complex.GetBasicFragment());
- result.Add(new SetBStatement(Identifier.ToString(), "VAR_ASSIGN_C_VAL"));
+ if (Simple != null)
+ {
+ result.Add(new CommentBStatement(Simple.GetText()));
+ }
+ else if (Complex != null)
+ {
+ result.Add(Complex.GetBasicFragment());
+ result.Add(new SetBStatement(Identifier.ToString(), "VAR_ASSIGN_C_VAL"));
+ }
+ else
+ {
+ throw new FlatteningException($"No value to be assigned to variable {Identifier}");
+ }
return result;
}
diff --git a/Crimson/CSharp/Grammar/Tokens/ConditionCToken.cs b/Crimson/CSharp/Grammar/Tokens/ConditionCToken.cs
index 36bed59..00ed7d4 100644
--- a/Crimson/CSharp/Grammar/Tokens/ConditionCToken.cs
+++ b/Crimson/CSharp/Grammar/Tokens/ConditionCToken.cs
@@ -33,6 +33,7 @@ public Fragment GetCrimsonBasic()
/*Fragment left = leftValue.GetBasicFragment();
Fragment right = rightValue.GetBasicFragment();*/
Fragment combined = new Fragment(0);
+ combined.ResultHolder = "c_r_h";
/*combined.Add(left);
combined.Add(right);
string combinedName = FlattenerHelper.GetUniqueResolvableValueFieldName();
diff --git a/Crimson/CSharp/Grammar/Tokens/FullNameCToken.cs b/Crimson/CSharp/Grammar/Tokens/FullNameCToken.cs
index f3b42af..9c8fe89 100644
--- a/Crimson/CSharp/Grammar/Tokens/FullNameCToken.cs
+++ b/Crimson/CSharp/Grammar/Tokens/FullNameCToken.cs
@@ -23,13 +23,15 @@ public FullNameCToken (string fullName)
LibraryName = null;
MemberName = strings[0];
}
- if (strings.Length == 2)
+ else if (strings.Length == 2)
{
LibraryName = strings[0];
MemberName = strings[1];
+ }
+ else
+ {
+ throw new ArgumentException($"Cannot construct FullNameCToken from {strings.Length} parts (must have 1 or 2 parts)");
}
-
- throw new ArgumentException($"Cannot construct FullNameCToken from {strings.Length} parts (must be 1 < parts < 2)");
}
public bool HasMember ()
diff --git a/Crimson/CSharp/Grammar/Tokens/FunctionCallResolvableValueCToken.cs b/Crimson/CSharp/Grammar/Tokens/FunctionCallResolvableValueCToken.cs
index 260b212..c0efb44 100644
--- a/Crimson/CSharp/Grammar/Tokens/FunctionCallResolvableValueCToken.cs
+++ b/Crimson/CSharp/Grammar/Tokens/FunctionCallResolvableValueCToken.cs
@@ -2,6 +2,7 @@
using Crimson.CSharp.Exception;
using Crimson.CSharp.Grammar.Statements;
using CrimsonBasic.CSharp.Core;
+using CrimsonBasic.CSharp.Statements;
namespace Crimson.CSharp.Grammar.Tokens
{
@@ -21,7 +22,9 @@ public override void Link(LinkingContext ctx)
public override Fragment GetBasicFragment()
{
- throw new NotImplementedException();
+ Fragment fragment = new Fragment(0);
+ fragment.Add(new CommentBStatement("Function Call"));
+ return fragment;
}
}
}
\ No newline at end of file
diff --git a/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs b/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs
index a679669..99279bd 100644
--- a/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs
+++ b/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs
@@ -1,6 +1,7 @@
using Crimson.CSharp.Core;
using Crimson.CSharp.Exception;
using CrimsonBasic.CSharp.Core;
+using CrimsonBasic.CSharp.Statements;
using System.Net.Http;
namespace Crimson.CSharp.Grammar.Tokens
@@ -45,7 +46,9 @@ public static OperationType ParseOpType(string s)
public override Fragment GetBasicFragment()
{
- throw new NotImplementedException();
+ Fragment fragment = new Fragment(0);
+ fragment.Add(new CommentBStatement("Operation"));
+ return fragment;
}
public enum OperationType
diff --git a/Crimson/Crimson.csproj b/Crimson/Crimson.csproj
index 776bbe2..82e1577 100644
--- a/Crimson/Crimson.csproj
+++ b/Crimson/Crimson.csproj
@@ -5,6 +5,7 @@
net6.0
enable
enable
+ Crimson.CSharp.Core.Crimson
diff --git a/Crimson/Resources/Test Compilations/main.crm b/Crimson/Resources/Test Compilations/main.crm
index 4b9275e..ad9748b 100644
--- a/Crimson/Resources/Test Compilations/main.crm
+++ b/Crimson/Resources/Test Compilations/main.crm
@@ -2,17 +2,20 @@
// - Package "utils" from the file "utils.crm", with the name "utils"
// - Package "console" from the system library, with the name "stdout"
-#using "utils/utils.crm" as utils
-#using "${NATIVE}/console.crm" as stdout
-#using "${NATIVE}/heap.crm" as heap
+#using "utils/utils.crm" as utils;
+#using "${NATIVE}/console.crm" as stdout;
+#using "${NATIVE}/heap.crm" as heap;
// Declare ophandlers:
//
-#ophandler (int * int) -> {utils.multiply}
+#ophandler (int * int) -> {utils.multiply};
global int counter = 0;
function ptr main () {
+
+ B~ example basic call;
+ A~ example assemby call;
int a = utils.multiply(8);
int b = utils.times();
diff --git a/Crimson/Resources/Test Compilations/result/main.cba b/Crimson/Resources/Test Compilations/result/main.cba
index 5c0a28a..9f4ce3b 100644
--- a/Crimson/Resources/Test Compilations/result/main.cba
+++ b/Crimson/Resources/Test Compilations/result/main.cba
@@ -6,69 +6,22 @@
// ============================== Global Variables ==============================
-stack allocate gvar_counter_0 4
-set gvar_counter_0 GLO_VAR_ASSIGN_VAL;
+stack allocate gvar_regions_i_0 666
+set gvar_regions_i_0 0;
+stack allocate gvar_regions_length_0 666
+set gvar_regions_length_0 0;
+stack allocate gvar_regions_region_0 666
+set gvar_regions_region_0 0;
+stack allocate gvar_counter_0 666
+set gvar_counter_0 0;
// (Structures shouldn't be a part of CB)
// ============================== Structures ==============================
-// GlobalC:stru_Person_0
// ============================== Entry Function ==============================
:func_main_0
stack push_frame
-
- set rval_0 true == true;
- jeq rval_0 0 NEXT_ELIF
- set counter VAR_ASSIGN_C_VAL;
- jump END_branch_0
-
- jump utils.multiply
- set rval_1 FUNC_RETURN;
- // arg0=rval_1
- jump utils.times
- heap allocate rval_2 6969
- register set REG_RETURN rval_2
- set rval_2 FUNC_RETURN;
- set rval_3 rval_2 == true;
- jeq rval_3 0 NEXT_ELIF
- jump utils.times
- set rval_4 FUNC_RETURN;
- // arg0=rval_4
- jump heap.alloc
- heap allocate rval_5 6969
- register set REG_RETURN rval_5
- set rval_5 FUNC_RETURN;
- stack allocate a 4
- set a INT_VAR_ASSIGN_VAL;
- jump END_branch_1
-
- :ELSE
- return;
- :END_branch_1
-
- :END_branch_0
-
- // arg0=4
- // arg1=7
- // arg2=5
- jump call
- heap allocate rval_6 6969
- register set REG_RETURN rval_6
- set rval_6 FUNC_RETURN;
- // arg0=4
- jump heap.alloc
- heap allocate rval_7 6969
- register set REG_RETURN rval_7
- set rval_7 FUNC_RETURN;
- stack allocate i 666
- set i INT_VAR_ASSIGN_VAL;
- set i* VAR_ASSIGN_C_VAL;
- // arg0=i
- jump stdout.write
- heap allocate rval_8 6969
- register set REG_RETURN rval_8
- set rval_8 FUNC_RETURN;
- return;
+ // Crimson.CSharp.Grammar.Statements.BasicCallCStatement: linked=False
stack pop_frame
return;
@@ -78,15 +31,18 @@ return;
stack push_frame
// arg0=6
jump utils_stdout.write
- heap allocate rval_9 6969
- register set REG_RETURN rval_9
- set rval_9 FUNC_RETURN;
+ heap allocate rval_0 6969
+ register set REG_RETURN rval_0
+ set rval_0 FUNC_RETURN;
return;
stack pop_frame
return;
:func_times_0
stack push_frame
+ // Function Call
+ stack allocate ret 666
+ set ret ;
return;
stack pop_frame
return;
@@ -98,8 +54,8 @@ return;
:func_alloc_0
stack push_frame
- stack allocate i 4
- set i INT_VAR_ASSIGN_VAL;
+ stack allocate i 666
+ set i 0;
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
@@ -110,63 +66,66 @@ return;
:func_get_region_ptr_0
stack push_frame
- stack allocate RRMS 4
- set RRMS INT_VAR_ASSIGN_VAL;
- stack allocate exponential_offset 4
- set exponential_offset INT_VAR_ASSIGN_VAL;
+ // Operation
+ stack allocate RRMS 666
+ set RRMS ;
+ stack allocate exponential_offset 666
+ set exponential_offset 4;
- set rval_10 r < 0;
- jeq rval_10 0 NEXT_ELIF
- jump END_branch_2
+ jeq c_r_h 0 NEXT_ELIF
+ jump END_branch_0
- set rval_11 r == 0;
- jeq rval_11 0 NEXT_ELIF
- set exponential_offset VAR_ASSIGN_C_VAL;
- jump END_branch_3
+ jeq c_r_h 0 NEXT_ELIF
+ // 1
+ jump END_branch_1
- set rval_12 r == 1;
- jeq rval_12 0 NEXT_ELIF
- set exponential_offset VAR_ASSIGN_C_VAL;
- jump END_branch_4
+ jeq c_r_h 0 NEXT_ELIF
+ // 2
+ jump END_branch_2
:ELSE
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
- :END_branch_4
+ :END_branch_2
- :END_branch_3
+ :END_branch_1
- :END_branch_2
+ :END_branch_0
- stack allocate HO_EXP 4
- set HO_EXP INT_VAR_ASSIGN_VAL;
- stack allocate HO_EXP_RRMS 4
- set HO_EXP_RRMS INT_VAR_ASSIGN_VAL;
+ // Operation
+ stack allocate HO_EXP 666
+ set HO_EXP ;
+ // Operation
+ stack allocate HO_EXP_RRMS 666
+ set HO_EXP_RRMS ;
return;
stack pop_frame
return;
:func_freeptr_0
stack push_frame
- stack allocate r 4
- set r INT_VAR_ASSIGN_VAL;
+ stack allocate r 666
+ set r 0;
+ // Function Call
+ stack allocate region_ptr 666
+ set region_ptr ;
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
// arg0=r
jump freeregion
- heap allocate rval_13 6969
- register set REG_RETURN rval_13
- set rval_13 FUNC_RETURN;
+ heap allocate rval_1 6969
+ register set REG_RETURN rval_1
+ set rval_1 FUNC_RETURN;
stack pop_frame
return;
:func_freeregion_0
stack push_frame
- set regions_region VAR_ASSIGN_C_VAL;
+ // 0
stack pop_frame
return;
@@ -179,16 +138,3 @@ stack push_frame
stack pop_frame
return;
-:func_call_0
-stack push_frame
- // arg0=69
- jump heap.alloc
- heap allocate rval_14 6969
- register set REG_RETURN rval_14
- set rval_14 FUNC_RETURN;
- stack allocate test 4
- set test INT_VAR_ASSIGN_VAL;
- return;
-stack pop_frame
-return;
-
diff --git a/CrimsonBasic/CSharp/Statements/JumpEqualBStatement.cs b/CrimsonBasic/CSharp/Statements/JumpEqualBStatement.cs
index 216b526..670041b 100644
--- a/CrimsonBasic/CSharp/Statements/JumpEqualBStatement.cs
+++ b/CrimsonBasic/CSharp/Statements/JumpEqualBStatement.cs
@@ -15,9 +15,9 @@ public class JumpEqualBStatement : BasicStatement
public JumpEqualBStatement(string _value1, string _value2, string _label)
{
- if (string.IsNullOrWhiteSpace(_value1)) throw new ArgumentException("Cannot use null or whitespace name or value in Jump statement");
- if (string.IsNullOrWhiteSpace(_value2)) throw new ArgumentException("Cannot use null or whitespace name or value in Jump statement");
- if (string.IsNullOrWhiteSpace(_label)) throw new ArgumentException("Cannot use null or whitespace name in Jump statement");
+ if (string.IsNullOrWhiteSpace(_value1)) throw new ArgumentException($"Value 1 '{_value1}' in JumpEqualBStatement statement may not be null or whitespace.");
+ if (string.IsNullOrWhiteSpace(_value2)) throw new ArgumentException($"Value 2 '{_value2}' in JumpEqualBStatement statement may not be null or whitespace.");
+ if (string.IsNullOrWhiteSpace(_label)) throw new ArgumentException($"Target label '{_label}' in JumpEqualBStatement statement may not be null or whitespace.");
this._label = _label;
this._value1 = _value1;
this._value2 = _value2;
diff --git a/CrimsonBasic/CrimsonBasic.csproj b/CrimsonBasic/CrimsonBasic.csproj
index 9a53704..537c02e 100644
--- a/CrimsonBasic/CrimsonBasic.csproj
+++ b/CrimsonBasic/CrimsonBasic.csproj
@@ -5,6 +5,7 @@
net6.0
enable
enable
+ CrimsonBasic.CSharp.Core.CrimsonBasic
diff --git a/RedFoxAssembly/Documentation/TestPrograms/TestAll.rfb b/RedFoxAssembly/Documentation/TestPrograms/TestAll.rfb
index 27adb3c0f0d090ef37562c6f06b3831b6b9aab62..559d55b35f06249636f71b6832bec3463c1488a7 100644
GIT binary patch
delta 28
jcmeyw_=$0XqmZe-fswwEfswI}p{bRzrIn$<#Nhb=cQFUt
delta 28
jcmeyw_=$0XqmY5VfswwEfswI}p_!GbrIn${#Nhb=cJc?_
diff --git a/RedFoxVM.sln b/RedFoxVM.sln
index 8be0ed1..a79d59b 100644
--- a/RedFoxVM.sln
+++ b/RedFoxVM.sln
@@ -16,6 +16,9 @@ Global
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{55BE68DD-C229-49FD-BBD6-CC7BA66B6800}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55BE68DD-C229-49FD-BBD6-CC7BA66B6800}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -34,9 +37,6 @@ Global
{0F45D43A-D6F1-4E64-BA39-EA714533DA1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F45D43A-D6F1-4E64-BA39-EA714533DA1A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D0C9DAE1-35F2-4EFE-AE99-5AE8F7C63DC1}
EndGlobalSection
From c5857dd42cc7fd6319f507deaed64bec480d5d6b Mon Sep 17 00:00:00 2001
From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com>
Date: Mon, 27 Feb 2023 15:57:53 +0000
Subject: [PATCH 002/122] Added Notepad++ formatters to all 3 langauges
- Removed HeapBStatement
- Added Size to SetBStatement
---
.../Statements/FunctionCallCStatement.cs | 3 +-
.../Statements/GlobalVariableCStatement.cs | 4 +-
.../Statements/InternalVariableCStatement.cs | 4 +-
.../VariableAssignmentCStatement.cs | 2 +-
Crimson/Resources/CrimsonNotepad++.xml | 64 ++++++++++
.../Test Compilations/result/main.cba | 116 +++++++++---------
.../CSharp/Statements/HeapBStatement.cs | 31 -----
.../CSharp/Statements/LabelBStatement.cs | 2 +-
.../CSharp/Statements/SetBStatement.cs | 14 ++-
.../CSharp/Statements/StackBStatement.cs | 2 +-
.../Resources/CrimsonBasicNotepad++.xml | 64 ++++++++++
RedFoxAssembly/RFASMNotepad++.xml | 64 ++++++++++
12 files changed, 265 insertions(+), 105 deletions(-)
create mode 100644 Crimson/Resources/CrimsonNotepad++.xml
delete mode 100644 CrimsonBasic/CSharp/Statements/HeapBStatement.cs
create mode 100644 CrimsonBasic/Resources/CrimsonBasicNotepad++.xml
create mode 100644 RedFoxAssembly/RFASMNotepad++.xml
diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs
index 06ea54e..6fe8ba9 100644
--- a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs
@@ -63,9 +63,8 @@ public override Fragment GetCrimsonBasic()
// Store result
string returnName = FlattenerHelper.GetUniqueResolvableValueFieldName();
- f.Add(new HeapBStatement(HeapBStatement.HeapOperation.ALLOCATE, returnName, "6969"));
f.Add(new RegisterBStatement(RegisterBStatement.RegisterOperation.SET, "REG_RETURN", returnName));
- f.Add(new SetBStatement(returnName, FUNCTION_RETURN_VARIABLE_NAME));
+ f.Add(new SetBStatement(returnName, -1, FUNCTION_RETURN_VARIABLE_NAME));
f.ResultHolder = returnName;
diff --git a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs
index e3f12e3..ed476c1 100644
--- a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs
@@ -50,13 +50,13 @@ public override Fragment GetCrimsonBasic()
Fragment valueStatements = Complex.GetBasicFragment();
statements.Add(valueStatements);
statements.Add(new StackBStatement(StackBStatement.StackOperation.ALLOCATE, Name.ToString(), type.GetByteSize().ToString()));
- statements.Add(new SetBStatement(Name.ToString(), valueStatements.ResultHolder!));
+ statements.Add(new SetBStatement(Name.ToString(), -1, valueStatements.ResultHolder!));
}
else if (Simple != null)
{
statements.Add(new StackBStatement(StackBStatement.StackOperation.ALLOCATE, Name.ToString(), type.GetByteSize().ToString()));
- statements.Add(new SetBStatement(Name.ToString(), Simple.GetText()));
+ statements.Add(new SetBStatement(Name.ToString(), -1, Simple.GetText()));
}
else
{
diff --git a/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs
index 545eaf5..31550cb 100644
--- a/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs
@@ -60,13 +60,13 @@ public override Fragment GetCrimsonBasic()
Fragment valueStatements = Complex.GetBasicFragment();
statements.Add(valueStatements);
statements.Add(new StackBStatement(StackBStatement.StackOperation.ALLOCATE, Identifier.ToString(), type.GetByteSize().ToString()));
- statements.Add(new SetBStatement(Identifier.ToString(), valueStatements.ResultHolder!));
+ statements.Add(new SetBStatement(Identifier.ToString(), -1, valueStatements.ResultHolder!));
}
else if (Simple != null)
{
statements.Add(new StackBStatement(StackBStatement.StackOperation.ALLOCATE, Identifier.ToString(), type.GetByteSize().ToString()));
- statements.Add(new SetBStatement(Identifier.ToString(), Simple.GetText()));
+ statements.Add(new SetBStatement(Identifier.ToString(), -1, Simple.GetText()));
}
else
{
diff --git a/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs b/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs
index 325d7ab..b40ed9a 100644
--- a/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs
@@ -44,7 +44,7 @@ public override Fragment GetCrimsonBasic()
else if (Complex != null)
{
result.Add(Complex.GetBasicFragment());
- result.Add(new SetBStatement(Identifier.ToString(), "VAR_ASSIGN_C_VAL"));
+ result.Add(new SetBStatement(Identifier.ToString(), -1, "VAR_ASSIGN_C_VAL"));
}
else
{
diff --git a/Crimson/Resources/CrimsonNotepad++.xml b/Crimson/Resources/CrimsonNotepad++.xml
new file mode 100644
index 0000000..5a31725
--- /dev/null
+++ b/Crimson/Resources/CrimsonNotepad++.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+ 00// 01 02 03 04
+
+
+
+
+
+
+
+ * /
+
+
+
+
+
+
+
+
+
+
+ package
function
return
+
+ allocate
+
+
+
+
+
+ 00" 01 02" 03[ 04 05] 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Crimson/Resources/Test Compilations/result/main.cba b/Crimson/Resources/Test Compilations/result/main.cba
index 9f4ce3b..b2e9730 100644
--- a/Crimson/Resources/Test Compilations/result/main.cba
+++ b/Crimson/Resources/Test Compilations/result/main.cba
@@ -6,71 +6,70 @@
// ============================== Global Variables ==============================
-stack allocate gvar_regions_i_0 666
-set gvar_regions_i_0 0;
-stack allocate gvar_regions_length_0 666
-set gvar_regions_length_0 0;
-stack allocate gvar_regions_region_0 666
-set gvar_regions_region_0 0;
-stack allocate gvar_counter_0 666
-set gvar_counter_0 0;
+stack allocate gvar_regions_i_0 666;
+set gvar_regions_i_0, -1, 0;
+stack allocate gvar_regions_length_0 666;
+set gvar_regions_length_0, -1, 0;
+stack allocate gvar_regions_region_0 666;
+set gvar_regions_region_0, -1, 0;
+stack allocate gvar_counter_0 666;
+set gvar_counter_0, -1, 0;
// (Structures shouldn't be a part of CB)
// ============================== Structures ==============================
// ============================== Entry Function ==============================
-:func_main_0
-stack push_frame
+:func_main_0:
+stack push_frame ;
// Crimson.CSharp.Grammar.Statements.BasicCallCStatement: linked=False
-stack pop_frame
+stack pop_frame ;
return;
// ============================== Functions ==============================
-:func_multiply_0
-stack push_frame
+:func_multiply_0:
+stack push_frame ;
// arg0=6
jump utils_stdout.write
- heap allocate rval_0 6969
register set REG_RETURN rval_0
- set rval_0 FUNC_RETURN;
+ set rval_0, -1, FUNC_RETURN;
return;
-stack pop_frame
+stack pop_frame ;
return;
-:func_times_0
-stack push_frame
+:func_times_0:
+stack push_frame ;
// Function Call
- stack allocate ret 666
- set ret ;
+ stack allocate ret 666;
+ set ret, -1, ;
return;
-stack pop_frame
+stack pop_frame ;
return;
-:func_write_0
-stack push_frame
-stack pop_frame
+:func_write_0:
+stack push_frame ;
+stack pop_frame ;
return;
-:func_alloc_0
-stack push_frame
- stack allocate i 666
- set i 0;
+:func_alloc_0:
+stack push_frame ;
+ stack allocate i 666;
+ set i, -1, 0;
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
return;
-stack pop_frame
+stack pop_frame ;
return;
-:func_get_region_ptr_0
-stack push_frame
+:func_get_region_ptr_0:
+stack push_frame ;
// Operation
- stack allocate RRMS 666
- set RRMS ;
- stack allocate exponential_offset 666
- set exponential_offset 4;
+ stack allocate RRMS 666;
+ set RRMS, -1, ;
+ stack allocate exponential_offset 666;
+ set exponential_offset, -1, 4;
jeq c_r_h 0 NEXT_ELIF
jump END_branch_0
@@ -83,58 +82,57 @@ stack push_frame
// 2
jump END_branch_2
- :ELSE
+ :ELSE:
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
- :END_branch_2
+ :END_branch_2:
- :END_branch_1
+ :END_branch_1:
- :END_branch_0
+ :END_branch_0:
// Operation
- stack allocate HO_EXP 666
- set HO_EXP ;
+ stack allocate HO_EXP 666;
+ set HO_EXP, -1, ;
// Operation
- stack allocate HO_EXP_RRMS 666
- set HO_EXP_RRMS ;
+ stack allocate HO_EXP_RRMS 666;
+ set HO_EXP_RRMS, -1, ;
return;
-stack pop_frame
+stack pop_frame ;
return;
-:func_freeptr_0
-stack push_frame
- stack allocate r 666
- set r 0;
+:func_freeptr_0:
+stack push_frame ;
+ stack allocate r 666;
+ set r, -1, 0;
// Function Call
- stack allocate region_ptr 666
- set region_ptr ;
+ stack allocate region_ptr 666;
+ set region_ptr, -1, ;
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
// arg0=r
jump freeregion
- heap allocate rval_1 6969
register set REG_RETURN rval_1
- set rval_1 FUNC_RETURN;
-stack pop_frame
+ set rval_1, -1, FUNC_RETURN;
+stack pop_frame ;
return;
-:func_freeregion_0
-stack push_frame
+:func_freeregion_0:
+stack push_frame ;
// 0
-stack pop_frame
+stack pop_frame ;
return;
-:func_pwr_0
-stack push_frame
+:func_pwr_0:
+stack push_frame ;
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
-stack pop_frame
+stack pop_frame ;
return;
diff --git a/CrimsonBasic/CSharp/Statements/HeapBStatement.cs b/CrimsonBasic/CSharp/Statements/HeapBStatement.cs
deleted file mode 100644
index 61f63e9..0000000
--- a/CrimsonBasic/CSharp/Statements/HeapBStatement.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CrimsonBasic.CSharp.Statements
-{
- public class HeapBStatement : BasicStatement
- {
- private HeapOperation _operation;
- private string[] _arguments;
-
- public HeapBStatement(HeapOperation operation, params string[] arguments)
- {
- _operation = operation;
- _arguments = arguments;
- }
-
- public override string ToString()
- {
- return $"heap {_operation.ToString().ToLower()} {string.Join(' ', _arguments)}";
- }
-
- public enum HeapOperation
- {
- ALLOCATE,
- DEALLOCATE
- }
- }
-}
diff --git a/CrimsonBasic/CSharp/Statements/LabelBStatement.cs b/CrimsonBasic/CSharp/Statements/LabelBStatement.cs
index faad9c9..7a3a3b8 100644
--- a/CrimsonBasic/CSharp/Statements/LabelBStatement.cs
+++ b/CrimsonBasic/CSharp/Statements/LabelBStatement.cs
@@ -17,7 +17,7 @@ public LabelBStatement(string label)
public override string ToString()
{
- return _name.StartsWith(":") ? _name : ":" + _name;
+ return (_name.StartsWith(":") ? _name : ":" + _name) + (_name.EndsWith(":") ? "" : ":");
}
}
}
diff --git a/CrimsonBasic/CSharp/Statements/SetBStatement.cs b/CrimsonBasic/CSharp/Statements/SetBStatement.cs
index fdcdb1d..d213d10 100644
--- a/CrimsonBasic/CSharp/Statements/SetBStatement.cs
+++ b/CrimsonBasic/CSharp/Statements/SetBStatement.cs
@@ -9,18 +9,20 @@ namespace CrimsonBasic.CSharp.Statements
public class SetBStatement : BasicStatement
{
- private string _value;
- private string _name;
+ public string Value { get; protected set; }
+ public int Size { get; protected set; }
+ public string Name { get; protected set; }
- public SetBStatement(string text, string value)
+ public SetBStatement(string name, int size, string value)
{
- _name = text;
- _value = value;
+ Name = name;
+ Size = size;
+ Value = value;
}
public override string ToString()
{
- return $"set {_name} {_value};";
+ return $"set {Name}, {Size}, {Value};";
}
}
}
diff --git a/CrimsonBasic/CSharp/Statements/StackBStatement.cs b/CrimsonBasic/CSharp/Statements/StackBStatement.cs
index 6aed0ce..122db86 100644
--- a/CrimsonBasic/CSharp/Statements/StackBStatement.cs
+++ b/CrimsonBasic/CSharp/Statements/StackBStatement.cs
@@ -19,7 +19,7 @@ public StackBStatement(StackOperation operation, params string[] arguments)
public override string ToString()
{
- return $"stack {_operation.ToString().ToLower()} {string.Join(' ', _arguments)}";
+ return $"stack {_operation.ToString().ToLower()} {string.Join(' ', _arguments)};";
}
public enum StackOperation
diff --git a/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml b/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml
new file mode 100644
index 0000000..bf2bbd9
--- /dev/null
+++ b/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+ 00// 01 02 03 04
+
+
+
+
+
+
+
+ ;
+
+
+
+
+
+
+
+
+
+
+ return
jeq
+ stack
+ set
+ jump
+ register
+
+
+
+ 00: 01 02: 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/RedFoxAssembly/RFASMNotepad++.xml b/RedFoxAssembly/RFASMNotepad++.xml
new file mode 100644
index 0000000..ad1c317
--- /dev/null
+++ b/RedFoxAssembly/RFASMNotepad++.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+ 00// 01 02 03 04
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .
+ :
+ *
#
+ HLT
LDR
STM
ADD
SUB
LSL
LSR
CMP
B
BEQ
BLT
BGT
BOF
BSR
RTN
STB
+ _
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 15b5153648155afbbf29c7a4260938d829743c43 Mon Sep 17 00:00:00 2001
From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com>
Date: Mon, 27 Feb 2023 16:28:13 +0000
Subject: [PATCH 003/122] Fixed arbitrary Statements
- Fixed AssemblyCStatement
- Fixed BasicCStatement
- Created ArbitraryBStatement
- Updated CB formatting
---
Crimson/Antlr/Input/Crimson.g4 | 4 +-
Crimson/Antlr/Output/Crimson.interp | 6 +-
Crimson/Antlr/Output/Crimson.tokens | 156 ++++---
Crimson/Antlr/Output/CrimsonLexer.cs | 290 +++++++------
Crimson/Antlr/Output/CrimsonLexer.interp | 8 +-
Crimson/Antlr/Output/CrimsonLexer.tokens | 156 ++++---
Crimson/Antlr/Output/CrimsonParser.cs | 404 ++++++++----------
Crimson/CSharp/Core/TranslationUnitVisitor.cs | 6 +-
.../Statements/AssemblyCallCStatement.cs | 2 +-
.../Grammar/Statements/BasicCallCStatement.cs | 4 +-
Crimson/Resources/Test Compilations/main.crm | 6 +-
.../Test Compilations/result/main.cba | 79 +++-
.../CSharp/Statements/ArbitraryBStatement.cs | 17 +
.../CSharp/Statements/AssemblyBStatement.cs | 6 +-
.../Resources/CrimsonBasicNotepad++.xml | 8 +-
15 files changed, 580 insertions(+), 572 deletions(-)
create mode 100644 CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs
diff --git a/Crimson/Antlr/Input/Crimson.g4 b/Crimson/Antlr/Input/Crimson.g4
index 275b75a..a1b3c74 100644
--- a/Crimson/Antlr/Input/Crimson.g4
+++ b/Crimson/Antlr/Input/Crimson.g4
@@ -64,10 +64,10 @@ elseBlock
: Else functionBody
;
basicCall
- : BasicCall basicText=~('\r' | '\n')*
+ : BasicCall basicText=String SemiColon
;
assemblyCall
- : AssemblyCall assemblyText=~('\r' | '\n')*
+ : AssemblyCall assemblyText=String SemiColon
;
// Function
diff --git a/Crimson/Antlr/Output/Crimson.interp b/Crimson/Antlr/Output/Crimson.interp
index 577490c..9bf81d3 100644
--- a/Crimson/Antlr/Output/Crimson.interp
+++ b/Crimson/Antlr/Output/Crimson.interp
@@ -1,7 +1,5 @@
token literal names:
null
-'\r'
-'\n'
'allocator'
'function'
'global'
@@ -48,8 +46,6 @@ null
token symbolic names:
null
-null
-null
Allocator
Function
Global
@@ -130,4 +126,4 @@ fullName
atn:
-[4, 1, 45, 293, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 1, 0, 5, 0, 66, 8, 0, 10, 0, 12, 0, 69, 9, 0, 1, 0, 5, 0, 72, 8, 0, 10, 0, 12, 0, 75, 9, 0, 1, 0, 5, 0, 78, 8, 0, 10, 0, 12, 0, 81, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 3, 3, 108, 8, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 5, 7, 123, 8, 7, 10, 7, 12, 7, 126, 9, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 140, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 147, 8, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 155, 8, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 163, 8, 10, 1, 10, 1, 10, 3, 10, 167, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 174, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 5, 16, 192, 8, 16, 10, 16, 12, 16, 195, 9, 16, 1, 17, 1, 17, 5, 17, 199, 8, 17, 10, 17, 12, 17, 202, 9, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 209, 8, 19, 1, 19, 1, 19, 5, 19, 213, 8, 19, 10, 19, 12, 19, 216, 9, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 226, 8, 20, 1, 21, 1, 21, 3, 21, 230, 8, 21, 1, 21, 3, 21, 233, 8, 21, 1, 22, 1, 22, 3, 22, 237, 8, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 251, 8, 25, 10, 25, 12, 25, 254, 9, 25, 1, 25, 1, 25, 3, 25, 258, 8, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 5, 28, 269, 8, 28, 10, 28, 12, 28, 272, 9, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 281, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 3, 31, 289, 8, 31, 1, 31, 1, 31, 1, 31, 0, 0, 32, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 0, 2, 1, 0, 1, 2, 2, 0, 17, 18, 43, 43, 295, 0, 67, 1, 0, 0, 0, 2, 84, 1, 0, 0, 0, 4, 91, 1, 0, 0, 0, 6, 107, 1, 0, 0, 0, 8, 109, 1, 0, 0, 0, 10, 112, 1, 0, 0, 0, 12, 117, 1, 0, 0, 0, 14, 120, 1, 0, 0, 0, 16, 139, 1, 0, 0, 0, 18, 141, 1, 0, 0, 0, 20, 166, 1, 0, 0, 0, 22, 168, 1, 0, 0, 0, 24, 175, 1, 0, 0, 0, 26, 179, 1, 0, 0, 0, 28, 183, 1, 0, 0, 0, 30, 186, 1, 0, 0, 0, 32, 189, 1, 0, 0, 0, 34, 196, 1, 0, 0, 0, 36, 203, 1, 0, 0, 0, 38, 206, 1, 0, 0, 0, 40, 225, 1, 0, 0, 0, 42, 232, 1, 0, 0, 0, 44, 236, 1, 0, 0, 0, 46, 238, 1, 0, 0, 0, 48, 240, 1, 0, 0, 0, 50, 257, 1, 0, 0, 0, 52, 259, 1, 0, 0, 0, 54, 262, 1, 0, 0, 0, 56, 266, 1, 0, 0, 0, 58, 280, 1, 0, 0, 0, 60, 282, 1, 0, 0, 0, 62, 288, 1, 0, 0, 0, 64, 66, 3, 2, 1, 0, 65, 64, 1, 0, 0, 0, 66, 69, 1, 0, 0, 0, 67, 65, 1, 0, 0, 0, 67, 68, 1, 0, 0, 0, 68, 73, 1, 0, 0, 0, 69, 67, 1, 0, 0, 0, 70, 72, 3, 4, 2, 0, 71, 70, 1, 0, 0, 0, 72, 75, 1, 0, 0, 0, 73, 71, 1, 0, 0, 0, 73, 74, 1, 0, 0, 0, 74, 79, 1, 0, 0, 0, 75, 73, 1, 0, 0, 0, 76, 78, 3, 6, 3, 0, 77, 76, 1, 0, 0, 0, 78, 81, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 80, 82, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 82, 83, 5, 0, 0, 1, 83, 1, 1, 0, 0, 0, 84, 85, 5, 38, 0, 0, 85, 86, 5, 8, 0, 0, 86, 87, 5, 44, 0, 0, 87, 88, 5, 10, 0, 0, 88, 89, 3, 62, 31, 0, 89, 90, 5, 36, 0, 0, 90, 3, 1, 0, 0, 0, 91, 92, 5, 38, 0, 0, 92, 93, 5, 9, 0, 0, 93, 94, 5, 28, 0, 0, 94, 95, 3, 58, 29, 0, 95, 96, 5, 19, 0, 0, 96, 97, 3, 58, 29, 0, 97, 98, 5, 29, 0, 0, 98, 99, 5, 23, 0, 0, 99, 100, 5, 32, 0, 0, 100, 101, 3, 62, 31, 0, 101, 102, 5, 33, 0, 0, 102, 103, 5, 36, 0, 0, 103, 5, 1, 0, 0, 0, 104, 108, 3, 8, 4, 0, 105, 108, 3, 10, 5, 0, 106, 108, 3, 54, 27, 0, 107, 104, 1, 0, 0, 0, 107, 105, 1, 0, 0, 0, 107, 106, 1, 0, 0, 0, 108, 7, 1, 0, 0, 0, 109, 110, 5, 5, 0, 0, 110, 111, 3, 18, 9, 0, 111, 9, 1, 0, 0, 0, 112, 113, 5, 4, 0, 0, 113, 114, 3, 58, 29, 0, 114, 115, 3, 12, 6, 0, 115, 116, 3, 14, 7, 0, 116, 11, 1, 0, 0, 0, 117, 118, 3, 62, 31, 0, 118, 119, 3, 50, 25, 0, 119, 13, 1, 0, 0, 0, 120, 124, 5, 32, 0, 0, 121, 123, 3, 16, 8, 0, 122, 121, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 127, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 127, 128, 5, 33, 0, 0, 128, 15, 1, 0, 0, 0, 129, 140, 3, 18, 9, 0, 130, 140, 3, 40, 20, 0, 131, 140, 3, 20, 10, 0, 132, 133, 3, 36, 18, 0, 133, 134, 5, 36, 0, 0, 134, 140, 1, 0, 0, 0, 135, 140, 3, 22, 11, 0, 136, 140, 3, 24, 12, 0, 137, 140, 3, 32, 16, 0, 138, 140, 3, 34, 17, 0, 139, 129, 1, 0, 0, 0, 139, 130, 1, 0, 0, 0, 139, 131, 1, 0, 0, 0, 139, 132, 1, 0, 0, 0, 139, 135, 1, 0, 0, 0, 139, 136, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 139, 138, 1, 0, 0, 0, 140, 17, 1, 0, 0, 0, 141, 142, 3, 58, 29, 0, 142, 143, 3, 62, 31, 0, 143, 146, 5, 26, 0, 0, 144, 147, 3, 44, 22, 0, 145, 147, 3, 42, 21, 0, 146, 144, 1, 0, 0, 0, 146, 145, 1, 0, 0, 0, 147, 148, 1, 0, 0, 0, 148, 149, 5, 36, 0, 0, 149, 19, 1, 0, 0, 0, 150, 151, 3, 62, 31, 0, 151, 154, 5, 26, 0, 0, 152, 155, 3, 44, 22, 0, 153, 155, 3, 42, 21, 0, 154, 152, 1, 0, 0, 0, 154, 153, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 157, 5, 36, 0, 0, 157, 167, 1, 0, 0, 0, 158, 159, 3, 62, 31, 0, 159, 162, 5, 27, 0, 0, 160, 163, 3, 44, 22, 0, 161, 163, 3, 42, 21, 0, 162, 160, 1, 0, 0, 0, 162, 161, 1, 0, 0, 0, 163, 164, 1, 0, 0, 0, 164, 165, 5, 36, 0, 0, 165, 167, 1, 0, 0, 0, 166, 150, 1, 0, 0, 0, 166, 158, 1, 0, 0, 0, 167, 21, 1, 0, 0, 0, 168, 169, 5, 11, 0, 0, 169, 170, 3, 26, 13, 0, 170, 173, 3, 14, 7, 0, 171, 174, 3, 30, 15, 0, 172, 174, 3, 28, 14, 0, 173, 171, 1, 0, 0, 0, 173, 172, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 23, 1, 0, 0, 0, 175, 176, 5, 12, 0, 0, 176, 177, 3, 26, 13, 0, 177, 178, 3, 14, 7, 0, 178, 25, 1, 0, 0, 0, 179, 180, 5, 28, 0, 0, 180, 181, 3, 48, 24, 0, 181, 182, 5, 29, 0, 0, 182, 27, 1, 0, 0, 0, 183, 184, 5, 13, 0, 0, 184, 185, 3, 22, 11, 0, 185, 29, 1, 0, 0, 0, 186, 187, 5, 13, 0, 0, 187, 188, 3, 14, 7, 0, 188, 31, 1, 0, 0, 0, 189, 193, 5, 24, 0, 0, 190, 192, 8, 0, 0, 0, 191, 190, 1, 0, 0, 0, 192, 195, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 33, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, 196, 200, 5, 25, 0, 0, 197, 199, 8, 0, 0, 0, 198, 197, 1, 0, 0, 0, 199, 202, 1, 0, 0, 0, 200, 198, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 35, 1, 0, 0, 0, 202, 200, 1, 0, 0, 0, 203, 204, 3, 62, 31, 0, 204, 205, 3, 38, 19, 0, 205, 37, 1, 0, 0, 0, 206, 208, 5, 28, 0, 0, 207, 209, 3, 42, 21, 0, 208, 207, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 214, 1, 0, 0, 0, 210, 211, 5, 34, 0, 0, 211, 213, 3, 42, 21, 0, 212, 210, 1, 0, 0, 0, 213, 216, 1, 0, 0, 0, 214, 212, 1, 0, 0, 0, 214, 215, 1, 0, 0, 0, 215, 217, 1, 0, 0, 0, 216, 214, 1, 0, 0, 0, 217, 218, 5, 29, 0, 0, 218, 39, 1, 0, 0, 0, 219, 220, 5, 6, 0, 0, 220, 221, 3, 42, 21, 0, 221, 222, 5, 36, 0, 0, 222, 226, 1, 0, 0, 0, 223, 224, 5, 6, 0, 0, 224, 226, 5, 36, 0, 0, 225, 219, 1, 0, 0, 0, 225, 223, 1, 0, 0, 0, 226, 41, 1, 0, 0, 0, 227, 229, 3, 62, 31, 0, 228, 230, 5, 20, 0, 0, 229, 228, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 233, 1, 0, 0, 0, 231, 233, 3, 46, 23, 0, 232, 227, 1, 0, 0, 0, 232, 231, 1, 0, 0, 0, 233, 43, 1, 0, 0, 0, 234, 237, 3, 48, 24, 0, 235, 237, 3, 36, 18, 0, 236, 234, 1, 0, 0, 0, 236, 235, 1, 0, 0, 0, 237, 45, 1, 0, 0, 0, 238, 239, 7, 1, 0, 0, 239, 47, 1, 0, 0, 0, 240, 241, 3, 42, 21, 0, 241, 242, 5, 19, 0, 0, 242, 243, 3, 42, 21, 0, 243, 49, 1, 0, 0, 0, 244, 245, 5, 28, 0, 0, 245, 258, 5, 29, 0, 0, 246, 247, 5, 28, 0, 0, 247, 252, 3, 52, 26, 0, 248, 249, 5, 34, 0, 0, 249, 251, 3, 52, 26, 0, 250, 248, 1, 0, 0, 0, 251, 254, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 252, 253, 1, 0, 0, 0, 253, 255, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 255, 256, 5, 29, 0, 0, 256, 258, 1, 0, 0, 0, 257, 244, 1, 0, 0, 0, 257, 246, 1, 0, 0, 0, 258, 51, 1, 0, 0, 0, 259, 260, 3, 58, 29, 0, 260, 261, 3, 62, 31, 0, 261, 53, 1, 0, 0, 0, 262, 263, 5, 7, 0, 0, 263, 264, 3, 62, 31, 0, 264, 265, 3, 56, 28, 0, 265, 55, 1, 0, 0, 0, 266, 270, 5, 32, 0, 0, 267, 269, 3, 18, 9, 0, 268, 267, 1, 0, 0, 0, 269, 272, 1, 0, 0, 0, 270, 268, 1, 0, 0, 0, 270, 271, 1, 0, 0, 0, 271, 273, 1, 0, 0, 0, 272, 270, 1, 0, 0, 0, 273, 274, 5, 33, 0, 0, 274, 57, 1, 0, 0, 0, 275, 281, 5, 15, 0, 0, 276, 281, 5, 16, 0, 0, 277, 281, 3, 62, 31, 0, 278, 281, 3, 60, 30, 0, 279, 281, 5, 17, 0, 0, 280, 275, 1, 0, 0, 0, 280, 276, 1, 0, 0, 0, 280, 277, 1, 0, 0, 0, 280, 278, 1, 0, 0, 0, 280, 279, 1, 0, 0, 0, 281, 59, 1, 0, 0, 0, 282, 283, 5, 30, 0, 0, 283, 284, 3, 58, 29, 0, 284, 285, 5, 31, 0, 0, 285, 61, 1, 0, 0, 0, 286, 287, 5, 45, 0, 0, 287, 289, 5, 35, 0, 0, 288, 286, 1, 0, 0, 0, 288, 289, 1, 0, 0, 0, 289, 290, 1, 0, 0, 0, 290, 291, 5, 45, 0, 0, 291, 63, 1, 0, 0, 0, 24, 67, 73, 79, 107, 124, 139, 146, 154, 162, 166, 173, 193, 200, 208, 214, 225, 229, 232, 236, 252, 257, 270, 280, 288]
\ No newline at end of file
+[4, 1, 43, 287, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 1, 0, 5, 0, 66, 8, 0, 10, 0, 12, 0, 69, 9, 0, 1, 0, 5, 0, 72, 8, 0, 10, 0, 12, 0, 75, 9, 0, 1, 0, 5, 0, 78, 8, 0, 10, 0, 12, 0, 81, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 3, 3, 108, 8, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 5, 7, 123, 8, 7, 10, 7, 12, 7, 126, 9, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 140, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 147, 8, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 155, 8, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 163, 8, 10, 1, 10, 1, 10, 3, 10, 167, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 174, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 203, 8, 19, 1, 19, 1, 19, 5, 19, 207, 8, 19, 10, 19, 12, 19, 210, 9, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 220, 8, 20, 1, 21, 1, 21, 3, 21, 224, 8, 21, 1, 21, 3, 21, 227, 8, 21, 1, 22, 1, 22, 3, 22, 231, 8, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 245, 8, 25, 10, 25, 12, 25, 248, 9, 25, 1, 25, 1, 25, 3, 25, 252, 8, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 5, 28, 263, 8, 28, 10, 28, 12, 28, 266, 9, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 275, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 3, 31, 283, 8, 31, 1, 31, 1, 31, 1, 31, 0, 0, 32, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 0, 1, 2, 0, 15, 16, 41, 41, 287, 0, 67, 1, 0, 0, 0, 2, 84, 1, 0, 0, 0, 4, 91, 1, 0, 0, 0, 6, 107, 1, 0, 0, 0, 8, 109, 1, 0, 0, 0, 10, 112, 1, 0, 0, 0, 12, 117, 1, 0, 0, 0, 14, 120, 1, 0, 0, 0, 16, 139, 1, 0, 0, 0, 18, 141, 1, 0, 0, 0, 20, 166, 1, 0, 0, 0, 22, 168, 1, 0, 0, 0, 24, 175, 1, 0, 0, 0, 26, 179, 1, 0, 0, 0, 28, 183, 1, 0, 0, 0, 30, 186, 1, 0, 0, 0, 32, 189, 1, 0, 0, 0, 34, 193, 1, 0, 0, 0, 36, 197, 1, 0, 0, 0, 38, 200, 1, 0, 0, 0, 40, 219, 1, 0, 0, 0, 42, 226, 1, 0, 0, 0, 44, 230, 1, 0, 0, 0, 46, 232, 1, 0, 0, 0, 48, 234, 1, 0, 0, 0, 50, 251, 1, 0, 0, 0, 52, 253, 1, 0, 0, 0, 54, 256, 1, 0, 0, 0, 56, 260, 1, 0, 0, 0, 58, 274, 1, 0, 0, 0, 60, 276, 1, 0, 0, 0, 62, 282, 1, 0, 0, 0, 64, 66, 3, 2, 1, 0, 65, 64, 1, 0, 0, 0, 66, 69, 1, 0, 0, 0, 67, 65, 1, 0, 0, 0, 67, 68, 1, 0, 0, 0, 68, 73, 1, 0, 0, 0, 69, 67, 1, 0, 0, 0, 70, 72, 3, 4, 2, 0, 71, 70, 1, 0, 0, 0, 72, 75, 1, 0, 0, 0, 73, 71, 1, 0, 0, 0, 73, 74, 1, 0, 0, 0, 74, 79, 1, 0, 0, 0, 75, 73, 1, 0, 0, 0, 76, 78, 3, 6, 3, 0, 77, 76, 1, 0, 0, 0, 78, 81, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 80, 82, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 82, 83, 5, 0, 0, 1, 83, 1, 1, 0, 0, 0, 84, 85, 5, 36, 0, 0, 85, 86, 5, 6, 0, 0, 86, 87, 5, 42, 0, 0, 87, 88, 5, 8, 0, 0, 88, 89, 3, 62, 31, 0, 89, 90, 5, 34, 0, 0, 90, 3, 1, 0, 0, 0, 91, 92, 5, 36, 0, 0, 92, 93, 5, 7, 0, 0, 93, 94, 5, 26, 0, 0, 94, 95, 3, 58, 29, 0, 95, 96, 5, 17, 0, 0, 96, 97, 3, 58, 29, 0, 97, 98, 5, 27, 0, 0, 98, 99, 5, 21, 0, 0, 99, 100, 5, 30, 0, 0, 100, 101, 3, 62, 31, 0, 101, 102, 5, 31, 0, 0, 102, 103, 5, 34, 0, 0, 103, 5, 1, 0, 0, 0, 104, 108, 3, 8, 4, 0, 105, 108, 3, 10, 5, 0, 106, 108, 3, 54, 27, 0, 107, 104, 1, 0, 0, 0, 107, 105, 1, 0, 0, 0, 107, 106, 1, 0, 0, 0, 108, 7, 1, 0, 0, 0, 109, 110, 5, 3, 0, 0, 110, 111, 3, 18, 9, 0, 111, 9, 1, 0, 0, 0, 112, 113, 5, 2, 0, 0, 113, 114, 3, 58, 29, 0, 114, 115, 3, 12, 6, 0, 115, 116, 3, 14, 7, 0, 116, 11, 1, 0, 0, 0, 117, 118, 3, 62, 31, 0, 118, 119, 3, 50, 25, 0, 119, 13, 1, 0, 0, 0, 120, 124, 5, 30, 0, 0, 121, 123, 3, 16, 8, 0, 122, 121, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 127, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 127, 128, 5, 31, 0, 0, 128, 15, 1, 0, 0, 0, 129, 140, 3, 18, 9, 0, 130, 140, 3, 40, 20, 0, 131, 140, 3, 20, 10, 0, 132, 133, 3, 36, 18, 0, 133, 134, 5, 34, 0, 0, 134, 140, 1, 0, 0, 0, 135, 140, 3, 22, 11, 0, 136, 140, 3, 24, 12, 0, 137, 140, 3, 32, 16, 0, 138, 140, 3, 34, 17, 0, 139, 129, 1, 0, 0, 0, 139, 130, 1, 0, 0, 0, 139, 131, 1, 0, 0, 0, 139, 132, 1, 0, 0, 0, 139, 135, 1, 0, 0, 0, 139, 136, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 139, 138, 1, 0, 0, 0, 140, 17, 1, 0, 0, 0, 141, 142, 3, 58, 29, 0, 142, 143, 3, 62, 31, 0, 143, 146, 5, 24, 0, 0, 144, 147, 3, 44, 22, 0, 145, 147, 3, 42, 21, 0, 146, 144, 1, 0, 0, 0, 146, 145, 1, 0, 0, 0, 147, 148, 1, 0, 0, 0, 148, 149, 5, 34, 0, 0, 149, 19, 1, 0, 0, 0, 150, 151, 3, 62, 31, 0, 151, 154, 5, 24, 0, 0, 152, 155, 3, 44, 22, 0, 153, 155, 3, 42, 21, 0, 154, 152, 1, 0, 0, 0, 154, 153, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 157, 5, 34, 0, 0, 157, 167, 1, 0, 0, 0, 158, 159, 3, 62, 31, 0, 159, 162, 5, 25, 0, 0, 160, 163, 3, 44, 22, 0, 161, 163, 3, 42, 21, 0, 162, 160, 1, 0, 0, 0, 162, 161, 1, 0, 0, 0, 163, 164, 1, 0, 0, 0, 164, 165, 5, 34, 0, 0, 165, 167, 1, 0, 0, 0, 166, 150, 1, 0, 0, 0, 166, 158, 1, 0, 0, 0, 167, 21, 1, 0, 0, 0, 168, 169, 5, 9, 0, 0, 169, 170, 3, 26, 13, 0, 170, 173, 3, 14, 7, 0, 171, 174, 3, 30, 15, 0, 172, 174, 3, 28, 14, 0, 173, 171, 1, 0, 0, 0, 173, 172, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 23, 1, 0, 0, 0, 175, 176, 5, 10, 0, 0, 176, 177, 3, 26, 13, 0, 177, 178, 3, 14, 7, 0, 178, 25, 1, 0, 0, 0, 179, 180, 5, 26, 0, 0, 180, 181, 3, 48, 24, 0, 181, 182, 5, 27, 0, 0, 182, 27, 1, 0, 0, 0, 183, 184, 5, 11, 0, 0, 184, 185, 3, 22, 11, 0, 185, 29, 1, 0, 0, 0, 186, 187, 5, 11, 0, 0, 187, 188, 3, 14, 7, 0, 188, 31, 1, 0, 0, 0, 189, 190, 5, 22, 0, 0, 190, 191, 5, 42, 0, 0, 191, 192, 5, 34, 0, 0, 192, 33, 1, 0, 0, 0, 193, 194, 5, 23, 0, 0, 194, 195, 5, 42, 0, 0, 195, 196, 5, 34, 0, 0, 196, 35, 1, 0, 0, 0, 197, 198, 3, 62, 31, 0, 198, 199, 3, 38, 19, 0, 199, 37, 1, 0, 0, 0, 200, 202, 5, 26, 0, 0, 201, 203, 3, 42, 21, 0, 202, 201, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 208, 1, 0, 0, 0, 204, 205, 5, 32, 0, 0, 205, 207, 3, 42, 21, 0, 206, 204, 1, 0, 0, 0, 207, 210, 1, 0, 0, 0, 208, 206, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 211, 1, 0, 0, 0, 210, 208, 1, 0, 0, 0, 211, 212, 5, 27, 0, 0, 212, 39, 1, 0, 0, 0, 213, 214, 5, 4, 0, 0, 214, 215, 3, 42, 21, 0, 215, 216, 5, 34, 0, 0, 216, 220, 1, 0, 0, 0, 217, 218, 5, 4, 0, 0, 218, 220, 5, 34, 0, 0, 219, 213, 1, 0, 0, 0, 219, 217, 1, 0, 0, 0, 220, 41, 1, 0, 0, 0, 221, 223, 3, 62, 31, 0, 222, 224, 5, 18, 0, 0, 223, 222, 1, 0, 0, 0, 223, 224, 1, 0, 0, 0, 224, 227, 1, 0, 0, 0, 225, 227, 3, 46, 23, 0, 226, 221, 1, 0, 0, 0, 226, 225, 1, 0, 0, 0, 227, 43, 1, 0, 0, 0, 228, 231, 3, 48, 24, 0, 229, 231, 3, 36, 18, 0, 230, 228, 1, 0, 0, 0, 230, 229, 1, 0, 0, 0, 231, 45, 1, 0, 0, 0, 232, 233, 7, 0, 0, 0, 233, 47, 1, 0, 0, 0, 234, 235, 3, 42, 21, 0, 235, 236, 5, 17, 0, 0, 236, 237, 3, 42, 21, 0, 237, 49, 1, 0, 0, 0, 238, 239, 5, 26, 0, 0, 239, 252, 5, 27, 0, 0, 240, 241, 5, 26, 0, 0, 241, 246, 3, 52, 26, 0, 242, 243, 5, 32, 0, 0, 243, 245, 3, 52, 26, 0, 244, 242, 1, 0, 0, 0, 245, 248, 1, 0, 0, 0, 246, 244, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 249, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 249, 250, 5, 27, 0, 0, 250, 252, 1, 0, 0, 0, 251, 238, 1, 0, 0, 0, 251, 240, 1, 0, 0, 0, 252, 51, 1, 0, 0, 0, 253, 254, 3, 58, 29, 0, 254, 255, 3, 62, 31, 0, 255, 53, 1, 0, 0, 0, 256, 257, 5, 5, 0, 0, 257, 258, 3, 62, 31, 0, 258, 259, 3, 56, 28, 0, 259, 55, 1, 0, 0, 0, 260, 264, 5, 30, 0, 0, 261, 263, 3, 18, 9, 0, 262, 261, 1, 0, 0, 0, 263, 266, 1, 0, 0, 0, 264, 262, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 267, 1, 0, 0, 0, 266, 264, 1, 0, 0, 0, 267, 268, 5, 31, 0, 0, 268, 57, 1, 0, 0, 0, 269, 275, 5, 13, 0, 0, 270, 275, 5, 14, 0, 0, 271, 275, 3, 62, 31, 0, 272, 275, 3, 60, 30, 0, 273, 275, 5, 15, 0, 0, 274, 269, 1, 0, 0, 0, 274, 270, 1, 0, 0, 0, 274, 271, 1, 0, 0, 0, 274, 272, 1, 0, 0, 0, 274, 273, 1, 0, 0, 0, 275, 59, 1, 0, 0, 0, 276, 277, 5, 28, 0, 0, 277, 278, 3, 58, 29, 0, 278, 279, 5, 29, 0, 0, 279, 61, 1, 0, 0, 0, 280, 281, 5, 43, 0, 0, 281, 283, 5, 33, 0, 0, 282, 280, 1, 0, 0, 0, 282, 283, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 285, 5, 43, 0, 0, 285, 63, 1, 0, 0, 0, 22, 67, 73, 79, 107, 124, 139, 146, 154, 162, 166, 173, 202, 208, 219, 223, 226, 230, 246, 251, 264, 274, 282]
\ No newline at end of file
diff --git a/Crimson/Antlr/Output/Crimson.tokens b/Crimson/Antlr/Output/Crimson.tokens
index 8940016..543c367 100644
--- a/Crimson/Antlr/Output/Crimson.tokens
+++ b/Crimson/Antlr/Output/Crimson.tokens
@@ -1,80 +1,76 @@
-T__0=1
-T__1=2
-Allocator=3
-Function=4
-Global=5
-Return=6
-Structure=7
-Using=8
-OpHandler=9
-As=10
-If=11
-While=12
-Else=13
-Elif=14
-Integer=15
-Boolean=16
-Null=17
-BooleanValue=18
-Operator=19
-Asterisk=20
-MathsOperator=21
-Comparator=22
-RightArrow=23
-BasicCall=24
-AssemblyCall=25
-DirectEquals=26
-PointerEquals=27
-OpenBracket=28
-CloseBracket=29
-OpenSquare=30
-CloseSquare=31
-OpenBrace=32
-CloseBrace=33
-Comma=34
-Dot=35
-SemiColon=36
-Underscore=37
-Hashtag=38
-Quote=39
-SkipTokens=40
-LineComment=41
-BlockComment=42
-Number=43
-String=44
-ShortName=45
-'\r'=1
-'\n'=2
-'allocator'=3
-'function'=4
-'global'=5
-'return'=6
-'structure'=7
-'using'=8
-'ophandler'=9
-'as'=10
-'if'=11
-'while'=12
-'else'=13
-'elif'=14
-'int'=15
-'bool'=16
-'null'=17
-'*'=20
-'->'=23
-'B~'=24
-'A~'=25
-'='=26
-'*='=27
-'('=28
-')'=29
-'['=30
-']'=31
-'{'=32
-'}'=33
-','=34
-'.'=35
-';'=36
-'_'=37
-'#'=38
-'"'=39
+Allocator=1
+Function=2
+Global=3
+Return=4
+Structure=5
+Using=6
+OpHandler=7
+As=8
+If=9
+While=10
+Else=11
+Elif=12
+Integer=13
+Boolean=14
+Null=15
+BooleanValue=16
+Operator=17
+Asterisk=18
+MathsOperator=19
+Comparator=20
+RightArrow=21
+BasicCall=22
+AssemblyCall=23
+DirectEquals=24
+PointerEquals=25
+OpenBracket=26
+CloseBracket=27
+OpenSquare=28
+CloseSquare=29
+OpenBrace=30
+CloseBrace=31
+Comma=32
+Dot=33
+SemiColon=34
+Underscore=35
+Hashtag=36
+Quote=37
+SkipTokens=38
+LineComment=39
+BlockComment=40
+Number=41
+String=42
+ShortName=43
+'allocator'=1
+'function'=2
+'global'=3
+'return'=4
+'structure'=5
+'using'=6
+'ophandler'=7
+'as'=8
+'if'=9
+'while'=10
+'else'=11
+'elif'=12
+'int'=13
+'bool'=14
+'null'=15
+'*'=18
+'->'=21
+'B~'=22
+'A~'=23
+'='=24
+'*='=25
+'('=26
+')'=27
+'['=28
+']'=29
+'{'=30
+'}'=31
+','=32
+'.'=33
+';'=34
+'_'=35
+'#'=36
+'"'=37
diff --git a/Crimson/Antlr/Output/CrimsonLexer.cs b/Crimson/Antlr/Output/CrimsonLexer.cs
index 541a61b..74065e3 100644
--- a/Crimson/Antlr/Output/CrimsonLexer.cs
+++ b/Crimson/Antlr/Output/CrimsonLexer.cs
@@ -34,14 +34,14 @@ public partial class CrimsonLexer : Lexer {
protected static DFA[] decisionToDFA;
protected static PredictionContextCache sharedContextCache = new PredictionContextCache();
public const int
- T__0=1, T__1=2, Allocator=3, Function=4, Global=5, Return=6, Structure=7,
- Using=8, OpHandler=9, As=10, If=11, While=12, Else=13, Elif=14, Integer=15,
- Boolean=16, Null=17, BooleanValue=18, Operator=19, Asterisk=20, MathsOperator=21,
- Comparator=22, RightArrow=23, BasicCall=24, AssemblyCall=25, DirectEquals=26,
- PointerEquals=27, OpenBracket=28, CloseBracket=29, OpenSquare=30, CloseSquare=31,
- OpenBrace=32, CloseBrace=33, Comma=34, Dot=35, SemiColon=36, Underscore=37,
- Hashtag=38, Quote=39, SkipTokens=40, LineComment=41, BlockComment=42,
- Number=43, String=44, ShortName=45;
+ Allocator=1, Function=2, Global=3, Return=4, Structure=5, Using=6, OpHandler=7,
+ As=8, If=9, While=10, Else=11, Elif=12, Integer=13, Boolean=14, Null=15,
+ BooleanValue=16, Operator=17, Asterisk=18, MathsOperator=19, Comparator=20,
+ RightArrow=21, BasicCall=22, AssemblyCall=23, DirectEquals=24, PointerEquals=25,
+ OpenBracket=26, CloseBracket=27, OpenSquare=28, CloseSquare=29, OpenBrace=30,
+ CloseBrace=31, Comma=32, Dot=33, SemiColon=34, Underscore=35, Hashtag=36,
+ Quote=37, SkipTokens=38, LineComment=39, BlockComment=40, Number=41, String=42,
+ ShortName=43;
public static string[] channelNames = {
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
};
@@ -51,16 +51,16 @@ public const int
};
public static readonly string[] ruleNames = {
- "T__0", "T__1", "Allocator", "Function", "Global", "Return", "Structure",
- "Using", "OpHandler", "As", "If", "While", "Else", "Elif", "Integer",
- "Boolean", "Null", "True", "False", "BooleanValue", "Operator", "Plus",
- "Minus", "Asterisk", "Slash", "MathsOperator", "Less", "LessEqual", "Greater",
- "GreaterEqual", "EqualTo", "Comparator", "RightArrow", "BasicCall", "AssemblyCall",
- "DirectEquals", "PointerEquals", "OpenBracket", "CloseBracket", "OpenSquare",
- "CloseSquare", "OpenBrace", "CloseBrace", "Comma", "Dot", "SemiColon",
- "Underscore", "Hashtag", "Quote", "SkipTokens", "LineComment", "BlockComment",
- "Number", "String", "ShortName", "Alphabetic", "Digit", "Punctuation",
- "WhiteSpace", "Newline"
+ "Allocator", "Function", "Global", "Return", "Structure", "Using", "OpHandler",
+ "As", "If", "While", "Else", "Elif", "Integer", "Boolean", "Null", "True",
+ "False", "BooleanValue", "Operator", "Plus", "Minus", "Asterisk", "Slash",
+ "MathsOperator", "Less", "LessEqual", "Greater", "GreaterEqual", "EqualTo",
+ "Comparator", "RightArrow", "BasicCall", "AssemblyCall", "DirectEquals",
+ "PointerEquals", "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare",
+ "OpenBrace", "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore",
+ "Hashtag", "Quote", "SkipTokens", "LineComment", "BlockComment", "Number",
+ "String", "ShortName", "Alphabetic", "Digit", "Punctuation", "WhiteSpace",
+ "Newline"
};
@@ -74,21 +74,20 @@ public CrimsonLexer(ICharStream input, TextWriter output, TextWriter errorOutput
}
private static readonly string[] _LiteralNames = {
- null, "'\\r'", "'\\n'", "'allocator'", "'function'", "'global'", "'return'",
- "'structure'", "'using'", "'ophandler'", "'as'", "'if'", "'while'", "'else'",
- "'elif'", "'int'", "'bool'", "'null'", null, null, "'*'", null, null,
- "'->'", "'B~'", "'A~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'",
- "'}'", "','", "'.'", "';'", "'_'", "'#'", "'\"'"
+ null, "'allocator'", "'function'", "'global'", "'return'", "'structure'",
+ "'using'", "'ophandler'", "'as'", "'if'", "'while'", "'else'", "'elif'",
+ "'int'", "'bool'", "'null'", null, null, "'*'", null, null, "'->'", "'B~'",
+ "'A~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'", "'}'", "','",
+ "'.'", "';'", "'_'", "'#'", "'\"'"
};
private static readonly string[] _SymbolicNames = {
- null, null, null, "Allocator", "Function", "Global", "Return", "Structure",
- "Using", "OpHandler", "As", "If", "While", "Else", "Elif", "Integer",
- "Boolean", "Null", "BooleanValue", "Operator", "Asterisk", "MathsOperator",
- "Comparator", "RightArrow", "BasicCall", "AssemblyCall", "DirectEquals",
- "PointerEquals", "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare",
- "OpenBrace", "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore",
- "Hashtag", "Quote", "SkipTokens", "LineComment", "BlockComment", "Number",
- "String", "ShortName"
+ null, "Allocator", "Function", "Global", "Return", "Structure", "Using",
+ "OpHandler", "As", "If", "While", "Else", "Elif", "Integer", "Boolean",
+ "Null", "BooleanValue", "Operator", "Asterisk", "MathsOperator", "Comparator",
+ "RightArrow", "BasicCall", "AssemblyCall", "DirectEquals", "PointerEquals",
+ "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare", "OpenBrace",
+ "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore", "Hashtag", "Quote",
+ "SkipTokens", "LineComment", "BlockComment", "Number", "String", "ShortName"
};
public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames);
@@ -118,7 +117,7 @@ static CrimsonLexer() {
}
}
private static int[] _serializedATN = {
- 4,0,45,382,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,
+ 4,0,43,374,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,
6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,
7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,
7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,
@@ -126,121 +125,118 @@ static CrimsonLexer() {
7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,
7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,
7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,
- 7,56,2,57,7,57,2,58,7,58,2,59,7,59,1,0,1,0,1,1,1,1,1,2,1,2,1,2,1,2,1,2,
- 1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,
- 4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,
- 1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,
- 8,1,8,1,9,1,9,1,9,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,12,1,
- 12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,15,1,
- 15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,
- 18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,3,19,234,8,19,1,20,1,20,3,20,238,
- 8,20,1,21,1,21,1,22,1,22,1,23,1,23,1,24,1,24,1,25,1,25,1,25,1,25,3,25,
- 252,8,25,1,26,1,26,1,27,1,27,1,27,1,28,1,28,1,29,1,29,1,29,1,30,1,30,1,
- 30,1,31,1,31,1,31,1,31,1,31,3,31,272,8,31,1,32,1,32,1,32,1,33,1,33,1,33,
- 1,34,1,34,1,34,1,35,1,35,1,36,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,
- 1,40,1,40,1,41,1,41,1,42,1,42,1,43,1,43,1,44,1,44,1,45,1,45,1,46,1,46,
- 1,47,1,47,1,48,1,48,1,49,1,49,1,49,1,49,3,49,316,8,49,1,49,1,49,1,50,1,
- 50,1,50,1,50,5,50,324,8,50,10,50,12,50,327,9,50,1,51,1,51,1,51,1,51,5,
- 51,333,8,51,10,51,12,51,336,9,51,1,51,1,51,1,51,1,52,4,52,342,8,52,11,
- 52,12,52,343,1,53,1,53,5,53,348,8,53,10,53,12,53,351,9,53,1,53,1,53,1,
- 54,1,54,1,54,1,54,5,54,359,8,54,10,54,12,54,362,9,54,1,55,1,55,1,56,1,
- 56,1,57,1,57,1,58,4,58,371,8,58,11,58,12,58,372,1,59,4,59,376,8,59,11,
- 59,12,59,377,1,59,3,59,381,8,59,1,334,0,60,1,1,3,2,5,3,7,4,9,5,11,6,13,
- 7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,0,37,0,
- 39,18,41,19,43,0,45,0,47,20,49,0,51,21,53,0,55,0,57,0,59,0,61,0,63,22,
- 65,23,67,24,69,25,71,26,73,27,75,28,77,29,79,30,81,31,83,32,85,33,87,34,
- 89,35,91,36,93,37,95,38,97,39,99,40,101,41,103,42,105,43,107,44,109,45,
- 111,0,113,0,115,0,117,0,119,0,1,0,6,2,0,10,10,13,13,1,0,34,34,2,0,65,90,
- 97,122,1,0,48,57,2,0,46,46,95,95,2,0,9,9,32,32,388,0,1,1,0,0,0,0,3,1,0,
- 0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,
- 1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,
- 0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,39,1,0,0,0,0,41,
- 1,0,0,0,0,47,1,0,0,0,0,51,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,
- 0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,
- 1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,
- 0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,
- 1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,1,121,
- 1,0,0,0,3,123,1,0,0,0,5,125,1,0,0,0,7,135,1,0,0,0,9,144,1,0,0,0,11,151,
- 1,0,0,0,13,158,1,0,0,0,15,168,1,0,0,0,17,174,1,0,0,0,19,184,1,0,0,0,21,
- 187,1,0,0,0,23,190,1,0,0,0,25,196,1,0,0,0,27,201,1,0,0,0,29,206,1,0,0,
- 0,31,210,1,0,0,0,33,215,1,0,0,0,35,220,1,0,0,0,37,225,1,0,0,0,39,233,1,
- 0,0,0,41,237,1,0,0,0,43,239,1,0,0,0,45,241,1,0,0,0,47,243,1,0,0,0,49,245,
- 1,0,0,0,51,251,1,0,0,0,53,253,1,0,0,0,55,255,1,0,0,0,57,258,1,0,0,0,59,
- 260,1,0,0,0,61,263,1,0,0,0,63,271,1,0,0,0,65,273,1,0,0,0,67,276,1,0,0,
- 0,69,279,1,0,0,0,71,282,1,0,0,0,73,284,1,0,0,0,75,287,1,0,0,0,77,289,1,
- 0,0,0,79,291,1,0,0,0,81,293,1,0,0,0,83,295,1,0,0,0,85,297,1,0,0,0,87,299,
- 1,0,0,0,89,301,1,0,0,0,91,303,1,0,0,0,93,305,1,0,0,0,95,307,1,0,0,0,97,
- 309,1,0,0,0,99,315,1,0,0,0,101,319,1,0,0,0,103,328,1,0,0,0,105,341,1,0,
- 0,0,107,345,1,0,0,0,109,354,1,0,0,0,111,363,1,0,0,0,113,365,1,0,0,0,115,
- 367,1,0,0,0,117,370,1,0,0,0,119,380,1,0,0,0,121,122,5,13,0,0,122,2,1,0,
- 0,0,123,124,5,10,0,0,124,4,1,0,0,0,125,126,5,97,0,0,126,127,5,108,0,0,
- 127,128,5,108,0,0,128,129,5,111,0,0,129,130,5,99,0,0,130,131,5,97,0,0,
- 131,132,5,116,0,0,132,133,5,111,0,0,133,134,5,114,0,0,134,6,1,0,0,0,135,
- 136,5,102,0,0,136,137,5,117,0,0,137,138,5,110,0,0,138,139,5,99,0,0,139,
- 140,5,116,0,0,140,141,5,105,0,0,141,142,5,111,0,0,142,143,5,110,0,0,143,
- 8,1,0,0,0,144,145,5,103,0,0,145,146,5,108,0,0,146,147,5,111,0,0,147,148,
- 5,98,0,0,148,149,5,97,0,0,149,150,5,108,0,0,150,10,1,0,0,0,151,152,5,114,
- 0,0,152,153,5,101,0,0,153,154,5,116,0,0,154,155,5,117,0,0,155,156,5,114,
- 0,0,156,157,5,110,0,0,157,12,1,0,0,0,158,159,5,115,0,0,159,160,5,116,0,
- 0,160,161,5,114,0,0,161,162,5,117,0,0,162,163,5,99,0,0,163,164,5,116,0,
- 0,164,165,5,117,0,0,165,166,5,114,0,0,166,167,5,101,0,0,167,14,1,0,0,0,
- 168,169,5,117,0,0,169,170,5,115,0,0,170,171,5,105,0,0,171,172,5,110,0,
- 0,172,173,5,103,0,0,173,16,1,0,0,0,174,175,5,111,0,0,175,176,5,112,0,0,
- 176,177,5,104,0,0,177,178,5,97,0,0,178,179,5,110,0,0,179,180,5,100,0,0,
- 180,181,5,108,0,0,181,182,5,101,0,0,182,183,5,114,0,0,183,18,1,0,0,0,184,
- 185,5,97,0,0,185,186,5,115,0,0,186,20,1,0,0,0,187,188,5,105,0,0,188,189,
- 5,102,0,0,189,22,1,0,0,0,190,191,5,119,0,0,191,192,5,104,0,0,192,193,5,
- 105,0,0,193,194,5,108,0,0,194,195,5,101,0,0,195,24,1,0,0,0,196,197,5,101,
- 0,0,197,198,5,108,0,0,198,199,5,115,0,0,199,200,5,101,0,0,200,26,1,0,0,
- 0,201,202,5,101,0,0,202,203,5,108,0,0,203,204,5,105,0,0,204,205,5,102,
- 0,0,205,28,1,0,0,0,206,207,5,105,0,0,207,208,5,110,0,0,208,209,5,116,0,
- 0,209,30,1,0,0,0,210,211,5,98,0,0,211,212,5,111,0,0,212,213,5,111,0,0,
- 213,214,5,108,0,0,214,32,1,0,0,0,215,216,5,110,0,0,216,217,5,117,0,0,217,
- 218,5,108,0,0,218,219,5,108,0,0,219,34,1,0,0,0,220,221,5,116,0,0,221,222,
- 5,114,0,0,222,223,5,117,0,0,223,224,5,101,0,0,224,36,1,0,0,0,225,226,5,
- 102,0,0,226,227,5,97,0,0,227,228,5,108,0,0,228,229,5,115,0,0,229,230,5,
- 101,0,0,230,38,1,0,0,0,231,234,3,35,17,0,232,234,3,37,18,0,233,231,1,0,
- 0,0,233,232,1,0,0,0,234,40,1,0,0,0,235,238,3,63,31,0,236,238,3,51,25,0,
- 237,235,1,0,0,0,237,236,1,0,0,0,238,42,1,0,0,0,239,240,5,43,0,0,240,44,
- 1,0,0,0,241,242,5,45,0,0,242,46,1,0,0,0,243,244,5,42,0,0,244,48,1,0,0,
- 0,245,246,5,47,0,0,246,50,1,0,0,0,247,252,3,43,21,0,248,252,3,45,22,0,
- 249,252,3,47,23,0,250,252,3,49,24,0,251,247,1,0,0,0,251,248,1,0,0,0,251,
- 249,1,0,0,0,251,250,1,0,0,0,252,52,1,0,0,0,253,254,5,60,0,0,254,54,1,0,
- 0,0,255,256,5,60,0,0,256,257,5,61,0,0,257,56,1,0,0,0,258,259,5,62,0,0,
- 259,58,1,0,0,0,260,261,5,62,0,0,261,262,5,61,0,0,262,60,1,0,0,0,263,264,
- 5,61,0,0,264,265,5,61,0,0,265,62,1,0,0,0,266,272,3,53,26,0,267,272,3,55,
- 27,0,268,272,3,57,28,0,269,272,3,59,29,0,270,272,3,61,30,0,271,266,1,0,
- 0,0,271,267,1,0,0,0,271,268,1,0,0,0,271,269,1,0,0,0,271,270,1,0,0,0,272,
- 64,1,0,0,0,273,274,5,45,0,0,274,275,5,62,0,0,275,66,1,0,0,0,276,277,5,
- 66,0,0,277,278,5,126,0,0,278,68,1,0,0,0,279,280,5,65,0,0,280,281,5,126,
- 0,0,281,70,1,0,0,0,282,283,5,61,0,0,283,72,1,0,0,0,284,285,5,42,0,0,285,
- 286,5,61,0,0,286,74,1,0,0,0,287,288,5,40,0,0,288,76,1,0,0,0,289,290,5,
- 41,0,0,290,78,1,0,0,0,291,292,5,91,0,0,292,80,1,0,0,0,293,294,5,93,0,0,
- 294,82,1,0,0,0,295,296,5,123,0,0,296,84,1,0,0,0,297,298,5,125,0,0,298,
- 86,1,0,0,0,299,300,5,44,0,0,300,88,1,0,0,0,301,302,5,46,0,0,302,90,1,0,
- 0,0,303,304,5,59,0,0,304,92,1,0,0,0,305,306,5,95,0,0,306,94,1,0,0,0,307,
- 308,5,35,0,0,308,96,1,0,0,0,309,310,5,34,0,0,310,98,1,0,0,0,311,316,3,
- 117,58,0,312,316,3,119,59,0,313,316,3,101,50,0,314,316,3,103,51,0,315,
- 311,1,0,0,0,315,312,1,0,0,0,315,313,1,0,0,0,315,314,1,0,0,0,316,317,1,
- 0,0,0,317,318,6,49,0,0,318,100,1,0,0,0,319,320,5,47,0,0,320,321,5,47,0,
- 0,321,325,1,0,0,0,322,324,8,0,0,0,323,322,1,0,0,0,324,327,1,0,0,0,325,
- 323,1,0,0,0,325,326,1,0,0,0,326,102,1,0,0,0,327,325,1,0,0,0,328,329,5,
- 47,0,0,329,330,5,42,0,0,330,334,1,0,0,0,331,333,9,0,0,0,332,331,1,0,0,
- 0,333,336,1,0,0,0,334,335,1,0,0,0,334,332,1,0,0,0,335,337,1,0,0,0,336,
- 334,1,0,0,0,337,338,5,42,0,0,338,339,5,47,0,0,339,104,1,0,0,0,340,342,
- 3,113,56,0,341,340,1,0,0,0,342,343,1,0,0,0,343,341,1,0,0,0,343,344,1,0,
- 0,0,344,106,1,0,0,0,345,349,3,97,48,0,346,348,8,1,0,0,347,346,1,0,0,0,
- 348,351,1,0,0,0,349,347,1,0,0,0,349,350,1,0,0,0,350,352,1,0,0,0,351,349,
- 1,0,0,0,352,353,3,97,48,0,353,108,1,0,0,0,354,360,3,111,55,0,355,359,3,
- 111,55,0,356,359,3,105,52,0,357,359,3,93,46,0,358,355,1,0,0,0,358,356,
- 1,0,0,0,358,357,1,0,0,0,359,362,1,0,0,0,360,358,1,0,0,0,360,361,1,0,0,
- 0,361,110,1,0,0,0,362,360,1,0,0,0,363,364,7,2,0,0,364,112,1,0,0,0,365,
- 366,7,3,0,0,366,114,1,0,0,0,367,368,7,4,0,0,368,116,1,0,0,0,369,371,7,
- 5,0,0,370,369,1,0,0,0,371,372,1,0,0,0,372,370,1,0,0,0,372,373,1,0,0,0,
- 373,118,1,0,0,0,374,376,7,0,0,0,375,374,1,0,0,0,376,377,1,0,0,0,377,375,
- 1,0,0,0,377,378,1,0,0,0,378,381,1,0,0,0,379,381,5,0,0,1,380,375,1,0,0,
- 0,380,379,1,0,0,0,381,120,1,0,0,0,15,0,233,237,251,271,315,325,334,343,
- 349,358,360,372,377,380,1,6,0,0
+ 7,56,2,57,7,57,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,
+ 3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,
+ 1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,8,1,8,1,8,1,9,1,
+ 9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,
+ 12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,
+ 15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17,3,17,226,
+ 8,17,1,18,1,18,3,18,230,8,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,1,
+ 23,1,23,1,23,1,23,3,23,244,8,23,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,27,
+ 1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,3,29,264,8,29,1,30,1,
+ 30,1,30,1,31,1,31,1,31,1,32,1,32,1,32,1,33,1,33,1,34,1,34,1,34,1,35,1,
+ 35,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,1,40,1,40,1,41,1,41,1,42,1,
+ 42,1,43,1,43,1,44,1,44,1,45,1,45,1,46,1,46,1,47,1,47,1,47,1,47,3,47,308,
+ 8,47,1,47,1,47,1,48,1,48,1,48,1,48,5,48,316,8,48,10,48,12,48,319,9,48,
+ 1,49,1,49,1,49,1,49,5,49,325,8,49,10,49,12,49,328,9,49,1,49,1,49,1,49,
+ 1,50,4,50,334,8,50,11,50,12,50,335,1,51,1,51,5,51,340,8,51,10,51,12,51,
+ 343,9,51,1,51,1,51,1,52,1,52,1,52,1,52,5,52,351,8,52,10,52,12,52,354,9,
+ 52,1,53,1,53,1,54,1,54,1,55,1,55,1,56,4,56,363,8,56,11,56,12,56,364,1,
+ 57,4,57,368,8,57,11,57,12,57,369,1,57,3,57,373,8,57,1,326,0,58,1,1,3,2,
+ 5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,
+ 0,33,0,35,16,37,17,39,0,41,0,43,18,45,0,47,19,49,0,51,0,53,0,55,0,57,0,
+ 59,20,61,21,63,22,65,23,67,24,69,25,71,26,73,27,75,28,77,29,79,30,81,31,
+ 83,32,85,33,87,34,89,35,91,36,93,37,95,38,97,39,99,40,101,41,103,42,105,
+ 43,107,0,109,0,111,0,113,0,115,0,1,0,6,2,0,10,10,13,13,1,0,34,34,2,0,65,
+ 90,97,122,1,0,48,57,2,0,46,46,95,95,2,0,9,9,32,32,380,0,1,1,0,0,0,0,3,
+ 1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,
+ 0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,
+ 1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,43,1,0,0,
+ 0,0,47,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,
+ 1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,
+ 0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,
+ 1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,
+ 0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,1,117,1,0,0,0,3,127,1,0,0,
+ 0,5,136,1,0,0,0,7,143,1,0,0,0,9,150,1,0,0,0,11,160,1,0,0,0,13,166,1,0,
+ 0,0,15,176,1,0,0,0,17,179,1,0,0,0,19,182,1,0,0,0,21,188,1,0,0,0,23,193,
+ 1,0,0,0,25,198,1,0,0,0,27,202,1,0,0,0,29,207,1,0,0,0,31,212,1,0,0,0,33,
+ 217,1,0,0,0,35,225,1,0,0,0,37,229,1,0,0,0,39,231,1,0,0,0,41,233,1,0,0,
+ 0,43,235,1,0,0,0,45,237,1,0,0,0,47,243,1,0,0,0,49,245,1,0,0,0,51,247,1,
+ 0,0,0,53,250,1,0,0,0,55,252,1,0,0,0,57,255,1,0,0,0,59,263,1,0,0,0,61,265,
+ 1,0,0,0,63,268,1,0,0,0,65,271,1,0,0,0,67,274,1,0,0,0,69,276,1,0,0,0,71,
+ 279,1,0,0,0,73,281,1,0,0,0,75,283,1,0,0,0,77,285,1,0,0,0,79,287,1,0,0,
+ 0,81,289,1,0,0,0,83,291,1,0,0,0,85,293,1,0,0,0,87,295,1,0,0,0,89,297,1,
+ 0,0,0,91,299,1,0,0,0,93,301,1,0,0,0,95,307,1,0,0,0,97,311,1,0,0,0,99,320,
+ 1,0,0,0,101,333,1,0,0,0,103,337,1,0,0,0,105,346,1,0,0,0,107,355,1,0,0,
+ 0,109,357,1,0,0,0,111,359,1,0,0,0,113,362,1,0,0,0,115,372,1,0,0,0,117,
+ 118,5,97,0,0,118,119,5,108,0,0,119,120,5,108,0,0,120,121,5,111,0,0,121,
+ 122,5,99,0,0,122,123,5,97,0,0,123,124,5,116,0,0,124,125,5,111,0,0,125,
+ 126,5,114,0,0,126,2,1,0,0,0,127,128,5,102,0,0,128,129,5,117,0,0,129,130,
+ 5,110,0,0,130,131,5,99,0,0,131,132,5,116,0,0,132,133,5,105,0,0,133,134,
+ 5,111,0,0,134,135,5,110,0,0,135,4,1,0,0,0,136,137,5,103,0,0,137,138,5,
+ 108,0,0,138,139,5,111,0,0,139,140,5,98,0,0,140,141,5,97,0,0,141,142,5,
+ 108,0,0,142,6,1,0,0,0,143,144,5,114,0,0,144,145,5,101,0,0,145,146,5,116,
+ 0,0,146,147,5,117,0,0,147,148,5,114,0,0,148,149,5,110,0,0,149,8,1,0,0,
+ 0,150,151,5,115,0,0,151,152,5,116,0,0,152,153,5,114,0,0,153,154,5,117,
+ 0,0,154,155,5,99,0,0,155,156,5,116,0,0,156,157,5,117,0,0,157,158,5,114,
+ 0,0,158,159,5,101,0,0,159,10,1,0,0,0,160,161,5,117,0,0,161,162,5,115,0,
+ 0,162,163,5,105,0,0,163,164,5,110,0,0,164,165,5,103,0,0,165,12,1,0,0,0,
+ 166,167,5,111,0,0,167,168,5,112,0,0,168,169,5,104,0,0,169,170,5,97,0,0,
+ 170,171,5,110,0,0,171,172,5,100,0,0,172,173,5,108,0,0,173,174,5,101,0,
+ 0,174,175,5,114,0,0,175,14,1,0,0,0,176,177,5,97,0,0,177,178,5,115,0,0,
+ 178,16,1,0,0,0,179,180,5,105,0,0,180,181,5,102,0,0,181,18,1,0,0,0,182,
+ 183,5,119,0,0,183,184,5,104,0,0,184,185,5,105,0,0,185,186,5,108,0,0,186,
+ 187,5,101,0,0,187,20,1,0,0,0,188,189,5,101,0,0,189,190,5,108,0,0,190,191,
+ 5,115,0,0,191,192,5,101,0,0,192,22,1,0,0,0,193,194,5,101,0,0,194,195,5,
+ 108,0,0,195,196,5,105,0,0,196,197,5,102,0,0,197,24,1,0,0,0,198,199,5,105,
+ 0,0,199,200,5,110,0,0,200,201,5,116,0,0,201,26,1,0,0,0,202,203,5,98,0,
+ 0,203,204,5,111,0,0,204,205,5,111,0,0,205,206,5,108,0,0,206,28,1,0,0,0,
+ 207,208,5,110,0,0,208,209,5,117,0,0,209,210,5,108,0,0,210,211,5,108,0,
+ 0,211,30,1,0,0,0,212,213,5,116,0,0,213,214,5,114,0,0,214,215,5,117,0,0,
+ 215,216,5,101,0,0,216,32,1,0,0,0,217,218,5,102,0,0,218,219,5,97,0,0,219,
+ 220,5,108,0,0,220,221,5,115,0,0,221,222,5,101,0,0,222,34,1,0,0,0,223,226,
+ 3,31,15,0,224,226,3,33,16,0,225,223,1,0,0,0,225,224,1,0,0,0,226,36,1,0,
+ 0,0,227,230,3,59,29,0,228,230,3,47,23,0,229,227,1,0,0,0,229,228,1,0,0,
+ 0,230,38,1,0,0,0,231,232,5,43,0,0,232,40,1,0,0,0,233,234,5,45,0,0,234,
+ 42,1,0,0,0,235,236,5,42,0,0,236,44,1,0,0,0,237,238,5,47,0,0,238,46,1,0,
+ 0,0,239,244,3,39,19,0,240,244,3,41,20,0,241,244,3,43,21,0,242,244,3,45,
+ 22,0,243,239,1,0,0,0,243,240,1,0,0,0,243,241,1,0,0,0,243,242,1,0,0,0,244,
+ 48,1,0,0,0,245,246,5,60,0,0,246,50,1,0,0,0,247,248,5,60,0,0,248,249,5,
+ 61,0,0,249,52,1,0,0,0,250,251,5,62,0,0,251,54,1,0,0,0,252,253,5,62,0,0,
+ 253,254,5,61,0,0,254,56,1,0,0,0,255,256,5,61,0,0,256,257,5,61,0,0,257,
+ 58,1,0,0,0,258,264,3,49,24,0,259,264,3,51,25,0,260,264,3,53,26,0,261,264,
+ 3,55,27,0,262,264,3,57,28,0,263,258,1,0,0,0,263,259,1,0,0,0,263,260,1,
+ 0,0,0,263,261,1,0,0,0,263,262,1,0,0,0,264,60,1,0,0,0,265,266,5,45,0,0,
+ 266,267,5,62,0,0,267,62,1,0,0,0,268,269,5,66,0,0,269,270,5,126,0,0,270,
+ 64,1,0,0,0,271,272,5,65,0,0,272,273,5,126,0,0,273,66,1,0,0,0,274,275,5,
+ 61,0,0,275,68,1,0,0,0,276,277,5,42,0,0,277,278,5,61,0,0,278,70,1,0,0,0,
+ 279,280,5,40,0,0,280,72,1,0,0,0,281,282,5,41,0,0,282,74,1,0,0,0,283,284,
+ 5,91,0,0,284,76,1,0,0,0,285,286,5,93,0,0,286,78,1,0,0,0,287,288,5,123,
+ 0,0,288,80,1,0,0,0,289,290,5,125,0,0,290,82,1,0,0,0,291,292,5,44,0,0,292,
+ 84,1,0,0,0,293,294,5,46,0,0,294,86,1,0,0,0,295,296,5,59,0,0,296,88,1,0,
+ 0,0,297,298,5,95,0,0,298,90,1,0,0,0,299,300,5,35,0,0,300,92,1,0,0,0,301,
+ 302,5,34,0,0,302,94,1,0,0,0,303,308,3,113,56,0,304,308,3,115,57,0,305,
+ 308,3,97,48,0,306,308,3,99,49,0,307,303,1,0,0,0,307,304,1,0,0,0,307,305,
+ 1,0,0,0,307,306,1,0,0,0,308,309,1,0,0,0,309,310,6,47,0,0,310,96,1,0,0,
+ 0,311,312,5,47,0,0,312,313,5,47,0,0,313,317,1,0,0,0,314,316,8,0,0,0,315,
+ 314,1,0,0,0,316,319,1,0,0,0,317,315,1,0,0,0,317,318,1,0,0,0,318,98,1,0,
+ 0,0,319,317,1,0,0,0,320,321,5,47,0,0,321,322,5,42,0,0,322,326,1,0,0,0,
+ 323,325,9,0,0,0,324,323,1,0,0,0,325,328,1,0,0,0,326,327,1,0,0,0,326,324,
+ 1,0,0,0,327,329,1,0,0,0,328,326,1,0,0,0,329,330,5,42,0,0,330,331,5,47,
+ 0,0,331,100,1,0,0,0,332,334,3,109,54,0,333,332,1,0,0,0,334,335,1,0,0,0,
+ 335,333,1,0,0,0,335,336,1,0,0,0,336,102,1,0,0,0,337,341,3,93,46,0,338,
+ 340,8,1,0,0,339,338,1,0,0,0,340,343,1,0,0,0,341,339,1,0,0,0,341,342,1,
+ 0,0,0,342,344,1,0,0,0,343,341,1,0,0,0,344,345,3,93,46,0,345,104,1,0,0,
+ 0,346,352,3,107,53,0,347,351,3,107,53,0,348,351,3,101,50,0,349,351,3,89,
+ 44,0,350,347,1,0,0,0,350,348,1,0,0,0,350,349,1,0,0,0,351,354,1,0,0,0,352,
+ 350,1,0,0,0,352,353,1,0,0,0,353,106,1,0,0,0,354,352,1,0,0,0,355,356,7,
+ 2,0,0,356,108,1,0,0,0,357,358,7,3,0,0,358,110,1,0,0,0,359,360,7,4,0,0,
+ 360,112,1,0,0,0,361,363,7,5,0,0,362,361,1,0,0,0,363,364,1,0,0,0,364,362,
+ 1,0,0,0,364,365,1,0,0,0,365,114,1,0,0,0,366,368,7,0,0,0,367,366,1,0,0,
+ 0,368,369,1,0,0,0,369,367,1,0,0,0,369,370,1,0,0,0,370,373,1,0,0,0,371,
+ 373,5,0,0,1,372,367,1,0,0,0,372,371,1,0,0,0,373,116,1,0,0,0,15,0,225,229,
+ 243,263,307,317,326,335,341,350,352,364,369,372,1,6,0,0
};
public static readonly ATN _ATN =
diff --git a/Crimson/Antlr/Output/CrimsonLexer.interp b/Crimson/Antlr/Output/CrimsonLexer.interp
index 1853249..b57279f 100644
--- a/Crimson/Antlr/Output/CrimsonLexer.interp
+++ b/Crimson/Antlr/Output/CrimsonLexer.interp
@@ -1,7 +1,5 @@
token literal names:
null
-'\r'
-'\n'
'allocator'
'function'
'global'
@@ -48,8 +46,6 @@ null
token symbolic names:
null
-null
-null
Allocator
Function
Global
@@ -95,8 +91,6 @@ String
ShortName
rule names:
-T__0
-T__1
Allocator
Function
Global
@@ -164,4 +158,4 @@ mode names:
DEFAULT_MODE
atn:
-[4, 0, 45, 382, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 234, 8, 19, 1, 20, 1, 20, 3, 20, 238, 8, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 252, 8, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 272, 8, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 316, 8, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 5, 50, 324, 8, 50, 10, 50, 12, 50, 327, 9, 50, 1, 51, 1, 51, 1, 51, 1, 51, 5, 51, 333, 8, 51, 10, 51, 12, 51, 336, 9, 51, 1, 51, 1, 51, 1, 51, 1, 52, 4, 52, 342, 8, 52, 11, 52, 12, 52, 343, 1, 53, 1, 53, 5, 53, 348, 8, 53, 10, 53, 12, 53, 351, 9, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 5, 54, 359, 8, 54, 10, 54, 12, 54, 362, 9, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 4, 58, 371, 8, 58, 11, 58, 12, 58, 372, 1, 59, 4, 59, 376, 8, 59, 11, 59, 12, 59, 377, 1, 59, 3, 59, 381, 8, 59, 1, 334, 0, 60, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 0, 37, 0, 39, 18, 41, 19, 43, 0, 45, 0, 47, 20, 49, 0, 51, 21, 53, 0, 55, 0, 57, 0, 59, 0, 61, 0, 63, 22, 65, 23, 67, 24, 69, 25, 71, 26, 73, 27, 75, 28, 77, 29, 79, 30, 81, 31, 83, 32, 85, 33, 87, 34, 89, 35, 91, 36, 93, 37, 95, 38, 97, 39, 99, 40, 101, 41, 103, 42, 105, 43, 107, 44, 109, 45, 111, 0, 113, 0, 115, 0, 117, 0, 119, 0, 1, 0, 6, 2, 0, 10, 10, 13, 13, 1, 0, 34, 34, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 2, 0, 46, 46, 95, 95, 2, 0, 9, 9, 32, 32, 388, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 1, 121, 1, 0, 0, 0, 3, 123, 1, 0, 0, 0, 5, 125, 1, 0, 0, 0, 7, 135, 1, 0, 0, 0, 9, 144, 1, 0, 0, 0, 11, 151, 1, 0, 0, 0, 13, 158, 1, 0, 0, 0, 15, 168, 1, 0, 0, 0, 17, 174, 1, 0, 0, 0, 19, 184, 1, 0, 0, 0, 21, 187, 1, 0, 0, 0, 23, 190, 1, 0, 0, 0, 25, 196, 1, 0, 0, 0, 27, 201, 1, 0, 0, 0, 29, 206, 1, 0, 0, 0, 31, 210, 1, 0, 0, 0, 33, 215, 1, 0, 0, 0, 35, 220, 1, 0, 0, 0, 37, 225, 1, 0, 0, 0, 39, 233, 1, 0, 0, 0, 41, 237, 1, 0, 0, 0, 43, 239, 1, 0, 0, 0, 45, 241, 1, 0, 0, 0, 47, 243, 1, 0, 0, 0, 49, 245, 1, 0, 0, 0, 51, 251, 1, 0, 0, 0, 53, 253, 1, 0, 0, 0, 55, 255, 1, 0, 0, 0, 57, 258, 1, 0, 0, 0, 59, 260, 1, 0, 0, 0, 61, 263, 1, 0, 0, 0, 63, 271, 1, 0, 0, 0, 65, 273, 1, 0, 0, 0, 67, 276, 1, 0, 0, 0, 69, 279, 1, 0, 0, 0, 71, 282, 1, 0, 0, 0, 73, 284, 1, 0, 0, 0, 75, 287, 1, 0, 0, 0, 77, 289, 1, 0, 0, 0, 79, 291, 1, 0, 0, 0, 81, 293, 1, 0, 0, 0, 83, 295, 1, 0, 0, 0, 85, 297, 1, 0, 0, 0, 87, 299, 1, 0, 0, 0, 89, 301, 1, 0, 0, 0, 91, 303, 1, 0, 0, 0, 93, 305, 1, 0, 0, 0, 95, 307, 1, 0, 0, 0, 97, 309, 1, 0, 0, 0, 99, 315, 1, 0, 0, 0, 101, 319, 1, 0, 0, 0, 103, 328, 1, 0, 0, 0, 105, 341, 1, 0, 0, 0, 107, 345, 1, 0, 0, 0, 109, 354, 1, 0, 0, 0, 111, 363, 1, 0, 0, 0, 113, 365, 1, 0, 0, 0, 115, 367, 1, 0, 0, 0, 117, 370, 1, 0, 0, 0, 119, 380, 1, 0, 0, 0, 121, 122, 5, 13, 0, 0, 122, 2, 1, 0, 0, 0, 123, 124, 5, 10, 0, 0, 124, 4, 1, 0, 0, 0, 125, 126, 5, 97, 0, 0, 126, 127, 5, 108, 0, 0, 127, 128, 5, 108, 0, 0, 128, 129, 5, 111, 0, 0, 129, 130, 5, 99, 0, 0, 130, 131, 5, 97, 0, 0, 131, 132, 5, 116, 0, 0, 132, 133, 5, 111, 0, 0, 133, 134, 5, 114, 0, 0, 134, 6, 1, 0, 0, 0, 135, 136, 5, 102, 0, 0, 136, 137, 5, 117, 0, 0, 137, 138, 5, 110, 0, 0, 138, 139, 5, 99, 0, 0, 139, 140, 5, 116, 0, 0, 140, 141, 5, 105, 0, 0, 141, 142, 5, 111, 0, 0, 142, 143, 5, 110, 0, 0, 143, 8, 1, 0, 0, 0, 144, 145, 5, 103, 0, 0, 145, 146, 5, 108, 0, 0, 146, 147, 5, 111, 0, 0, 147, 148, 5, 98, 0, 0, 148, 149, 5, 97, 0, 0, 149, 150, 5, 108, 0, 0, 150, 10, 1, 0, 0, 0, 151, 152, 5, 114, 0, 0, 152, 153, 5, 101, 0, 0, 153, 154, 5, 116, 0, 0, 154, 155, 5, 117, 0, 0, 155, 156, 5, 114, 0, 0, 156, 157, 5, 110, 0, 0, 157, 12, 1, 0, 0, 0, 158, 159, 5, 115, 0, 0, 159, 160, 5, 116, 0, 0, 160, 161, 5, 114, 0, 0, 161, 162, 5, 117, 0, 0, 162, 163, 5, 99, 0, 0, 163, 164, 5, 116, 0, 0, 164, 165, 5, 117, 0, 0, 165, 166, 5, 114, 0, 0, 166, 167, 5, 101, 0, 0, 167, 14, 1, 0, 0, 0, 168, 169, 5, 117, 0, 0, 169, 170, 5, 115, 0, 0, 170, 171, 5, 105, 0, 0, 171, 172, 5, 110, 0, 0, 172, 173, 5, 103, 0, 0, 173, 16, 1, 0, 0, 0, 174, 175, 5, 111, 0, 0, 175, 176, 5, 112, 0, 0, 176, 177, 5, 104, 0, 0, 177, 178, 5, 97, 0, 0, 178, 179, 5, 110, 0, 0, 179, 180, 5, 100, 0, 0, 180, 181, 5, 108, 0, 0, 181, 182, 5, 101, 0, 0, 182, 183, 5, 114, 0, 0, 183, 18, 1, 0, 0, 0, 184, 185, 5, 97, 0, 0, 185, 186, 5, 115, 0, 0, 186, 20, 1, 0, 0, 0, 187, 188, 5, 105, 0, 0, 188, 189, 5, 102, 0, 0, 189, 22, 1, 0, 0, 0, 190, 191, 5, 119, 0, 0, 191, 192, 5, 104, 0, 0, 192, 193, 5, 105, 0, 0, 193, 194, 5, 108, 0, 0, 194, 195, 5, 101, 0, 0, 195, 24, 1, 0, 0, 0, 196, 197, 5, 101, 0, 0, 197, 198, 5, 108, 0, 0, 198, 199, 5, 115, 0, 0, 199, 200, 5, 101, 0, 0, 200, 26, 1, 0, 0, 0, 201, 202, 5, 101, 0, 0, 202, 203, 5, 108, 0, 0, 203, 204, 5, 105, 0, 0, 204, 205, 5, 102, 0, 0, 205, 28, 1, 0, 0, 0, 206, 207, 5, 105, 0, 0, 207, 208, 5, 110, 0, 0, 208, 209, 5, 116, 0, 0, 209, 30, 1, 0, 0, 0, 210, 211, 5, 98, 0, 0, 211, 212, 5, 111, 0, 0, 212, 213, 5, 111, 0, 0, 213, 214, 5, 108, 0, 0, 214, 32, 1, 0, 0, 0, 215, 216, 5, 110, 0, 0, 216, 217, 5, 117, 0, 0, 217, 218, 5, 108, 0, 0, 218, 219, 5, 108, 0, 0, 219, 34, 1, 0, 0, 0, 220, 221, 5, 116, 0, 0, 221, 222, 5, 114, 0, 0, 222, 223, 5, 117, 0, 0, 223, 224, 5, 101, 0, 0, 224, 36, 1, 0, 0, 0, 225, 226, 5, 102, 0, 0, 226, 227, 5, 97, 0, 0, 227, 228, 5, 108, 0, 0, 228, 229, 5, 115, 0, 0, 229, 230, 5, 101, 0, 0, 230, 38, 1, 0, 0, 0, 231, 234, 3, 35, 17, 0, 232, 234, 3, 37, 18, 0, 233, 231, 1, 0, 0, 0, 233, 232, 1, 0, 0, 0, 234, 40, 1, 0, 0, 0, 235, 238, 3, 63, 31, 0, 236, 238, 3, 51, 25, 0, 237, 235, 1, 0, 0, 0, 237, 236, 1, 0, 0, 0, 238, 42, 1, 0, 0, 0, 239, 240, 5, 43, 0, 0, 240, 44, 1, 0, 0, 0, 241, 242, 5, 45, 0, 0, 242, 46, 1, 0, 0, 0, 243, 244, 5, 42, 0, 0, 244, 48, 1, 0, 0, 0, 245, 246, 5, 47, 0, 0, 246, 50, 1, 0, 0, 0, 247, 252, 3, 43, 21, 0, 248, 252, 3, 45, 22, 0, 249, 252, 3, 47, 23, 0, 250, 252, 3, 49, 24, 0, 251, 247, 1, 0, 0, 0, 251, 248, 1, 0, 0, 0, 251, 249, 1, 0, 0, 0, 251, 250, 1, 0, 0, 0, 252, 52, 1, 0, 0, 0, 253, 254, 5, 60, 0, 0, 254, 54, 1, 0, 0, 0, 255, 256, 5, 60, 0, 0, 256, 257, 5, 61, 0, 0, 257, 56, 1, 0, 0, 0, 258, 259, 5, 62, 0, 0, 259, 58, 1, 0, 0, 0, 260, 261, 5, 62, 0, 0, 261, 262, 5, 61, 0, 0, 262, 60, 1, 0, 0, 0, 263, 264, 5, 61, 0, 0, 264, 265, 5, 61, 0, 0, 265, 62, 1, 0, 0, 0, 266, 272, 3, 53, 26, 0, 267, 272, 3, 55, 27, 0, 268, 272, 3, 57, 28, 0, 269, 272, 3, 59, 29, 0, 270, 272, 3, 61, 30, 0, 271, 266, 1, 0, 0, 0, 271, 267, 1, 0, 0, 0, 271, 268, 1, 0, 0, 0, 271, 269, 1, 0, 0, 0, 271, 270, 1, 0, 0, 0, 272, 64, 1, 0, 0, 0, 273, 274, 5, 45, 0, 0, 274, 275, 5, 62, 0, 0, 275, 66, 1, 0, 0, 0, 276, 277, 5, 66, 0, 0, 277, 278, 5, 126, 0, 0, 278, 68, 1, 0, 0, 0, 279, 280, 5, 65, 0, 0, 280, 281, 5, 126, 0, 0, 281, 70, 1, 0, 0, 0, 282, 283, 5, 61, 0, 0, 283, 72, 1, 0, 0, 0, 284, 285, 5, 42, 0, 0, 285, 286, 5, 61, 0, 0, 286, 74, 1, 0, 0, 0, 287, 288, 5, 40, 0, 0, 288, 76, 1, 0, 0, 0, 289, 290, 5, 41, 0, 0, 290, 78, 1, 0, 0, 0, 291, 292, 5, 91, 0, 0, 292, 80, 1, 0, 0, 0, 293, 294, 5, 93, 0, 0, 294, 82, 1, 0, 0, 0, 295, 296, 5, 123, 0, 0, 296, 84, 1, 0, 0, 0, 297, 298, 5, 125, 0, 0, 298, 86, 1, 0, 0, 0, 299, 300, 5, 44, 0, 0, 300, 88, 1, 0, 0, 0, 301, 302, 5, 46, 0, 0, 302, 90, 1, 0, 0, 0, 303, 304, 5, 59, 0, 0, 304, 92, 1, 0, 0, 0, 305, 306, 5, 95, 0, 0, 306, 94, 1, 0, 0, 0, 307, 308, 5, 35, 0, 0, 308, 96, 1, 0, 0, 0, 309, 310, 5, 34, 0, 0, 310, 98, 1, 0, 0, 0, 311, 316, 3, 117, 58, 0, 312, 316, 3, 119, 59, 0, 313, 316, 3, 101, 50, 0, 314, 316, 3, 103, 51, 0, 315, 311, 1, 0, 0, 0, 315, 312, 1, 0, 0, 0, 315, 313, 1, 0, 0, 0, 315, 314, 1, 0, 0, 0, 316, 317, 1, 0, 0, 0, 317, 318, 6, 49, 0, 0, 318, 100, 1, 0, 0, 0, 319, 320, 5, 47, 0, 0, 320, 321, 5, 47, 0, 0, 321, 325, 1, 0, 0, 0, 322, 324, 8, 0, 0, 0, 323, 322, 1, 0, 0, 0, 324, 327, 1, 0, 0, 0, 325, 323, 1, 0, 0, 0, 325, 326, 1, 0, 0, 0, 326, 102, 1, 0, 0, 0, 327, 325, 1, 0, 0, 0, 328, 329, 5, 47, 0, 0, 329, 330, 5, 42, 0, 0, 330, 334, 1, 0, 0, 0, 331, 333, 9, 0, 0, 0, 332, 331, 1, 0, 0, 0, 333, 336, 1, 0, 0, 0, 334, 335, 1, 0, 0, 0, 334, 332, 1, 0, 0, 0, 335, 337, 1, 0, 0, 0, 336, 334, 1, 0, 0, 0, 337, 338, 5, 42, 0, 0, 338, 339, 5, 47, 0, 0, 339, 104, 1, 0, 0, 0, 340, 342, 3, 113, 56, 0, 341, 340, 1, 0, 0, 0, 342, 343, 1, 0, 0, 0, 343, 341, 1, 0, 0, 0, 343, 344, 1, 0, 0, 0, 344, 106, 1, 0, 0, 0, 345, 349, 3, 97, 48, 0, 346, 348, 8, 1, 0, 0, 347, 346, 1, 0, 0, 0, 348, 351, 1, 0, 0, 0, 349, 347, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 352, 1, 0, 0, 0, 351, 349, 1, 0, 0, 0, 352, 353, 3, 97, 48, 0, 353, 108, 1, 0, 0, 0, 354, 360, 3, 111, 55, 0, 355, 359, 3, 111, 55, 0, 356, 359, 3, 105, 52, 0, 357, 359, 3, 93, 46, 0, 358, 355, 1, 0, 0, 0, 358, 356, 1, 0, 0, 0, 358, 357, 1, 0, 0, 0, 359, 362, 1, 0, 0, 0, 360, 358, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 110, 1, 0, 0, 0, 362, 360, 1, 0, 0, 0, 363, 364, 7, 2, 0, 0, 364, 112, 1, 0, 0, 0, 365, 366, 7, 3, 0, 0, 366, 114, 1, 0, 0, 0, 367, 368, 7, 4, 0, 0, 368, 116, 1, 0, 0, 0, 369, 371, 7, 5, 0, 0, 370, 369, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0, 372, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 118, 1, 0, 0, 0, 374, 376, 7, 0, 0, 0, 375, 374, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 375, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 381, 1, 0, 0, 0, 379, 381, 5, 0, 0, 1, 380, 375, 1, 0, 0, 0, 380, 379, 1, 0, 0, 0, 381, 120, 1, 0, 0, 0, 15, 0, 233, 237, 251, 271, 315, 325, 334, 343, 349, 358, 360, 372, 377, 380, 1, 6, 0, 0]
\ No newline at end of file
+[4, 0, 43, 374, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 3, 17, 226, 8, 17, 1, 18, 1, 18, 3, 18, 230, 8, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 244, 8, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 264, 8, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 3, 47, 308, 8, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 316, 8, 48, 10, 48, 12, 48, 319, 9, 48, 1, 49, 1, 49, 1, 49, 1, 49, 5, 49, 325, 8, 49, 10, 49, 12, 49, 328, 9, 49, 1, 49, 1, 49, 1, 49, 1, 50, 4, 50, 334, 8, 50, 11, 50, 12, 50, 335, 1, 51, 1, 51, 5, 51, 340, 8, 51, 10, 51, 12, 51, 343, 9, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 5, 52, 351, 8, 52, 10, 52, 12, 52, 354, 9, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 4, 56, 363, 8, 56, 11, 56, 12, 56, 364, 1, 57, 4, 57, 368, 8, 57, 11, 57, 12, 57, 369, 1, 57, 3, 57, 373, 8, 57, 1, 326, 0, 58, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 0, 33, 0, 35, 16, 37, 17, 39, 0, 41, 0, 43, 18, 45, 0, 47, 19, 49, 0, 51, 0, 53, 0, 55, 0, 57, 0, 59, 20, 61, 21, 63, 22, 65, 23, 67, 24, 69, 25, 71, 26, 73, 27, 75, 28, 77, 29, 79, 30, 81, 31, 83, 32, 85, 33, 87, 34, 89, 35, 91, 36, 93, 37, 95, 38, 97, 39, 99, 40, 101, 41, 103, 42, 105, 43, 107, 0, 109, 0, 111, 0, 113, 0, 115, 0, 1, 0, 6, 2, 0, 10, 10, 13, 13, 1, 0, 34, 34, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 2, 0, 46, 46, 95, 95, 2, 0, 9, 9, 32, 32, 380, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 1, 117, 1, 0, 0, 0, 3, 127, 1, 0, 0, 0, 5, 136, 1, 0, 0, 0, 7, 143, 1, 0, 0, 0, 9, 150, 1, 0, 0, 0, 11, 160, 1, 0, 0, 0, 13, 166, 1, 0, 0, 0, 15, 176, 1, 0, 0, 0, 17, 179, 1, 0, 0, 0, 19, 182, 1, 0, 0, 0, 21, 188, 1, 0, 0, 0, 23, 193, 1, 0, 0, 0, 25, 198, 1, 0, 0, 0, 27, 202, 1, 0, 0, 0, 29, 207, 1, 0, 0, 0, 31, 212, 1, 0, 0, 0, 33, 217, 1, 0, 0, 0, 35, 225, 1, 0, 0, 0, 37, 229, 1, 0, 0, 0, 39, 231, 1, 0, 0, 0, 41, 233, 1, 0, 0, 0, 43, 235, 1, 0, 0, 0, 45, 237, 1, 0, 0, 0, 47, 243, 1, 0, 0, 0, 49, 245, 1, 0, 0, 0, 51, 247, 1, 0, 0, 0, 53, 250, 1, 0, 0, 0, 55, 252, 1, 0, 0, 0, 57, 255, 1, 0, 0, 0, 59, 263, 1, 0, 0, 0, 61, 265, 1, 0, 0, 0, 63, 268, 1, 0, 0, 0, 65, 271, 1, 0, 0, 0, 67, 274, 1, 0, 0, 0, 69, 276, 1, 0, 0, 0, 71, 279, 1, 0, 0, 0, 73, 281, 1, 0, 0, 0, 75, 283, 1, 0, 0, 0, 77, 285, 1, 0, 0, 0, 79, 287, 1, 0, 0, 0, 81, 289, 1, 0, 0, 0, 83, 291, 1, 0, 0, 0, 85, 293, 1, 0, 0, 0, 87, 295, 1, 0, 0, 0, 89, 297, 1, 0, 0, 0, 91, 299, 1, 0, 0, 0, 93, 301, 1, 0, 0, 0, 95, 307, 1, 0, 0, 0, 97, 311, 1, 0, 0, 0, 99, 320, 1, 0, 0, 0, 101, 333, 1, 0, 0, 0, 103, 337, 1, 0, 0, 0, 105, 346, 1, 0, 0, 0, 107, 355, 1, 0, 0, 0, 109, 357, 1, 0, 0, 0, 111, 359, 1, 0, 0, 0, 113, 362, 1, 0, 0, 0, 115, 372, 1, 0, 0, 0, 117, 118, 5, 97, 0, 0, 118, 119, 5, 108, 0, 0, 119, 120, 5, 108, 0, 0, 120, 121, 5, 111, 0, 0, 121, 122, 5, 99, 0, 0, 122, 123, 5, 97, 0, 0, 123, 124, 5, 116, 0, 0, 124, 125, 5, 111, 0, 0, 125, 126, 5, 114, 0, 0, 126, 2, 1, 0, 0, 0, 127, 128, 5, 102, 0, 0, 128, 129, 5, 117, 0, 0, 129, 130, 5, 110, 0, 0, 130, 131, 5, 99, 0, 0, 131, 132, 5, 116, 0, 0, 132, 133, 5, 105, 0, 0, 133, 134, 5, 111, 0, 0, 134, 135, 5, 110, 0, 0, 135, 4, 1, 0, 0, 0, 136, 137, 5, 103, 0, 0, 137, 138, 5, 108, 0, 0, 138, 139, 5, 111, 0, 0, 139, 140, 5, 98, 0, 0, 140, 141, 5, 97, 0, 0, 141, 142, 5, 108, 0, 0, 142, 6, 1, 0, 0, 0, 143, 144, 5, 114, 0, 0, 144, 145, 5, 101, 0, 0, 145, 146, 5, 116, 0, 0, 146, 147, 5, 117, 0, 0, 147, 148, 5, 114, 0, 0, 148, 149, 5, 110, 0, 0, 149, 8, 1, 0, 0, 0, 150, 151, 5, 115, 0, 0, 151, 152, 5, 116, 0, 0, 152, 153, 5, 114, 0, 0, 153, 154, 5, 117, 0, 0, 154, 155, 5, 99, 0, 0, 155, 156, 5, 116, 0, 0, 156, 157, 5, 117, 0, 0, 157, 158, 5, 114, 0, 0, 158, 159, 5, 101, 0, 0, 159, 10, 1, 0, 0, 0, 160, 161, 5, 117, 0, 0, 161, 162, 5, 115, 0, 0, 162, 163, 5, 105, 0, 0, 163, 164, 5, 110, 0, 0, 164, 165, 5, 103, 0, 0, 165, 12, 1, 0, 0, 0, 166, 167, 5, 111, 0, 0, 167, 168, 5, 112, 0, 0, 168, 169, 5, 104, 0, 0, 169, 170, 5, 97, 0, 0, 170, 171, 5, 110, 0, 0, 171, 172, 5, 100, 0, 0, 172, 173, 5, 108, 0, 0, 173, 174, 5, 101, 0, 0, 174, 175, 5, 114, 0, 0, 175, 14, 1, 0, 0, 0, 176, 177, 5, 97, 0, 0, 177, 178, 5, 115, 0, 0, 178, 16, 1, 0, 0, 0, 179, 180, 5, 105, 0, 0, 180, 181, 5, 102, 0, 0, 181, 18, 1, 0, 0, 0, 182, 183, 5, 119, 0, 0, 183, 184, 5, 104, 0, 0, 184, 185, 5, 105, 0, 0, 185, 186, 5, 108, 0, 0, 186, 187, 5, 101, 0, 0, 187, 20, 1, 0, 0, 0, 188, 189, 5, 101, 0, 0, 189, 190, 5, 108, 0, 0, 190, 191, 5, 115, 0, 0, 191, 192, 5, 101, 0, 0, 192, 22, 1, 0, 0, 0, 193, 194, 5, 101, 0, 0, 194, 195, 5, 108, 0, 0, 195, 196, 5, 105, 0, 0, 196, 197, 5, 102, 0, 0, 197, 24, 1, 0, 0, 0, 198, 199, 5, 105, 0, 0, 199, 200, 5, 110, 0, 0, 200, 201, 5, 116, 0, 0, 201, 26, 1, 0, 0, 0, 202, 203, 5, 98, 0, 0, 203, 204, 5, 111, 0, 0, 204, 205, 5, 111, 0, 0, 205, 206, 5, 108, 0, 0, 206, 28, 1, 0, 0, 0, 207, 208, 5, 110, 0, 0, 208, 209, 5, 117, 0, 0, 209, 210, 5, 108, 0, 0, 210, 211, 5, 108, 0, 0, 211, 30, 1, 0, 0, 0, 212, 213, 5, 116, 0, 0, 213, 214, 5, 114, 0, 0, 214, 215, 5, 117, 0, 0, 215, 216, 5, 101, 0, 0, 216, 32, 1, 0, 0, 0, 217, 218, 5, 102, 0, 0, 218, 219, 5, 97, 0, 0, 219, 220, 5, 108, 0, 0, 220, 221, 5, 115, 0, 0, 221, 222, 5, 101, 0, 0, 222, 34, 1, 0, 0, 0, 223, 226, 3, 31, 15, 0, 224, 226, 3, 33, 16, 0, 225, 223, 1, 0, 0, 0, 225, 224, 1, 0, 0, 0, 226, 36, 1, 0, 0, 0, 227, 230, 3, 59, 29, 0, 228, 230, 3, 47, 23, 0, 229, 227, 1, 0, 0, 0, 229, 228, 1, 0, 0, 0, 230, 38, 1, 0, 0, 0, 231, 232, 5, 43, 0, 0, 232, 40, 1, 0, 0, 0, 233, 234, 5, 45, 0, 0, 234, 42, 1, 0, 0, 0, 235, 236, 5, 42, 0, 0, 236, 44, 1, 0, 0, 0, 237, 238, 5, 47, 0, 0, 238, 46, 1, 0, 0, 0, 239, 244, 3, 39, 19, 0, 240, 244, 3, 41, 20, 0, 241, 244, 3, 43, 21, 0, 242, 244, 3, 45, 22, 0, 243, 239, 1, 0, 0, 0, 243, 240, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 243, 242, 1, 0, 0, 0, 244, 48, 1, 0, 0, 0, 245, 246, 5, 60, 0, 0, 246, 50, 1, 0, 0, 0, 247, 248, 5, 60, 0, 0, 248, 249, 5, 61, 0, 0, 249, 52, 1, 0, 0, 0, 250, 251, 5, 62, 0, 0, 251, 54, 1, 0, 0, 0, 252, 253, 5, 62, 0, 0, 253, 254, 5, 61, 0, 0, 254, 56, 1, 0, 0, 0, 255, 256, 5, 61, 0, 0, 256, 257, 5, 61, 0, 0, 257, 58, 1, 0, 0, 0, 258, 264, 3, 49, 24, 0, 259, 264, 3, 51, 25, 0, 260, 264, 3, 53, 26, 0, 261, 264, 3, 55, 27, 0, 262, 264, 3, 57, 28, 0, 263, 258, 1, 0, 0, 0, 263, 259, 1, 0, 0, 0, 263, 260, 1, 0, 0, 0, 263, 261, 1, 0, 0, 0, 263, 262, 1, 0, 0, 0, 264, 60, 1, 0, 0, 0, 265, 266, 5, 45, 0, 0, 266, 267, 5, 62, 0, 0, 267, 62, 1, 0, 0, 0, 268, 269, 5, 66, 0, 0, 269, 270, 5, 126, 0, 0, 270, 64, 1, 0, 0, 0, 271, 272, 5, 65, 0, 0, 272, 273, 5, 126, 0, 0, 273, 66, 1, 0, 0, 0, 274, 275, 5, 61, 0, 0, 275, 68, 1, 0, 0, 0, 276, 277, 5, 42, 0, 0, 277, 278, 5, 61, 0, 0, 278, 70, 1, 0, 0, 0, 279, 280, 5, 40, 0, 0, 280, 72, 1, 0, 0, 0, 281, 282, 5, 41, 0, 0, 282, 74, 1, 0, 0, 0, 283, 284, 5, 91, 0, 0, 284, 76, 1, 0, 0, 0, 285, 286, 5, 93, 0, 0, 286, 78, 1, 0, 0, 0, 287, 288, 5, 123, 0, 0, 288, 80, 1, 0, 0, 0, 289, 290, 5, 125, 0, 0, 290, 82, 1, 0, 0, 0, 291, 292, 5, 44, 0, 0, 292, 84, 1, 0, 0, 0, 293, 294, 5, 46, 0, 0, 294, 86, 1, 0, 0, 0, 295, 296, 5, 59, 0, 0, 296, 88, 1, 0, 0, 0, 297, 298, 5, 95, 0, 0, 298, 90, 1, 0, 0, 0, 299, 300, 5, 35, 0, 0, 300, 92, 1, 0, 0, 0, 301, 302, 5, 34, 0, 0, 302, 94, 1, 0, 0, 0, 303, 308, 3, 113, 56, 0, 304, 308, 3, 115, 57, 0, 305, 308, 3, 97, 48, 0, 306, 308, 3, 99, 49, 0, 307, 303, 1, 0, 0, 0, 307, 304, 1, 0, 0, 0, 307, 305, 1, 0, 0, 0, 307, 306, 1, 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 310, 6, 47, 0, 0, 310, 96, 1, 0, 0, 0, 311, 312, 5, 47, 0, 0, 312, 313, 5, 47, 0, 0, 313, 317, 1, 0, 0, 0, 314, 316, 8, 0, 0, 0, 315, 314, 1, 0, 0, 0, 316, 319, 1, 0, 0, 0, 317, 315, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 98, 1, 0, 0, 0, 319, 317, 1, 0, 0, 0, 320, 321, 5, 47, 0, 0, 321, 322, 5, 42, 0, 0, 322, 326, 1, 0, 0, 0, 323, 325, 9, 0, 0, 0, 324, 323, 1, 0, 0, 0, 325, 328, 1, 0, 0, 0, 326, 327, 1, 0, 0, 0, 326, 324, 1, 0, 0, 0, 327, 329, 1, 0, 0, 0, 328, 326, 1, 0, 0, 0, 329, 330, 5, 42, 0, 0, 330, 331, 5, 47, 0, 0, 331, 100, 1, 0, 0, 0, 332, 334, 3, 109, 54, 0, 333, 332, 1, 0, 0, 0, 334, 335, 1, 0, 0, 0, 335, 333, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 102, 1, 0, 0, 0, 337, 341, 3, 93, 46, 0, 338, 340, 8, 1, 0, 0, 339, 338, 1, 0, 0, 0, 340, 343, 1, 0, 0, 0, 341, 339, 1, 0, 0, 0, 341, 342, 1, 0, 0, 0, 342, 344, 1, 0, 0, 0, 343, 341, 1, 0, 0, 0, 344, 345, 3, 93, 46, 0, 345, 104, 1, 0, 0, 0, 346, 352, 3, 107, 53, 0, 347, 351, 3, 107, 53, 0, 348, 351, 3, 101, 50, 0, 349, 351, 3, 89, 44, 0, 350, 347, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 350, 349, 1, 0, 0, 0, 351, 354, 1, 0, 0, 0, 352, 350, 1, 0, 0, 0, 352, 353, 1, 0, 0, 0, 353, 106, 1, 0, 0, 0, 354, 352, 1, 0, 0, 0, 355, 356, 7, 2, 0, 0, 356, 108, 1, 0, 0, 0, 357, 358, 7, 3, 0, 0, 358, 110, 1, 0, 0, 0, 359, 360, 7, 4, 0, 0, 360, 112, 1, 0, 0, 0, 361, 363, 7, 5, 0, 0, 362, 361, 1, 0, 0, 0, 363, 364, 1, 0, 0, 0, 364, 362, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 114, 1, 0, 0, 0, 366, 368, 7, 0, 0, 0, 367, 366, 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 369, 370, 1, 0, 0, 0, 370, 373, 1, 0, 0, 0, 371, 373, 5, 0, 0, 1, 372, 367, 1, 0, 0, 0, 372, 371, 1, 0, 0, 0, 373, 116, 1, 0, 0, 0, 15, 0, 225, 229, 243, 263, 307, 317, 326, 335, 341, 350, 352, 364, 369, 372, 1, 6, 0, 0]
\ No newline at end of file
diff --git a/Crimson/Antlr/Output/CrimsonLexer.tokens b/Crimson/Antlr/Output/CrimsonLexer.tokens
index 8940016..543c367 100644
--- a/Crimson/Antlr/Output/CrimsonLexer.tokens
+++ b/Crimson/Antlr/Output/CrimsonLexer.tokens
@@ -1,80 +1,76 @@
-T__0=1
-T__1=2
-Allocator=3
-Function=4
-Global=5
-Return=6
-Structure=7
-Using=8
-OpHandler=9
-As=10
-If=11
-While=12
-Else=13
-Elif=14
-Integer=15
-Boolean=16
-Null=17
-BooleanValue=18
-Operator=19
-Asterisk=20
-MathsOperator=21
-Comparator=22
-RightArrow=23
-BasicCall=24
-AssemblyCall=25
-DirectEquals=26
-PointerEquals=27
-OpenBracket=28
-CloseBracket=29
-OpenSquare=30
-CloseSquare=31
-OpenBrace=32
-CloseBrace=33
-Comma=34
-Dot=35
-SemiColon=36
-Underscore=37
-Hashtag=38
-Quote=39
-SkipTokens=40
-LineComment=41
-BlockComment=42
-Number=43
-String=44
-ShortName=45
-'\r'=1
-'\n'=2
-'allocator'=3
-'function'=4
-'global'=5
-'return'=6
-'structure'=7
-'using'=8
-'ophandler'=9
-'as'=10
-'if'=11
-'while'=12
-'else'=13
-'elif'=14
-'int'=15
-'bool'=16
-'null'=17
-'*'=20
-'->'=23
-'B~'=24
-'A~'=25
-'='=26
-'*='=27
-'('=28
-')'=29
-'['=30
-']'=31
-'{'=32
-'}'=33
-','=34
-'.'=35
-';'=36
-'_'=37
-'#'=38
-'"'=39
+Allocator=1
+Function=2
+Global=3
+Return=4
+Structure=5
+Using=6
+OpHandler=7
+As=8
+If=9
+While=10
+Else=11
+Elif=12
+Integer=13
+Boolean=14
+Null=15
+BooleanValue=16
+Operator=17
+Asterisk=18
+MathsOperator=19
+Comparator=20
+RightArrow=21
+BasicCall=22
+AssemblyCall=23
+DirectEquals=24
+PointerEquals=25
+OpenBracket=26
+CloseBracket=27
+OpenSquare=28
+CloseSquare=29
+OpenBrace=30
+CloseBrace=31
+Comma=32
+Dot=33
+SemiColon=34
+Underscore=35
+Hashtag=36
+Quote=37
+SkipTokens=38
+LineComment=39
+BlockComment=40
+Number=41
+String=42
+ShortName=43
+'allocator'=1
+'function'=2
+'global'=3
+'return'=4
+'structure'=5
+'using'=6
+'ophandler'=7
+'as'=8
+'if'=9
+'while'=10
+'else'=11
+'elif'=12
+'int'=13
+'bool'=14
+'null'=15
+'*'=18
+'->'=21
+'B~'=22
+'A~'=23
+'='=24
+'*='=25
+'('=26
+')'=27
+'['=28
+']'=29
+'{'=30
+'}'=31
+','=32
+'.'=33
+';'=34
+'_'=35
+'#'=36
+'"'=37
diff --git a/Crimson/Antlr/Output/CrimsonParser.cs b/Crimson/Antlr/Output/CrimsonParser.cs
index a7247f1..364a472 100644
--- a/Crimson/Antlr/Output/CrimsonParser.cs
+++ b/Crimson/Antlr/Output/CrimsonParser.cs
@@ -37,14 +37,14 @@ public partial class CrimsonParser : Parser {
protected static DFA[] decisionToDFA;
protected static PredictionContextCache sharedContextCache = new PredictionContextCache();
public const int
- T__0=1, T__1=2, Allocator=3, Function=4, Global=5, Return=6, Structure=7,
- Using=8, OpHandler=9, As=10, If=11, While=12, Else=13, Elif=14, Integer=15,
- Boolean=16, Null=17, BooleanValue=18, Operator=19, Asterisk=20, MathsOperator=21,
- Comparator=22, RightArrow=23, BasicCall=24, AssemblyCall=25, DirectEquals=26,
- PointerEquals=27, OpenBracket=28, CloseBracket=29, OpenSquare=30, CloseSquare=31,
- OpenBrace=32, CloseBrace=33, Comma=34, Dot=35, SemiColon=36, Underscore=37,
- Hashtag=38, Quote=39, SkipTokens=40, LineComment=41, BlockComment=42,
- Number=43, String=44, ShortName=45;
+ Allocator=1, Function=2, Global=3, Return=4, Structure=5, Using=6, OpHandler=7,
+ As=8, If=9, While=10, Else=11, Elif=12, Integer=13, Boolean=14, Null=15,
+ BooleanValue=16, Operator=17, Asterisk=18, MathsOperator=19, Comparator=20,
+ RightArrow=21, BasicCall=22, AssemblyCall=23, DirectEquals=24, PointerEquals=25,
+ OpenBracket=26, CloseBracket=27, OpenSquare=28, CloseSquare=29, OpenBrace=30,
+ CloseBrace=31, Comma=32, Dot=33, SemiColon=34, Underscore=35, Hashtag=36,
+ Quote=37, SkipTokens=38, LineComment=39, BlockComment=40, Number=41, String=42,
+ ShortName=43;
public const int
RULE_translationUnit = 0, RULE_importUnit = 1, RULE_operationHandler = 2,
RULE_globalStatement = 3, RULE_globalVariableDeclaration = 4, RULE_functionDeclaration = 5,
@@ -67,21 +67,20 @@ public const int
};
private static readonly string[] _LiteralNames = {
- null, "'\\r'", "'\\n'", "'allocator'", "'function'", "'global'", "'return'",
- "'structure'", "'using'", "'ophandler'", "'as'", "'if'", "'while'", "'else'",
- "'elif'", "'int'", "'bool'", "'null'", null, null, "'*'", null, null,
- "'->'", "'B~'", "'A~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'",
- "'}'", "','", "'.'", "';'", "'_'", "'#'", "'\"'"
+ null, "'allocator'", "'function'", "'global'", "'return'", "'structure'",
+ "'using'", "'ophandler'", "'as'", "'if'", "'while'", "'else'", "'elif'",
+ "'int'", "'bool'", "'null'", null, null, "'*'", null, null, "'->'", "'B~'",
+ "'A~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'", "'}'", "','",
+ "'.'", "';'", "'_'", "'#'", "'\"'"
};
private static readonly string[] _SymbolicNames = {
- null, null, null, "Allocator", "Function", "Global", "Return", "Structure",
- "Using", "OpHandler", "As", "If", "While", "Else", "Elif", "Integer",
- "Boolean", "Null", "BooleanValue", "Operator", "Asterisk", "MathsOperator",
- "Comparator", "RightArrow", "BasicCall", "AssemblyCall", "DirectEquals",
- "PointerEquals", "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare",
- "OpenBrace", "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore",
- "Hashtag", "Quote", "SkipTokens", "LineComment", "BlockComment", "Number",
- "String", "ShortName"
+ null, "Allocator", "Function", "Global", "Return", "Structure", "Using",
+ "OpHandler", "As", "If", "While", "Else", "Elif", "Integer", "Boolean",
+ "Null", "BooleanValue", "Operator", "Asterisk", "MathsOperator", "Comparator",
+ "RightArrow", "BasicCall", "AssemblyCall", "DirectEquals", "PointerEquals",
+ "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare", "OpenBrace",
+ "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore", "Hashtag", "Quote",
+ "SkipTokens", "LineComment", "BlockComment", "Number", "String", "ShortName"
};
public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames);
@@ -209,7 +208,7 @@ public TranslationUnitContext translationUnit() {
State = 79;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
- while (((_la) & ~0x3f) == 0 && ((1L << _la) & 176L) != 0) {
+ while (((_la) & ~0x3f) == 0 && ((1L << _la) & 44L) != 0) {
{
{
State = 76;
@@ -739,7 +738,7 @@ public FunctionBodyContext functionBody() {
State = 124;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
- while (((_la) & ~0x3f) == 0 && ((1L << _la) & 35185496397888L) != 0) {
+ while (((_la) & ~0x3f) == 0 && ((1L << _la) & 8796374099472L) != 0) {
{
{
State = 121;
@@ -1582,6 +1581,8 @@ public ElseBlockContext elseBlock() {
public partial class BasicCallContext : ParserRuleContext {
public IToken basicText;
[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BasicCall() { return GetToken(CrimsonParser.BasicCall, 0); }
+ [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SemiColon() { return GetToken(CrimsonParser.SemiColon, 0); }
+ [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode String() { return GetToken(CrimsonParser.String, 0); }
public BasicCallContext(ParserRuleContext parent, int invokingState)
: base(parent, invokingState)
{
@@ -1609,37 +1610,15 @@ public override TResult Accept(IParseTreeVisitor visitor) {
public BasicCallContext basicCall() {
BasicCallContext _localctx = new BasicCallContext(Context, State);
EnterRule(_localctx, 32, RULE_basicCall);
- int _la;
try {
- int _alt;
EnterOuterAlt(_localctx, 1);
{
State = 189;
Match(BasicCall);
- State = 193;
- ErrorHandler.Sync(this);
- _alt = Interpreter.AdaptivePredict(TokenStream,11,Context);
- while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- {
- {
- State = 190;
- _localctx.basicText = TokenStream.LT(1);
- _la = TokenStream.LA(1);
- if ( _la <= 0 || (_la==T__0 || _la==T__1) ) {
- _localctx.basicText = ErrorHandler.RecoverInline(this);
- }
- else {
- ErrorHandler.ReportMatch(this);
- Consume();
- }
- }
- }
- }
- State = 195;
- ErrorHandler.Sync(this);
- _alt = Interpreter.AdaptivePredict(TokenStream,11,Context);
- }
+ State = 190;
+ _localctx.basicText = Match(String);
+ State = 191;
+ Match(SemiColon);
}
}
catch (RecognitionException re) {
@@ -1656,6 +1635,8 @@ public BasicCallContext basicCall() {
public partial class AssemblyCallContext : ParserRuleContext {
public IToken assemblyText;
[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AssemblyCall() { return GetToken(CrimsonParser.AssemblyCall, 0); }
+ [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SemiColon() { return GetToken(CrimsonParser.SemiColon, 0); }
+ [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode String() { return GetToken(CrimsonParser.String, 0); }
public AssemblyCallContext(ParserRuleContext parent, int invokingState)
: base(parent, invokingState)
{
@@ -1683,37 +1664,15 @@ public override TResult Accept(IParseTreeVisitor visitor) {
public AssemblyCallContext assemblyCall() {
AssemblyCallContext _localctx = new AssemblyCallContext(Context, State);
EnterRule(_localctx, 34, RULE_assemblyCall);
- int _la;
try {
- int _alt;
EnterOuterAlt(_localctx, 1);
{
- State = 196;
+ State = 193;
Match(AssemblyCall);
- State = 200;
- ErrorHandler.Sync(this);
- _alt = Interpreter.AdaptivePredict(TokenStream,12,Context);
- while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- {
- {
- State = 197;
- _localctx.assemblyText = TokenStream.LT(1);
- _la = TokenStream.LA(1);
- if ( _la <= 0 || (_la==T__0 || _la==T__1) ) {
- _localctx.assemblyText = ErrorHandler.RecoverInline(this);
- }
- else {
- ErrorHandler.ReportMatch(this);
- Consume();
- }
- }
- }
- }
- State = 202;
- ErrorHandler.Sync(this);
- _alt = Interpreter.AdaptivePredict(TokenStream,12,Context);
- }
+ State = 194;
+ _localctx.assemblyText = Match(String);
+ State = 195;
+ Match(SemiColon);
}
}
catch (RecognitionException re) {
@@ -1766,9 +1725,9 @@ public FunctionCallContext functionCall() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 203;
+ State = 197;
_localctx.name = fullName();
- State = 204;
+ State = 198;
_localctx.args = arguments();
}
}
@@ -1827,37 +1786,37 @@ public ArgumentsContext arguments() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 206;
+ State = 200;
Match(OpenBracket);
- State = 208;
+ State = 202;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
- if (((_la) & ~0x3f) == 0 && ((1L << _la) & 43980465504256L) != 0) {
+ if (((_la) & ~0x3f) == 0 && ((1L << _la) & 10995116376064L) != 0) {
{
- State = 207;
+ State = 201;
simpleValue();
}
}
- State = 214;
+ State = 208;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
while (_la==Comma) {
{
{
- State = 210;
+ State = 204;
Match(Comma);
{
- State = 211;
+ State = 205;
simpleValue();
}
}
}
- State = 216;
+ State = 210;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
}
- State = 217;
+ State = 211;
Match(CloseBracket);
}
}
@@ -1906,26 +1865,26 @@ public FunctionReturnContext functionReturn() {
FunctionReturnContext _localctx = new FunctionReturnContext(Context, State);
EnterRule(_localctx, 40, RULE_functionReturn);
try {
- State = 225;
+ State = 219;
ErrorHandler.Sync(this);
- switch ( Interpreter.AdaptivePredict(TokenStream,15,Context) ) {
+ switch ( Interpreter.AdaptivePredict(TokenStream,13,Context) ) {
case 1:
EnterOuterAlt(_localctx, 1);
{
- State = 219;
+ State = 213;
Match(Return);
- State = 220;
+ State = 214;
simpleValue();
- State = 221;
+ State = 215;
Match(SemiColon);
}
break;
case 2:
EnterOuterAlt(_localctx, 2);
{
- State = 223;
+ State = 217;
Match(Return);
- State = 224;
+ State = 218;
Match(SemiColon);
}
break;
@@ -1982,20 +1941,20 @@ public SimpleValueContext simpleValue() {
EnterRule(_localctx, 42, RULE_simpleValue);
int _la;
try {
- State = 232;
+ State = 226;
ErrorHandler.Sync(this);
switch (TokenStream.LA(1)) {
case ShortName:
EnterOuterAlt(_localctx, 1);
{
- State = 227;
+ State = 221;
_localctx.id = fullName();
- State = 229;
+ State = 223;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
if (_la==Asterisk) {
{
- State = 228;
+ State = 222;
_localctx.pointer = Match(Asterisk);
}
}
@@ -2007,7 +1966,7 @@ public SimpleValueContext simpleValue() {
case Number:
EnterOuterAlt(_localctx, 2);
{
- State = 231;
+ State = 225;
_localctx.raw = rawValue();
}
break;
@@ -2063,20 +2022,20 @@ public ComplexValueContext complexValue() {
ComplexValueContext _localctx = new ComplexValueContext(Context, State);
EnterRule(_localctx, 44, RULE_complexValue);
try {
- State = 236;
+ State = 230;
ErrorHandler.Sync(this);
- switch ( Interpreter.AdaptivePredict(TokenStream,18,Context) ) {
+ switch ( Interpreter.AdaptivePredict(TokenStream,16,Context) ) {
case 1:
EnterOuterAlt(_localctx, 1);
{
- State = 234;
+ State = 228;
_localctx.op = operation();
}
break;
case 2:
EnterOuterAlt(_localctx, 2);
{
- State = 235;
+ State = 229;
_localctx.func = functionCall();
}
break;
@@ -2128,9 +2087,9 @@ public RawValueContext rawValue() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 238;
+ State = 232;
_la = TokenStream.LA(1);
- if ( !(((_la) & ~0x3f) == 0 && ((1L << _la) & 8796093415424L) != 0) ) {
+ if ( !(((_la) & ~0x3f) == 0 && ((1L << _la) & 2199023353856L) != 0) ) {
ErrorHandler.RecoverInline(this);
}
else {
@@ -2191,11 +2150,11 @@ public OperationContext operation() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 240;
+ State = 234;
_localctx.leftValue = simpleValue();
- State = 241;
+ State = 235;
_localctx.@operator = Match(Operator);
- State = 242;
+ State = 236;
_localctx.rightValue = simpleValue();
}
}
@@ -2252,42 +2211,42 @@ public ParameterListContext parameterList() {
EnterRule(_localctx, 50, RULE_parameterList);
int _la;
try {
- State = 257;
+ State = 251;
ErrorHandler.Sync(this);
- switch ( Interpreter.AdaptivePredict(TokenStream,20,Context) ) {
+ switch ( Interpreter.AdaptivePredict(TokenStream,18,Context) ) {
case 1:
EnterOuterAlt(_localctx, 1);
{
- State = 244;
+ State = 238;
Match(OpenBracket);
- State = 245;
+ State = 239;
Match(CloseBracket);
}
break;
case 2:
EnterOuterAlt(_localctx, 2);
{
- State = 246;
+ State = 240;
Match(OpenBracket);
- State = 247;
+ State = 241;
parameter();
- State = 252;
+ State = 246;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
while (_la==Comma) {
{
{
- State = 248;
+ State = 242;
Match(Comma);
- State = 249;
+ State = 243;
parameter();
}
}
- State = 254;
+ State = 248;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
}
- State = 255;
+ State = 249;
Match(CloseBracket);
}
break;
@@ -2343,9 +2302,9 @@ public ParameterContext parameter() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 259;
+ State = 253;
_localctx.t = type();
- State = 260;
+ State = 254;
_localctx.name = fullName();
}
}
@@ -2400,11 +2359,11 @@ public StructureDeclarationContext structureDeclaration() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 262;
+ State = 256;
Match(Structure);
- State = 263;
+ State = 257;
_localctx.name = fullName();
- State = 264;
+ State = 258;
_localctx.body = structureBody();
}
}
@@ -2459,23 +2418,23 @@ public StructureBodyContext structureBody() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 266;
+ State = 260;
Match(OpenBrace);
- State = 270;
+ State = 264;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
- while (((_la) & ~0x3f) == 0 && ((1L << _la) & 35185446060032L) != 0) {
+ while (((_la) & ~0x3f) == 0 && ((1L << _la) & 8796361515008L) != 0) {
{
{
- State = 267;
+ State = 261;
internalVariableDeclaration();
}
}
- State = 272;
+ State = 266;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
}
- State = 273;
+ State = 267;
Match(CloseBrace);
}
}
@@ -2528,41 +2487,41 @@ public TypeContext type() {
TypeContext _localctx = new TypeContext(Context, State);
EnterRule(_localctx, 58, RULE_type);
try {
- State = 280;
+ State = 274;
ErrorHandler.Sync(this);
switch (TokenStream.LA(1)) {
case Integer:
EnterOuterAlt(_localctx, 1);
{
- State = 275;
+ State = 269;
Match(Integer);
}
break;
case Boolean:
EnterOuterAlt(_localctx, 2);
{
- State = 276;
+ State = 270;
Match(Boolean);
}
break;
case ShortName:
EnterOuterAlt(_localctx, 3);
{
- State = 277;
+ State = 271;
fullName();
}
break;
case OpenSquare:
EnterOuterAlt(_localctx, 4);
{
- State = 278;
+ State = 272;
array();
}
break;
case Null:
EnterOuterAlt(_localctx, 5);
{
- State = 279;
+ State = 273;
Match(Null);
}
break;
@@ -2617,11 +2576,11 @@ public ArrayContext array() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 282;
+ State = 276;
Match(OpenSquare);
- State = 283;
+ State = 277;
type();
- State = 284;
+ State = 278;
Match(CloseSquare);
}
}
@@ -2674,19 +2633,19 @@ public FullNameContext fullName() {
try {
EnterOuterAlt(_localctx, 1);
{
- State = 288;
+ State = 282;
ErrorHandler.Sync(this);
- switch ( Interpreter.AdaptivePredict(TokenStream,23,Context) ) {
+ switch ( Interpreter.AdaptivePredict(TokenStream,21,Context) ) {
case 1:
{
- State = 286;
+ State = 280;
_localctx.libraryName = Match(ShortName);
- State = 287;
+ State = 281;
Match(Dot);
}
break;
}
- State = 290;
+ State = 284;
_localctx.memberName = Match(ShortName);
}
}
@@ -2702,7 +2661,7 @@ public FullNameContext fullName() {
}
private static int[] _serializedATN = {
- 4,1,45,293,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,
+ 4,1,43,287,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,
7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,
2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,
2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,
@@ -2715,85 +2674,82 @@ public FullNameContext fullName() {
1,10,1,10,1,10,1,10,3,10,155,8,10,1,10,1,10,1,10,1,10,1,10,1,10,3,10,163,
8,10,1,10,1,10,3,10,167,8,10,1,11,1,11,1,11,1,11,1,11,3,11,174,8,11,1,
12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,15,1,15,1,15,1,
- 16,1,16,5,16,192,8,16,10,16,12,16,195,9,16,1,17,1,17,5,17,199,8,17,10,
- 17,12,17,202,9,17,1,18,1,18,1,18,1,19,1,19,3,19,209,8,19,1,19,1,19,5,19,
- 213,8,19,10,19,12,19,216,9,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,
- 3,20,226,8,20,1,21,1,21,3,21,230,8,21,1,21,3,21,233,8,21,1,22,1,22,3,22,
- 237,8,22,1,23,1,23,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,5,
- 25,251,8,25,10,25,12,25,254,9,25,1,25,1,25,3,25,258,8,25,1,26,1,26,1,26,
- 1,27,1,27,1,27,1,27,1,28,1,28,5,28,269,8,28,10,28,12,28,272,9,28,1,28,
- 1,28,1,29,1,29,1,29,1,29,1,29,3,29,281,8,29,1,30,1,30,1,30,1,30,1,31,1,
- 31,3,31,289,8,31,1,31,1,31,1,31,0,0,32,0,2,4,6,8,10,12,14,16,18,20,22,
- 24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,0,2,1,0,1,
- 2,2,0,17,18,43,43,295,0,67,1,0,0,0,2,84,1,0,0,0,4,91,1,0,0,0,6,107,1,0,
- 0,0,8,109,1,0,0,0,10,112,1,0,0,0,12,117,1,0,0,0,14,120,1,0,0,0,16,139,
- 1,0,0,0,18,141,1,0,0,0,20,166,1,0,0,0,22,168,1,0,0,0,24,175,1,0,0,0,26,
- 179,1,0,0,0,28,183,1,0,0,0,30,186,1,0,0,0,32,189,1,0,0,0,34,196,1,0,0,
- 0,36,203,1,0,0,0,38,206,1,0,0,0,40,225,1,0,0,0,42,232,1,0,0,0,44,236,1,
- 0,0,0,46,238,1,0,0,0,48,240,1,0,0,0,50,257,1,0,0,0,52,259,1,0,0,0,54,262,
- 1,0,0,0,56,266,1,0,0,0,58,280,1,0,0,0,60,282,1,0,0,0,62,288,1,0,0,0,64,
- 66,3,2,1,0,65,64,1,0,0,0,66,69,1,0,0,0,67,65,1,0,0,0,67,68,1,0,0,0,68,
- 73,1,0,0,0,69,67,1,0,0,0,70,72,3,4,2,0,71,70,1,0,0,0,72,75,1,0,0,0,73,
- 71,1,0,0,0,73,74,1,0,0,0,74,79,1,0,0,0,75,73,1,0,0,0,76,78,3,6,3,0,77,
- 76,1,0,0,0,78,81,1,0,0,0,79,77,1,0,0,0,79,80,1,0,0,0,80,82,1,0,0,0,81,
- 79,1,0,0,0,82,83,5,0,0,1,83,1,1,0,0,0,84,85,5,38,0,0,85,86,5,8,0,0,86,
- 87,5,44,0,0,87,88,5,10,0,0,88,89,3,62,31,0,89,90,5,36,0,0,90,3,1,0,0,0,
- 91,92,5,38,0,0,92,93,5,9,0,0,93,94,5,28,0,0,94,95,3,58,29,0,95,96,5,19,
- 0,0,96,97,3,58,29,0,97,98,5,29,0,0,98,99,5,23,0,0,99,100,5,32,0,0,100,
- 101,3,62,31,0,101,102,5,33,0,0,102,103,5,36,0,0,103,5,1,0,0,0,104,108,
- 3,8,4,0,105,108,3,10,5,0,106,108,3,54,27,0,107,104,1,0,0,0,107,105,1,0,
- 0,0,107,106,1,0,0,0,108,7,1,0,0,0,109,110,5,5,0,0,110,111,3,18,9,0,111,
- 9,1,0,0,0,112,113,5,4,0,0,113,114,3,58,29,0,114,115,3,12,6,0,115,116,3,
- 14,7,0,116,11,1,0,0,0,117,118,3,62,31,0,118,119,3,50,25,0,119,13,1,0,0,
- 0,120,124,5,32,0,0,121,123,3,16,8,0,122,121,1,0,0,0,123,126,1,0,0,0,124,
- 122,1,0,0,0,124,125,1,0,0,0,125,127,1,0,0,0,126,124,1,0,0,0,127,128,5,
- 33,0,0,128,15,1,0,0,0,129,140,3,18,9,0,130,140,3,40,20,0,131,140,3,20,
- 10,0,132,133,3,36,18,0,133,134,5,36,0,0,134,140,1,0,0,0,135,140,3,22,11,
- 0,136,140,3,24,12,0,137,140,3,32,16,0,138,140,3,34,17,0,139,129,1,0,0,
- 0,139,130,1,0,0,0,139,131,1,0,0,0,139,132,1,0,0,0,139,135,1,0,0,0,139,
- 136,1,0,0,0,139,137,1,0,0,0,139,138,1,0,0,0,140,17,1,0,0,0,141,142,3,58,
- 29,0,142,143,3,62,31,0,143,146,5,26,0,0,144,147,3,44,22,0,145,147,3,42,
- 21,0,146,144,1,0,0,0,146,145,1,0,0,0,147,148,1,0,0,0,148,149,5,36,0,0,
- 149,19,1,0,0,0,150,151,3,62,31,0,151,154,5,26,0,0,152,155,3,44,22,0,153,
- 155,3,42,21,0,154,152,1,0,0,0,154,153,1,0,0,0,155,156,1,0,0,0,156,157,
- 5,36,0,0,157,167,1,0,0,0,158,159,3,62,31,0,159,162,5,27,0,0,160,163,3,
- 44,22,0,161,163,3,42,21,0,162,160,1,0,0,0,162,161,1,0,0,0,163,164,1,0,
- 0,0,164,165,5,36,0,0,165,167,1,0,0,0,166,150,1,0,0,0,166,158,1,0,0,0,167,
- 21,1,0,0,0,168,169,5,11,0,0,169,170,3,26,13,0,170,173,3,14,7,0,171,174,
- 3,30,15,0,172,174,3,28,14,0,173,171,1,0,0,0,173,172,1,0,0,0,173,174,1,
- 0,0,0,174,23,1,0,0,0,175,176,5,12,0,0,176,177,3,26,13,0,177,178,3,14,7,
- 0,178,25,1,0,0,0,179,180,5,28,0,0,180,181,3,48,24,0,181,182,5,29,0,0,182,
- 27,1,0,0,0,183,184,5,13,0,0,184,185,3,22,11,0,185,29,1,0,0,0,186,187,5,
- 13,0,0,187,188,3,14,7,0,188,31,1,0,0,0,189,193,5,24,0,0,190,192,8,0,0,
- 0,191,190,1,0,0,0,192,195,1,0,0,0,193,191,1,0,0,0,193,194,1,0,0,0,194,
- 33,1,0,0,0,195,193,1,0,0,0,196,200,5,25,0,0,197,199,8,0,0,0,198,197,1,
- 0,0,0,199,202,1,0,0,0,200,198,1,0,0,0,200,201,1,0,0,0,201,35,1,0,0,0,202,
- 200,1,0,0,0,203,204,3,62,31,0,204,205,3,38,19,0,205,37,1,0,0,0,206,208,
- 5,28,0,0,207,209,3,42,21,0,208,207,1,0,0,0,208,209,1,0,0,0,209,214,1,0,
- 0,0,210,211,5,34,0,0,211,213,3,42,21,0,212,210,1,0,0,0,213,216,1,0,0,0,
- 214,212,1,0,0,0,214,215,1,0,0,0,215,217,1,0,0,0,216,214,1,0,0,0,217,218,
- 5,29,0,0,218,39,1,0,0,0,219,220,5,6,0,0,220,221,3,42,21,0,221,222,5,36,
- 0,0,222,226,1,0,0,0,223,224,5,6,0,0,224,226,5,36,0,0,225,219,1,0,0,0,225,
- 223,1,0,0,0,226,41,1,0,0,0,227,229,3,62,31,0,228,230,5,20,0,0,229,228,
- 1,0,0,0,229,230,1,0,0,0,230,233,1,0,0,0,231,233,3,46,23,0,232,227,1,0,
- 0,0,232,231,1,0,0,0,233,43,1,0,0,0,234,237,3,48,24,0,235,237,3,36,18,0,
- 236,234,1,0,0,0,236,235,1,0,0,0,237,45,1,0,0,0,238,239,7,1,0,0,239,47,
- 1,0,0,0,240,241,3,42,21,0,241,242,5,19,0,0,242,243,3,42,21,0,243,49,1,
- 0,0,0,244,245,5,28,0,0,245,258,5,29,0,0,246,247,5,28,0,0,247,252,3,52,
- 26,0,248,249,5,34,0,0,249,251,3,52,26,0,250,248,1,0,0,0,251,254,1,0,0,
- 0,252,250,1,0,0,0,252,253,1,0,0,0,253,255,1,0,0,0,254,252,1,0,0,0,255,
- 256,5,29,0,0,256,258,1,0,0,0,257,244,1,0,0,0,257,246,1,0,0,0,258,51,1,
- 0,0,0,259,260,3,58,29,0,260,261,3,62,31,0,261,53,1,0,0,0,262,263,5,7,0,
- 0,263,264,3,62,31,0,264,265,3,56,28,0,265,55,1,0,0,0,266,270,5,32,0,0,
- 267,269,3,18,9,0,268,267,1,0,0,0,269,272,1,0,0,0,270,268,1,0,0,0,270,271,
- 1,0,0,0,271,273,1,0,0,0,272,270,1,0,0,0,273,274,5,33,0,0,274,57,1,0,0,
- 0,275,281,5,15,0,0,276,281,5,16,0,0,277,281,3,62,31,0,278,281,3,60,30,
- 0,279,281,5,17,0,0,280,275,1,0,0,0,280,276,1,0,0,0,280,277,1,0,0,0,280,
- 278,1,0,0,0,280,279,1,0,0,0,281,59,1,0,0,0,282,283,5,30,0,0,283,284,3,
- 58,29,0,284,285,5,31,0,0,285,61,1,0,0,0,286,287,5,45,0,0,287,289,5,35,
- 0,0,288,286,1,0,0,0,288,289,1,0,0,0,289,290,1,0,0,0,290,291,5,45,0,0,291,
- 63,1,0,0,0,24,67,73,79,107,124,139,146,154,162,166,173,193,200,208,214,
- 225,229,232,236,252,257,270,280,288
+ 16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,19,1,19,3,19,203,
+ 8,19,1,19,1,19,5,19,207,8,19,10,19,12,19,210,9,19,1,19,1,19,1,20,1,20,
+ 1,20,1,20,1,20,1,20,3,20,220,8,20,1,21,1,21,3,21,224,8,21,1,21,3,21,227,
+ 8,21,1,22,1,22,3,22,231,8,22,1,23,1,23,1,24,1,24,1,24,1,24,1,25,1,25,1,
+ 25,1,25,1,25,1,25,5,25,245,8,25,10,25,12,25,248,9,25,1,25,1,25,3,25,252,
+ 8,25,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,28,1,28,5,28,263,8,28,10,28,
+ 12,28,266,9,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,3,29,275,8,29,1,30,1,
+ 30,1,30,1,30,1,31,1,31,3,31,283,8,31,1,31,1,31,1,31,0,0,32,0,2,4,6,8,10,
+ 12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,
+ 60,62,0,1,2,0,15,16,41,41,287,0,67,1,0,0,0,2,84,1,0,0,0,4,91,1,0,0,0,6,
+ 107,1,0,0,0,8,109,1,0,0,0,10,112,1,0,0,0,12,117,1,0,0,0,14,120,1,0,0,0,
+ 16,139,1,0,0,0,18,141,1,0,0,0,20,166,1,0,0,0,22,168,1,0,0,0,24,175,1,0,
+ 0,0,26,179,1,0,0,0,28,183,1,0,0,0,30,186,1,0,0,0,32,189,1,0,0,0,34,193,
+ 1,0,0,0,36,197,1,0,0,0,38,200,1,0,0,0,40,219,1,0,0,0,42,226,1,0,0,0,44,
+ 230,1,0,0,0,46,232,1,0,0,0,48,234,1,0,0,0,50,251,1,0,0,0,52,253,1,0,0,
+ 0,54,256,1,0,0,0,56,260,1,0,0,0,58,274,1,0,0,0,60,276,1,0,0,0,62,282,1,
+ 0,0,0,64,66,3,2,1,0,65,64,1,0,0,0,66,69,1,0,0,0,67,65,1,0,0,0,67,68,1,
+ 0,0,0,68,73,1,0,0,0,69,67,1,0,0,0,70,72,3,4,2,0,71,70,1,0,0,0,72,75,1,
+ 0,0,0,73,71,1,0,0,0,73,74,1,0,0,0,74,79,1,0,0,0,75,73,1,0,0,0,76,78,3,
+ 6,3,0,77,76,1,0,0,0,78,81,1,0,0,0,79,77,1,0,0,0,79,80,1,0,0,0,80,82,1,
+ 0,0,0,81,79,1,0,0,0,82,83,5,0,0,1,83,1,1,0,0,0,84,85,5,36,0,0,85,86,5,
+ 6,0,0,86,87,5,42,0,0,87,88,5,8,0,0,88,89,3,62,31,0,89,90,5,34,0,0,90,3,
+ 1,0,0,0,91,92,5,36,0,0,92,93,5,7,0,0,93,94,5,26,0,0,94,95,3,58,29,0,95,
+ 96,5,17,0,0,96,97,3,58,29,0,97,98,5,27,0,0,98,99,5,21,0,0,99,100,5,30,
+ 0,0,100,101,3,62,31,0,101,102,5,31,0,0,102,103,5,34,0,0,103,5,1,0,0,0,
+ 104,108,3,8,4,0,105,108,3,10,5,0,106,108,3,54,27,0,107,104,1,0,0,0,107,
+ 105,1,0,0,0,107,106,1,0,0,0,108,7,1,0,0,0,109,110,5,3,0,0,110,111,3,18,
+ 9,0,111,9,1,0,0,0,112,113,5,2,0,0,113,114,3,58,29,0,114,115,3,12,6,0,115,
+ 116,3,14,7,0,116,11,1,0,0,0,117,118,3,62,31,0,118,119,3,50,25,0,119,13,
+ 1,0,0,0,120,124,5,30,0,0,121,123,3,16,8,0,122,121,1,0,0,0,123,126,1,0,
+ 0,0,124,122,1,0,0,0,124,125,1,0,0,0,125,127,1,0,0,0,126,124,1,0,0,0,127,
+ 128,5,31,0,0,128,15,1,0,0,0,129,140,3,18,9,0,130,140,3,40,20,0,131,140,
+ 3,20,10,0,132,133,3,36,18,0,133,134,5,34,0,0,134,140,1,0,0,0,135,140,3,
+ 22,11,0,136,140,3,24,12,0,137,140,3,32,16,0,138,140,3,34,17,0,139,129,
+ 1,0,0,0,139,130,1,0,0,0,139,131,1,0,0,0,139,132,1,0,0,0,139,135,1,0,0,
+ 0,139,136,1,0,0,0,139,137,1,0,0,0,139,138,1,0,0,0,140,17,1,0,0,0,141,142,
+ 3,58,29,0,142,143,3,62,31,0,143,146,5,24,0,0,144,147,3,44,22,0,145,147,
+ 3,42,21,0,146,144,1,0,0,0,146,145,1,0,0,0,147,148,1,0,0,0,148,149,5,34,
+ 0,0,149,19,1,0,0,0,150,151,3,62,31,0,151,154,5,24,0,0,152,155,3,44,22,
+ 0,153,155,3,42,21,0,154,152,1,0,0,0,154,153,1,0,0,0,155,156,1,0,0,0,156,
+ 157,5,34,0,0,157,167,1,0,0,0,158,159,3,62,31,0,159,162,5,25,0,0,160,163,
+ 3,44,22,0,161,163,3,42,21,0,162,160,1,0,0,0,162,161,1,0,0,0,163,164,1,
+ 0,0,0,164,165,5,34,0,0,165,167,1,0,0,0,166,150,1,0,0,0,166,158,1,0,0,0,
+ 167,21,1,0,0,0,168,169,5,9,0,0,169,170,3,26,13,0,170,173,3,14,7,0,171,
+ 174,3,30,15,0,172,174,3,28,14,0,173,171,1,0,0,0,173,172,1,0,0,0,173,174,
+ 1,0,0,0,174,23,1,0,0,0,175,176,5,10,0,0,176,177,3,26,13,0,177,178,3,14,
+ 7,0,178,25,1,0,0,0,179,180,5,26,0,0,180,181,3,48,24,0,181,182,5,27,0,0,
+ 182,27,1,0,0,0,183,184,5,11,0,0,184,185,3,22,11,0,185,29,1,0,0,0,186,187,
+ 5,11,0,0,187,188,3,14,7,0,188,31,1,0,0,0,189,190,5,22,0,0,190,191,5,42,
+ 0,0,191,192,5,34,0,0,192,33,1,0,0,0,193,194,5,23,0,0,194,195,5,42,0,0,
+ 195,196,5,34,0,0,196,35,1,0,0,0,197,198,3,62,31,0,198,199,3,38,19,0,199,
+ 37,1,0,0,0,200,202,5,26,0,0,201,203,3,42,21,0,202,201,1,0,0,0,202,203,
+ 1,0,0,0,203,208,1,0,0,0,204,205,5,32,0,0,205,207,3,42,21,0,206,204,1,0,
+ 0,0,207,210,1,0,0,0,208,206,1,0,0,0,208,209,1,0,0,0,209,211,1,0,0,0,210,
+ 208,1,0,0,0,211,212,5,27,0,0,212,39,1,0,0,0,213,214,5,4,0,0,214,215,3,
+ 42,21,0,215,216,5,34,0,0,216,220,1,0,0,0,217,218,5,4,0,0,218,220,5,34,
+ 0,0,219,213,1,0,0,0,219,217,1,0,0,0,220,41,1,0,0,0,221,223,3,62,31,0,222,
+ 224,5,18,0,0,223,222,1,0,0,0,223,224,1,0,0,0,224,227,1,0,0,0,225,227,3,
+ 46,23,0,226,221,1,0,0,0,226,225,1,0,0,0,227,43,1,0,0,0,228,231,3,48,24,
+ 0,229,231,3,36,18,0,230,228,1,0,0,0,230,229,1,0,0,0,231,45,1,0,0,0,232,
+ 233,7,0,0,0,233,47,1,0,0,0,234,235,3,42,21,0,235,236,5,17,0,0,236,237,
+ 3,42,21,0,237,49,1,0,0,0,238,239,5,26,0,0,239,252,5,27,0,0,240,241,5,26,
+ 0,0,241,246,3,52,26,0,242,243,5,32,0,0,243,245,3,52,26,0,244,242,1,0,0,
+ 0,245,248,1,0,0,0,246,244,1,0,0,0,246,247,1,0,0,0,247,249,1,0,0,0,248,
+ 246,1,0,0,0,249,250,5,27,0,0,250,252,1,0,0,0,251,238,1,0,0,0,251,240,1,
+ 0,0,0,252,51,1,0,0,0,253,254,3,58,29,0,254,255,3,62,31,0,255,53,1,0,0,
+ 0,256,257,5,5,0,0,257,258,3,62,31,0,258,259,3,56,28,0,259,55,1,0,0,0,260,
+ 264,5,30,0,0,261,263,3,18,9,0,262,261,1,0,0,0,263,266,1,0,0,0,264,262,
+ 1,0,0,0,264,265,1,0,0,0,265,267,1,0,0,0,266,264,1,0,0,0,267,268,5,31,0,
+ 0,268,57,1,0,0,0,269,275,5,13,0,0,270,275,5,14,0,0,271,275,3,62,31,0,272,
+ 275,3,60,30,0,273,275,5,15,0,0,274,269,1,0,0,0,274,270,1,0,0,0,274,271,
+ 1,0,0,0,274,272,1,0,0,0,274,273,1,0,0,0,275,59,1,0,0,0,276,277,5,28,0,
+ 0,277,278,3,58,29,0,278,279,5,29,0,0,279,61,1,0,0,0,280,281,5,43,0,0,281,
+ 283,5,33,0,0,282,280,1,0,0,0,282,283,1,0,0,0,283,284,1,0,0,0,284,285,5,
+ 43,0,0,285,63,1,0,0,0,22,67,73,79,107,124,139,146,154,162,166,173,202,
+ 208,219,223,226,230,246,251,264,274,282
};
public static readonly ATN _ATN =
diff --git a/Crimson/CSharp/Core/TranslationUnitVisitor.cs b/Crimson/CSharp/Core/TranslationUnitVisitor.cs
index c904d4a..a10bfaf 100644
--- a/Crimson/CSharp/Core/TranslationUnitVisitor.cs
+++ b/Crimson/CSharp/Core/TranslationUnitVisitor.cs
@@ -345,15 +345,15 @@ public override OperationResolvableValueCToken VisitOperation([NotNull] CrimsonP
public override BasicCallCStatement VisitBasicCall ([NotNull] CrimsonParser.BasicCallContext context)
{
- string assemblyText = context.basicText.Text;
- BasicCallCStatement call = new BasicCallCStatement(assemblyText);
+ string basicText = context.basicText.Text;
+ BasicCallCStatement call = new BasicCallCStatement(basicText.Replace("\"", ""));
return call;
}
public override AssemblyCallCStatement VisitAssemblyCall([NotNull] CrimsonParser.AssemblyCallContext context)
{
string assemblyText = context.assemblyText.Text;
- AssemblyCallCStatement call = new AssemblyCallCStatement(assemblyText);
+ AssemblyCallCStatement call = new AssemblyCallCStatement(assemblyText.Replace("\"", ""));
return call;
}
diff --git a/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs
index 37e0eef..aad2b38 100644
--- a/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs
@@ -13,7 +13,7 @@ public AssemblyCallCStatement(string assemblyText)
this.assemblyText = assemblyText;
}
- public Fragment GetCrimsonBasic()
+ public override Fragment GetCrimsonBasic()
{
Fragment f = new Fragment(0);
f.Add(new AssemblyBStatement(assemblyText));
diff --git a/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs
index de766b6..0897c47 100644
--- a/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs
@@ -13,10 +13,10 @@ public BasicCallCStatement (string assemblyText)
AssemblyText = assemblyText;
}
- public Fragment GetCrimsonBasic()
+ public override Fragment GetCrimsonBasic()
{
Fragment f = new Fragment(0);
- f.Add(new CommentBStatement("BasicCallCStatement: " + AssemblyText));
+ f.Add(new ArbitraryBStatement(AssemblyText));
return f;
}
diff --git a/Crimson/Resources/Test Compilations/main.crm b/Crimson/Resources/Test Compilations/main.crm
index ad9748b..5a369b2 100644
--- a/Crimson/Resources/Test Compilations/main.crm
+++ b/Crimson/Resources/Test Compilations/main.crm
@@ -14,8 +14,8 @@ global int counter = 0;
function ptr main () {
- B~ example basic call;
- A~ example assemby call;
+ B~ "example basic call";
+ A~ "example assemby call";
int a = utils.multiply(8);
int b = utils.times();
@@ -40,7 +40,7 @@ function ptr main () {
stdout.write(i);
ptr ret = heap.alloc(4);
- ret *= utils.utils.multiply(i, 5);
+ ret *= utils.multiply(i, 5);
return ret;
}
diff --git a/Crimson/Resources/Test Compilations/result/main.cba b/Crimson/Resources/Test Compilations/result/main.cba
index b2e9730..73f044f 100644
--- a/Crimson/Resources/Test Compilations/result/main.cba
+++ b/Crimson/Resources/Test Compilations/result/main.cba
@@ -17,11 +17,59 @@ set gvar_counter_0, -1, 0;
// (Structures shouldn't be a part of CB)
// ============================== Structures ==============================
+// GlobalC:stru_Person_0
// ============================== Entry Function ==============================
:func_main_0:
stack push_frame ;
- // Crimson.CSharp.Grammar.Statements.BasicCallCStatement: linked=False
+ example basic call
+ ~A "example assemby call"
+ // Function Call
+ stack allocate a 666;
+ set a, -1, ;
+ // Function Call
+ stack allocate b 666;
+ set b, -1, ;
+
+ jeq c_r_h 0 NEXT_ELIF
+ // 5
+ jump END_branch_0
+
+ jeq c_r_h 0 NEXT_ELIF
+ // Function Call
+ stack allocate c 666;
+ set c, -1, ;
+ // Function Call
+ stack allocate d 666;
+ set d, -1, ;
+ jump END_branch_1
+
+ :ELSE:
+ return;
+ :END_branch_1:
+
+ :END_branch_0:
+
+ // arg0=4
+ // arg1=7
+ // arg2=5
+ jump call
+ register set REG_RETURN rval_0
+ set rval_0, -1, FUNC_RETURN;
+ // Function Call
+ stack allocate i 666;
+ set i, -1, ;
+ // 4
+ // arg0=i
+ jump stdout.write
+ register set REG_RETURN rval_1
+ set rval_1, -1, FUNC_RETURN;
+ // Function Call
+ stack allocate ret 666;
+ set ret, -1, ;
+ // Function Call
+ set ret, -1, VAR_ASSIGN_C_VAL;
+ return;
stack pop_frame ;
return;
@@ -31,8 +79,8 @@ return;
stack push_frame ;
// arg0=6
jump utils_stdout.write
- register set REG_RETURN rval_0
- set rval_0, -1, FUNC_RETURN;
+ register set REG_RETURN rval_2
+ set rval_2, -1, FUNC_RETURN;
return;
stack pop_frame ;
return;
@@ -72,26 +120,26 @@ stack push_frame ;
set exponential_offset, -1, 4;
jeq c_r_h 0 NEXT_ELIF
- jump END_branch_0
+ jump END_branch_2
jeq c_r_h 0 NEXT_ELIF
// 1
- jump END_branch_1
+ jump END_branch_3
jeq c_r_h 0 NEXT_ELIF
// 2
- jump END_branch_2
+ jump END_branch_4
:ELSE:
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
- :END_branch_2:
+ :END_branch_4:
- :END_branch_1:
+ :END_branch_3:
- :END_branch_0:
+ :END_branch_2:
// Operation
stack allocate HO_EXP 666;
@@ -116,8 +164,8 @@ stack push_frame ;
// arg0=r
jump freeregion
- register set REG_RETURN rval_1
- set rval_1, -1, FUNC_RETURN;
+ register set REG_RETURN rval_3
+ set rval_3, -1, FUNC_RETURN;
stack pop_frame ;
return;
@@ -136,3 +184,12 @@ stack push_frame ;
stack pop_frame ;
return;
+:func_call_0:
+stack push_frame ;
+ // Function Call
+ stack allocate test 666;
+ set test, -1, ;
+ return;
+stack pop_frame ;
+return;
+
diff --git a/CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs b/CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs
new file mode 100644
index 0000000..5bac593
--- /dev/null
+++ b/CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs
@@ -0,0 +1,17 @@
+namespace CrimsonBasic.CSharp.Statements
+{
+ public class ArbitraryBStatement : BasicStatement
+ {
+ public string Text { get; protected set; }
+
+ public ArbitraryBStatement (string text)
+ {
+ Text = text;
+ }
+
+ public override string ToString()
+ {
+ return Text;
+ }
+ }
+}
\ No newline at end of file
diff --git a/CrimsonBasic/CSharp/Statements/AssemblyBStatement.cs b/CrimsonBasic/CSharp/Statements/AssemblyBStatement.cs
index 5834cc2..bf9474f 100644
--- a/CrimsonBasic/CSharp/Statements/AssemblyBStatement.cs
+++ b/CrimsonBasic/CSharp/Statements/AssemblyBStatement.cs
@@ -2,16 +2,16 @@
{
public class AssemblyBStatement : BasicStatement
{
- private string _text;
+ public string Text { get; protected set; }
public AssemblyBStatement(string text)
{
- _text = text;
+ Text = text;
}
public override string ToString()
{
- throw new NotImplementedException();
+ return $"~A \"{Text}\"";
}
}
}
\ No newline at end of file
diff --git a/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml b/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml
index bf2bbd9..2a2be00 100644
--- a/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml
+++ b/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml
@@ -29,10 +29,10 @@
set
jump
register
-
+ ~A
- 00: 01 02: 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
+ 00: 01 02: 03" 04 05" 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
@@ -44,7 +44,7 @@
-
+
@@ -52,7 +52,7 @@
-
+
From ed30e9ab9acc97aad8bbfe2288bea18505d49177 Mon Sep 17 00:00:00 2001
From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com>
Date: Mon, 27 Feb 2023 20:38:28 +0000
Subject: [PATCH 004/122] Replaced Register and StackBStatements
- RegisterBStatement
- StackBStatement
+ Push/PopSfBStatement
+ RegSetBStatement
---
Crimson/CSharp/Core/TranslationUnitVisitor.cs | 17 ---
.../Grammar/Statements/FunctionCStatement.cs | 4 +-
.../Statements/FunctionCallCStatement.cs | 2 +-
.../Statements/GlobalVariableCStatement.cs | 4 +-
.../Statements/InternalVariableCStatement.cs | 4 +-
.../Test Compilations/result/main.cba | 134 +++++++++---------
.../CSharp/Statements/DecSpBStatement.cs | 23 +++
.../CSharp/Statements/IncSpBStatement.cs | 23 +++
.../CSharp/Statements/PopSfBStatement.cs | 21 +++
.../CSharp/Statements/PushSfBStatement.cs | 21 +++
.../CSharp/Statements/RegSetBStatement.cs | 25 ++++
.../CSharp/Statements/RegisterBStatement.cs | 31 ----
.../CSharp/Statements/SetBStatement.cs | 2 +-
.../CSharp/Statements/StackBStatement.cs | 33 -----
.../Resources/CrimsonBasicNotepad++.xml | 10 +-
15 files changed, 193 insertions(+), 161 deletions(-)
create mode 100644 CrimsonBasic/CSharp/Statements/DecSpBStatement.cs
create mode 100644 CrimsonBasic/CSharp/Statements/IncSpBStatement.cs
create mode 100644 CrimsonBasic/CSharp/Statements/PopSfBStatement.cs
create mode 100644 CrimsonBasic/CSharp/Statements/PushSfBStatement.cs
create mode 100644 CrimsonBasic/CSharp/Statements/RegSetBStatement.cs
delete mode 100644 CrimsonBasic/CSharp/Statements/RegisterBStatement.cs
delete mode 100644 CrimsonBasic/CSharp/Statements/StackBStatement.cs
diff --git a/Crimson/CSharp/Core/TranslationUnitVisitor.cs b/Crimson/CSharp/Core/TranslationUnitVisitor.cs
index a10bfaf..2b10896 100644
--- a/Crimson/CSharp/Core/TranslationUnitVisitor.cs
+++ b/Crimson/CSharp/Core/TranslationUnitVisitor.cs
@@ -357,23 +357,6 @@ public override AssemblyCallCStatement VisitAssemblyCall([NotNull] CrimsonParser
return call;
}
-/* public MemoryAllocationCStatement VisitAllocateMemory([NotNull] CrimsonParser.AllocateMemoryContext context)
- {
- string identifier = context.Identifier().GetText();
- string numberText = context.Number().GetText();
- int number;
- try
- {
- number = Int32.Parse(numberText);
- }
- catch (FormatException f)
- {
- throw new StatementParseException("Failed to parse string->int " + numberText + " while allocating memory for " + identifier, f);
- }
- MemoryAllocationCStatement allocation = new MemoryAllocationCStatement(identifier, number);
- return allocation;
- }
-*/
public override IList VisitArguments([NotNull] CrimsonParser.ArgumentsContext context)
{
IList arguments = new List();
diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs
index 021d310..de3d51e 100644
--- a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs
@@ -49,7 +49,7 @@ public Fragment GetCrimsonBasic()
Fragment functionHead = new Fragment(0);
functionHead.Add(new LabelBStatement(Name.ToString()));
- functionHead.Add(new StackBStatement(StackBStatement.StackOperation.PUSH_FRAME));
+ functionHead.Add(new PushSfBStatement());
Fragment functionBody = new Fragment(1);
foreach (var s in Statements)
@@ -58,7 +58,7 @@ public Fragment GetCrimsonBasic()
}
Fragment functionFoot = new Fragment(0);
- functionFoot.Add(new StackBStatement(StackBStatement.StackOperation.POP_FRAME));
+ functionFoot.Add(new PushSfBStatement());
functionFoot.Add(new ReturnBStatement());
functionFoot.Add(new CommentBStatement(""));
diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs
index 6fe8ba9..34f5f1e 100644
--- a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs
@@ -63,7 +63,7 @@ public override Fragment GetCrimsonBasic()
// Store result
string returnName = FlattenerHelper.GetUniqueResolvableValueFieldName();
- f.Add(new RegisterBStatement(RegisterBStatement.RegisterOperation.SET, "REG_RETURN", returnName));
+ f.Add(new RegSetBStatement("REG_RETURN", returnName));
f.Add(new SetBStatement(returnName, -1, FUNCTION_RETURN_VARIABLE_NAME));
f.ResultHolder = returnName;
diff --git a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs
index ed476c1..730185d 100644
--- a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs
@@ -49,13 +49,13 @@ public override Fragment GetCrimsonBasic()
{
Fragment valueStatements = Complex.GetBasicFragment();
statements.Add(valueStatements);
- statements.Add(new StackBStatement(StackBStatement.StackOperation.ALLOCATE, Name.ToString(), type.GetByteSize().ToString()));
+ statements.Add(new IncSpBStatement(type.GetByteSize()));
statements.Add(new SetBStatement(Name.ToString(), -1, valueStatements.ResultHolder!));
}
else if (Simple != null)
{
- statements.Add(new StackBStatement(StackBStatement.StackOperation.ALLOCATE, Name.ToString(), type.GetByteSize().ToString()));
+ statements.Add(new IncSpBStatement(type.GetByteSize()));
statements.Add(new SetBStatement(Name.ToString(), -1, Simple.GetText()));
}
else
diff --git a/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs
index 31550cb..2e04aa8 100644
--- a/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs
@@ -59,13 +59,13 @@ public override Fragment GetCrimsonBasic()
{
Fragment valueStatements = Complex.GetBasicFragment();
statements.Add(valueStatements);
- statements.Add(new StackBStatement(StackBStatement.StackOperation.ALLOCATE, Identifier.ToString(), type.GetByteSize().ToString()));
+ statements.Add(new IncSpBStatement(type.GetByteSize()));
statements.Add(new SetBStatement(Identifier.ToString(), -1, valueStatements.ResultHolder!));
}
else if (Simple != null)
{
- statements.Add(new StackBStatement(StackBStatement.StackOperation.ALLOCATE, Identifier.ToString(), type.GetByteSize().ToString()));
+ statements.Add(new IncSpBStatement(type.GetByteSize()));
statements.Add(new SetBStatement(Identifier.ToString(), -1, Simple.GetText()));
}
else
diff --git a/Crimson/Resources/Test Compilations/result/main.cba b/Crimson/Resources/Test Compilations/result/main.cba
index 73f044f..e5a4d7f 100644
--- a/Crimson/Resources/Test Compilations/result/main.cba
+++ b/Crimson/Resources/Test Compilations/result/main.cba
@@ -6,14 +6,14 @@
// ============================== Global Variables ==============================
-stack allocate gvar_regions_i_0 666;
-set gvar_regions_i_0, -1, 0;
-stack allocate gvar_regions_length_0 666;
-set gvar_regions_length_0, -1, 0;
-stack allocate gvar_regions_region_0 666;
-set gvar_regions_region_0, -1, 0;
-stack allocate gvar_counter_0 666;
-set gvar_counter_0, -1, 0;
+inc_sp 666;
+var_set gvar_regions_i_0, -1, 0;
+inc_sp 666;
+var_set gvar_regions_length_0, -1, 0;
+inc_sp 666;
+var_set gvar_regions_region_0, -1, 0;
+inc_sp 666;
+var_set gvar_counter_0, -1, 0;
// (Structures shouldn't be a part of CB)
// ============================== Structures ==============================
@@ -21,15 +21,15 @@ set gvar_counter_0, -1, 0;
// ============================== Entry Function ==============================
:func_main_0:
-stack push_frame ;
+push_sf;
example basic call
~A "example assemby call"
// Function Call
- stack allocate a 666;
- set a, -1, ;
+ inc_sp 666;
+ var_set a, -1, ;
// Function Call
- stack allocate b 666;
- set b, -1, ;
+ inc_sp 666;
+ var_set b, -1, ;
jeq c_r_h 0 NEXT_ELIF
// 5
@@ -37,11 +37,11 @@ stack push_frame ;
jeq c_r_h 0 NEXT_ELIF
// Function Call
- stack allocate c 666;
- set c, -1, ;
+ inc_sp 666;
+ var_set c, -1, ;
// Function Call
- stack allocate d 666;
- set d, -1, ;
+ inc_sp 666;
+ var_set d, -1, ;
jump END_branch_1
:ELSE:
@@ -54,70 +54,70 @@ stack push_frame ;
// arg1=7
// arg2=5
jump call
- register set REG_RETURN rval_0
- set rval_0, -1, FUNC_RETURN;
+ reg_set REG_RETURN rval_0
+ var_set rval_0, -1, FUNC_RETURN;
// Function Call
- stack allocate i 666;
- set i, -1, ;
+ inc_sp 666;
+ var_set i, -1, ;
// 4
// arg0=i
jump stdout.write
- register set REG_RETURN rval_1
- set rval_1, -1, FUNC_RETURN;
+ reg_set REG_RETURN rval_1
+ var_set rval_1, -1, FUNC_RETURN;
// Function Call
- stack allocate ret 666;
- set ret, -1, ;
+ inc_sp 666;
+ var_set ret, -1, ;
// Function Call
- set ret, -1, VAR_ASSIGN_C_VAL;
+ var_set ret, -1, VAR_ASSIGN_C_VAL;
return;
-stack pop_frame ;
+push_sf;
return;
// ============================== Functions ==============================
:func_multiply_0:
-stack push_frame ;
+push_sf;
// arg0=6
jump utils_stdout.write
- register set REG_RETURN rval_2
- set rval_2, -1, FUNC_RETURN;
+ reg_set REG_RETURN rval_2
+ var_set rval_2, -1, FUNC_RETURN;
return;
-stack pop_frame ;
+push_sf;
return;
:func_times_0:
-stack push_frame ;
+push_sf;
// Function Call
- stack allocate ret 666;
- set ret, -1, ;
+ inc_sp 666;
+ var_set ret, -1, ;
return;
-stack pop_frame ;
+push_sf;
return;
:func_write_0:
-stack push_frame ;
-stack pop_frame ;
+push_sf;
+push_sf;
return;
:func_alloc_0:
-stack push_frame ;
- stack allocate i 666;
- set i, -1, 0;
+push_sf;
+ inc_sp 666;
+ var_set i, -1, 0;
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
return;
-stack pop_frame ;
+push_sf;
return;
:func_get_region_ptr_0:
-stack push_frame ;
+push_sf;
// Operation
- stack allocate RRMS 666;
- set RRMS, -1, ;
- stack allocate exponential_offset 666;
- set exponential_offset, -1, 4;
+ inc_sp 666;
+ var_set RRMS, -1, ;
+ inc_sp 666;
+ var_set exponential_offset, -1, 4;
jeq c_r_h 0 NEXT_ELIF
jump END_branch_2
@@ -142,54 +142,54 @@ stack push_frame ;
:END_branch_2:
// Operation
- stack allocate HO_EXP 666;
- set HO_EXP, -1, ;
+ inc_sp 666;
+ var_set HO_EXP, -1, ;
// Operation
- stack allocate HO_EXP_RRMS 666;
- set HO_EXP_RRMS, -1, ;
+ inc_sp 666;
+ var_set HO_EXP_RRMS, -1, ;
return;
-stack pop_frame ;
+push_sf;
return;
:func_freeptr_0:
-stack push_frame ;
- stack allocate r 666;
- set r, -1, 0;
+push_sf;
+ inc_sp 666;
+ var_set r, -1, 0;
// Function Call
- stack allocate region_ptr 666;
- set region_ptr, -1, ;
+ inc_sp 666;
+ var_set region_ptr, -1, ;
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
// arg0=r
jump freeregion
- register set REG_RETURN rval_3
- set rval_3, -1, FUNC_RETURN;
-stack pop_frame ;
+ reg_set REG_RETURN rval_3
+ var_set rval_3, -1, FUNC_RETURN;
+push_sf;
return;
:func_freeregion_0:
-stack push_frame ;
+push_sf;
// 0
-stack pop_frame ;
+push_sf;
return;
:func_pwr_0:
-stack push_frame ;
+push_sf;
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
-stack pop_frame ;
+push_sf;
return;
:func_call_0:
-stack push_frame ;
+push_sf;
// Function Call
- stack allocate test 666;
- set test, -1, ;
+ inc_sp 666;
+ var_set test, -1, ;
return;
-stack pop_frame ;
+push_sf;
return;
diff --git a/CrimsonBasic/CSharp/Statements/DecSpBStatement.cs b/CrimsonBasic/CSharp/Statements/DecSpBStatement.cs
new file mode 100644
index 0000000..d00718b
--- /dev/null
+++ b/CrimsonBasic/CSharp/Statements/DecSpBStatement.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CrimsonBasic.CSharp.Statements
+{
+ public class DecSpBStatement : BasicStatement
+ {
+ public int Amount { get; set; }
+
+ public DecSpBStatement (int amount)
+ {
+ Amount = amount;
+ }
+
+ public override string ToString()
+ {
+ return $"dec_sp {Amount};";
+ }
+ }
+}
diff --git a/CrimsonBasic/CSharp/Statements/IncSpBStatement.cs b/CrimsonBasic/CSharp/Statements/IncSpBStatement.cs
new file mode 100644
index 0000000..f2c2aa7
--- /dev/null
+++ b/CrimsonBasic/CSharp/Statements/IncSpBStatement.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CrimsonBasic.CSharp.Statements
+{
+ public class IncSpBStatement : BasicStatement
+ {
+ public int Amount { get; set; }
+
+ public IncSpBStatement (int amount)
+ {
+ Amount = amount;
+ }
+
+ public override string ToString()
+ {
+ return $"inc_sp {Amount};";
+ }
+ }
+}
diff --git a/CrimsonBasic/CSharp/Statements/PopSfBStatement.cs b/CrimsonBasic/CSharp/Statements/PopSfBStatement.cs
new file mode 100644
index 0000000..0d84f63
--- /dev/null
+++ b/CrimsonBasic/CSharp/Statements/PopSfBStatement.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CrimsonBasic.CSharp.Statements
+{
+ public class PopSfBStatement : BasicStatement
+ {
+
+ public PopSfBStatement ()
+ {
+ }
+
+ public override string ToString()
+ {
+ return $"pop_sf;";
+ }
+ }
+}
diff --git a/CrimsonBasic/CSharp/Statements/PushSfBStatement.cs b/CrimsonBasic/CSharp/Statements/PushSfBStatement.cs
new file mode 100644
index 0000000..d34af9f
--- /dev/null
+++ b/CrimsonBasic/CSharp/Statements/PushSfBStatement.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CrimsonBasic.CSharp.Statements
+{
+ public class PushSfBStatement : BasicStatement
+ {
+
+ public PushSfBStatement()
+ {
+ }
+
+ public override string ToString()
+ {
+ return $"push_sf;";
+ }
+ }
+}
diff --git a/CrimsonBasic/CSharp/Statements/RegSetBStatement.cs b/CrimsonBasic/CSharp/Statements/RegSetBStatement.cs
new file mode 100644
index 0000000..4e5853c
--- /dev/null
+++ b/CrimsonBasic/CSharp/Statements/RegSetBStatement.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CrimsonBasic.CSharp.Statements
+{
+ public class RegSetBStatement : BasicStatement
+ {
+ public string Register { get; set; }
+ public string Value { get; set; }
+
+ public RegSetBStatement(string register, string value)
+ {
+ Register = register;
+ Value = value;
+ }
+
+ public override string ToString()
+ {
+ return $"reg_set {Register} {Value}";
+ }
+ }
+}
diff --git a/CrimsonBasic/CSharp/Statements/RegisterBStatement.cs b/CrimsonBasic/CSharp/Statements/RegisterBStatement.cs
deleted file mode 100644
index 2a0ed44..0000000
--- a/CrimsonBasic/CSharp/Statements/RegisterBStatement.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CrimsonBasic.CSharp.Statements
-{
- public class RegisterBStatement : BasicStatement
- {
- private RegisterOperation _operation;
- private string[] _arguments;
-
- public RegisterBStatement(RegisterOperation operation, params string[] arguments)
- {
- _operation = operation;
- _arguments = arguments;
- }
-
- public override string ToString()
- {
- return $"register {_operation.ToString().ToLower()} {string.Join(' ', _arguments)}";
- }
-
- public enum RegisterOperation
- {
- SET,
- MOVE
- }
- }
-}
diff --git a/CrimsonBasic/CSharp/Statements/SetBStatement.cs b/CrimsonBasic/CSharp/Statements/SetBStatement.cs
index d213d10..f2e6d0f 100644
--- a/CrimsonBasic/CSharp/Statements/SetBStatement.cs
+++ b/CrimsonBasic/CSharp/Statements/SetBStatement.cs
@@ -22,7 +22,7 @@ public SetBStatement(string name, int size, string value)
public override string ToString()
{
- return $"set {Name}, {Size}, {Value};";
+ return $"var_set {Name}, {Size}, {Value};";
}
}
}
diff --git a/CrimsonBasic/CSharp/Statements/StackBStatement.cs b/CrimsonBasic/CSharp/Statements/StackBStatement.cs
deleted file mode 100644
index 122db86..0000000
--- a/CrimsonBasic/CSharp/Statements/StackBStatement.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CrimsonBasic.CSharp.Statements
-{
- public class StackBStatement : BasicStatement
- {
- private StackOperation _operation;
- private string[] _arguments;
-
- public StackBStatement(StackOperation operation, params string[] arguments)
- {
- _operation = operation;
- _arguments = arguments;
- }
-
- public override string ToString()
- {
- return $"stack {_operation.ToString().ToLower()} {string.Join(' ', _arguments)};";
- }
-
- public enum StackOperation
- {
- PUSH_FRAME,
- POP_FRAME,
- ALLOCATE,
- DEALLOCATE
- }
- }
-}
diff --git a/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml b/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml
index 2a2be00..2c00b03 100644
--- a/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml
+++ b/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml
@@ -25,10 +25,10 @@
return
jeq
- stack
- set
+ inc_sp
dec_sp
+ push_sf
pop_sf
jump
- register
+ var_set
reg_set
~A
@@ -39,9 +39,9 @@
-
+
-
+
From 64cec3cfc9fdbc71fcf04c2527326253ed316ba1 Mon Sep 17 00:00:00 2001
From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com>
Date: Wed, 1 Mar 2023 13:42:28 +0000
Subject: [PATCH 005/122] Stack and crimson notes and things
+ FunctionCallCStatement target now linked correctly
- Outdated Crimson.md
---
.../Statements/FunctionCallCStatement.cs | 2 +-
Crimson/Resources/Documentation/Crimson.md | 157 ------------------
Crimson/Resources/Documentation/Stack.md | 13 ++
.../Test Compilations/result/main.cba | 8 +-
4 files changed, 18 insertions(+), 162 deletions(-)
delete mode 100644 Crimson/Resources/Documentation/Crimson.md
create mode 100644 Crimson/Resources/Documentation/Stack.md
diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs
index 34f5f1e..6a1acd2 100644
--- a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs
@@ -59,7 +59,7 @@ public override Fragment GetCrimsonBasic()
}
// Jump
- f.Add(new JumpBStatement(identifier.ToString()));
+ f.Add(new JumpBStatement(targetFunction!.Name.ToString()));
// Store result
string returnName = FlattenerHelper.GetUniqueResolvableValueFieldName();
diff --git a/Crimson/Resources/Documentation/Crimson.md b/Crimson/Resources/Documentation/Crimson.md
deleted file mode 100644
index 02822f0..0000000
--- a/Crimson/Resources/Documentation/Crimson.md
+++ /dev/null
@@ -1,157 +0,0 @@
-# Crimson
-
-## Contents
-- [Language Syntax and Grammar](#Language-Syntax-and-Grammar)
- - [Packages](#Packages)
- - [Declaring packages](#Declaring-Packages)
- - [Importing packages](#Importing-Packages)
- - [Statements](#Statements)
- - [DeclarePackage](#DeclarePackage)
- - [DeclareVariable](#DeclareVariable)
- - [DeclareFunction](#DeclareFunction)
- - [DeclareIf](#DeclareIf)
- - [DeclareLoop](#DeclareLoop)
- - [CallFunction](#CallFunction)
- - [SetVariable](#SetVariable)
- - [Phrases](#Phrases)
- - [ConditionPhrase](#ConditionPhrase)
- - [ParameterPhrase](#ParameterPhrase)
- - [Functions](#Functions)
- - [Syntax](#Function-Syntax)
- - [Memory Management](#Memory-Management)
- - [Reserving memory](#Reserving-Memory)
- - [Freeing memory](#Freeing-Memory)
- - [Data Types](#Data-Types)
- - [int](#int)
- - [uint](#uint)
- - [byte](#byte)
- - [sbyte](#sbyte)
- - [Notes on other data types](#Notes-on-data-types)
-- [Compilation](#Compilation)
- - [Compiler usage](#Compiler-usage)
-
-# Language Syntax and Grammar
-
-## Packages
-A package is a group of functions and variables which can be accessed in other compilations via imports. All functions and variables must sit within a package. Package names are unique and duplicate package names will cause compilation to fail.
-### Declaring packages
-```
-package program.utils (dependency(file.crm) dep, other(help.crm) help, ...) {
-
- function function_one int () {
-
- }
-
- function function_two null () {
-
- }
-
- etc...
-}
-```
-To include a package, pass it as a parameter to the package you want to use it in:
-```
-package mypackage ( name_of_package_to_import ( file_the_package_is_in ) custom_name, ...) { .. }
-// See Crimson examples for in-context uses
-```
-Including packages as dependencies allows a programmer to use functions and variables in other compilations. During compilation, including a package has the same effect as copying the package into the active code. All packages, whether or not imported, will be compiled simultaneously.
-
-## Statements
-### `DeclarePackage`
-### `DeclareVariable`
-### `DeclareFunction`
-### `DeclareIf`
-#### `DeclareElse`
-### `DeclareLoop`
-### `CallFunction`
-### `SetVariable`
-
-## Phrases
-### `ConditionPhrase`
-### `ParameterPhrase`
-
-## Functions
-### Function Syntax
-A function is a repeatedly callable block of code which may or may not return a value.
-
-The generic syntax of a function is as follows:
-```
-return_type name (parameter_1_type parameter1, etc...) {
- // Body
- return a_value;
-}
-```
-
-## Variables
-### Variable Syntax
-The generic syntax for declaring a variable is as follows:
-```
-data_type name;
-```
-Memory is not assigned to a variable when it is declared (see notes on memory management).
-
-To assign a value to a variable:
-```
-name = value;
-```
-
-## Memory Management
-Crimson is intended to run on systems with limited memory, and requires a high level of programmer intervention to manage memory effectively.
-### Reserving memory
-Memory can be reserved with the keyword `allocate`.
-```
-int i;
-
-// Reserve 4 bytes of memory and assign the pointer to 'i' to the first assigned address.
-allocate i 4;
-
-// The pointer to 'i' now points to the allocated memory.
-```
-### Freeing memory
-Memory can be freed with the keyword `free`.
-```
-// Free memory at the pointer 'i'. Quantity determined automatically with metadata stored prior to i.
-free i;
-
-// The memory previously owned by 'i' can now be safely reused.
-```
-The quanity of memory to free may be determined automatically via metadata stored at the addresses prior to **'i'**. The size of **'i'** is stored at `*i - DATA_WIDTH` and is `DATA_WIDTH` wide.
-
-## Data Types
-### `int`
-A signed integer whose width is equal to the data width of the assembly.
-### `uint`
-An unsigned integer whose width is equal to the data width of the assembly.
-### `byte`
-An unsigned byte of width 1 byte.
-### `sbyte`
-A signed byte of width 1 byte.
-### Notes on data types
-Unlike similar languages, such as C, Crimson does not feature the following data widths:
-- `char` - A character.
-
-# Compilation
-## Compiler usage
-## Example compilation
-`main.crm`
-```
-import utils from utils.crm
-
-package main {
- function main [int] () {
- int i;
- allocate i 4;
- i = 10;
- return utils.multiply(i, 5);
- }
-}
-```
-`utils.crm`
-```
-package utils {
- function multiply [int] (int num1, int num2) {
- return num1 * num2;
- }
-}
-}
-```
\ No newline at end of file
diff --git a/Crimson/Resources/Documentation/Stack.md b/Crimson/Resources/Documentation/Stack.md
new file mode 100644
index 0000000..f10a2b5
--- /dev/null
+++ b/Crimson/Resources/Documentation/Stack.md
@@ -0,0 +1,13 @@
+# The Stack in Crimson
+Crimson's stack counts up in memory, ie. the memory addresses of successive items increase.
+
+## Stack Frame
+The contents of the stack are stored in stack frames.
+A new stack frame is started when the program temporarily jumps to another subroutine/function
+and will need to restore its previous state upon returning.
+
+ | Size | Purpose |
+ |--- | --- |
+ | word | The size of the previous frame |
+ | ? | Reserved for the return value of this subroutine/function |
+ | ? | Value section
\ No newline at end of file
diff --git a/Crimson/Resources/Test Compilations/result/main.cba b/Crimson/Resources/Test Compilations/result/main.cba
index e5a4d7f..94fcba0 100644
--- a/Crimson/Resources/Test Compilations/result/main.cba
+++ b/Crimson/Resources/Test Compilations/result/main.cba
@@ -53,7 +53,7 @@ push_sf;
// arg0=4
// arg1=7
// arg2=5
- jump call
+ jump func_call_0
reg_set REG_RETURN rval_0
var_set rval_0, -1, FUNC_RETURN;
// Function Call
@@ -61,7 +61,7 @@ push_sf;
var_set i, -1, ;
// 4
// arg0=i
- jump stdout.write
+ jump func_write_0
reg_set REG_RETURN rval_1
var_set rval_1, -1, FUNC_RETURN;
// Function Call
@@ -78,7 +78,7 @@ return;
:func_multiply_0:
push_sf;
// arg0=6
- jump utils_stdout.write
+ jump func_write_0
reg_set REG_RETURN rval_2
var_set rval_2, -1, FUNC_RETURN;
return;
@@ -163,7 +163,7 @@ push_sf;
// >> TODO IMPLEMENT WHILE (end) <<
// arg0=r
- jump freeregion
+ jump func_freeregion_0
reg_set REG_RETURN rval_3
var_set rval_3, -1, FUNC_RETURN;
push_sf;
From 871bc8d3cc47454828e50d0124feeaa18d980827 Mon Sep 17 00:00:00 2001
From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com>
Date: Thu, 2 Mar 2023 17:18:06 +0000
Subject: [PATCH 006/122] Created ScopeCToken
---
Crimson/Antlr/Input/Crimson.g4 | 10 +--
Crimson/Antlr/Output/Crimson.interp | 2 +-
Crimson/Antlr/Output/CrimsonBaseListener.cs | 8 +--
Crimson/Antlr/Output/CrimsonBaseVisitor.cs | 4 +-
Crimson/Antlr/Output/CrimsonListener.cs | 8 +--
Crimson/Antlr/Output/CrimsonParser.cs | 61 +++++++++----------
Crimson/Antlr/Output/CrimsonVisitor.cs | 4 +-
Crimson/CSharp/Core/TranslationUnitVisitor.cs | 14 ++---
Crimson/CSharp/Grammar/CompilationUnit.cs | 1 +
.../Grammar/Statements/FunctionCStatement.cs | 17 ++----
.../Grammar/Statements/IfBlockCStatement.cs | 19 ++----
.../Statements/WhileBlockCStatement.cs | 12 ++--
.../CSharp/Grammar/Tokens/ElseBlockCToken.cs | 12 ++--
Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs | 36 +++++++++++
Crimson/Resources/Documentation/Stack.md | 5 +-
15 files changed, 115 insertions(+), 98 deletions(-)
create mode 100644 Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs
diff --git a/Crimson/Antlr/Input/Crimson.g4 b/Crimson/Antlr/Input/Crimson.g4
index a1b3c74..8d744d4 100644
--- a/Crimson/Antlr/Input/Crimson.g4
+++ b/Crimson/Antlr/Input/Crimson.g4
@@ -21,12 +21,12 @@ globalVariableDeclaration
: Global declaration=internalVariableDeclaration // Need to add =value or =func()
;
functionDeclaration
- : Function returnType=type header=functionHeader body=functionBody
+ : Function returnType=type header=functionHeader body=scope
;
functionHeader
: name=fullName parameters=parameterList
;
-functionBody
+scope
: OpenBrace (statements+=internalStatement)* CloseBrace
;
@@ -49,10 +49,10 @@ assignVariable
| name=fullName PointerEquals (complex=complexValue | simple=simpleValue) SemiColon #AssignVariableAtPointer
;
ifBlock
- : If condition functionBody (elseBlock | elseIfBlock)?
+ : If condition scope (elseBlock | elseIfBlock)?
;
whileBlock
- : While condition functionBody
+ : While condition scope
;
condition
: OpenBracket op=operation CloseBracket
@@ -61,7 +61,7 @@ elseIfBlock
: Else ifBlock
;
elseBlock
- : Else functionBody
+ : Else scope
;
basicCall
: BasicCall basicText=String SemiColon
diff --git a/Crimson/Antlr/Output/Crimson.interp b/Crimson/Antlr/Output/Crimson.interp
index 9bf81d3..1b331d5 100644
--- a/Crimson/Antlr/Output/Crimson.interp
+++ b/Crimson/Antlr/Output/Crimson.interp
@@ -98,7 +98,7 @@ globalStatement
globalVariableDeclaration
functionDeclaration
functionHeader
-functionBody
+scope
internalStatement
internalVariableDeclaration
assignVariable
diff --git a/Crimson/Antlr/Output/CrimsonBaseListener.cs b/Crimson/Antlr/Output/CrimsonBaseListener.cs
index 3eb994d..0601849 100644
--- a/Crimson/Antlr/Output/CrimsonBaseListener.cs
+++ b/Crimson/Antlr/Output/CrimsonBaseListener.cs
@@ -151,17 +151,17 @@ public virtual void EnterFunctionHeader([NotNull] CrimsonParser.FunctionHeaderCo
/// The parse tree.
public virtual void ExitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context) { }
///
- /// Enter a parse tree produced by .
+ /// Enter a parse tree produced by .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void EnterFunctionBody([NotNull] CrimsonParser.FunctionBodyContext context) { }
+ public virtual void EnterScope([NotNull] CrimsonParser.ScopeContext context) { }
///
- /// Exit a parse tree produced by .
+ /// Exit a parse tree produced by .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitFunctionBody([NotNull] CrimsonParser.FunctionBodyContext context) { }
+ public virtual void ExitScope([NotNull] CrimsonParser.ScopeContext context) { }
///
/// Enter a parse tree produced by the FunctionVariableDeclarationStatement
/// labeled alternative in .
diff --git a/Crimson/Antlr/Output/CrimsonBaseVisitor.cs b/Crimson/Antlr/Output/CrimsonBaseVisitor.cs
index 0144bdc..ffc000d 100644
--- a/Crimson/Antlr/Output/CrimsonBaseVisitor.cs
+++ b/Crimson/Antlr/Output/CrimsonBaseVisitor.cs
@@ -129,7 +129,7 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitorThe visitor result.
public virtual Result VisitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -137,7 +137,7 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitFunctionBody([NotNull] CrimsonParser.FunctionBodyContext context) { return VisitChildren(context); }
+ public virtual Result VisitScope([NotNull] CrimsonParser.ScopeContext context) { return VisitChildren(context); }
///
/// Visit a parse tree produced by the FunctionVariableDeclarationStatement
/// labeled alternative in .
diff --git a/Crimson/Antlr/Output/CrimsonListener.cs b/Crimson/Antlr/Output/CrimsonListener.cs
index 84685cf..ae0b21d 100644
--- a/Crimson/Antlr/Output/CrimsonListener.cs
+++ b/Crimson/Antlr/Output/CrimsonListener.cs
@@ -128,15 +128,15 @@ public interface ICrimsonListener : IParseTreeListener {
/// The parse tree.
void ExitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context);
///
- /// Enter a parse tree produced by .
+ /// Enter a parse tree produced by .
///
/// The parse tree.
- void EnterFunctionBody([NotNull] CrimsonParser.FunctionBodyContext context);
+ void EnterScope([NotNull] CrimsonParser.ScopeContext context);
///
- /// Exit a parse tree produced by .
+ /// Exit a parse tree produced by .
///
/// The parse tree.
- void ExitFunctionBody([NotNull] CrimsonParser.FunctionBodyContext context);
+ void ExitScope([NotNull] CrimsonParser.ScopeContext context);
///
/// Enter a parse tree produced by the FunctionVariableDeclarationStatement
/// labeled alternative in .
diff --git a/Crimson/Antlr/Output/CrimsonParser.cs b/Crimson/Antlr/Output/CrimsonParser.cs
index 364a472..3d32a86 100644
--- a/Crimson/Antlr/Output/CrimsonParser.cs
+++ b/Crimson/Antlr/Output/CrimsonParser.cs
@@ -48,18 +48,17 @@ public const int
public const int
RULE_translationUnit = 0, RULE_importUnit = 1, RULE_operationHandler = 2,
RULE_globalStatement = 3, RULE_globalVariableDeclaration = 4, RULE_functionDeclaration = 5,
- RULE_functionHeader = 6, RULE_functionBody = 7, RULE_internalStatement = 8,
- RULE_internalVariableDeclaration = 9, RULE_assignVariable = 10, RULE_ifBlock = 11,
- RULE_whileBlock = 12, RULE_condition = 13, RULE_elseIfBlock = 14, RULE_elseBlock = 15,
- RULE_basicCall = 16, RULE_assemblyCall = 17, RULE_functionCall = 18, RULE_arguments = 19,
- RULE_functionReturn = 20, RULE_simpleValue = 21, RULE_complexValue = 22,
- RULE_rawValue = 23, RULE_operation = 24, RULE_parameterList = 25, RULE_parameter = 26,
- RULE_structureDeclaration = 27, RULE_structureBody = 28, RULE_type = 29,
- RULE_array = 30, RULE_fullName = 31;
+ RULE_functionHeader = 6, RULE_scope = 7, RULE_internalStatement = 8, RULE_internalVariableDeclaration = 9,
+ RULE_assignVariable = 10, RULE_ifBlock = 11, RULE_whileBlock = 12, RULE_condition = 13,
+ RULE_elseIfBlock = 14, RULE_elseBlock = 15, RULE_basicCall = 16, RULE_assemblyCall = 17,
+ RULE_functionCall = 18, RULE_arguments = 19, RULE_functionReturn = 20,
+ RULE_simpleValue = 21, RULE_complexValue = 22, RULE_rawValue = 23, RULE_operation = 24,
+ RULE_parameterList = 25, RULE_parameter = 26, RULE_structureDeclaration = 27,
+ RULE_structureBody = 28, RULE_type = 29, RULE_array = 30, RULE_fullName = 31;
public static readonly string[] ruleNames = {
"translationUnit", "importUnit", "operationHandler", "globalStatement",
"globalVariableDeclaration", "functionDeclaration", "functionHeader",
- "functionBody", "internalStatement", "internalVariableDeclaration", "assignVariable",
+ "scope", "internalStatement", "internalVariableDeclaration", "assignVariable",
"ifBlock", "whileBlock", "condition", "elseIfBlock", "elseBlock", "basicCall",
"assemblyCall", "functionCall", "arguments", "functionReturn", "simpleValue",
"complexValue", "rawValue", "operation", "parameterList", "parameter",
@@ -573,7 +572,7 @@ public GlobalVariableDeclarationContext globalVariableDeclaration() {
public partial class FunctionDeclarationContext : ParserRuleContext {
public TypeContext returnType;
public FunctionHeaderContext header;
- public FunctionBodyContext body;
+ public ScopeContext body;
[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Function() { return GetToken(CrimsonParser.Function, 0); }
[System.Diagnostics.DebuggerNonUserCode] public TypeContext type() {
return GetRuleContext(0);
@@ -581,8 +580,8 @@ [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() {
[System.Diagnostics.DebuggerNonUserCode] public FunctionHeaderContext functionHeader() {
return GetRuleContext(0);
}
- [System.Diagnostics.DebuggerNonUserCode] public FunctionBodyContext functionBody() {
- return GetRuleContext(0);
+ [System.Diagnostics.DebuggerNonUserCode] public ScopeContext scope() {
+ return GetRuleContext(0);
}
public FunctionDeclarationContext(ParserRuleContext parent, int invokingState)
: base(parent, invokingState)
@@ -621,7 +620,7 @@ public FunctionDeclarationContext functionDeclaration() {
State = 114;
_localctx.header = functionHeader();
State = 115;
- _localctx.body = functionBody();
+ _localctx.body = scope();
}
}
catch (RecognitionException re) {
@@ -691,7 +690,7 @@ public FunctionHeaderContext functionHeader() {
return _localctx;
}
- public partial class FunctionBodyContext : ParserRuleContext {
+ public partial class ScopeContext : ParserRuleContext {
public InternalStatementContext _internalStatement;
public IList _statements = new List();
[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpenBrace() { return GetToken(CrimsonParser.OpenBrace, 0); }
@@ -702,33 +701,33 @@ [System.Diagnostics.DebuggerNonUserCode] public InternalStatementContext[] inter
[System.Diagnostics.DebuggerNonUserCode] public InternalStatementContext internalStatement(int i) {
return GetRuleContext(i);
}
- public FunctionBodyContext(ParserRuleContext parent, int invokingState)
+ public ScopeContext(ParserRuleContext parent, int invokingState)
: base(parent, invokingState)
{
}
- public override int RuleIndex { get { return RULE_functionBody; } }
+ public override int RuleIndex { get { return RULE_scope; } }
[System.Diagnostics.DebuggerNonUserCode]
public override void EnterRule(IParseTreeListener listener) {
ICrimsonListener typedListener = listener as ICrimsonListener;
- if (typedListener != null) typedListener.EnterFunctionBody(this);
+ if (typedListener != null) typedListener.EnterScope(this);
}
[System.Diagnostics.DebuggerNonUserCode]
public override void ExitRule(IParseTreeListener listener) {
ICrimsonListener typedListener = listener as ICrimsonListener;
- if (typedListener != null) typedListener.ExitFunctionBody(this);
+ if (typedListener != null) typedListener.ExitScope(this);
}
[System.Diagnostics.DebuggerNonUserCode]
public override TResult Accept(IParseTreeVisitor visitor) {
ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor;
- if (typedVisitor != null) return typedVisitor.VisitFunctionBody(this);
+ if (typedVisitor != null) return typedVisitor.VisitScope(this);
else return visitor.VisitChildren(this);
}
}
[RuleVersion(0)]
- public FunctionBodyContext functionBody() {
- FunctionBodyContext _localctx = new FunctionBodyContext(Context, State);
- EnterRule(_localctx, 14, RULE_functionBody);
+ public ScopeContext scope() {
+ ScopeContext _localctx = new ScopeContext(Context, State);
+ EnterRule(_localctx, 14, RULE_scope);
int _la;
try {
EnterOuterAlt(_localctx, 1);
@@ -1287,8 +1286,8 @@ public partial class IfBlockContext : ParserRuleContext {
[System.Diagnostics.DebuggerNonUserCode] public ConditionContext condition() {
return GetRuleContext(0);
}
- [System.Diagnostics.DebuggerNonUserCode] public FunctionBodyContext functionBody() {
- return GetRuleContext(0);
+ [System.Diagnostics.DebuggerNonUserCode] public ScopeContext scope() {
+ return GetRuleContext(0);
}
[System.Diagnostics.DebuggerNonUserCode] public ElseBlockContext elseBlock() {
return GetRuleContext(0);
@@ -1331,7 +1330,7 @@ public IfBlockContext ifBlock() {
State = 169;
condition();
State = 170;
- functionBody();
+ scope();
State = 173;
ErrorHandler.Sync(this);
switch ( Interpreter.AdaptivePredict(TokenStream,10,Context) ) {
@@ -1366,8 +1365,8 @@ public partial class WhileBlockContext : ParserRuleContext {
[System.Diagnostics.DebuggerNonUserCode] public ConditionContext condition() {
return GetRuleContext(0);
}
- [System.Diagnostics.DebuggerNonUserCode] public FunctionBodyContext functionBody() {
- return GetRuleContext(0);
+ [System.Diagnostics.DebuggerNonUserCode] public ScopeContext scope() {
+ return GetRuleContext(0);
}
public WhileBlockContext(ParserRuleContext parent, int invokingState)
: base(parent, invokingState)
@@ -1404,7 +1403,7 @@ public WhileBlockContext whileBlock() {
State = 176;
condition();
State = 177;
- functionBody();
+ scope();
}
}
catch (RecognitionException re) {
@@ -1528,8 +1527,8 @@ public ElseIfBlockContext elseIfBlock() {
public partial class ElseBlockContext : ParserRuleContext {
[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Else() { return GetToken(CrimsonParser.Else, 0); }
- [System.Diagnostics.DebuggerNonUserCode] public FunctionBodyContext functionBody() {
- return GetRuleContext(0);
+ [System.Diagnostics.DebuggerNonUserCode] public ScopeContext scope() {
+ return GetRuleContext(0);
}
public ElseBlockContext(ParserRuleContext parent, int invokingState)
: base(parent, invokingState)
@@ -1564,7 +1563,7 @@ public ElseBlockContext elseBlock() {
State = 186;
Match(Else);
State = 187;
- functionBody();
+ scope();
}
}
catch (RecognitionException re) {
diff --git a/Crimson/Antlr/Output/CrimsonVisitor.cs b/Crimson/Antlr/Output/CrimsonVisitor.cs
index 7e9d73a..cb68228 100644
--- a/Crimson/Antlr/Output/CrimsonVisitor.cs
+++ b/Crimson/Antlr/Output/CrimsonVisitor.cs
@@ -90,11 +90,11 @@ public interface ICrimsonVisitor : IParseTreeVisitor {
/// The visitor result.
Result VisitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context);
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by .
///
/// The parse tree.
/// The visitor result.
- Result VisitFunctionBody([NotNull] CrimsonParser.FunctionBodyContext context);
+ Result VisitScope([NotNull] CrimsonParser.ScopeContext context);
///
/// Visit a parse tree produced by the FunctionVariableDeclarationStatement
/// labeled alternative in .
diff --git a/Crimson/CSharp/Core/TranslationUnitVisitor.cs b/Crimson/CSharp/Core/TranslationUnitVisitor.cs
index 2b10896..20dfb70 100644
--- a/Crimson/CSharp/Core/TranslationUnitVisitor.cs
+++ b/Crimson/CSharp/Core/TranslationUnitVisitor.cs
@@ -104,7 +104,7 @@ public override FunctionCStatement VisitFunctionDeclaration([NotNull] CrimsonPar
{
CrimsonTypeCToken returnType = VisitType(context.returnType);
FunctionCStatement.Header header = VisitFunctionHeader(context.header);
- IList statements = VisitFunctionBody(context.body);
+ ScopeCToken statements = VisitScope(context.body);
return new FunctionCStatement(returnType, header, statements);
}
@@ -171,7 +171,7 @@ public override CrimsonTypeCToken VisitType([NotNull] CrimsonParser.TypeContext
return parameters;
}
- public override IList VisitFunctionBody([NotNull] CrimsonParser.FunctionBodyContext context)
+ public override ScopeCToken VisitScope([NotNull] CrimsonParser.ScopeContext context)
{
List statements = new List();
foreach (CrimsonParser.InternalStatementContext stCtx in context._statements)
@@ -179,7 +179,7 @@ public override IList VisitFunctionBody([NotNull] CrimsonPars
InternalStatement statement = ParseInternalStatement(stCtx);
statements.Add(statement);
}
- return statements;
+ return new ScopeCToken(statements);
}
// ----------------------------------------------------
@@ -262,19 +262,19 @@ public override FunctionCallCStatement VisitFunctionCall([NotNull] CrimsonParser
public override IfBlockCStatement VisitIfBlock([NotNull] CrimsonParser.IfBlockContext context)
{
ConditionCToken condition = VisitCondition(context.condition());
- IList body = VisitFunctionBody(context.functionBody());
+ ScopeCToken scope = VisitScope(context.scope());
CrimsonParser.ElseIfBlockContext eibCtx = context.elseIfBlock();
CrimsonParser.ElseBlockContext elbCtx = context.elseBlock();
ElseIfBlockCToken? elifBlock = eibCtx == null ? null : VisitElseIfBlock(eibCtx);
ElseBlockCToken? elseBlock = elbCtx == null ? null : VisitElseBlock(elbCtx);
- IfBlockCStatement ifBlock = new IfBlockCStatement(condition, body, elifBlock, elseBlock);
+ IfBlockCStatement ifBlock = new IfBlockCStatement(condition, scope, elifBlock, elseBlock);
return ifBlock;
}
public override WhileBlockCStatement VisitWhileBlock([NotNull] CrimsonParser.WhileBlockContext context)
{
ConditionCToken condition = VisitCondition(context.condition());
- IList body = VisitFunctionBody(context.functionBody());
+ ScopeCToken body = VisitScope(context.scope());
WhileBlockCStatement ifBlock = new WhileBlockCStatement(condition, body);
return ifBlock;
}
@@ -384,7 +384,7 @@ public override ElseIfBlockCToken VisitElseIfBlock([NotNull] CrimsonParser.ElseI
public override ElseBlockCToken VisitElseBlock([NotNull] CrimsonParser.ElseBlockContext context)
{
- IList statements = VisitFunctionBody(context.functionBody());
+ ScopeCToken statements = VisitScope(context.scope());
ElseBlockCToken elseBlock = new ElseBlockCToken(statements);
return elseBlock;
}
diff --git a/Crimson/CSharp/Grammar/CompilationUnit.cs b/Crimson/CSharp/Grammar/CompilationUnit.cs
index dc74611..e29f0db 100644
--- a/Crimson/CSharp/Grammar/CompilationUnit.cs
+++ b/Crimson/CSharp/Grammar/CompilationUnit.cs
@@ -1,5 +1,6 @@
using Crimson.CSharp.Exception;
using Crimson.CSharp.Grammar.Statements;
+using Crimson.CSharp.Grammar.Tokens;
using System;
using System.Collections;
using System.Collections.Generic;
diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs
index de3d51e..34ad12a 100644
--- a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs
@@ -18,14 +18,14 @@ public class FunctionCStatement : GlobalCStatement
public CrimsonTypeCToken ReturnType { get; }
public Header FunctionHeader { get; }
- public IList Statements { get; }
+ public ScopeCToken Scope { get; }
public override FullNameCToken Name { get => FunctionHeader.Identifier; set { FunctionHeader.Identifier = value; } }
- public FunctionCStatement(CrimsonTypeCToken returnType, Header header, IList statements)
+ public FunctionCStatement(CrimsonTypeCToken returnType, Header header, ScopeCToken scope)
{
ReturnType = returnType;
FunctionHeader = header;
- Statements = statements;
+ Scope = scope;
}
public override void Link(LinkingContext ctx)
@@ -34,11 +34,7 @@ public override void Link(LinkingContext ctx)
ReturnType.Link(ctx);
((ICrimsonToken)FunctionHeader).Link(ctx);
-
- foreach (var s in Statements)
- {
- s.Link(ctx);
- }
+ Scope.Link(ctx);
SetLinked(true);
}
@@ -52,10 +48,7 @@ public Fragment GetCrimsonBasic()
functionHead.Add(new PushSfBStatement());
Fragment functionBody = new Fragment(1);
- foreach (var s in Statements)
- {
- functionBody.Add(s.GetCrimsonBasic());
- }
+ functionBody.Add(Scope.GetCrimsonBasic());
Fragment functionFoot = new Fragment(0);
functionFoot.Add(new PushSfBStatement());
diff --git a/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs b/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs
index 9c920f6..db58ab3 100644
--- a/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs
@@ -2,6 +2,7 @@
using Crimson.CSharp.Grammar.Tokens;
using CrimsonBasic.CSharp.Core;
using CrimsonBasic.CSharp.Statements;
+using static System.Formats.Asn1.AsnWriter;
namespace Crimson.CSharp.Grammar.Statements
{
@@ -11,28 +12,23 @@ public IfBlockCStatement()
{
}
- public IfBlockCStatement(ConditionCToken condition, IList body, ElseIfBlockCToken? elifBlock, ElseBlockCToken? elseBlock)
+ public IfBlockCStatement(ConditionCToken condition, ScopeCToken scope, ElseIfBlockCToken? elifBlock, ElseBlockCToken? elseBlock)
{
Condition = condition;
- Body = body;
+ Scope = scope;
ElifBlock = elifBlock;
ElseBlock = elseBlock;
}
public ConditionCToken Condition { get; }
- public IList Body { get; }
+ public ScopeCToken Scope { get; }
public ElseIfBlockCToken? ElifBlock { get; }
public ElseBlockCToken? ElseBlock { get; }
public override void Link(LinkingContext ctx)
{
Condition.Link(ctx);
-
- foreach (var s in Body)
- {
- s.Link(ctx);
- }
-
+ Scope.Link(ctx);
ElifBlock?.Link(ctx);
ElseBlock?.Link(ctx);
}
@@ -76,10 +72,7 @@ public override Fragment GetCrimsonBasic()
string endLabelName = "END_" + uniqueBranchName;
ifHead.Add(new JumpEqualBStatement(condition.ResultHolder!, "0", "NEXT_ELIF"));
Fragment ifBody = new Fragment(1);
- foreach (var s in Body)
- {
- ifBody.Add(s.GetCrimsonBasic());
- }
+ ifBody.Add(Scope.GetCrimsonBasic());
Fragment ifFoot = new Fragment(1);
ifFoot.Add(new JumpBStatement(endLabelName));
diff --git a/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs b/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs
index ebbae26..2c10031 100644
--- a/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs
@@ -8,23 +8,19 @@ namespace Crimson.CSharp.Grammar.Statements
internal class WhileBlockCStatement : InternalStatement
{
- public WhileBlockCStatement(ConditionCToken condition, IList body)
+ public WhileBlockCStatement(ConditionCToken condition, ScopeCToken scope)
{
Condition = condition;
- Body = body;
+ Scope = scope;
}
public ConditionCToken Condition { get; }
- public IList Body { get; }
+ public ScopeCToken Scope { get; }
public override void Link(LinkingContext ctx)
{
Condition.Link(ctx);
-
- foreach (var s in Body)
- {
- s.Link(ctx);
- }
+ Scope.Link(ctx);
}
/*
diff --git a/Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs b/Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs
index bd737ba..6078e09 100644
--- a/Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs
+++ b/Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs
@@ -7,12 +7,12 @@ namespace Crimson.CSharp.Grammar.Tokens
{
internal class ElseBlockCToken : ICrimsonToken
{
- public ElseBlockCToken(IList statements)
+ public ElseBlockCToken(ScopeCToken statements)
{
- Statements = statements;
+ Scope = statements;
}
- public IList Statements { get; }
+ public ScopeCToken Scope { get; }
public Fragment GetCrimsonBasic()
{
@@ -23,10 +23,7 @@ public Fragment GetCrimsonBasic()
elseHead.Add(new LabelBStatement("ELSE"));
Fragment elseBody = new Fragment(1);
- foreach (var s in Statements)
- {
- elseBody.Add(s.GetCrimsonBasic());
- }
+ elseBody.Add(Scope.GetCrimsonBasic());
fragment.Add(elseHead);
fragment.Add(elseBody);
@@ -36,6 +33,7 @@ public Fragment GetCrimsonBasic()
public void Link(LinkingContext ctx)
{
+ Scope.Link(ctx);
return;
}
}
diff --git a/Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs b/Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs
new file mode 100644
index 0000000..4dcf793
--- /dev/null
+++ b/Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs
@@ -0,0 +1,36 @@
+using Crimson.CSharp.Core;
+using Crimson.CSharp.Grammar.Statements;
+using CrimsonBasic.CSharp.Core;
+using CrimsonBasic.CSharp.Statements;
+
+namespace Crimson.CSharp.Grammar.Tokens
+{
+ public class ScopeCToken : ICrimsonToken
+ {
+ public IList Statements { get; protected set; }
+ public bool Linked { get; set; }
+
+ public ScopeCToken (IList statements)
+ {
+ Statements = statements;
+ }
+
+ public Fragment GetCrimsonBasic()
+ {
+ Fragment f = new Fragment(0);
+ foreach (var s in Statements)
+ {
+ f.Add(s.GetCrimsonBasic());
+ }
+ return f;
+ }
+
+ public void Link (LinkingContext ctx)
+ {
+ foreach (var statement in Statements)
+ {
+ statement.Link (ctx);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Crimson/Resources/Documentation/Stack.md b/Crimson/Resources/Documentation/Stack.md
index f10a2b5..7e2e341 100644
--- a/Crimson/Resources/Documentation/Stack.md
+++ b/Crimson/Resources/Documentation/Stack.md
@@ -9,5 +9,6 @@ and will need to restore its previous state upon returning.
| Size | Purpose |
|--- | --- |
| word | The size of the previous frame |
- | ? | Reserved for the return value of this subroutine/function |
- | ? | Value section
\ No newline at end of file
+ | ? | Scope inputs |
+ | ? | Scope outputs |
+ | ? | Stack variables |
\ No newline at end of file
From f1e7d58952b0f3b7f08dd4b2e6858e3fc592708a Mon Sep 17 00:00:00 2001
From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com>
Date: Thu, 2 Mar 2023 17:19:43 +0000
Subject: [PATCH 007/122] Push/PopSf responsibility moved to Scope from
Function
---
.../Grammar/Statements/FunctionCStatement.cs | 2 -
Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs | 2 +
.../Test Compilations/result/main.cba | 54 ++++++++++++-------
3 files changed, 36 insertions(+), 22 deletions(-)
diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs
index 34ad12a..b468d1a 100644
--- a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs
+++ b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs
@@ -45,13 +45,11 @@ public Fragment GetCrimsonBasic()
Fragment functionHead = new Fragment(0);
functionHead.Add(new LabelBStatement(Name.ToString()));
- functionHead.Add(new PushSfBStatement());
Fragment functionBody = new Fragment(1);
functionBody.Add(Scope.GetCrimsonBasic());
Fragment functionFoot = new Fragment(0);
- functionFoot.Add(new PushSfBStatement());
functionFoot.Add(new ReturnBStatement());
functionFoot.Add(new CommentBStatement(""));
diff --git a/Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs b/Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs
index 4dcf793..406af5b 100644
--- a/Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs
+++ b/Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs
@@ -18,10 +18,12 @@ public ScopeCToken (IList statements)
public Fragment GetCrimsonBasic()
{
Fragment f = new Fragment(0);
+ f.Add(new PushSfBStatement());
foreach (var s in Statements)
{
f.Add(s.GetCrimsonBasic());
}
+ f.Add(new PopSfBStatement());
return f;
}
diff --git a/Crimson/Resources/Test Compilations/result/main.cba b/Crimson/Resources/Test Compilations/result/main.cba
index 94fcba0..1cb112c 100644
--- a/Crimson/Resources/Test Compilations/result/main.cba
+++ b/Crimson/Resources/Test Compilations/result/main.cba
@@ -21,7 +21,7 @@ var_set gvar_counter_0, -1, 0;
// ============================== Entry Function ==============================
:func_main_0:
-push_sf;
+ push_sf;
example basic call
~A "example assemby call"
// Function Call
@@ -32,20 +32,26 @@ push_sf;
var_set b, -1, ;
jeq c_r_h 0 NEXT_ELIF
+ push_sf;
// 5
+ pop_sf;
jump END_branch_0
jeq c_r_h 0 NEXT_ELIF
+ push_sf;
// Function Call
inc_sp 666;
var_set c, -1, ;
// Function Call
inc_sp 666;
var_set d, -1, ;
+ pop_sf;
jump END_branch_1
:ELSE:
+ push_sf;
return;
+ pop_sf;
:END_branch_1:
:END_branch_0:
@@ -70,37 +76,37 @@ push_sf;
// Function Call
var_set ret, -1, VAR_ASSIGN_C_VAL;
return;
-push_sf;
+ pop_sf;
return;
// ============================== Functions ==============================
:func_multiply_0:
-push_sf;
+ push_sf;
// arg0=6
jump func_write_0
reg_set REG_RETURN rval_2
var_set rval_2, -1, FUNC_RETURN;
return;
-push_sf;
+ pop_sf;
return;
:func_times_0:
-push_sf;
+ push_sf;
// Function Call
inc_sp 666;
var_set ret, -1, ;
return;
-push_sf;
+ pop_sf;
return;
:func_write_0:
-push_sf;
-push_sf;
+ push_sf;
+ pop_sf;
return;
:func_alloc_0:
-push_sf;
+ push_sf;
inc_sp 666;
var_set i, -1, 0;
@@ -108,11 +114,11 @@ push_sf;
// >> TODO IMPLEMENT WHILE (end) <<
return;
-push_sf;
+ pop_sf;
return;
:func_get_region_ptr_0:
-push_sf;
+ push_sf;
// Operation
inc_sp 666;
var_set RRMS, -1, ;
@@ -120,21 +126,29 @@ push_sf;
var_set exponential_offset, -1, 4;
jeq c_r_h 0 NEXT_ELIF
+ push_sf;
+ pop_sf;
jump END_branch_2
jeq c_r_h 0 NEXT_ELIF
+ push_sf;
// 1
+ pop_sf;
jump END_branch_3
jeq c_r_h 0 NEXT_ELIF
+ push_sf;
// 2
+ pop_sf;
jump END_branch_4
:ELSE:
+ push_sf;
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
+ pop_sf;
:END_branch_4:
:END_branch_3:
@@ -148,11 +162,11 @@ push_sf;
inc_sp 666;
var_set HO_EXP_RRMS, -1, ;
return;
-push_sf;
+ pop_sf;
return;
:func_freeptr_0:
-push_sf;
+ push_sf;
inc_sp 666;
var_set r, -1, 0;
// Function Call
@@ -166,30 +180,30 @@ push_sf;
jump func_freeregion_0
reg_set REG_RETURN rval_3
var_set rval_3, -1, FUNC_RETURN;
-push_sf;
+ pop_sf;
return;
:func_freeregion_0:
-push_sf;
+ push_sf;
// 0
-push_sf;
+ pop_sf;
return;
:func_pwr_0:
-push_sf;
+ push_sf;
// >> TODO IMPLEMENT WHILE (start) <<
// >> TODO IMPLEMENT WHILE (end) <<
-push_sf;
+ pop_sf;
return;
:func_call_0:
-push_sf;
+ push_sf;
// Function Call
inc_sp 666;
var_set test, -1, ;
return;
-push_sf;
+ pop_sf;
return;
From 8a7489cc69370f02871954f4a6cfad4fd1126c06 Mon Sep 17 00:00:00 2001
From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com>
Date: Thu, 2 Mar 2023 22:09:46 +0000
Subject: [PATCH 008/122] Implementing scopes. Now compiles, does not run.
---
Crimson/Antlr/Input/Crimson.g4 | 59 +-
Crimson/Antlr/Output/Crimson.interp | 17 +-
Crimson/Antlr/Output/Crimson.tokens | 142 +-
Crimson/Antlr/Output/CrimsonBaseListener.cs | 236 +--
Crimson/Antlr/Output/CrimsonBaseVisitor.cs | 130 +-
Crimson/Antlr/Output/CrimsonLexer.cs | 290 ++--
Crimson/Antlr/Output/CrimsonLexer.interp | 5 +-
Crimson/Antlr/Output/CrimsonLexer.tokens | 142 +-
Crimson/Antlr/Output/CrimsonListener.cs | 220 +--
Crimson/Antlr/Output/CrimsonParser.cs | 1373 ++++++++---------
Crimson/Antlr/Output/CrimsonVisitor.cs | 118 +-
Crimson/CSharp/Core/Compilation.cs | 8 +-
Crimson/CSharp/Core/CrimsonCompiler.cs | 2 +-
Crimson/CSharp/Core/Flattener.cs | 12 +-
Crimson/CSharp/Core/Library.cs | 20 +-
Crimson/CSharp/Core/Linker.cs | 10 +-
Crimson/CSharp/Core/LinkerHelper.cs | 4 +-
Crimson/CSharp/Core/LinkingContext.cs | 8 +-
...nslationUnitVisitor.cs => ScopeVisitor.cs} | 120 +-
Crimson/CSharp/Grammar/CompilationUnit.cs | 60 -
Crimson/CSharp/Grammar/Scope.cs | 126 ++
.../Statements/AssemblyCallCStatement.cs | 11 +-
.../Grammar/Statements/BasicCallCStatement.cs | 11 +-
.../Grammar/Statements/FunctionCStatement.cs | 29 +-
.../Statements/FunctionCallCStatement.cs | 14 +-
.../Grammar/Statements/GlobalCStatement.cs | 31 -
.../Statements/GlobalVariableCStatement.cs | 23 +-
.../Grammar/Statements/INamedStatement.cs | 15 +
.../Grammar/Statements/IfBlockCStatement.cs | 15 +-
.../Grammar/Statements/InternalStatement.cs | 29 -
.../Statements/InternalVariableCStatement.cs | 11 +-
.../Statements/OperationHandlerCStatement.cs | 15 +-
.../Grammar/Statements/ReturnCStatement.cs | 11 +-
.../Grammar/Statements/StructureCStatement.cs | 31 +-
.../VariableAssignmentCStatement.cs | 11 +-
.../Statements/WhileBlockCStatement.cs | 15 +-
.../CSharp/Grammar/Tokens/ElseBlockCToken.cs | 4 +-
Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs | 38 -
Crimson/Resources/Test Compilations/main.crm | 106 +-
39 files changed, 1780 insertions(+), 1742 deletions(-)
rename Crimson/CSharp/Core/{TranslationUnitVisitor.cs => ScopeVisitor.cs} (83%)
delete mode 100644 Crimson/CSharp/Grammar/CompilationUnit.cs
create mode 100644 Crimson/CSharp/Grammar/Scope.cs
delete mode 100644 Crimson/CSharp/Grammar/Statements/GlobalCStatement.cs
create mode 100644 Crimson/CSharp/Grammar/Statements/INamedStatement.cs
delete mode 100644 Crimson/CSharp/Grammar/Statements/InternalStatement.cs
delete mode 100644 Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs
diff --git a/Crimson/Antlr/Input/Crimson.g4 b/Crimson/Antlr/Input/Crimson.g4
index 8d744d4..149d45d 100644
--- a/Crimson/Antlr/Input/Crimson.g4
+++ b/Crimson/Antlr/Input/Crimson.g4
@@ -1,45 +1,31 @@
grammar Crimson;
// Parser rules
-translationUnit
- : (imports+=importUnit)* (opHandlers+=operationHandler)* (statements+=globalStatement)* eof=EOF
- ;
+scope
+ : OpenBrace (imports+=importUnit)* (opHandlers+=operationHandler)* (statements+=statement)* CloseBrace
+ ;
-// Compilation-Unit statements
+// Scope header things
importUnit
: Hashtag Using path=String As identifier=fullName SemiColon
;
operationHandler
: Hashtag OpHandler OpenBracket t1=type op=Operator t2=type CloseBracket RightArrow OpenBrace identifier=fullName CloseBrace SemiColon
;
-globalStatement
- : globalVariableDeclaration #GlobalVariableUnitStatement
- | functionDeclaration #FunctionUnitStatement
- | structureDeclaration #StructureUnitStatement
- ;
-globalVariableDeclaration
- : Global declaration=internalVariableDeclaration // Need to add =value or =func()
- ;
-functionDeclaration
- : Function returnType=type header=functionHeader body=scope
- ;
-functionHeader
- : name=fullName parameters=parameterList
- ;
-scope
- : OpenBrace (statements+=internalStatement)* CloseBrace
- ;
// Function-only statements
-internalStatement
- : internalVariableDeclaration #FunctionVariableDeclarationStatement
- | functionReturn #FunctionReturnStatement
- | assignVariable #FunctionAssignVariableStatement
- | functionCall SemiColon #FunctionFunctionCallStatement
- | ifBlock #FunctionIfStatement
- | whileBlock #FunctionWhileStatement
- | basicCall #FunctionBasicCallStatement
- | assemblyCall #FunctionAssemblyCallStatement
+statement
+ : internalVariableDeclaration #VariableDeclarationStatement
+ | functionReturn #ReturnStatement
+ | assignVariable #AssignVariableStatement
+ | functionCall SemiColon #FunctionCallStatement
+ | ifBlock #IfStatement
+ | whileBlock #WhileStatement
+ | basicCall #BasicCallStatement
+ | assemblyCall #AssemblyCallStatement
+ | globalVariableDeclaration #GlobalVariableStatement
+ | functionDeclaration #FunctionDeclarationStatement
+ | structureDeclaration #StructureDeclarationStatement
;
internalVariableDeclaration
: type fullName DirectEquals (complex=complexValue | simple=simpleValue) SemiColon
@@ -69,6 +55,18 @@ basicCall
assemblyCall
: AssemblyCall assemblyText=String SemiColon
;
+globalVariableDeclaration
+ : Global declaration=internalVariableDeclaration
+ ;
+scopedVariableDeclaration
+ : Scoped declaration=internalVariableDeclaration
+ ;
+functionDeclaration
+ : Function returnType=type header=functionHeader body=scope
+ ;
+functionHeader
+ : name=fullName parameters=parameterList
+ ;
// Function
functionCall
@@ -141,6 +139,7 @@ fullName
Allocator: 'allocator';
Function: 'function';
Global: 'global';
+Scoped: 'scoped';
Return: 'return';
Structure: 'structure';
Using: 'using';
diff --git a/Crimson/Antlr/Output/Crimson.interp b/Crimson/Antlr/Output/Crimson.interp
index 1b331d5..6cc970d 100644
--- a/Crimson/Antlr/Output/Crimson.interp
+++ b/Crimson/Antlr/Output/Crimson.interp
@@ -3,6 +3,7 @@ null
'allocator'
'function'
'global'
+'scoped'
'return'
'structure'
'using'
@@ -49,6 +50,7 @@ null
Allocator
Function
Global
+Scoped
Return
Structure
Using
@@ -91,15 +93,10 @@ String
ShortName
rule names:
-translationUnit
+scope
importUnit
operationHandler
-globalStatement
-globalVariableDeclaration
-functionDeclaration
-functionHeader
-scope
-internalStatement
+statement
internalVariableDeclaration
assignVariable
ifBlock
@@ -109,6 +106,10 @@ elseIfBlock
elseBlock
basicCall
assemblyCall
+globalVariableDeclaration
+scopedVariableDeclaration
+functionDeclaration
+functionHeader
functionCall
arguments
functionReturn
@@ -126,4 +127,4 @@ fullName
atn:
-[4, 1, 43, 287, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 1, 0, 5, 0, 66, 8, 0, 10, 0, 12, 0, 69, 9, 0, 1, 0, 5, 0, 72, 8, 0, 10, 0, 12, 0, 75, 9, 0, 1, 0, 5, 0, 78, 8, 0, 10, 0, 12, 0, 81, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 3, 3, 108, 8, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 5, 7, 123, 8, 7, 10, 7, 12, 7, 126, 9, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 140, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 147, 8, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 155, 8, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 163, 8, 10, 1, 10, 1, 10, 3, 10, 167, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 174, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 203, 8, 19, 1, 19, 1, 19, 5, 19, 207, 8, 19, 10, 19, 12, 19, 210, 9, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 220, 8, 20, 1, 21, 1, 21, 3, 21, 224, 8, 21, 1, 21, 3, 21, 227, 8, 21, 1, 22, 1, 22, 3, 22, 231, 8, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 245, 8, 25, 10, 25, 12, 25, 248, 9, 25, 1, 25, 1, 25, 3, 25, 252, 8, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 5, 28, 263, 8, 28, 10, 28, 12, 28, 266, 9, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 275, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 3, 31, 283, 8, 31, 1, 31, 1, 31, 1, 31, 0, 0, 32, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 0, 1, 2, 0, 15, 16, 41, 41, 287, 0, 67, 1, 0, 0, 0, 2, 84, 1, 0, 0, 0, 4, 91, 1, 0, 0, 0, 6, 107, 1, 0, 0, 0, 8, 109, 1, 0, 0, 0, 10, 112, 1, 0, 0, 0, 12, 117, 1, 0, 0, 0, 14, 120, 1, 0, 0, 0, 16, 139, 1, 0, 0, 0, 18, 141, 1, 0, 0, 0, 20, 166, 1, 0, 0, 0, 22, 168, 1, 0, 0, 0, 24, 175, 1, 0, 0, 0, 26, 179, 1, 0, 0, 0, 28, 183, 1, 0, 0, 0, 30, 186, 1, 0, 0, 0, 32, 189, 1, 0, 0, 0, 34, 193, 1, 0, 0, 0, 36, 197, 1, 0, 0, 0, 38, 200, 1, 0, 0, 0, 40, 219, 1, 0, 0, 0, 42, 226, 1, 0, 0, 0, 44, 230, 1, 0, 0, 0, 46, 232, 1, 0, 0, 0, 48, 234, 1, 0, 0, 0, 50, 251, 1, 0, 0, 0, 52, 253, 1, 0, 0, 0, 54, 256, 1, 0, 0, 0, 56, 260, 1, 0, 0, 0, 58, 274, 1, 0, 0, 0, 60, 276, 1, 0, 0, 0, 62, 282, 1, 0, 0, 0, 64, 66, 3, 2, 1, 0, 65, 64, 1, 0, 0, 0, 66, 69, 1, 0, 0, 0, 67, 65, 1, 0, 0, 0, 67, 68, 1, 0, 0, 0, 68, 73, 1, 0, 0, 0, 69, 67, 1, 0, 0, 0, 70, 72, 3, 4, 2, 0, 71, 70, 1, 0, 0, 0, 72, 75, 1, 0, 0, 0, 73, 71, 1, 0, 0, 0, 73, 74, 1, 0, 0, 0, 74, 79, 1, 0, 0, 0, 75, 73, 1, 0, 0, 0, 76, 78, 3, 6, 3, 0, 77, 76, 1, 0, 0, 0, 78, 81, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 80, 82, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 82, 83, 5, 0, 0, 1, 83, 1, 1, 0, 0, 0, 84, 85, 5, 36, 0, 0, 85, 86, 5, 6, 0, 0, 86, 87, 5, 42, 0, 0, 87, 88, 5, 8, 0, 0, 88, 89, 3, 62, 31, 0, 89, 90, 5, 34, 0, 0, 90, 3, 1, 0, 0, 0, 91, 92, 5, 36, 0, 0, 92, 93, 5, 7, 0, 0, 93, 94, 5, 26, 0, 0, 94, 95, 3, 58, 29, 0, 95, 96, 5, 17, 0, 0, 96, 97, 3, 58, 29, 0, 97, 98, 5, 27, 0, 0, 98, 99, 5, 21, 0, 0, 99, 100, 5, 30, 0, 0, 100, 101, 3, 62, 31, 0, 101, 102, 5, 31, 0, 0, 102, 103, 5, 34, 0, 0, 103, 5, 1, 0, 0, 0, 104, 108, 3, 8, 4, 0, 105, 108, 3, 10, 5, 0, 106, 108, 3, 54, 27, 0, 107, 104, 1, 0, 0, 0, 107, 105, 1, 0, 0, 0, 107, 106, 1, 0, 0, 0, 108, 7, 1, 0, 0, 0, 109, 110, 5, 3, 0, 0, 110, 111, 3, 18, 9, 0, 111, 9, 1, 0, 0, 0, 112, 113, 5, 2, 0, 0, 113, 114, 3, 58, 29, 0, 114, 115, 3, 12, 6, 0, 115, 116, 3, 14, 7, 0, 116, 11, 1, 0, 0, 0, 117, 118, 3, 62, 31, 0, 118, 119, 3, 50, 25, 0, 119, 13, 1, 0, 0, 0, 120, 124, 5, 30, 0, 0, 121, 123, 3, 16, 8, 0, 122, 121, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 127, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 127, 128, 5, 31, 0, 0, 128, 15, 1, 0, 0, 0, 129, 140, 3, 18, 9, 0, 130, 140, 3, 40, 20, 0, 131, 140, 3, 20, 10, 0, 132, 133, 3, 36, 18, 0, 133, 134, 5, 34, 0, 0, 134, 140, 1, 0, 0, 0, 135, 140, 3, 22, 11, 0, 136, 140, 3, 24, 12, 0, 137, 140, 3, 32, 16, 0, 138, 140, 3, 34, 17, 0, 139, 129, 1, 0, 0, 0, 139, 130, 1, 0, 0, 0, 139, 131, 1, 0, 0, 0, 139, 132, 1, 0, 0, 0, 139, 135, 1, 0, 0, 0, 139, 136, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 139, 138, 1, 0, 0, 0, 140, 17, 1, 0, 0, 0, 141, 142, 3, 58, 29, 0, 142, 143, 3, 62, 31, 0, 143, 146, 5, 24, 0, 0, 144, 147, 3, 44, 22, 0, 145, 147, 3, 42, 21, 0, 146, 144, 1, 0, 0, 0, 146, 145, 1, 0, 0, 0, 147, 148, 1, 0, 0, 0, 148, 149, 5, 34, 0, 0, 149, 19, 1, 0, 0, 0, 150, 151, 3, 62, 31, 0, 151, 154, 5, 24, 0, 0, 152, 155, 3, 44, 22, 0, 153, 155, 3, 42, 21, 0, 154, 152, 1, 0, 0, 0, 154, 153, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 157, 5, 34, 0, 0, 157, 167, 1, 0, 0, 0, 158, 159, 3, 62, 31, 0, 159, 162, 5, 25, 0, 0, 160, 163, 3, 44, 22, 0, 161, 163, 3, 42, 21, 0, 162, 160, 1, 0, 0, 0, 162, 161, 1, 0, 0, 0, 163, 164, 1, 0, 0, 0, 164, 165, 5, 34, 0, 0, 165, 167, 1, 0, 0, 0, 166, 150, 1, 0, 0, 0, 166, 158, 1, 0, 0, 0, 167, 21, 1, 0, 0, 0, 168, 169, 5, 9, 0, 0, 169, 170, 3, 26, 13, 0, 170, 173, 3, 14, 7, 0, 171, 174, 3, 30, 15, 0, 172, 174, 3, 28, 14, 0, 173, 171, 1, 0, 0, 0, 173, 172, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 23, 1, 0, 0, 0, 175, 176, 5, 10, 0, 0, 176, 177, 3, 26, 13, 0, 177, 178, 3, 14, 7, 0, 178, 25, 1, 0, 0, 0, 179, 180, 5, 26, 0, 0, 180, 181, 3, 48, 24, 0, 181, 182, 5, 27, 0, 0, 182, 27, 1, 0, 0, 0, 183, 184, 5, 11, 0, 0, 184, 185, 3, 22, 11, 0, 185, 29, 1, 0, 0, 0, 186, 187, 5, 11, 0, 0, 187, 188, 3, 14, 7, 0, 188, 31, 1, 0, 0, 0, 189, 190, 5, 22, 0, 0, 190, 191, 5, 42, 0, 0, 191, 192, 5, 34, 0, 0, 192, 33, 1, 0, 0, 0, 193, 194, 5, 23, 0, 0, 194, 195, 5, 42, 0, 0, 195, 196, 5, 34, 0, 0, 196, 35, 1, 0, 0, 0, 197, 198, 3, 62, 31, 0, 198, 199, 3, 38, 19, 0, 199, 37, 1, 0, 0, 0, 200, 202, 5, 26, 0, 0, 201, 203, 3, 42, 21, 0, 202, 201, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 208, 1, 0, 0, 0, 204, 205, 5, 32, 0, 0, 205, 207, 3, 42, 21, 0, 206, 204, 1, 0, 0, 0, 207, 210, 1, 0, 0, 0, 208, 206, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 211, 1, 0, 0, 0, 210, 208, 1, 0, 0, 0, 211, 212, 5, 27, 0, 0, 212, 39, 1, 0, 0, 0, 213, 214, 5, 4, 0, 0, 214, 215, 3, 42, 21, 0, 215, 216, 5, 34, 0, 0, 216, 220, 1, 0, 0, 0, 217, 218, 5, 4, 0, 0, 218, 220, 5, 34, 0, 0, 219, 213, 1, 0, 0, 0, 219, 217, 1, 0, 0, 0, 220, 41, 1, 0, 0, 0, 221, 223, 3, 62, 31, 0, 222, 224, 5, 18, 0, 0, 223, 222, 1, 0, 0, 0, 223, 224, 1, 0, 0, 0, 224, 227, 1, 0, 0, 0, 225, 227, 3, 46, 23, 0, 226, 221, 1, 0, 0, 0, 226, 225, 1, 0, 0, 0, 227, 43, 1, 0, 0, 0, 228, 231, 3, 48, 24, 0, 229, 231, 3, 36, 18, 0, 230, 228, 1, 0, 0, 0, 230, 229, 1, 0, 0, 0, 231, 45, 1, 0, 0, 0, 232, 233, 7, 0, 0, 0, 233, 47, 1, 0, 0, 0, 234, 235, 3, 42, 21, 0, 235, 236, 5, 17, 0, 0, 236, 237, 3, 42, 21, 0, 237, 49, 1, 0, 0, 0, 238, 239, 5, 26, 0, 0, 239, 252, 5, 27, 0, 0, 240, 241, 5, 26, 0, 0, 241, 246, 3, 52, 26, 0, 242, 243, 5, 32, 0, 0, 243, 245, 3, 52, 26, 0, 244, 242, 1, 0, 0, 0, 245, 248, 1, 0, 0, 0, 246, 244, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 249, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 249, 250, 5, 27, 0, 0, 250, 252, 1, 0, 0, 0, 251, 238, 1, 0, 0, 0, 251, 240, 1, 0, 0, 0, 252, 51, 1, 0, 0, 0, 253, 254, 3, 58, 29, 0, 254, 255, 3, 62, 31, 0, 255, 53, 1, 0, 0, 0, 256, 257, 5, 5, 0, 0, 257, 258, 3, 62, 31, 0, 258, 259, 3, 56, 28, 0, 259, 55, 1, 0, 0, 0, 260, 264, 5, 30, 0, 0, 261, 263, 3, 18, 9, 0, 262, 261, 1, 0, 0, 0, 263, 266, 1, 0, 0, 0, 264, 262, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 267, 1, 0, 0, 0, 266, 264, 1, 0, 0, 0, 267, 268, 5, 31, 0, 0, 268, 57, 1, 0, 0, 0, 269, 275, 5, 13, 0, 0, 270, 275, 5, 14, 0, 0, 271, 275, 3, 62, 31, 0, 272, 275, 3, 60, 30, 0, 273, 275, 5, 15, 0, 0, 274, 269, 1, 0, 0, 0, 274, 270, 1, 0, 0, 0, 274, 271, 1, 0, 0, 0, 274, 272, 1, 0, 0, 0, 274, 273, 1, 0, 0, 0, 275, 59, 1, 0, 0, 0, 276, 277, 5, 28, 0, 0, 277, 278, 3, 58, 29, 0, 278, 279, 5, 29, 0, 0, 279, 61, 1, 0, 0, 0, 280, 281, 5, 43, 0, 0, 281, 283, 5, 33, 0, 0, 282, 280, 1, 0, 0, 0, 282, 283, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 285, 5, 43, 0, 0, 285, 63, 1, 0, 0, 0, 22, 67, 73, 79, 107, 124, 139, 146, 154, 162, 166, 173, 202, 208, 219, 223, 226, 230, 246, 251, 264, 274, 282]
\ No newline at end of file
+[4, 1, 44, 278, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 1, 0, 1, 0, 5, 0, 65, 8, 0, 10, 0, 12, 0, 68, 9, 0, 1, 0, 5, 0, 71, 8, 0, 10, 0, 12, 0, 74, 9, 0, 1, 0, 5, 0, 77, 8, 0, 10, 0, 12, 0, 80, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 117, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 124, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 132, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 140, 8, 5, 1, 5, 1, 5, 3, 5, 144, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 151, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 3, 18, 194, 8, 18, 1, 18, 1, 18, 5, 18, 198, 8, 18, 10, 18, 12, 18, 201, 9, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 211, 8, 19, 1, 20, 1, 20, 3, 20, 215, 8, 20, 1, 20, 3, 20, 218, 8, 20, 1, 21, 1, 21, 3, 21, 222, 8, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 236, 8, 24, 10, 24, 12, 24, 239, 9, 24, 1, 24, 1, 24, 3, 24, 243, 8, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 5, 27, 254, 8, 27, 10, 27, 12, 27, 257, 9, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 266, 8, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 3, 30, 274, 8, 30, 1, 30, 1, 30, 1, 30, 0, 0, 31, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 0, 1, 2, 0, 16, 17, 42, 42, 279, 0, 62, 1, 0, 0, 0, 2, 83, 1, 0, 0, 0, 4, 90, 1, 0, 0, 0, 6, 116, 1, 0, 0, 0, 8, 118, 1, 0, 0, 0, 10, 143, 1, 0, 0, 0, 12, 145, 1, 0, 0, 0, 14, 152, 1, 0, 0, 0, 16, 156, 1, 0, 0, 0, 18, 160, 1, 0, 0, 0, 20, 163, 1, 0, 0, 0, 22, 166, 1, 0, 0, 0, 24, 170, 1, 0, 0, 0, 26, 174, 1, 0, 0, 0, 28, 177, 1, 0, 0, 0, 30, 180, 1, 0, 0, 0, 32, 185, 1, 0, 0, 0, 34, 188, 1, 0, 0, 0, 36, 191, 1, 0, 0, 0, 38, 210, 1, 0, 0, 0, 40, 217, 1, 0, 0, 0, 42, 221, 1, 0, 0, 0, 44, 223, 1, 0, 0, 0, 46, 225, 1, 0, 0, 0, 48, 242, 1, 0, 0, 0, 50, 244, 1, 0, 0, 0, 52, 247, 1, 0, 0, 0, 54, 251, 1, 0, 0, 0, 56, 265, 1, 0, 0, 0, 58, 267, 1, 0, 0, 0, 60, 273, 1, 0, 0, 0, 62, 66, 5, 31, 0, 0, 63, 65, 3, 2, 1, 0, 64, 63, 1, 0, 0, 0, 65, 68, 1, 0, 0, 0, 66, 64, 1, 0, 0, 0, 66, 67, 1, 0, 0, 0, 67, 72, 1, 0, 0, 0, 68, 66, 1, 0, 0, 0, 69, 71, 3, 4, 2, 0, 70, 69, 1, 0, 0, 0, 71, 74, 1, 0, 0, 0, 72, 70, 1, 0, 0, 0, 72, 73, 1, 0, 0, 0, 73, 78, 1, 0, 0, 0, 74, 72, 1, 0, 0, 0, 75, 77, 3, 6, 3, 0, 76, 75, 1, 0, 0, 0, 77, 80, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 78, 79, 1, 0, 0, 0, 79, 81, 1, 0, 0, 0, 80, 78, 1, 0, 0, 0, 81, 82, 5, 32, 0, 0, 82, 1, 1, 0, 0, 0, 83, 84, 5, 37, 0, 0, 84, 85, 5, 7, 0, 0, 85, 86, 5, 43, 0, 0, 86, 87, 5, 9, 0, 0, 87, 88, 3, 60, 30, 0, 88, 89, 5, 35, 0, 0, 89, 3, 1, 0, 0, 0, 90, 91, 5, 37, 0, 0, 91, 92, 5, 8, 0, 0, 92, 93, 5, 27, 0, 0, 93, 94, 3, 56, 28, 0, 94, 95, 5, 18, 0, 0, 95, 96, 3, 56, 28, 0, 96, 97, 5, 28, 0, 0, 97, 98, 5, 22, 0, 0, 98, 99, 5, 31, 0, 0, 99, 100, 3, 60, 30, 0, 100, 101, 5, 32, 0, 0, 101, 102, 5, 35, 0, 0, 102, 5, 1, 0, 0, 0, 103, 117, 3, 8, 4, 0, 104, 117, 3, 38, 19, 0, 105, 117, 3, 10, 5, 0, 106, 107, 3, 34, 17, 0, 107, 108, 5, 35, 0, 0, 108, 117, 1, 0, 0, 0, 109, 117, 3, 12, 6, 0, 110, 117, 3, 14, 7, 0, 111, 117, 3, 22, 11, 0, 112, 117, 3, 24, 12, 0, 113, 117, 3, 26, 13, 0, 114, 117, 3, 30, 15, 0, 115, 117, 3, 52, 26, 0, 116, 103, 1, 0, 0, 0, 116, 104, 1, 0, 0, 0, 116, 105, 1, 0, 0, 0, 116, 106, 1, 0, 0, 0, 116, 109, 1, 0, 0, 0, 116, 110, 1, 0, 0, 0, 116, 111, 1, 0, 0, 0, 116, 112, 1, 0, 0, 0, 116, 113, 1, 0, 0, 0, 116, 114, 1, 0, 0, 0, 116, 115, 1, 0, 0, 0, 117, 7, 1, 0, 0, 0, 118, 119, 3, 56, 28, 0, 119, 120, 3, 60, 30, 0, 120, 123, 5, 25, 0, 0, 121, 124, 3, 42, 21, 0, 122, 124, 3, 40, 20, 0, 123, 121, 1, 0, 0, 0, 123, 122, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 126, 5, 35, 0, 0, 126, 9, 1, 0, 0, 0, 127, 128, 3, 60, 30, 0, 128, 131, 5, 25, 0, 0, 129, 132, 3, 42, 21, 0, 130, 132, 3, 40, 20, 0, 131, 129, 1, 0, 0, 0, 131, 130, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 134, 5, 35, 0, 0, 134, 144, 1, 0, 0, 0, 135, 136, 3, 60, 30, 0, 136, 139, 5, 26, 0, 0, 137, 140, 3, 42, 21, 0, 138, 140, 3, 40, 20, 0, 139, 137, 1, 0, 0, 0, 139, 138, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 142, 5, 35, 0, 0, 142, 144, 1, 0, 0, 0, 143, 127, 1, 0, 0, 0, 143, 135, 1, 0, 0, 0, 144, 11, 1, 0, 0, 0, 145, 146, 5, 10, 0, 0, 146, 147, 3, 16, 8, 0, 147, 150, 3, 0, 0, 0, 148, 151, 3, 20, 10, 0, 149, 151, 3, 18, 9, 0, 150, 148, 1, 0, 0, 0, 150, 149, 1, 0, 0, 0, 150, 151, 1, 0, 0, 0, 151, 13, 1, 0, 0, 0, 152, 153, 5, 11, 0, 0, 153, 154, 3, 16, 8, 0, 154, 155, 3, 0, 0, 0, 155, 15, 1, 0, 0, 0, 156, 157, 5, 27, 0, 0, 157, 158, 3, 46, 23, 0, 158, 159, 5, 28, 0, 0, 159, 17, 1, 0, 0, 0, 160, 161, 5, 12, 0, 0, 161, 162, 3, 12, 6, 0, 162, 19, 1, 0, 0, 0, 163, 164, 5, 12, 0, 0, 164, 165, 3, 0, 0, 0, 165, 21, 1, 0, 0, 0, 166, 167, 5, 23, 0, 0, 167, 168, 5, 43, 0, 0, 168, 169, 5, 35, 0, 0, 169, 23, 1, 0, 0, 0, 170, 171, 5, 24, 0, 0, 171, 172, 5, 43, 0, 0, 172, 173, 5, 35, 0, 0, 173, 25, 1, 0, 0, 0, 174, 175, 5, 3, 0, 0, 175, 176, 3, 8, 4, 0, 176, 27, 1, 0, 0, 0, 177, 178, 5, 4, 0, 0, 178, 179, 3, 8, 4, 0, 179, 29, 1, 0, 0, 0, 180, 181, 5, 2, 0, 0, 181, 182, 3, 56, 28, 0, 182, 183, 3, 32, 16, 0, 183, 184, 3, 0, 0, 0, 184, 31, 1, 0, 0, 0, 185, 186, 3, 60, 30, 0, 186, 187, 3, 48, 24, 0, 187, 33, 1, 0, 0, 0, 188, 189, 3, 60, 30, 0, 189, 190, 3, 36, 18, 0, 190, 35, 1, 0, 0, 0, 191, 193, 5, 27, 0, 0, 192, 194, 3, 40, 20, 0, 193, 192, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 199, 1, 0, 0, 0, 195, 196, 5, 33, 0, 0, 196, 198, 3, 40, 20, 0, 197, 195, 1, 0, 0, 0, 198, 201, 1, 0, 0, 0, 199, 197, 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 202, 1, 0, 0, 0, 201, 199, 1, 0, 0, 0, 202, 203, 5, 28, 0, 0, 203, 37, 1, 0, 0, 0, 204, 205, 5, 5, 0, 0, 205, 206, 3, 40, 20, 0, 206, 207, 5, 35, 0, 0, 207, 211, 1, 0, 0, 0, 208, 209, 5, 5, 0, 0, 209, 211, 5, 35, 0, 0, 210, 204, 1, 0, 0, 0, 210, 208, 1, 0, 0, 0, 211, 39, 1, 0, 0, 0, 212, 214, 3, 60, 30, 0, 213, 215, 5, 19, 0, 0, 214, 213, 1, 0, 0, 0, 214, 215, 1, 0, 0, 0, 215, 218, 1, 0, 0, 0, 216, 218, 3, 44, 22, 0, 217, 212, 1, 0, 0, 0, 217, 216, 1, 0, 0, 0, 218, 41, 1, 0, 0, 0, 219, 222, 3, 46, 23, 0, 220, 222, 3, 34, 17, 0, 221, 219, 1, 0, 0, 0, 221, 220, 1, 0, 0, 0, 222, 43, 1, 0, 0, 0, 223, 224, 7, 0, 0, 0, 224, 45, 1, 0, 0, 0, 225, 226, 3, 40, 20, 0, 226, 227, 5, 18, 0, 0, 227, 228, 3, 40, 20, 0, 228, 47, 1, 0, 0, 0, 229, 230, 5, 27, 0, 0, 230, 243, 5, 28, 0, 0, 231, 232, 5, 27, 0, 0, 232, 237, 3, 50, 25, 0, 233, 234, 5, 33, 0, 0, 234, 236, 3, 50, 25, 0, 235, 233, 1, 0, 0, 0, 236, 239, 1, 0, 0, 0, 237, 235, 1, 0, 0, 0, 237, 238, 1, 0, 0, 0, 238, 240, 1, 0, 0, 0, 239, 237, 1, 0, 0, 0, 240, 241, 5, 28, 0, 0, 241, 243, 1, 0, 0, 0, 242, 229, 1, 0, 0, 0, 242, 231, 1, 0, 0, 0, 243, 49, 1, 0, 0, 0, 244, 245, 3, 56, 28, 0, 245, 246, 3, 60, 30, 0, 246, 51, 1, 0, 0, 0, 247, 248, 5, 6, 0, 0, 248, 249, 3, 60, 30, 0, 249, 250, 3, 54, 27, 0, 250, 53, 1, 0, 0, 0, 251, 255, 5, 31, 0, 0, 252, 254, 3, 8, 4, 0, 253, 252, 1, 0, 0, 0, 254, 257, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 255, 256, 1, 0, 0, 0, 256, 258, 1, 0, 0, 0, 257, 255, 1, 0, 0, 0, 258, 259, 5, 32, 0, 0, 259, 55, 1, 0, 0, 0, 260, 266, 5, 14, 0, 0, 261, 266, 5, 15, 0, 0, 262, 266, 3, 60, 30, 0, 263, 266, 3, 58, 29, 0, 264, 266, 5, 16, 0, 0, 265, 260, 1, 0, 0, 0, 265, 261, 1, 0, 0, 0, 265, 262, 1, 0, 0, 0, 265, 263, 1, 0, 0, 0, 265, 264, 1, 0, 0, 0, 266, 57, 1, 0, 0, 0, 267, 268, 5, 29, 0, 0, 268, 269, 3, 56, 28, 0, 269, 270, 5, 30, 0, 0, 270, 59, 1, 0, 0, 0, 271, 272, 5, 44, 0, 0, 272, 274, 5, 34, 0, 0, 273, 271, 1, 0, 0, 0, 273, 274, 1, 0, 0, 0, 274, 275, 1, 0, 0, 0, 275, 276, 5, 44, 0, 0, 276, 61, 1, 0, 0, 0, 20, 66, 72, 78, 116, 123, 131, 139, 143, 150, 193, 199, 210, 214, 217, 221, 237, 242, 255, 265, 273]
\ No newline at end of file
diff --git a/Crimson/Antlr/Output/Crimson.tokens b/Crimson/Antlr/Output/Crimson.tokens
index 543c367..5677047 100644
--- a/Crimson/Antlr/Output/Crimson.tokens
+++ b/Crimson/Antlr/Output/Crimson.tokens
@@ -1,76 +1,78 @@
Allocator=1
Function=2
Global=3
-Return=4
-Structure=5
-Using=6
-OpHandler=7
-As=8
-If=9
-While=10
-Else=11
-Elif=12
-Integer=13
-Boolean=14
-Null=15
-BooleanValue=16
-Operator=17
-Asterisk=18
-MathsOperator=19
-Comparator=20
-RightArrow=21
-BasicCall=22
-AssemblyCall=23
-DirectEquals=24
-PointerEquals=25
-OpenBracket=26
-CloseBracket=27
-OpenSquare=28
-CloseSquare=29
-OpenBrace=30
-CloseBrace=31
-Comma=32
-Dot=33
-SemiColon=34
-Underscore=35
-Hashtag=36
-Quote=37
-SkipTokens=38
-LineComment=39
-BlockComment=40
-Number=41
-String=42
-ShortName=43
+Scoped=4
+Return=5
+Structure=6
+Using=7
+OpHandler=8
+As=9
+If=10
+While=11
+Else=12
+Elif=13
+Integer=14
+Boolean=15
+Null=16
+BooleanValue=17
+Operator=18
+Asterisk=19
+MathsOperator=20
+Comparator=21
+RightArrow=22
+BasicCall=23
+AssemblyCall=24
+DirectEquals=25
+PointerEquals=26
+OpenBracket=27
+CloseBracket=28
+OpenSquare=29
+CloseSquare=30
+OpenBrace=31
+CloseBrace=32
+Comma=33
+Dot=34
+SemiColon=35
+Underscore=36
+Hashtag=37
+Quote=38
+SkipTokens=39
+LineComment=40
+BlockComment=41
+Number=42
+String=43
+ShortName=44
'allocator'=1
'function'=2
'global'=3
-'return'=4
-'structure'=5
-'using'=6
-'ophandler'=7
-'as'=8
-'if'=9
-'while'=10
-'else'=11
-'elif'=12
-'int'=13
-'bool'=14
-'null'=15
-'*'=18
-'->'=21
-'B~'=22
-'A~'=23
-'='=24
-'*='=25
-'('=26
-')'=27
-'['=28
-']'=29
-'{'=30
-'}'=31
-','=32
-'.'=33
-';'=34
-'_'=35
-'#'=36
-'"'=37
+'scoped'=4
+'return'=5
+'structure'=6
+'using'=7
+'ophandler'=8
+'as'=9
+'if'=10
+'while'=11
+'else'=12
+'elif'=13
+'int'=14
+'bool'=15
+'null'=16
+'*'=19
+'->'=22
+'B~'=23
+'A~'=24
+'='=25
+'*='=26
+'('=27
+')'=28
+'['=29
+']'=30
+'{'=31
+'}'=32
+','=33
+'.'=34
+';'=35
+'_'=36
+'#'=37
+'"'=38
diff --git a/Crimson/Antlr/Output/CrimsonBaseListener.cs b/Crimson/Antlr/Output/CrimsonBaseListener.cs
index 0601849..5efdf9d 100644
--- a/Crimson/Antlr/Output/CrimsonBaseListener.cs
+++ b/Crimson/Antlr/Output/CrimsonBaseListener.cs
@@ -37,17 +37,17 @@ namespace Crimson.AntlrBuild {
[System.CLSCompliant(false)]
public partial class CrimsonBaseListener : ICrimsonListener {
///
- /// Enter a parse tree produced by .
+ /// Enter a parse tree produced by .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void EnterTranslationUnit([NotNull] CrimsonParser.TranslationUnitContext context) { }
+ public virtual void EnterScope([NotNull] CrimsonParser.ScopeContext context) { }
///
- /// Exit a parse tree produced by .
+ /// Exit a parse tree produced by .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitTranslationUnit([NotNull] CrimsonParser.TranslationUnitContext context) { }
+ public virtual void ExitScope([NotNull] CrimsonParser.ScopeContext context) { }
///
/// Enter a parse tree produced by .
/// The default implementation does nothing.
@@ -73,207 +73,159 @@ public virtual void EnterOperationHandler([NotNull] CrimsonParser.OperationHandl
/// The parse tree.
public virtual void ExitOperationHandler([NotNull] CrimsonParser.OperationHandlerContext context) { }
///
- /// Enter a parse tree produced by the GlobalVariableUnitStatement
- /// labeled alternative in .
- /// The default implementation does nothing.
- ///
- /// The parse tree.
- public virtual void EnterGlobalVariableUnitStatement([NotNull] CrimsonParser.GlobalVariableUnitStatementContext context) { }
- ///
- /// Exit a parse tree produced by the GlobalVariableUnitStatement
- /// labeled alternative in .
- /// The default implementation does nothing.
- ///
- /// The parse tree.
- public virtual void ExitGlobalVariableUnitStatement([NotNull] CrimsonParser.GlobalVariableUnitStatementContext context) { }
- ///
- /// Enter a parse tree produced by the FunctionUnitStatement
- /// labeled alternative in .
- /// The default implementation does nothing.
- ///
- /// The parse tree.
- public virtual void EnterFunctionUnitStatement([NotNull] CrimsonParser.FunctionUnitStatementContext context) { }
- ///
- /// Exit a parse tree produced by the FunctionUnitStatement
- /// labeled alternative in .
- /// The default implementation does nothing.
- ///
- /// The parse tree.
- public virtual void ExitFunctionUnitStatement([NotNull] CrimsonParser.FunctionUnitStatementContext context) { }
- ///
- /// Enter a parse tree produced by the StructureUnitStatement
- /// labeled alternative in .
- /// The default implementation does nothing.
- ///
- /// The parse tree.
- public virtual void EnterStructureUnitStatement([NotNull] CrimsonParser.StructureUnitStatementContext context) { }
- ///
- /// Exit a parse tree produced by the StructureUnitStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the VariableDeclarationStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitStructureUnitStatement([NotNull] CrimsonParser.StructureUnitStatementContext context) { }
+ public virtual void EnterVariableDeclarationStatement([NotNull] CrimsonParser.VariableDeclarationStatementContext context) { }
///
- /// Enter a parse tree produced by .
- /// The default implementation does nothing.
- ///
- /// The parse tree.
- public virtual void EnterGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context) { }
- ///
- /// Exit a parse tree produced by .
- /// The default implementation does nothing.
- ///
- /// The parse tree.
- public virtual void ExitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context) { }
- ///
- /// Enter a parse tree produced by .
- /// The default implementation does nothing.
- ///
- /// The parse tree.
- public virtual void EnterFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context) { }
- ///
- /// Exit a parse tree produced by .
+ /// Exit a parse tree produced by the VariableDeclarationStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context) { }
+ public virtual void ExitVariableDeclarationStatement([NotNull] CrimsonParser.VariableDeclarationStatementContext context) { }
///
- /// Enter a parse tree produced by .
+ /// Enter a parse tree produced by the ReturnStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void EnterFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context) { }
+ public virtual void EnterReturnStatement([NotNull] CrimsonParser.ReturnStatementContext context) { }
///
- /// Exit a parse tree produced by .
+ /// Exit a parse tree produced by the ReturnStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context) { }
+ public virtual void ExitReturnStatement([NotNull] CrimsonParser.ReturnStatementContext context) { }
///
- /// Enter a parse tree produced by .
+ /// Enter a parse tree produced by the AssignVariableStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void EnterScope([NotNull] CrimsonParser.ScopeContext context) { }
+ public virtual void EnterAssignVariableStatement([NotNull] CrimsonParser.AssignVariableStatementContext context) { }
///
- /// Exit a parse tree produced by .
+ /// Exit a parse tree produced by the AssignVariableStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitScope([NotNull] CrimsonParser.ScopeContext context) { }
+ public virtual void ExitAssignVariableStatement([NotNull] CrimsonParser.AssignVariableStatementContext context) { }
///
- /// Enter a parse tree produced by the FunctionVariableDeclarationStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the FunctionCallStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void EnterFunctionVariableDeclarationStatement([NotNull] CrimsonParser.FunctionVariableDeclarationStatementContext context) { }
+ public virtual void EnterFunctionCallStatement([NotNull] CrimsonParser.FunctionCallStatementContext context) { }
///
- /// Exit a parse tree produced by the FunctionVariableDeclarationStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the FunctionCallStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitFunctionVariableDeclarationStatement([NotNull] CrimsonParser.FunctionVariableDeclarationStatementContext context) { }
+ public virtual void ExitFunctionCallStatement([NotNull] CrimsonParser.FunctionCallStatementContext context) { }
///
- /// Enter a parse tree produced by the FunctionReturnStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the IfStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void EnterFunctionReturnStatement([NotNull] CrimsonParser.FunctionReturnStatementContext context) { }
+ public virtual void EnterIfStatement([NotNull] CrimsonParser.IfStatementContext context) { }
///
- /// Exit a parse tree produced by the FunctionReturnStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the IfStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitFunctionReturnStatement([NotNull] CrimsonParser.FunctionReturnStatementContext context) { }
+ public virtual void ExitIfStatement([NotNull] CrimsonParser.IfStatementContext context) { }
///
- /// Enter a parse tree produced by the FunctionAssignVariableStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the WhileStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void EnterFunctionAssignVariableStatement([NotNull] CrimsonParser.FunctionAssignVariableStatementContext context) { }
+ public virtual void EnterWhileStatement([NotNull] CrimsonParser.WhileStatementContext context) { }
///
- /// Exit a parse tree produced by the FunctionAssignVariableStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the WhileStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitFunctionAssignVariableStatement([NotNull] CrimsonParser.FunctionAssignVariableStatementContext context) { }
+ public virtual void ExitWhileStatement([NotNull] CrimsonParser.WhileStatementContext context) { }
///
- /// Enter a parse tree produced by the FunctionFunctionCallStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the BasicCallStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void EnterFunctionFunctionCallStatement([NotNull] CrimsonParser.FunctionFunctionCallStatementContext context) { }
+ public virtual void EnterBasicCallStatement([NotNull] CrimsonParser.BasicCallStatementContext context) { }
///
- /// Exit a parse tree produced by the FunctionFunctionCallStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the BasicCallStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitFunctionFunctionCallStatement([NotNull] CrimsonParser.FunctionFunctionCallStatementContext context) { }
+ public virtual void ExitBasicCallStatement([NotNull] CrimsonParser.BasicCallStatementContext context) { }
///
- /// Enter a parse tree produced by the FunctionIfStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the AssemblyCallStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void EnterFunctionIfStatement([NotNull] CrimsonParser.FunctionIfStatementContext context) { }
+ public virtual void EnterAssemblyCallStatement([NotNull] CrimsonParser.AssemblyCallStatementContext context) { }
///
- /// Exit a parse tree produced by the FunctionIfStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the AssemblyCallStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitFunctionIfStatement([NotNull] CrimsonParser.FunctionIfStatementContext context) { }
+ public virtual void ExitAssemblyCallStatement([NotNull] CrimsonParser.AssemblyCallStatementContext context) { }
///
- /// Enter a parse tree produced by the FunctionWhileStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the GlobalVariableStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void EnterFunctionWhileStatement([NotNull] CrimsonParser.FunctionWhileStatementContext context) { }
+ public virtual void EnterGlobalVariableStatement([NotNull] CrimsonParser.GlobalVariableStatementContext context) { }
///
- /// Exit a parse tree produced by the FunctionWhileStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the GlobalVariableStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitFunctionWhileStatement([NotNull] CrimsonParser.FunctionWhileStatementContext context) { }
+ public virtual void ExitGlobalVariableStatement([NotNull] CrimsonParser.GlobalVariableStatementContext context) { }
///
- /// Enter a parse tree produced by the FunctionBasicCallStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the FunctionDeclarationStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void EnterFunctionBasicCallStatement([NotNull] CrimsonParser.FunctionBasicCallStatementContext context) { }
+ public virtual void EnterFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context) { }
///
- /// Exit a parse tree produced by the FunctionBasicCallStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the FunctionDeclarationStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitFunctionBasicCallStatement([NotNull] CrimsonParser.FunctionBasicCallStatementContext context) { }
+ public virtual void ExitFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context) { }
///
- /// Enter a parse tree produced by the FunctionAssemblyCallStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the StructureDeclarationStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void EnterFunctionAssemblyCallStatement([NotNull] CrimsonParser.FunctionAssemblyCallStatementContext context) { }
+ public virtual void EnterStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context) { }
///
- /// Exit a parse tree produced by the FunctionAssemblyCallStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the StructureDeclarationStatement
+ /// labeled alternative in .
/// The default implementation does nothing.
///
/// The parse tree.
- public virtual void ExitFunctionAssemblyCallStatement([NotNull] CrimsonParser.FunctionAssemblyCallStatementContext context) { }
+ public virtual void ExitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context) { }
///
/// Enter a parse tree produced by .
/// The default implementation does nothing.
@@ -399,6 +351,54 @@ public virtual void EnterAssemblyCall([NotNull] CrimsonParser.AssemblyCallContex
/// The parse tree.
public virtual void ExitAssemblyCall([NotNull] CrimsonParser.AssemblyCallContext context) { }
///
+ /// Enter a parse tree produced by .
+ /// The default implementation does nothing.
+ ///
+ /// The parse tree.
+ public virtual void EnterGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context) { }
+ ///
+ /// Exit a parse tree produced by .
+ /// The default implementation does nothing.
+ ///
+ /// The parse tree.
+ public virtual void ExitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context) { }
+ ///
+ /// Enter a parse tree produced by .
+ /// The default implementation does nothing.
+ ///
+ /// The parse tree.
+ public virtual void EnterScopedVariableDeclaration([NotNull] CrimsonParser.ScopedVariableDeclarationContext context) { }
+ ///
+ /// Exit a parse tree produced by .
+ /// The default implementation does nothing.
+ ///
+ /// The parse tree.
+ public virtual void ExitScopedVariableDeclaration([NotNull] CrimsonParser.ScopedVariableDeclarationContext context) { }
+ ///
+ /// Enter a parse tree produced by .
+ /// The default implementation does nothing.
+ ///
+ /// The parse tree.
+ public virtual void EnterFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context) { }
+ ///
+ /// Exit a parse tree produced by .
+ /// The default implementation does nothing.
+ ///
+ /// The parse tree.
+ public virtual void ExitFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context) { }
+ ///
+ /// Enter a parse tree produced by .
+ /// The default implementation does nothing.
+ ///
+ /// The parse tree.
+ public virtual void EnterFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context) { }
+ ///
+ /// Exit a parse tree produced by .
+ /// The default implementation does nothing.
+ ///
+ /// The parse tree.
+ public virtual void ExitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context) { }
+ ///
/// Enter a parse tree produced by .
/// The default implementation does nothing.
///
diff --git a/Crimson/Antlr/Output/CrimsonBaseVisitor.cs b/Crimson/Antlr/Output/CrimsonBaseVisitor.cs
index ffc000d..4c29906 100644
--- a/Crimson/Antlr/Output/CrimsonBaseVisitor.cs
+++ b/Crimson/Antlr/Output/CrimsonBaseVisitor.cs
@@ -36,7 +36,7 @@ namespace Crimson.AntlrBuild {
[System.CLSCompliant(false)]
public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor, ICrimsonVisitor {
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -44,7 +44,7 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitTranslationUnit([NotNull] CrimsonParser.TranslationUnitContext context) { return VisitChildren(context); }
+ public virtual Result VisitScope([NotNull] CrimsonParser.ScopeContext context) { return VisitChildren(context); }
///
/// Visit a parse tree produced by .
///
@@ -66,8 +66,8 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitorThe visitor result.
public virtual Result VisitOperationHandler([NotNull] CrimsonParser.OperationHandlerContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the GlobalVariableUnitStatement
- /// labeled alternative in .
+ /// Visit a parse tree produced by the VariableDeclarationStatement
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -75,10 +75,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitGlobalVariableUnitStatement([NotNull] CrimsonParser.GlobalVariableUnitStatementContext context) { return VisitChildren(context); }
+ public virtual Result VisitVariableDeclarationStatement([NotNull] CrimsonParser.VariableDeclarationStatementContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the FunctionUnitStatement
- /// labeled alternative in .
+ /// Visit a parse tree produced by the ReturnStatement
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -86,10 +86,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitFunctionUnitStatement([NotNull] CrimsonParser.FunctionUnitStatementContext context) { return VisitChildren(context); }
+ public virtual Result VisitReturnStatement([NotNull] CrimsonParser.ReturnStatementContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the StructureUnitStatement
- /// labeled alternative in .
+ /// Visit a parse tree produced by the AssignVariableStatement
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -97,9 +97,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitStructureUnitStatement([NotNull] CrimsonParser.StructureUnitStatementContext context) { return VisitChildren(context); }
+ public virtual Result VisitAssignVariableStatement([NotNull] CrimsonParser.AssignVariableStatementContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by the FunctionCallStatement
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -107,9 +108,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context) { return VisitChildren(context); }
+ public virtual Result VisitFunctionCallStatement([NotNull] CrimsonParser.FunctionCallStatementContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by the IfStatement
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -117,9 +119,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context) { return VisitChildren(context); }
+ public virtual Result VisitIfStatement([NotNull] CrimsonParser.IfStatementContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by the WhileStatement
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -127,9 +130,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context) { return VisitChildren(context); }
+ public virtual Result VisitWhileStatement([NotNull] CrimsonParser.WhileStatementContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by the BasicCallStatement
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -137,10 +141,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitScope([NotNull] CrimsonParser.ScopeContext context) { return VisitChildren(context); }
+ public virtual Result VisitBasicCallStatement([NotNull] CrimsonParser.BasicCallStatementContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the FunctionVariableDeclarationStatement
- /// labeled alternative in .
+ /// Visit a parse tree produced by the AssemblyCallStatement
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -148,10 +152,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitFunctionVariableDeclarationStatement([NotNull] CrimsonParser.FunctionVariableDeclarationStatementContext context) { return VisitChildren(context); }
+ public virtual Result VisitAssemblyCallStatement([NotNull] CrimsonParser.AssemblyCallStatementContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the FunctionReturnStatement
- /// labeled alternative in .
+ /// Visit a parse tree produced by the GlobalVariableStatement
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -159,10 +163,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitFunctionReturnStatement([NotNull] CrimsonParser.FunctionReturnStatementContext context) { return VisitChildren(context); }
+ public virtual Result VisitGlobalVariableStatement([NotNull] CrimsonParser.GlobalVariableStatementContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the FunctionAssignVariableStatement
- /// labeled alternative in .
+ /// Visit a parse tree produced by the FunctionDeclarationStatement
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -170,10 +174,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitFunctionAssignVariableStatement([NotNull] CrimsonParser.FunctionAssignVariableStatementContext context) { return VisitChildren(context); }
+ public virtual Result VisitFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the FunctionFunctionCallStatement
- /// labeled alternative in .
+ /// Visit a parse tree produced by the StructureDeclarationStatement
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -181,10 +185,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitFunctionFunctionCallStatement([NotNull] CrimsonParser.FunctionFunctionCallStatementContext context) { return VisitChildren(context); }
+ public virtual Result VisitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the FunctionIfStatement
- /// labeled alternative in .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -192,10 +195,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitFunctionIfStatement([NotNull] CrimsonParser.FunctionIfStatementContext context) { return VisitChildren(context); }
+ public virtual Result VisitInternalVariableDeclaration([NotNull] CrimsonParser.InternalVariableDeclarationContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the FunctionWhileStatement
- /// labeled alternative in .
+ /// Visit a parse tree produced by the AssignVariableDirect
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -203,10 +206,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitFunctionWhileStatement([NotNull] CrimsonParser.FunctionWhileStatementContext context) { return VisitChildren(context); }
+ public virtual Result VisitAssignVariableDirect([NotNull] CrimsonParser.AssignVariableDirectContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the FunctionBasicCallStatement
- /// labeled alternative in .
+ /// Visit a parse tree produced by the AssignVariableAtPointer
+ /// labeled alternative in .
///
/// The default implementation returns the result of calling
/// on .
@@ -214,10 +217,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitFunctionBasicCallStatement([NotNull] CrimsonParser.FunctionBasicCallStatementContext context) { return VisitChildren(context); }
+ public virtual Result VisitAssignVariableAtPointer([NotNull] CrimsonParser.AssignVariableAtPointerContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the FunctionAssemblyCallStatement
- /// labeled alternative in .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -225,9 +227,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitFunctionAssemblyCallStatement([NotNull] CrimsonParser.FunctionAssemblyCallStatementContext context) { return VisitChildren(context); }
+ public virtual Result VisitIfBlock([NotNull] CrimsonParser.IfBlockContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -235,10 +237,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitInternalVariableDeclaration([NotNull] CrimsonParser.InternalVariableDeclarationContext context) { return VisitChildren(context); }
+ public virtual Result VisitWhileBlock([NotNull] CrimsonParser.WhileBlockContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the AssignVariableDirect
- /// labeled alternative in .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -246,10 +247,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitAssignVariableDirect([NotNull] CrimsonParser.AssignVariableDirectContext context) { return VisitChildren(context); }
+ public virtual Result VisitCondition([NotNull] CrimsonParser.ConditionContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by the AssignVariableAtPointer
- /// labeled alternative in .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -257,9 +257,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitAssignVariableAtPointer([NotNull] CrimsonParser.AssignVariableAtPointerContext context) { return VisitChildren(context); }
+ public virtual Result VisitElseIfBlock([NotNull] CrimsonParser.ElseIfBlockContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -267,9 +267,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitIfBlock([NotNull] CrimsonParser.IfBlockContext context) { return VisitChildren(context); }
+ public virtual Result VisitElseBlock([NotNull] CrimsonParser.ElseBlockContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -277,9 +277,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitWhileBlock([NotNull] CrimsonParser.WhileBlockContext context) { return VisitChildren(context); }
+ public virtual Result VisitBasicCall([NotNull] CrimsonParser.BasicCallContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -287,9 +287,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitCondition([NotNull] CrimsonParser.ConditionContext context) { return VisitChildren(context); }
+ public virtual Result VisitAssemblyCall([NotNull] CrimsonParser.AssemblyCallContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -297,9 +297,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitElseIfBlock([NotNull] CrimsonParser.ElseIfBlockContext context) { return VisitChildren(context); }
+ public virtual Result VisitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -307,9 +307,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitElseBlock([NotNull] CrimsonParser.ElseBlockContext context) { return VisitChildren(context); }
+ public virtual Result VisitScopedVariableDeclaration([NotNull] CrimsonParser.ScopedVariableDeclarationContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -317,9 +317,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitBasicCall([NotNull] CrimsonParser.BasicCallContext context) { return VisitChildren(context); }
+ public virtual Result VisitFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context) { return VisitChildren(context); }
///
- /// Visit a parse tree produced by .
+ /// Visit a parse tree produced by .
///
/// The default implementation returns the result of calling
/// on .
@@ -327,7 +327,7 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor
/// The parse tree.
/// The visitor result.
- public virtual Result VisitAssemblyCall([NotNull] CrimsonParser.AssemblyCallContext context) { return VisitChildren(context); }
+ public virtual Result VisitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context) { return VisitChildren(context); }
///
/// Visit a parse tree produced by .
///
diff --git a/Crimson/Antlr/Output/CrimsonLexer.cs b/Crimson/Antlr/Output/CrimsonLexer.cs
index 74065e3..3bafe1a 100644
--- a/Crimson/Antlr/Output/CrimsonLexer.cs
+++ b/Crimson/Antlr/Output/CrimsonLexer.cs
@@ -34,14 +34,14 @@ public partial class CrimsonLexer : Lexer {
protected static DFA[] decisionToDFA;
protected static PredictionContextCache sharedContextCache = new PredictionContextCache();
public const int
- Allocator=1, Function=2, Global=3, Return=4, Structure=5, Using=6, OpHandler=7,
- As=8, If=9, While=10, Else=11, Elif=12, Integer=13, Boolean=14, Null=15,
- BooleanValue=16, Operator=17, Asterisk=18, MathsOperator=19, Comparator=20,
- RightArrow=21, BasicCall=22, AssemblyCall=23, DirectEquals=24, PointerEquals=25,
- OpenBracket=26, CloseBracket=27, OpenSquare=28, CloseSquare=29, OpenBrace=30,
- CloseBrace=31, Comma=32, Dot=33, SemiColon=34, Underscore=35, Hashtag=36,
- Quote=37, SkipTokens=38, LineComment=39, BlockComment=40, Number=41, String=42,
- ShortName=43;
+ Allocator=1, Function=2, Global=3, Scoped=4, Return=5, Structure=6, Using=7,
+ OpHandler=8, As=9, If=10, While=11, Else=12, Elif=13, Integer=14, Boolean=15,
+ Null=16, BooleanValue=17, Operator=18, Asterisk=19, MathsOperator=20,
+ Comparator=21, RightArrow=22, BasicCall=23, AssemblyCall=24, DirectEquals=25,
+ PointerEquals=26, OpenBracket=27, CloseBracket=28, OpenSquare=29, CloseSquare=30,
+ OpenBrace=31, CloseBrace=32, Comma=33, Dot=34, SemiColon=35, Underscore=36,
+ Hashtag=37, Quote=38, SkipTokens=39, LineComment=40, BlockComment=41,
+ Number=42, String=43, ShortName=44;
public static string[] channelNames = {
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
};
@@ -51,16 +51,16 @@ public const int
};
public static readonly string[] ruleNames = {
- "Allocator", "Function", "Global", "Return", "Structure", "Using", "OpHandler",
- "As", "If", "While", "Else", "Elif", "Integer", "Boolean", "Null", "True",
- "False", "BooleanValue", "Operator", "Plus", "Minus", "Asterisk", "Slash",
- "MathsOperator", "Less", "LessEqual", "Greater", "GreaterEqual", "EqualTo",
- "Comparator", "RightArrow", "BasicCall", "AssemblyCall", "DirectEquals",
- "PointerEquals", "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare",
- "OpenBrace", "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore",
- "Hashtag", "Quote", "SkipTokens", "LineComment", "BlockComment", "Number",
- "String", "ShortName", "Alphabetic", "Digit", "Punctuation", "WhiteSpace",
- "Newline"
+ "Allocator", "Function", "Global", "Scoped", "Return", "Structure", "Using",
+ "OpHandler", "As", "If", "While", "Else", "Elif", "Integer", "Boolean",
+ "Null", "True", "False", "BooleanValue", "Operator", "Plus", "Minus",
+ "Asterisk", "Slash", "MathsOperator", "Less", "LessEqual", "Greater",
+ "GreaterEqual", "EqualTo", "Comparator", "RightArrow", "BasicCall", "AssemblyCall",
+ "DirectEquals", "PointerEquals", "OpenBracket", "CloseBracket", "OpenSquare",
+ "CloseSquare", "OpenBrace", "CloseBrace", "Comma", "Dot", "SemiColon",
+ "Underscore", "Hashtag", "Quote", "SkipTokens", "LineComment", "BlockComment",
+ "Number", "String", "ShortName", "Alphabetic", "Digit", "Punctuation",
+ "WhiteSpace", "Newline"
};
@@ -74,20 +74,21 @@ public CrimsonLexer(ICharStream input, TextWriter output, TextWriter errorOutput
}
private static readonly string[] _LiteralNames = {
- null, "'allocator'", "'function'", "'global'", "'return'", "'structure'",
- "'using'", "'ophandler'", "'as'", "'if'", "'while'", "'else'", "'elif'",
- "'int'", "'bool'", "'null'", null, null, "'*'", null, null, "'->'", "'B~'",
- "'A~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'", "'}'", "','",
- "'.'", "';'", "'_'", "'#'", "'\"'"
+ null, "'allocator'", "'function'", "'global'", "'scoped'", "'return'",
+ "'structure'", "'using'", "'ophandler'", "'as'", "'if'", "'while'", "'else'",
+ "'elif'", "'int'", "'bool'", "'null'", null, null, "'*'", null, null,
+ "'->'", "'B~'", "'A~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'",
+ "'}'", "','", "'.'", "';'", "'_'", "'#'", "'\"'"
};
private static readonly string[] _SymbolicNames = {
- null, "Allocator", "Function", "Global", "Return", "Structure", "Using",
- "OpHandler", "As", "If", "While", "Else", "Elif", "Integer", "Boolean",
- "Null", "BooleanValue", "Operator", "Asterisk", "MathsOperator", "Comparator",
- "RightArrow", "BasicCall", "AssemblyCall", "DirectEquals", "PointerEquals",
- "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare", "OpenBrace",
- "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore", "Hashtag", "Quote",
- "SkipTokens", "LineComment", "BlockComment", "Number", "String", "ShortName"
+ null, "Allocator", "Function", "Global", "Scoped", "Return", "Structure",
+ "Using", "OpHandler", "As", "If", "While", "Else", "Elif", "Integer",
+ "Boolean", "Null", "BooleanValue", "Operator", "Asterisk", "MathsOperator",
+ "Comparator", "RightArrow", "BasicCall", "AssemblyCall", "DirectEquals",
+ "PointerEquals", "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare",
+ "OpenBrace", "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore",
+ "Hashtag", "Quote", "SkipTokens", "LineComment", "BlockComment", "Number",
+ "String", "ShortName"
};
public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames);
@@ -117,7 +118,7 @@ static CrimsonLexer() {
}
}
private static int[] _serializedATN = {
- 4,0,43,374,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,
+ 4,0,44,383,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,
6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,
7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,
7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,
@@ -125,118 +126,121 @@ static CrimsonLexer() {
7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,
7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,
7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,
- 7,56,2,57,7,57,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,
- 3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,
- 1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,8,1,8,1,8,1,9,1,
- 9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,
- 12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,
- 15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17,3,17,226,
- 8,17,1,18,1,18,3,18,230,8,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,1,
- 23,1,23,1,23,1,23,3,23,244,8,23,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,27,
- 1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,3,29,264,8,29,1,30,1,
- 30,1,30,1,31,1,31,1,31,1,32,1,32,1,32,1,33,1,33,1,34,1,34,1,34,1,35,1,
- 35,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,1,40,1,40,1,41,1,41,1,42,1,
- 42,1,43,1,43,1,44,1,44,1,45,1,45,1,46,1,46,1,47,1,47,1,47,1,47,3,47,308,
- 8,47,1,47,1,47,1,48,1,48,1,48,1,48,5,48,316,8,48,10,48,12,48,319,9,48,
- 1,49,1,49,1,49,1,49,5,49,325,8,49,10,49,12,49,328,9,49,1,49,1,49,1,49,
- 1,50,4,50,334,8,50,11,50,12,50,335,1,51,1,51,5,51,340,8,51,10,51,12,51,
- 343,9,51,1,51,1,51,1,52,1,52,1,52,1,52,5,52,351,8,52,10,52,12,52,354,9,
- 52,1,53,1,53,1,54,1,54,1,55,1,55,1,56,4,56,363,8,56,11,56,12,56,364,1,
- 57,4,57,368,8,57,11,57,12,57,369,1,57,3,57,373,8,57,1,326,0,58,1,1,3,2,
- 5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,
- 0,33,0,35,16,37,17,39,0,41,0,43,18,45,0,47,19,49,0,51,0,53,0,55,0,57,0,
- 59,20,61,21,63,22,65,23,67,24,69,25,71,26,73,27,75,28,77,29,79,30,81,31,
- 83,32,85,33,87,34,89,35,91,36,93,37,95,38,97,39,99,40,101,41,103,42,105,
- 43,107,0,109,0,111,0,113,0,115,0,1,0,6,2,0,10,10,13,13,1,0,34,34,2,0,65,
- 90,97,122,1,0,48,57,2,0,46,46,95,95,2,0,9,9,32,32,380,0,1,1,0,0,0,0,3,
- 1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,
- 0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,
- 1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,43,1,0,0,
- 0,0,47,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,
- 1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,
- 0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,
- 1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,
- 0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,1,117,1,0,0,0,3,127,1,0,0,
- 0,5,136,1,0,0,0,7,143,1,0,0,0,9,150,1,0,0,0,11,160,1,0,0,0,13,166,1,0,
- 0,0,15,176,1,0,0,0,17,179,1,0,0,0,19,182,1,0,0,0,21,188,1,0,0,0,23,193,
- 1,0,0,0,25,198,1,0,0,0,27,202,1,0,0,0,29,207,1,0,0,0,31,212,1,0,0,0,33,
- 217,1,0,0,0,35,225,1,0,0,0,37,229,1,0,0,0,39,231,1,0,0,0,41,233,1,0,0,
- 0,43,235,1,0,0,0,45,237,1,0,0,0,47,243,1,0,0,0,49,245,1,0,0,0,51,247,1,
- 0,0,0,53,250,1,0,0,0,55,252,1,0,0,0,57,255,1,0,0,0,59,263,1,0,0,0,61,265,
- 1,0,0,0,63,268,1,0,0,0,65,271,1,0,0,0,67,274,1,0,0,0,69,276,1,0,0,0,71,
- 279,1,0,0,0,73,281,1,0,0,0,75,283,1,0,0,0,77,285,1,0,0,0,79,287,1,0,0,
- 0,81,289,1,0,0,0,83,291,1,0,0,0,85,293,1,0,0,0,87,295,1,0,0,0,89,297,1,
- 0,0,0,91,299,1,0,0,0,93,301,1,0,0,0,95,307,1,0,0,0,97,311,1,0,0,0,99,320,
- 1,0,0,0,101,333,1,0,0,0,103,337,1,0,0,0,105,346,1,0,0,0,107,355,1,0,0,
- 0,109,357,1,0,0,0,111,359,1,0,0,0,113,362,1,0,0,0,115,372,1,0,0,0,117,
- 118,5,97,0,0,118,119,5,108,0,0,119,120,5,108,0,0,120,121,5,111,0,0,121,
- 122,5,99,0,0,122,123,5,97,0,0,123,124,5,116,0,0,124,125,5,111,0,0,125,
- 126,5,114,0,0,126,2,1,0,0,0,127,128,5,102,0,0,128,129,5,117,0,0,129,130,
- 5,110,0,0,130,131,5,99,0,0,131,132,5,116,0,0,132,133,5,105,0,0,133,134,
- 5,111,0,0,134,135,5,110,0,0,135,4,1,0,0,0,136,137,5,103,0,0,137,138,5,
- 108,0,0,138,139,5,111,0,0,139,140,5,98,0,0,140,141,5,97,0,0,141,142,5,
- 108,0,0,142,6,1,0,0,0,143,144,5,114,0,0,144,145,5,101,0,0,145,146,5,116,
- 0,0,146,147,5,117,0,0,147,148,5,114,0,0,148,149,5,110,0,0,149,8,1,0,0,
- 0,150,151,5,115,0,0,151,152,5,116,0,0,152,153,5,114,0,0,153,154,5,117,
- 0,0,154,155,5,99,0,0,155,156,5,116,0,0,156,157,5,117,0,0,157,158,5,114,
- 0,0,158,159,5,101,0,0,159,10,1,0,0,0,160,161,5,117,0,0,161,162,5,115,0,
- 0,162,163,5,105,0,0,163,164,5,110,0,0,164,165,5,103,0,0,165,12,1,0,0,0,
- 166,167,5,111,0,0,167,168,5,112,0,0,168,169,5,104,0,0,169,170,5,97,0,0,
- 170,171,5,110,0,0,171,172,5,100,0,0,172,173,5,108,0,0,173,174,5,101,0,
- 0,174,175,5,114,0,0,175,14,1,0,0,0,176,177,5,97,0,0,177,178,5,115,0,0,
- 178,16,1,0,0,0,179,180,5,105,0,0,180,181,5,102,0,0,181,18,1,0,0,0,182,
- 183,5,119,0,0,183,184,5,104,0,0,184,185,5,105,0,0,185,186,5,108,0,0,186,
- 187,5,101,0,0,187,20,1,0,0,0,188,189,5,101,0,0,189,190,5,108,0,0,190,191,
- 5,115,0,0,191,192,5,101,0,0,192,22,1,0,0,0,193,194,5,101,0,0,194,195,5,
- 108,0,0,195,196,5,105,0,0,196,197,5,102,0,0,197,24,1,0,0,0,198,199,5,105,
- 0,0,199,200,5,110,0,0,200,201,5,116,0,0,201,26,1,0,0,0,202,203,5,98,0,
- 0,203,204,5,111,0,0,204,205,5,111,0,0,205,206,5,108,0,0,206,28,1,0,0,0,
- 207,208,5,110,0,0,208,209,5,117,0,0,209,210,5,108,0,0,210,211,5,108,0,
- 0,211,30,1,0,0,0,212,213,5,116,0,0,213,214,5,114,0,0,214,215,5,117,0,0,
- 215,216,5,101,0,0,216,32,1,0,0,0,217,218,5,102,0,0,218,219,5,97,0,0,219,
- 220,5,108,0,0,220,221,5,115,0,0,221,222,5,101,0,0,222,34,1,0,0,0,223,226,
- 3,31,15,0,224,226,3,33,16,0,225,223,1,0,0,0,225,224,1,0,0,0,226,36,1,0,
- 0,0,227,230,3,59,29,0,228,230,3,47,23,0,229,227,1,0,0,0,229,228,1,0,0,
- 0,230,38,1,0,0,0,231,232,5,43,0,0,232,40,1,0,0,0,233,234,5,45,0,0,234,
- 42,1,0,0,0,235,236,5,42,0,0,236,44,1,0,0,0,237,238,5,47,0,0,238,46,1,0,
- 0,0,239,244,3,39,19,0,240,244,3,41,20,0,241,244,3,43,21,0,242,244,3,45,
- 22,0,243,239,1,0,0,0,243,240,1,0,0,0,243,241,1,0,0,0,243,242,1,0,0,0,244,
- 48,1,0,0,0,245,246,5,60,0,0,246,50,1,0,0,0,247,248,5,60,0,0,248,249,5,
- 61,0,0,249,52,1,0,0,0,250,251,5,62,0,0,251,54,1,0,0,0,252,253,5,62,0,0,
- 253,254,5,61,0,0,254,56,1,0,0,0,255,256,5,61,0,0,256,257,5,61,0,0,257,
- 58,1,0,0,0,258,264,3,49,24,0,259,264,3,51,25,0,260,264,3,53,26,0,261,264,
- 3,55,27,0,262,264,3,57,28,0,263,258,1,0,0,0,263,259,1,0,0,0,263,260,1,
- 0,0,0,263,261,1,0,0,0,263,262,1,0,0,0,264,60,1,0,0,0,265,266,5,45,0,0,
- 266,267,5,62,0,0,267,62,1,0,0,0,268,269,5,66,0,0,269,270,5,126,0,0,270,
- 64,1,0,0,0,271,272,5,65,0,0,272,273,5,126,0,0,273,66,1,0,0,0,274,275,5,
- 61,0,0,275,68,1,0,0,0,276,277,5,42,0,0,277,278,5,61,0,0,278,70,1,0,0,0,
- 279,280,5,40,0,0,280,72,1,0,0,0,281,282,5,41,0,0,282,74,1,0,0,0,283,284,
- 5,91,0,0,284,76,1,0,0,0,285,286,5,93,0,0,286,78,1,0,0,0,287,288,5,123,
- 0,0,288,80,1,0,0,0,289,290,5,125,0,0,290,82,1,0,0,0,291,292,5,44,0,0,292,
- 84,1,0,0,0,293,294,5,46,0,0,294,86,1,0,0,0,295,296,5,59,0,0,296,88,1,0,
- 0,0,297,298,5,95,0,0,298,90,1,0,0,0,299,300,5,35,0,0,300,92,1,0,0,0,301,
- 302,5,34,0,0,302,94,1,0,0,0,303,308,3,113,56,0,304,308,3,115,57,0,305,
- 308,3,97,48,0,306,308,3,99,49,0,307,303,1,0,0,0,307,304,1,0,0,0,307,305,
- 1,0,0,0,307,306,1,0,0,0,308,309,1,0,0,0,309,310,6,47,0,0,310,96,1,0,0,
- 0,311,312,5,47,0,0,312,313,5,47,0,0,313,317,1,0,0,0,314,316,8,0,0,0,315,
- 314,1,0,0,0,316,319,1,0,0,0,317,315,1,0,0,0,317,318,1,0,0,0,318,98,1,0,
- 0,0,319,317,1,0,0,0,320,321,5,47,0,0,321,322,5,42,0,0,322,326,1,0,0,0,
- 323,325,9,0,0,0,324,323,1,0,0,0,325,328,1,0,0,0,326,327,1,0,0,0,326,324,
- 1,0,0,0,327,329,1,0,0,0,328,326,1,0,0,0,329,330,5,42,0,0,330,331,5,47,
- 0,0,331,100,1,0,0,0,332,334,3,109,54,0,333,332,1,0,0,0,334,335,1,0,0,0,
- 335,333,1,0,0,0,335,336,1,0,0,0,336,102,1,0,0,0,337,341,3,93,46,0,338,
- 340,8,1,0,0,339,338,1,0,0,0,340,343,1,0,0,0,341,339,1,0,0,0,341,342,1,
- 0,0,0,342,344,1,0,0,0,343,341,1,0,0,0,344,345,3,93,46,0,345,104,1,0,0,
- 0,346,352,3,107,53,0,347,351,3,107,53,0,348,351,3,101,50,0,349,351,3,89,
- 44,0,350,347,1,0,0,0,350,348,1,0,0,0,350,349,1,0,0,0,351,354,1,0,0,0,352,
- 350,1,0,0,0,352,353,1,0,0,0,353,106,1,0,0,0,354,352,1,0,0,0,355,356,7,
- 2,0,0,356,108,1,0,0,0,357,358,7,3,0,0,358,110,1,0,0,0,359,360,7,4,0,0,
- 360,112,1,0,0,0,361,363,7,5,0,0,362,361,1,0,0,0,363,364,1,0,0,0,364,362,
- 1,0,0,0,364,365,1,0,0,0,365,114,1,0,0,0,366,368,7,0,0,0,367,366,1,0,0,
- 0,368,369,1,0,0,0,369,367,1,0,0,0,369,370,1,0,0,0,370,373,1,0,0,0,371,
- 373,5,0,0,1,372,367,1,0,0,0,372,371,1,0,0,0,373,116,1,0,0,0,15,0,225,229,
- 243,263,307,317,326,335,341,350,352,364,369,372,1,6,0,0
+ 7,56,2,57,7,57,2,58,7,58,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,
+ 1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,
+ 5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,
+ 1,7,1,7,1,8,1,8,1,8,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,
+ 1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,14,1,14,
+ 1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,17,
+ 1,17,1,17,1,17,1,17,1,17,1,18,1,18,3,18,235,8,18,1,19,1,19,3,19,239,8,
+ 19,1,20,1,20,1,21,1,21,1,22,1,22,1,23,1,23,1,24,1,24,1,24,1,24,3,24,253,
+ 8,24,1,25,1,25,1,26,1,26,1,26,1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,29,
+ 1,30,1,30,1,30,1,30,1,30,3,30,273,8,30,1,31,1,31,1,31,1,32,1,32,1,32,1,
+ 33,1,33,1,33,1,34,1,34,1,35,1,35,1,35,1,36,1,36,1,37,1,37,1,38,1,38,1,
+ 39,1,39,1,40,1,40,1,41,1,41,1,42,1,42,1,43,1,43,1,44,1,44,1,45,1,45,1,
+ 46,1,46,1,47,1,47,1,48,1,48,1,48,1,48,3,48,317,8,48,1,48,1,48,1,49,1,49,
+ 1,49,1,49,5,49,325,8,49,10,49,12,49,328,9,49,1,50,1,50,1,50,1,50,5,50,
+ 334,8,50,10,50,12,50,337,9,50,1,50,1,50,1,50,1,51,4,51,343,8,51,11,51,
+ 12,51,344,1,52,1,52,5,52,349,8,52,10,52,12,52,352,9,52,1,52,1,52,1,53,
+ 1,53,1,53,1,53,5,53,360,8,53,10,53,12,53,363,9,53,1,54,1,54,1,55,1,55,
+ 1,56,1,56,1,57,4,57,372,8,57,11,57,12,57,373,1,58,4,58,377,8,58,11,58,
+ 12,58,378,1,58,3,58,382,8,58,1,335,0,59,1,1,3,2,5,3,7,4,9,5,11,6,13,7,
+ 15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,0,35,0,37,17,39,
+ 18,41,0,43,0,45,19,47,0,49,20,51,0,53,0,55,0,57,0,59,0,61,21,63,22,65,
+ 23,67,24,69,25,71,26,73,27,75,28,77,29,79,30,81,31,83,32,85,33,87,34,89,
+ 35,91,36,93,37,95,38,97,39,99,40,101,41,103,42,105,43,107,44,109,0,111,
+ 0,113,0,115,0,117,0,1,0,6,2,0,10,10,13,13,1,0,34,34,2,0,65,90,97,122,1,
+ 0,48,57,2,0,46,46,95,95,2,0,9,9,32,32,389,0,1,1,0,0,0,0,3,1,0,0,0,0,5,
+ 1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,
+ 0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,
+ 1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,45,1,0,0,
+ 0,0,49,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,
+ 1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,
+ 0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,
+ 1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,
+ 0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,1,119,1,0,0,0,3,129,1,0,
+ 0,0,5,138,1,0,0,0,7,145,1,0,0,0,9,152,1,0,0,0,11,159,1,0,0,0,13,169,1,
+ 0,0,0,15,175,1,0,0,0,17,185,1,0,0,0,19,188,1,0,0,0,21,191,1,0,0,0,23,197,
+ 1,0,0,0,25,202,1,0,0,0,27,207,1,0,0,0,29,211,1,0,0,0,31,216,1,0,0,0,33,
+ 221,1,0,0,0,35,226,1,0,0,0,37,234,1,0,0,0,39,238,1,0,0,0,41,240,1,0,0,
+ 0,43,242,1,0,0,0,45,244,1,0,0,0,47,246,1,0,0,0,49,252,1,0,0,0,51,254,1,
+ 0,0,0,53,256,1,0,0,0,55,259,1,0,0,0,57,261,1,0,0,0,59,264,1,0,0,0,61,272,
+ 1,0,0,0,63,274,1,0,0,0,65,277,1,0,0,0,67,280,1,0,0,0,69,283,1,0,0,0,71,
+ 285,1,0,0,0,73,288,1,0,0,0,75,290,1,0,0,0,77,292,1,0,0,0,79,294,1,0,0,
+ 0,81,296,1,0,0,0,83,298,1,0,0,0,85,300,1,0,0,0,87,302,1,0,0,0,89,304,1,
+ 0,0,0,91,306,1,0,0,0,93,308,1,0,0,0,95,310,1,0,0,0,97,316,1,0,0,0,99,320,
+ 1,0,0,0,101,329,1,0,0,0,103,342,1,0,0,0,105,346,1,0,0,0,107,355,1,0,0,
+ 0,109,364,1,0,0,0,111,366,1,0,0,0,113,368,1,0,0,0,115,371,1,0,0,0,117,
+ 381,1,0,0,0,119,120,5,97,0,0,120,121,5,108,0,0,121,122,5,108,0,0,122,123,
+ 5,111,0,0,123,124,5,99,0,0,124,125,5,97,0,0,125,126,5,116,0,0,126,127,
+ 5,111,0,0,127,128,5,114,0,0,128,2,1,0,0,0,129,130,5,102,0,0,130,131,5,
+ 117,0,0,131,132,5,110,0,0,132,133,5,99,0,0,133,134,5,116,0,0,134,135,5,
+ 105,0,0,135,136,5,111,0,0,136,137,5,110,0,0,137,4,1,0,0,0,138,139,5,103,
+ 0,0,139,140,5,108,0,0,140,141,5,111,0,0,141,142,5,98,0,0,142,143,5,97,
+ 0,0,143,144,5,108,0,0,144,6,1,0,0,0,145,146,5,115,0,0,146,147,5,99,0,0,
+ 147,148,5,111,0,0,148,149,5,112,0,0,149,150,5,101,0,0,150,151,5,100,0,
+ 0,151,8,1,0,0,0,152,153,5,114,0,0,153,154,5,101,0,0,154,155,5,116,0,0,
+ 155,156,5,117,0,0,156,157,5,114,0,0,157,158,5,110,0,0,158,10,1,0,0,0,159,
+ 160,5,115,0,0,160,161,5,116,0,0,161,162,5,114,0,0,162,163,5,117,0,0,163,
+ 164,5,99,0,0,164,165,5,116,0,0,165,166,5,117,0,0,166,167,5,114,0,0,167,
+ 168,5,101,0,0,168,12,1,0,0,0,169,170,5,117,0,0,170,171,5,115,0,0,171,172,
+ 5,105,0,0,172,173,5,110,0,0,173,174,5,103,0,0,174,14,1,0,0,0,175,176,5,
+ 111,0,0,176,177,5,112,0,0,177,178,5,104,0,0,178,179,5,97,0,0,179,180,5,
+ 110,0,0,180,181,5,100,0,0,181,182,5,108,0,0,182,183,5,101,0,0,183,184,
+ 5,114,0,0,184,16,1,0,0,0,185,186,5,97,0,0,186,187,5,115,0,0,187,18,1,0,
+ 0,0,188,189,5,105,0,0,189,190,5,102,0,0,190,20,1,0,0,0,191,192,5,119,0,
+ 0,192,193,5,104,0,0,193,194,5,105,0,0,194,195,5,108,0,0,195,196,5,101,
+ 0,0,196,22,1,0,0,0,197,198,5,101,0,0,198,199,5,108,0,0,199,200,5,115,0,
+ 0,200,201,5,101,0,0,201,24,1,0,0,0,202,203,5,101,0,0,203,204,5,108,0,0,
+ 204,205,5,105,0,0,205,206,5,102,0,0,206,26,1,0,0,0,207,208,5,105,0,0,208,
+ 209,5,110,0,0,209,210,5,116,0,0,210,28,1,0,0,0,211,212,5,98,0,0,212,213,
+ 5,111,0,0,213,214,5,111,0,0,214,215,5,108,0,0,215,30,1,0,0,0,216,217,5,
+ 110,0,0,217,218,5,117,0,0,218,219,5,108,0,0,219,220,5,108,0,0,220,32,1,
+ 0,0,0,221,222,5,116,0,0,222,223,5,114,0,0,223,224,5,117,0,0,224,225,5,
+ 101,0,0,225,34,1,0,0,0,226,227,5,102,0,0,227,228,5,97,0,0,228,229,5,108,
+ 0,0,229,230,5,115,0,0,230,231,5,101,0,0,231,36,1,0,0,0,232,235,3,33,16,
+ 0,233,235,3,35,17,0,234,232,1,0,0,0,234,233,1,0,0,0,235,38,1,0,0,0,236,
+ 239,3,61,30,0,237,239,3,49,24,0,238,236,1,0,0,0,238,237,1,0,0,0,239,40,
+ 1,0,0,0,240,241,5,43,0,0,241,42,1,0,0,0,242,243,5,45,0,0,243,44,1,0,0,
+ 0,244,245,5,42,0,0,245,46,1,0,0,0,246,247,5,47,0,0,247,48,1,0,0,0,248,
+ 253,3,41,20,0,249,253,3,43,21,0,250,253,3,45,22,0,251,253,3,47,23,0,252,
+ 248,1,0,0,0,252,249,1,0,0,0,252,250,1,0,0,0,252,251,1,0,0,0,253,50,1,0,
+ 0,0,254,255,5,60,0,0,255,52,1,0,0,0,256,257,5,60,0,0,257,258,5,61,0,0,
+ 258,54,1,0,0,0,259,260,5,62,0,0,260,56,1,0,0,0,261,262,5,62,0,0,262,263,
+ 5,61,0,0,263,58,1,0,0,0,264,265,5,61,0,0,265,266,5,61,0,0,266,60,1,0,0,
+ 0,267,273,3,51,25,0,268,273,3,53,26,0,269,273,3,55,27,0,270,273,3,57,28,
+ 0,271,273,3,59,29,0,272,267,1,0,0,0,272,268,1,0,0,0,272,269,1,0,0,0,272,
+ 270,1,0,0,0,272,271,1,0,0,0,273,62,1,0,0,0,274,275,5,45,0,0,275,276,5,
+ 62,0,0,276,64,1,0,0,0,277,278,5,66,0,0,278,279,5,126,0,0,279,66,1,0,0,
+ 0,280,281,5,65,0,0,281,282,5,126,0,0,282,68,1,0,0,0,283,284,5,61,0,0,284,
+ 70,1,0,0,0,285,286,5,42,0,0,286,287,5,61,0,0,287,72,1,0,0,0,288,289,5,
+ 40,0,0,289,74,1,0,0,0,290,291,5,41,0,0,291,76,1,0,0,0,292,293,5,91,0,0,
+ 293,78,1,0,0,0,294,295,5,93,0,0,295,80,1,0,0,0,296,297,5,123,0,0,297,82,
+ 1,0,0,0,298,299,5,125,0,0,299,84,1,0,0,0,300,301,5,44,0,0,301,86,1,0,0,
+ 0,302,303,5,46,0,0,303,88,1,0,0,0,304,305,5,59,0,0,305,90,1,0,0,0,306,
+ 307,5,95,0,0,307,92,1,0,0,0,308,309,5,35,0,0,309,94,1,0,0,0,310,311,5,
+ 34,0,0,311,96,1,0,0,0,312,317,3,115,57,0,313,317,3,117,58,0,314,317,3,
+ 99,49,0,315,317,3,101,50,0,316,312,1,0,0,0,316,313,1,0,0,0,316,314,1,0,
+ 0,0,316,315,1,0,0,0,317,318,1,0,0,0,318,319,6,48,0,0,319,98,1,0,0,0,320,
+ 321,5,47,0,0,321,322,5,47,0,0,322,326,1,0,0,0,323,325,8,0,0,0,324,323,
+ 1,0,0,0,325,328,1,0,0,0,326,324,1,0,0,0,326,327,1,0,0,0,327,100,1,0,0,
+ 0,328,326,1,0,0,0,329,330,5,47,0,0,330,331,5,42,0,0,331,335,1,0,0,0,332,
+ 334,9,0,0,0,333,332,1,0,0,0,334,337,1,0,0,0,335,336,1,0,0,0,335,333,1,
+ 0,0,0,336,338,1,0,0,0,337,335,1,0,0,0,338,339,5,42,0,0,339,340,5,47,0,
+ 0,340,102,1,0,0,0,341,343,3,111,55,0,342,341,1,0,0,0,343,344,1,0,0,0,344,
+ 342,1,0,0,0,344,345,1,0,0,0,345,104,1,0,0,0,346,350,3,95,47,0,347,349,
+ 8,1,0,0,348,347,1,0,0,0,349,352,1,0,0,0,350,348,1,0,0,0,350,351,1,0,0,
+ 0,351,353,1,0,0,0,352,350,1,0,0,0,353,354,3,95,47,0,354,106,1,0,0,0,355,
+ 361,3,109,54,0,356,360,3,109,54,0,357,360,3,103,51,0,358,360,3,91,45,0,
+ 359,356,1,0,0,0,359,357,1,0,0,0,359,358,1,0,0,0,360,363,1,0,0,0,361,359,
+ 1,0,0,0,361,362,1,0,0,0,362,108,1,0,0,0,363,361,1,0,0,0,364,365,7,2,0,
+ 0,365,110,1,0,0,0,366,367,7,3,0,0,367,112,1,0,0,0,368,369,7,4,0,0,369,
+ 114,1,0,0,0,370,372,7,5,0,0,371,370,1,0,0,0,372,373,1,0,0,0,373,371,1,
+ 0,0,0,373,374,1,0,0,0,374,116,1,0,0,0,375,377,7,0,0,0,376,375,1,0,0,0,
+ 377,378,1,0,0,0,378,376,1,0,0,0,378,379,1,0,0,0,379,382,1,0,0,0,380,382,
+ 5,0,0,1,381,376,1,0,0,0,381,380,1,0,0,0,382,118,1,0,0,0,15,0,234,238,252,
+ 272,316,326,335,344,350,359,361,373,378,381,1,6,0,0
};
public static readonly ATN _ATN =
diff --git a/Crimson/Antlr/Output/CrimsonLexer.interp b/Crimson/Antlr/Output/CrimsonLexer.interp
index b57279f..9c4594b 100644
--- a/Crimson/Antlr/Output/CrimsonLexer.interp
+++ b/Crimson/Antlr/Output/CrimsonLexer.interp
@@ -3,6 +3,7 @@ null
'allocator'
'function'
'global'
+'scoped'
'return'
'structure'
'using'
@@ -49,6 +50,7 @@ null
Allocator
Function
Global
+Scoped
Return
Structure
Using
@@ -94,6 +96,7 @@ rule names:
Allocator
Function
Global
+Scoped
Return
Structure
Using
@@ -158,4 +161,4 @@ mode names:
DEFAULT_MODE
atn:
-[4, 0, 43, 374, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 3, 17, 226, 8, 17, 1, 18, 1, 18, 3, 18, 230, 8, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 244, 8, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 264, 8, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 3, 47, 308, 8, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 316, 8, 48, 10, 48, 12, 48, 319, 9, 48, 1, 49, 1, 49, 1, 49, 1, 49, 5, 49, 325, 8, 49, 10, 49, 12, 49, 328, 9, 49, 1, 49, 1, 49, 1, 49, 1, 50, 4, 50, 334, 8, 50, 11, 50, 12, 50, 335, 1, 51, 1, 51, 5, 51, 340, 8, 51, 10, 51, 12, 51, 343, 9, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 5, 52, 351, 8, 52, 10, 52, 12, 52, 354, 9, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 4, 56, 363, 8, 56, 11, 56, 12, 56, 364, 1, 57, 4, 57, 368, 8, 57, 11, 57, 12, 57, 369, 1, 57, 3, 57, 373, 8, 57, 1, 326, 0, 58, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 0, 33, 0, 35, 16, 37, 17, 39, 0, 41, 0, 43, 18, 45, 0, 47, 19, 49, 0, 51, 0, 53, 0, 55, 0, 57, 0, 59, 20, 61, 21, 63, 22, 65, 23, 67, 24, 69, 25, 71, 26, 73, 27, 75, 28, 77, 29, 79, 30, 81, 31, 83, 32, 85, 33, 87, 34, 89, 35, 91, 36, 93, 37, 95, 38, 97, 39, 99, 40, 101, 41, 103, 42, 105, 43, 107, 0, 109, 0, 111, 0, 113, 0, 115, 0, 1, 0, 6, 2, 0, 10, 10, 13, 13, 1, 0, 34, 34, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 2, 0, 46, 46, 95, 95, 2, 0, 9, 9, 32, 32, 380, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 1, 117, 1, 0, 0, 0, 3, 127, 1, 0, 0, 0, 5, 136, 1, 0, 0, 0, 7, 143, 1, 0, 0, 0, 9, 150, 1, 0, 0, 0, 11, 160, 1, 0, 0, 0, 13, 166, 1, 0, 0, 0, 15, 176, 1, 0, 0, 0, 17, 179, 1, 0, 0, 0, 19, 182, 1, 0, 0, 0, 21, 188, 1, 0, 0, 0, 23, 193, 1, 0, 0, 0, 25, 198, 1, 0, 0, 0, 27, 202, 1, 0, 0, 0, 29, 207, 1, 0, 0, 0, 31, 212, 1, 0, 0, 0, 33, 217, 1, 0, 0, 0, 35, 225, 1, 0, 0, 0, 37, 229, 1, 0, 0, 0, 39, 231, 1, 0, 0, 0, 41, 233, 1, 0, 0, 0, 43, 235, 1, 0, 0, 0, 45, 237, 1, 0, 0, 0, 47, 243, 1, 0, 0, 0, 49, 245, 1, 0, 0, 0, 51, 247, 1, 0, 0, 0, 53, 250, 1, 0, 0, 0, 55, 252, 1, 0, 0, 0, 57, 255, 1, 0, 0, 0, 59, 263, 1, 0, 0, 0, 61, 265, 1, 0, 0, 0, 63, 268, 1, 0, 0, 0, 65, 271, 1, 0, 0, 0, 67, 274, 1, 0, 0, 0, 69, 276, 1, 0, 0, 0, 71, 279, 1, 0, 0, 0, 73, 281, 1, 0, 0, 0, 75, 283, 1, 0, 0, 0, 77, 285, 1, 0, 0, 0, 79, 287, 1, 0, 0, 0, 81, 289, 1, 0, 0, 0, 83, 291, 1, 0, 0, 0, 85, 293, 1, 0, 0, 0, 87, 295, 1, 0, 0, 0, 89, 297, 1, 0, 0, 0, 91, 299, 1, 0, 0, 0, 93, 301, 1, 0, 0, 0, 95, 307, 1, 0, 0, 0, 97, 311, 1, 0, 0, 0, 99, 320, 1, 0, 0, 0, 101, 333, 1, 0, 0, 0, 103, 337, 1, 0, 0, 0, 105, 346, 1, 0, 0, 0, 107, 355, 1, 0, 0, 0, 109, 357, 1, 0, 0, 0, 111, 359, 1, 0, 0, 0, 113, 362, 1, 0, 0, 0, 115, 372, 1, 0, 0, 0, 117, 118, 5, 97, 0, 0, 118, 119, 5, 108, 0, 0, 119, 120, 5, 108, 0, 0, 120, 121, 5, 111, 0, 0, 121, 122, 5, 99, 0, 0, 122, 123, 5, 97, 0, 0, 123, 124, 5, 116, 0, 0, 124, 125, 5, 111, 0, 0, 125, 126, 5, 114, 0, 0, 126, 2, 1, 0, 0, 0, 127, 128, 5, 102, 0, 0, 128, 129, 5, 117, 0, 0, 129, 130, 5, 110, 0, 0, 130, 131, 5, 99, 0, 0, 131, 132, 5, 116, 0, 0, 132, 133, 5, 105, 0, 0, 133, 134, 5, 111, 0, 0, 134, 135, 5, 110, 0, 0, 135, 4, 1, 0, 0, 0, 136, 137, 5, 103, 0, 0, 137, 138, 5, 108, 0, 0, 138, 139, 5, 111, 0, 0, 139, 140, 5, 98, 0, 0, 140, 141, 5, 97, 0, 0, 141, 142, 5, 108, 0, 0, 142, 6, 1, 0, 0, 0, 143, 144, 5, 114, 0, 0, 144, 145, 5, 101, 0, 0, 145, 146, 5, 116, 0, 0, 146, 147, 5, 117, 0, 0, 147, 148, 5, 114, 0, 0, 148, 149, 5, 110, 0, 0, 149, 8, 1, 0, 0, 0, 150, 151, 5, 115, 0, 0, 151, 152, 5, 116, 0, 0, 152, 153, 5, 114, 0, 0, 153, 154, 5, 117, 0, 0, 154, 155, 5, 99, 0, 0, 155, 156, 5, 116, 0, 0, 156, 157, 5, 117, 0, 0, 157, 158, 5, 114, 0, 0, 158, 159, 5, 101, 0, 0, 159, 10, 1, 0, 0, 0, 160, 161, 5, 117, 0, 0, 161, 162, 5, 115, 0, 0, 162, 163, 5, 105, 0, 0, 163, 164, 5, 110, 0, 0, 164, 165, 5, 103, 0, 0, 165, 12, 1, 0, 0, 0, 166, 167, 5, 111, 0, 0, 167, 168, 5, 112, 0, 0, 168, 169, 5, 104, 0, 0, 169, 170, 5, 97, 0, 0, 170, 171, 5, 110, 0, 0, 171, 172, 5, 100, 0, 0, 172, 173, 5, 108, 0, 0, 173, 174, 5, 101, 0, 0, 174, 175, 5, 114, 0, 0, 175, 14, 1, 0, 0, 0, 176, 177, 5, 97, 0, 0, 177, 178, 5, 115, 0, 0, 178, 16, 1, 0, 0, 0, 179, 180, 5, 105, 0, 0, 180, 181, 5, 102, 0, 0, 181, 18, 1, 0, 0, 0, 182, 183, 5, 119, 0, 0, 183, 184, 5, 104, 0, 0, 184, 185, 5, 105, 0, 0, 185, 186, 5, 108, 0, 0, 186, 187, 5, 101, 0, 0, 187, 20, 1, 0, 0, 0, 188, 189, 5, 101, 0, 0, 189, 190, 5, 108, 0, 0, 190, 191, 5, 115, 0, 0, 191, 192, 5, 101, 0, 0, 192, 22, 1, 0, 0, 0, 193, 194, 5, 101, 0, 0, 194, 195, 5, 108, 0, 0, 195, 196, 5, 105, 0, 0, 196, 197, 5, 102, 0, 0, 197, 24, 1, 0, 0, 0, 198, 199, 5, 105, 0, 0, 199, 200, 5, 110, 0, 0, 200, 201, 5, 116, 0, 0, 201, 26, 1, 0, 0, 0, 202, 203, 5, 98, 0, 0, 203, 204, 5, 111, 0, 0, 204, 205, 5, 111, 0, 0, 205, 206, 5, 108, 0, 0, 206, 28, 1, 0, 0, 0, 207, 208, 5, 110, 0, 0, 208, 209, 5, 117, 0, 0, 209, 210, 5, 108, 0, 0, 210, 211, 5, 108, 0, 0, 211, 30, 1, 0, 0, 0, 212, 213, 5, 116, 0, 0, 213, 214, 5, 114, 0, 0, 214, 215, 5, 117, 0, 0, 215, 216, 5, 101, 0, 0, 216, 32, 1, 0, 0, 0, 217, 218, 5, 102, 0, 0, 218, 219, 5, 97, 0, 0, 219, 220, 5, 108, 0, 0, 220, 221, 5, 115, 0, 0, 221, 222, 5, 101, 0, 0, 222, 34, 1, 0, 0, 0, 223, 226, 3, 31, 15, 0, 224, 226, 3, 33, 16, 0, 225, 223, 1, 0, 0, 0, 225, 224, 1, 0, 0, 0, 226, 36, 1, 0, 0, 0, 227, 230, 3, 59, 29, 0, 228, 230, 3, 47, 23, 0, 229, 227, 1, 0, 0, 0, 229, 228, 1, 0, 0, 0, 230, 38, 1, 0, 0, 0, 231, 232, 5, 43, 0, 0, 232, 40, 1, 0, 0, 0, 233, 234, 5, 45, 0, 0, 234, 42, 1, 0, 0, 0, 235, 236, 5, 42, 0, 0, 236, 44, 1, 0, 0, 0, 237, 238, 5, 47, 0, 0, 238, 46, 1, 0, 0, 0, 239, 244, 3, 39, 19, 0, 240, 244, 3, 41, 20, 0, 241, 244, 3, 43, 21, 0, 242, 244, 3, 45, 22, 0, 243, 239, 1, 0, 0, 0, 243, 240, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 243, 242, 1, 0, 0, 0, 244, 48, 1, 0, 0, 0, 245, 246, 5, 60, 0, 0, 246, 50, 1, 0, 0, 0, 247, 248, 5, 60, 0, 0, 248, 249, 5, 61, 0, 0, 249, 52, 1, 0, 0, 0, 250, 251, 5, 62, 0, 0, 251, 54, 1, 0, 0, 0, 252, 253, 5, 62, 0, 0, 253, 254, 5, 61, 0, 0, 254, 56, 1, 0, 0, 0, 255, 256, 5, 61, 0, 0, 256, 257, 5, 61, 0, 0, 257, 58, 1, 0, 0, 0, 258, 264, 3, 49, 24, 0, 259, 264, 3, 51, 25, 0, 260, 264, 3, 53, 26, 0, 261, 264, 3, 55, 27, 0, 262, 264, 3, 57, 28, 0, 263, 258, 1, 0, 0, 0, 263, 259, 1, 0, 0, 0, 263, 260, 1, 0, 0, 0, 263, 261, 1, 0, 0, 0, 263, 262, 1, 0, 0, 0, 264, 60, 1, 0, 0, 0, 265, 266, 5, 45, 0, 0, 266, 267, 5, 62, 0, 0, 267, 62, 1, 0, 0, 0, 268, 269, 5, 66, 0, 0, 269, 270, 5, 126, 0, 0, 270, 64, 1, 0, 0, 0, 271, 272, 5, 65, 0, 0, 272, 273, 5, 126, 0, 0, 273, 66, 1, 0, 0, 0, 274, 275, 5, 61, 0, 0, 275, 68, 1, 0, 0, 0, 276, 277, 5, 42, 0, 0, 277, 278, 5, 61, 0, 0, 278, 70, 1, 0, 0, 0, 279, 280, 5, 40, 0, 0, 280, 72, 1, 0, 0, 0, 281, 282, 5, 41, 0, 0, 282, 74, 1, 0, 0, 0, 283, 284, 5, 91, 0, 0, 284, 76, 1, 0, 0, 0, 285, 286, 5, 93, 0, 0, 286, 78, 1, 0, 0, 0, 287, 288, 5, 123, 0, 0, 288, 80, 1, 0, 0, 0, 289, 290, 5, 125, 0, 0, 290, 82, 1, 0, 0, 0, 291, 292, 5, 44, 0, 0, 292, 84, 1, 0, 0, 0, 293, 294, 5, 46, 0, 0, 294, 86, 1, 0, 0, 0, 295, 296, 5, 59, 0, 0, 296, 88, 1, 0, 0, 0, 297, 298, 5, 95, 0, 0, 298, 90, 1, 0, 0, 0, 299, 300, 5, 35, 0, 0, 300, 92, 1, 0, 0, 0, 301, 302, 5, 34, 0, 0, 302, 94, 1, 0, 0, 0, 303, 308, 3, 113, 56, 0, 304, 308, 3, 115, 57, 0, 305, 308, 3, 97, 48, 0, 306, 308, 3, 99, 49, 0, 307, 303, 1, 0, 0, 0, 307, 304, 1, 0, 0, 0, 307, 305, 1, 0, 0, 0, 307, 306, 1, 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 310, 6, 47, 0, 0, 310, 96, 1, 0, 0, 0, 311, 312, 5, 47, 0, 0, 312, 313, 5, 47, 0, 0, 313, 317, 1, 0, 0, 0, 314, 316, 8, 0, 0, 0, 315, 314, 1, 0, 0, 0, 316, 319, 1, 0, 0, 0, 317, 315, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 98, 1, 0, 0, 0, 319, 317, 1, 0, 0, 0, 320, 321, 5, 47, 0, 0, 321, 322, 5, 42, 0, 0, 322, 326, 1, 0, 0, 0, 323, 325, 9, 0, 0, 0, 324, 323, 1, 0, 0, 0, 325, 328, 1, 0, 0, 0, 326, 327, 1, 0, 0, 0, 326, 324, 1, 0, 0, 0, 327, 329, 1, 0, 0, 0, 328, 326, 1, 0, 0, 0, 329, 330, 5, 42, 0, 0, 330, 331, 5, 47, 0, 0, 331, 100, 1, 0, 0, 0, 332, 334, 3, 109, 54, 0, 333, 332, 1, 0, 0, 0, 334, 335, 1, 0, 0, 0, 335, 333, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 102, 1, 0, 0, 0, 337, 341, 3, 93, 46, 0, 338, 340, 8, 1, 0, 0, 339, 338, 1, 0, 0, 0, 340, 343, 1, 0, 0, 0, 341, 339, 1, 0, 0, 0, 341, 342, 1, 0, 0, 0, 342, 344, 1, 0, 0, 0, 343, 341, 1, 0, 0, 0, 344, 345, 3, 93, 46, 0, 345, 104, 1, 0, 0, 0, 346, 352, 3, 107, 53, 0, 347, 351, 3, 107, 53, 0, 348, 351, 3, 101, 50, 0, 349, 351, 3, 89, 44, 0, 350, 347, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 350, 349, 1, 0, 0, 0, 351, 354, 1, 0, 0, 0, 352, 350, 1, 0, 0, 0, 352, 353, 1, 0, 0, 0, 353, 106, 1, 0, 0, 0, 354, 352, 1, 0, 0, 0, 355, 356, 7, 2, 0, 0, 356, 108, 1, 0, 0, 0, 357, 358, 7, 3, 0, 0, 358, 110, 1, 0, 0, 0, 359, 360, 7, 4, 0, 0, 360, 112, 1, 0, 0, 0, 361, 363, 7, 5, 0, 0, 362, 361, 1, 0, 0, 0, 363, 364, 1, 0, 0, 0, 364, 362, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 114, 1, 0, 0, 0, 366, 368, 7, 0, 0, 0, 367, 366, 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 369, 370, 1, 0, 0, 0, 370, 373, 1, 0, 0, 0, 371, 373, 5, 0, 0, 1, 372, 367, 1, 0, 0, 0, 372, 371, 1, 0, 0, 0, 373, 116, 1, 0, 0, 0, 15, 0, 225, 229, 243, 263, 307, 317, 326, 335, 341, 350, 352, 364, 369, 372, 1, 6, 0, 0]
\ No newline at end of file
+[4, 0, 44, 383, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 3, 18, 235, 8, 18, 1, 19, 1, 19, 3, 19, 239, 8, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 253, 8, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 273, 8, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 317, 8, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 5, 49, 325, 8, 49, 10, 49, 12, 49, 328, 9, 49, 1, 50, 1, 50, 1, 50, 1, 50, 5, 50, 334, 8, 50, 10, 50, 12, 50, 337, 9, 50, 1, 50, 1, 50, 1, 50, 1, 51, 4, 51, 343, 8, 51, 11, 51, 12, 51, 344, 1, 52, 1, 52, 5, 52, 349, 8, 52, 10, 52, 12, 52, 352, 9, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 360, 8, 53, 10, 53, 12, 53, 363, 9, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 4, 57, 372, 8, 57, 11, 57, 12, 57, 373, 1, 58, 4, 58, 377, 8, 58, 11, 58, 12, 58, 378, 1, 58, 3, 58, 382, 8, 58, 1, 335, 0, 59, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 0, 35, 0, 37, 17, 39, 18, 41, 0, 43, 0, 45, 19, 47, 0, 49, 20, 51, 0, 53, 0, 55, 0, 57, 0, 59, 0, 61, 21, 63, 22, 65, 23, 67, 24, 69, 25, 71, 26, 73, 27, 75, 28, 77, 29, 79, 30, 81, 31, 83, 32, 85, 33, 87, 34, 89, 35, 91, 36, 93, 37, 95, 38, 97, 39, 99, 40, 101, 41, 103, 42, 105, 43, 107, 44, 109, 0, 111, 0, 113, 0, 115, 0, 117, 0, 1, 0, 6, 2, 0, 10, 10, 13, 13, 1, 0, 34, 34, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 2, 0, 46, 46, 95, 95, 2, 0, 9, 9, 32, 32, 389, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 1, 119, 1, 0, 0, 0, 3, 129, 1, 0, 0, 0, 5, 138, 1, 0, 0, 0, 7, 145, 1, 0, 0, 0, 9, 152, 1, 0, 0, 0, 11, 159, 1, 0, 0, 0, 13, 169, 1, 0, 0, 0, 15, 175, 1, 0, 0, 0, 17, 185, 1, 0, 0, 0, 19, 188, 1, 0, 0, 0, 21, 191, 1, 0, 0, 0, 23, 197, 1, 0, 0, 0, 25, 202, 1, 0, 0, 0, 27, 207, 1, 0, 0, 0, 29, 211, 1, 0, 0, 0, 31, 216, 1, 0, 0, 0, 33, 221, 1, 0, 0, 0, 35, 226, 1, 0, 0, 0, 37, 234, 1, 0, 0, 0, 39, 238, 1, 0, 0, 0, 41, 240, 1, 0, 0, 0, 43, 242, 1, 0, 0, 0, 45, 244, 1, 0, 0, 0, 47, 246, 1, 0, 0, 0, 49, 252, 1, 0, 0, 0, 51, 254, 1, 0, 0, 0, 53, 256, 1, 0, 0, 0, 55, 259, 1, 0, 0, 0, 57, 261, 1, 0, 0, 0, 59, 264, 1, 0, 0, 0, 61, 272, 1, 0, 0, 0, 63, 274, 1, 0, 0, 0, 65, 277, 1, 0, 0, 0, 67, 280, 1, 0, 0, 0, 69, 283, 1, 0, 0, 0, 71, 285, 1, 0, 0, 0, 73, 288, 1, 0, 0, 0, 75, 290, 1, 0, 0, 0, 77, 292, 1, 0, 0, 0, 79, 294, 1, 0, 0, 0, 81, 296, 1, 0, 0, 0, 83, 298, 1, 0, 0, 0, 85, 300, 1, 0, 0, 0, 87, 302, 1, 0, 0, 0, 89, 304, 1, 0, 0, 0, 91, 306, 1, 0, 0, 0, 93, 308, 1, 0, 0, 0, 95, 310, 1, 0, 0, 0, 97, 316, 1, 0, 0, 0, 99, 320, 1, 0, 0, 0, 101, 329, 1, 0, 0, 0, 103, 342, 1, 0, 0, 0, 105, 346, 1, 0, 0, 0, 107, 355, 1, 0, 0, 0, 109, 364, 1, 0, 0, 0, 111, 366, 1, 0, 0, 0, 113, 368, 1, 0, 0, 0, 115, 371, 1, 0, 0, 0, 117, 381, 1, 0, 0, 0, 119, 120, 5, 97, 0, 0, 120, 121, 5, 108, 0, 0, 121, 122, 5, 108, 0, 0, 122, 123, 5, 111, 0, 0, 123, 124, 5, 99, 0, 0, 124, 125, 5, 97, 0, 0, 125, 126, 5, 116, 0, 0, 126, 127, 5, 111, 0, 0, 127, 128, 5, 114, 0, 0, 128, 2, 1, 0, 0, 0, 129, 130, 5, 102, 0, 0, 130, 131, 5, 117, 0, 0, 131, 132, 5, 110, 0, 0, 132, 133, 5, 99, 0, 0, 133, 134, 5, 116, 0, 0, 134, 135, 5, 105, 0, 0, 135, 136, 5, 111, 0, 0, 136, 137, 5, 110, 0, 0, 137, 4, 1, 0, 0, 0, 138, 139, 5, 103, 0, 0, 139, 140, 5, 108, 0, 0, 140, 141, 5, 111, 0, 0, 141, 142, 5, 98, 0, 0, 142, 143, 5, 97, 0, 0, 143, 144, 5, 108, 0, 0, 144, 6, 1, 0, 0, 0, 145, 146, 5, 115, 0, 0, 146, 147, 5, 99, 0, 0, 147, 148, 5, 111, 0, 0, 148, 149, 5, 112, 0, 0, 149, 150, 5, 101, 0, 0, 150, 151, 5, 100, 0, 0, 151, 8, 1, 0, 0, 0, 152, 153, 5, 114, 0, 0, 153, 154, 5, 101, 0, 0, 154, 155, 5, 116, 0, 0, 155, 156, 5, 117, 0, 0, 156, 157, 5, 114, 0, 0, 157, 158, 5, 110, 0, 0, 158, 10, 1, 0, 0, 0, 159, 160, 5, 115, 0, 0, 160, 161, 5, 116, 0, 0, 161, 162, 5, 114, 0, 0, 162, 163, 5, 117, 0, 0, 163, 164, 5, 99, 0, 0, 164, 165, 5, 116, 0, 0, 165, 166, 5, 117, 0, 0, 166, 167, 5, 114, 0, 0, 167, 168, 5, 101, 0, 0, 168, 12, 1, 0, 0, 0, 169, 170, 5, 117, 0, 0, 170, 171, 5, 115, 0, 0, 171, 172, 5, 105, 0, 0, 172, 173, 5, 110, 0, 0, 173, 174, 5, 103, 0, 0, 174, 14, 1, 0, 0, 0, 175, 176, 5, 111, 0, 0, 176, 177, 5, 112, 0, 0, 177, 178, 5, 104, 0, 0, 178, 179, 5, 97, 0, 0, 179, 180, 5, 110, 0, 0, 180, 181, 5, 100, 0, 0, 181, 182, 5, 108, 0, 0, 182, 183, 5, 101, 0, 0, 183, 184, 5, 114, 0, 0, 184, 16, 1, 0, 0, 0, 185, 186, 5, 97, 0, 0, 186, 187, 5, 115, 0, 0, 187, 18, 1, 0, 0, 0, 188, 189, 5, 105, 0, 0, 189, 190, 5, 102, 0, 0, 190, 20, 1, 0, 0, 0, 191, 192, 5, 119, 0, 0, 192, 193, 5, 104, 0, 0, 193, 194, 5, 105, 0, 0, 194, 195, 5, 108, 0, 0, 195, 196, 5, 101, 0, 0, 196, 22, 1, 0, 0, 0, 197, 198, 5, 101, 0, 0, 198, 199, 5, 108, 0, 0, 199, 200, 5, 115, 0, 0, 200, 201, 5, 101, 0, 0, 201, 24, 1, 0, 0, 0, 202, 203, 5, 101, 0, 0, 203, 204, 5, 108, 0, 0, 204, 205, 5, 105, 0, 0, 205, 206, 5, 102, 0, 0, 206, 26, 1, 0, 0, 0, 207, 208, 5, 105, 0, 0, 208, 209, 5, 110, 0, 0, 209, 210, 5, 116, 0, 0, 210, 28, 1, 0, 0, 0, 211, 212, 5, 98, 0, 0, 212, 213, 5, 111, 0, 0, 213, 214, 5, 111, 0, 0, 214, 215, 5, 108, 0, 0, 215, 30, 1, 0, 0, 0, 216, 217, 5, 110, 0, 0, 217, 218, 5, 117, 0, 0, 218, 219, 5, 108, 0, 0, 219, 220, 5, 108, 0, 0, 220, 32, 1, 0, 0, 0, 221, 222, 5, 116, 0, 0, 222, 223, 5, 114, 0, 0, 223, 224, 5, 117, 0, 0, 224, 225, 5, 101, 0, 0, 225, 34, 1, 0, 0, 0, 226, 227, 5, 102, 0, 0, 227, 228, 5, 97, 0, 0, 228, 229, 5, 108, 0, 0, 229, 230, 5, 115, 0, 0, 230, 231, 5, 101, 0, 0, 231, 36, 1, 0, 0, 0, 232, 235, 3, 33, 16, 0, 233, 235, 3, 35, 17, 0, 234, 232, 1, 0, 0, 0, 234, 233, 1, 0, 0, 0, 235, 38, 1, 0, 0, 0, 236, 239, 3, 61, 30, 0, 237, 239, 3, 49, 24, 0, 238, 236, 1, 0, 0, 0, 238, 237, 1, 0, 0, 0, 239, 40, 1, 0, 0, 0, 240, 241, 5, 43, 0, 0, 241, 42, 1, 0, 0, 0, 242, 243, 5, 45, 0, 0, 243, 44, 1, 0, 0, 0, 244, 245, 5, 42, 0, 0, 245, 46, 1, 0, 0, 0, 246, 247, 5, 47, 0, 0, 247, 48, 1, 0, 0, 0, 248, 253, 3, 41, 20, 0, 249, 253, 3, 43, 21, 0, 250, 253, 3, 45, 22, 0, 251, 253, 3, 47, 23, 0, 252, 248, 1, 0, 0, 0, 252, 249, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 252, 251, 1, 0, 0, 0, 253, 50, 1, 0, 0, 0, 254, 255, 5, 60, 0, 0, 255, 52, 1, 0, 0, 0, 256, 257, 5, 60, 0, 0, 257, 258, 5, 61, 0, 0, 258, 54, 1, 0, 0, 0, 259, 260, 5, 62, 0, 0, 260, 56, 1, 0, 0, 0, 261, 262, 5, 62, 0, 0, 262, 263, 5, 61, 0, 0, 263, 58, 1, 0, 0, 0, 264, 265, 5, 61, 0, 0, 265, 266, 5, 61, 0, 0, 266, 60, 1, 0, 0, 0, 267, 273, 3, 51, 25, 0, 268, 273, 3, 53, 26, 0, 269, 273, 3, 55, 27, 0, 270, 273, 3, 57, 28, 0, 271, 273, 3, 59, 29, 0, 272, 267, 1, 0, 0, 0, 272, 268, 1, 0, 0, 0, 272, 269, 1, 0, 0, 0, 272, 270, 1, 0, 0, 0, 272, 271, 1, 0, 0, 0, 273, 62, 1, 0, 0, 0, 274, 275, 5, 45, 0, 0, 275, 276, 5, 62, 0, 0, 276, 64, 1, 0, 0, 0, 277, 278, 5, 66, 0, 0, 278, 279, 5, 126, 0, 0, 279, 66, 1, 0, 0, 0, 280, 281, 5, 65, 0, 0, 281, 282, 5, 126, 0, 0, 282, 68, 1, 0, 0, 0, 283, 284, 5, 61, 0, 0, 284, 70, 1, 0, 0, 0, 285, 286, 5, 42, 0, 0, 286, 287, 5, 61, 0, 0, 287, 72, 1, 0, 0, 0, 288, 289, 5, 40, 0, 0, 289, 74, 1, 0, 0, 0, 290, 291, 5, 41, 0, 0, 291, 76, 1, 0, 0, 0, 292, 293, 5, 91, 0, 0, 293, 78, 1, 0, 0, 0, 294, 295, 5, 93, 0, 0, 295, 80, 1, 0, 0, 0, 296, 297, 5, 123, 0, 0, 297, 82, 1, 0, 0, 0, 298, 299, 5, 125, 0, 0, 299, 84, 1, 0, 0, 0, 300, 301, 5, 44, 0, 0, 301, 86, 1, 0, 0, 0, 302, 303, 5, 46, 0, 0, 303, 88, 1, 0, 0, 0, 304, 305, 5, 59, 0, 0, 305, 90, 1, 0, 0, 0, 306, 307, 5, 95, 0, 0, 307, 92, 1, 0, 0, 0, 308, 309, 5, 35, 0, 0, 309, 94, 1, 0, 0, 0, 310, 311, 5, 34, 0, 0, 311, 96, 1, 0, 0, 0, 312, 317, 3, 115, 57, 0, 313, 317, 3, 117, 58, 0, 314, 317, 3, 99, 49, 0, 315, 317, 3, 101, 50, 0, 316, 312, 1, 0, 0, 0, 316, 313, 1, 0, 0, 0, 316, 314, 1, 0, 0, 0, 316, 315, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 319, 6, 48, 0, 0, 319, 98, 1, 0, 0, 0, 320, 321, 5, 47, 0, 0, 321, 322, 5, 47, 0, 0, 322, 326, 1, 0, 0, 0, 323, 325, 8, 0, 0, 0, 324, 323, 1, 0, 0, 0, 325, 328, 1, 0, 0, 0, 326, 324, 1, 0, 0, 0, 326, 327, 1, 0, 0, 0, 327, 100, 1, 0, 0, 0, 328, 326, 1, 0, 0, 0, 329, 330, 5, 47, 0, 0, 330, 331, 5, 42, 0, 0, 331, 335, 1, 0, 0, 0, 332, 334, 9, 0, 0, 0, 333, 332, 1, 0, 0, 0, 334, 337, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 335, 333, 1, 0, 0, 0, 336, 338, 1, 0, 0, 0, 337, 335, 1, 0, 0, 0, 338, 339, 5, 42, 0, 0, 339, 340, 5, 47, 0, 0, 340, 102, 1, 0, 0, 0, 341, 343, 3, 111, 55, 0, 342, 341, 1, 0, 0, 0, 343, 344, 1, 0, 0, 0, 344, 342, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 104, 1, 0, 0, 0, 346, 350, 3, 95, 47, 0, 347, 349, 8, 1, 0, 0, 348, 347, 1, 0, 0, 0, 349, 352, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 353, 1, 0, 0, 0, 352, 350, 1, 0, 0, 0, 353, 354, 3, 95, 47, 0, 354, 106, 1, 0, 0, 0, 355, 361, 3, 109, 54, 0, 356, 360, 3, 109, 54, 0, 357, 360, 3, 103, 51, 0, 358, 360, 3, 91, 45, 0, 359, 356, 1, 0, 0, 0, 359, 357, 1, 0, 0, 0, 359, 358, 1, 0, 0, 0, 360, 363, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 108, 1, 0, 0, 0, 363, 361, 1, 0, 0, 0, 364, 365, 7, 2, 0, 0, 365, 110, 1, 0, 0, 0, 366, 367, 7, 3, 0, 0, 367, 112, 1, 0, 0, 0, 368, 369, 7, 4, 0, 0, 369, 114, 1, 0, 0, 0, 370, 372, 7, 5, 0, 0, 371, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 371, 1, 0, 0, 0, 373, 374, 1, 0, 0, 0, 374, 116, 1, 0, 0, 0, 375, 377, 7, 0, 0, 0, 376, 375, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 382, 1, 0, 0, 0, 380, 382, 5, 0, 0, 1, 381, 376, 1, 0, 0, 0, 381, 380, 1, 0, 0, 0, 382, 118, 1, 0, 0, 0, 15, 0, 234, 238, 252, 272, 316, 326, 335, 344, 350, 359, 361, 373, 378, 381, 1, 6, 0, 0]
\ No newline at end of file
diff --git a/Crimson/Antlr/Output/CrimsonLexer.tokens b/Crimson/Antlr/Output/CrimsonLexer.tokens
index 543c367..5677047 100644
--- a/Crimson/Antlr/Output/CrimsonLexer.tokens
+++ b/Crimson/Antlr/Output/CrimsonLexer.tokens
@@ -1,76 +1,78 @@
Allocator=1
Function=2
Global=3
-Return=4
-Structure=5
-Using=6
-OpHandler=7
-As=8
-If=9
-While=10
-Else=11
-Elif=12
-Integer=13
-Boolean=14
-Null=15
-BooleanValue=16
-Operator=17
-Asterisk=18
-MathsOperator=19
-Comparator=20
-RightArrow=21
-BasicCall=22
-AssemblyCall=23
-DirectEquals=24
-PointerEquals=25
-OpenBracket=26
-CloseBracket=27
-OpenSquare=28
-CloseSquare=29
-OpenBrace=30
-CloseBrace=31
-Comma=32
-Dot=33
-SemiColon=34
-Underscore=35
-Hashtag=36
-Quote=37
-SkipTokens=38
-LineComment=39
-BlockComment=40
-Number=41
-String=42
-ShortName=43
+Scoped=4
+Return=5
+Structure=6
+Using=7
+OpHandler=8
+As=9
+If=10
+While=11
+Else=12
+Elif=13
+Integer=14
+Boolean=15
+Null=16
+BooleanValue=17
+Operator=18
+Asterisk=19
+MathsOperator=20
+Comparator=21
+RightArrow=22
+BasicCall=23
+AssemblyCall=24
+DirectEquals=25
+PointerEquals=26
+OpenBracket=27
+CloseBracket=28
+OpenSquare=29
+CloseSquare=30
+OpenBrace=31
+CloseBrace=32
+Comma=33
+Dot=34
+SemiColon=35
+Underscore=36
+Hashtag=37
+Quote=38
+SkipTokens=39
+LineComment=40
+BlockComment=41
+Number=42
+String=43
+ShortName=44
'allocator'=1
'function'=2
'global'=3
-'return'=4
-'structure'=5
-'using'=6
-'ophandler'=7
-'as'=8
-'if'=9
-'while'=10
-'else'=11
-'elif'=12
-'int'=13
-'bool'=14
-'null'=15
-'*'=18
-'->'=21
-'B~'=22
-'A~'=23
-'='=24
-'*='=25
-'('=26
-')'=27
-'['=28
-']'=29
-'{'=30
-'}'=31
-','=32
-'.'=33
-';'=34
-'_'=35
-'#'=36
-'"'=37
+'scoped'=4
+'return'=5
+'structure'=6
+'using'=7
+'ophandler'=8
+'as'=9
+'if'=10
+'while'=11
+'else'=12
+'elif'=13
+'int'=14
+'bool'=15
+'null'=16
+'*'=19
+'->'=22
+'B~'=23
+'A~'=24
+'='=25
+'*='=26
+'('=27
+')'=28
+'['=29
+']'=30
+'{'=31
+'}'=32
+','=33
+'.'=34
+';'=35
+'_'=36
+'#'=37
+'"'=38
diff --git a/Crimson/Antlr/Output/CrimsonListener.cs b/Crimson/Antlr/Output/CrimsonListener.cs
index ae0b21d..9b376ef 100644
--- a/Crimson/Antlr/Output/CrimsonListener.cs
+++ b/Crimson/Antlr/Output/CrimsonListener.cs
@@ -32,15 +32,15 @@ namespace Crimson.AntlrBuild {
[System.CLSCompliant(false)]
public interface ICrimsonListener : IParseTreeListener {
///
- /// Enter a parse tree produced by .
+ /// Enter a parse tree produced by .
///
/// The parse tree.
- void EnterTranslationUnit([NotNull] CrimsonParser.TranslationUnitContext context);
+ void EnterScope([NotNull] CrimsonParser.ScopeContext context);
///
- /// Exit a parse tree produced by .
+ /// Exit a parse tree produced by .
///
/// The parse tree.
- void ExitTranslationUnit([NotNull] CrimsonParser.TranslationUnitContext context);
+ void ExitScope([NotNull] CrimsonParser.ScopeContext context);
///
/// Enter a parse tree produced by .
///
@@ -62,177 +62,137 @@ public interface ICrimsonListener : IParseTreeListener {
/// The parse tree.
void ExitOperationHandler([NotNull] CrimsonParser.OperationHandlerContext context);
///
- /// Enter a parse tree produced by the GlobalVariableUnitStatement
- /// labeled alternative in .
- ///
- /// The parse tree.
- void EnterGlobalVariableUnitStatement([NotNull] CrimsonParser.GlobalVariableUnitStatementContext context);
- ///
- /// Exit a parse tree produced by the GlobalVariableUnitStatement
- /// labeled alternative in .
- ///
- /// The parse tree.
- void ExitGlobalVariableUnitStatement([NotNull] CrimsonParser.GlobalVariableUnitStatementContext context);
- ///
- /// Enter a parse tree produced by the FunctionUnitStatement
- /// labeled alternative in .
- ///
- /// The parse tree.
- void EnterFunctionUnitStatement([NotNull] CrimsonParser.FunctionUnitStatementContext context);
- ///
- /// Exit a parse tree produced by the FunctionUnitStatement
- /// labeled alternative in .
- ///
- /// The parse tree.
- void ExitFunctionUnitStatement([NotNull] CrimsonParser.FunctionUnitStatementContext context);
- ///
- /// Enter a parse tree produced by the StructureUnitStatement
- /// labeled alternative in .
- ///
- /// The parse tree.
- void EnterStructureUnitStatement([NotNull] CrimsonParser.StructureUnitStatementContext context);
- ///
- /// Exit a parse tree produced by the StructureUnitStatement
- /// labeled alternative in .
- ///
- /// The parse tree.
- void ExitStructureUnitStatement([NotNull] CrimsonParser.StructureUnitStatementContext context);
- ///
- /// Enter a parse tree produced by .
- ///
- /// The parse tree.
- void EnterGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context);
- ///
- /// Exit a parse tree produced by .
- ///
- /// The parse tree.
- void ExitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context);
- ///
- /// Enter a parse tree produced by .
+ /// Enter a parse tree produced by the VariableDeclarationStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void EnterFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context);
+ void EnterVariableDeclarationStatement([NotNull] CrimsonParser.VariableDeclarationStatementContext context);
///
- /// Exit a parse tree produced by .
+ /// Exit a parse tree produced by the VariableDeclarationStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void ExitFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context);
+ void ExitVariableDeclarationStatement([NotNull] CrimsonParser.VariableDeclarationStatementContext context);
///
- /// Enter a parse tree produced by .
+ /// Enter a parse tree produced by the ReturnStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void EnterFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context);
+ void EnterReturnStatement([NotNull] CrimsonParser.ReturnStatementContext context);
///
- /// Exit a parse tree produced by .
+ /// Exit a parse tree produced by the ReturnStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void ExitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context);
+ void ExitReturnStatement([NotNull] CrimsonParser.ReturnStatementContext context);
///
- /// Enter a parse tree produced by .
+ /// Enter a parse tree produced by the AssignVariableStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void EnterScope([NotNull] CrimsonParser.ScopeContext context);
+ void EnterAssignVariableStatement([NotNull] CrimsonParser.AssignVariableStatementContext context);
///
- /// Exit a parse tree produced by .
+ /// Exit a parse tree produced by the AssignVariableStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void ExitScope([NotNull] CrimsonParser.ScopeContext context);
+ void ExitAssignVariableStatement([NotNull] CrimsonParser.AssignVariableStatementContext context);
///
- /// Enter a parse tree produced by the FunctionVariableDeclarationStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the FunctionCallStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void EnterFunctionVariableDeclarationStatement([NotNull] CrimsonParser.FunctionVariableDeclarationStatementContext context);
+ void EnterFunctionCallStatement([NotNull] CrimsonParser.FunctionCallStatementContext context);
///
- /// Exit a parse tree produced by the FunctionVariableDeclarationStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the FunctionCallStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void ExitFunctionVariableDeclarationStatement([NotNull] CrimsonParser.FunctionVariableDeclarationStatementContext context);
+ void ExitFunctionCallStatement([NotNull] CrimsonParser.FunctionCallStatementContext context);
///
- /// Enter a parse tree produced by the FunctionReturnStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the IfStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void EnterFunctionReturnStatement([NotNull] CrimsonParser.FunctionReturnStatementContext context);
+ void EnterIfStatement([NotNull] CrimsonParser.IfStatementContext context);
///
- /// Exit a parse tree produced by the FunctionReturnStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the IfStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void ExitFunctionReturnStatement([NotNull] CrimsonParser.FunctionReturnStatementContext context);
+ void ExitIfStatement([NotNull] CrimsonParser.IfStatementContext context);
///
- /// Enter a parse tree produced by the FunctionAssignVariableStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the WhileStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void EnterFunctionAssignVariableStatement([NotNull] CrimsonParser.FunctionAssignVariableStatementContext context);
+ void EnterWhileStatement([NotNull] CrimsonParser.WhileStatementContext context);
///
- /// Exit a parse tree produced by the FunctionAssignVariableStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the WhileStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void ExitFunctionAssignVariableStatement([NotNull] CrimsonParser.FunctionAssignVariableStatementContext context);
+ void ExitWhileStatement([NotNull] CrimsonParser.WhileStatementContext context);
///
- /// Enter a parse tree produced by the FunctionFunctionCallStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the BasicCallStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void EnterFunctionFunctionCallStatement([NotNull] CrimsonParser.FunctionFunctionCallStatementContext context);
+ void EnterBasicCallStatement([NotNull] CrimsonParser.BasicCallStatementContext context);
///
- /// Exit a parse tree produced by the FunctionFunctionCallStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the BasicCallStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void ExitFunctionFunctionCallStatement([NotNull] CrimsonParser.FunctionFunctionCallStatementContext context);
+ void ExitBasicCallStatement([NotNull] CrimsonParser.BasicCallStatementContext context);
///
- /// Enter a parse tree produced by the FunctionIfStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the AssemblyCallStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void EnterFunctionIfStatement([NotNull] CrimsonParser.FunctionIfStatementContext context);
+ void EnterAssemblyCallStatement([NotNull] CrimsonParser.AssemblyCallStatementContext context);
///
- /// Exit a parse tree produced by the FunctionIfStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the AssemblyCallStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void ExitFunctionIfStatement([NotNull] CrimsonParser.FunctionIfStatementContext context);
+ void ExitAssemblyCallStatement([NotNull] CrimsonParser.AssemblyCallStatementContext context);
///
- /// Enter a parse tree produced by the FunctionWhileStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the GlobalVariableStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void EnterFunctionWhileStatement([NotNull] CrimsonParser.FunctionWhileStatementContext context);
+ void EnterGlobalVariableStatement([NotNull] CrimsonParser.GlobalVariableStatementContext context);
///
- /// Exit a parse tree produced by the FunctionWhileStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the GlobalVariableStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void ExitFunctionWhileStatement([NotNull] CrimsonParser.FunctionWhileStatementContext context);
+ void ExitGlobalVariableStatement([NotNull] CrimsonParser.GlobalVariableStatementContext context);
///
- /// Enter a parse tree produced by the FunctionBasicCallStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the FunctionDeclarationStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void EnterFunctionBasicCallStatement([NotNull] CrimsonParser.FunctionBasicCallStatementContext context);
+ void EnterFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context);
///
- /// Exit a parse tree produced by the FunctionBasicCallStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the FunctionDeclarationStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void ExitFunctionBasicCallStatement([NotNull] CrimsonParser.FunctionBasicCallStatementContext context);
+ void ExitFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context);
///
- /// Enter a parse tree produced by the FunctionAssemblyCallStatement
- /// labeled alternative in .
+ /// Enter a parse tree produced by the StructureDeclarationStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void EnterFunctionAssemblyCallStatement([NotNull] CrimsonParser.FunctionAssemblyCallStatementContext context);
+ void EnterStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context);
///
- /// Exit a parse tree produced by the FunctionAssemblyCallStatement
- /// labeled alternative in .
+ /// Exit a parse tree produced by the StructureDeclarationStatement
+ /// labeled alternative in .
///
/// The parse tree.
- void ExitFunctionAssemblyCallStatement([NotNull] CrimsonParser.FunctionAssemblyCallStatementContext context);
+ void ExitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context);
///
/// Enter a parse tree produced by .
///
@@ -338,6 +298,46 @@ public interface ICrimsonListener : IParseTreeListener {
/// The parse tree.
void ExitAssemblyCall([NotNull] CrimsonParser.AssemblyCallContext context);
///
+ /// Enter a parse tree produced by .
+ ///
+ /// The parse tree.
+ void EnterGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context);
+ ///
+ /// Exit a parse tree produced by .
+ ///
+ /// The parse tree.
+ void ExitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context);
+ ///
+ /// Enter a parse tree produced by .
+ ///
+ /// The parse tree.
+ void EnterScopedVariableDeclaration([NotNull] CrimsonParser.ScopedVariableDeclarationContext context);
+ ///
+ /// Exit a parse tree produced by .
+ ///
+ /// The parse tree.
+ void ExitScopedVariableDeclaration([NotNull] CrimsonParser.ScopedVariableDeclarationContext context);
+ ///
+ /// Enter a parse tree produced by .
+ ///
+ /// The parse tree.
+ void EnterFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context);
+ ///
+ /// Exit a parse tree produced by .
+ ///
+ /// The parse tree.
+ void ExitFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context);
+ ///
+ /// Enter a parse tree produced by .
+ ///
+ /// The parse tree.
+ void EnterFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context);
+ ///
+ /// Exit a parse tree produced by .
+ ///
+ /// The parse tree.
+ void ExitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context);
+ ///
/// Enter a parse tree produced by .
///
/// The parse tree.
diff --git a/Crimson/Antlr/Output/CrimsonParser.cs b/Crimson/Antlr/Output/CrimsonParser.cs
index 3d32a86..6cd9a3b 100644
--- a/Crimson/Antlr/Output/CrimsonParser.cs
+++ b/Crimson/Antlr/Output/CrimsonParser.cs
@@ -37,49 +37,50 @@ public partial class CrimsonParser : Parser {
protected static DFA[] decisionToDFA;
protected static PredictionContextCache sharedContextCache = new PredictionContextCache();
public const int
- Allocator=1, Function=2, Global=3, Return=4, Structure=5, Using=6, OpHandler=7,
- As=8, If=9, While=10, Else=11, Elif=12, Integer=13, Boolean=14, Null=15,
- BooleanValue=16, Operator=17, Asterisk=18, MathsOperator=19, Comparator=20,
- RightArrow=21, BasicCall=22, AssemblyCall=23, DirectEquals=24, PointerEquals=25,
- OpenBracket=26, CloseBracket=27, OpenSquare=28, CloseSquare=29, OpenBrace=30,
- CloseBrace=31, Comma=32, Dot=33, SemiColon=34, Underscore=35, Hashtag=36,
- Quote=37, SkipTokens=38, LineComment=39, BlockComment=40, Number=41, String=42,
- ShortName=43;
+ Allocator=1, Function=2, Global=3, Scoped=4, Return=5, Structure=6, Using=7,
+ OpHandler=8, As=9, If=10, While=11, Else=12, Elif=13, Integer=14, Boolean=15,
+ Null=16, BooleanValue=17, Operator=18, Asterisk=19, MathsOperator=20,
+ Comparator=21, RightArrow=22, BasicCall=23, AssemblyCall=24, DirectEquals=25,
+ PointerEquals=26, OpenBracket=27, CloseBracket=28, OpenSquare=29, CloseSquare=30,
+ OpenBrace=31, CloseBrace=32, Comma=33, Dot=34, SemiColon=35, Underscore=36,
+ Hashtag=37, Quote=38, SkipTokens=39, LineComment=40, BlockComment=41,
+ Number=42, String=43, ShortName=44;
public const int
- RULE_translationUnit = 0, RULE_importUnit = 1, RULE_operationHandler = 2,
- RULE_globalStatement = 3, RULE_globalVariableDeclaration = 4, RULE_functionDeclaration = 5,
- RULE_functionHeader = 6, RULE_scope = 7, RULE_internalStatement = 8, RULE_internalVariableDeclaration = 9,
- RULE_assignVariable = 10, RULE_ifBlock = 11, RULE_whileBlock = 12, RULE_condition = 13,
- RULE_elseIfBlock = 14, RULE_elseBlock = 15, RULE_basicCall = 16, RULE_assemblyCall = 17,
- RULE_functionCall = 18, RULE_arguments = 19, RULE_functionReturn = 20,
- RULE_simpleValue = 21, RULE_complexValue = 22, RULE_rawValue = 23, RULE_operation = 24,
- RULE_parameterList = 25, RULE_parameter = 26, RULE_structureDeclaration = 27,
- RULE_structureBody = 28, RULE_type = 29, RULE_array = 30, RULE_fullName = 31;
+ RULE_scope = 0, RULE_importUnit = 1, RULE_operationHandler = 2, RULE_statement = 3,
+ RULE_internalVariableDeclaration = 4, RULE_assignVariable = 5, RULE_ifBlock = 6,
+ RULE_whileBlock = 7, RULE_condition = 8, RULE_elseIfBlock = 9, RULE_elseBlock = 10,
+ RULE_basicCall = 11, RULE_assemblyCall = 12, RULE_globalVariableDeclaration = 13,
+ RULE_scopedVariableDeclaration = 14, RULE_functionDeclaration = 15, RULE_functionHeader = 16,
+ RULE_functionCall = 17, RULE_arguments = 18, RULE_functionReturn = 19,
+ RULE_simpleValue = 20, RULE_complexValue = 21, RULE_rawValue = 22, RULE_operation = 23,
+ RULE_parameterList = 24, RULE_parameter = 25, RULE_structureDeclaration = 26,
+ RULE_structureBody = 27, RULE_type = 28, RULE_array = 29, RULE_fullName = 30;
public static readonly string[] ruleNames = {
- "translationUnit", "importUnit", "operationHandler", "globalStatement",
- "globalVariableDeclaration", "functionDeclaration", "functionHeader",
- "scope", "internalStatement", "internalVariableDeclaration", "assignVariable",
- "ifBlock", "whileBlock", "condition", "elseIfBlock", "elseBlock", "basicCall",
- "assemblyCall", "functionCall", "arguments", "functionReturn", "simpleValue",
- "complexValue", "rawValue", "operation", "parameterList", "parameter",
- "structureDeclaration", "structureBody", "type", "array", "fullName"
+ "scope", "importUnit", "operationHandler", "statement", "internalVariableDeclaration",
+ "assignVariable", "ifBlock", "whileBlock", "condition", "elseIfBlock",
+ "elseBlock", "basicCall", "assemblyCall", "globalVariableDeclaration",
+ "scopedVariableDeclaration", "functionDeclaration", "functionHeader",
+ "functionCall", "arguments", "functionReturn", "simpleValue", "complexValue",
+ "rawValue", "operation", "parameterList", "parameter", "structureDeclaration",
+ "structureBody", "type", "array", "fullName"
};
private static readonly string[] _LiteralNames = {
- null, "'allocator'", "'function'", "'global'", "'return'", "'structure'",
- "'using'", "'ophandler'", "'as'", "'if'", "'while'", "'else'", "'elif'",
- "'int'", "'bool'", "'null'", null, null, "'*'", null, null, "'->'", "'B~'",
- "'A~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'", "'}'", "','",
- "'.'", "';'", "'_'", "'#'", "'\"'"
+ null, "'allocator'", "'function'", "'global'", "'scoped'", "'return'",
+ "'structure'", "'using'", "'ophandler'", "'as'", "'if'", "'while'", "'else'",
+ "'elif'", "'int'", "'bool'", "'null'", null, null, "'*'", null, null,
+ "'->'", "'B~'", "'A~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'",
+ "'}'", "','", "'.'", "';'", "'_'", "'#'", "'\"'"
};
private static readonly string[] _SymbolicNames = {
- null, "Allocator", "Function", "Global", "Return", "Structure", "Using",
- "OpHandler", "As", "If", "While", "Else", "Elif", "Integer", "Boolean",
- "Null", "BooleanValue", "Operator", "Asterisk", "MathsOperator", "Comparator",
- "RightArrow", "BasicCall", "AssemblyCall", "DirectEquals", "PointerEquals",
- "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare", "OpenBrace",
- "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore", "Hashtag", "Quote",
- "SkipTokens", "LineComment", "BlockComment", "Number", "String", "ShortName"
+ null, "Allocator", "Function", "Global", "Scoped", "Return", "Structure",
+ "Using", "OpHandler", "As", "If", "While", "Else", "Elif", "Integer",
+ "Boolean", "Null", "BooleanValue", "Operator", "Asterisk", "MathsOperator",
+ "Comparator", "RightArrow", "BasicCall", "AssemblyCall", "DirectEquals",
+ "PointerEquals", "OpenBracket", "CloseBracket", "OpenSquare", "CloseSquare",
+ "OpenBrace", "CloseBrace", "Comma", "Dot", "SemiColon", "Underscore",
+ "Hashtag", "Quote", "SkipTokens", "LineComment", "BlockComment", "Number",
+ "String", "ShortName"
};
public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames);
@@ -113,15 +114,15 @@ public CrimsonParser(ITokenStream input, TextWriter output, TextWriter errorOutp
Interpreter = new ParserATNSimulator(this, _ATN, decisionToDFA, sharedContextCache);
}
- public partial class TranslationUnitContext : ParserRuleContext {
+ public partial class ScopeContext : ParserRuleContext {
public ImportUnitContext _importUnit;
public IList _imports = new List();
public OperationHandlerContext _operationHandler;
public IList _opHandlers = new List();
- public GlobalStatementContext _globalStatement;
- public IList _statements = new List();
- public IToken eof;
- [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Eof() { return GetToken(CrimsonParser.Eof, 0); }
+ public StatementContext _statement;
+ public IList _statements = new List();
+ [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpenBrace() { return GetToken(CrimsonParser.OpenBrace, 0); }
+ [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CloseBrace() { return GetToken(CrimsonParser.CloseBrace, 0); }
[System.Diagnostics.DebuggerNonUserCode] public ImportUnitContext[] importUnit() {
return GetRuleContexts();
}
@@ -134,93 +135,95 @@ [System.Diagnostics.DebuggerNonUserCode] public OperationHandlerContext[] operat
[System.Diagnostics.DebuggerNonUserCode] public OperationHandlerContext operationHandler(int i) {
return GetRuleContext(i);
}
- [System.Diagnostics.DebuggerNonUserCode] public GlobalStatementContext[] globalStatement() {
- return GetRuleContexts();
+ [System.Diagnostics.DebuggerNonUserCode] public StatementContext[] statement() {
+ return GetRuleContexts();
}
- [System.Diagnostics.DebuggerNonUserCode] public GlobalStatementContext globalStatement(int i) {
- return GetRuleContext(i);
+ [System.Diagnostics.DebuggerNonUserCode] public StatementContext statement(int i) {
+ return GetRuleContext(i);
}
- public TranslationUnitContext(ParserRuleContext parent, int invokingState)
+ public ScopeContext(ParserRuleContext parent, int invokingState)
: base(parent, invokingState)
{
}
- public override int RuleIndex { get { return RULE_translationUnit; } }
+ public override int RuleIndex { get { return RULE_scope; } }
[System.Diagnostics.DebuggerNonUserCode]
public override void EnterRule(IParseTreeListener listener) {
ICrimsonListener typedListener = listener as ICrimsonListener;
- if (typedListener != null) typedListener.EnterTranslationUnit(this);
+ if (typedListener != null) typedListener.EnterScope(this);
}
[System.Diagnostics.DebuggerNonUserCode]
public override void ExitRule(IParseTreeListener listener) {
ICrimsonListener typedListener = listener as ICrimsonListener;
- if (typedListener != null) typedListener.ExitTranslationUnit(this);
+ if (typedListener != null) typedListener.ExitScope(this);
}
[System.Diagnostics.DebuggerNonUserCode]
public override TResult Accept