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(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitTranslationUnit(this); + if (typedVisitor != null) return typedVisitor.VisitScope(this); else return visitor.VisitChildren(this); } } [RuleVersion(0)] - public TranslationUnitContext translationUnit() { - TranslationUnitContext _localctx = new TranslationUnitContext(Context, State); - EnterRule(_localctx, 0, RULE_translationUnit); + public ScopeContext scope() { + ScopeContext _localctx = new ScopeContext(Context, State); + EnterRule(_localctx, 0, RULE_scope); int _la; try { int _alt; EnterOuterAlt(_localctx, 1); { - State = 67; + State = 62; + Match(OpenBrace); + State = 66; 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 = 64; + State = 63; _localctx._importUnit = importUnit(); _localctx._imports.Add(_localctx._importUnit); } } } - State = 69; + State = 68; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,0,Context); } - State = 73; + State = 72; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==Hashtag) { { { - State = 70; + State = 69; _localctx._operationHandler = operationHandler(); _localctx._opHandlers.Add(_localctx._operationHandler); } } - State = 75; + State = 74; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 79; + State = 78; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - while (((_la) & ~0x3f) == 0 && ((1L << _la) & 44L) != 0) { + while (((_la) & ~0x3f) == 0 && ((1L << _la) & 17592748199020L) != 0) { { { - State = 76; - _localctx._globalStatement = globalStatement(); - _localctx._statements.Add(_localctx._globalStatement); + State = 75; + _localctx._statement = statement(); + _localctx._statements.Add(_localctx._statement); } } - State = 81; + State = 80; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 82; - _localctx.eof = Match(Eof); + State = 81; + Match(CloseBrace); } } catch (RecognitionException re) { @@ -275,17 +278,17 @@ public ImportUnitContext importUnit() { try { EnterOuterAlt(_localctx, 1); { - State = 84; + State = 83; Match(Hashtag); - State = 85; + State = 84; Match(Using); - State = 86; + State = 85; _localctx.path = Match(String); - State = 87; + State = 86; Match(As); - State = 88; + State = 87; _localctx.identifier = fullName(); - State = 89; + State = 88; Match(SemiColon); } } @@ -353,29 +356,29 @@ public OperationHandlerContext operationHandler() { try { EnterOuterAlt(_localctx, 1); { - State = 91; + State = 90; Match(Hashtag); - State = 92; + State = 91; Match(OpHandler); - State = 93; + State = 92; Match(OpenBracket); - State = 94; + State = 93; _localctx.t1 = type(); - State = 95; + State = 94; _localctx.op = Match(Operator); - State = 96; + State = 95; _localctx.t2 = type(); - State = 97; + State = 96; Match(CloseBracket); - State = 98; + State = 97; Match(RightArrow); - State = 99; + State = 98; Match(OpenBrace); - State = 100; + State = 99; _localctx.identifier = fullName(); - State = 101; + State = 100; Match(CloseBrace); - State = 102; + State = 101; Match(SemiColon); } } @@ -390,644 +393,360 @@ public OperationHandlerContext operationHandler() { return _localctx; } - public partial class GlobalStatementContext : ParserRuleContext { - public GlobalStatementContext(ParserRuleContext parent, int invokingState) + public partial class StatementContext : ParserRuleContext { + public StatementContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { } - public override int RuleIndex { get { return RULE_globalStatement; } } + public override int RuleIndex { get { return RULE_statement; } } - public GlobalStatementContext() { } - public virtual void CopyFrom(GlobalStatementContext context) { + public StatementContext() { } + public virtual void CopyFrom(StatementContext context) { base.CopyFrom(context); } } - public partial class GlobalVariableUnitStatementContext : GlobalStatementContext { - [System.Diagnostics.DebuggerNonUserCode] public GlobalVariableDeclarationContext globalVariableDeclaration() { - return GetRuleContext(0); - } - public GlobalVariableUnitStatementContext(GlobalStatementContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override void EnterRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterGlobalVariableUnitStatement(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override void ExitRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitGlobalVariableUnitStatement(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitGlobalVariableUnitStatement(this); - else return visitor.VisitChildren(this); - } - } - public partial class FunctionUnitStatementContext : GlobalStatementContext { - [System.Diagnostics.DebuggerNonUserCode] public FunctionDeclarationContext functionDeclaration() { - return GetRuleContext(0); - } - public FunctionUnitStatementContext(GlobalStatementContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override void EnterRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterFunctionUnitStatement(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override void ExitRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitFunctionUnitStatement(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitFunctionUnitStatement(this); - else return visitor.VisitChildren(this); - } - } - public partial class StructureUnitStatementContext : GlobalStatementContext { + public partial class StructureDeclarationStatementContext : StatementContext { [System.Diagnostics.DebuggerNonUserCode] public StructureDeclarationContext structureDeclaration() { return GetRuleContext(0); } - public StructureUnitStatementContext(GlobalStatementContext context) { CopyFrom(context); } + public StructureDeclarationStatementContext(StatementContext context) { CopyFrom(context); } [System.Diagnostics.DebuggerNonUserCode] public override void EnterRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterStructureUnitStatement(this); + if (typedListener != null) typedListener.EnterStructureDeclarationStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override void ExitRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitStructureUnitStatement(this); + if (typedListener != null) typedListener.ExitStructureDeclarationStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override TResult Accept(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitStructureUnitStatement(this); + if (typedVisitor != null) return typedVisitor.VisitStructureDeclarationStatement(this); else return visitor.VisitChildren(this); } } - - [RuleVersion(0)] - public GlobalStatementContext globalStatement() { - GlobalStatementContext _localctx = new GlobalStatementContext(Context, State); - EnterRule(_localctx, 6, RULE_globalStatement); - try { - State = 107; - ErrorHandler.Sync(this); - switch (TokenStream.LA(1)) { - case Global: - _localctx = new GlobalVariableUnitStatementContext(_localctx); - EnterOuterAlt(_localctx, 1); - { - State = 104; - globalVariableDeclaration(); - } - break; - case Function: - _localctx = new FunctionUnitStatementContext(_localctx); - EnterOuterAlt(_localctx, 2); - { - State = 105; - functionDeclaration(); - } - break; - case Structure: - _localctx = new StructureUnitStatementContext(_localctx); - EnterOuterAlt(_localctx, 3); - { - State = 106; - structureDeclaration(); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class GlobalVariableDeclarationContext : ParserRuleContext { - public InternalVariableDeclarationContext declaration; - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Global() { return GetToken(CrimsonParser.Global, 0); } - [System.Diagnostics.DebuggerNonUserCode] public InternalVariableDeclarationContext internalVariableDeclaration() { - return GetRuleContext(0); - } - public GlobalVariableDeclarationContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { + public partial class IfStatementContext : StatementContext { + [System.Diagnostics.DebuggerNonUserCode] public IfBlockContext ifBlock() { + return GetRuleContext(0); } - public override int RuleIndex { get { return RULE_globalVariableDeclaration; } } + public IfStatementContext(StatementContext context) { CopyFrom(context); } [System.Diagnostics.DebuggerNonUserCode] public override void EnterRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterGlobalVariableDeclaration(this); + if (typedListener != null) typedListener.EnterIfStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override void ExitRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitGlobalVariableDeclaration(this); + if (typedListener != null) typedListener.ExitIfStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override TResult Accept(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitGlobalVariableDeclaration(this); + if (typedVisitor != null) return typedVisitor.VisitIfStatement(this); else return visitor.VisitChildren(this); } } - - [RuleVersion(0)] - public GlobalVariableDeclarationContext globalVariableDeclaration() { - GlobalVariableDeclarationContext _localctx = new GlobalVariableDeclarationContext(Context, State); - EnterRule(_localctx, 8, RULE_globalVariableDeclaration); - try { - EnterOuterAlt(_localctx, 1); - { - State = 109; - Match(Global); - State = 110; - _localctx.declaration = internalVariableDeclaration(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class FunctionDeclarationContext : ParserRuleContext { - public TypeContext returnType; - public FunctionHeaderContext header; - public ScopeContext body; - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Function() { return GetToken(CrimsonParser.Function, 0); } - [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public FunctionHeaderContext functionHeader() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ScopeContext scope() { - return GetRuleContext(0); - } - public FunctionDeclarationContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { + public partial class AssignVariableStatementContext : StatementContext { + [System.Diagnostics.DebuggerNonUserCode] public AssignVariableContext assignVariable() { + return GetRuleContext(0); } - public override int RuleIndex { get { return RULE_functionDeclaration; } } + public AssignVariableStatementContext(StatementContext context) { CopyFrom(context); } [System.Diagnostics.DebuggerNonUserCode] public override void EnterRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterFunctionDeclaration(this); + if (typedListener != null) typedListener.EnterAssignVariableStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override void ExitRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitFunctionDeclaration(this); + if (typedListener != null) typedListener.ExitAssignVariableStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override TResult Accept(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitFunctionDeclaration(this); + if (typedVisitor != null) return typedVisitor.VisitAssignVariableStatement(this); else return visitor.VisitChildren(this); } } - - [RuleVersion(0)] - public FunctionDeclarationContext functionDeclaration() { - FunctionDeclarationContext _localctx = new FunctionDeclarationContext(Context, State); - EnterRule(_localctx, 10, RULE_functionDeclaration); - try { - EnterOuterAlt(_localctx, 1); - { - State = 112; - Match(Function); - State = 113; - _localctx.returnType = type(); - State = 114; - _localctx.header = functionHeader(); - State = 115; - _localctx.body = scope(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class FunctionHeaderContext : ParserRuleContext { - public FullNameContext name; - public ParameterListContext parameters; - [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ParameterListContext parameterList() { - return GetRuleContext(0); - } - public FunctionHeaderContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { + public partial class GlobalVariableStatementContext : StatementContext { + [System.Diagnostics.DebuggerNonUserCode] public GlobalVariableDeclarationContext globalVariableDeclaration() { + return GetRuleContext(0); } - public override int RuleIndex { get { return RULE_functionHeader; } } + public GlobalVariableStatementContext(StatementContext context) { CopyFrom(context); } [System.Diagnostics.DebuggerNonUserCode] public override void EnterRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterFunctionHeader(this); + if (typedListener != null) typedListener.EnterGlobalVariableStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override void ExitRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitFunctionHeader(this); + if (typedListener != null) typedListener.ExitGlobalVariableStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override TResult Accept(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitFunctionHeader(this); + if (typedVisitor != null) return typedVisitor.VisitGlobalVariableStatement(this); else return visitor.VisitChildren(this); } } - - [RuleVersion(0)] - public FunctionHeaderContext functionHeader() { - FunctionHeaderContext _localctx = new FunctionHeaderContext(Context, State); - EnterRule(_localctx, 12, RULE_functionHeader); - try { - EnterOuterAlt(_localctx, 1); - { - State = 117; - _localctx.name = fullName(); - State = 118; - _localctx.parameters = parameterList(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class ScopeContext : ParserRuleContext { - public InternalStatementContext _internalStatement; - 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 InternalStatementContext[] internalStatement() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public InternalStatementContext internalStatement(int i) { - return GetRuleContext(i); - } - public ScopeContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { + public partial class AssemblyCallStatementContext : StatementContext { + [System.Diagnostics.DebuggerNonUserCode] public AssemblyCallContext assemblyCall() { + return GetRuleContext(0); } - public override int RuleIndex { get { return RULE_scope; } } + public AssemblyCallStatementContext(StatementContext context) { CopyFrom(context); } [System.Diagnostics.DebuggerNonUserCode] public override void EnterRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterScope(this); + if (typedListener != null) typedListener.EnterAssemblyCallStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override void ExitRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitScope(this); + if (typedListener != null) typedListener.ExitAssemblyCallStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override TResult Accept(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitScope(this); + if (typedVisitor != null) return typedVisitor.VisitAssemblyCallStatement(this); else return visitor.VisitChildren(this); } } - - [RuleVersion(0)] - public ScopeContext scope() { - ScopeContext _localctx = new ScopeContext(Context, State); - EnterRule(_localctx, 14, RULE_scope); - int _la; - try { - EnterOuterAlt(_localctx, 1); - { - State = 120; - Match(OpenBrace); - State = 124; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - while (((_la) & ~0x3f) == 0 && ((1L << _la) & 8796374099472L) != 0) { - { - { - State = 121; - _localctx._internalStatement = internalStatement(); - _localctx._statements.Add(_localctx._internalStatement); - } - } - State = 126; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - } - State = 127; - Match(CloseBrace); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class InternalStatementContext : ParserRuleContext { - public InternalStatementContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_internalStatement; } } - - public InternalStatementContext() { } - public virtual void CopyFrom(InternalStatementContext context) { - base.CopyFrom(context); - } - } - public partial class FunctionAssignVariableStatementContext : InternalStatementContext { - [System.Diagnostics.DebuggerNonUserCode] public AssignVariableContext assignVariable() { - return GetRuleContext(0); + public partial class ReturnStatementContext : StatementContext { + [System.Diagnostics.DebuggerNonUserCode] public FunctionReturnContext functionReturn() { + return GetRuleContext(0); } - public FunctionAssignVariableStatementContext(InternalStatementContext context) { CopyFrom(context); } + public ReturnStatementContext(StatementContext context) { CopyFrom(context); } [System.Diagnostics.DebuggerNonUserCode] public override void EnterRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterFunctionAssignVariableStatement(this); + if (typedListener != null) typedListener.EnterReturnStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override void ExitRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitFunctionAssignVariableStatement(this); + if (typedListener != null) typedListener.ExitReturnStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override TResult Accept(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitFunctionAssignVariableStatement(this); + if (typedVisitor != null) return typedVisitor.VisitReturnStatement(this); else return visitor.VisitChildren(this); } } - public partial class FunctionFunctionCallStatementContext : InternalStatementContext { + public partial class FunctionCallStatementContext : StatementContext { [System.Diagnostics.DebuggerNonUserCode] public FunctionCallContext functionCall() { return GetRuleContext(0); } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SemiColon() { return GetToken(CrimsonParser.SemiColon, 0); } - public FunctionFunctionCallStatementContext(InternalStatementContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override void EnterRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterFunctionFunctionCallStatement(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override void ExitRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitFunctionFunctionCallStatement(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitFunctionFunctionCallStatement(this); - else return visitor.VisitChildren(this); - } - } - public partial class FunctionReturnStatementContext : InternalStatementContext { - [System.Diagnostics.DebuggerNonUserCode] public FunctionReturnContext functionReturn() { - return GetRuleContext(0); - } - public FunctionReturnStatementContext(InternalStatementContext context) { CopyFrom(context); } + public FunctionCallStatementContext(StatementContext context) { CopyFrom(context); } [System.Diagnostics.DebuggerNonUserCode] public override void EnterRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterFunctionReturnStatement(this); + if (typedListener != null) typedListener.EnterFunctionCallStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override void ExitRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitFunctionReturnStatement(this); + if (typedListener != null) typedListener.ExitFunctionCallStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override TResult Accept(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitFunctionReturnStatement(this); + if (typedVisitor != null) return typedVisitor.VisitFunctionCallStatement(this); 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 { + public partial class VariableDeclarationStatementContext : StatementContext { [System.Diagnostics.DebuggerNonUserCode] public InternalVariableDeclarationContext internalVariableDeclaration() { return GetRuleContext(0); } - public FunctionVariableDeclarationStatementContext(InternalStatementContext context) { CopyFrom(context); } + public VariableDeclarationStatementContext(StatementContext context) { CopyFrom(context); } [System.Diagnostics.DebuggerNonUserCode] public override void EnterRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterFunctionVariableDeclarationStatement(this); + if (typedListener != null) typedListener.EnterVariableDeclarationStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override void ExitRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitFunctionVariableDeclarationStatement(this); + if (typedListener != null) typedListener.ExitVariableDeclarationStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override TResult Accept(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitFunctionVariableDeclarationStatement(this); + if (typedVisitor != null) return typedVisitor.VisitVariableDeclarationStatement(this); else return visitor.VisitChildren(this); } } - public partial class FunctionAssemblyCallStatementContext : InternalStatementContext { - [System.Diagnostics.DebuggerNonUserCode] public AssemblyCallContext assemblyCall() { - return GetRuleContext(0); + public partial class WhileStatementContext : StatementContext { + [System.Diagnostics.DebuggerNonUserCode] public WhileBlockContext whileBlock() { + return GetRuleContext(0); } - public FunctionAssemblyCallStatementContext(InternalStatementContext context) { CopyFrom(context); } + public WhileStatementContext(StatementContext context) { CopyFrom(context); } [System.Diagnostics.DebuggerNonUserCode] public override void EnterRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterFunctionAssemblyCallStatement(this); + if (typedListener != null) typedListener.EnterWhileStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override void ExitRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitFunctionAssemblyCallStatement(this); + if (typedListener != null) typedListener.ExitWhileStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override TResult Accept(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitFunctionAssemblyCallStatement(this); + if (typedVisitor != null) return typedVisitor.VisitWhileStatement(this); else return visitor.VisitChildren(this); } } - public partial class FunctionIfStatementContext : InternalStatementContext { - [System.Diagnostics.DebuggerNonUserCode] public IfBlockContext ifBlock() { - return GetRuleContext(0); + public partial class BasicCallStatementContext : StatementContext { + [System.Diagnostics.DebuggerNonUserCode] public BasicCallContext basicCall() { + return GetRuleContext(0); } - public FunctionIfStatementContext(InternalStatementContext context) { CopyFrom(context); } + public BasicCallStatementContext(StatementContext context) { CopyFrom(context); } [System.Diagnostics.DebuggerNonUserCode] public override void EnterRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterFunctionIfStatement(this); + if (typedListener != null) typedListener.EnterBasicCallStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override void ExitRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitFunctionIfStatement(this); + if (typedListener != null) typedListener.ExitBasicCallStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override TResult Accept(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitFunctionIfStatement(this); + if (typedVisitor != null) return typedVisitor.VisitBasicCallStatement(this); else return visitor.VisitChildren(this); } } - public partial class FunctionWhileStatementContext : InternalStatementContext { - [System.Diagnostics.DebuggerNonUserCode] public WhileBlockContext whileBlock() { - return GetRuleContext(0); + public partial class FunctionDeclarationStatementContext : StatementContext { + [System.Diagnostics.DebuggerNonUserCode] public FunctionDeclarationContext functionDeclaration() { + return GetRuleContext(0); } - public FunctionWhileStatementContext(InternalStatementContext context) { CopyFrom(context); } + public FunctionDeclarationStatementContext(StatementContext context) { CopyFrom(context); } [System.Diagnostics.DebuggerNonUserCode] public override void EnterRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterFunctionWhileStatement(this); + if (typedListener != null) typedListener.EnterFunctionDeclarationStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override void ExitRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitFunctionWhileStatement(this); + if (typedListener != null) typedListener.ExitFunctionDeclarationStatement(this); } [System.Diagnostics.DebuggerNonUserCode] public override TResult Accept(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitFunctionWhileStatement(this); + if (typedVisitor != null) return typedVisitor.VisitFunctionDeclarationStatement(this); else return visitor.VisitChildren(this); } } [RuleVersion(0)] - public InternalStatementContext internalStatement() { - InternalStatementContext _localctx = new InternalStatementContext(Context, State); - EnterRule(_localctx, 16, RULE_internalStatement); + public StatementContext statement() { + StatementContext _localctx = new StatementContext(Context, State); + EnterRule(_localctx, 6, RULE_statement); try { - State = 139; + State = 116; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,5,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,3,Context) ) { case 1: - _localctx = new FunctionVariableDeclarationStatementContext(_localctx); + _localctx = new VariableDeclarationStatementContext(_localctx); EnterOuterAlt(_localctx, 1); { - State = 129; + State = 103; internalVariableDeclaration(); } break; case 2: - _localctx = new FunctionReturnStatementContext(_localctx); + _localctx = new ReturnStatementContext(_localctx); EnterOuterAlt(_localctx, 2); { - State = 130; + State = 104; functionReturn(); } break; case 3: - _localctx = new FunctionAssignVariableStatementContext(_localctx); + _localctx = new AssignVariableStatementContext(_localctx); EnterOuterAlt(_localctx, 3); { - State = 131; + State = 105; assignVariable(); } break; case 4: - _localctx = new FunctionFunctionCallStatementContext(_localctx); + _localctx = new FunctionCallStatementContext(_localctx); EnterOuterAlt(_localctx, 4); { - State = 132; + State = 106; functionCall(); - State = 133; + State = 107; Match(SemiColon); } break; case 5: - _localctx = new FunctionIfStatementContext(_localctx); + _localctx = new IfStatementContext(_localctx); EnterOuterAlt(_localctx, 5); { - State = 135; + State = 109; ifBlock(); } break; case 6: - _localctx = new FunctionWhileStatementContext(_localctx); + _localctx = new WhileStatementContext(_localctx); EnterOuterAlt(_localctx, 6); { - State = 136; + State = 110; whileBlock(); } break; case 7: - _localctx = new FunctionBasicCallStatementContext(_localctx); + _localctx = new BasicCallStatementContext(_localctx); EnterOuterAlt(_localctx, 7); { - State = 137; + State = 111; basicCall(); } break; case 8: - _localctx = new FunctionAssemblyCallStatementContext(_localctx); + _localctx = new AssemblyCallStatementContext(_localctx); EnterOuterAlt(_localctx, 8); { - State = 138; + State = 112; assemblyCall(); } break; + case 9: + _localctx = new GlobalVariableStatementContext(_localctx); + EnterOuterAlt(_localctx, 9); + { + State = 113; + globalVariableDeclaration(); + } + break; + case 10: + _localctx = new FunctionDeclarationStatementContext(_localctx); + EnterOuterAlt(_localctx, 10); + { + State = 114; + functionDeclaration(); + } + break; + case 11: + _localctx = new StructureDeclarationStatementContext(_localctx); + EnterOuterAlt(_localctx, 11); + { + State = 115; + structureDeclaration(); + } + break; } } catch (RecognitionException re) { @@ -1084,33 +803,33 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public InternalVariableDeclarationContext internalVariableDeclaration() { InternalVariableDeclarationContext _localctx = new InternalVariableDeclarationContext(Context, State); - EnterRule(_localctx, 18, RULE_internalVariableDeclaration); + EnterRule(_localctx, 8, RULE_internalVariableDeclaration); try { EnterOuterAlt(_localctx, 1); { - State = 141; + State = 118; type(); - State = 142; + State = 119; fullName(); - State = 143; + State = 120; Match(DirectEquals); - State = 146; + State = 123; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,6,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,4,Context) ) { case 1: { - State = 144; + State = 121; _localctx.complex = complexValue(); } break; case 2: { - State = 145; + State = 122; _localctx.simple = simpleValue(); } break; } - State = 148; + State = 125; Match(SemiColon); } } @@ -1207,36 +926,36 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public AssignVariableContext assignVariable() { AssignVariableContext _localctx = new AssignVariableContext(Context, State); - EnterRule(_localctx, 20, RULE_assignVariable); + EnterRule(_localctx, 10, RULE_assignVariable); try { - State = 166; + State = 143; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,9,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,7,Context) ) { case 1: _localctx = new AssignVariableDirectContext(_localctx); EnterOuterAlt(_localctx, 1); { - State = 150; + State = 127; ((AssignVariableDirectContext)_localctx).name = fullName(); - State = 151; + State = 128; Match(DirectEquals); - State = 154; + State = 131; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,7,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,5,Context) ) { case 1: { - State = 152; + State = 129; ((AssignVariableDirectContext)_localctx).complex = complexValue(); } break; case 2: { - State = 153; + State = 130; ((AssignVariableDirectContext)_localctx).simple = simpleValue(); } break; } - State = 156; + State = 133; Match(SemiColon); } break; @@ -1244,27 +963,27 @@ public AssignVariableContext assignVariable() { _localctx = new AssignVariableAtPointerContext(_localctx); EnterOuterAlt(_localctx, 2); { - State = 158; + State = 135; ((AssignVariableAtPointerContext)_localctx).name = fullName(); - State = 159; + State = 136; Match(PointerEquals); - State = 162; + State = 139; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,8,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,6,Context) ) { case 1: { - State = 160; + State = 137; ((AssignVariableAtPointerContext)_localctx).complex = complexValue(); } break; case 2: { - State = 161; + State = 138; ((AssignVariableAtPointerContext)_localctx).simple = simpleValue(); } break; } - State = 164; + State = 141; Match(SemiColon); } break; @@ -1321,28 +1040,28 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public IfBlockContext ifBlock() { IfBlockContext _localctx = new IfBlockContext(Context, State); - EnterRule(_localctx, 22, RULE_ifBlock); + EnterRule(_localctx, 12, RULE_ifBlock); try { EnterOuterAlt(_localctx, 1); { - State = 168; + State = 145; Match(If); - State = 169; + State = 146; condition(); - State = 170; + State = 147; scope(); - State = 173; + State = 150; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,10,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,8,Context) ) { case 1: { - State = 171; + State = 148; elseBlock(); } break; case 2: { - State = 172; + State = 149; elseIfBlock(); } break; @@ -1394,15 +1113,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public WhileBlockContext whileBlock() { WhileBlockContext _localctx = new WhileBlockContext(Context, State); - EnterRule(_localctx, 24, RULE_whileBlock); + EnterRule(_localctx, 14, RULE_whileBlock); try { EnterOuterAlt(_localctx, 1); { - State = 175; + State = 152; Match(While); - State = 176; + State = 153; condition(); - State = 177; + State = 154; scope(); } } @@ -1450,15 +1169,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ConditionContext condition() { ConditionContext _localctx = new ConditionContext(Context, State); - EnterRule(_localctx, 26, RULE_condition); + EnterRule(_localctx, 16, RULE_condition); try { EnterOuterAlt(_localctx, 1); { - State = 179; + State = 156; Match(OpenBracket); - State = 180; + State = 157; _localctx.op = operation(); - State = 181; + State = 158; Match(CloseBracket); } } @@ -1504,13 +1223,13 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ElseIfBlockContext elseIfBlock() { ElseIfBlockContext _localctx = new ElseIfBlockContext(Context, State); - EnterRule(_localctx, 28, RULE_elseIfBlock); + EnterRule(_localctx, 18, RULE_elseIfBlock); try { EnterOuterAlt(_localctx, 1); { - State = 183; + State = 160; Match(Else); - State = 184; + State = 161; ifBlock(); } } @@ -1556,13 +1275,13 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ElseBlockContext elseBlock() { ElseBlockContext _localctx = new ElseBlockContext(Context, State); - EnterRule(_localctx, 30, RULE_elseBlock); + EnterRule(_localctx, 20, RULE_elseBlock); try { EnterOuterAlt(_localctx, 1); { - State = 186; + State = 163; Match(Else); - State = 187; + State = 164; scope(); } } @@ -1608,15 +1327,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public BasicCallContext basicCall() { BasicCallContext _localctx = new BasicCallContext(Context, State); - EnterRule(_localctx, 32, RULE_basicCall); + EnterRule(_localctx, 22, RULE_basicCall); try { EnterOuterAlt(_localctx, 1); { - State = 189; + State = 166; Match(BasicCall); - State = 190; + State = 167; _localctx.basicText = Match(String); - State = 191; + State = 168; Match(SemiColon); } } @@ -1662,15 +1381,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public AssemblyCallContext assemblyCall() { AssemblyCallContext _localctx = new AssemblyCallContext(Context, State); - EnterRule(_localctx, 34, RULE_assemblyCall); + EnterRule(_localctx, 24, RULE_assemblyCall); try { EnterOuterAlt(_localctx, 1); { - State = 193; + State = 170; Match(AssemblyCall); - State = 194; + State = 171; _localctx.assemblyText = Match(String); - State = 195; + State = 172; Match(SemiColon); } } @@ -1685,6 +1404,233 @@ public AssemblyCallContext assemblyCall() { return _localctx; } + public partial class GlobalVariableDeclarationContext : ParserRuleContext { + public InternalVariableDeclarationContext declaration; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Global() { return GetToken(CrimsonParser.Global, 0); } + [System.Diagnostics.DebuggerNonUserCode] public InternalVariableDeclarationContext internalVariableDeclaration() { + return GetRuleContext(0); + } + public GlobalVariableDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_globalVariableDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.EnterGlobalVariableDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.ExitGlobalVariableDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; + if (typedVisitor != null) return typedVisitor.VisitGlobalVariableDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public GlobalVariableDeclarationContext globalVariableDeclaration() { + GlobalVariableDeclarationContext _localctx = new GlobalVariableDeclarationContext(Context, State); + EnterRule(_localctx, 26, RULE_globalVariableDeclaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 174; + Match(Global); + State = 175; + _localctx.declaration = internalVariableDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ScopedVariableDeclarationContext : ParserRuleContext { + public InternalVariableDeclarationContext declaration; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Scoped() { return GetToken(CrimsonParser.Scoped, 0); } + [System.Diagnostics.DebuggerNonUserCode] public InternalVariableDeclarationContext internalVariableDeclaration() { + return GetRuleContext(0); + } + public ScopedVariableDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_scopedVariableDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.EnterScopedVariableDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.ExitScopedVariableDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; + if (typedVisitor != null) return typedVisitor.VisitScopedVariableDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ScopedVariableDeclarationContext scopedVariableDeclaration() { + ScopedVariableDeclarationContext _localctx = new ScopedVariableDeclarationContext(Context, State); + EnterRule(_localctx, 28, RULE_scopedVariableDeclaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 177; + Match(Scoped); + State = 178; + _localctx.declaration = internalVariableDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FunctionDeclarationContext : ParserRuleContext { + public TypeContext returnType; + public FunctionHeaderContext header; + public ScopeContext body; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Function() { return GetToken(CrimsonParser.Function, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FunctionHeaderContext functionHeader() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ScopeContext scope() { + return GetRuleContext(0); + } + public FunctionDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_functionDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.EnterFunctionDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.ExitFunctionDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; + if (typedVisitor != null) return typedVisitor.VisitFunctionDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FunctionDeclarationContext functionDeclaration() { + FunctionDeclarationContext _localctx = new FunctionDeclarationContext(Context, State); + EnterRule(_localctx, 30, RULE_functionDeclaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 180; + Match(Function); + State = 181; + _localctx.returnType = type(); + State = 182; + _localctx.header = functionHeader(); + State = 183; + _localctx.body = scope(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FunctionHeaderContext : ParserRuleContext { + public FullNameContext name; + public ParameterListContext parameters; + [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ParameterListContext parameterList() { + return GetRuleContext(0); + } + public FunctionHeaderContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_functionHeader; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.EnterFunctionHeader(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.ExitFunctionHeader(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; + if (typedVisitor != null) return typedVisitor.VisitFunctionHeader(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FunctionHeaderContext functionHeader() { + FunctionHeaderContext _localctx = new FunctionHeaderContext(Context, State); + EnterRule(_localctx, 32, RULE_functionHeader); + try { + EnterOuterAlt(_localctx, 1); + { + State = 185; + _localctx.name = fullName(); + State = 186; + _localctx.parameters = parameterList(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + public partial class FunctionCallContext : ParserRuleContext { public FullNameContext name; public ArgumentsContext args; @@ -1720,13 +1666,13 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public FunctionCallContext functionCall() { FunctionCallContext _localctx = new FunctionCallContext(Context, State); - EnterRule(_localctx, 36, RULE_functionCall); + EnterRule(_localctx, 34, RULE_functionCall); try { EnterOuterAlt(_localctx, 1); { - State = 197; + State = 188; _localctx.name = fullName(); - State = 198; + State = 189; _localctx.args = arguments(); } } @@ -1780,42 +1726,42 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ArgumentsContext arguments() { ArgumentsContext _localctx = new ArgumentsContext(Context, State); - EnterRule(_localctx, 38, RULE_arguments); + EnterRule(_localctx, 36, RULE_arguments); int _la; try { EnterOuterAlt(_localctx, 1); { - State = 200; + State = 191; Match(OpenBracket); - State = 202; + State = 193; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - if (((_la) & ~0x3f) == 0 && ((1L << _la) & 10995116376064L) != 0) { + if (((_la) & ~0x3f) == 0 && ((1L << _la) & 21990232752128L) != 0) { { - State = 201; + State = 192; simpleValue(); } } - State = 208; + State = 199; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==Comma) { { { - State = 204; + State = 195; Match(Comma); { - State = 205; + State = 196; simpleValue(); } } } - State = 210; + State = 201; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 211; + State = 202; Match(CloseBracket); } } @@ -1862,28 +1808,28 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public FunctionReturnContext functionReturn() { FunctionReturnContext _localctx = new FunctionReturnContext(Context, State); - EnterRule(_localctx, 40, RULE_functionReturn); + EnterRule(_localctx, 38, RULE_functionReturn); try { - State = 219; + State = 210; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,13,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,11,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 213; + State = 204; Match(Return); - State = 214; + State = 205; simpleValue(); - State = 215; + State = 206; Match(SemiColon); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 217; + State = 208; Match(Return); - State = 218; + State = 209; Match(SemiColon); } break; @@ -1937,23 +1883,23 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public SimpleValueContext simpleValue() { SimpleValueContext _localctx = new SimpleValueContext(Context, State); - EnterRule(_localctx, 42, RULE_simpleValue); + EnterRule(_localctx, 40, RULE_simpleValue); int _la; try { - State = 226; + State = 217; ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { case ShortName: EnterOuterAlt(_localctx, 1); { - State = 221; + State = 212; _localctx.id = fullName(); - State = 223; + State = 214; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==Asterisk) { { - State = 222; + State = 213; _localctx.pointer = Match(Asterisk); } } @@ -1965,7 +1911,7 @@ public SimpleValueContext simpleValue() { case Number: EnterOuterAlt(_localctx, 2); { - State = 225; + State = 216; _localctx.raw = rawValue(); } break; @@ -2019,22 +1965,22 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ComplexValueContext complexValue() { ComplexValueContext _localctx = new ComplexValueContext(Context, State); - EnterRule(_localctx, 44, RULE_complexValue); + EnterRule(_localctx, 42, RULE_complexValue); try { - State = 230; + State = 221; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,16,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 228; + State = 219; _localctx.op = operation(); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 229; + State = 220; _localctx.func = functionCall(); } break; @@ -2081,14 +2027,14 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public RawValueContext rawValue() { RawValueContext _localctx = new RawValueContext(Context, State); - EnterRule(_localctx, 46, RULE_rawValue); + EnterRule(_localctx, 44, RULE_rawValue); int _la; try { EnterOuterAlt(_localctx, 1); { - State = 232; + State = 223; _la = TokenStream.LA(1); - if ( !(((_la) & ~0x3f) == 0 && ((1L << _la) & 2199023353856L) != 0) ) { + if ( !(((_la) & ~0x3f) == 0 && ((1L << _la) & 4398046707712L) != 0) ) { ErrorHandler.RecoverInline(this); } else { @@ -2145,15 +2091,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public OperationContext operation() { OperationContext _localctx = new OperationContext(Context, State); - EnterRule(_localctx, 48, RULE_operation); + EnterRule(_localctx, 46, RULE_operation); try { EnterOuterAlt(_localctx, 1); { - State = 234; + State = 225; _localctx.leftValue = simpleValue(); - State = 235; + State = 226; _localctx.@operator = Match(Operator); - State = 236; + State = 227; _localctx.rightValue = simpleValue(); } } @@ -2207,45 +2153,45 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ParameterListContext parameterList() { ParameterListContext _localctx = new ParameterListContext(Context, State); - EnterRule(_localctx, 50, RULE_parameterList); + EnterRule(_localctx, 48, RULE_parameterList); int _la; try { - State = 251; + State = 242; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,18,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,16,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 238; + State = 229; Match(OpenBracket); - State = 239; + State = 230; Match(CloseBracket); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 240; + State = 231; Match(OpenBracket); - State = 241; + State = 232; parameter(); - State = 246; + State = 237; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==Comma) { { { - State = 242; + State = 233; Match(Comma); - State = 243; + State = 234; parameter(); } } - State = 248; + State = 239; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 249; + State = 240; Match(CloseBracket); } break; @@ -2297,13 +2243,13 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ParameterContext parameter() { ParameterContext _localctx = new ParameterContext(Context, State); - EnterRule(_localctx, 52, RULE_parameter); + EnterRule(_localctx, 50, RULE_parameter); try { EnterOuterAlt(_localctx, 1); { - State = 253; + State = 244; _localctx.t = type(); - State = 254; + State = 245; _localctx.name = fullName(); } } @@ -2354,15 +2300,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public StructureDeclarationContext structureDeclaration() { StructureDeclarationContext _localctx = new StructureDeclarationContext(Context, State); - EnterRule(_localctx, 54, RULE_structureDeclaration); + EnterRule(_localctx, 52, RULE_structureDeclaration); try { EnterOuterAlt(_localctx, 1); { - State = 256; + State = 247; Match(Structure); - State = 257; + State = 248; _localctx.name = fullName(); - State = 258; + State = 249; _localctx.body = structureBody(); } } @@ -2412,28 +2358,28 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public StructureBodyContext structureBody() { StructureBodyContext _localctx = new StructureBodyContext(Context, State); - EnterRule(_localctx, 56, RULE_structureBody); + EnterRule(_localctx, 54, RULE_structureBody); int _la; try { EnterOuterAlt(_localctx, 1); { - State = 260; + State = 251; Match(OpenBrace); - State = 264; + State = 255; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - while (((_la) & ~0x3f) == 0 && ((1L << _la) & 8796361515008L) != 0) { + while (((_la) & ~0x3f) == 0 && ((1L << _la) & 17592723030016L) != 0) { { { - State = 261; + State = 252; internalVariableDeclaration(); } } - State = 266; + State = 257; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 267; + State = 258; Match(CloseBrace); } } @@ -2484,43 +2430,43 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public TypeContext type() { TypeContext _localctx = new TypeContext(Context, State); - EnterRule(_localctx, 58, RULE_type); + EnterRule(_localctx, 56, RULE_type); try { - State = 274; + State = 265; ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { case Integer: EnterOuterAlt(_localctx, 1); { - State = 269; + State = 260; Match(Integer); } break; case Boolean: EnterOuterAlt(_localctx, 2); { - State = 270; + State = 261; Match(Boolean); } break; case ShortName: EnterOuterAlt(_localctx, 3); { - State = 271; + State = 262; fullName(); } break; case OpenSquare: EnterOuterAlt(_localctx, 4); { - State = 272; + State = 263; array(); } break; case Null: EnterOuterAlt(_localctx, 5); { - State = 273; + State = 264; Match(Null); } break; @@ -2571,15 +2517,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ArrayContext array() { ArrayContext _localctx = new ArrayContext(Context, State); - EnterRule(_localctx, 60, RULE_array); + EnterRule(_localctx, 58, RULE_array); try { EnterOuterAlt(_localctx, 1); { - State = 276; + State = 267; Match(OpenSquare); - State = 277; + State = 268; type(); - State = 278; + State = 269; Match(CloseSquare); } } @@ -2628,23 +2574,23 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public FullNameContext fullName() { FullNameContext _localctx = new FullNameContext(Context, State); - EnterRule(_localctx, 62, RULE_fullName); + EnterRule(_localctx, 60, RULE_fullName); try { EnterOuterAlt(_localctx, 1); { - State = 282; + State = 273; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,21,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,19,Context) ) { case 1: { - State = 280; + State = 271; _localctx.libraryName = Match(ShortName); - State = 281; + State = 272; Match(Dot); } break; } - State = 284; + State = 275; _localctx.memberName = Match(ShortName); } } @@ -2660,95 +2606,92 @@ public FullNameContext fullName() { } private static int[] _serializedATN = { - 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, + 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,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 + 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 }; public static readonly ATN _ATN = diff --git a/Crimson/Antlr/Output/CrimsonVisitor.cs b/Crimson/Antlr/Output/CrimsonVisitor.cs index cb68228..b9e4718 100644 --- a/Crimson/Antlr/Output/CrimsonVisitor.cs +++ b/Crimson/Antlr/Output/CrimsonVisitor.cs @@ -33,11 +33,11 @@ namespace Crimson.AntlrBuild { [System.CLSCompliant(false)] public interface ICrimsonVisitor : IParseTreeVisitor { /// - /// Visit a parse tree produced by . + /// Visit a parse tree produced by . /// /// The parse tree. /// The visitor result. - Result VisitTranslationUnit([NotNull] CrimsonParser.TranslationUnitContext context); + Result VisitScope([NotNull] CrimsonParser.ScopeContext context); /// /// Visit a parse tree produced by . /// @@ -51,106 +51,82 @@ public interface ICrimsonVisitor : IParseTreeVisitor { /// The visitor result. Result VisitOperationHandler([NotNull] CrimsonParser.OperationHandlerContext context); /// - /// Visit a parse tree produced by the GlobalVariableUnitStatement - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitGlobalVariableUnitStatement([NotNull] CrimsonParser.GlobalVariableUnitStatementContext context); - /// - /// Visit a parse tree produced by the FunctionUnitStatement - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitFunctionUnitStatement([NotNull] CrimsonParser.FunctionUnitStatementContext context); - /// - /// Visit a parse tree produced by the StructureUnitStatement - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitStructureUnitStatement([NotNull] CrimsonParser.StructureUnitStatementContext context); - /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context); - /// - /// Visit a parse tree produced by . + /// Visit a parse tree produced by the VariableDeclarationStatement + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context); + Result VisitVariableDeclarationStatement([NotNull] CrimsonParser.VariableDeclarationStatementContext context); /// - /// Visit a parse tree produced by . + /// Visit a parse tree produced by the ReturnStatement + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context); + Result VisitReturnStatement([NotNull] CrimsonParser.ReturnStatementContext context); /// - /// Visit a parse tree produced by . + /// Visit a parse tree produced by the AssignVariableStatement + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitScope([NotNull] CrimsonParser.ScopeContext context); + Result VisitAssignVariableStatement([NotNull] CrimsonParser.AssignVariableStatementContext context); /// - /// Visit a parse tree produced by the FunctionVariableDeclarationStatement - /// labeled alternative in . + /// Visit a parse tree produced by the FunctionCallStatement + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunctionVariableDeclarationStatement([NotNull] CrimsonParser.FunctionVariableDeclarationStatementContext context); + Result VisitFunctionCallStatement([NotNull] CrimsonParser.FunctionCallStatementContext context); /// - /// Visit a parse tree produced by the FunctionReturnStatement - /// labeled alternative in . + /// Visit a parse tree produced by the IfStatement + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunctionReturnStatement([NotNull] CrimsonParser.FunctionReturnStatementContext context); + Result VisitIfStatement([NotNull] CrimsonParser.IfStatementContext context); /// - /// Visit a parse tree produced by the FunctionAssignVariableStatement - /// labeled alternative in . + /// Visit a parse tree produced by the WhileStatement + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunctionAssignVariableStatement([NotNull] CrimsonParser.FunctionAssignVariableStatementContext context); + Result VisitWhileStatement([NotNull] CrimsonParser.WhileStatementContext context); /// - /// Visit a parse tree produced by the FunctionFunctionCallStatement - /// labeled alternative in . + /// Visit a parse tree produced by the BasicCallStatement + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunctionFunctionCallStatement([NotNull] CrimsonParser.FunctionFunctionCallStatementContext context); + Result VisitBasicCallStatement([NotNull] CrimsonParser.BasicCallStatementContext context); /// - /// Visit a parse tree produced by the FunctionIfStatement - /// labeled alternative in . + /// Visit a parse tree produced by the AssemblyCallStatement + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunctionIfStatement([NotNull] CrimsonParser.FunctionIfStatementContext context); + Result VisitAssemblyCallStatement([NotNull] CrimsonParser.AssemblyCallStatementContext context); /// - /// Visit a parse tree produced by the FunctionWhileStatement - /// labeled alternative in . + /// Visit a parse tree produced by the GlobalVariableStatement + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunctionWhileStatement([NotNull] CrimsonParser.FunctionWhileStatementContext context); + Result VisitGlobalVariableStatement([NotNull] CrimsonParser.GlobalVariableStatementContext context); /// - /// Visit a parse tree produced by the FunctionBasicCallStatement - /// labeled alternative in . + /// Visit a parse tree produced by the FunctionDeclarationStatement + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunctionBasicCallStatement([NotNull] CrimsonParser.FunctionBasicCallStatementContext context); + Result VisitFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context); /// - /// Visit a parse tree produced by the FunctionAssemblyCallStatement - /// labeled alternative in . + /// Visit a parse tree produced by the StructureDeclarationStatement + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunctionAssemblyCallStatement([NotNull] CrimsonParser.FunctionAssemblyCallStatementContext context); + Result VisitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context); /// /// Visit a parse tree produced by . /// @@ -214,6 +190,30 @@ public interface ICrimsonVisitor : IParseTreeVisitor { /// The visitor result. Result VisitAssemblyCall([NotNull] CrimsonParser.AssemblyCallContext context); /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitScopedVariableDeclaration([NotNull] CrimsonParser.ScopedVariableDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context); + /// /// Visit a parse tree produced by . /// /// The parse tree. diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/CSharp/Core/Compilation.cs index a8c4506..6bc209d 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/CSharp/Core/Compilation.cs @@ -21,7 +21,7 @@ internal class Compilation /// internal Library Library { get; } - public Compilation(CompilationUnit rootUnit, CrimsonOptions options) + public Compilation(Scope rootUnit, CrimsonOptions options) { Library = new Library(options); @@ -33,20 +33,20 @@ public Compilation(CompilationUnit rootUnit, CrimsonOptions options) /// Loads dependencies for the given root CompilationUnit, as well as that unit's dependencies, recursively. /// /// - private void LoadLibrary(CompilationUnit root) + private void LoadLibrary(Scope root) { // For each import foreach (var i in root.Imports) { // Get the unit it refers to - CompilationUnit unit = Library.LoadUnitFromPath(i.Value.Path); + Scope unit = Library.LoadUnitFromPath(i.Value.Path); // Get that units' dependencies (recursively) LoadLibrary(unit); } } - public CompilationUnit GetRootUnit() + public Scope GetRootUnit() { return Library.Units[Library.ROOT_FACET_NAME]; } diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 8f287b5..e9d8442 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -37,7 +37,7 @@ public int FullyCompileFromOptions() */ LOGGER.Info("\n\n"); LOGGER.Info(" P A R S I N G "); - CompilationUnit rootUnit = Library.LoadUnitFromPath(Options.TranslationSourcePath); // Get the root unit (ie. main.crm) + Scope rootUnit = Library.LoadUnitFromPath(Options.TranslationSourcePath); // Get the root unit (ie. main.crm) Compilation compilation = new Compilation(rootUnit, Options); // Generate dependency units (all resources are henceforth accessible) diff --git a/Crimson/CSharp/Core/Flattener.cs b/Crimson/CSharp/Core/Flattener.cs index 8e431cf..c5c6a0b 100644 --- a/Crimson/CSharp/Core/Flattener.cs +++ b/Crimson/CSharp/Core/Flattener.cs @@ -40,7 +40,7 @@ internal BasicProgram Flatten(Compilation compilation) * These have already been dynamically mapped (they know which singletons each call refers to). * During collection, these values are reassigned names (which are globally updated) to avoid name clashes. */ - foreach (KeyValuePair pair in compilation.Library.Units) + foreach (KeyValuePair pair in compilation.Library.Units) { foreach (var f in pair.Value.Functions) { @@ -111,7 +111,7 @@ internal BasicProgram Flatten(Compilation compilation) private FunctionCStatement GetEntryFunction(Compilation compilation) { string baseName = Options.EntryFunctionName; - CompilationUnit rootUnit = compilation.GetRootUnit(); + Scope rootUnit = compilation.GetRootUnit(); string pattern = $"^func_{baseName}_[0-9]+$"; // Match name_090923 (anchored to start and end) Regex regex = new Regex(pattern); @@ -135,16 +135,16 @@ private FunctionCStatement GetEntryFunction(Compilation compilation) } } - private void FixNameAndAdd(Dictionary map, GS gs) where GS: GlobalCStatement + private void FixNameAndAdd(Dictionary map, GS gs) where GS: INamedStatement { int i = 0; string prefix = GetFlattenedPrefix(gs.GetType()); - while (map.ContainsKey(gs.Name + "_" + i)) + while (map.ContainsKey(gs.GetName() + "_" + i)) { i++; } - gs.Name = new FullNameCToken($"{prefix}_{gs.Name}_{i}"); - map.Add(gs.Name.ToString(), gs); + gs.SetName(new FullNameCToken($"{prefix}_{gs.GetName()}_{i}")); + map.Add(gs.GetName().ToString(), gs); } private string GetFlattenedPrefix(System.Type type) diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index a7e9155..4f1be51 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -30,15 +30,15 @@ internal class Library /// [ C:/utils.crm => UTILS_UNIT ] /// [ C:/main.crm => MAIN_UNIT ] /// - internal Dictionary Units { get; } + internal Dictionary Units { get; } public Library(CrimsonOptions options) { Options = options; - Units = new Dictionary(); + Units = new Dictionary(); } - public CompilationUnit LoadUnitFromPath(string pathIn) + public Scope LoadUnitFromPath(string pathIn) { IEnumerable lines = Enumerable.Empty(); @@ -49,7 +49,7 @@ public CompilationUnit LoadUnitFromPath(string pathIn) throw new UnitGeneratorException("Illegal unit path: Cannot import unit/facet with reserved name '" + pathIn + "'"); } - CompilationUnit? unit = LookupUnitByPath(path); + Scope? unit = LookupUnitByPath(path); if (unit != null) { return unit; @@ -58,7 +58,7 @@ public CompilationUnit LoadUnitFromPath(string pathIn) try { string programText = string.Join(Environment.NewLine, File.ReadLines(path)); - CompilationUnit newUnit = LoadUnitFromText(path + " (" + pathIn + ")", programText); + Scope newUnit = LoadUnitFromText(path + " (" + pathIn + ")", programText); Units[path] = newUnit; return newUnit; } @@ -76,7 +76,7 @@ public CompilationUnit LoadUnitFromPath(string pathIn) } } - public CompilationUnit LoadUnitFromText(string sourceName, string textIn) + public Scope LoadUnitFromText(string sourceName, string textIn) { // Get Antlr context AntlrInputStream a4is = new AntlrInputStream(textIn); @@ -87,9 +87,9 @@ public CompilationUnit LoadUnitFromText(string sourceName, string textIn) lexer.AddErrorListener(new LexerErrorListener(sourceName)); parser.ErrorHandler = new ParserErrorStrategy(sourceName); - CrimsonParser.TranslationUnitContext cuCtx = parser.translationUnit(); - CrimsonCompiliationUnitVisitor visitor = new CrimsonCompiliationUnitVisitor(); - CompilationUnit compilationUnit = visitor.VisitTranslationUnit(cuCtx); + CrimsonParser.ScopeContext cuCtx = parser.scope(); + ScopeVisitor visitor = new ScopeVisitor(); + Scope compilationUnit = visitor.VisitScope(cuCtx); return compilationUnit; } @@ -109,7 +109,7 @@ public string StandardiseNativePath(string path) return path; } - public CompilationUnit? LookupUnitByPath(string path) + public Scope? LookupUnitByPath(string path) { if (Units.ContainsKey(path)) { diff --git a/Crimson/CSharp/Core/Linker.cs b/Crimson/CSharp/Core/Linker.cs index 35b8700..2097427 100644 --- a/Crimson/CSharp/Core/Linker.cs +++ b/Crimson/CSharp/Core/Linker.cs @@ -30,14 +30,14 @@ public void Link(Compilation compilation) LOGGER.Info("Linking compilation " + compilation); // Iterate through each relevant unit - foreach (KeyValuePair pair in compilation.Library.Units) + foreach (KeyValuePair pair in compilation.Library.Units) { LOGGER.Info("Linking " + pair); // Generate linking context for the current unit (based on the aliases of imports) // This means mapping "ALIAS" to "UNIT" so that each statement can remap itself - LinkingContext ctx = new LinkingContext(pair.Key, pair.Key, new Dictionary()); - CompilationUnit unit = pair.Value; + LinkingContext ctx = new LinkingContext(pair.Key, pair.Key, new Dictionary()); + Scope unit = pair.Value; ctx.Links.Add(pair.Key, pair.Value); //TODO This may cause issues foreach (KeyValuePair importPair in unit.Imports) { @@ -58,7 +58,7 @@ public void Link(Compilation compilation) /* * */ - CompilationUnit? mappingUnit = compilation.Library.LookupUnitByPath(relativePath); + Scope? mappingUnit = compilation.Library.LookupUnitByPath(relativePath); if (mappingUnit == null) throw new LinkingException("Could not add unloaded unit " + relativePath + " (alias=" + alias + ") to mapping context"); ctx.Links.Add(alias, mappingUnit); @@ -79,7 +79,7 @@ public void Link(Compilation compilation) return; } - private static List GetAllStatements(CompilationUnit unit) + private static List GetAllStatements(Scope unit) { var statements = new List(); foreach (var s in unit.Functions.Values) diff --git a/Crimson/CSharp/Core/LinkerHelper.cs b/Crimson/CSharp/Core/LinkerHelper.cs index d4860b8..a2a1d4e 100644 --- a/Crimson/CSharp/Core/LinkerHelper.cs +++ b/Crimson/CSharp/Core/LinkerHelper.cs @@ -31,7 +31,7 @@ internal static FunctionCStatement LinkFunctionCall(FullNameCToken identifier, L { string alias = identifier.LibraryName; - CompilationUnit unit = ctx.GetUnit(alias); + Scope unit = ctx.GetUnit(alias); string funcName = identifier.MemberName; if (!unit.Functions.TryGetValue(funcName, out FunctionCStatement? result)) @@ -78,7 +78,7 @@ internal static FullNameCToken LinkIdentifier (FullNameCToken identifier, Linkin { string alias = identifier.LibraryName!; - CompilationUnit unit = ctx.GetUnit(alias); + Scope unit = ctx.GetUnit(alias); string call = identifier.MemberName; FullNameCToken output = new FullNameCToken($"{{{unit}}}", call); // {{ is used to escape the {, creating ${path}.call in the end //TODO LinkerHelper casts Unit to string diff --git a/Crimson/CSharp/Core/LinkingContext.cs b/Crimson/CSharp/Core/LinkingContext.cs index 56e0c63..d2965f7 100644 --- a/Crimson/CSharp/Core/LinkingContext.cs +++ b/Crimson/CSharp/Core/LinkingContext.cs @@ -8,16 +8,16 @@ public class LinkingContext private string Name { get; } private string CurrentUnitLookupPath { get; } - internal Dictionary Links { get; } + internal Dictionary Links { get; } - public LinkingContext(string friendlyName, string currentUnitLookupPath, Dictionary links) + public LinkingContext(string friendlyName, string currentUnitLookupPath, Dictionary links) { Name = friendlyName; CurrentUnitLookupPath = currentUnitLookupPath; Links = links; } - internal CompilationUnit GetUnit(string alias) + internal Scope GetUnit(string alias) { if (Links.ContainsKey(alias)) { @@ -27,7 +27,7 @@ internal CompilationUnit GetUnit(string alias) throw new LinkingException("No alias '" + alias + "' in " + ToString()); } - internal CompilationUnit GetCurrentUnit() + internal Scope GetCurrentUnit() { return GetUnit(CurrentUnitLookupPath); } diff --git a/Crimson/CSharp/Core/TranslationUnitVisitor.cs b/Crimson/CSharp/Core/ScopeVisitor.cs similarity index 83% rename from Crimson/CSharp/Core/TranslationUnitVisitor.cs rename to Crimson/CSharp/Core/ScopeVisitor.cs index 20dfb70..8e9dab0 100644 --- a/Crimson/CSharp/Core/TranslationUnitVisitor.cs +++ b/Crimson/CSharp/Core/ScopeVisitor.cs @@ -8,12 +8,15 @@ namespace Crimson.CSharp.Core { - internal class CrimsonCompiliationUnitVisitor: CrimsonBaseVisitor + internal class ScopeVisitor: CrimsonBaseVisitor { - public override CompilationUnit VisitTranslationUnit([NotNull] CrimsonParser.TranslationUnitContext context) + public static readonly Stack scopeStack = new Stack(); + + public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) { - CompilationUnit compilation = new CompilationUnit(); + Scope compilation = new Scope(scopeStack.Peek()); + scopeStack.Push(compilation); // Visit imports IList importCtxs = context._imports; @@ -38,16 +41,16 @@ public override CompilationUnit VisitTranslationUnit([NotNull] CrimsonParser.Tra } // Visit Compilation-Unit statements - IList unitStatementCtxs = context._statements; - foreach (CrimsonParser.GlobalStatementContext unitStatementCtx in unitStatementCtxs) + IList unitStatementCtxs = context._statements; + foreach (CrimsonParser.StatementContext unitStatementCtx in unitStatementCtxs) { - GlobalCStatement unitStatement = ParseGlobalStatement(unitStatementCtx); + ICrimsonStatement unitStatement = ParseScopeStatement(unitStatementCtx); compilation.AddStatement(unitStatement); } // Populate output fields - return compilation; + return scopeStack.Pop(); } // ---------------------------------------------------- @@ -65,29 +68,6 @@ public override OperationHandlerCStatement VisitOperationHandler([NotNull] Crims return ohsc; } - private GlobalCStatement ParseGlobalStatement(CrimsonParser.GlobalStatementContext context) - { - if (context is CrimsonParser.GlobalVariableUnitStatementContext gvCtx) - { - CrimsonParser.GlobalVariableDeclarationContext declaration = gvCtx.globalVariableDeclaration(); - return VisitGlobalVariableDeclaration(declaration); - } - else if (context is CrimsonParser.FunctionUnitStatementContext fnCtx) - { - CrimsonParser.FunctionDeclarationContext declaration = fnCtx.functionDeclaration(); - return VisitFunctionDeclaration(declaration); - } - else if (context is CrimsonParser.StructureUnitStatementContext structureCtx) - { - CrimsonParser.StructureDeclarationContext declaration = structureCtx.structureDeclaration(); - return VisitStructureDeclaration(declaration); - } - else - { - throw new StatementParseException("The given CrimsonParser.CompilationUnitStatementContext " + context + " is not of a permissable type"); - } - } - public override GlobalVariableCStatement VisitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context) { CrimsonParser.InternalVariableDeclarationContext ivdc = context.internalVariableDeclaration(); @@ -104,7 +84,7 @@ public override FunctionCStatement VisitFunctionDeclaration([NotNull] CrimsonPar { CrimsonTypeCToken returnType = VisitType(context.returnType); FunctionCStatement.Header header = VisitFunctionHeader(context.header); - ScopeCToken statements = VisitScope(context.body); + Scope statements = VisitScope(context.body); return new FunctionCStatement(returnType, header, statements); } @@ -119,14 +99,14 @@ public override FunctionCStatement.Header VisitFunctionHeader([NotNull] CrimsonP public override StructureCStatement VisitStructureDeclaration([NotNull] CrimsonParser.StructureDeclarationContext context) { FullNameCToken identifier = VisitFullName(context.name); - IList body = VisitStructureBody(context.structureBody()); + IList body = VisitStructureBody(context.structureBody()); StructureCStatement structure = new StructureCStatement(identifier, body); return structure; } - public override IList VisitStructureBody([NotNull] CrimsonParser.StructureBodyContext context) + public override IList VisitStructureBody([NotNull] CrimsonParser.StructureBodyContext context) { - IList statements = new List(); + IList statements = new List(); foreach (CrimsonParser.InternalVariableDeclarationContext ivdCtx in context.internalVariableDeclaration()) { InternalVariableCStatement var = VisitInternalVariableDeclaration(ivdCtx); @@ -171,65 +151,54 @@ public override CrimsonTypeCToken VisitType([NotNull] CrimsonParser.TypeContext return parameters; } - public override ScopeCToken VisitScope([NotNull] CrimsonParser.ScopeContext context) - { - List statements = new List(); - foreach (CrimsonParser.InternalStatementContext stCtx in context._statements) - { - InternalStatement statement = ParseInternalStatement(stCtx); - statements.Add(statement); - } - return new ScopeCToken(statements); - } - // ---------------------------------------------------- // -------------------------- INTERNAL STATEMENTS // ---------------------------------------------------- - private InternalStatement ParseInternalStatement(CrimsonParser.InternalStatementContext stCtx) + private ICrimsonStatement ParseStatement(CrimsonParser.StatementContext stCtx) { - if(stCtx is CrimsonParser.FunctionVariableDeclarationStatementContext) + if(stCtx is CrimsonParser.VariableDeclarationStatementContext) { - CrimsonParser.FunctionVariableDeclarationStatementContext context = (CrimsonParser.FunctionVariableDeclarationStatementContext)stCtx; + CrimsonParser.VariableDeclarationStatementContext context = (CrimsonParser.VariableDeclarationStatementContext)stCtx; CrimsonParser.InternalVariableDeclarationContext ivdCtx = context.internalVariableDeclaration(); return VisitInternalVariableDeclaration(ivdCtx); } - else if (stCtx is CrimsonParser.FunctionReturnStatementContext) + else if (stCtx is CrimsonParser.ReturnStatementContext) { - CrimsonParser.FunctionReturnStatementContext context = (CrimsonParser.FunctionReturnStatementContext)stCtx; + CrimsonParser.ReturnStatementContext context = (CrimsonParser.ReturnStatementContext)stCtx; CrimsonParser.FunctionReturnContext rtnCtx = context.functionReturn(); return VisitFunctionReturn(rtnCtx); } - else if (stCtx is CrimsonParser.FunctionAssignVariableStatementContext) + else if (stCtx is CrimsonParser.AssignVariableStatementContext) { - CrimsonParser.FunctionAssignVariableStatementContext context = (CrimsonParser.FunctionAssignVariableStatementContext)stCtx; + CrimsonParser.AssignVariableStatementContext context = (CrimsonParser.AssignVariableStatementContext)stCtx; CrimsonParser.AssignVariableContext asvCtx = context.assignVariable(); return ParseAssignVariable(asvCtx); } - else if (stCtx is CrimsonParser.FunctionFunctionCallStatementContext) + else if (stCtx is CrimsonParser.FunctionCallStatementContext) { - CrimsonParser.FunctionFunctionCallStatementContext context = (CrimsonParser.FunctionFunctionCallStatementContext)stCtx; + CrimsonParser.FunctionCallStatementContext context = (CrimsonParser.FunctionCallStatementContext)stCtx; CrimsonParser.FunctionCallContext fncCtx = context.functionCall(); return VisitFunctionCall(fncCtx); } - else if (stCtx is CrimsonParser.FunctionIfStatementContext) + else if (stCtx is CrimsonParser.IfStatementContext) { - CrimsonParser.FunctionIfStatementContext context = (CrimsonParser.FunctionIfStatementContext)stCtx; + CrimsonParser.IfStatementContext context = (CrimsonParser.IfStatementContext)stCtx; CrimsonParser.IfBlockContext ifCtx = context.ifBlock(); return VisitIfBlock(ifCtx); } - else if (stCtx is CrimsonParser.FunctionWhileStatementContext) + else if (stCtx is CrimsonParser.WhileStatementContext) { - CrimsonParser.FunctionWhileStatementContext context = (CrimsonParser.FunctionWhileStatementContext)stCtx; + CrimsonParser.WhileStatementContext context = (CrimsonParser.WhileStatementContext)stCtx; CrimsonParser.WhileBlockContext whileCtx = context.whileBlock(); return VisitWhileBlock(whileCtx); } - else if (stCtx is CrimsonParser.FunctionBasicCallStatementContext fbcsc) + else if (stCtx is CrimsonParser.BasicCallStatementContext fbcsc) { CrimsonParser.BasicCallContext bcCtx = fbcsc.basicCall(); return VisitBasicCall(bcCtx); } - else if (stCtx is CrimsonParser.FunctionAssemblyCallStatementContext facsc) + else if (stCtx is CrimsonParser.AssemblyCallStatementContext facsc) { CrimsonParser.AssemblyCallContext acCtx = facsc.assemblyCall(); return VisitAssemblyCall(acCtx); @@ -240,6 +209,31 @@ private InternalStatement ParseInternalStatement(CrimsonParser.InternalStatement } } + + + private ICrimsonStatement ParseScopeStatement (CrimsonParser.StatementContext context) + { + if (context is CrimsonParser.GlobalVariableStatementContext gvCtx) + { + CrimsonParser.GlobalVariableDeclarationContext declaration = gvCtx.globalVariableDeclaration(); + return VisitGlobalVariableDeclaration(declaration); + } + else if (context is CrimsonParser.FunctionDeclarationStatementContext fnCtx) + { + CrimsonParser.FunctionDeclarationContext declaration = fnCtx.functionDeclaration(); + return VisitFunctionDeclaration(declaration); + } + else if (context is CrimsonParser.StructureDeclarationStatementContext structureCtx) + { + CrimsonParser.StructureDeclarationContext declaration = structureCtx.structureDeclaration(); + return VisitStructureDeclaration(declaration); + } + else + { + throw new StatementParseException("The given CrimsonParser.CompilationUnitStatementContext " + context + " is not of a permissable type"); + } + } + public override InternalVariableCStatement VisitInternalVariableDeclaration([NotNull] CrimsonParser.InternalVariableDeclarationContext context) { CrimsonTypeCToken type = VisitType(context.type()); @@ -262,7 +256,7 @@ public override FunctionCallCStatement VisitFunctionCall([NotNull] CrimsonParser public override IfBlockCStatement VisitIfBlock([NotNull] CrimsonParser.IfBlockContext context) { ConditionCToken condition = VisitCondition(context.condition()); - ScopeCToken scope = VisitScope(context.scope()); + Scope scope = VisitScope(context.scope()); CrimsonParser.ElseIfBlockContext eibCtx = context.elseIfBlock(); CrimsonParser.ElseBlockContext elbCtx = context.elseBlock(); ElseIfBlockCToken? elifBlock = eibCtx == null ? null : VisitElseIfBlock(eibCtx); @@ -274,7 +268,7 @@ public override IfBlockCStatement VisitIfBlock([NotNull] CrimsonParser.IfBlockCo public override WhileBlockCStatement VisitWhileBlock([NotNull] CrimsonParser.WhileBlockContext context) { ConditionCToken condition = VisitCondition(context.condition()); - ScopeCToken body = VisitScope(context.scope()); + Scope body = VisitScope(context.scope()); WhileBlockCStatement ifBlock = new WhileBlockCStatement(condition, body); return ifBlock; } @@ -384,7 +378,7 @@ public override ElseIfBlockCToken VisitElseIfBlock([NotNull] CrimsonParser.ElseI public override ElseBlockCToken VisitElseBlock([NotNull] CrimsonParser.ElseBlockContext context) { - ScopeCToken statements = VisitScope(context.scope()); + Scope 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 deleted file mode 100644 index e29f0db..0000000 --- a/Crimson/CSharp/Grammar/CompilationUnit.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar.Statements; -using Crimson.CSharp.Grammar.Tokens; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Grammar -{ - /// - /// An unlinked collection of statements which is the direct result of the parsing of a Crimson source file. A Linker may be used to convert this into a LinkedUnit. - /// - public class CompilationUnit - { - private Dictionary imports = new Dictionary(); - private List opHandlers = new List(); - private Dictionary functions = new Dictionary(); - private Dictionary structures = new Dictionary(); - private Dictionary globalVariables = new Dictionary(); - - public Dictionary Imports { get => imports; private set => imports = value; } - public List OpHandlers { get => opHandlers; private set => opHandlers = value; } - public Dictionary Functions { get => functions; private set => functions = value; } - public Dictionary Structures { get => structures; private set => structures = value; } - public Dictionary GlobalVariables { get => globalVariables; private set => globalVariables = value; } - - public void AddImport(ImportCStatement import) - { - Imports.Add(import.Alias.ToString(), import); - } - - public void AddOpHandler(OperationHandlerCStatement handler) - { - OpHandlers.Add(handler); - } - - public void AddStatement(GlobalCStatement statement) - { - - void CheckContentsAndNameElseAdd (Dictionary d, GCS gcs, string typeNameForError) where GCS : GlobalCStatement - { - if (d.ContainsKey(gcs.Name.ToString())) throw new StatementParseException($"Duplicate GlobalStatement name '{gcs.Name}' for statement '{statement}' in unit: {this}"); - d.Add(gcs.Name.ToString(), gcs); - } - - if (statement is FunctionCStatement f) CheckContentsAndNameElseAdd(functions, f, "Function"); - else if (statement is GlobalVariableCStatement g) CheckContentsAndNameElseAdd(globalVariables, g, "Global Variable"); - else if (statement is StructureCStatement s) CheckContentsAndNameElseAdd(structures, s, "Structure"); - else throw new StatementParseException("The given statement " + statement + " may not be added to a CompilationUnit"); - } - - public override string ToString() - { - return $"CompilationUnit(Imports:{Imports.Count} Functions:{Functions.Count} Structures:{Structures.Count} GlobalVariables{GlobalVariables.Count})"; - } - } -} diff --git a/Crimson/CSharp/Grammar/Scope.cs b/Crimson/CSharp/Grammar/Scope.cs new file mode 100644 index 0000000..68efda0 --- /dev/null +++ b/Crimson/CSharp/Grammar/Scope.cs @@ -0,0 +1,126 @@ +using Crimson.CSharp.Core; +using Crimson.CSharp.Exception; +using Crimson.CSharp.Grammar.Statements; +using CrimsonBasic.CSharp.Core; + +namespace Crimson.CSharp.Grammar +{ + /// + /// An unlinked collection of statements which is the direct result of the parsing of a Crimson source file. A Linker may be used to convert this into a LinkedUnit. + /// + public class Scope: ICrimsonStatement + { + + public Scope? Parent { get; set; } + private bool _linked; + private string? _path; + + public Scope (Scope? parent): this(parent, null){} + + public Scope(string? path): this(null, path) {} + + private Scope (Scope? parent, string? path) + { + Parent = null; + _linked = false; + _path = path; + + Imports = new Dictionary(); + OpHandlers = new List(); + Functions = new Dictionary(); + Structures = new Dictionary(); + GlobalVariables = new Dictionary(); + } + + public bool HasParent() { + return Parent != null; + } + + public Scope GetParent() { + return HasParent() ? Parent! : this; + } + + public Scope GetRoot() + { + Scope parent = GetParent(); + do { + parent = parent.GetParent(); + } while (parent.HasParent()); + return parent; + } + + public string GetPath () + { + if (!String.IsNullOrWhiteSpace(_path)) + { + return _path; + } + + if (HasParent()) + { + return GetParent().GetPath(); + } + + throw new NullReferenceException($"Scope tree has no associated path: {FamilyToString()}"); + } + + public string FamilyToString () + { + return $"{(HasParent() ? GetParent().FamilyToString() : "")} -> {this}"; + } + + // Statements + public Dictionary Imports { get; private set; } + public List OpHandlers { get; private set; } + public Dictionary Functions { get; private set; } + public Dictionary Structures { get; private set; } + public Dictionary GlobalVariables { get; private set; } + + public void AddImport(ImportCStatement import) + { + Imports.Add(import.Alias.ToString(), import); + } + + public void AddOpHandler(OperationHandlerCStatement handler) + { + OpHandlers.Add(handler); + } + + public void AddStatement(ICrimsonStatement statement) + { + + void CheckContentsAndNameElseAdd (Dictionary d, GCS gcs, string typeNameForError) where GCS : INamedStatement + { + if (d.ContainsKey(gcs.GetName().ToString())) throw new StatementParseException($"Duplicate GlobalStatement name '{gcs.GetName()}' for statement '{statement}' in unit: {this}"); + d.Add(gcs.GetName().ToString(), gcs); + } + + if (statement is FunctionCStatement f) CheckContentsAndNameElseAdd(Functions, f, "Function"); + else if (statement is GlobalVariableCStatement g) CheckContentsAndNameElseAdd(GlobalVariables, g, "Global Variable"); + else if (statement is StructureCStatement s) CheckContentsAndNameElseAdd(Structures, s, "Structure"); + else throw new StatementParseException("The given statement " + statement + " may not be added to a CompilationUnit"); + } + + // Linking + + public Fragment GetCrimsonBasic () + { + throw new NotImplementedException(); + } + + public bool IsLinked () + { + return _linked; + } + + public void Link (LinkingContext ctx) + { + throw new NotImplementedException(); + } + + public override string ToString() + { + return $"Scope(Imports:{Imports.Count} Functions:{Functions.Count} Structures:{Structures.Count} GlobalVariables{GlobalVariables.Count})"; + } + } +} diff --git a/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs index aad2b38..6ac7db6 100644 --- a/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs @@ -4,7 +4,7 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class AssemblyCallCStatement : InternalStatement + internal class AssemblyCallCStatement : ICrimsonStatement { private string assemblyText; @@ -13,14 +13,19 @@ public AssemblyCallCStatement(string assemblyText) this.assemblyText = assemblyText; } - public override Fragment GetCrimsonBasic() + public Fragment GetCrimsonBasic() { Fragment f = new Fragment(0); f.Add(new AssemblyBStatement(assemblyText)); return f; } - public override void Link(LinkingContext ctx) + public bool IsLinked () + { + throw new NotImplementedException(); + } + + public void Link(LinkingContext ctx) { } diff --git a/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs index 0897c47..973c3ae 100644 --- a/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs @@ -4,7 +4,7 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class BasicCallCStatement : InternalStatement + internal class BasicCallCStatement : ICrimsonStatement { public string AssemblyText { get; protected set; } @@ -13,16 +13,19 @@ public BasicCallCStatement (string assemblyText) AssemblyText = assemblyText; } - public override Fragment GetCrimsonBasic() + public Fragment GetCrimsonBasic () { Fragment f = new Fragment(0); f.Add(new ArbitraryBStatement(AssemblyText)); return f; } - - public override void Link(LinkingContext ctx) + public void Link (LinkingContext ctx) { + } + public bool IsLinked () + { + throw new NotImplementedException(); } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs index b468d1a..ef30e7b 100644 --- a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs @@ -13,22 +13,22 @@ namespace Crimson.CSharp.Grammar.Statements /// /// A function, defined with the function keyword. Is a member of a package. /// - public class FunctionCStatement : GlobalCStatement + public class FunctionCStatement : INamedStatement { - public CrimsonTypeCToken ReturnType { get; } public Header FunctionHeader { get; } - public ScopeCToken Scope { get; } - public override FullNameCToken Name { get => FunctionHeader.Identifier; set { FunctionHeader.Identifier = value; } } + public Scope Scope { get; } + public FullNameCToken Name { get => FunctionHeader.Identifier; set { FunctionHeader.Identifier = value; } } + private bool _linked = false; - public FunctionCStatement(CrimsonTypeCToken returnType, Header header, ScopeCToken scope) + public FunctionCStatement(CrimsonTypeCToken returnType, Header header, Scope scope) { ReturnType = returnType; FunctionHeader = header; Scope = scope; } - public override void Link(LinkingContext ctx) + public void Link(LinkingContext ctx) { if (IsLinked()) return; @@ -36,7 +36,7 @@ public override void Link(LinkingContext ctx) ((ICrimsonToken)FunctionHeader).Link(ctx); Scope.Link(ctx); - SetLinked(true); + _linked = true; } public Fragment GetCrimsonBasic() @@ -60,6 +60,21 @@ public Fragment GetCrimsonBasic() return function; } + public bool IsLinked () + { + throw new NotImplementedException(); + } + + public FullNameCToken GetName () + { + return Name; + } + + public void SetName (FullNameCToken name) + { + throw new NotImplementedException(); + } + public class Parameter : ICrimsonToken { public CrimsonTypeCToken Type { get; } diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs index 6a1acd2..1f3280d 100644 --- a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs @@ -6,11 +6,12 @@ namespace Crimson.CSharp.Grammar.Statements { - public class FunctionCallCStatement : InternalStatement + public class FunctionCallCStatement : ICrimsonStatement { private FullNameCToken identifier; private FunctionCStatement? targetFunction; private IList arguments; + private bool _linked = false; public static readonly string FUNCTION_RETURN_VARIABLE_NAME = "FUNC_RETURN"; @@ -31,7 +32,7 @@ public FunctionCallCStatement(FullNameCToken identifier, IList /// - public override Fragment GetCrimsonBasic() + public Fragment GetCrimsonBasic() { Fragment f = new Fragment(0); @@ -71,7 +72,7 @@ public override Fragment GetCrimsonBasic() return f; } - public override void Link(LinkingContext ctx) + public void Link(LinkingContext ctx) { if (IsLinked()) return; @@ -82,7 +83,12 @@ public override void Link(LinkingContext ctx) a.Link(ctx); } - SetLinked(true); + _linked = true; + } + + public bool IsLinked () + { + throw new NotImplementedException(); } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/GlobalCStatement.cs b/Crimson/CSharp/Grammar/Statements/GlobalCStatement.cs deleted file mode 100644 index ded3be5..0000000 --- a/Crimson/CSharp/Grammar/Statements/GlobalCStatement.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; - -namespace Crimson.CSharp.Grammar.Statements -{ - public abstract class GlobalCStatement : ICrimsonStatement - { - public virtual FullNameCToken Name { get; set; } - public bool _linked = false; - - public virtual Fragment GetCrimsonBasic() - { - Fragment f = new Fragment(0); - f.Add(new CommentBStatement("GlobalC:" + Name)); - return f; - } - - public abstract void Link(LinkingContext ctx); - - public bool IsLinked() - { - return _linked; - } - public void SetLinked(bool l) - { - _linked = l; - } - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs index 730185d..15be7b3 100644 --- a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs @@ -14,9 +14,11 @@ namespace Crimson.CSharp.Grammar.Statements /// /// A uhm... global variable... Is a member of a package, rather than a function. /// - public class GlobalVariableCStatement : GlobalCStatement + public class GlobalVariableCStatement : INamedStatement { private CrimsonTypeCToken type; + public FullNameCToken Name { get; protected set; } + private bool _linked = false; public ComplexValueCToken? Complex { get; } public SimpleValueCToken? Simple { get; } @@ -35,12 +37,27 @@ public GlobalVariableCStatement(CrimsonTypeCToken type, FullNameCToken identifie Simple = value; } - public override void Link(LinkingContext ctx) + public void Link(LinkingContext ctx) { return; } - public override Fragment GetCrimsonBasic() + public bool IsLinked () + { + return _linked; + } + + public FullNameCToken GetName () + { + return Name; + } + + public void SetName (FullNameCToken name) + { + Name = name; + } + + public Fragment GetCrimsonBasic() { Fragment statements = new Fragment(0); diff --git a/Crimson/CSharp/Grammar/Statements/INamedStatement.cs b/Crimson/CSharp/Grammar/Statements/INamedStatement.cs new file mode 100644 index 0000000..45b0995 --- /dev/null +++ b/Crimson/CSharp/Grammar/Statements/INamedStatement.cs @@ -0,0 +1,15 @@ +using Crimson.CSharp.Core; +using Crimson.CSharp.Grammar.Tokens; +using CrimsonBasic.CSharp.Core; + +namespace Crimson.CSharp.Grammar.Statements +{ + /// + /// A collection of ICrimsonTokens which make a coherent "phrase". + /// + public interface INamedStatement: ICrimsonStatement + { + public abstract FullNameCToken GetName (); + public abstract void SetName (FullNameCToken name); + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs b/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs index db58ab3..a68bce2 100644 --- a/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs @@ -6,13 +6,13 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class IfBlockCStatement : InternalStatement + internal class IfBlockCStatement : ICrimsonStatement { public IfBlockCStatement() { } - public IfBlockCStatement(ConditionCToken condition, ScopeCToken scope, ElseIfBlockCToken? elifBlock, ElseBlockCToken? elseBlock) + public IfBlockCStatement(ConditionCToken condition, Scope scope, ElseIfBlockCToken? elifBlock, ElseBlockCToken? elseBlock) { Condition = condition; Scope = scope; @@ -21,11 +21,11 @@ public IfBlockCStatement(ConditionCToken condition, ScopeCToken scope, ElseIfBlo } public ConditionCToken Condition { get; } - public ScopeCToken Scope { get; } + public Scope Scope { get; } public ElseIfBlockCToken? ElifBlock { get; } public ElseBlockCToken? ElseBlock { get; } - public override void Link(LinkingContext ctx) + public void Link(LinkingContext ctx) { Condition.Link(ctx); Scope.Link(ctx); @@ -58,7 +58,7 @@ public override void Link(LinkingContext ctx) * (3) * :END_IF */ - public override Fragment GetCrimsonBasic() + public Fragment GetCrimsonBasic() { Fragment wholeBlock = new Fragment(0); @@ -93,5 +93,10 @@ public override Fragment GetCrimsonBasic() return wholeBlock; } + + public bool IsLinked () + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/InternalStatement.cs b/Crimson/CSharp/Grammar/Statements/InternalStatement.cs deleted file mode 100644 index dff84ff..0000000 --- a/Crimson/CSharp/Grammar/Statements/InternalStatement.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Crimson.CSharp.Core; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; -using System.Xml.Linq; - -namespace Crimson.CSharp.Grammar.Statements -{ - public abstract class InternalStatement : ICrimsonStatement - { - private bool _linked = false; - - public virtual Fragment GetCrimsonBasic() - { - Fragment f = new Fragment(0); - f.Add(new CommentBStatement($"{GetType()}: linked=" + IsLinked())); - return f; - } - - public bool IsLinked() - { - return _linked; - } - public void SetLinked(bool l) - { - _linked = l; - } - public abstract void Link(LinkingContext ctx); - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs index 2e04aa8..834cf32 100644 --- a/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs @@ -8,7 +8,7 @@ namespace Crimson.CSharp.Grammar.Statements { - public class InternalVariableCStatement : InternalStatement + public class InternalVariableCStatement : ICrimsonStatement { private CrimsonTypeCToken type; public FullNameCToken Identifier { get; private set; } @@ -42,7 +42,7 @@ public InternalVariableCStatement(CrimsonTypeCToken type, FullNameCToken identif if (Complex == null) throw new CrimsonParserException($"Must assign initial (declaration) value to variable {identifier}"); } - public override void Link(LinkingContext ctx) + public void Link(LinkingContext ctx) { // Only run if not null Simple?.Link(ctx); @@ -50,7 +50,7 @@ public override void Link(LinkingContext ctx) return; } - public override Fragment GetCrimsonBasic() + public Fragment GetCrimsonBasic() { Fragment statements = new Fragment(0); @@ -75,5 +75,10 @@ public override Fragment GetCrimsonBasic() return statements; } + + public bool IsLinked () + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs b/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs index d50626d..2128eec 100644 --- a/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs @@ -1,9 +1,10 @@ using Crimson.CSharp.Core; using Crimson.CSharp.Grammar.Tokens; +using CrimsonBasic.CSharp.Core; namespace Crimson.CSharp.Grammar.Statements { - public class OperationHandlerCStatement: GlobalCStatement + public class OperationHandlerCStatement: ICrimsonStatement { public CrimsonTypeCToken Type1 { get; protected set; } public OperationResolvableValueCToken.OperationType OpType { get; protected set; } @@ -29,11 +30,21 @@ public FunctionCallCStatement Apply(FunctionArgumentCToken arg1, FunctionArgumen return null; } - public override void Link(LinkingContext ctx) + public void Link(LinkingContext ctx) { Type1.Link(ctx); Type2.Link(ctx); TargetFunction = LinkerHelper.LinkFunctionCall(FunctionIdentifier, ctx); } + + public bool IsLinked () + { + throw new NotImplementedException(); + } + + public Fragment GetCrimsonBasic () + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/ReturnCStatement.cs b/Crimson/CSharp/Grammar/Statements/ReturnCStatement.cs index e6f7f69..d4d217b 100644 --- a/Crimson/CSharp/Grammar/Statements/ReturnCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/ReturnCStatement.cs @@ -5,7 +5,7 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class ReturnCStatement : InternalStatement + internal class ReturnCStatement : ICrimsonStatement { public ReturnCStatement(SimpleValueCToken value) { @@ -14,16 +14,21 @@ public ReturnCStatement(SimpleValueCToken value) public SimpleValueCToken Value { get; } - public override void Link(LinkingContext ctx) + public void Link(LinkingContext ctx) { return; } - public override Fragment GetCrimsonBasic() + public Fragment GetCrimsonBasic() { Fragment f = new Fragment(0); f.Add(new ReturnBStatement()); return f; } + + public bool IsLinked () + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs b/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs index 1dd0546..e2c899e 100644 --- a/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs @@ -1,21 +1,44 @@ using Crimson.CSharp.Core; using Crimson.CSharp.Grammar.Tokens; +using CrimsonBasic.CSharp.Core; namespace Crimson.CSharp.Grammar.Statements { - public class StructureCStatement : GlobalCStatement + public class StructureCStatement : INamedStatement { - public StructureCStatement(FullNameCToken name, IList body) + public FullNameCToken Name { get; set; } + + public StructureCStatement(FullNameCToken name, IList body) { Name = name; Body = body; } - public IList Body { get; } + public IList Body { get; } + + public Fragment GetCrimsonBasic () + { + throw new NotImplementedException(); + } + + public bool IsLinked () + { + throw new NotImplementedException(); + } - public override void Link(LinkingContext ctx) + public void Link(LinkingContext ctx) { return; } + + public FullNameCToken GetName () + { + return Name; + } + + public void SetName (FullNameCToken name) + { + Name = name; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs b/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs index b40ed9a..725ed98 100644 --- a/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs @@ -7,7 +7,7 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class VariableAssignmentCStatement : InternalStatement + internal class VariableAssignmentCStatement : ICrimsonStatement { public FullNameCToken Identifier { get; set; } @@ -26,14 +26,14 @@ public VariableAssignmentCStatement(FullNameCToken identifier, ComplexValueCToke Complex = value; } - public override void Link(LinkingContext ctx) + public void Link(LinkingContext ctx) { Identifier = LinkerHelper.LinkIdentifier(Identifier, ctx); Simple?.Link(ctx); Complex?.Link(ctx); } - public override Fragment GetCrimsonBasic() + public Fragment GetCrimsonBasic() { Fragment result = new Fragment(0); @@ -53,5 +53,10 @@ public override Fragment GetCrimsonBasic() return result; } + + public bool IsLinked () + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs b/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs index 2c10031..11444d5 100644 --- a/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs @@ -5,19 +5,19 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class WhileBlockCStatement : InternalStatement + internal class WhileBlockCStatement : ICrimsonStatement { - public WhileBlockCStatement(ConditionCToken condition, ScopeCToken scope) + public WhileBlockCStatement(ConditionCToken condition, Scope scope) { Condition = condition; Scope = scope; } public ConditionCToken Condition { get; } - public ScopeCToken Scope { get; } + public Scope Scope { get; } - public override void Link(LinkingContext ctx) + public void Link(LinkingContext ctx) { Condition.Link(ctx); Scope.Link(ctx); @@ -48,7 +48,7 @@ public override void Link(LinkingContext ctx) * (3) * :END_IF */ - public override Fragment GetCrimsonBasic() + public Fragment GetCrimsonBasic() { Fragment wholeBlock = new Fragment(0); @@ -59,5 +59,10 @@ public override Fragment GetCrimsonBasic() return wholeBlock; } + + public bool IsLinked () + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs b/Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs index 6078e09..de8ff87 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(ScopeCToken statements) + public ElseBlockCToken(Scope statements) { Scope = statements; } - public ScopeCToken Scope { get; } + public Scope Scope { get; } public Fragment GetCrimsonBasic() { diff --git a/Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs b/Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs deleted file mode 100644 index 406af5b..0000000 --- a/Crimson/CSharp/Grammar/Tokens/ScopeCToken.cs +++ /dev/null @@ -1,38 +0,0 @@ -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); - f.Add(new PushSfBStatement()); - foreach (var s in Statements) - { - f.Add(s.GetCrimsonBasic()); - } - f.Add(new PopSfBStatement()); - 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/Test Compilations/main.crm b/Crimson/Resources/Test Compilations/main.crm index 5a369b2..8200812 100644 --- a/Crimson/Resources/Test Compilations/main.crm +++ b/Crimson/Resources/Test Compilations/main.crm @@ -1,54 +1,56 @@ -// Import packages: -// - 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; - -// Declare ophandlers: -// -#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(); - if (true == true) { - counter = 5; - } else if (b == true) { - int c = utils.times(5, 3); - int d = heap.alloc(); - } else { - return b; +{ + // Import packages: + // - 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; + + // Declare ophandlers: + // + #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(); + if (true == true) { + counter = 5; + } else if (b == true) { + int c = utils.times(5, 3); + int d = heap.alloc(); + } else { + return b; + } + + call(4, 7, 5); + + // Allocate memory on the heap for 'i' and get a pointer to it + ptr i = heap.alloc(4); + + // Set memory at pointer 'i' + i *= 4; + + // Note usage of functions from imported packages + stdout.write(i); + + ptr ret = heap.alloc(4); + ret *= utils.multiply(i, 5); + return ret; + } + + function ptr call () { + ptr test = heap.alloc(69); + return test; + } + + structure Person { + ptr age = heap.alloc(5); } - - call(4, 7, 5); - - // Allocate memory on the heap for 'i' and get a pointer to it - ptr i = heap.alloc(4); - - // Set memory at pointer 'i' - i *= 4; - - // Note usage of functions from imported packages - stdout.write(i); - - ptr ret = heap.alloc(4); - ret *= utils.multiply(i, 5); - return ret; -} - -function ptr call () { - ptr test = heap.alloc(69); - return test; -} - -structure Person { - ptr age = heap.alloc(5); } \ No newline at end of file From a84d5b9a3bf75e13d3d5c9513b8089c6069f3500 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Mon, 6 Mar 2023 22:45:26 +0000 Subject: [PATCH 009/122] Documented the compiler (probably done idk) --- Crimson/CSharp/Core/Crimson.cs | 46 ++--- Crimson/CSharp/Core/ScopeVisitor.cs | 166 ++++++++---------- Crimson/CSharp/Grammar/Scope.cs | 24 ++- Crimson/Properties/launchSettings.json | 7 + .../Core/{RFASM.cs => RedFoxAssembly.cs} | 4 +- RedFoxAssembly/Documentation/Syntax.md | 130 ++++++++++++++ .../Documentation/TestPrograms/TestAll.rfb | Bin 242 -> 241 bytes .../TestPrograms/TestAllMetadata.json | 3 +- RedFoxAssembly/RedFoxAssembly.csproj | 2 +- 9 files changed, 248 insertions(+), 134 deletions(-) create mode 100644 Crimson/Properties/launchSettings.json rename RedFoxAssembly/CSharp/Core/{RFASM.cs => RedFoxAssembly.cs} (99%) create mode 100644 RedFoxAssembly/Documentation/Syntax.md diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 0aafdd2..5e73a09 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -11,8 +11,12 @@ internal class Crimson private static Logger? LOGGER; internal static readonly string VERSION = "v0.0"; + public static CrimsonOptions Options { get; private set; } + public static CrimsonCompiler Compiler { get; private set; } - static Task Main(string[] args) + public const int ERROR_UNKNOWN = -100; + + static int Main(string[] args) { bool useAutowiredArgs = true; if (useAutowiredArgs) @@ -32,29 +36,31 @@ static Task Main(string[] args) ShowCredits(); Console.WriteLine("Parsing Crimson options"); - return CommandLine.Parser.Default.ParseArguments(args).MapResult((options) => - { - Console.WriteLine(" Option: CompilationSourcePath: " + options.TranslationSourcePath); - Console.WriteLine(" Option: CompilationTargetPath: " + options.TranslationTargetPath); - Console.WriteLine(" Option: NativeLibraryPath: " + options.NativeLibraryPath); - Console.WriteLine(" Option: DumpIntermediates: " + options.DumpIntermediates); - Console.WriteLine(" Option: (Platform) CrimsonBasic: " + options.CrimsonBasic); - Console.WriteLine(" Option: (Platform) RFASM: " + options.RFASM); + Options = CommandLine.Parser.Default.ParseArguments(args).Value; + + Console.WriteLine(" Option: CompilationSourcePath: " + Options.TranslationSourcePath); + Console.WriteLine(" Option: CompilationTargetPath: " + Options.TranslationTargetPath); + Console.WriteLine(" Option: NativeLibraryPath: " + Options.NativeLibraryPath); + Console.WriteLine(" Option: DumpIntermediates: " + Options.DumpIntermediates); + Console.WriteLine(" Option: (Platform) CrimsonBasic: " + Options.CrimsonBasic); + Console.WriteLine(" Option: (Platform) RFASM: " + Options.RFASM); - ConfigureNLog(); + ConfigureNLog(); - Library generator = new Library(options); - Linker linker = new Linker(options); - Flattener flattener = new Flattener(options); - CrimsonCompiler compiler = new CrimsonCompiler(options, generator, linker, flattener); + Library generator = new Library(Options); + Linker linker = new Linker(Options); + Flattener flattener = new Flattener(Options); + Compiler = new CrimsonCompiler(Options, generator, linker, flattener); - return Task.FromResult(compiler.FullyCompileFromOptions()); - }, - (error) => + try { - Console.Error.WriteLine("An issue occurred while parsing the program arguments (invalid arguments)"); - return Task.FromResult(-1); - }); + return Compiler.FullyCompileFromOptions(); + } catch (System.Exception e) + { + Console.WriteLine(e); + LOGGER!.Error(e); + return ERROR_UNKNOWN; + } } private static void ShowSplash() diff --git a/Crimson/CSharp/Core/ScopeVisitor.cs b/Crimson/CSharp/Core/ScopeVisitor.cs index 8e9dab0..c6a018f 100644 --- a/Crimson/CSharp/Core/ScopeVisitor.cs +++ b/Crimson/CSharp/Core/ScopeVisitor.cs @@ -15,11 +15,11 @@ internal class ScopeVisitor: CrimsonBaseVisitor public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) { - Scope compilation = new Scope(scopeStack.Peek()); + Scope compilation = new Scope(scopeStack.TryPeek(out Scope? result) ? result : null); scopeStack.Push(compilation); // Visit imports - IList importCtxs = context._imports; + IList importCtxs = context._imports; foreach (CrimsonParser.ImportUnitContext importCtx in importCtxs) { string path = importCtx.path.Text; @@ -29,7 +29,7 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) } FullNameCToken id = VisitFullName(importCtx.fullName()); ImportCStatement import = new ImportCStatement(path, id); - compilation.AddImport(import); + // TODO compilation.AddImport(import); } // Add operation handlers @@ -37,14 +37,14 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) foreach (CrimsonParser.OperationHandlerContext unitStatementCtx in operationHandlersCtxs) { OperationHandlerCStatement unitStatement = VisitOperationHandler(unitStatementCtx); - compilation.AddOpHandler(unitStatement); + //TODO compilation.AddOpHandler(unitStatement); } // Visit Compilation-Unit statements IList unitStatementCtxs = context._statements; foreach (CrimsonParser.StatementContext unitStatementCtx in unitStatementCtxs) { - ICrimsonStatement unitStatement = ParseScopeStatement(unitStatementCtx); + ICrimsonStatement unitStatement = ParseStatement(unitStatementCtx); compilation.AddStatement(unitStatement); } @@ -53,8 +53,72 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) return scopeStack.Pop(); } + private ICrimsonStatement ParseStatement (CrimsonParser.StatementContext stCtx) + { + + if (stCtx is CrimsonParser.GlobalVariableStatementContext globalContext) + { + CrimsonParser.GlobalVariableDeclarationContext declaration = globalContext.globalVariableDeclaration(); + return VisitGlobalVariableDeclaration(declaration); + } + else if (stCtx is CrimsonParser.FunctionDeclarationStatementContext functionContext) + { + CrimsonParser.FunctionDeclarationContext declaration = functionContext.functionDeclaration(); + return VisitFunctionDeclaration(declaration); + } + else if (stCtx is CrimsonParser.StructureDeclarationStatementContext structureContext) + { + CrimsonParser.StructureDeclarationContext declaration = structureContext.structureDeclaration(); + return VisitStructureDeclaration(declaration); + } + else if (stCtx is CrimsonParser.VariableDeclarationStatementContext variableContext) + { + CrimsonParser.InternalVariableDeclarationContext ivdCtx = variableContext.internalVariableDeclaration(); + return VisitInternalVariableDeclaration(ivdCtx); + } + else if (stCtx is CrimsonParser.ReturnStatementContext returnContext) + { + CrimsonParser.FunctionReturnContext rtnCtx = returnContext.functionReturn(); + return VisitFunctionReturn(rtnCtx); + } + else if (stCtx is CrimsonParser.AssignVariableStatementContext assignContext) + { + CrimsonParser.AssignVariableContext asvCtx = assignContext.assignVariable(); + return ParseAssignVariable(asvCtx); + } + else if (stCtx is CrimsonParser.FunctionCallStatementContext callContext) + { + CrimsonParser.FunctionCallContext fncCtx = callContext.functionCall(); + return VisitFunctionCall(fncCtx); + } + else if (stCtx is CrimsonParser.IfStatementContext ifContext) + { + CrimsonParser.IfBlockContext ifCtx = ifContext.ifBlock(); + return VisitIfBlock(ifCtx); + } + else if (stCtx is CrimsonParser.WhileStatementContext whileContext) + { + CrimsonParser.WhileBlockContext whileCtx = whileContext.whileBlock(); + return VisitWhileBlock(whileCtx); + } + else if (stCtx is CrimsonParser.BasicCallStatementContext basicContext) + { + CrimsonParser.BasicCallContext bcCtx = basicContext.basicCall(); + return VisitBasicCall(bcCtx); + } + else if (stCtx is CrimsonParser.AssemblyCallStatementContext assContext) + { + CrimsonParser.AssemblyCallContext acCtx = assContext.assemblyCall(); + return VisitAssemblyCall(acCtx); + } + else + { + throw new StatementParseException("The given CrimsonParser.FunctionStatementContext " + stCtx + " is not of a permissable type"); + } + } + // ---------------------------------------------------- - // -------------------------- GLOBAL STATEMENTS + // --------------------------------- SCOPE HEADERS // ---------------------------------------------------- public override OperationHandlerCStatement VisitOperationHandler([NotNull] CrimsonParser.OperationHandlerContext context) @@ -152,88 +216,9 @@ public override CrimsonTypeCToken VisitType([NotNull] CrimsonParser.TypeContext } // ---------------------------------------------------- - // -------------------------- INTERNAL STATEMENTS + // ------------------------------------ STATEMENTS // ---------------------------------------------------- - private ICrimsonStatement ParseStatement(CrimsonParser.StatementContext stCtx) - { - if(stCtx is CrimsonParser.VariableDeclarationStatementContext) - { - CrimsonParser.VariableDeclarationStatementContext context = (CrimsonParser.VariableDeclarationStatementContext)stCtx; - CrimsonParser.InternalVariableDeclarationContext ivdCtx = context.internalVariableDeclaration(); - return VisitInternalVariableDeclaration(ivdCtx); - } - else if (stCtx is CrimsonParser.ReturnStatementContext) - { - CrimsonParser.ReturnStatementContext context = (CrimsonParser.ReturnStatementContext)stCtx; - CrimsonParser.FunctionReturnContext rtnCtx = context.functionReturn(); - return VisitFunctionReturn(rtnCtx); - } - else if (stCtx is CrimsonParser.AssignVariableStatementContext) - { - CrimsonParser.AssignVariableStatementContext context = (CrimsonParser.AssignVariableStatementContext)stCtx; - CrimsonParser.AssignVariableContext asvCtx = context.assignVariable(); - return ParseAssignVariable(asvCtx); - } - else if (stCtx is CrimsonParser.FunctionCallStatementContext) - { - CrimsonParser.FunctionCallStatementContext context = (CrimsonParser.FunctionCallStatementContext)stCtx; - CrimsonParser.FunctionCallContext fncCtx = context.functionCall(); - return VisitFunctionCall(fncCtx); - } - else if (stCtx is CrimsonParser.IfStatementContext) - { - CrimsonParser.IfStatementContext context = (CrimsonParser.IfStatementContext)stCtx; - CrimsonParser.IfBlockContext ifCtx = context.ifBlock(); - return VisitIfBlock(ifCtx); - } - else if (stCtx is CrimsonParser.WhileStatementContext) - { - CrimsonParser.WhileStatementContext context = (CrimsonParser.WhileStatementContext)stCtx; - CrimsonParser.WhileBlockContext whileCtx = context.whileBlock(); - return VisitWhileBlock(whileCtx); - } - else if (stCtx is CrimsonParser.BasicCallStatementContext fbcsc) - { - CrimsonParser.BasicCallContext bcCtx = fbcsc.basicCall(); - return VisitBasicCall(bcCtx); - } - else if (stCtx is CrimsonParser.AssemblyCallStatementContext facsc) - { - CrimsonParser.AssemblyCallContext acCtx = facsc.assemblyCall(); - return VisitAssemblyCall(acCtx); - } - else - { - throw new StatementParseException("The given CrimsonParser.FunctionStatementContext " + stCtx + " is not of a permissable type"); - } - } - - - - private ICrimsonStatement ParseScopeStatement (CrimsonParser.StatementContext context) - { - if (context is CrimsonParser.GlobalVariableStatementContext gvCtx) - { - CrimsonParser.GlobalVariableDeclarationContext declaration = gvCtx.globalVariableDeclaration(); - return VisitGlobalVariableDeclaration(declaration); - } - else if (context is CrimsonParser.FunctionDeclarationStatementContext fnCtx) - { - CrimsonParser.FunctionDeclarationContext declaration = fnCtx.functionDeclaration(); - return VisitFunctionDeclaration(declaration); - } - else if (context is CrimsonParser.StructureDeclarationStatementContext structureCtx) - { - CrimsonParser.StructureDeclarationContext declaration = structureCtx.structureDeclaration(); - return VisitStructureDeclaration(declaration); - } - else - { - throw new StatementParseException("The given CrimsonParser.CompilationUnitStatementContext " + context + " is not of a permissable type"); - } - } - public override InternalVariableCStatement VisitInternalVariableDeclaration([NotNull] CrimsonParser.InternalVariableDeclarationContext context) { CrimsonTypeCToken type = VisitType(context.type()); @@ -273,15 +258,6 @@ public override WhileBlockCStatement VisitWhileBlock([NotNull] CrimsonParser.Whi return ifBlock; } - /*public override VariableAssignmentCStatement VisitAssignVariable([NotNull] CrimsonParser.AssignVariableContext context) - { - string identifier = context.Identifier().GetText(); - bool ptr = context.pointer != null; - ResolvableValueCToken value = ParseResolvableValue(context.resolvableValue()); - VariableAssignmentCStatement assignment = new VariableAssignmentCStatement(identifier, value); - return assignment; - }*/ - public override VariableAssignmentCStatement VisitAssignVariableDirect([NotNull] CrimsonParser.AssignVariableDirectContext context) { FullNameCToken identifier = VisitFullName(context.name); diff --git a/Crimson/CSharp/Grammar/Scope.cs b/Crimson/CSharp/Grammar/Scope.cs index 68efda0..8187628 100644 --- a/Crimson/CSharp/Grammar/Scope.cs +++ b/Crimson/CSharp/Grammar/Scope.cs @@ -76,29 +76,25 @@ public string FamilyToString () public Dictionary Structures { get; private set; } public Dictionary GlobalVariables { get; private set; } - public void AddImport(ImportCStatement import) - { - Imports.Add(import.Alias.ToString(), import); - } - public void AddOpHandler(OperationHandlerCStatement handler) - { - OpHandlers.Add(handler); - } + public delegate ICrimsonStatement StatementDelegate (); + public List Delegates { get; private set; } public void AddStatement(ICrimsonStatement statement) { - void CheckContentsAndNameElseAdd (Dictionary d, GCS gcs, string typeNameForError) where GCS : INamedStatement + void AddNamedIfNotDuplicate (Dictionary d, GCS gcs, string typeNameForError) where GCS : INamedStatement { if (d.ContainsKey(gcs.GetName().ToString())) throw new StatementParseException($"Duplicate GlobalStatement name '{gcs.GetName()}' for statement '{statement}' in unit: {this}"); - d.Add(gcs.GetName().ToString(), gcs); + string name = gcs.GetName().ToString(); + d.Add(name, gcs); + Delegates.Add(() => d[name]); } - if (statement is FunctionCStatement f) CheckContentsAndNameElseAdd(Functions, f, "Function"); - else if (statement is GlobalVariableCStatement g) CheckContentsAndNameElseAdd(GlobalVariables, g, "Global Variable"); - else if (statement is StructureCStatement s) CheckContentsAndNameElseAdd(Structures, s, "Structure"); - else throw new StatementParseException("The given statement " + statement + " may not be added to a CompilationUnit"); + if (statement is FunctionCStatement f) AddNamedIfNotDuplicate(Functions, f, "Function"); + else if (statement is GlobalVariableCStatement g) AddNamedIfNotDuplicate(GlobalVariables, g, "Global Variable"); + else if (statement is StructureCStatement s) AddNamedIfNotDuplicate(Structures, s, "Structure"); + else Delegates.Add(() => statement); } // Linking diff --git a/Crimson/Properties/launchSettings.json b/Crimson/Properties/launchSettings.json new file mode 100644 index 0000000..d414170 --- /dev/null +++ b/Crimson/Properties/launchSettings.json @@ -0,0 +1,7 @@ +{ + "profiles": { + "Crimson": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/RedFoxAssembly/CSharp/Core/RFASM.cs b/RedFoxAssembly/CSharp/Core/RedFoxAssembly.cs similarity index 99% rename from RedFoxAssembly/CSharp/Core/RFASM.cs rename to RedFoxAssembly/CSharp/Core/RedFoxAssembly.cs index 520b718..8d116a3 100644 --- a/RedFoxAssembly/CSharp/Core/RFASM.cs +++ b/RedFoxAssembly/CSharp/Core/RedFoxAssembly.cs @@ -6,9 +6,9 @@ using RedFoxAssembly.AntlrBuild; using RedFoxAssembly.CSharp.Statements; -namespace Crimson.CSharp.Core +namespace RedFoxAssembly.CSharp.Core { - internal class RFASM + internal class RedFoxAssembly { private static Logger? LOGGER; diff --git a/RedFoxAssembly/Documentation/Syntax.md b/RedFoxAssembly/Documentation/Syntax.md new file mode 100644 index 0000000..e87dff7 --- /dev/null +++ b/RedFoxAssembly/Documentation/Syntax.md @@ -0,0 +1,130 @@ +# RedFoxAssembly Compiler + +## Running the Compiler +If compiling using Visual Studio, the output `.exe` will be in `/RedFoxAssembly/bin/[Debug/Release]/{.NET version}`. For me, this path is `/RedFoxAssembly/bin/Debug/net6.0/`. + +Run the compiler `.exe` from the command line. +``` +// Example command to run the compiler executable + +RedFoxAssembly.exe -a value -- +``` + +### Arguments +| Short Flag | Long Flag | Arguments | Purpose | Usage | +| --- | --- | --- | --- | +| `-w` | `--dataWidth` | int | Specify the width of a word in the compilation. This may be overwritten by the program itself. | `-w 4` | +| `-s` | `--source` | string | Specify the relative path to the source code to compile. | `-s ../Path/To/Program.rfp` | +| `-m` | `--metapath` | string | Specify the path to the metadata JSON file. | `-m ../Path/To/Metdata.json` | +| - | `--help` | - | Display a help message with commands. | `--help` | +| - | `--version` | - | Display version information | `--version` | + +## Metadata +A JSON file containing plaintext metadata about the current compilation. + +### Fields +| Name | Value | Purpose | +| --- | --- | --- | +| Authors | Array of strings | List the names of the authors of this program. | +| AddAuthors | Boolean | Add the names of the authors to the binary file. | +| AddDateTime | Boolean | Add the date and time of compilation to the binary file. | +| AddConstants | Boolean | Add the names and values of constants in the assembly program to the binary file. (Useful for debugging/inspecting the binary) | +| AddLabels | Boolean | Add the names and addresses of labels in the assembly program to the binary file. (Useful for debugging/inspecting the binary) | + +Example JSON: +```json +{ + "Authors": ["Me", "You"], + "AddAuthors": true, + "AddDateTime": true, + "AddConstants": true, + "AddLabels": true +} +``` + +## Structure of a Program + +A program consists of, in order: +1) A list of configuration statements +2) A list of command statements +2) A `.end` file terminator + +## Statements + +### Configuration Statements +| Statement | Argument #1 | Argument #2 | Purpose | Example | +| --- | --- | --- | --- | --- | +| `.width` | (int) width | - | To set the width of a word in this program. | `.width 5` | +| `.word` | (id) name | (word) value | To set a value which will be preprocessed by the compiler and can be inserted into future statements. | `.word _FOO_ 0x01AB` | +| `.byte` | (id) name | (byte) value | To set a value which will be preprocessed by the compiler and can be inserted into future statements. | `.byte _BAR_ 0xCD` | + +Declaring multiple constants (`.word` or `.byte`) with the same `{id}` will cause a compiler error. + +### Command Statements +| Statement | Purpose | Syntax | Argument #1 | Argument #2 | Example | +| --- | --- | --- | --- | --- | +| Label | Declare a point which may be jumped to from elsewhere in the program.| `::_{id}_` | `(id) id`: An identifier to name this label. | - | `::_POINT_` +| Repeat | Repeat a selection of bytes to fill space in the output binary. | `.repeat {times} {pattern}` | `(int) times`: The number of times the pattern should repeat | `(byte[]) pattern` | `.repeat 15 0x05 0x06 _NAMEOFCONSTANT_` | +| Instruction | Instruct the CPU. | `{instruction} {arg1} {arg2}` | See instruction reference | <- | <- +| End | The final statement in the program. Used by ANTLR to detect the end of the file. Adding statements after this may cause undocumented behaviors. | `{instruction} {arg1} {arg2}` | See instruction reference | <- | <- + +### Other Statements +| Statement | Argument #1 | Argument #2 | Purpose | Example | +| --- | --- | --- | --- | --- | +| `.end` | - | - | The final statement in the program. Used by ANTLR to detect the end of the file. Adding statements after this may cause undocumented behaviors. | `.end` | + +### Addressing Modes and Register Prefixes +| Mode | Prefix | Addressing Mode | Offset | +| --- | --- | --- | --- | +| Hexadecimal | `0x` | `None` | - | +| Register | `Rx` | `Register` | 0 | +| SpecialisedRegister | `Sx` | `Register` | 0 | +| ComponentRegister | `Cx` | `Register` | +64 | +| GeneralRegister | `Gx` | `Register` | +128 | + +### Data Types +| Type | Description | Example | Notes | +| --- | --- | --- | --- | +| Byte | A byte, written in hexadecimal... Idk what else to say look it up if you don't know. | `0x69` | `0x` may be replaced with an addressing mode. | +| Word | A number of bytes equal to the current data width. | For data width 3: `0x12CD4F` | `0x` may be replaced with an addressing mode. | +| Int | A decimal number. | `420` | - | +| ID | A name to identify a thing. Started and terminated with an underscore (`_`). May contain alphanumberic characters (`0-9`, `a-z`, `A-Z`) and underscores. Format: `_{0-9a-zA-Z}_` | `_C00L_NAM3_` | - | + +## Instructions +The full list of instructions can be found in the RFVM (Red Fox Virtual Machine) documentation, but you're particularly nosy you can look in `/CSharp/Antlr/Input/RedFoxAssembly.g4` to see the exact version which this compiler is using. + +## Example Program +``` +// Example program (might do something I haven't checked) +.width 2 +.word _OpA_ 0x2358 +.word _OpB_ 0x41f0 + +.repeat 15 0x05 0x06 0x07 + +JMP _start_ + +::_label_ + +SUB +RRW 0x00 +WRW 0x80 +RTN + +::_start_ + +RVW _OpA_ +WRW 0x01 + +RVW _OpB_ +WRW 0x02 + +BSR _label_ + +RVB 0x80 +WRB 0x85 0x00 + +RRW Rx85 +HLT +.end +``` \ No newline at end of file diff --git a/RedFoxAssembly/Documentation/TestPrograms/TestAll.rfb b/RedFoxAssembly/Documentation/TestPrograms/TestAll.rfb index 559d55b35f06249636f71b6832bec3463c1488a7..004175ffd5ee022de512c115fa4a8a03cd963e9b 100644 GIT binary patch delta 120 zcmV-;0Ehqb0r3F?2>_;%10pRBL3MO!Z*p@wO=T=uZ*>41L}7GgRB3HxIxsdbFf%VQ zFfubNGBG+dGCDFckyAbvrUzeaVPa)$UjWtzUvqR}a&%t++yRlWB$2-f9ti;40}%if afDaiXSQP;oLGTp<4gl5|fE0xQk%a(q-6Glm delta 121 zcmV-<0EYkZ0rCL@2>_>&10pUDL3MO!Z*p@wO=T<~S#Na!97JJsWmIWxWjZo7FEBDM zGB7eTEHO1YGdVgjFp*L|7N-YaY++($Y+nG^2VZk^VRCd|0NnwRuOyMa2_6Xm-2)K- b6@U*JBUlvy8A0$B0uBJz7=RRo0Fi|NiK-(7 diff --git a/RedFoxAssembly/Documentation/TestPrograms/TestAllMetadata.json b/RedFoxAssembly/Documentation/TestPrograms/TestAllMetadata.json index 4c6ae41..50a8eab 100644 --- a/RedFoxAssembly/Documentation/TestPrograms/TestAllMetadata.json +++ b/RedFoxAssembly/Documentation/TestPrograms/TestAllMetadata.json @@ -1,6 +1,5 @@ { - "Authors": ["Me, You"], - "Labels": ["Me, You"], + "Authors": ["Me", "You"], "AddAuthors": true, "AddDateTime": true, "AddConstants": true, diff --git a/RedFoxAssembly/RedFoxAssembly.csproj b/RedFoxAssembly/RedFoxAssembly.csproj index 7d65003..c9da866 100644 --- a/RedFoxAssembly/RedFoxAssembly.csproj +++ b/RedFoxAssembly/RedFoxAssembly.csproj @@ -5,7 +5,7 @@ net6.0 enable enable - + RedFoxAssembly.CSharp.Core.RedFoxAssembly From 9a99254ac43969742fdd33758e8cc18055549700 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Wed, 15 Mar 2023 21:18:13 +0000 Subject: [PATCH 010/122] Trying to get linking scopes to work --- Crimson/CSharp/Core/Compilation.cs | 10 +- Crimson/CSharp/Core/Flattener.cs | 2 +- Crimson/CSharp/Core/Library.cs | 23 ++-- Crimson/CSharp/Core/Linker.cs | 45 +++----- Crimson/CSharp/Core/LinkingContext.cs | 36 ++++++- Crimson/CSharp/Core/ScopeVisitor.cs | 10 +- Crimson/CSharp/Grammar/Scope.cs | 102 ++++++++++++++---- ...atement.cs => AbstractCrimsonStatement.cs} | 8 +- .../Statements/AssemblyCallCStatement.cs | 15 +-- .../Grammar/Statements/BasicCallCStatement.cs | 12 +-- .../Grammar/Statements/FunctionCStatement.cs | 32 +++--- .../Statements/FunctionCallCStatement.cs | 18 ++-- .../Statements/GlobalVariableCStatement.cs | 18 ++-- .../{INamedStatement.cs => INamed.cs} | 2 +- .../Grammar/Statements/IfBlockCStatement.cs | 16 ++- .../Statements/InternalVariableCStatement.cs | 16 +-- .../Statements/OperationHandlerCStatement.cs | 19 ++-- .../Grammar/Statements/ReturnCStatement.cs | 15 +-- .../Grammar/Statements/StructureCStatement.cs | 19 ++-- .../VariableAssignmentCStatement.cs | 20 ++-- .../Statements/WhileBlockCStatement.cs | 9 +- 21 files changed, 236 insertions(+), 211 deletions(-) rename Crimson/CSharp/Grammar/Statements/{ICrimsonStatement.cs => AbstractCrimsonStatement.cs} (57%) rename Crimson/CSharp/Grammar/Statements/{INamedStatement.cs => INamed.cs} (87%) diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/CSharp/Core/Compilation.cs index 6bc209d..948afac 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/CSharp/Core/Compilation.cs @@ -11,7 +11,7 @@ namespace Crimson.CSharp.Core /// /// For example: <"C:/main.crm", CompilationUnit>. /// - internal class Compilation + public class Compilation { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); @@ -21,7 +21,7 @@ internal class Compilation /// internal Library Library { get; } - public Compilation(Scope rootUnit, CrimsonOptions options) + public Compilation (Scope rootUnit, CrimsonOptions options) { Library = new Library(options); @@ -33,7 +33,7 @@ public Compilation(Scope rootUnit, CrimsonOptions options) /// Loads dependencies for the given root CompilationUnit, as well as that unit's dependencies, recursively. /// /// - private void LoadLibrary(Scope root) + private void LoadLibrary (Scope root) { // For each import foreach (var i in root.Imports) @@ -46,12 +46,12 @@ private void LoadLibrary(Scope root) } } - public Scope GetRootUnit() + public Scope GetRootUnit () { return Library.Units[Library.ROOT_FACET_NAME]; } - public override string ToString() + public override string ToString () { return $"Compilation(RootUnit={GetRootUnit()}; Library={Library.ToString()})"; } diff --git a/Crimson/CSharp/Core/Flattener.cs b/Crimson/CSharp/Core/Flattener.cs index c5c6a0b..b408235 100644 --- a/Crimson/CSharp/Core/Flattener.cs +++ b/Crimson/CSharp/Core/Flattener.cs @@ -135,7 +135,7 @@ private FunctionCStatement GetEntryFunction(Compilation compilation) } } - private void FixNameAndAdd(Dictionary map, GS gs) where GS: INamedStatement + private void FixNameAndAdd(Dictionary map, GS gs) where GS: INamed { int i = 0; string prefix = GetFlattenedPrefix(gs.GetType()); diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 4f1be51..5800562 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -32,13 +32,13 @@ internal class Library /// internal Dictionary Units { get; } - public Library(CrimsonOptions options) + public Library (CrimsonOptions options) { Options = options; Units = new Dictionary(); } - public Scope LoadUnitFromPath(string pathIn) + public Scope LoadUnitFromPath (string pathIn) { IEnumerable lines = Enumerable.Empty(); @@ -61,8 +61,8 @@ public Scope LoadUnitFromPath(string pathIn) Scope newUnit = LoadUnitFromText(path + " (" + pathIn + ")", programText); Units[path] = newUnit; return newUnit; - } - catch (IOException io) + } + catch (IOException io) { throw new UnitGeneratorException("Unable to find source file for CompilationUnit " + path + " (" + pathIn + ")", io); } @@ -70,13 +70,13 @@ public Scope LoadUnitFromPath(string pathIn) { throw new UnitGeneratorException("Error while parsing '" + path + "' (" + pathIn + ")", spe); } - catch (System.Exception e) + catch (System.Exception e) { throw new UnitGeneratorException("Unexpected error while creating CompilationUnit from " + path + " (" + pathIn + ")", e); } } - public Scope LoadUnitFromText(string sourceName, string textIn) + public Scope LoadUnitFromText (string sourceName, string textIn) { // Get Antlr context AntlrInputStream a4is = new AntlrInputStream(textIn); @@ -94,7 +94,7 @@ public Scope LoadUnitFromText(string sourceName, string textIn) return compilationUnit; } - public string StandardiseNativePath(string path) + public string StandardiseNativePath (string path) { if (path.StartsWith(SYSTEM_LIBRARY_PREFIX)) { @@ -109,12 +109,13 @@ public string StandardiseNativePath(string path) return path; } - public Scope? LookupUnitByPath(string path) + public Scope? LookupUnitByPath (string path) { if (Units.ContainsKey(path)) { return Units[path]; - } else + } + else { var nativePath = StandardiseNativePath(path); if (Units.ContainsKey(nativePath)) @@ -125,9 +126,9 @@ public string StandardiseNativePath(string path) return null; } - public override string ToString() + public override string ToString () { - return $"Library(Units={Units})"; + return $"Library(Units={String.Join(',', Units)})"; } } } diff --git a/Crimson/CSharp/Core/Linker.cs b/Crimson/CSharp/Core/Linker.cs index 2097427..c4239a6 100644 --- a/Crimson/CSharp/Core/Linker.cs +++ b/Crimson/CSharp/Core/Linker.cs @@ -16,7 +16,7 @@ internal class Linker private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); public CrimsonOptions Options { get; } - public Linker(CrimsonOptions options) + public Linker (CrimsonOptions options) { Options = options; } @@ -25,43 +25,26 @@ public Linker(CrimsonOptions options) /// Links the FunctionCalls in a Compilation. /// /// - public void Link(Compilation compilation) + public void Link (Compilation compilation) { LOGGER.Info("Linking compilation " + compilation); // Iterate through each relevant unit - foreach (KeyValuePair pair in compilation.Library.Units) + foreach (KeyValuePair keyScopePair in compilation.Library.Units) { - LOGGER.Info("Linking " + pair); + LOGGER.Info("Linking " + keyScopePair); // Generate linking context for the current unit (based on the aliases of imports) // This means mapping "ALIAS" to "UNIT" so that each statement can remap itself - LinkingContext ctx = new LinkingContext(pair.Key, pair.Key, new Dictionary()); - Scope unit = pair.Value; - ctx.Links.Add(pair.Key, pair.Value); //TODO This may cause issues - foreach (KeyValuePair importPair in unit.Imports) - { - /* - * Get the alias of the dependency. - * For example: - * The alias of '#using "utils.crm" as u' is 'u' - */ - string alias = importPair.Key; - - /* - * Get the relative path of the unit which the alias refers to. - * For example: - * '#using "utils.crm" as u' may result in 'C:/utils.crm' - */ - string relativePath = importPair.Value.Path; + LinkingContext ctx = new LinkingContext(keyScopePair.Key, keyScopePair.Key, new Dictionary(), compilation); + Scope unit = keyScopePair.Value; + ctx.Links.Add(keyScopePair.Key, keyScopePair.Value); //TODO This may cause issues - /* - * - */ - Scope? mappingUnit = compilation.Library.LookupUnitByPath(relativePath); - if (mappingUnit == null) throw new LinkingException("Could not add unloaded unit " + relativePath + " (alias=" + alias + ") to mapping context"); - - ctx.Links.Add(alias, mappingUnit); + // Add links from the current unit + Dictionary NewLinks = keyScopePair.Value.GetLinks(compilation); + foreach (var l in NewLinks) + { + ctx.Links.Add(l.Key, l.Value); } // Link each statement in the unit @@ -79,9 +62,9 @@ public void Link(Compilation compilation) return; } - private static List GetAllStatements(Scope unit) + private static List GetAllStatements (Scope unit) { - var statements = new List(); + var statements = new List(); foreach (var s in unit.Functions.Values) { statements.Add(s); diff --git a/Crimson/CSharp/Core/LinkingContext.cs b/Crimson/CSharp/Core/LinkingContext.cs index d2965f7..954f24e 100644 --- a/Crimson/CSharp/Core/LinkingContext.cs +++ b/Crimson/CSharp/Core/LinkingContext.cs @@ -9,15 +9,41 @@ public class LinkingContext private string Name { get; } private string CurrentUnitLookupPath { get; } internal Dictionary Links { get; } + public Compilation Compilation { get; } - public LinkingContext(string friendlyName, string currentUnitLookupPath, Dictionary links) + public LinkingContext (string friendlyName, string currentUnitLookupPath, Dictionary links, Compilation compilation) { Name = friendlyName; CurrentUnitLookupPath = currentUnitLookupPath; Links = links; + Compilation = compilation; } - internal Scope GetUnit(string alias) + /// + /// Makes a shallow copy of the object. + /// + /// The references to the Name, CurrentUnitLookupPath and Compilation + /// will be EQUAL (in the sense of ==). + /// + /// The values of the links of the input context will be copied into + /// a NEW dictionary. This means that the old context's links will NOT + /// be affected by edits to the new context's links. + /// + /// + public LinkingContext (LinkingContext ctx) + { + Name = ctx.Name; + CurrentUnitLookupPath = ctx.CurrentUnitLookupPath; + Links = new Dictionary(); + Compilation = ctx.Compilation; + + foreach (var link in ctx.Links) + { + Links.Add(link.Key, link.Value); + } + } + + internal Scope GetUnit (string alias) { if (Links.ContainsKey(alias)) { @@ -27,14 +53,14 @@ internal Scope GetUnit(string alias) throw new LinkingException("No alias '" + alias + "' in " + ToString()); } - internal Scope GetCurrentUnit() + internal Scope GetCurrentUnit () { return GetUnit(CurrentUnitLookupPath); } - public override string ToString() + public override string ToString () { - return "LinkingContext (" + Name + ") {" + String.Join(",", Links) + "}"; + return $"LinkingContext (name:{Name}; path:{CurrentUnitLookupPath}; links:[{String.Join(",", Links)}])"; } } } \ No newline at end of file diff --git a/Crimson/CSharp/Core/ScopeVisitor.cs b/Crimson/CSharp/Core/ScopeVisitor.cs index c6a018f..71c03d8 100644 --- a/Crimson/CSharp/Core/ScopeVisitor.cs +++ b/Crimson/CSharp/Core/ScopeVisitor.cs @@ -44,7 +44,7 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) IList unitStatementCtxs = context._statements; foreach (CrimsonParser.StatementContext unitStatementCtx in unitStatementCtxs) { - ICrimsonStatement unitStatement = ParseStatement(unitStatementCtx); + AbstractCrimsonStatement unitStatement = ParseStatement(unitStatementCtx); compilation.AddStatement(unitStatement); } @@ -53,7 +53,7 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) return scopeStack.Pop(); } - private ICrimsonStatement ParseStatement (CrimsonParser.StatementContext stCtx) + private AbstractCrimsonStatement ParseStatement (CrimsonParser.StatementContext stCtx) { if (stCtx is CrimsonParser.GlobalVariableStatementContext globalContext) @@ -163,14 +163,14 @@ public override FunctionCStatement.Header VisitFunctionHeader([NotNull] CrimsonP public override StructureCStatement VisitStructureDeclaration([NotNull] CrimsonParser.StructureDeclarationContext context) { FullNameCToken identifier = VisitFullName(context.name); - IList body = VisitStructureBody(context.structureBody()); + IList body = VisitStructureBody(context.structureBody()); StructureCStatement structure = new StructureCStatement(identifier, body); return structure; } - public override IList VisitStructureBody([NotNull] CrimsonParser.StructureBodyContext context) + public override IList VisitStructureBody([NotNull] CrimsonParser.StructureBodyContext context) { - IList statements = new List(); + IList statements = new List(); foreach (CrimsonParser.InternalVariableDeclarationContext ivdCtx in context.internalVariableDeclaration()) { InternalVariableCStatement var = VisitInternalVariableDeclaration(ivdCtx); diff --git a/Crimson/CSharp/Grammar/Scope.cs b/Crimson/CSharp/Grammar/Scope.cs index 8187628..2b96027 100644 --- a/Crimson/CSharp/Grammar/Scope.cs +++ b/Crimson/CSharp/Grammar/Scope.cs @@ -8,16 +8,16 @@ namespace Crimson.CSharp.Grammar /// /// An unlinked collection of statements which is the direct result of the parsing of a Crimson source file. A Linker may be used to convert this into a LinkedUnit. /// - public class Scope: ICrimsonStatement + public class Scope : AbstractCrimsonStatement { public Scope? Parent { get; set; } private bool _linked; private string? _path; - public Scope (Scope? parent): this(parent, null){} + public Scope (Scope? parent) : this(parent, null) { } - public Scope(string? path): this(null, path) {} + public Scope (string? path) : this(null, path) { } private Scope (Scope? parent, string? path) { @@ -25,6 +25,8 @@ private Scope (Scope? parent, string? path) _linked = false; _path = path; + Delegates = new List(); + Imports = new Dictionary(); OpHandlers = new List(); Functions = new Dictionary(); @@ -32,18 +34,21 @@ private Scope (Scope? parent, string? path) GlobalVariables = new Dictionary(); } - public bool HasParent() { - return Parent != null; + public bool HasParent () + { + return Parent != null; } - public Scope GetParent() { - return HasParent() ? Parent! : this; + public Scope GetParent () + { + return HasParent() ? Parent! : this; } - public Scope GetRoot() + public Scope GetRoot () { Scope parent = GetParent(); - do { + do + { parent = parent.GetParent(); } while (parent.HasParent()); return parent; @@ -77,13 +82,25 @@ public string FamilyToString () public Dictionary GlobalVariables { get; private set; } - public delegate ICrimsonStatement StatementDelegate (); + /// + /// The "master" list of statements, which contains a list of suppliers + /// to the statements in the source file in the order that they appear. + /// + /// This allows different types of statement to be maintained and queried + /// seperately through their own maps whilst still maintaining the order + /// that they appear in the source. + /// + /// Hence the resulting Crimson Basic will contain all of the correct + /// statements in the correct order, allowing for arbitrary/overflow + /// execution and more granular control of execution flow. + /// public List Delegates { get; private set; } + public delegate AbstractCrimsonStatement StatementDelegate (); - public void AddStatement(ICrimsonStatement statement) + public void AddStatement (AbstractCrimsonStatement statement) { - void AddNamedIfNotDuplicate (Dictionary d, GCS gcs, string typeNameForError) where GCS : INamedStatement + void AddNamedIfNotDuplicate (Dictionary d, GCS gcs, string typeNameForError) where GCS : AbstractCrimsonStatement, INamed { if (d.ContainsKey(gcs.GetName().ToString())) throw new StatementParseException($"Duplicate GlobalStatement name '{gcs.GetName()}' for statement '{statement}' in unit: {this}"); string name = gcs.GetName().ToString(); @@ -99,22 +116,69 @@ void AddNamedIfNotDuplicate (Dictionary d, GCS gcs, string typ // Linking - public Fragment GetCrimsonBasic () + public Dictionary GetLinks (Compilation compilation) { - throw new NotImplementedException(); + Dictionary Links = new Dictionary(); + foreach (KeyValuePair importPair in Imports) + { + /* + * Get the alias of the dependency. + * For example: + * The alias of '#using "utils.crm" as u' is 'u' + */ + string alias = importPair.Key; + + /* + * Get the relative path of the unit which the alias refers to. + * For example: + * '#using "utils.crm" as u' may result in 'C:/utils.crm' + */ + string relativePath = importPair.Value.Path; + + /* + * + */ + Scope? mappingUnit = compilation.Library.LookupUnitByPath(relativePath); + if (mappingUnit == null) throw new LinkingException("Could not add unloadable unit " + relativePath + " (alias=" + alias + ") to mapping context"); + Links.Add(alias, mappingUnit); + } + return Links; } - public bool IsLinked () + /// + /// For Scope, this is being called when the Scope is within another Scope. This means that it will need to add its own links. + /// + /// + public override void Link (LinkingContext ctx) { - return _linked; + // Partially shallow-copy the old context (links in a lower level should not get carried up to higher levels) + LinkingContext newContext = new LinkingContext(ctx); + + Dictionary dictionary = GetLinks(newContext.Compilation); + foreach (var link in dictionary) + { + ctx.Links.Add(link.Key, link.Value); + } + + foreach (var d in Delegates) + { + d.Invoke().Link(ctx); + } } - public void Link (LinkingContext ctx) + public override Fragment GetCrimsonBasic () { - throw new NotImplementedException(); + Fragment scopeFrag = new Fragment(1); + + foreach (var d in Delegates) + { + scopeFrag.Add(d.Invoke().GetCrimsonBasic()); + } + + return scopeFrag; } - public override string ToString() + public override string ToString () { return $"Scope(Imports:{Imports.Count} Functions:{Functions.Count} Structures:{Structures.Count} GlobalVariables{GlobalVariables.Count})"; } diff --git a/Crimson/CSharp/Grammar/Statements/ICrimsonStatement.cs b/Crimson/CSharp/Grammar/Statements/AbstractCrimsonStatement.cs similarity index 57% rename from Crimson/CSharp/Grammar/Statements/ICrimsonStatement.cs rename to Crimson/CSharp/Grammar/Statements/AbstractCrimsonStatement.cs index 7e7cbe7..d60d771 100644 --- a/Crimson/CSharp/Grammar/Statements/ICrimsonStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/AbstractCrimsonStatement.cs @@ -7,12 +7,12 @@ namespace Crimson.CSharp.Grammar.Statements /// /// A collection of ICrimsonTokens which make a coherent "phrase". /// - public interface ICrimsonStatement + public abstract class AbstractCrimsonStatement { - public abstract void Link(LinkingContext ctx); + public bool Linked { get; set; } - public abstract bool IsLinked(); + public abstract void Link (LinkingContext ctx); - public abstract Fragment GetCrimsonBasic(); + public abstract Fragment GetCrimsonBasic (); } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs index 6ac7db6..b64df4e 100644 --- a/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs @@ -4,30 +4,25 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class AssemblyCallCStatement : ICrimsonStatement + internal class AssemblyCallCStatement : AbstractCrimsonStatement { private string assemblyText; - public AssemblyCallCStatement(string assemblyText) + public AssemblyCallCStatement (string assemblyText) { this.assemblyText = assemblyText; } - public Fragment GetCrimsonBasic() + public override Fragment GetCrimsonBasic () { Fragment f = new Fragment(0); f.Add(new AssemblyBStatement(assemblyText)); return f; } - public bool IsLinked () + public override void Link (LinkingContext ctx) { - throw new NotImplementedException(); - } - - public void Link(LinkingContext ctx) - { - + Linked = true; } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs index 973c3ae..8b75c63 100644 --- a/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs @@ -4,7 +4,7 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class BasicCallCStatement : ICrimsonStatement + internal class BasicCallCStatement : AbstractCrimsonStatement { public string AssemblyText { get; protected set; } @@ -13,19 +13,15 @@ public BasicCallCStatement (string assemblyText) AssemblyText = assemblyText; } - public Fragment GetCrimsonBasic () + public override Fragment GetCrimsonBasic () { Fragment f = new Fragment(0); f.Add(new ArbitraryBStatement(AssemblyText)); return f; } - public void Link (LinkingContext ctx) + public override void Link (LinkingContext ctx) { - } - - public bool IsLinked () - { - throw new NotImplementedException(); + Linked = true; } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs index ef30e7b..476c3e1 100644 --- a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs @@ -13,33 +13,32 @@ namespace Crimson.CSharp.Grammar.Statements /// /// A function, defined with the function keyword. Is a member of a package. /// - public class FunctionCStatement : INamedStatement + public class FunctionCStatement : AbstractCrimsonStatement, INamed { public CrimsonTypeCToken ReturnType { get; } public Header FunctionHeader { get; } public Scope Scope { get; } public FullNameCToken Name { get => FunctionHeader.Identifier; set { FunctionHeader.Identifier = value; } } - private bool _linked = false; - public FunctionCStatement(CrimsonTypeCToken returnType, Header header, Scope scope) + public FunctionCStatement (CrimsonTypeCToken returnType, Header header, Scope scope) { ReturnType = returnType; FunctionHeader = header; Scope = scope; } - public void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { - if (IsLinked()) return; + if (Linked) return; ReturnType.Link(ctx); - ((ICrimsonToken)FunctionHeader).Link(ctx); + ((ICrimsonToken) FunctionHeader).Link(ctx); Scope.Link(ctx); - _linked = true; + Linked = true; } - public Fragment GetCrimsonBasic() + public override Fragment GetCrimsonBasic () { Fragment function = new Fragment(0); @@ -60,11 +59,6 @@ public Fragment GetCrimsonBasic() return function; } - public bool IsLinked () - { - throw new NotImplementedException(); - } - public FullNameCToken GetName () { return Name; @@ -72,7 +66,7 @@ public FullNameCToken GetName () public void SetName (FullNameCToken name) { - throw new NotImplementedException(); + Name = name; } public class Parameter : ICrimsonToken @@ -80,13 +74,13 @@ public class Parameter : ICrimsonToken public CrimsonTypeCToken Type { get; } public FullNameCToken Identifier { get; set; } - public Parameter(CrimsonTypeCToken type, FullNameCToken identifier) + public Parameter (CrimsonTypeCToken type, FullNameCToken identifier) { Type = type; Identifier = identifier; } - void ICrimsonToken.Link(LinkingContext ctx) + void ICrimsonToken.Link (LinkingContext ctx) { Type.Link(ctx); Identifier = LinkerHelper.LinkIdentifier(Identifier, ctx); @@ -98,18 +92,18 @@ public class Header : ICrimsonToken public FullNameCToken Identifier { get; set; } public List Parameters { get; protected set; } - public Header(FullNameCToken identifier, List parameters) + public Header (FullNameCToken identifier, List parameters) { Identifier = identifier; Parameters = parameters; } - void ICrimsonToken.Link(LinkingContext ctx) + void ICrimsonToken.Link (LinkingContext ctx) { Identifier = LinkerHelper.LinkIdentifier(Identifier, ctx); foreach (var p in Parameters) { - ((ICrimsonToken)p).Link(ctx); + ((ICrimsonToken) p).Link(ctx); } } } diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs index 1f3280d..6022448 100644 --- a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs @@ -6,16 +6,15 @@ namespace Crimson.CSharp.Grammar.Statements { - public class FunctionCallCStatement : ICrimsonStatement + public class FunctionCallCStatement : AbstractCrimsonStatement { private FullNameCToken identifier; private FunctionCStatement? targetFunction; private IList arguments; - private bool _linked = false; public static readonly string FUNCTION_RETURN_VARIABLE_NAME = "FUNC_RETURN"; - public FunctionCallCStatement(FullNameCToken identifier, IList arguments) : base() + public FunctionCallCStatement (FullNameCToken identifier, IList arguments) : base() { if (!identifier.HasMember()) throw new CrimsonParserException($"Name {identifier} must contain a member name."); @@ -32,7 +31,7 @@ public FunctionCallCStatement(FullNameCToken identifier, IList /// - public Fragment GetCrimsonBasic() + public override Fragment GetCrimsonBasic () { Fragment f = new Fragment(0); @@ -72,9 +71,9 @@ public Fragment GetCrimsonBasic() return f; } - public void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { - if (IsLinked()) return; + if (Linked) return; targetFunction = LinkerHelper.LinkFunctionCall(identifier, ctx); @@ -83,12 +82,7 @@ public void Link(LinkingContext ctx) a.Link(ctx); } - _linked = true; - } - - public bool IsLinked () - { - throw new NotImplementedException(); + Linked = true; } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs index 15be7b3..34ef3fe 100644 --- a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs @@ -14,37 +14,31 @@ namespace Crimson.CSharp.Grammar.Statements /// /// A uhm... global variable... Is a member of a package, rather than a function. /// - public class GlobalVariableCStatement : INamedStatement + public class GlobalVariableCStatement : AbstractCrimsonStatement, INamed { private CrimsonTypeCToken type; public FullNameCToken Name { get; protected set; } - private bool _linked = false; public ComplexValueCToken? Complex { get; } public SimpleValueCToken? Simple { get; } - public GlobalVariableCStatement(CrimsonTypeCToken type, FullNameCToken identifier, ComplexValueCToken value) + public GlobalVariableCStatement (CrimsonTypeCToken type, FullNameCToken identifier, ComplexValueCToken value) { this.type = type; Name = identifier; Complex = value; } - public GlobalVariableCStatement(CrimsonTypeCToken type, FullNameCToken identifier, SimpleValueCToken value) + public GlobalVariableCStatement (CrimsonTypeCToken type, FullNameCToken identifier, SimpleValueCToken value) { this.type = type; Name = identifier; Simple = value; } - public void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { - return; - } - - public bool IsLinked () - { - return _linked; + Linked = true; } public FullNameCToken GetName () @@ -57,7 +51,7 @@ public void SetName (FullNameCToken name) Name = name; } - public Fragment GetCrimsonBasic() + public override Fragment GetCrimsonBasic () { Fragment statements = new Fragment(0); diff --git a/Crimson/CSharp/Grammar/Statements/INamedStatement.cs b/Crimson/CSharp/Grammar/Statements/INamed.cs similarity index 87% rename from Crimson/CSharp/Grammar/Statements/INamedStatement.cs rename to Crimson/CSharp/Grammar/Statements/INamed.cs index 45b0995..3c02f03 100644 --- a/Crimson/CSharp/Grammar/Statements/INamedStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/INamed.cs @@ -7,7 +7,7 @@ namespace Crimson.CSharp.Grammar.Statements /// /// A collection of ICrimsonTokens which make a coherent "phrase". /// - public interface INamedStatement: ICrimsonStatement + public interface INamed { public abstract FullNameCToken GetName (); public abstract void SetName (FullNameCToken name); diff --git a/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs b/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs index a68bce2..a24f09a 100644 --- a/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs @@ -6,13 +6,13 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class IfBlockCStatement : ICrimsonStatement + internal class IfBlockCStatement : AbstractCrimsonStatement { - public IfBlockCStatement() + public IfBlockCStatement () { } - public IfBlockCStatement(ConditionCToken condition, Scope scope, ElseIfBlockCToken? elifBlock, ElseBlockCToken? elseBlock) + public IfBlockCStatement (ConditionCToken condition, Scope scope, ElseIfBlockCToken? elifBlock, ElseBlockCToken? elseBlock) { Condition = condition; Scope = scope; @@ -25,12 +25,13 @@ public IfBlockCStatement(ConditionCToken condition, Scope scope, ElseIfBlockCTok public ElseIfBlockCToken? ElifBlock { get; } public ElseBlockCToken? ElseBlock { get; } - public void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { Condition.Link(ctx); Scope.Link(ctx); ElifBlock?.Link(ctx); ElseBlock?.Link(ctx); + Linked = true; } /* @@ -58,7 +59,7 @@ public void Link(LinkingContext ctx) * (3) * :END_IF */ - public Fragment GetCrimsonBasic() + public override Fragment GetCrimsonBasic () { Fragment wholeBlock = new Fragment(0); @@ -93,10 +94,5 @@ public Fragment GetCrimsonBasic() return wholeBlock; } - - public bool IsLinked () - { - throw new NotImplementedException(); - } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs index 834cf32..5f1e9e0 100644 --- a/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs @@ -8,7 +8,7 @@ namespace Crimson.CSharp.Grammar.Statements { - public class InternalVariableCStatement : ICrimsonStatement + public class InternalVariableCStatement : AbstractCrimsonStatement { private CrimsonTypeCToken type; public FullNameCToken Identifier { get; private set; } @@ -16,7 +16,7 @@ public class InternalVariableCStatement : ICrimsonStatement public ComplexValueCToken? Complex { get; } public SimpleValueCToken? Simple { get; } - public InternalVariableCStatement(CrimsonTypeCToken type, FullNameCToken identifier, SimpleValueCToken simple) + public InternalVariableCStatement (CrimsonTypeCToken type, FullNameCToken identifier, SimpleValueCToken simple) { this.type = type; this.Identifier = identifier; @@ -29,7 +29,7 @@ public InternalVariableCStatement(CrimsonTypeCToken type, FullNameCToken identif if (Simple == null) throw new CrimsonParserException($"Must assign initial (declaration) value to variable {identifier}"); } - public InternalVariableCStatement(CrimsonTypeCToken type, FullNameCToken identifier, ComplexValueCToken complex) + public InternalVariableCStatement (CrimsonTypeCToken type, FullNameCToken identifier, ComplexValueCToken complex) { this.type = type; this.Identifier = identifier; @@ -42,15 +42,15 @@ public InternalVariableCStatement(CrimsonTypeCToken type, FullNameCToken identif if (Complex == null) throw new CrimsonParserException($"Must assign initial (declaration) value to variable {identifier}"); } - public void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { // Only run if not null Simple?.Link(ctx); Complex?.Link(ctx); - return; + Linked = true; } - public Fragment GetCrimsonBasic() + public override Fragment GetCrimsonBasic () { Fragment statements = new Fragment(0); @@ -62,12 +62,12 @@ public Fragment GetCrimsonBasic() statements.Add(new IncSpBStatement(type.GetByteSize())); statements.Add(new SetBStatement(Identifier.ToString(), -1, valueStatements.ResultHolder!)); - } + } else if (Simple != null) { statements.Add(new IncSpBStatement(type.GetByteSize())); statements.Add(new SetBStatement(Identifier.ToString(), -1, Simple.GetText())); - } + } else { throw new FlatteningException("Unable to flatten internal variable with no simple or complex value"); diff --git a/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs b/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs index 2128eec..cbbdab9 100644 --- a/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs @@ -4,7 +4,7 @@ namespace Crimson.CSharp.Grammar.Statements { - public class OperationHandlerCStatement: ICrimsonStatement + public class OperationHandlerCStatement : AbstractCrimsonStatement { public CrimsonTypeCToken Type1 { get; protected set; } public OperationResolvableValueCToken.OperationType OpType { get; protected set; } @@ -12,7 +12,7 @@ public class OperationHandlerCStatement: ICrimsonStatement public FullNameCToken FunctionIdentifier { get; protected set; } public FunctionCStatement? TargetFunction { get; protected set; } - public OperationHandlerCStatement(CrimsonTypeCToken type1, OperationResolvableValueCToken.OperationType opType, CrimsonTypeCToken type2, FullNameCToken identifier) + public OperationHandlerCStatement (CrimsonTypeCToken type1, OperationResolvableValueCToken.OperationType opType, CrimsonTypeCToken type2, FullNameCToken identifier) { Type1 = type1; OpType = opType; @@ -20,31 +20,26 @@ public OperationHandlerCStatement(CrimsonTypeCToken type1, OperationResolvableVa FunctionIdentifier = identifier; } - public bool CanApply(CrimsonTypeCToken type1, CrimsonTypeCToken type2) + public bool CanApply (CrimsonTypeCToken type1, CrimsonTypeCToken type2) { return false; } - public FunctionCallCStatement Apply(FunctionArgumentCToken arg1, FunctionArgumentCToken arg2) + public FunctionCallCStatement Apply (FunctionArgumentCToken arg1, FunctionArgumentCToken arg2) { return null; } - public void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { Type1.Link(ctx); Type2.Link(ctx); TargetFunction = LinkerHelper.LinkFunctionCall(FunctionIdentifier, ctx); } - public bool IsLinked () + public override Fragment GetCrimsonBasic () { - throw new NotImplementedException(); - } - - public Fragment GetCrimsonBasic () - { - throw new NotImplementedException(); + return new Fragment(0); } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/ReturnCStatement.cs b/Crimson/CSharp/Grammar/Statements/ReturnCStatement.cs index d4d217b..b20e07c 100644 --- a/Crimson/CSharp/Grammar/Statements/ReturnCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/ReturnCStatement.cs @@ -5,30 +5,25 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class ReturnCStatement : ICrimsonStatement + internal class ReturnCStatement : AbstractCrimsonStatement { - public ReturnCStatement(SimpleValueCToken value) + public ReturnCStatement (SimpleValueCToken value) { Value = value; } public SimpleValueCToken Value { get; } - public void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { - return; + Linked = true; } - public Fragment GetCrimsonBasic() + public override Fragment GetCrimsonBasic () { Fragment f = new Fragment(0); f.Add(new ReturnBStatement()); return f; } - - public bool IsLinked () - { - throw new NotImplementedException(); - } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs b/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs index e2c899e..3b8c81d 100644 --- a/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs @@ -4,31 +4,26 @@ namespace Crimson.CSharp.Grammar.Statements { - public class StructureCStatement : INamedStatement + public class StructureCStatement : AbstractCrimsonStatement, INamed { public FullNameCToken Name { get; set; } - public StructureCStatement(FullNameCToken name, IList body) + public StructureCStatement (FullNameCToken name, IList body) { Name = name; Body = body; } - public IList Body { get; } + public IList Body { get; } - public Fragment GetCrimsonBasic () + public override Fragment GetCrimsonBasic () { - throw new NotImplementedException(); + return new Fragment(0); } - public bool IsLinked () + public override void Link (LinkingContext ctx) { - throw new NotImplementedException(); - } - - public void Link(LinkingContext ctx) - { - return; + Linked = true; } public FullNameCToken GetName () diff --git a/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs b/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs index 725ed98..f23fb10 100644 --- a/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs @@ -7,45 +7,46 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class VariableAssignmentCStatement : ICrimsonStatement + internal class VariableAssignmentCStatement : AbstractCrimsonStatement { public FullNameCToken Identifier { get; set; } public SimpleValueCToken? Simple { get; } public ComplexValueCToken? Complex { get; } - public VariableAssignmentCStatement(FullNameCToken identifier, SimpleValueCToken value) + public VariableAssignmentCStatement (FullNameCToken identifier, SimpleValueCToken value) { Identifier = identifier; Simple = value; } - public VariableAssignmentCStatement(FullNameCToken identifier, ComplexValueCToken value) + public VariableAssignmentCStatement (FullNameCToken identifier, ComplexValueCToken value) { Identifier = identifier; Complex = value; } - public void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { Identifier = LinkerHelper.LinkIdentifier(Identifier, ctx); Simple?.Link(ctx); Complex?.Link(ctx); + Linked = true; } - public Fragment GetCrimsonBasic() + public override Fragment GetCrimsonBasic () { Fragment result = new Fragment(0); if (Simple != null) { result.Add(new CommentBStatement(Simple.GetText())); - } + } else if (Complex != null) { result.Add(Complex.GetBasicFragment()); result.Add(new SetBStatement(Identifier.ToString(), -1, "VAR_ASSIGN_C_VAL")); - } + } else { throw new FlatteningException($"No value to be assigned to variable {Identifier}"); @@ -53,10 +54,5 @@ public Fragment GetCrimsonBasic() return result; } - - public bool IsLinked () - { - throw new NotImplementedException(); - } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs b/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs index 11444d5..22c7a4b 100644 --- a/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs @@ -5,10 +5,10 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class WhileBlockCStatement : ICrimsonStatement + internal class WhileBlockCStatement : AbstractCrimsonStatement { - public WhileBlockCStatement(ConditionCToken condition, Scope scope) + public WhileBlockCStatement (ConditionCToken condition, Scope scope) { Condition = condition; Scope = scope; @@ -17,10 +17,11 @@ public WhileBlockCStatement(ConditionCToken condition, Scope scope) public ConditionCToken Condition { get; } public Scope Scope { get; } - public void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { Condition.Link(ctx); Scope.Link(ctx); + Linked = true; } /* @@ -48,7 +49,7 @@ public void Link(LinkingContext ctx) * (3) * :END_IF */ - public Fragment GetCrimsonBasic() + public override Fragment GetCrimsonBasic () { Fragment wholeBlock = new Fragment(0); From 3f51a62985928087b95abd37759fd4c4e86d4fba Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Thu, 16 Mar 2023 10:21:45 +0000 Subject: [PATCH 011/122] O - M - Goodness! Scopes work now yay! (At least I think they do and the compilation spits out a .CBA which looks kinda like what I had before all these scope shenanigans) + IHasScope (Function, If, Else, While) > More readable ToStrings for Library, Scope > More verbose error handling for LinkerHelper + LinkerHelper now delegates finding functions to the Scope. + Scope can search UP its family tree for functions + ScopeVisitor now adds imports to Scopes --- Crimson/CSharp/Core/Library.cs | 6 +- Crimson/CSharp/Core/Linker.cs | 19 +- Crimson/CSharp/Core/LinkerHelper.cs | 18 +- Crimson/CSharp/Core/LinkingContext.cs | 28 +- Crimson/CSharp/Core/ScopeVisitor.cs | 65 +++-- .../CSharp/Exception/LexerErrorListener.cs | 4 +- .../CSharp/Exception/ParserErrorStrategy.cs | 4 +- Crimson/CSharp/Grammar/IHasScope.cs | 9 + Crimson/CSharp/Grammar/Scope.cs | 83 ++++-- .../Grammar/Statements/FunctionCStatement.cs | 9 +- .../Grammar/Statements/IfBlockCStatement.cs | 8 +- .../Grammar/Statements/ImportCStatement.cs | 2 +- .../Statements/WhileBlockCStatement.cs | 4 +- .../CSharp/Grammar/Tokens/ElseBlockCToken.cs | 10 +- Crimson/Resources/Native Library/console.crm | 6 +- Crimson/Resources/Native Library/heap.crm | 213 +++++++------- Crimson/Resources/Native Library/maths.crm | 15 +- .../Test Compilations/logging/log.crm | 21 +- .../Test Compilations/result/main.cba | 263 ++++++++---------- .../Test Compilations/utils/utils.crm | 19 +- 20 files changed, 405 insertions(+), 401 deletions(-) create mode 100644 Crimson/CSharp/Grammar/IHasScope.cs diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 5800562..f602433 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -49,7 +49,7 @@ public Scope LoadUnitFromPath (string pathIn) throw new UnitGeneratorException("Illegal unit path: Cannot import unit/facet with reserved name '" + pathIn + "'"); } - Scope? unit = LookupUnitByPath(path); + Scope? unit = LookupScopeByPath(path); if (unit != null) { return unit; @@ -109,7 +109,7 @@ public string StandardiseNativePath (string path) return path; } - public Scope? LookupUnitByPath (string path) + public Scope? LookupScopeByPath (string path) { if (Units.ContainsKey(path)) { @@ -128,7 +128,7 @@ public string StandardiseNativePath (string path) public override string ToString () { - return $"Library(Units={String.Join(',', Units)})"; + return $"Library(Units:[{String.Join(',', Units.Select(u => Path.GetFileName(u.Key)))}])"; } } } diff --git a/Crimson/CSharp/Core/Linker.cs b/Crimson/CSharp/Core/Linker.cs index c4239a6..e7ae6d1 100644 --- a/Crimson/CSharp/Core/Linker.cs +++ b/Crimson/CSharp/Core/Linker.cs @@ -36,24 +36,11 @@ public void Link (Compilation compilation) // Generate linking context for the current unit (based on the aliases of imports) // This means mapping "ALIAS" to "UNIT" so that each statement can remap itself - LinkingContext ctx = new LinkingContext(keyScopePair.Key, keyScopePair.Key, new Dictionary(), compilation); - Scope unit = keyScopePair.Value; - ctx.Links.Add(keyScopePair.Key, keyScopePair.Value); //TODO This may cause issues + Scope scope = keyScopePair.Value; + LinkingContext ctx = new LinkingContext(scope, new Dictionary(), compilation); // Add links from the current unit - Dictionary NewLinks = keyScopePair.Value.GetLinks(compilation); - foreach (var l in NewLinks) - { - ctx.Links.Add(l.Key, l.Value); - } - - // Link each statement in the unit - var statements = GetAllStatements(unit); - foreach (var statement in statements) - { - statement.Link(ctx); - } - LOGGER.Debug($"Linked {statements.Count} top-level statements"); + scope.Link(ctx); // Just so that I can put a breakpoint here continue; diff --git a/Crimson/CSharp/Core/LinkerHelper.cs b/Crimson/CSharp/Core/LinkerHelper.cs index a2a1d4e..d333f98 100644 --- a/Crimson/CSharp/Core/LinkerHelper.cs +++ b/Crimson/CSharp/Core/LinkerHelper.cs @@ -15,7 +15,7 @@ internal class LinkerHelper /// /// /// - internal static FunctionCStatement LinkFunctionCall(FullNameCToken identifier, LinkingContext ctx) + internal static FunctionCStatement LinkFunctionCall (FullNameCToken identifier, LinkingContext ctx) { if (identifier == null) throw new LinkingException("Cannot link a null identifer"); @@ -31,15 +31,11 @@ internal static FunctionCStatement LinkFunctionCall(FullNameCToken identifier, L { string alias = identifier.LibraryName; - Scope unit = ctx.GetUnit(alias); + Scope scope = ctx.GetUnit(alias); string funcName = identifier.MemberName; - if (!unit.Functions.TryGetValue(funcName, out FunctionCStatement? result)) - { - throw new LinkingException("Function '" + funcName + "' does not exist in CompilationUnit " + unit + " via LinkingContext " + ctx.ToString()); - } - - return result; + FunctionCStatement? func = scope.FindFunction(funcName); + return func ?? throw new LinkingException($"External Function '{identifier}' does not exist in external {alias}:{scope}; " + ctx.ToString()); } /* @@ -52,9 +48,9 @@ internal static FunctionCStatement LinkFunctionCall(FullNameCToken identifier, L if (identifier.HasMember()) { string funcName = identifier.MemberName; - if (!ctx.GetCurrentUnit().Functions.TryGetValue(funcName, out FunctionCStatement? result)) - throw new LinkingException("Function " + funcName + " does not exist in CompilationUnit " + ctx.GetCurrentUnit() + "; " + ctx.ToString()); - return result; + FunctionCStatement? func = ctx.CurrentScope.FindFunction(funcName); + + return func ?? throw new LinkingException($"Internal Function '{identifier}' does not exist in internal {ctx.CurrentScope} or its parents; " + ctx.ToString()); } // Somehow only has a library name? diff --git a/Crimson/CSharp/Core/LinkingContext.cs b/Crimson/CSharp/Core/LinkingContext.cs index 954f24e..6824fc4 100644 --- a/Crimson/CSharp/Core/LinkingContext.cs +++ b/Crimson/CSharp/Core/LinkingContext.cs @@ -1,20 +1,19 @@ using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar; +using Crimson.CSharp.Grammar.Statements; namespace Crimson.CSharp.Core { public class LinkingContext { - private string Name { get; } - private string CurrentUnitLookupPath { get; } - internal Dictionary Links { get; } - public Compilation Compilation { get; } + public Scope CurrentScope { get; private set; } + internal Dictionary Links { get; private set; } + public Compilation Compilation { get; private set; } - public LinkingContext (string friendlyName, string currentUnitLookupPath, Dictionary links, Compilation compilation) + public LinkingContext (Scope currentScope, Dictionary links, Compilation compilation) { - Name = friendlyName; - CurrentUnitLookupPath = currentUnitLookupPath; + CurrentScope = currentScope; Links = links; Compilation = compilation; } @@ -30,13 +29,13 @@ public LinkingContext (string friendlyName, string currentUnitLookupPath, Dictio /// be affected by edits to the new context's links. /// /// - public LinkingContext (LinkingContext ctx) + public LinkingContext (Scope currentScope, LinkingContext ctx) { - Name = ctx.Name; - CurrentUnitLookupPath = ctx.CurrentUnitLookupPath; - Links = new Dictionary(); + CurrentScope = currentScope; + Compilation = ctx.Compilation; + Links = new Dictionary(); foreach (var link in ctx.Links) { Links.Add(link.Key, link.Value); @@ -53,14 +52,9 @@ internal Scope GetUnit (string alias) throw new LinkingException("No alias '" + alias + "' in " + ToString()); } - internal Scope GetCurrentUnit () - { - return GetUnit(CurrentUnitLookupPath); - } - public override string ToString () { - return $"LinkingContext (name:{Name}; path:{CurrentUnitLookupPath}; links:[{String.Join(",", Links)}])"; + return $"LinkingContext (scope:{CurrentScope}; links:[{String.Join(",", Links)}])"; } } } \ No newline at end of file diff --git a/Crimson/CSharp/Core/ScopeVisitor.cs b/Crimson/CSharp/Core/ScopeVisitor.cs index 71c03d8..28c6bfe 100644 --- a/Crimson/CSharp/Core/ScopeVisitor.cs +++ b/Crimson/CSharp/Core/ScopeVisitor.cs @@ -4,22 +4,21 @@ using Crimson.CSharp.Grammar; using Crimson.CSharp.Grammar.Statements; using Crimson.CSharp.Grammar.Tokens; +using NLog; using static Crimson.CSharp.Grammar.Tokens.Comparator; namespace Crimson.CSharp.Core { - internal class ScopeVisitor: CrimsonBaseVisitor + internal class ScopeVisitor : CrimsonBaseVisitor { - public static readonly Stack scopeStack = new Stack(); - public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) { - Scope compilation = new Scope(scopeStack.TryPeek(out Scope? result) ? result : null); - scopeStack.Push(compilation); + Scope scope = new Scope(null, scopeStack.TryPeek(out Scope? result) ? result : null); + scopeStack.Push(scope); // Visit imports - IList importCtxs = context._imports; + IList importCtxs = context._imports; foreach (CrimsonParser.ImportUnitContext importCtx in importCtxs) { string path = importCtx.path.Text; @@ -29,7 +28,7 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) } FullNameCToken id = VisitFullName(importCtx.fullName()); ImportCStatement import = new ImportCStatement(path, id); - // TODO compilation.AddImport(import); + scope.Imports.Add(id.ToString(), import); } // Add operation handlers @@ -45,7 +44,7 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) foreach (CrimsonParser.StatementContext unitStatementCtx in unitStatementCtxs) { AbstractCrimsonStatement unitStatement = ParseStatement(unitStatementCtx); - compilation.AddStatement(unitStatement); + scope.AddStatement(unitStatement); } // Populate output fields @@ -121,7 +120,7 @@ private AbstractCrimsonStatement ParseStatement (CrimsonParser.StatementContext // --------------------------------- SCOPE HEADERS // ---------------------------------------------------- - public override OperationHandlerCStatement VisitOperationHandler([NotNull] CrimsonParser.OperationHandlerContext context) + public override OperationHandlerCStatement VisitOperationHandler ([NotNull] CrimsonParser.OperationHandlerContext context) { CrimsonTypeCToken type1 = VisitType(context.t1); OperationResolvableValueCToken.OperationType opType = OperationResolvableValueCToken.ParseOpType(context.op.Text); @@ -132,7 +131,7 @@ public override OperationHandlerCStatement VisitOperationHandler([NotNull] Crims return ohsc; } - public override GlobalVariableCStatement VisitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context) + public override GlobalVariableCStatement VisitGlobalVariableDeclaration ([NotNull] CrimsonParser.GlobalVariableDeclarationContext context) { CrimsonParser.InternalVariableDeclarationContext ivdc = context.internalVariableDeclaration(); CrimsonTypeCToken type = VisitType(ivdc.type()); @@ -144,7 +143,7 @@ public override GlobalVariableCStatement VisitGlobalVariableDeclaration([NotNull else throw new CrimsonParserException("Cannot parse GlobalVariableDeclarationContext with value " + ivdc.GetText()); } - public override FunctionCStatement VisitFunctionDeclaration([NotNull] CrimsonParser.FunctionDeclarationContext context) + public override FunctionCStatement VisitFunctionDeclaration ([NotNull] CrimsonParser.FunctionDeclarationContext context) { CrimsonTypeCToken returnType = VisitType(context.returnType); FunctionCStatement.Header header = VisitFunctionHeader(context.header); @@ -153,14 +152,14 @@ public override FunctionCStatement VisitFunctionDeclaration([NotNull] CrimsonPar } - public override FunctionCStatement.Header VisitFunctionHeader([NotNull] CrimsonParser.FunctionHeaderContext context) + public override FunctionCStatement.Header VisitFunctionHeader ([NotNull] CrimsonParser.FunctionHeaderContext context) { FullNameCToken identifier = VisitFullName(context.name); List parameters = VisitParameterList(context.parameters); return new FunctionCStatement.Header(identifier, parameters); } - public override StructureCStatement VisitStructureDeclaration([NotNull] CrimsonParser.StructureDeclarationContext context) + public override StructureCStatement VisitStructureDeclaration ([NotNull] CrimsonParser.StructureDeclarationContext context) { FullNameCToken identifier = VisitFullName(context.name); IList body = VisitStructureBody(context.structureBody()); @@ -168,7 +167,7 @@ public override StructureCStatement VisitStructureDeclaration([NotNull] CrimsonP return structure; } - public override IList VisitStructureBody([NotNull] CrimsonParser.StructureBodyContext context) + public override IList VisitStructureBody ([NotNull] CrimsonParser.StructureBodyContext context) { IList statements = new List(); foreach (CrimsonParser.InternalVariableDeclarationContext ivdCtx in context.internalVariableDeclaration()) @@ -179,7 +178,7 @@ public override IList VisitStructureBody([NotNull] Cri return statements; } - public VariableAssignmentCStatement ParseAssignVariable([NotNull] CrimsonParser.AssignVariableContext context) + public VariableAssignmentCStatement ParseAssignVariable ([NotNull] CrimsonParser.AssignVariableContext context) { if (context == null) throw new StatementParseException("Illegal null CrimsonParser.AssignVariableContext"); if (context is CrimsonParser.AssignVariableDirectContext avdc) @@ -196,13 +195,13 @@ public VariableAssignmentCStatement ParseAssignVariable([NotNull] CrimsonParser. } } - public override CrimsonTypeCToken VisitType([NotNull] CrimsonParser.TypeContext context) + public override CrimsonTypeCToken VisitType ([NotNull] CrimsonParser.TypeContext context) { FullNameCToken name = new FullNameCToken(context.GetText()); return new CrimsonTypeCToken(name); } - public override List VisitParameterList([NotNull] CrimsonParser.ParameterListContext context) + public override List VisitParameterList ([NotNull] CrimsonParser.ParameterListContext context) { List parameters = new List(); foreach (CrimsonParser.ParameterContext paCxt in context.parameter()) @@ -219,7 +218,7 @@ public override CrimsonTypeCToken VisitType([NotNull] CrimsonParser.TypeContext // ------------------------------------ STATEMENTS // ---------------------------------------------------- - public override InternalVariableCStatement VisitInternalVariableDeclaration([NotNull] CrimsonParser.InternalVariableDeclarationContext context) + public override InternalVariableCStatement VisitInternalVariableDeclaration ([NotNull] CrimsonParser.InternalVariableDeclarationContext context) { CrimsonTypeCToken type = VisitType(context.type()); FullNameCToken identifier = VisitFullName(context.fullName()); @@ -230,7 +229,7 @@ public override InternalVariableCStatement VisitInternalVariableDeclaration([Not else throw new CrimsonParserException("Cannot parse InternalVariableDeclarationContext with value " + context.GetText()); } - public override FunctionCallCStatement VisitFunctionCall([NotNull] CrimsonParser.FunctionCallContext context) + public override FunctionCallCStatement VisitFunctionCall ([NotNull] CrimsonParser.FunctionCallContext context) { FullNameCToken identifier = VisitFullName(context.name); IList arguments = VisitArguments(context.arguments()); @@ -238,7 +237,7 @@ public override FunctionCallCStatement VisitFunctionCall([NotNull] CrimsonParser return call; } - public override IfBlockCStatement VisitIfBlock([NotNull] CrimsonParser.IfBlockContext context) + public override IfBlockCStatement VisitIfBlock ([NotNull] CrimsonParser.IfBlockContext context) { ConditionCToken condition = VisitCondition(context.condition()); Scope scope = VisitScope(context.scope()); @@ -250,7 +249,7 @@ public override IfBlockCStatement VisitIfBlock([NotNull] CrimsonParser.IfBlockCo return ifBlock; } - public override WhileBlockCStatement VisitWhileBlock([NotNull] CrimsonParser.WhileBlockContext context) + public override WhileBlockCStatement VisitWhileBlock ([NotNull] CrimsonParser.WhileBlockContext context) { ConditionCToken condition = VisitCondition(context.condition()); Scope body = VisitScope(context.scope()); @@ -258,7 +257,7 @@ public override WhileBlockCStatement VisitWhileBlock([NotNull] CrimsonParser.Whi return ifBlock; } - public override VariableAssignmentCStatement VisitAssignVariableDirect([NotNull] CrimsonParser.AssignVariableDirectContext context) + public override VariableAssignmentCStatement VisitAssignVariableDirect ([NotNull] CrimsonParser.AssignVariableDirectContext context) { FullNameCToken identifier = VisitFullName(context.name); if (context.simple != null) return new VariableAssignmentCStatement(identifier, VisitSimpleValue(context.simple)); @@ -266,7 +265,7 @@ public override VariableAssignmentCStatement VisitAssignVariableDirect([NotNull] else throw new CrimsonParserException($"Cannot assign no value to variable {identifier}"); } - public override VariableAssignmentCStatement VisitAssignVariableAtPointer([NotNull] CrimsonParser.AssignVariableAtPointerContext context) + public override VariableAssignmentCStatement VisitAssignVariableAtPointer ([NotNull] CrimsonParser.AssignVariableAtPointerContext context) { //TODO AssignVariableAtPointer just adds an asterisk to the variable name FullNameCToken identifier = VisitFullName(context.fullName()); @@ -275,7 +274,7 @@ public override VariableAssignmentCStatement VisitAssignVariableAtPointer([NotNu else throw new CrimsonParserException($"Cannot assign no value to variable {identifier}"); } - public override ReturnCStatement VisitFunctionReturn([NotNull] CrimsonParser.FunctionReturnContext context) + public override ReturnCStatement VisitFunctionReturn ([NotNull] CrimsonParser.FunctionReturnContext context) { CrimsonParser.SimpleValueContext? rvc = context?.simpleValue(); SimpleValueCToken value = rvc == null ? new RawResolvableValueCToken("NULL") : VisitSimpleValue(rvc); @@ -283,26 +282,26 @@ public override ReturnCStatement VisitFunctionReturn([NotNull] CrimsonParser.Fun return ret; } - public override ComplexValueCToken VisitComplexValue([NotNull] CrimsonParser.ComplexValueContext context) + public override ComplexValueCToken VisitComplexValue ([NotNull] CrimsonParser.ComplexValueContext context) { if (context.op != null) return VisitOperation(context.op); else if (context.func != null) return new FunctionCallResolvableValueCToken(VisitFunctionCall(context.func)); throw new CrimsonParserException("Cannot parse ComplexValueContext " + context.GetText()); } - public override SimpleValueCToken VisitSimpleValue([NotNull] CrimsonParser.SimpleValueContext context) + public override SimpleValueCToken VisitSimpleValue ([NotNull] CrimsonParser.SimpleValueContext context) { 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()); } - public override RawResolvableValueCToken VisitRawValue([NotNull] CrimsonParser.RawValueContext context) + public override RawResolvableValueCToken VisitRawValue ([NotNull] CrimsonParser.RawValueContext context) { return new RawResolvableValueCToken(context.GetText()); } - public override OperationResolvableValueCToken VisitOperation([NotNull] CrimsonParser.OperationContext context) + public override OperationResolvableValueCToken VisitOperation ([NotNull] CrimsonParser.OperationContext context) { SimpleValueCToken leftToken = VisitSimpleValue(context.leftValue); OperationResolvableValueCToken.OperationType t = OperationResolvableValueCToken.ParseOpType(context.@operator.Text); @@ -320,14 +319,14 @@ public override BasicCallCStatement VisitBasicCall ([NotNull] CrimsonParser.Basi return call; } - public override AssemblyCallCStatement VisitAssemblyCall([NotNull] CrimsonParser.AssemblyCallContext context) + public override AssemblyCallCStatement VisitAssemblyCall ([NotNull] CrimsonParser.AssemblyCallContext context) { string assemblyText = context.assemblyText.Text; AssemblyCallCStatement call = new AssemblyCallCStatement(assemblyText.Replace("\"", "")); return call; } - public override IList VisitArguments([NotNull] CrimsonParser.ArgumentsContext context) + public override IList VisitArguments ([NotNull] CrimsonParser.ArgumentsContext context) { IList arguments = new List(); foreach (CrimsonParser.SimpleValueContext rvlCxt in context.simpleValue()) @@ -338,21 +337,21 @@ public override IList VisitArguments([NotNull] CrimsonParser. return arguments; } - public override ConditionCToken VisitCondition([NotNull] CrimsonParser.ConditionContext context) + public override ConditionCToken VisitCondition ([NotNull] CrimsonParser.ConditionContext context) { OperationResolvableValueCToken operation = VisitOperation(context.op); ConditionCToken condition = new ConditionCToken(operation); return condition; } - public override ElseIfBlockCToken VisitElseIfBlock([NotNull] CrimsonParser.ElseIfBlockContext context) + public override ElseIfBlockCToken VisitElseIfBlock ([NotNull] CrimsonParser.ElseIfBlockContext context) { IfBlockCStatement ifBlock = VisitIfBlock(context.ifBlock()); ElseIfBlockCToken elseIfBlock = new ElseIfBlockCToken(ifBlock); return elseIfBlock; } - public override ElseBlockCToken VisitElseBlock([NotNull] CrimsonParser.ElseBlockContext context) + public override ElseBlockCToken VisitElseBlock ([NotNull] CrimsonParser.ElseBlockContext context) { Scope statements = VisitScope(context.scope()); ElseBlockCToken elseBlock = new ElseBlockCToken(statements); diff --git a/Crimson/CSharp/Exception/LexerErrorListener.cs b/Crimson/CSharp/Exception/LexerErrorListener.cs index 707fbfe..713bacd 100644 --- a/Crimson/CSharp/Exception/LexerErrorListener.cs +++ b/Crimson/CSharp/Exception/LexerErrorListener.cs @@ -13,12 +13,12 @@ internal class LexerErrorListener : IAntlrErrorListener public static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); private string Path { get; set; } - public LexerErrorListener(string path) + public LexerErrorListener (string path) { Path = path; } - void IAntlrErrorListener.SyntaxError(TextWriter output, IRecognizer recognizer, int offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) + void IAntlrErrorListener.SyntaxError (TextWriter output, IRecognizer recognizer, int offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) { string message = $"Lexer error lexing {Path} @ line:{line} char:{charPositionInLine} msg:{msg}"; LOGGER.Error(message); diff --git a/Crimson/CSharp/Exception/ParserErrorStrategy.cs b/Crimson/CSharp/Exception/ParserErrorStrategy.cs index 64a1b87..7f340b5 100644 --- a/Crimson/CSharp/Exception/ParserErrorStrategy.cs +++ b/Crimson/CSharp/Exception/ParserErrorStrategy.cs @@ -13,12 +13,12 @@ internal class ParserErrorStrategy : DefaultErrorStrategy private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); private string Path { get; set; } - public ParserErrorStrategy(string path) + public ParserErrorStrategy (string path) { Path = path; } - public override void ReportError(Parser recognizer, RecognitionException e) + public override void ReportError (Parser recognizer, RecognitionException e) { base.ReportError(recognizer, e); throw new CrimsonParserException("", e); diff --git a/Crimson/CSharp/Grammar/IHasScope.cs b/Crimson/CSharp/Grammar/IHasScope.cs new file mode 100644 index 0000000..06668ae --- /dev/null +++ b/Crimson/CSharp/Grammar/IHasScope.cs @@ -0,0 +1,9 @@ +using Crimson.CSharp.Grammar.Statements; + +namespace Crimson.CSharp.Grammar +{ + internal interface IHasScope + { + Scope GetScope (); + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Scope.cs b/Crimson/CSharp/Grammar/Scope.cs index 2b96027..68730f1 100644 --- a/Crimson/CSharp/Grammar/Scope.cs +++ b/Crimson/CSharp/Grammar/Scope.cs @@ -2,6 +2,7 @@ using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar.Statements; using CrimsonBasic.CSharp.Core; +using NLog; namespace Crimson.CSharp.Grammar { @@ -10,20 +11,34 @@ namespace Crimson.CSharp.Grammar /// public class Scope : AbstractCrimsonStatement { + private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); public Scope? Parent { get; set; } - private bool _linked; private string? _path; - public Scope (Scope? parent) : this(parent, null) { } + private string _name; + public string Name + { + get + { + if (String.IsNullOrWhiteSpace(_name)) + { + return Parent == null ? "(root)" : "(anon)"; + } + return _name; + } + set => _name = value; + } + + public Scope (string name, Scope? parent) : this(name, parent, null) { } - public Scope (string? path) : this(null, path) { } + public Scope (string name, string? path) : this(name, null, path) { } - private Scope (Scope? parent, string? path) + private Scope (string name, Scope? parent, string? path) { Parent = null; - _linked = false; _path = path; + Name = name; Delegates = new List(); @@ -34,15 +49,9 @@ private Scope (Scope? parent, string? path) GlobalVariables = new Dictionary(); } - public bool HasParent () - { - return Parent != null; - } - - public Scope GetParent () - { - return HasParent() ? Parent! : this; - } + public bool HasParent () => Parent != null; + public Scope GetParent () => HasParent() ? Parent! : this; + public string FamilyToString () => $"{(HasParent() ? GetParent().FamilyToString() : "(root)")} -> {this}"; public Scope GetRoot () { @@ -69,9 +78,12 @@ public string GetPath () throw new NullReferenceException($"Scope tree has no associated path: {FamilyToString()}"); } - public string FamilyToString () + public FunctionCStatement? FindFunction (string funcName) { - return $"{(HasParent() ? GetParent().FamilyToString() : "")} -> {this}"; + if (Functions.ContainsKey(funcName)) + return Functions[funcName]; + else + return HasParent() ? GetParent().FindFunction(funcName) : null; } // Statements @@ -108,9 +120,29 @@ void AddNamedIfNotDuplicate (Dictionary d, GCS gcs, string typ Delegates.Add(() => d[name]); } - if (statement is FunctionCStatement f) AddNamedIfNotDuplicate(Functions, f, "Function"); + if (statement is IHasScope scopeStatement) + { + scopeStatement.GetScope().Parent = this; + + if (statement is INamed namedStatement) + { + scopeStatement.GetScope().Name = namedStatement.GetName().ToString(); + } + } + + // Special cases + if (statement is FunctionCStatement f) + { + AddNamedIfNotDuplicate(Functions, f, "Function"); + } else if (statement is GlobalVariableCStatement g) AddNamedIfNotDuplicate(GlobalVariables, g, "Global Variable"); else if (statement is StructureCStatement s) AddNamedIfNotDuplicate(Structures, s, "Structure"); + else if (statement is Scope sc) + { + sc.Parent = this; + sc.Name = $"{Name}/{sc.Name}"; + Delegates.Add(() => statement); + } else Delegates.Add(() => statement); } @@ -138,7 +170,7 @@ public Dictionary GetLinks (Compilation compilation) /* * */ - Scope? mappingUnit = compilation.Library.LookupUnitByPath(relativePath); + Scope? mappingUnit = compilation.Library.LookupScopeByPath(relativePath); if (mappingUnit == null) throw new LinkingException("Could not add unloadable unit " + relativePath + " (alias=" + alias + ") to mapping context"); Links.Add(alias, mappingUnit); } @@ -151,19 +183,23 @@ public Dictionary GetLinks (Compilation compilation) /// public override void Link (LinkingContext ctx) { + LOGGER.Debug($"Linking {FamilyToString()}"); + // Partially shallow-copy the old context (links in a lower level should not get carried up to higher levels) - LinkingContext newContext = new LinkingContext(ctx); + LinkingContext newContext = new LinkingContext(this, ctx); Dictionary dictionary = GetLinks(newContext.Compilation); foreach (var link in dictionary) { - ctx.Links.Add(link.Key, link.Value); + newContext.Links.Add(link.Key, link.Value); } foreach (var d in Delegates) { - d.Invoke().Link(ctx); + d.Invoke().Link(newContext); } + + LOGGER.Info($"Linked {Delegates.Count} scope-level statements"); } public override Fragment GetCrimsonBasic () @@ -180,7 +216,8 @@ public override Fragment GetCrimsonBasic () public override string ToString () { - return $"Scope(Imports:{Imports.Count} Functions:{Functions.Count} Structures:{Structures.Count} GlobalVariables{GlobalVariables.Count})"; + + return $"Scope({Name}; I:{Imports.Count} F:{Functions.Count} S:{Structures.Count} G:{GlobalVariables.Count})"; } } -} +} \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs index 476c3e1..fc86c11 100644 --- a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs @@ -13,7 +13,7 @@ namespace Crimson.CSharp.Grammar.Statements /// /// A function, defined with the function keyword. Is a member of a package. /// - public class FunctionCStatement : AbstractCrimsonStatement, INamed + public class FunctionCStatement : AbstractCrimsonStatement, INamed, IHasScope { public CrimsonTypeCToken ReturnType { get; } public Header FunctionHeader { get; } @@ -25,6 +25,8 @@ public FunctionCStatement (CrimsonTypeCToken returnType, Header header, Scope sc ReturnType = returnType; FunctionHeader = header; Scope = scope; + + Scope.Name = Name.ToString(); } public override void Link (LinkingContext ctx) @@ -69,6 +71,11 @@ public void SetName (FullNameCToken name) Name = name; } + public Scope GetScope () + { + return Scope; + } + public class Parameter : ICrimsonToken { public CrimsonTypeCToken Type { get; } diff --git a/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs b/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs index a24f09a..be4f6bc 100644 --- a/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs @@ -6,12 +6,8 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class IfBlockCStatement : AbstractCrimsonStatement + internal class IfBlockCStatement : AbstractCrimsonStatement, IHasScope { - public IfBlockCStatement () - { - } - public IfBlockCStatement (ConditionCToken condition, Scope scope, ElseIfBlockCToken? elifBlock, ElseBlockCToken? elseBlock) { Condition = condition; @@ -25,6 +21,8 @@ public IfBlockCStatement (ConditionCToken condition, Scope scope, ElseIfBlockCTo public ElseIfBlockCToken? ElifBlock { get; } public ElseBlockCToken? ElseBlock { get; } + public Scope GetScope () => Scope; + public override void Link (LinkingContext ctx) { Condition.Link(ctx); diff --git a/Crimson/CSharp/Grammar/Statements/ImportCStatement.cs b/Crimson/CSharp/Grammar/Statements/ImportCStatement.cs index 781a620..b321caf 100644 --- a/Crimson/CSharp/Grammar/Statements/ImportCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/ImportCStatement.cs @@ -8,7 +8,7 @@ public class ImportCStatement public string Path { get; set; } public FullNameCToken Alias { get; set; } - public ImportCStatement(string path, FullNameCToken alias) + public ImportCStatement (string path, FullNameCToken alias) { if (alias.HasLibrary()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{path}' because it must only contain a member name."); if (!alias.HasMember()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{path}' because it does not contain a member name."); diff --git a/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs b/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs index 22c7a4b..50e60e5 100644 --- a/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs @@ -5,7 +5,7 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class WhileBlockCStatement : AbstractCrimsonStatement + internal class WhileBlockCStatement : AbstractCrimsonStatement, IHasScope { public WhileBlockCStatement (ConditionCToken condition, Scope scope) @@ -17,6 +17,8 @@ public WhileBlockCStatement (ConditionCToken condition, Scope scope) public ConditionCToken Condition { get; } public Scope Scope { get; } + public Scope GetScope () => Scope; + public override void Link (LinkingContext ctx) { Condition.Link(ctx); diff --git a/Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs b/Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs index de8ff87..0b5f294 100644 --- a/Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs +++ b/Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs @@ -5,16 +5,18 @@ namespace Crimson.CSharp.Grammar.Tokens { - internal class ElseBlockCToken : ICrimsonToken + internal class ElseBlockCToken : ICrimsonToken, IHasScope { - public ElseBlockCToken(Scope statements) + public ElseBlockCToken (Scope statements) { Scope = statements; } public Scope Scope { get; } - public Fragment GetCrimsonBasic() + public Scope GetScope () => Scope; + + public Fragment GetCrimsonBasic () { Fragment fragment = new Fragment(0); fragment.Add(new CommentBStatement("")); @@ -31,7 +33,7 @@ public Fragment GetCrimsonBasic() return fragment; } - public void Link(LinkingContext ctx) + public void Link (LinkingContext ctx) { Scope.Link(ctx); return; diff --git a/Crimson/Resources/Native Library/console.crm b/Crimson/Resources/Native Library/console.crm index c7af767..9b39bec 100644 --- a/Crimson/Resources/Native Library/console.crm +++ b/Crimson/Resources/Native Library/console.crm @@ -1,3 +1,5 @@ -function void write (int i) { - +{ + function void write (int i) { + + } } \ No newline at end of file diff --git a/Crimson/Resources/Native Library/heap.crm b/Crimson/Resources/Native Library/heap.crm index e16ca9e..940edb0 100644 --- a/Crimson/Resources/Native Library/heap.crm +++ b/Crimson/Resources/Native Library/heap.crm @@ -1,117 +1,120 @@ +{ + // Memory is allocated in blocks. This is a common implementation of the C malloc + // interface because it reduces the memory wastage from next-to-each-other + // allocation and is also relatively fast. + // The distribution of these blocks is important for the efficiency of the + // algorithm. The sizes blocks here are distributed roughly by 4^x. -// Memory is allocated in blocks. This is a common implementation of the C malloc -// interface because it reduces the memory wastage from next-to-each-other -// allocation and is also relatively fast. -// The distribution of these blocks is important for the efficiency of the -// algorithm. The sizes blocks here are distributed roughly by 4^x. - -// Region Rx starts at 'HeapOffset + 4*2^(x-2) + x*RegionMetaSize' -// i.e. -// R0 starts at HO + 4*1/4 + 0*RMS -// R1 starts at HO + 4*1/2 + 1*RMS -// R2 starts at HO + 4*1 + 2*RMS -// R3 starts at HO + 4*2 + 3*RMS + // Region Rx starts at 'HeapOffset + 4*2^(x-2) + x*RegionMetaSize' + // i.e. + // R0 starts at HO + 4*1/4 + 0*RMS + // R1 starts at HO + 4*1/2 + 1*RMS + // R2 starts at HO + 4*1 + 2*RMS + // R3 starts at HO + 4*2 + 3*RMS -// RMS = 1byte -// Rx 0 1 2 3 -// HEAP OFFSET ^ ^ ^ ^ -// ~~~~~~~~~~~~~~~ 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 -// ^HO+0 -// -// R0: 4*1/4 + 0*1 = 1 + 0 = 1 -// R1: 4*1/2 + 1*1 = 2 + 1 = 3 -// R2: 4*1 + 2*1 = 4 + 2 = 6 -// R3: 4*2 + 3*1 = 8 + 3 = 11 + // RMS = 1byte + // Rx 0 1 2 3 + // HEAP OFFSET ^ ^ ^ ^ + // ~~~~~~~~~~~~~~~ 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 + // ^HO+0 + // + // R0: 4*1/4 + 0*1 = 1 + 0 = 1 + // R1: 4*1/2 + 1*1 = 2 + 1 = 3 + // R2: 4*1 + 2*1 = 4 + 2 = 6 + // R3: 4*2 + 3*1 = 8 + 3 = 11 -// !! IMPORTANT !! -// This array should not be dynamically allocated! -// It should be at a static location relative to the start of process memory. -// int[] regions = new int[256]; + // !! IMPORTANT !! + // This array should not be dynamically allocated! + // It should be at a static location relative to the start of process memory. + // int[] regions = new int[256]; -#using "${NATIVE}/maths.crm" as maths + { -// IMPORTANT!! -// regions_i and regions_region will be removed!! -// They should not be used and are purely for testing linking -global int regions_i = 0; -global int regions_length = 0; -global int regions_region = 0; + #using "${NATIVE}/maths.crm" as maths -// -// Return a pointer to a block of memory which is at least of the given size. -// -function int alloc (int size) -{ - int i = 0; - while (i < regions_length) - { - // Replace with regions[i] - if ( regions_i == 0 ) // Region i is empty - { - regions_i = 1; - int region_ptr = 0; - region_ptr = get_region_ptr(r); - return region_ptr; - } - i = i + 1; - } - return 0; -} + // IMPORTANT!! + // regions_i and regions_region will be removed!! + // They should not be used and are purely for testing linking + global int regions_i = 0; + global int regions_length = 0; + global int regions_region = 0; -// -// Return a pointer to the region given by index -// This is given by the result of the calculation: -// HeapOffset + exponential_offset + r*RegionMetaSize; -// -function int get_region_ptr (int r) -{ - // Need to calculate this before r changes later on - int RRMS = r * RegionMetaSize; - - int exponential_offset = 4; - - // R<0 is not permitted - if (r < 0) { - // HELP!!!! - // HOW DO I CRASH!? - } - - // R=0 and R=1 would need 4*0.25 or 4*0.5 so we just handle them manually - else if (r == 0) { - exponential_offset = 1; - } - else if (r == 1) { - exponential_offset = 2; + // + // Return a pointer to a block of memory which is at least of the given size. + // + function int alloc (int size) + { + int i = 0; + while (i < regions_length) + { + // Replace with regions[i] + if ( regions_i == 0 ) // Region i is empty + { + regions_i = 1; + int region_ptr = 0; + region_ptr = get_region_ptr(r); + return region_ptr; + } + i = i + 1; + } + return 0; } - - // R>=2 is calculated automatically - else { - while ( r > 0 ) { - exponential_offset = exponential_offset * 2; - r = r - 1; - } + + // + // Return a pointer to the region given by index + // This is given by the result of the calculation: + // HeapOffset + exponential_offset + r*RegionMetaSize; + // + function int get_region_ptr (int r) + { + // Need to calculate this before r changes later on + int RRMS = r * RegionMetaSize; + + int exponential_offset = 4; + + // R<0 is not permitted + if (r < 0) { + // HELP!!!! + // HOW DO I CRASH!? + } + + // R=0 and R=1 would need 4*0.25 or 4*0.5 so we just handle them manually + else if (r == 0) { + exponential_offset = 1; + } + else if (r == 1) { + exponential_offset = 2; + } + + // R>=2 is calculated automatically + else { + while ( r > 0 ) { + exponential_offset = exponential_offset * 2; + r = r - 1; + } + } + + // Calculate final pointer value as in described equation + int HO_EXP = HeapOffset + exponential_offset; + int HO_EXP_RRMS = HO_EXP + RRMS; + return HO_EXP_RRMS; } - - // Calculate final pointer value as in described equation - int HO_EXP = HeapOffset + exponential_offset; - int HO_EXP_RRMS = HO_EXP + RRMS; - return HO_EXP_RRMS; -} -function null freeptr (int pointer) -{ - int r = 0; - int region_ptr = get_region_ptr(r); - while ( pointer < region_ptr ) - { - r = r + 1; - region_ptr = get_region_ptr(r); - } - freeregion(r); -} + function null freeptr (int pointer) + { + int r = 0; + int region_ptr = get_region_ptr(r); + while ( pointer < region_ptr ) + { + r = r + 1; + region_ptr = get_region_ptr(r); + } + freeregion(r); + } -function null freeregion (int region) -{ - // Replace with regions[region] - regions_region = 0; + function null freeregion (int region) + { + // Replace with regions[region] + regions_region = 0; + } } \ No newline at end of file diff --git a/Crimson/Resources/Native Library/maths.crm b/Crimson/Resources/Native Library/maths.crm index d13ad68..466bc23 100644 --- a/Crimson/Resources/Native Library/maths.crm +++ b/Crimson/Resources/Native Library/maths.crm @@ -1,8 +1,9 @@ - -function int pwr (int number, int exponent) { - while (exponent > 0) - { - number = number * number; - exponent = exponent - 1; - } +{ + function int pwr (int number, int exponent) { + while (exponent > 0) + { + number = number * number; + exponent = exponent - 1; + } + } } \ No newline at end of file diff --git a/Crimson/Resources/Test Compilations/logging/log.crm b/Crimson/Resources/Test Compilations/logging/log.crm index 80764f3..d760114 100644 --- a/Crimson/Resources/Test Compilations/logging/log.crm +++ b/Crimson/Resources/Test Compilations/logging/log.crm @@ -1,13 +1,14 @@ +{ + #using "${NATIVE}/console.crm" as utils_stdout -#using "${NATIVE}/console.crm" as utils_stdout + // Utility package + function [int] multiply ( int num1, int num2 ) { + utils_stdout.write(6); + return num1; + } -// Utility package -function [int] multiply ( int num1, int num2 ) { - utils_stdout.write(6); - return num1; -} - -function ptr times ( int num1, int num2 ) { - int ret = multiply(num1, num2); - return ret; + function ptr times ( int num1, int num2 ) { + int ret = multiply(num1, num2); + return ret; + } } \ 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 1cb112c..a172605 100644 --- a/Crimson/Resources/Test Compilations/result/main.cba +++ b/Crimson/Resources/Test Compilations/result/main.cba @@ -17,193 +17,158 @@ var_set gvar_counter_0, -1, 0; // (Structures shouldn't be a part of CB) // ============================== Structures ============================== -// GlobalC:stru_Person_0 // ============================== Entry Function ============================== :func_main_0: - push_sf; - example basic call - ~A "example assemby call" - // Function Call - inc_sp 666; - var_set a, -1, ; - // Function Call - inc_sp 666; - 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; + example basic call + ~A "example assemby call" // Function Call inc_sp 666; - var_set c, -1, ; + var_set a, -1, ; // Function Call inc_sp 666; - var_set d, -1, ; - pop_sf; - jump END_branch_1 - - :ELSE: - push_sf; + var_set b, -1, ; + + jeq c_r_h 0 NEXT_ELIF + // 5 + jump END_branch_0 + + jeq c_r_h 0 NEXT_ELIF + // Function Call + inc_sp 666; + var_set c, -1, ; + // Function Call + inc_sp 666; + var_set d, -1, ; + jump END_branch_1 + + :ELSE: + return; + :END_branch_1: + + :END_branch_0: + + // arg0=4 + // arg1=7 + // arg2=5 + jump func_call_0 + reg_set REG_RETURN rval_0 + var_set rval_0, -1, FUNC_RETURN; + // Function Call + inc_sp 666; + var_set i, -1, ; + // 4 + // arg0=i + jump func_write_0 + reg_set REG_RETURN rval_1 + var_set rval_1, -1, FUNC_RETURN; + // Function Call + inc_sp 666; + var_set ret, -1, ; + // Function Call + var_set ret, -1, VAR_ASSIGN_C_VAL; return; - pop_sf; - :END_branch_1: - - :END_branch_0: - - // arg0=4 - // arg1=7 - // arg2=5 - jump func_call_0 - reg_set REG_RETURN rval_0 - var_set rval_0, -1, FUNC_RETURN; - // Function Call - inc_sp 666; - var_set i, -1, ; - // 4 - // arg0=i - jump func_write_0 - reg_set REG_RETURN rval_1 - var_set rval_1, -1, FUNC_RETURN; - // Function Call - inc_sp 666; - var_set ret, -1, ; - // Function Call - var_set ret, -1, VAR_ASSIGN_C_VAL; - return; - pop_sf; return; // ============================== Functions ============================== :func_multiply_0: - push_sf; - // arg0=6 - jump func_write_0 - reg_set REG_RETURN rval_2 - var_set rval_2, -1, FUNC_RETURN; - return; - pop_sf; + // arg0=6 + jump func_write_0 + reg_set REG_RETURN rval_2 + var_set rval_2, -1, FUNC_RETURN; + return; return; :func_times_0: - push_sf; - // Function Call - inc_sp 666; - var_set ret, -1, ; - return; - pop_sf; + // Function Call + inc_sp 666; + var_set ret, -1, ; + return; return; :func_write_0: - push_sf; - pop_sf; return; :func_alloc_0: - push_sf; - inc_sp 666; - var_set i, -1, 0; - - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << - - return; - pop_sf; + inc_sp 666; + var_set i, -1, 0; + + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << + + return; return; :func_get_region_ptr_0: - push_sf; - // Operation - inc_sp 666; - var_set RRMS, -1, ; - inc_sp 666; - 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; + // Operation + inc_sp 666; + var_set RRMS, -1, ; + inc_sp 666; + var_set exponential_offset, -1, 4; - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << + jeq c_r_h 0 NEXT_ELIF + jump END_branch_2 + + jeq c_r_h 0 NEXT_ELIF + // 1 + jump END_branch_3 + + jeq c_r_h 0 NEXT_ELIF + // 2 + jump END_branch_4 + + :ELSE: + + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << + + :END_branch_4: + + :END_branch_3: + + :END_branch_2: - pop_sf; - :END_branch_4: - - :END_branch_3: - - :END_branch_2: - - // Operation - inc_sp 666; - var_set HO_EXP, -1, ; - // Operation - inc_sp 666; - var_set HO_EXP_RRMS, -1, ; - return; - pop_sf; + // Operation + inc_sp 666; + var_set HO_EXP, -1, ; + // Operation + inc_sp 666; + var_set HO_EXP_RRMS, -1, ; + return; return; :func_freeptr_0: - push_sf; - inc_sp 666; - var_set r, -1, 0; - // Function Call - inc_sp 666; - var_set region_ptr, -1, ; - - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << - - // arg0=r - jump func_freeregion_0 - reg_set REG_RETURN rval_3 - var_set rval_3, -1, FUNC_RETURN; - pop_sf; + inc_sp 666; + var_set r, -1, 0; + // Function Call + inc_sp 666; + var_set region_ptr, -1, ; + + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << + + // arg0=r + jump func_freeregion_0 + reg_set REG_RETURN rval_3 + var_set rval_3, -1, FUNC_RETURN; return; :func_freeregion_0: - push_sf; - // 0 - pop_sf; + // 0 return; :func_pwr_0: - push_sf; - - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << - - pop_sf; + + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << + return; :func_call_0: - push_sf; - // Function Call - inc_sp 666; - var_set test, -1, ; - return; - pop_sf; + // Function Call + inc_sp 666; + var_set test, -1, ; + return; return; diff --git a/Crimson/Resources/Test Compilations/utils/utils.crm b/Crimson/Resources/Test Compilations/utils/utils.crm index 80764f3..7612546 100644 --- a/Crimson/Resources/Test Compilations/utils/utils.crm +++ b/Crimson/Resources/Test Compilations/utils/utils.crm @@ -1,13 +1,14 @@ +{ + #using "${NATIVE}/console.crm" as utils_stdout -#using "${NATIVE}/console.crm" as utils_stdout + // Utility package + function [int] multiply ( int num1, int num2 ) { + utils_stdout.write(6); + return num1; + } -// Utility package -function [int] multiply ( int num1, int num2 ) { - utils_stdout.write(6); - return num1; -} - -function ptr times ( int num1, int num2 ) { + function ptr times ( int num1, int num2 ) { int ret = multiply(num1, num2); - return ret; + return ret; + } } \ No newline at end of file From d90e8460c417472ff0a5e1308eebd4d4dca42ff6 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Thu, 16 Mar 2023 10:29:18 +0000 Subject: [PATCH 012/122] Improved Crimson/Basic Notepad++ for dark mode --- Crimson/Resources/CrimsonNotepad++.xml | 38 +++++++++---------- .../Resources/CrimsonBasicNotepad++.xml | 10 ++--- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Crimson/Resources/CrimsonNotepad++.xml b/Crimson/Resources/CrimsonNotepad++.xml index 5a31725..6b9a1c8 100644 --- a/Crimson/Resources/CrimsonNotepad++.xml +++ b/Crimson/Resources/CrimsonNotepad++.xml @@ -13,7 +13,7 @@ - * / + * / = ; *= == @@ -24,35 +24,35 @@ - package function return - - allocate - - - - + package function + #using #ophandler as + global + ptr int + if while else return + true false + A~ B~ 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/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml b/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml index 2c00b03..7441e02 100644 --- a/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml +++ b/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml @@ -1,7 +1,7 @@ - + @@ -35,19 +35,19 @@ 00: 01 02: 03" 04 05" 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 - + - + - + - + From 8c9b94d08a1336cedd0bab6833bc24f6a83fa13a Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Thu, 16 Mar 2023 10:31:07 +0000 Subject: [PATCH 013/122] Updated Crimson Flattener copyright date Only 3 months late... --- Crimson/CSharp/Core/Flattener.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Crimson/CSharp/Core/Flattener.cs b/Crimson/CSharp/Core/Flattener.cs index b408235..3815a00 100644 --- a/Crimson/CSharp/Core/Flattener.cs +++ b/Crimson/CSharp/Core/Flattener.cs @@ -27,7 +27,7 @@ internal Flattener (CrimsonOptions options) * When a new member is declared, if the name already exists, it will be given a new name (e.g. 'originalname_1'). * This name will be updated across all locations because the target member is a singleton. */ - internal BasicProgram Flatten(Compilation compilation) + internal BasicProgram Flatten (Compilation compilation) { BasicProgram program = new BasicProgram(); @@ -60,7 +60,7 @@ internal BasicProgram Flatten(Compilation compilation) program.Add(new CommentBStatement("This CrimsonBasic program was automatically generated by the Crimson compiler.")); program.Add(new CommentBStatement("Crimson version " + Crimson.VERSION)); program.Add(new CommentBStatement("CrimsonBasic version " + CrimsonBasic.CSharp.Core.CrimsonBasic.VERSION)); - program.Add(new CommentBStatement("Copyright (c) 2022 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x")); + program.Add(new CommentBStatement("Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x")); program.Add(new CommentBStatement("In case of problems with this compiler, register an issue or contact the authors at https://github.com/gamesmaster3000x/RF_ASM")); program.Add(new CommentBStatement("")); @@ -108,7 +108,7 @@ internal BasicProgram Flatten(Compilation compilation) return program; } - private FunctionCStatement GetEntryFunction(Compilation compilation) + private FunctionCStatement GetEntryFunction (Compilation compilation) { string baseName = Options.EntryFunctionName; Scope rootUnit = compilation.GetRootUnit(); @@ -116,26 +116,26 @@ 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 == 0) + 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}'."); + 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 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: INamed + private void FixNameAndAdd (Dictionary map, GS gs) where GS : INamed { int i = 0; string prefix = GetFlattenedPrefix(gs.GetType()); @@ -147,7 +147,7 @@ private void FixNameAndAdd(Dictionary map, GS gs) where GS: INam map.Add(gs.GetName().ToString(), gs); } - private string GetFlattenedPrefix(System.Type type) + private string GetFlattenedPrefix (System.Type type) { if (type == typeof(FunctionCStatement)) { From 03437a63fd1055d47ffdf1e277ae6bf629e40c19 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Thu, 16 Mar 2023 16:55:34 +0000 Subject: [PATCH 014/122] Update copyright notice again (semantic change) --- Crimson/CSharp/Core/Flattener.cs | 7 +++++-- Crimson/Resources/Test Compilations/result/main.cba | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Crimson/CSharp/Core/Flattener.cs b/Crimson/CSharp/Core/Flattener.cs index 3815a00..2cc20d1 100644 --- a/Crimson/CSharp/Core/Flattener.cs +++ b/Crimson/CSharp/Core/Flattener.cs @@ -58,10 +58,13 @@ internal BasicProgram Flatten (Compilation compilation) // Add versioning and credits program.Add(new CommentBStatement("This CrimsonBasic program was automatically generated by the Crimson compiler.")); + program.Add(new CommentBStatement("Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x")); program.Add(new CommentBStatement("Crimson version " + Crimson.VERSION)); program.Add(new CommentBStatement("CrimsonBasic version " + CrimsonBasic.CSharp.Core.CrimsonBasic.VERSION)); - program.Add(new CommentBStatement("Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x")); - program.Add(new CommentBStatement("In case of problems with this compiler, register an issue or contact the authors at https://github.com/gamesmaster3000x/RF_ASM")); + program.Add(new CommentBStatement("Crimson, CrimsonBasic and RedFoxAssembly are parts of GamesMaster3000X's RedFoxVirtualMachine.")); + program.Add(new CommentBStatement("The main repository for this project can be found at: https://github.com/gamesmaster3000x/RF_ASM")); + program.Add(new CommentBStatement("Crimson, CrimsonBasic and RedFoxAssembly were implemented by me, GenElectrovise.")); + program.Add(new CommentBStatement("My development fork of the project can be found at: https://github.com/GenElectrovise/RF_ASM")); program.Add(new CommentBStatement("")); // Add global variables diff --git a/Crimson/Resources/Test Compilations/result/main.cba b/Crimson/Resources/Test Compilations/result/main.cba index a172605..79b73a2 100644 --- a/Crimson/Resources/Test Compilations/result/main.cba +++ b/Crimson/Resources/Test Compilations/result/main.cba @@ -1,8 +1,11 @@ // This CrimsonBasic program was automatically generated by the Crimson compiler. +// Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x // Crimson version v0.0 // CrimsonBasic version v0.0 -// Copyright (c) 2022 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x -// In case of problems with this compiler, register an issue or contact the authors at https://github.com/gamesmaster3000x/RF_ASM +// Crimson, CrimsonBasic and RedFoxAssembly are parts of GamesMaster3000X's RedFoxVirtualMachine. +// The main repository for this project is: https://github.com/gamesmaster3000x/RF_ASM +// Crimson, CrimsonBasic and RedFoxAssembly were implemented by me, GenElectrovise. +// My development fork of the project can be found at: https://github.com/GenElectrovise/RF_ASM // ============================== Global Variables ============================== From a52be89bae6565fbc6ed96ed7eef4a8a54f47200 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sat, 18 Mar 2023 10:20:46 +0000 Subject: [PATCH 015/122] Create fraction.crm + Structure Fraction Doesn't do much right now but will be nice to deal with --- Crimson/Resources/Native Library/fraction.crm | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Crimson/Resources/Native Library/fraction.crm diff --git a/Crimson/Resources/Native Library/fraction.crm b/Crimson/Resources/Native Library/fraction.crm new file mode 100644 index 0000000..9381fd3 --- /dev/null +++ b/Crimson/Resources/Native Library/fraction.crm @@ -0,0 +1,6 @@ +{ + structure Fraction { + int numerator; + int denominator; + } +} \ No newline at end of file From bd0c09e24cb88a48505718fede6e8ef7c5f51422 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sat, 18 Mar 2023 10:25:58 +0000 Subject: [PATCH 016/122] Updates to Crimson Notepad++ formatter + structure keyword - package keyword - background colour for numbers --- Crimson/Resources/CrimsonNotepad++.xml | 6 +++--- Crimson/Resources/Test Compilations/logging/log.crm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Crimson/Resources/CrimsonNotepad++.xml b/Crimson/Resources/CrimsonNotepad++.xml index 6b9a1c8..1e19be8 100644 --- a/Crimson/Resources/CrimsonNotepad++.xml +++ b/Crimson/Resources/CrimsonNotepad++.xml @@ -13,7 +13,7 @@ - * / = ; *= == + * / = ; *= == ( ) @@ -24,7 +24,7 @@ - package function + function structure #using #ophandler as global ptr int @@ -38,7 +38,7 @@ - + diff --git a/Crimson/Resources/Test Compilations/logging/log.crm b/Crimson/Resources/Test Compilations/logging/log.crm index d760114..d6da2e0 100644 --- a/Crimson/Resources/Test Compilations/logging/log.crm +++ b/Crimson/Resources/Test Compilations/logging/log.crm @@ -2,12 +2,12 @@ #using "${NATIVE}/console.crm" as utils_stdout // Utility package - function [int] multiply ( int num1, int num2 ) { + function [int] multiply (int num1, int num2) { utils_stdout.write(6); return num1; } - function ptr times ( int num1, int num2 ) { + function ptr times (int num1, int num2) { int ret = multiply(num1, num2); return ret; } From 55996c91b98182bc4d6092928b1608b9ca0db4a5 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sun, 19 Mar 2023 16:16:52 +0000 Subject: [PATCH 017/122] Crimson now parses nested scopes at parse-time --- Crimson/CSharp/Core/Compilation.cs | 18 ++++++++++++++---- Crimson/CSharp/Core/CrimsonCompiler.cs | 2 +- Crimson/CSharp/Core/Library.cs | 19 ++++++++----------- Crimson/CSharp/Grammar/Scope.cs | 4 +--- .../Test Compilations/result/main.cba | 2 +- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/CSharp/Core/Compilation.cs index 948afac..c9a7256 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/CSharp/Core/Compilation.cs @@ -25,24 +25,34 @@ public Compilation (Scope rootUnit, CrimsonOptions options) { Library = new Library(options); - LoadLibrary(rootUnit); + LoadScopeDependencies(rootUnit); Library.Units[Library.ROOT_FACET_NAME] = rootUnit; // This name is reserved and should be free } /// /// Loads dependencies for the given root CompilationUnit, as well as that unit's dependencies, recursively. + /// Also checks for nested scopes and loads them as well! /// /// - private void LoadLibrary (Scope root) + private void LoadScopeDependencies (Scope root) { // For each import foreach (var i in root.Imports) { // Get the unit it refers to - Scope unit = Library.LoadUnitFromPath(i.Value.Path); + Scope unit = Library.LoadScopeFromFile(i.Value.Path); // Get that units' dependencies (recursively) - LoadLibrary(unit); + LoadScopeDependencies(unit); + } + + // Check for imports in nested scopes + foreach (var del in root.Delegates) + { + if (del.Invoke() is IHasScope hasScope) + { + LoadScopeDependencies(hasScope.GetScope()); + } } } diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index e9d8442..9212721 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -37,7 +37,7 @@ public int FullyCompileFromOptions() */ LOGGER.Info("\n\n"); LOGGER.Info(" P A R S I N G "); - Scope rootUnit = Library.LoadUnitFromPath(Options.TranslationSourcePath); // Get the root unit (ie. main.crm) + Scope rootUnit = Library.LoadScopeFromFile(Options.TranslationSourcePath); // Get the root unit (ie. main.crm) Compilation compilation = new Compilation(rootUnit, Options); // Generate dependency units (all resources are henceforth accessible) diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index f602433..8eb5e25 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -2,13 +2,7 @@ using Crimson.AntlrBuild; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; +using NLog; namespace Crimson.CSharp.Core { @@ -17,6 +11,7 @@ namespace Crimson.CSharp.Core /// internal class Library { + private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); public static readonly string SYSTEM_LIBRARY_PREFIX = "${NATIVE}"; public static readonly string ROOT_FACET_NAME = "${ROOT}"; @@ -38,7 +33,7 @@ public Library (CrimsonOptions options) Units = new Dictionary(); } - public Scope LoadUnitFromPath (string pathIn) + public Scope LoadScopeFromFile (string pathIn) { IEnumerable lines = Enumerable.Empty(); @@ -46,7 +41,7 @@ public Scope LoadUnitFromPath (string pathIn) if (pathIn.Equals(ROOT_FACET_NAME) || pathIn.Equals(SYSTEM_LIBRARY_PREFIX)) { - throw new UnitGeneratorException("Illegal unit path: Cannot import unit/facet with reserved name '" + pathIn + "'"); + throw new UnitGeneratorException("Illegal unit path: Cannot import unit/facet/scope with reserved name '" + pathIn + "'"); } Scope? unit = LookupScopeByPath(path); @@ -55,10 +50,11 @@ public Scope LoadUnitFromPath (string pathIn) return unit; } + LOGGER.Info($"Loading new root Scope from: {pathIn}"); try { string programText = string.Join(Environment.NewLine, File.ReadLines(path)); - Scope newUnit = LoadUnitFromText(path + " (" + pathIn + ")", programText); + Scope newUnit = ParseScopeText(path + " (" + pathIn + ")", programText); Units[path] = newUnit; return newUnit; } @@ -76,8 +72,9 @@ public Scope LoadUnitFromPath (string pathIn) } } - public Scope LoadUnitFromText (string sourceName, string textIn) + public Scope ParseScopeText (string sourceName, string textIn) { + LOGGER.Debug($"Parsing {textIn.Length} characters in {sourceName} with ANTLR..."); // Get Antlr context AntlrInputStream a4is = new AntlrInputStream(textIn); CrimsonLexer lexer = new CrimsonLexer(a4is); diff --git a/Crimson/CSharp/Grammar/Scope.cs b/Crimson/CSharp/Grammar/Scope.cs index 68730f1..e2325cd 100644 --- a/Crimson/CSharp/Grammar/Scope.cs +++ b/Crimson/CSharp/Grammar/Scope.cs @@ -183,7 +183,7 @@ public Dictionary GetLinks (Compilation compilation) /// public override void Link (LinkingContext ctx) { - LOGGER.Debug($"Linking {FamilyToString()}"); + LOGGER.Debug($"Linking Scope: {FamilyToString()}"); // Partially shallow-copy the old context (links in a lower level should not get carried up to higher levels) LinkingContext newContext = new LinkingContext(this, ctx); @@ -198,8 +198,6 @@ public override void Link (LinkingContext ctx) { d.Invoke().Link(newContext); } - - LOGGER.Info($"Linked {Delegates.Count} scope-level statements"); } public override Fragment GetCrimsonBasic () diff --git a/Crimson/Resources/Test Compilations/result/main.cba b/Crimson/Resources/Test Compilations/result/main.cba index 79b73a2..67b3e12 100644 --- a/Crimson/Resources/Test Compilations/result/main.cba +++ b/Crimson/Resources/Test Compilations/result/main.cba @@ -3,7 +3,7 @@ // Crimson version v0.0 // CrimsonBasic version v0.0 // Crimson, CrimsonBasic and RedFoxAssembly are parts of GamesMaster3000X's RedFoxVirtualMachine. -// The main repository for this project is: https://github.com/gamesmaster3000x/RF_ASM +// The main repository for this project can be found at: https://github.com/gamesmaster3000x/RF_ASM // Crimson, CrimsonBasic and RedFoxAssembly were implemented by me, GenElectrovise. // My development fork of the project can be found at: https://github.com/GenElectrovise/RF_ASM From 4e09597934a89584680be3e6df09f8b4d3325cff Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sun, 19 Mar 2023 18:29:04 +0000 Subject: [PATCH 018/122] Much typing... > Corrected void to null in console.crm > Added scopes to Stack.md + Structure/Rawtype/ArrayCrimsonType > Overhauled all ValueCTokens + Scope.FindStructure(structureName) + DataWidth option > Currently overhauling FunctionCallCStatement > FunctionCStatement.ReturnType moved to Header --- Crimson/Antlr/Input/Crimson.g4 | 4 +- Crimson/Antlr/Output/Crimson.interp | 2 +- Crimson/Antlr/Output/CrimsonParser.cs | 22 +++--- Crimson/CSharp/Core/Crimson.cs | 13 ++-- Crimson/CSharp/Core/CrimsonOptions.cs | 4 ++ Crimson/CSharp/Core/LinkerHelper.cs | 4 +- Crimson/CSharp/Core/LinkingContext.cs | 9 ++- Crimson/CSharp/Core/ScopeVisitor.cs | 8 +-- Crimson/CSharp/Grammar/Scope.cs | 8 +++ .../Grammar/Statements/FunctionCStatement.cs | 10 +-- .../Statements/FunctionCallCStatement.cs | 53 +++++++-------- .../Statements/GlobalVariableCStatement.cs | 4 +- .../Statements/InternalVariableCStatement.cs | 4 +- .../Grammar/Statements/StructureCStatement.cs | 5 ++ .../Grammar/Tokens/CrimsonTypeCToken.cs | 56 +++++++-------- .../Tokens/IdentifierSimpleValueCToken.cs | 6 +- .../Tokens/OperationResolvableValueCToken.cs | 24 ++++--- .../Tokens/RawResolvableValueCToken.cs | 6 +- .../Grammar/Tokens/SimpleValueCToken.cs | 10 +-- .../CSharp/Grammar/Types/ArrayCrimsonType.cs | 24 +++++++ .../Grammar/Types/RawtypeCrimsonType.cs | 22 ++++++ .../Grammar/Types/StructureCrimsonType.cs | 47 +++++++++++++ Crimson/Resources/Documentation/Stack.md | 2 +- Crimson/Resources/Native Library/console.crm | 2 +- .../Test Compilations/result/main.cba | 68 +++++++++---------- 25 files changed, 266 insertions(+), 151 deletions(-) create mode 100644 Crimson/CSharp/Grammar/Types/ArrayCrimsonType.cs create mode 100644 Crimson/CSharp/Grammar/Types/RawtypeCrimsonType.cs create mode 100644 Crimson/CSharp/Grammar/Types/StructureCrimsonType.cs diff --git a/Crimson/Antlr/Input/Crimson.g4 b/Crimson/Antlr/Input/Crimson.g4 index 149d45d..ea07a93 100644 --- a/Crimson/Antlr/Input/Crimson.g4 +++ b/Crimson/Antlr/Input/Crimson.g4 @@ -62,10 +62,10 @@ scopedVariableDeclaration : Scoped declaration=internalVariableDeclaration ; functionDeclaration - : Function returnType=type header=functionHeader body=scope + : Function header=functionHeader body=scope ; functionHeader - : name=fullName parameters=parameterList + : returnType=type name=fullName parameters=parameterList ; // Function diff --git a/Crimson/Antlr/Output/Crimson.interp b/Crimson/Antlr/Output/Crimson.interp index 6cc970d..46672b2 100644 --- a/Crimson/Antlr/Output/Crimson.interp +++ b/Crimson/Antlr/Output/Crimson.interp @@ -127,4 +127,4 @@ fullName atn: -[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 +[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, 16, 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, 184, 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, 32, 16, 0, 182, 183, 3, 0, 0, 0, 183, 31, 1, 0, 0, 0, 184, 185, 3, 56, 28, 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/CrimsonParser.cs b/Crimson/Antlr/Output/CrimsonParser.cs index 6cd9a3b..b389592 100644 --- a/Crimson/Antlr/Output/CrimsonParser.cs +++ b/Crimson/Antlr/Output/CrimsonParser.cs @@ -1511,13 +1511,9 @@ public ScopedVariableDeclarationContext scopedVariableDeclaration() { } public partial class FunctionDeclarationContext : ParserRuleContext { - public TypeContext returnType; public FunctionHeaderContext header; public ScopeContext body; [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Function() { return GetToken(CrimsonParser.Function, 0); } - [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() { - return GetRuleContext(0); - } [System.Diagnostics.DebuggerNonUserCode] public FunctionHeaderContext functionHeader() { return GetRuleContext(0); } @@ -1557,10 +1553,8 @@ public FunctionDeclarationContext functionDeclaration() { State = 180; Match(Function); State = 181; - _localctx.returnType = type(); - State = 182; _localctx.header = functionHeader(); - State = 183; + State = 182; _localctx.body = scope(); } } @@ -1576,8 +1570,12 @@ public FunctionDeclarationContext functionDeclaration() { } public partial class FunctionHeaderContext : ParserRuleContext { + public TypeContext returnType; public FullNameContext name; public ParameterListContext parameters; + [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() { + return GetRuleContext(0); + } [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { return GetRuleContext(0); } @@ -1614,6 +1612,8 @@ public FunctionHeaderContext functionHeader() { try { EnterOuterAlt(_localctx, 1); { + State = 184; + _localctx.returnType = type(); State = 185; _localctx.name = fullName(); State = 186; @@ -2618,7 +2618,7 @@ public FullNameContext fullName() { 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, + 15,1,15,1,15,1,16,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, @@ -2630,7 +2630,7 @@ public FullNameContext fullName() { 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, + 174,1,0,0,0,28,177,1,0,0,0,30,180,1,0,0,0,32,184,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, @@ -2664,8 +2664,8 @@ public FullNameContext fullName() { 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, + 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,32,16, + 0,182,183,3,0,0,0,183,31,1,0,0,0,184,185,3,56,28,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, diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 5e73a09..ed3311a 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -16,7 +16,7 @@ internal class Crimson public const int ERROR_UNKNOWN = -100; - static int Main(string[] args) + static int Main (string[] args) { bool useAutowiredArgs = true; if (useAutowiredArgs) @@ -27,6 +27,7 @@ static int Main(string[] args) "-s", resourcesPath + "Test Compilations/main.crm", "-t", resourcesPath + "Test Compilations/result/main", "-n", resourcesPath + "Native Library/" , + "-w", "4", "--rfasm" }; } @@ -42,6 +43,7 @@ static int Main(string[] args) Console.WriteLine(" Option: CompilationTargetPath: " + Options.TranslationTargetPath); Console.WriteLine(" Option: NativeLibraryPath: " + Options.NativeLibraryPath); Console.WriteLine(" Option: DumpIntermediates: " + Options.DumpIntermediates); + Console.WriteLine(" Option: DataWidth: " + Options.DataWidth); Console.WriteLine(" Option: (Platform) CrimsonBasic: " + Options.CrimsonBasic); Console.WriteLine(" Option: (Platform) RFASM: " + Options.RFASM); @@ -55,7 +57,8 @@ static int Main(string[] args) try { return Compiler.FullyCompileFromOptions(); - } catch (System.Exception e) + } + catch (System.Exception e) { Console.WriteLine(e); LOGGER!.Error(e); @@ -63,7 +66,7 @@ static int Main(string[] args) } } - private static void ShowSplash() + private static void ShowSplash () { Console.WriteLine(""); Console.WriteLine("Crimson Language Compiler, by GenElectrovise, for GamesMaster3000X"); @@ -78,7 +81,7 @@ private static void ShowSplash() Console.WriteLine(""); } - private static void ShowCredits() + private static void ShowCredits () { Console.WriteLine(""); Console.WriteLine(" -> C R E D I T S <- "); @@ -91,7 +94,7 @@ private static void ShowCredits() Console.WriteLine(""); } - private static void ConfigureNLog() + private static void ConfigureNLog () { Console.WriteLine("Configuring NLog..."); NLog.Config.LoggingConfiguration config = new NLog.Config.LoggingConfiguration(); diff --git a/Crimson/CSharp/Core/CrimsonOptions.cs b/Crimson/CSharp/Core/CrimsonOptions.cs index 02130a1..9e7bbb0 100644 --- a/Crimson/CSharp/Core/CrimsonOptions.cs +++ b/Crimson/CSharp/Core/CrimsonOptions.cs @@ -54,6 +54,10 @@ public string EntryFunctionName [Option(longName: "clean", shortName: 'c', Required = false, Default = true, HelpText = "Should the compiler clean up its temporary files?")] public bool DumpIntermediates { get; set; } + // DumpIntermediates + [Option(longName: "datawidth", shortName: 'w', Required = true, HelpText = "The width of an integer, in bytes.")] + public int DataWidth { get; set; } + // Targeted language [Option(Group = "platform")] public bool CrimsonBasic { get; set; } [Option(Group = "platform")] public bool RFASM { get; set; } diff --git a/Crimson/CSharp/Core/LinkerHelper.cs b/Crimson/CSharp/Core/LinkerHelper.cs index d333f98..5b3c399 100644 --- a/Crimson/CSharp/Core/LinkerHelper.cs +++ b/Crimson/CSharp/Core/LinkerHelper.cs @@ -31,7 +31,7 @@ internal static FunctionCStatement LinkFunctionCall (FullNameCToken identifier, { string alias = identifier.LibraryName; - Scope scope = ctx.GetUnit(alias); + Scope scope = ctx.GetScope(alias); string funcName = identifier.MemberName; FunctionCStatement? func = scope.FindFunction(funcName); @@ -74,7 +74,7 @@ internal static FullNameCToken LinkIdentifier (FullNameCToken identifier, Linkin { string alias = identifier.LibraryName!; - Scope unit = ctx.GetUnit(alias); + Scope unit = ctx.GetScope(alias); string call = identifier.MemberName; FullNameCToken output = new FullNameCToken($"{{{unit}}}", call); // {{ is used to escape the {, creating ${path}.call in the end //TODO LinkerHelper casts Unit to string diff --git a/Crimson/CSharp/Core/LinkingContext.cs b/Crimson/CSharp/Core/LinkingContext.cs index 6824fc4..cd5dade 100644 --- a/Crimson/CSharp/Core/LinkingContext.cs +++ b/Crimson/CSharp/Core/LinkingContext.cs @@ -42,9 +42,14 @@ public LinkingContext (Scope currentScope, LinkingContext ctx) } } - internal Scope GetUnit (string alias) + public bool HasScope (string alias) { - if (Links.ContainsKey(alias)) + return Links.ContainsKey(alias); + } + + internal Scope GetScope (string alias) + { + if (HasScope(alias)) { return Links[alias]; } diff --git a/Crimson/CSharp/Core/ScopeVisitor.cs b/Crimson/CSharp/Core/ScopeVisitor.cs index 28c6bfe..afa0b2a 100644 --- a/Crimson/CSharp/Core/ScopeVisitor.cs +++ b/Crimson/CSharp/Core/ScopeVisitor.cs @@ -145,18 +145,18 @@ public override GlobalVariableCStatement VisitGlobalVariableDeclaration ([NotNul public override FunctionCStatement VisitFunctionDeclaration ([NotNull] CrimsonParser.FunctionDeclarationContext context) { - CrimsonTypeCToken returnType = VisitType(context.returnType); FunctionCStatement.Header header = VisitFunctionHeader(context.header); Scope statements = VisitScope(context.body); - return new FunctionCStatement(returnType, header, statements); + return new FunctionCStatement(header, statements); } public override FunctionCStatement.Header VisitFunctionHeader ([NotNull] CrimsonParser.FunctionHeaderContext context) { + CrimsonTypeCToken returnType = VisitType(context.returnType); FullNameCToken identifier = VisitFullName(context.name); List parameters = VisitParameterList(context.parameters); - return new FunctionCStatement.Header(identifier, parameters); + return new FunctionCStatement.Header(returnType, identifier, parameters); } public override StructureCStatement VisitStructureDeclaration ([NotNull] CrimsonParser.StructureDeclarationContext context) @@ -198,7 +198,7 @@ public VariableAssignmentCStatement ParseAssignVariable ([NotNull] CrimsonParser public override CrimsonTypeCToken VisitType ([NotNull] CrimsonParser.TypeContext context) { FullNameCToken name = new FullNameCToken(context.GetText()); - return new CrimsonTypeCToken(name); + return CrimsonTypeCToken.Parse(name); } public override List VisitParameterList ([NotNull] CrimsonParser.ParameterListContext context) diff --git a/Crimson/CSharp/Grammar/Scope.cs b/Crimson/CSharp/Grammar/Scope.cs index e2325cd..2bd6fbc 100644 --- a/Crimson/CSharp/Grammar/Scope.cs +++ b/Crimson/CSharp/Grammar/Scope.cs @@ -86,6 +86,14 @@ public string GetPath () return HasParent() ? GetParent().FindFunction(funcName) : null; } + internal StructureCStatement? FindStructure (string structureName) + { + if (Structures.ContainsKey(structureName)) + return Structures[structureName]; + else + return HasParent() ? GetParent().FindStructure(structureName) : null; + } + // Statements public Dictionary Imports { get; private set; } public List OpHandlers { get; private set; } diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs index fc86c11..d420ea3 100644 --- a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs @@ -15,14 +15,12 @@ namespace Crimson.CSharp.Grammar.Statements /// public class FunctionCStatement : AbstractCrimsonStatement, INamed, IHasScope { - public CrimsonTypeCToken ReturnType { get; } public Header FunctionHeader { get; } public Scope Scope { get; } public FullNameCToken Name { get => FunctionHeader.Identifier; set { FunctionHeader.Identifier = value; } } - public FunctionCStatement (CrimsonTypeCToken returnType, Header header, Scope scope) + public FunctionCStatement (Header header, Scope scope) { - ReturnType = returnType; FunctionHeader = header; Scope = scope; @@ -33,7 +31,6 @@ public override void Link (LinkingContext ctx) { if (Linked) return; - ReturnType.Link(ctx); ((ICrimsonToken) FunctionHeader).Link(ctx); Scope.Link(ctx); @@ -96,17 +93,20 @@ void ICrimsonToken.Link (LinkingContext ctx) public class Header : ICrimsonToken { + public CrimsonTypeCToken ReturnType { get; set; } public FullNameCToken Identifier { get; set; } public List Parameters { get; protected set; } - public Header (FullNameCToken identifier, List parameters) + public Header (CrimsonTypeCToken returnType, FullNameCToken identifier, List parameters) { + ReturnType = returnType; Identifier = identifier; Parameters = parameters; } void ICrimsonToken.Link (LinkingContext ctx) { + ReturnType.Link(ctx); Identifier = LinkerHelper.LinkIdentifier(Identifier, ctx); foreach (var p in Parameters) { diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs index 6022448..239406c 100644 --- a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs @@ -34,41 +34,34 @@ public FunctionCallCStatement (FullNameCToken identifier, IList argumentHolders = new List(); - foreach (var argValue in arguments) - { - if (argValue is IdentifierSimpleValueCToken irvct) - { - argumentHolders.Add(irvct.Identifier.ToString()); - } - else if (argValue is RawResolvableValueCToken rrvct) - { - argumentHolders.Add(rrvct.Content); - } - else - { - throw new FlatteningException($"Illegal type {argValue.GetType()} for ResolvableValue " + argValue); - } - } + // Allocate space for input/output + int inputSize = CalculateInputBufferSize(); + int outputSize = CalculateOutputBufferSize(); + int total = inputSize + outputSize; + f.Add(new IncSpBStatement(total)); + + f.Add(new CommentBStatement("FC end")); + return f; + } - for (int i = 0; i < argumentHolders.Count; i++) + private int CalculateInputBufferSize () + { + int inputSize = 0; + FunctionCStatement.Header header = targetFunction!.FunctionHeader; + foreach (var param in header.Parameters) { - f.Add(new CommentBStatement($"arg{i}={argumentHolders[i]}")); + inputSize += param.Type.GetSize(); } + return inputSize; + } - // Jump - f.Add(new JumpBStatement(targetFunction!.Name.ToString())); - - // Store result - string returnName = FlattenerHelper.GetUniqueResolvableValueFieldName(); - f.Add(new RegSetBStatement("REG_RETURN", returnName)); - f.Add(new SetBStatement(returnName, -1, FUNCTION_RETURN_VARIABLE_NAME)); - - f.ResultHolder = returnName; - - return f; + private int CalculateOutputBufferSize () + { + FunctionCStatement.Header header = targetFunction!.FunctionHeader; + int outputSize = header.ReturnType.GetSize(); + return outputSize; } public override void Link (LinkingContext ctx) diff --git a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs index 34ef3fe..c62bb4d 100644 --- a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs @@ -60,13 +60,13 @@ public override Fragment GetCrimsonBasic () { Fragment valueStatements = Complex.GetBasicFragment(); statements.Add(valueStatements); - statements.Add(new IncSpBStatement(type.GetByteSize())); + statements.Add(new IncSpBStatement(type.GetSize())); statements.Add(new SetBStatement(Name.ToString(), -1, valueStatements.ResultHolder!)); } else if (Simple != null) { - statements.Add(new IncSpBStatement(type.GetByteSize())); + statements.Add(new IncSpBStatement(type.GetSize())); 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 5f1e9e0..55f2416 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 IncSpBStatement(type.GetByteSize())); + statements.Add(new IncSpBStatement(type.GetSize())); statements.Add(new SetBStatement(Identifier.ToString(), -1, valueStatements.ResultHolder!)); } else if (Simple != null) { - statements.Add(new IncSpBStatement(type.GetByteSize())); + statements.Add(new IncSpBStatement(type.GetSize())); statements.Add(new SetBStatement(Identifier.ToString(), -1, Simple.GetText())); } else diff --git a/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs b/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs index 3b8c81d..1f5312d 100644 --- a/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs @@ -35,5 +35,10 @@ public void SetName (FullNameCToken name) { Name = name; } + + public int GetSize () + { + return -10000; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Tokens/CrimsonTypeCToken.cs b/Crimson/CSharp/Grammar/Tokens/CrimsonTypeCToken.cs index 766312b..bdda7dd 100644 --- a/Crimson/CSharp/Grammar/Tokens/CrimsonTypeCToken.cs +++ b/Crimson/CSharp/Grammar/Tokens/CrimsonTypeCToken.cs @@ -1,49 +1,49 @@ using Crimson.CSharp.Core; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Grammar.Statements; +using Crimson.CSharp.Grammar.Types; using System.Text.RegularExpressions; namespace Crimson.CSharp.Grammar.Tokens { - public class CrimsonTypeCToken : ICrimsonToken + public abstract class CrimsonTypeCToken : ICrimsonToken { - private static readonly Regex WHITESPACE = new Regex(@"\s+"); - public FullNameCToken Text { get; set; } + public FullNameCToken Name { get; private set; } - public CrimsonTypeCToken(FullNameCToken text) + public CrimsonTypeCToken (FullNameCToken name) { - Text = text; + Name = name; } - public void Link(LinkingContext ctx) - { - Text = LinkerHelper.LinkIdentifier(Text, ctx); - } + public abstract void Link (LinkingContext ctx); + public abstract int GetSize (); - public Fragment GetCrimsonBasic() + public static CrimsonTypeCToken Parse (FullNameCToken name) { - Fragment f = new Fragment(0); - f.Add(new CommentBStatement($"Type:{Text}")); - return f; - } + if (!name.HasMember()) throw new ArgumentNullException($"A name for a type must have a member name but was given {name}"); - public override string ToString() - { - return Text.ToString(); + if (name.MemberName.StartsWith('[') && name.MemberName.EndsWith(']')) + { + string inner = name.MemberName.Substring(1, name.MemberName.Length - 2); + CrimsonTypeCToken type = Parse(new FullNameCToken(inner)); + return new ArrayCrimsonType(name, type); + } + + if (GetRawtypeSize(name.MemberName) >= 0) return new RawtypeCrimsonType(name.MemberName); + + return new StructureCrimsonType(name); } - internal int GetByteSize() + internal static int GetRawtypeSize (string name) { - if (Text.Equals("int")) + return name.Trim() switch { - return 4; - } - if (Text.Equals("byte")) - { - return 1; - } - return 666; + "int" => Crimson.CSharp.Core.Crimson.Options.DataWidth, + "byte" => 1, + "ptr" => Crimson.CSharp.Core.Crimson.Options.DataWidth, + "null" => 0, + _ => -1, + }; } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Tokens/IdentifierSimpleValueCToken.cs b/Crimson/CSharp/Grammar/Tokens/IdentifierSimpleValueCToken.cs index 958ddee..1ceee15 100644 --- a/Crimson/CSharp/Grammar/Tokens/IdentifierSimpleValueCToken.cs +++ b/Crimson/CSharp/Grammar/Tokens/IdentifierSimpleValueCToken.cs @@ -9,17 +9,17 @@ public class IdentifierSimpleValueCToken : SimpleValueCToken { public FullNameCToken Identifier { get; private set; } - public IdentifierSimpleValueCToken(FullNameCToken identifier) + public IdentifierSimpleValueCToken (FullNameCToken identifier) : base(null) // NOT Identifier... need to get type from somewhere else { Identifier = identifier; } - public override void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { Identifier = LinkerHelper.LinkIdentifier(Identifier, ctx); } - public override string GetText() + public override string GetText () { return Identifier.ToString(); } diff --git a/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs b/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs index 99279bd..a241283 100644 --- a/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs +++ b/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs @@ -13,38 +13,43 @@ public class OperationResolvableValueCToken : ComplexValueCToken public SimpleValueCToken LeftToken { get; } public SimpleValueCToken RightToken { get; } - public OperationResolvableValueCToken(SimpleValueCToken leftToken, OperationType opType, SimpleValueCToken rightToken) + public OperationResolvableValueCToken (SimpleValueCToken leftToken, OperationType opType, SimpleValueCToken rightToken) { LeftToken = leftToken; OpType = opType; RightToken = rightToken; } - public override void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { LeftToken.Link(ctx); RightToken.Link(ctx); } - public static OperationType ParseOpType(string s) + public static OperationType ParseOpType (string s) { s = s.Trim(); return s switch { "+" => OperationType.ADD, "-" => OperationType.SUB, - "*" => OperationType.MUL, - "/" => OperationType.DIV, + "*" => OperationType.AST, + "/" => OperationType.SLA, "==" => OperationType.EQU, "<" => OperationType.LES, "<=" => OperationType.LEQ, ">" => OperationType.GTR, ">=" => OperationType.GEQ, + "£" => OperationType.POU, + "$" => OperationType.DOL, + "%" => OperationType.PER, + "^" => OperationType.HAT, + "&" => OperationType.AMP, _ => throw new CrimsonParserException("Illegal operator type '" + s + "'"), }; } - public override Fragment GetBasicFragment() + public override Fragment GetBasicFragment () { Fragment fragment = new Fragment(0); fragment.Add(new CommentBStatement("Operation")); @@ -54,10 +59,13 @@ public override Fragment GetBasicFragment() public enum OperationType { // Maths - ADD, SUB, MUL, DIV, + ADD, SUB, AST, SLA, // Comparison - EQU, LEQ, LES, GEQ, GTR + EQU, LEQ, LES, GEQ, GTR, + + // Misc + POU, DOL, PER, HAT, AMP } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Tokens/RawResolvableValueCToken.cs b/Crimson/CSharp/Grammar/Tokens/RawResolvableValueCToken.cs index 877b1a1..6740968 100644 --- a/Crimson/CSharp/Grammar/Tokens/RawResolvableValueCToken.cs +++ b/Crimson/CSharp/Grammar/Tokens/RawResolvableValueCToken.cs @@ -9,16 +9,16 @@ public class RawResolvableValueCToken : SimpleValueCToken { public string Content { get; } - public RawResolvableValueCToken(string s) + public RawResolvableValueCToken (string s) : base(CrimsonTypeCToken.Parse(new FullNameCToken(s))) { Content = s; } - public override void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { } - public override string GetText() + public override string GetText () { return Content; } diff --git a/Crimson/CSharp/Grammar/Tokens/SimpleValueCToken.cs b/Crimson/CSharp/Grammar/Tokens/SimpleValueCToken.cs index 3316728..46dadaa 100644 --- a/Crimson/CSharp/Grammar/Tokens/SimpleValueCToken.cs +++ b/Crimson/CSharp/Grammar/Tokens/SimpleValueCToken.cs @@ -11,11 +11,13 @@ namespace Crimson.CSharp.Grammar.Tokens public abstract class SimpleValueCToken : ICrimsonToken { - public SimpleValueCToken() + public CrimsonTypeCToken Type { get; set; } + + public SimpleValueCToken (CrimsonTypeCToken type) { + Type = type; } - - public abstract void Link(LinkingContext ctx); - public abstract string GetText(); + public abstract void Link (LinkingContext ctx); + public abstract string GetText (); } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Types/ArrayCrimsonType.cs b/Crimson/CSharp/Grammar/Types/ArrayCrimsonType.cs new file mode 100644 index 0000000..8624688 --- /dev/null +++ b/Crimson/CSharp/Grammar/Types/ArrayCrimsonType.cs @@ -0,0 +1,24 @@ +using Crimson.CSharp.Core; +using Crimson.CSharp.Grammar.Tokens; + +namespace Crimson.CSharp.Grammar.Types +{ + internal class ArrayCrimsonType : CrimsonTypeCToken + { + private CrimsonTypeCToken type; + + public ArrayCrimsonType (FullNameCToken name, CrimsonTypeCToken type) : base(name) + { + this.type = type; + } + + public override int GetSize () + { + return type.GetSize() * -1000; + } + + public override void Link (LinkingContext ctx) + { + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Types/RawtypeCrimsonType.cs b/Crimson/CSharp/Grammar/Types/RawtypeCrimsonType.cs new file mode 100644 index 0000000..5f47f13 --- /dev/null +++ b/Crimson/CSharp/Grammar/Types/RawtypeCrimsonType.cs @@ -0,0 +1,22 @@ +using Crimson.CSharp.Core; +using Crimson.CSharp.Grammar.Tokens; + +namespace Crimson.CSharp.Grammar.Types +{ + internal class RawtypeCrimsonType : CrimsonTypeCToken + { + public RawtypeCrimsonType (string name) : base(new FullNameCToken(name)) + { + } + + public override int GetSize () + { + return GetRawtypeSize(Name.MemberName); + } + + public override void Link (LinkingContext ctx) + { + // No linking required + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Types/StructureCrimsonType.cs b/Crimson/CSharp/Grammar/Types/StructureCrimsonType.cs new file mode 100644 index 0000000..59b604f --- /dev/null +++ b/Crimson/CSharp/Grammar/Types/StructureCrimsonType.cs @@ -0,0 +1,47 @@ +using Crimson.CSharp.Core; +using Crimson.CSharp.Exception; +using Crimson.CSharp.Grammar.Statements; +using Crimson.CSharp.Grammar.Tokens; + +namespace Crimson.CSharp.Grammar.Types +{ + internal class StructureCrimsonType : CrimsonTypeCToken + { + + public StructureCStatement? Structure { get; set; } + + public StructureCrimsonType (FullNameCToken name) : base(name) + { + } + + public override int GetSize () + { + throw new NotImplementedException(); + } + + public override void Link (LinkingContext ctx) + { + Scope scope; + + if (Name.HasLibrary()) + { + if (!ctx.HasScope(Name.LibraryName!)) + throw new LinkingException($"Error linking type {Name}! " + + $"The given scope alias {Name.LibraryName} could not be found in the current linking context: {ctx}. " + + $"Available scope links: [{String.Join(',', ctx.Links.Select(pair => pair.Key))}]."); + scope = ctx.GetScope(Name.LibraryName!); + } + else + { + scope = ctx.CurrentScope; + } + + Structure = scope.FindStructure(Name.MemberName); + + if (Structure == null) + throw new LinkingException($"Error linking type {Name}! " + + $"The given structure name {Name.MemberName} could not be found in the given scope {Name.LibraryName}: {scope}. " + + $"Available structures: [{String.Join(',', scope.Structures.Select(pair => pair.Value.Name))}]."); + } + } +} \ No newline at end of file diff --git a/Crimson/Resources/Documentation/Stack.md b/Crimson/Resources/Documentation/Stack.md index 7e2e341..8eba346 100644 --- a/Crimson/Resources/Documentation/Stack.md +++ b/Crimson/Resources/Documentation/Stack.md @@ -3,7 +3,7 @@ Crimson's stack counts up in memory, ie. the memory addresses of successive item ## 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 +A new stack frame is started when the program enters a new scope, such as when it temporarily jumps to another subroutine/function and will need to restore its previous state upon returning. | Size | Purpose | diff --git a/Crimson/Resources/Native Library/console.crm b/Crimson/Resources/Native Library/console.crm index 9b39bec..04751d2 100644 --- a/Crimson/Resources/Native Library/console.crm +++ b/Crimson/Resources/Native Library/console.crm @@ -1,5 +1,5 @@ { - function void write (int i) { + function null write (int i) { } } \ 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 67b3e12..a134111 100644 --- a/Crimson/Resources/Test Compilations/result/main.cba +++ b/Crimson/Resources/Test Compilations/result/main.cba @@ -9,13 +9,13 @@ // ============================== Global Variables ============================== -inc_sp 666; +inc_sp 4; var_set gvar_regions_i_0, -1, 0; -inc_sp 666; +inc_sp 4; var_set gvar_regions_length_0, -1, 0; -inc_sp 666; +inc_sp 4; var_set gvar_regions_region_0, -1, 0; -inc_sp 666; +inc_sp 4; var_set gvar_counter_0, -1, 0; // (Structures shouldn't be a part of CB) @@ -26,10 +26,10 @@ var_set gvar_counter_0, -1, 0; example basic call ~A "example assemby call" // Function Call - inc_sp 666; + inc_sp 4; var_set a, -1, ; // Function Call - inc_sp 666; + inc_sp 4; var_set b, -1, ; jeq c_r_h 0 NEXT_ELIF @@ -38,10 +38,10 @@ var_set gvar_counter_0, -1, 0; jeq c_r_h 0 NEXT_ELIF // Function Call - inc_sp 666; + inc_sp 4; var_set c, -1, ; // Function Call - inc_sp 666; + inc_sp 4; var_set d, -1, ; jump END_branch_1 @@ -51,22 +51,18 @@ var_set gvar_counter_0, -1, 0; :END_branch_0: - // arg0=4 - // arg1=7 - // arg2=5 - jump func_call_0 - reg_set REG_RETURN rval_0 - var_set rval_0, -1, FUNC_RETURN; + // FC start + inc_sp 4; + // FC end // Function Call - inc_sp 666; + inc_sp 4; var_set i, -1, ; // 4 - // arg0=i - jump func_write_0 - reg_set REG_RETURN rval_1 - var_set rval_1, -1, FUNC_RETURN; + // FC start + inc_sp 4; + // FC end // Function Call - inc_sp 666; + inc_sp 4; var_set ret, -1, ; // Function Call var_set ret, -1, VAR_ASSIGN_C_VAL; @@ -76,16 +72,15 @@ return; // ============================== Functions ============================== :func_multiply_0: - // arg0=6 - jump func_write_0 - reg_set REG_RETURN rval_2 - var_set rval_2, -1, FUNC_RETURN; + // FC start + inc_sp 4; + // FC end return; return; :func_times_0: // Function Call - inc_sp 666; + inc_sp 4; var_set ret, -1, ; return; return; @@ -94,7 +89,7 @@ return; return; :func_alloc_0: - inc_sp 666; + inc_sp 4; var_set i, -1, 0; // >> TODO IMPLEMENT WHILE (start) << @@ -105,9 +100,9 @@ return; :func_get_region_ptr_0: // Operation - inc_sp 666; + inc_sp 4; var_set RRMS, -1, ; - inc_sp 666; + inc_sp 4; var_set exponential_offset, -1, 4; jeq c_r_h 0 NEXT_ELIF @@ -133,28 +128,27 @@ return; :END_branch_2: // Operation - inc_sp 666; + inc_sp 4; var_set HO_EXP, -1, ; // Operation - inc_sp 666; + inc_sp 4; var_set HO_EXP_RRMS, -1, ; return; return; :func_freeptr_0: - inc_sp 666; + inc_sp 4; var_set r, -1, 0; // Function Call - inc_sp 666; + inc_sp 4; var_set region_ptr, -1, ; // >> TODO IMPLEMENT WHILE (start) << // >> TODO IMPLEMENT WHILE (end) << - // arg0=r - jump func_freeregion_0 - reg_set REG_RETURN rval_3 - var_set rval_3, -1, FUNC_RETURN; + // FC start + inc_sp 4; + // FC end return; :func_freeregion_0: @@ -170,7 +164,7 @@ return; :func_call_0: // Function Call - inc_sp 666; + inc_sp 4; var_set test, -1, ; return; return; From ff6561d53655c9d4429c54535673164c03bbaf86 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sun, 19 Mar 2023 18:31:42 +0000 Subject: [PATCH 019/122] AssemblyBStatement ~A -> A~ This is now the same as in Crimson. --- Crimson/Resources/Test Compilations/result/main.cba | 2 +- CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs | 2 +- CrimsonBasic/CSharp/Statements/AssemblyBStatement.cs | 6 +++--- CrimsonBasic/Resources/CrimsonBasicNotepad++.xml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Crimson/Resources/Test Compilations/result/main.cba b/Crimson/Resources/Test Compilations/result/main.cba index a134111..e9f2096 100644 --- a/Crimson/Resources/Test Compilations/result/main.cba +++ b/Crimson/Resources/Test Compilations/result/main.cba @@ -24,7 +24,7 @@ var_set gvar_counter_0, -1, 0; // ============================== Entry Function ============================== :func_main_0: example basic call - ~A "example assemby call" + A~ "example assemby call" // Function Call inc_sp 4; var_set a, -1, ; diff --git a/CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs b/CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs index 5bac593..6c0a0ea 100644 --- a/CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs +++ b/CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs @@ -9,7 +9,7 @@ public ArbitraryBStatement (string text) Text = text; } - public override string ToString() + public override string ToString () { return Text; } diff --git a/CrimsonBasic/CSharp/Statements/AssemblyBStatement.cs b/CrimsonBasic/CSharp/Statements/AssemblyBStatement.cs index bf9474f..b2c280b 100644 --- a/CrimsonBasic/CSharp/Statements/AssemblyBStatement.cs +++ b/CrimsonBasic/CSharp/Statements/AssemblyBStatement.cs @@ -4,14 +4,14 @@ public class AssemblyBStatement : BasicStatement { public string Text { get; protected set; } - public AssemblyBStatement(string text) + public AssemblyBStatement (string text) { Text = text; } - public override string ToString() + public override string ToString () { - return $"~A \"{Text}\""; + return $"A~ \"{Text}\""; } } } \ No newline at end of file diff --git a/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml b/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml index 7441e02..ee89cce 100644 --- a/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml +++ b/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml @@ -29,7 +29,7 @@ push_sf pop_sf jump var_set reg_set - ~A + 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 From ed49b43504e0ba724e7289685cefd465181c4b17 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Mon, 20 Mar 2023 20:19:46 +0000 Subject: [PATCH 020/122] Added JumpSubBStatement --- .../Statements/FunctionCallCStatement.cs | 11 +++++++++ .../CSharp/Statements/JumpSubBStatement.cs | 23 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 CrimsonBasic/CSharp/Statements/JumpSubBStatement.cs diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs index 239406c..8d423e5 100644 --- a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs @@ -39,9 +39,20 @@ public override Fragment GetCrimsonBasic () // Allocate space for input/output int inputSize = CalculateInputBufferSize(); int outputSize = CalculateOutputBufferSize(); + + // Push inputs onto stack + + // Don't need to store return address + // because JSR already does that on the + // CPU stack. + + // Increment stack pointer int total = inputSize + outputSize; f.Add(new IncSpBStatement(total)); + // Jump to subroutine + f.Add(new JumpSubBStatement(targetFunction!.Name.ToString())); + f.Add(new CommentBStatement("FC end")); return f; } diff --git a/CrimsonBasic/CSharp/Statements/JumpSubBStatement.cs b/CrimsonBasic/CSharp/Statements/JumpSubBStatement.cs new file mode 100644 index 0000000..685f812 --- /dev/null +++ b/CrimsonBasic/CSharp/Statements/JumpSubBStatement.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 JumpSubBStatement : BasicStatement + { + private string _label; + + public JumpSubBStatement (string _label) + { + this._label = _label; + } + + public override string ToString () + { + return $"jump {_label}"; + } + } +} From 3cd8a63a47e84ed27131d572ecf9455c66b1582c Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Mon, 20 Mar 2023 20:44:16 +0000 Subject: [PATCH 021/122] Removed types. --- Crimson/Antlr/Input/Crimson.g4 | 25 +- Crimson/Antlr/Output/Crimson.interp | 5 +- Crimson/Antlr/Output/CrimsonBaseListener.cs | 28 +- Crimson/Antlr/Output/CrimsonBaseVisitor.cs | 18 +- Crimson/Antlr/Output/CrimsonListener.cs | 26 +- Crimson/Antlr/Output/CrimsonParser.cs | 729 ++++++++---------- Crimson/Antlr/Output/CrimsonVisitor.cs | 14 +- Crimson/CSharp/Core/ScopeVisitor.cs | 32 +- .../Grammar/Statements/FunctionCStatement.cs | 13 +- .../Statements/FunctionCallCStatement.cs | 26 +- .../Statements/GlobalVariableCStatement.cs | 9 +- .../Statements/InternalVariableCStatement.cs | 27 +- .../Statements/OperationHandlerCStatement.cs | 13 +- .../Grammar/Tokens/CrimsonTypeCToken.cs | 49 -- .../Tokens/IdentifierSimpleValueCToken.cs | 2 +- .../CSharp/Grammar/Tokens/ParameterCToken.cs | 4 +- .../Tokens/RawResolvableValueCToken.cs | 2 +- .../Grammar/Tokens/SimpleValueCToken.cs | 6 +- .../CSharp/Grammar/Types/ArrayCrimsonType.cs | 24 - .../Grammar/Types/RawtypeCrimsonType.cs | 22 - .../Grammar/Types/StructureCrimsonType.cs | 47 -- 21 files changed, 377 insertions(+), 744 deletions(-) delete mode 100644 Crimson/CSharp/Grammar/Tokens/CrimsonTypeCToken.cs delete mode 100644 Crimson/CSharp/Grammar/Types/ArrayCrimsonType.cs delete mode 100644 Crimson/CSharp/Grammar/Types/RawtypeCrimsonType.cs delete mode 100644 Crimson/CSharp/Grammar/Types/StructureCrimsonType.cs diff --git a/Crimson/Antlr/Input/Crimson.g4 b/Crimson/Antlr/Input/Crimson.g4 index ea07a93..d27acde 100644 --- a/Crimson/Antlr/Input/Crimson.g4 +++ b/Crimson/Antlr/Input/Crimson.g4 @@ -10,7 +10,7 @@ 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 + : Hashtag OpHandler op=Operator RightArrow identifier=fullName SemiColon ; // Function-only statements @@ -28,7 +28,7 @@ statement | structureDeclaration #StructureDeclarationStatement ; internalVariableDeclaration - : type fullName DirectEquals (complex=complexValue | simple=simpleValue) SemiColon + : name=fullName OpenBracket size=simpleValue CloseBracket DirectEquals (complex=complexValue | simple=simpleValue) SemiColon ; assignVariable : name=fullName DirectEquals (complex=complexValue | simple=simpleValue) SemiColon #AssignVariableDirect @@ -65,7 +65,7 @@ functionDeclaration : Function header=functionHeader body=scope ; functionHeader - : returnType=type name=fullName parameters=parameterList + : name=fullName parameters=parameterList ; // Function @@ -96,14 +96,14 @@ operation : leftValue=simpleValue operator=Operator rightValue=simpleValue ; -// Parameters +// Parameters +parameter + : size=simpleValue name=fullName + ; parameterList : OpenBracket CloseBracket | OpenBracket parameter (Comma parameter)* CloseBracket ; -parameter - : t=type name=fullName - ; // Structures structureDeclaration @@ -112,17 +112,8 @@ structureDeclaration structureBody : OpenBrace internalVariableDeclaration* CloseBrace ; - -// Types -type - : Integer - | Boolean - | fullName - | array - | Null - ; array - : OpenSquare type CloseSquare + : OpenSquare blockSize=Number CloseSquare ; // Misc diff --git a/Crimson/Antlr/Output/Crimson.interp b/Crimson/Antlr/Output/Crimson.interp index 46672b2..c34c057 100644 --- a/Crimson/Antlr/Output/Crimson.interp +++ b/Crimson/Antlr/Output/Crimson.interp @@ -117,14 +117,13 @@ simpleValue complexValue rawValue operation -parameterList parameter +parameterList structureDeclaration structureBody -type array fullName atn: -[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, 16, 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, 184, 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, 32, 16, 0, 182, 183, 3, 0, 0, 0, 183, 31, 1, 0, 0, 0, 184, 185, 3, 56, 28, 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 +[4, 1, 44, 264, 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, 1, 0, 1, 0, 5, 0, 63, 8, 0, 10, 0, 12, 0, 66, 9, 0, 1, 0, 5, 0, 69, 8, 0, 10, 0, 12, 0, 72, 9, 0, 1, 0, 5, 0, 75, 8, 0, 10, 0, 12, 0, 78, 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, 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, 109, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 118, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 126, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 134, 8, 5, 1, 5, 1, 5, 3, 5, 138, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 145, 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, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 3, 18, 187, 8, 18, 1, 18, 1, 18, 5, 18, 191, 8, 18, 10, 18, 12, 18, 194, 9, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 204, 8, 19, 1, 20, 1, 20, 3, 20, 208, 8, 20, 1, 20, 3, 20, 211, 8, 20, 1, 21, 1, 21, 3, 21, 215, 8, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 232, 8, 25, 10, 25, 12, 25, 235, 9, 25, 1, 25, 1, 25, 3, 25, 239, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 5, 27, 247, 8, 27, 10, 27, 12, 27, 250, 9, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 3, 29, 260, 8, 29, 1, 29, 1, 29, 1, 29, 0, 0, 30, 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, 0, 1, 2, 0, 16, 17, 42, 42, 262, 0, 60, 1, 0, 0, 0, 2, 81, 1, 0, 0, 0, 4, 88, 1, 0, 0, 0, 6, 108, 1, 0, 0, 0, 8, 110, 1, 0, 0, 0, 10, 137, 1, 0, 0, 0, 12, 139, 1, 0, 0, 0, 14, 146, 1, 0, 0, 0, 16, 150, 1, 0, 0, 0, 18, 154, 1, 0, 0, 0, 20, 157, 1, 0, 0, 0, 22, 160, 1, 0, 0, 0, 24, 164, 1, 0, 0, 0, 26, 168, 1, 0, 0, 0, 28, 171, 1, 0, 0, 0, 30, 174, 1, 0, 0, 0, 32, 178, 1, 0, 0, 0, 34, 181, 1, 0, 0, 0, 36, 184, 1, 0, 0, 0, 38, 203, 1, 0, 0, 0, 40, 210, 1, 0, 0, 0, 42, 214, 1, 0, 0, 0, 44, 216, 1, 0, 0, 0, 46, 218, 1, 0, 0, 0, 48, 222, 1, 0, 0, 0, 50, 238, 1, 0, 0, 0, 52, 240, 1, 0, 0, 0, 54, 244, 1, 0, 0, 0, 56, 253, 1, 0, 0, 0, 58, 259, 1, 0, 0, 0, 60, 64, 5, 31, 0, 0, 61, 63, 3, 2, 1, 0, 62, 61, 1, 0, 0, 0, 63, 66, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 64, 65, 1, 0, 0, 0, 65, 70, 1, 0, 0, 0, 66, 64, 1, 0, 0, 0, 67, 69, 3, 4, 2, 0, 68, 67, 1, 0, 0, 0, 69, 72, 1, 0, 0, 0, 70, 68, 1, 0, 0, 0, 70, 71, 1, 0, 0, 0, 71, 76, 1, 0, 0, 0, 72, 70, 1, 0, 0, 0, 73, 75, 3, 6, 3, 0, 74, 73, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 79, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 80, 5, 32, 0, 0, 80, 1, 1, 0, 0, 0, 81, 82, 5, 37, 0, 0, 82, 83, 5, 7, 0, 0, 83, 84, 5, 43, 0, 0, 84, 85, 5, 9, 0, 0, 85, 86, 3, 58, 29, 0, 86, 87, 5, 35, 0, 0, 87, 3, 1, 0, 0, 0, 88, 89, 5, 37, 0, 0, 89, 90, 5, 8, 0, 0, 90, 91, 5, 18, 0, 0, 91, 92, 5, 22, 0, 0, 92, 93, 3, 58, 29, 0, 93, 94, 5, 35, 0, 0, 94, 5, 1, 0, 0, 0, 95, 109, 3, 8, 4, 0, 96, 109, 3, 38, 19, 0, 97, 109, 3, 10, 5, 0, 98, 99, 3, 34, 17, 0, 99, 100, 5, 35, 0, 0, 100, 109, 1, 0, 0, 0, 101, 109, 3, 12, 6, 0, 102, 109, 3, 14, 7, 0, 103, 109, 3, 22, 11, 0, 104, 109, 3, 24, 12, 0, 105, 109, 3, 26, 13, 0, 106, 109, 3, 30, 15, 0, 107, 109, 3, 52, 26, 0, 108, 95, 1, 0, 0, 0, 108, 96, 1, 0, 0, 0, 108, 97, 1, 0, 0, 0, 108, 98, 1, 0, 0, 0, 108, 101, 1, 0, 0, 0, 108, 102, 1, 0, 0, 0, 108, 103, 1, 0, 0, 0, 108, 104, 1, 0, 0, 0, 108, 105, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 107, 1, 0, 0, 0, 109, 7, 1, 0, 0, 0, 110, 111, 3, 58, 29, 0, 111, 112, 5, 27, 0, 0, 112, 113, 3, 40, 20, 0, 113, 114, 5, 28, 0, 0, 114, 117, 5, 25, 0, 0, 115, 118, 3, 42, 21, 0, 116, 118, 3, 40, 20, 0, 117, 115, 1, 0, 0, 0, 117, 116, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 5, 35, 0, 0, 120, 9, 1, 0, 0, 0, 121, 122, 3, 58, 29, 0, 122, 125, 5, 25, 0, 0, 123, 126, 3, 42, 21, 0, 124, 126, 3, 40, 20, 0, 125, 123, 1, 0, 0, 0, 125, 124, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 128, 5, 35, 0, 0, 128, 138, 1, 0, 0, 0, 129, 130, 3, 58, 29, 0, 130, 133, 5, 26, 0, 0, 131, 134, 3, 42, 21, 0, 132, 134, 3, 40, 20, 0, 133, 131, 1, 0, 0, 0, 133, 132, 1, 0, 0, 0, 134, 135, 1, 0, 0, 0, 135, 136, 5, 35, 0, 0, 136, 138, 1, 0, 0, 0, 137, 121, 1, 0, 0, 0, 137, 129, 1, 0, 0, 0, 138, 11, 1, 0, 0, 0, 139, 140, 5, 10, 0, 0, 140, 141, 3, 16, 8, 0, 141, 144, 3, 0, 0, 0, 142, 145, 3, 20, 10, 0, 143, 145, 3, 18, 9, 0, 144, 142, 1, 0, 0, 0, 144, 143, 1, 0, 0, 0, 144, 145, 1, 0, 0, 0, 145, 13, 1, 0, 0, 0, 146, 147, 5, 11, 0, 0, 147, 148, 3, 16, 8, 0, 148, 149, 3, 0, 0, 0, 149, 15, 1, 0, 0, 0, 150, 151, 5, 27, 0, 0, 151, 152, 3, 46, 23, 0, 152, 153, 5, 28, 0, 0, 153, 17, 1, 0, 0, 0, 154, 155, 5, 12, 0, 0, 155, 156, 3, 12, 6, 0, 156, 19, 1, 0, 0, 0, 157, 158, 5, 12, 0, 0, 158, 159, 3, 0, 0, 0, 159, 21, 1, 0, 0, 0, 160, 161, 5, 23, 0, 0, 161, 162, 5, 43, 0, 0, 162, 163, 5, 35, 0, 0, 163, 23, 1, 0, 0, 0, 164, 165, 5, 24, 0, 0, 165, 166, 5, 43, 0, 0, 166, 167, 5, 35, 0, 0, 167, 25, 1, 0, 0, 0, 168, 169, 5, 3, 0, 0, 169, 170, 3, 8, 4, 0, 170, 27, 1, 0, 0, 0, 171, 172, 5, 4, 0, 0, 172, 173, 3, 8, 4, 0, 173, 29, 1, 0, 0, 0, 174, 175, 5, 2, 0, 0, 175, 176, 3, 32, 16, 0, 176, 177, 3, 0, 0, 0, 177, 31, 1, 0, 0, 0, 178, 179, 3, 58, 29, 0, 179, 180, 3, 50, 25, 0, 180, 33, 1, 0, 0, 0, 181, 182, 3, 58, 29, 0, 182, 183, 3, 36, 18, 0, 183, 35, 1, 0, 0, 0, 184, 186, 5, 27, 0, 0, 185, 187, 3, 40, 20, 0, 186, 185, 1, 0, 0, 0, 186, 187, 1, 0, 0, 0, 187, 192, 1, 0, 0, 0, 188, 189, 5, 33, 0, 0, 189, 191, 3, 40, 20, 0, 190, 188, 1, 0, 0, 0, 191, 194, 1, 0, 0, 0, 192, 190, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 195, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 195, 196, 5, 28, 0, 0, 196, 37, 1, 0, 0, 0, 197, 198, 5, 5, 0, 0, 198, 199, 3, 40, 20, 0, 199, 200, 5, 35, 0, 0, 200, 204, 1, 0, 0, 0, 201, 202, 5, 5, 0, 0, 202, 204, 5, 35, 0, 0, 203, 197, 1, 0, 0, 0, 203, 201, 1, 0, 0, 0, 204, 39, 1, 0, 0, 0, 205, 207, 3, 58, 29, 0, 206, 208, 5, 19, 0, 0, 207, 206, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 211, 1, 0, 0, 0, 209, 211, 3, 44, 22, 0, 210, 205, 1, 0, 0, 0, 210, 209, 1, 0, 0, 0, 211, 41, 1, 0, 0, 0, 212, 215, 3, 46, 23, 0, 213, 215, 3, 34, 17, 0, 214, 212, 1, 0, 0, 0, 214, 213, 1, 0, 0, 0, 215, 43, 1, 0, 0, 0, 216, 217, 7, 0, 0, 0, 217, 45, 1, 0, 0, 0, 218, 219, 3, 40, 20, 0, 219, 220, 5, 18, 0, 0, 220, 221, 3, 40, 20, 0, 221, 47, 1, 0, 0, 0, 222, 223, 3, 40, 20, 0, 223, 224, 3, 58, 29, 0, 224, 49, 1, 0, 0, 0, 225, 226, 5, 27, 0, 0, 226, 239, 5, 28, 0, 0, 227, 228, 5, 27, 0, 0, 228, 233, 3, 48, 24, 0, 229, 230, 5, 33, 0, 0, 230, 232, 3, 48, 24, 0, 231, 229, 1, 0, 0, 0, 232, 235, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 236, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 236, 237, 5, 28, 0, 0, 237, 239, 1, 0, 0, 0, 238, 225, 1, 0, 0, 0, 238, 227, 1, 0, 0, 0, 239, 51, 1, 0, 0, 0, 240, 241, 5, 6, 0, 0, 241, 242, 3, 58, 29, 0, 242, 243, 3, 54, 27, 0, 243, 53, 1, 0, 0, 0, 244, 248, 5, 31, 0, 0, 245, 247, 3, 8, 4, 0, 246, 245, 1, 0, 0, 0, 247, 250, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 251, 1, 0, 0, 0, 250, 248, 1, 0, 0, 0, 251, 252, 5, 32, 0, 0, 252, 55, 1, 0, 0, 0, 253, 254, 5, 29, 0, 0, 254, 255, 5, 42, 0, 0, 255, 256, 5, 30, 0, 0, 256, 57, 1, 0, 0, 0, 257, 258, 5, 44, 0, 0, 258, 260, 5, 34, 0, 0, 259, 257, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 261, 1, 0, 0, 0, 261, 262, 5, 44, 0, 0, 262, 59, 1, 0, 0, 0, 19, 64, 70, 76, 108, 117, 125, 133, 137, 144, 186, 192, 203, 207, 210, 214, 233, 238, 248, 259] \ No newline at end of file diff --git a/Crimson/Antlr/Output/CrimsonBaseListener.cs b/Crimson/Antlr/Output/CrimsonBaseListener.cs index 5efdf9d..7b1226a 100644 --- a/Crimson/Antlr/Output/CrimsonBaseListener.cs +++ b/Crimson/Antlr/Output/CrimsonBaseListener.cs @@ -483,29 +483,29 @@ public virtual void EnterOperation([NotNull] CrimsonParser.OperationContext cont /// The parse tree. public virtual void ExitOperation([NotNull] CrimsonParser.OperationContext context) { } /// - /// Enter a parse tree produced by . + /// Enter a parse tree produced by . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterParameterList([NotNull] CrimsonParser.ParameterListContext context) { } + public virtual void EnterParameter([NotNull] CrimsonParser.ParameterContext context) { } /// - /// Exit a parse tree produced by . + /// Exit a parse tree produced by . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitParameterList([NotNull] CrimsonParser.ParameterListContext context) { } + public virtual void ExitParameter([NotNull] CrimsonParser.ParameterContext context) { } /// - /// Enter a parse tree produced by . + /// Enter a parse tree produced by . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterParameter([NotNull] CrimsonParser.ParameterContext context) { } + public virtual void EnterParameterList([NotNull] CrimsonParser.ParameterListContext context) { } /// - /// Exit a parse tree produced by . + /// Exit a parse tree produced by . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitParameter([NotNull] CrimsonParser.ParameterContext context) { } + public virtual void ExitParameterList([NotNull] CrimsonParser.ParameterListContext context) { } /// /// Enter a parse tree produced by . /// The default implementation does nothing. @@ -531,18 +531,6 @@ public virtual void EnterStructureBody([NotNull] CrimsonParser.StructureBodyCont /// The parse tree. public virtual void ExitStructureBody([NotNull] CrimsonParser.StructureBodyContext context) { } /// - /// Enter a parse tree produced by . - /// The default implementation does nothing. - /// - /// The parse tree. - public virtual void EnterType([NotNull] CrimsonParser.TypeContext context) { } - /// - /// Exit a parse tree produced by . - /// The default implementation does nothing. - /// - /// The parse tree. - public virtual void ExitType([NotNull] CrimsonParser.TypeContext 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 4c29906..c65da9f 100644 --- a/Crimson/Antlr/Output/CrimsonBaseVisitor.cs +++ b/Crimson/Antlr/Output/CrimsonBaseVisitor.cs @@ -399,7 +399,7 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitorThe visitor result. public virtual Result VisitOperation([NotNull] CrimsonParser.OperationContext 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 . @@ -407,9 +407,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor /// The parse tree. /// The visitor result. - public virtual Result VisitParameterList([NotNull] CrimsonParser.ParameterListContext context) { return VisitChildren(context); } + public virtual Result VisitParameter([NotNull] CrimsonParser.ParameterContext 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 . @@ -417,7 +417,7 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor /// The parse tree. /// The visitor result. - public virtual Result VisitParameter([NotNull] CrimsonParser.ParameterContext context) { return VisitChildren(context); } + public virtual Result VisitParameterList([NotNull] CrimsonParser.ParameterListContext context) { return VisitChildren(context); } /// /// Visit a parse tree produced by . /// @@ -439,16 +439,6 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitorThe visitor result. public virtual Result VisitStructureBody([NotNull] CrimsonParser.StructureBodyContext 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 VisitType([NotNull] CrimsonParser.TypeContext context) { return VisitChildren(context); } - /// /// Visit a parse tree produced by . /// /// The default implementation returns the result of calling diff --git a/Crimson/Antlr/Output/CrimsonListener.cs b/Crimson/Antlr/Output/CrimsonListener.cs index 9b376ef..c027c70 100644 --- a/Crimson/Antlr/Output/CrimsonListener.cs +++ b/Crimson/Antlr/Output/CrimsonListener.cs @@ -408,25 +408,25 @@ public interface ICrimsonListener : IParseTreeListener { /// The parse tree. void ExitOperation([NotNull] CrimsonParser.OperationContext context); /// - /// Enter a parse tree produced by . + /// Enter a parse tree produced by . /// /// The parse tree. - void EnterParameterList([NotNull] CrimsonParser.ParameterListContext context); + void EnterParameter([NotNull] CrimsonParser.ParameterContext context); /// - /// Exit a parse tree produced by . + /// Exit a parse tree produced by . /// /// The parse tree. - void ExitParameterList([NotNull] CrimsonParser.ParameterListContext context); + void ExitParameter([NotNull] CrimsonParser.ParameterContext context); /// - /// Enter a parse tree produced by . + /// Enter a parse tree produced by . /// /// The parse tree. - void EnterParameter([NotNull] CrimsonParser.ParameterContext context); + void EnterParameterList([NotNull] CrimsonParser.ParameterListContext context); /// - /// Exit a parse tree produced by . + /// Exit a parse tree produced by . /// /// The parse tree. - void ExitParameter([NotNull] CrimsonParser.ParameterContext context); + void ExitParameterList([NotNull] CrimsonParser.ParameterListContext context); /// /// Enter a parse tree produced by . /// @@ -448,16 +448,6 @@ public interface ICrimsonListener : IParseTreeListener { /// The parse tree. void ExitStructureBody([NotNull] CrimsonParser.StructureBodyContext context); /// - /// Enter a parse tree produced by . - /// - /// The parse tree. - void EnterType([NotNull] CrimsonParser.TypeContext context); - /// - /// Exit a parse tree produced by . - /// - /// The parse tree. - void ExitType([NotNull] CrimsonParser.TypeContext 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 b389592..74de60a 100644 --- a/Crimson/Antlr/Output/CrimsonParser.cs +++ b/Crimson/Antlr/Output/CrimsonParser.cs @@ -53,16 +53,16 @@ public const int 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; + RULE_parameter = 24, RULE_parameterList = 25, RULE_structureDeclaration = 26, + RULE_structureBody = 27, RULE_array = 28, RULE_fullName = 29; public static readonly string[] ruleNames = { "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" + "rawValue", "operation", "parameter", "parameterList", "structureDeclaration", + "structureBody", "array", "fullName" }; private static readonly string[] _LiteralNames = { @@ -173,56 +173,56 @@ public ScopeContext scope() { int _alt; EnterOuterAlt(_localctx, 1); { - State = 62; + State = 60; Match(OpenBrace); - State = 66; + State = 64; 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 = 63; + State = 61; _localctx._importUnit = importUnit(); _localctx._imports.Add(_localctx._importUnit); } } } - State = 68; + State = 66; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,0,Context); } - State = 72; + State = 70; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==Hashtag) { { { - State = 69; + State = 67; _localctx._operationHandler = operationHandler(); _localctx._opHandlers.Add(_localctx._operationHandler); } } - State = 74; + State = 72; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 78; + State = 76; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - while (((_la) & ~0x3f) == 0 && ((1L << _la) & 17592748199020L) != 0) { + while (((_la) & ~0x3f) == 0 && ((1L << _la) & 17592211213420L) != 0) { { { - State = 75; + State = 73; _localctx._statement = statement(); _localctx._statements.Add(_localctx._statement); } } - State = 80; + State = 78; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 81; + State = 79; Match(CloseBrace); } } @@ -278,17 +278,17 @@ public ImportUnitContext importUnit() { try { EnterOuterAlt(_localctx, 1); { - State = 83; + State = 81; Match(Hashtag); - State = 84; + State = 82; Match(Using); - State = 85; + State = 83; _localctx.path = Match(String); - State = 86; + State = 84; Match(As); - State = 87; + State = 85; _localctx.identifier = fullName(); - State = 88; + State = 86; Match(SemiColon); } } @@ -304,24 +304,12 @@ public ImportUnitContext importUnit() { } public partial class OperationHandlerContext : ParserRuleContext { - public TypeContext t1; public IToken op; - public TypeContext t2; public FullNameContext identifier; [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Hashtag() { return GetToken(CrimsonParser.Hashtag, 0); } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpHandler() { return GetToken(CrimsonParser.OpHandler, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpenBracket() { return GetToken(CrimsonParser.OpenBracket, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CloseBracket() { return GetToken(CrimsonParser.CloseBracket, 0); } [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(); - } - [System.Diagnostics.DebuggerNonUserCode] public TypeContext type(int i) { - return GetRuleContext(i); - } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Operator() { return GetToken(CrimsonParser.Operator, 0); } [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { return GetRuleContext(0); @@ -356,29 +344,17 @@ public OperationHandlerContext operationHandler() { try { EnterOuterAlt(_localctx, 1); { - State = 90; + State = 88; Match(Hashtag); - State = 91; + State = 89; Match(OpHandler); - State = 92; - Match(OpenBracket); - State = 93; - _localctx.t1 = type(); - State = 94; + State = 90; _localctx.op = Match(Operator); - State = 95; - _localctx.t2 = type(); - State = 96; - Match(CloseBracket); - State = 97; + State = 91; Match(RightArrow); - State = 98; - Match(OpenBrace); - State = 99; + State = 92; _localctx.identifier = fullName(); - State = 100; - Match(CloseBrace); - State = 101; + State = 93; Match(SemiColon); } } @@ -654,14 +630,14 @@ public StatementContext statement() { StatementContext _localctx = new StatementContext(Context, State); EnterRule(_localctx, 6, RULE_statement); try { - State = 116; + State = 108; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,3,Context) ) { case 1: _localctx = new VariableDeclarationStatementContext(_localctx); EnterOuterAlt(_localctx, 1); { - State = 103; + State = 95; internalVariableDeclaration(); } break; @@ -669,7 +645,7 @@ public StatementContext statement() { _localctx = new ReturnStatementContext(_localctx); EnterOuterAlt(_localctx, 2); { - State = 104; + State = 96; functionReturn(); } break; @@ -677,7 +653,7 @@ public StatementContext statement() { _localctx = new AssignVariableStatementContext(_localctx); EnterOuterAlt(_localctx, 3); { - State = 105; + State = 97; assignVariable(); } break; @@ -685,9 +661,9 @@ public StatementContext statement() { _localctx = new FunctionCallStatementContext(_localctx); EnterOuterAlt(_localctx, 4); { - State = 106; + State = 98; functionCall(); - State = 107; + State = 99; Match(SemiColon); } break; @@ -695,7 +671,7 @@ public StatementContext statement() { _localctx = new IfStatementContext(_localctx); EnterOuterAlt(_localctx, 5); { - State = 109; + State = 101; ifBlock(); } break; @@ -703,7 +679,7 @@ public StatementContext statement() { _localctx = new WhileStatementContext(_localctx); EnterOuterAlt(_localctx, 6); { - State = 110; + State = 102; whileBlock(); } break; @@ -711,7 +687,7 @@ public StatementContext statement() { _localctx = new BasicCallStatementContext(_localctx); EnterOuterAlt(_localctx, 7); { - State = 111; + State = 103; basicCall(); } break; @@ -719,7 +695,7 @@ public StatementContext statement() { _localctx = new AssemblyCallStatementContext(_localctx); EnterOuterAlt(_localctx, 8); { - State = 112; + State = 104; assemblyCall(); } break; @@ -727,7 +703,7 @@ public StatementContext statement() { _localctx = new GlobalVariableStatementContext(_localctx); EnterOuterAlt(_localctx, 9); { - State = 113; + State = 105; globalVariableDeclaration(); } break; @@ -735,7 +711,7 @@ public StatementContext statement() { _localctx = new FunctionDeclarationStatementContext(_localctx); EnterOuterAlt(_localctx, 10); { - State = 114; + State = 106; functionDeclaration(); } break; @@ -743,7 +719,7 @@ public StatementContext statement() { _localctx = new StructureDeclarationStatementContext(_localctx); EnterOuterAlt(_localctx, 11); { - State = 115; + State = 107; structureDeclaration(); } break; @@ -761,22 +737,26 @@ public StatementContext statement() { } public partial class InternalVariableDeclarationContext : ParserRuleContext { + public FullNameContext name; + public SimpleValueContext size; public ComplexValueContext complex; public SimpleValueContext simple; - [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() { - return GetRuleContext(0); - } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpenBracket() { return GetToken(CrimsonParser.OpenBracket, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CloseBracket() { return GetToken(CrimsonParser.CloseBracket, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DirectEquals() { return GetToken(CrimsonParser.DirectEquals, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SemiColon() { return GetToken(CrimsonParser.SemiColon, 0); } [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { return GetRuleContext(0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DirectEquals() { return GetToken(CrimsonParser.DirectEquals, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SemiColon() { return GetToken(CrimsonParser.SemiColon, 0); } + [System.Diagnostics.DebuggerNonUserCode] public SimpleValueContext[] simpleValue() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public SimpleValueContext simpleValue(int i) { + return GetRuleContext(i); + } [System.Diagnostics.DebuggerNonUserCode] public ComplexValueContext complexValue() { return GetRuleContext(0); } - [System.Diagnostics.DebuggerNonUserCode] public SimpleValueContext simpleValue() { - return GetRuleContext(0); - } public InternalVariableDeclarationContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { @@ -807,29 +787,33 @@ public InternalVariableDeclarationContext internalVariableDeclaration() { try { EnterOuterAlt(_localctx, 1); { - State = 118; - type(); - State = 119; - fullName(); - State = 120; + State = 110; + _localctx.name = fullName(); + State = 111; + Match(OpenBracket); + State = 112; + _localctx.size = simpleValue(); + State = 113; + Match(CloseBracket); + State = 114; Match(DirectEquals); - State = 123; + State = 117; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,4,Context) ) { case 1: { - State = 121; + State = 115; _localctx.complex = complexValue(); } break; case 2: { - State = 122; + State = 116; _localctx.simple = simpleValue(); } break; } - State = 125; + State = 119; Match(SemiColon); } } @@ -928,34 +912,34 @@ public AssignVariableContext assignVariable() { AssignVariableContext _localctx = new AssignVariableContext(Context, State); EnterRule(_localctx, 10, RULE_assignVariable); try { - State = 143; + State = 137; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,7,Context) ) { case 1: _localctx = new AssignVariableDirectContext(_localctx); EnterOuterAlt(_localctx, 1); { - State = 127; + State = 121; ((AssignVariableDirectContext)_localctx).name = fullName(); - State = 128; + State = 122; Match(DirectEquals); - State = 131; + State = 125; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,5,Context) ) { case 1: { - State = 129; + State = 123; ((AssignVariableDirectContext)_localctx).complex = complexValue(); } break; case 2: { - State = 130; + State = 124; ((AssignVariableDirectContext)_localctx).simple = simpleValue(); } break; } - State = 133; + State = 127; Match(SemiColon); } break; @@ -963,27 +947,27 @@ public AssignVariableContext assignVariable() { _localctx = new AssignVariableAtPointerContext(_localctx); EnterOuterAlt(_localctx, 2); { - State = 135; + State = 129; ((AssignVariableAtPointerContext)_localctx).name = fullName(); - State = 136; + State = 130; Match(PointerEquals); - State = 139; + State = 133; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,6,Context) ) { case 1: { - State = 137; + State = 131; ((AssignVariableAtPointerContext)_localctx).complex = complexValue(); } break; case 2: { - State = 138; + State = 132; ((AssignVariableAtPointerContext)_localctx).simple = simpleValue(); } break; } - State = 141; + State = 135; Match(SemiColon); } break; @@ -1044,24 +1028,24 @@ public IfBlockContext ifBlock() { try { EnterOuterAlt(_localctx, 1); { - State = 145; + State = 139; Match(If); - State = 146; + State = 140; condition(); - State = 147; + State = 141; scope(); - State = 150; + State = 144; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,8,Context) ) { case 1: { - State = 148; + State = 142; elseBlock(); } break; case 2: { - State = 149; + State = 143; elseIfBlock(); } break; @@ -1117,11 +1101,11 @@ public WhileBlockContext whileBlock() { try { EnterOuterAlt(_localctx, 1); { - State = 152; + State = 146; Match(While); - State = 153; + State = 147; condition(); - State = 154; + State = 148; scope(); } } @@ -1173,11 +1157,11 @@ public ConditionContext condition() { try { EnterOuterAlt(_localctx, 1); { - State = 156; + State = 150; Match(OpenBracket); - State = 157; + State = 151; _localctx.op = operation(); - State = 158; + State = 152; Match(CloseBracket); } } @@ -1227,9 +1211,9 @@ public ElseIfBlockContext elseIfBlock() { try { EnterOuterAlt(_localctx, 1); { - State = 160; + State = 154; Match(Else); - State = 161; + State = 155; ifBlock(); } } @@ -1279,9 +1263,9 @@ public ElseBlockContext elseBlock() { try { EnterOuterAlt(_localctx, 1); { - State = 163; + State = 157; Match(Else); - State = 164; + State = 158; scope(); } } @@ -1331,11 +1315,11 @@ public BasicCallContext basicCall() { try { EnterOuterAlt(_localctx, 1); { - State = 166; + State = 160; Match(BasicCall); - State = 167; + State = 161; _localctx.basicText = Match(String); - State = 168; + State = 162; Match(SemiColon); } } @@ -1385,11 +1369,11 @@ public AssemblyCallContext assemblyCall() { try { EnterOuterAlt(_localctx, 1); { - State = 170; + State = 164; Match(AssemblyCall); - State = 171; + State = 165; _localctx.assemblyText = Match(String); - State = 172; + State = 166; Match(SemiColon); } } @@ -1440,9 +1424,9 @@ public GlobalVariableDeclarationContext globalVariableDeclaration() { try { EnterOuterAlt(_localctx, 1); { - State = 174; + State = 168; Match(Global); - State = 175; + State = 169; _localctx.declaration = internalVariableDeclaration(); } } @@ -1493,9 +1477,9 @@ public ScopedVariableDeclarationContext scopedVariableDeclaration() { try { EnterOuterAlt(_localctx, 1); { - State = 177; + State = 171; Match(Scoped); - State = 178; + State = 172; _localctx.declaration = internalVariableDeclaration(); } } @@ -1550,11 +1534,11 @@ public FunctionDeclarationContext functionDeclaration() { try { EnterOuterAlt(_localctx, 1); { - State = 180; + State = 174; Match(Function); - State = 181; + State = 175; _localctx.header = functionHeader(); - State = 182; + State = 176; _localctx.body = scope(); } } @@ -1570,12 +1554,8 @@ public FunctionDeclarationContext functionDeclaration() { } public partial class FunctionHeaderContext : ParserRuleContext { - public TypeContext returnType; public FullNameContext name; public ParameterListContext parameters; - [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() { - return GetRuleContext(0); - } [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { return GetRuleContext(0); } @@ -1612,11 +1592,9 @@ public FunctionHeaderContext functionHeader() { try { EnterOuterAlt(_localctx, 1); { - State = 184; - _localctx.returnType = type(); - State = 185; + State = 178; _localctx.name = fullName(); - State = 186; + State = 179; _localctx.parameters = parameterList(); } } @@ -1670,9 +1648,9 @@ public FunctionCallContext functionCall() { try { EnterOuterAlt(_localctx, 1); { - State = 188; + State = 181; _localctx.name = fullName(); - State = 189; + State = 182; _localctx.args = arguments(); } } @@ -1731,37 +1709,37 @@ public ArgumentsContext arguments() { try { EnterOuterAlt(_localctx, 1); { - State = 191; + State = 184; Match(OpenBracket); - State = 193; + State = 186; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (((_la) & ~0x3f) == 0 && ((1L << _la) & 21990232752128L) != 0) { { - State = 192; + State = 185; simpleValue(); } } - State = 199; + State = 192; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==Comma) { { { - State = 195; + State = 188; Match(Comma); { - State = 196; + State = 189; simpleValue(); } } } - State = 201; + State = 194; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 202; + State = 195; Match(CloseBracket); } } @@ -1810,26 +1788,26 @@ public FunctionReturnContext functionReturn() { FunctionReturnContext _localctx = new FunctionReturnContext(Context, State); EnterRule(_localctx, 38, RULE_functionReturn); try { - State = 210; + State = 203; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,11,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 204; + State = 197; Match(Return); - State = 205; + State = 198; simpleValue(); - State = 206; + State = 199; Match(SemiColon); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 208; + State = 201; Match(Return); - State = 209; + State = 202; Match(SemiColon); } break; @@ -1886,20 +1864,20 @@ public SimpleValueContext simpleValue() { EnterRule(_localctx, 40, RULE_simpleValue); int _la; try { - State = 217; + State = 210; ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { case ShortName: EnterOuterAlt(_localctx, 1); { - State = 212; + State = 205; _localctx.id = fullName(); - State = 214; + State = 207; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==Asterisk) { { - State = 213; + State = 206; _localctx.pointer = Match(Asterisk); } } @@ -1911,7 +1889,7 @@ public SimpleValueContext simpleValue() { case Number: EnterOuterAlt(_localctx, 2); { - State = 216; + State = 209; _localctx.raw = rawValue(); } break; @@ -1967,20 +1945,20 @@ public ComplexValueContext complexValue() { ComplexValueContext _localctx = new ComplexValueContext(Context, State); EnterRule(_localctx, 42, RULE_complexValue); try { - State = 221; + State = 214; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 219; + State = 212; _localctx.op = operation(); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 220; + State = 213; _localctx.func = functionCall(); } break; @@ -2032,7 +2010,7 @@ public RawValueContext rawValue() { try { EnterOuterAlt(_localctx, 1); { - State = 223; + State = 216; _la = TokenStream.LA(1); if ( !(((_la) & ~0x3f) == 0 && ((1L << _la) & 4398046707712L) != 0) ) { ErrorHandler.RecoverInline(this); @@ -2095,11 +2073,11 @@ public OperationContext operation() { try { EnterOuterAlt(_localctx, 1); { - State = 225; + State = 218; _localctx.leftValue = simpleValue(); - State = 226; + State = 219; _localctx.@operator = Match(Operator); - State = 227; + State = 220; _localctx.rightValue = simpleValue(); } } @@ -2114,6 +2092,62 @@ public OperationContext operation() { return _localctx; } + public partial class ParameterContext : ParserRuleContext { + public SimpleValueContext size; + public FullNameContext name; + [System.Diagnostics.DebuggerNonUserCode] public SimpleValueContext simpleValue() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { + return GetRuleContext(0); + } + public ParameterContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_parameter; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.EnterParameter(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.ExitParameter(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; + if (typedVisitor != null) return typedVisitor.VisitParameter(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ParameterContext parameter() { + ParameterContext _localctx = new ParameterContext(Context, State); + EnterRule(_localctx, 48, RULE_parameter); + try { + EnterOuterAlt(_localctx, 1); + { + State = 222; + _localctx.size = simpleValue(); + State = 223; + _localctx.name = fullName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + public partial class ParameterListContext : ParserRuleContext { [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpenBracket() { return GetToken(CrimsonParser.OpenBracket, 0); } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CloseBracket() { return GetToken(CrimsonParser.CloseBracket, 0); } @@ -2153,45 +2187,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 = 242; + State = 238; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,16,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 229; + State = 225; Match(OpenBracket); - State = 230; + State = 226; Match(CloseBracket); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 231; + State = 227; Match(OpenBracket); - State = 232; + State = 228; parameter(); - State = 237; + State = 233; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==Comma) { { { - State = 233; + State = 229; Match(Comma); - State = 234; + State = 230; parameter(); } } - State = 239; + State = 235; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 240; + State = 236; Match(CloseBracket); } break; @@ -2208,62 +2242,6 @@ public ParameterListContext parameterList() { return _localctx; } - public partial class ParameterContext : ParserRuleContext { - public TypeContext t; - public FullNameContext name; - [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { - return GetRuleContext(0); - } - public ParameterContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_parameter; } } - [System.Diagnostics.DebuggerNonUserCode] - public override void EnterRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterParameter(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override void ExitRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitParameter(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitParameter(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ParameterContext parameter() { - ParameterContext _localctx = new ParameterContext(Context, State); - EnterRule(_localctx, 50, RULE_parameter); - try { - EnterOuterAlt(_localctx, 1); - { - State = 244; - _localctx.t = type(); - State = 245; - _localctx.name = fullName(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - public partial class StructureDeclarationContext : ParserRuleContext { public FullNameContext name; public StructureBodyContext body; @@ -2304,11 +2282,11 @@ public StructureDeclarationContext structureDeclaration() { try { EnterOuterAlt(_localctx, 1); { - State = 247; + State = 240; Match(Structure); - State = 248; + State = 241; _localctx.name = fullName(); - State = 249; + State = 242; _localctx.body = structureBody(); } } @@ -2363,23 +2341,23 @@ public StructureBodyContext structureBody() { try { EnterOuterAlt(_localctx, 1); { - State = 251; + State = 244; Match(OpenBrace); - State = 255; + State = 248; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - while (((_la) & ~0x3f) == 0 && ((1L << _la) & 17592723030016L) != 0) { + while (_la==ShortName) { { { - State = 252; + State = 245; internalVariableDeclaration(); } } - State = 257; + State = 250; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 258; + State = 251; Match(CloseBrace); } } @@ -2394,103 +2372,11 @@ public StructureBodyContext structureBody() { return _localctx; } - public partial class TypeContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Integer() { return GetToken(CrimsonParser.Integer, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Boolean() { return GetToken(CrimsonParser.Boolean, 0); } - [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ArrayContext array() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Null() { return GetToken(CrimsonParser.Null, 0); } - public TypeContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_type; } } - [System.Diagnostics.DebuggerNonUserCode] - public override void EnterRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterType(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override void ExitRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitType(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitType(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public TypeContext type() { - TypeContext _localctx = new TypeContext(Context, State); - EnterRule(_localctx, 56, RULE_type); - try { - State = 265; - ErrorHandler.Sync(this); - switch (TokenStream.LA(1)) { - case Integer: - EnterOuterAlt(_localctx, 1); - { - State = 260; - Match(Integer); - } - break; - case Boolean: - EnterOuterAlt(_localctx, 2); - { - State = 261; - Match(Boolean); - } - break; - case ShortName: - EnterOuterAlt(_localctx, 3); - { - State = 262; - fullName(); - } - break; - case OpenSquare: - EnterOuterAlt(_localctx, 4); - { - State = 263; - array(); - } - break; - case Null: - EnterOuterAlt(_localctx, 5); - { - State = 264; - Match(Null); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - public partial class ArrayContext : ParserRuleContext { + public IToken blockSize; [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpenSquare() { return GetToken(CrimsonParser.OpenSquare, 0); } - [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() { - return GetRuleContext(0); - } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CloseSquare() { return GetToken(CrimsonParser.CloseSquare, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Number() { return GetToken(CrimsonParser.Number, 0); } public ArrayContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { @@ -2517,15 +2403,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, 56, RULE_array); try { EnterOuterAlt(_localctx, 1); { - State = 267; + State = 253; Match(OpenSquare); - State = 268; - type(); - State = 269; + State = 254; + _localctx.blockSize = Match(Number); + State = 255; Match(CloseSquare); } } @@ -2574,23 +2460,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, 58, RULE_fullName); try { EnterOuterAlt(_localctx, 1); { - State = 273; + State = 259; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,19,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,18,Context) ) { case 1: { - State = 271; + State = 257; _localctx.libraryName = Match(ShortName); - State = 272; + State = 258; Match(Dot); } break; } - State = 275; + State = 261; _localctx.memberName = Match(ShortName); } } @@ -2606,92 +2492,87 @@ public FullNameContext fullName() { } private static int[] _serializedATN = { - 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, + 4,1,44,264,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,16,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,184,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,32,16, - 0,182,183,3,0,0,0,183,31,1,0,0,0,184,185,3,56,28,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 + 2,29,7,29,1,0,1,0,5,0,63,8,0,10,0,12,0,66,9,0,1,0,5,0,69,8,0,10,0,12,0, + 72,9,0,1,0,5,0,75,8,0,10,0,12,0,78,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,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,109,8,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,3,4,118,8,4,1,4, + 1,4,1,5,1,5,1,5,1,5,3,5,126,8,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,134,8,5,1, + 5,1,5,3,5,138,8,5,1,6,1,6,1,6,1,6,1,6,3,6,145,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,16,1,16,1, + 16,1,17,1,17,1,17,1,18,1,18,3,18,187,8,18,1,18,1,18,5,18,191,8,18,10,18, + 12,18,194,9,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,3,19,204,8,19,1, + 20,1,20,3,20,208,8,20,1,20,3,20,211,8,20,1,21,1,21,3,21,215,8,21,1,22, + 1,22,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25, + 5,25,232,8,25,10,25,12,25,235,9,25,1,25,1,25,3,25,239,8,25,1,26,1,26,1, + 26,1,26,1,27,1,27,5,27,247,8,27,10,27,12,27,250,9,27,1,27,1,27,1,28,1, + 28,1,28,1,28,1,29,1,29,3,29,260,8,29,1,29,1,29,1,29,0,0,30,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, + 0,1,2,0,16,17,42,42,262,0,60,1,0,0,0,2,81,1,0,0,0,4,88,1,0,0,0,6,108,1, + 0,0,0,8,110,1,0,0,0,10,137,1,0,0,0,12,139,1,0,0,0,14,146,1,0,0,0,16,150, + 1,0,0,0,18,154,1,0,0,0,20,157,1,0,0,0,22,160,1,0,0,0,24,164,1,0,0,0,26, + 168,1,0,0,0,28,171,1,0,0,0,30,174,1,0,0,0,32,178,1,0,0,0,34,181,1,0,0, + 0,36,184,1,0,0,0,38,203,1,0,0,0,40,210,1,0,0,0,42,214,1,0,0,0,44,216,1, + 0,0,0,46,218,1,0,0,0,48,222,1,0,0,0,50,238,1,0,0,0,52,240,1,0,0,0,54,244, + 1,0,0,0,56,253,1,0,0,0,58,259,1,0,0,0,60,64,5,31,0,0,61,63,3,2,1,0,62, + 61,1,0,0,0,63,66,1,0,0,0,64,62,1,0,0,0,64,65,1,0,0,0,65,70,1,0,0,0,66, + 64,1,0,0,0,67,69,3,4,2,0,68,67,1,0,0,0,69,72,1,0,0,0,70,68,1,0,0,0,70, + 71,1,0,0,0,71,76,1,0,0,0,72,70,1,0,0,0,73,75,3,6,3,0,74,73,1,0,0,0,75, + 78,1,0,0,0,76,74,1,0,0,0,76,77,1,0,0,0,77,79,1,0,0,0,78,76,1,0,0,0,79, + 80,5,32,0,0,80,1,1,0,0,0,81,82,5,37,0,0,82,83,5,7,0,0,83,84,5,43,0,0,84, + 85,5,9,0,0,85,86,3,58,29,0,86,87,5,35,0,0,87,3,1,0,0,0,88,89,5,37,0,0, + 89,90,5,8,0,0,90,91,5,18,0,0,91,92,5,22,0,0,92,93,3,58,29,0,93,94,5,35, + 0,0,94,5,1,0,0,0,95,109,3,8,4,0,96,109,3,38,19,0,97,109,3,10,5,0,98,99, + 3,34,17,0,99,100,5,35,0,0,100,109,1,0,0,0,101,109,3,12,6,0,102,109,3,14, + 7,0,103,109,3,22,11,0,104,109,3,24,12,0,105,109,3,26,13,0,106,109,3,30, + 15,0,107,109,3,52,26,0,108,95,1,0,0,0,108,96,1,0,0,0,108,97,1,0,0,0,108, + 98,1,0,0,0,108,101,1,0,0,0,108,102,1,0,0,0,108,103,1,0,0,0,108,104,1,0, + 0,0,108,105,1,0,0,0,108,106,1,0,0,0,108,107,1,0,0,0,109,7,1,0,0,0,110, + 111,3,58,29,0,111,112,5,27,0,0,112,113,3,40,20,0,113,114,5,28,0,0,114, + 117,5,25,0,0,115,118,3,42,21,0,116,118,3,40,20,0,117,115,1,0,0,0,117,116, + 1,0,0,0,118,119,1,0,0,0,119,120,5,35,0,0,120,9,1,0,0,0,121,122,3,58,29, + 0,122,125,5,25,0,0,123,126,3,42,21,0,124,126,3,40,20,0,125,123,1,0,0,0, + 125,124,1,0,0,0,126,127,1,0,0,0,127,128,5,35,0,0,128,138,1,0,0,0,129,130, + 3,58,29,0,130,133,5,26,0,0,131,134,3,42,21,0,132,134,3,40,20,0,133,131, + 1,0,0,0,133,132,1,0,0,0,134,135,1,0,0,0,135,136,5,35,0,0,136,138,1,0,0, + 0,137,121,1,0,0,0,137,129,1,0,0,0,138,11,1,0,0,0,139,140,5,10,0,0,140, + 141,3,16,8,0,141,144,3,0,0,0,142,145,3,20,10,0,143,145,3,18,9,0,144,142, + 1,0,0,0,144,143,1,0,0,0,144,145,1,0,0,0,145,13,1,0,0,0,146,147,5,11,0, + 0,147,148,3,16,8,0,148,149,3,0,0,0,149,15,1,0,0,0,150,151,5,27,0,0,151, + 152,3,46,23,0,152,153,5,28,0,0,153,17,1,0,0,0,154,155,5,12,0,0,155,156, + 3,12,6,0,156,19,1,0,0,0,157,158,5,12,0,0,158,159,3,0,0,0,159,21,1,0,0, + 0,160,161,5,23,0,0,161,162,5,43,0,0,162,163,5,35,0,0,163,23,1,0,0,0,164, + 165,5,24,0,0,165,166,5,43,0,0,166,167,5,35,0,0,167,25,1,0,0,0,168,169, + 5,3,0,0,169,170,3,8,4,0,170,27,1,0,0,0,171,172,5,4,0,0,172,173,3,8,4,0, + 173,29,1,0,0,0,174,175,5,2,0,0,175,176,3,32,16,0,176,177,3,0,0,0,177,31, + 1,0,0,0,178,179,3,58,29,0,179,180,3,50,25,0,180,33,1,0,0,0,181,182,3,58, + 29,0,182,183,3,36,18,0,183,35,1,0,0,0,184,186,5,27,0,0,185,187,3,40,20, + 0,186,185,1,0,0,0,186,187,1,0,0,0,187,192,1,0,0,0,188,189,5,33,0,0,189, + 191,3,40,20,0,190,188,1,0,0,0,191,194,1,0,0,0,192,190,1,0,0,0,192,193, + 1,0,0,0,193,195,1,0,0,0,194,192,1,0,0,0,195,196,5,28,0,0,196,37,1,0,0, + 0,197,198,5,5,0,0,198,199,3,40,20,0,199,200,5,35,0,0,200,204,1,0,0,0,201, + 202,5,5,0,0,202,204,5,35,0,0,203,197,1,0,0,0,203,201,1,0,0,0,204,39,1, + 0,0,0,205,207,3,58,29,0,206,208,5,19,0,0,207,206,1,0,0,0,207,208,1,0,0, + 0,208,211,1,0,0,0,209,211,3,44,22,0,210,205,1,0,0,0,210,209,1,0,0,0,211, + 41,1,0,0,0,212,215,3,46,23,0,213,215,3,34,17,0,214,212,1,0,0,0,214,213, + 1,0,0,0,215,43,1,0,0,0,216,217,7,0,0,0,217,45,1,0,0,0,218,219,3,40,20, + 0,219,220,5,18,0,0,220,221,3,40,20,0,221,47,1,0,0,0,222,223,3,40,20,0, + 223,224,3,58,29,0,224,49,1,0,0,0,225,226,5,27,0,0,226,239,5,28,0,0,227, + 228,5,27,0,0,228,233,3,48,24,0,229,230,5,33,0,0,230,232,3,48,24,0,231, + 229,1,0,0,0,232,235,1,0,0,0,233,231,1,0,0,0,233,234,1,0,0,0,234,236,1, + 0,0,0,235,233,1,0,0,0,236,237,5,28,0,0,237,239,1,0,0,0,238,225,1,0,0,0, + 238,227,1,0,0,0,239,51,1,0,0,0,240,241,5,6,0,0,241,242,3,58,29,0,242,243, + 3,54,27,0,243,53,1,0,0,0,244,248,5,31,0,0,245,247,3,8,4,0,246,245,1,0, + 0,0,247,250,1,0,0,0,248,246,1,0,0,0,248,249,1,0,0,0,249,251,1,0,0,0,250, + 248,1,0,0,0,251,252,5,32,0,0,252,55,1,0,0,0,253,254,5,29,0,0,254,255,5, + 42,0,0,255,256,5,30,0,0,256,57,1,0,0,0,257,258,5,44,0,0,258,260,5,34,0, + 0,259,257,1,0,0,0,259,260,1,0,0,0,260,261,1,0,0,0,261,262,5,44,0,0,262, + 59,1,0,0,0,19,64,70,76,108,117,125,133,137,144,186,192,203,207,210,214, + 233,238,248,259 }; public static readonly ATN _ATN = diff --git a/Crimson/Antlr/Output/CrimsonVisitor.cs b/Crimson/Antlr/Output/CrimsonVisitor.cs index b9e4718..dd6d069 100644 --- a/Crimson/Antlr/Output/CrimsonVisitor.cs +++ b/Crimson/Antlr/Output/CrimsonVisitor.cs @@ -256,17 +256,17 @@ public interface ICrimsonVisitor : IParseTreeVisitor { /// The visitor result. Result VisitOperation([NotNull] CrimsonParser.OperationContext context); /// - /// Visit a parse tree produced by . + /// Visit a parse tree produced by . /// /// The parse tree. /// The visitor result. - Result VisitParameterList([NotNull] CrimsonParser.ParameterListContext context); + Result VisitParameter([NotNull] CrimsonParser.ParameterContext context); /// - /// Visit a parse tree produced by . + /// Visit a parse tree produced by . /// /// The parse tree. /// The visitor result. - Result VisitParameter([NotNull] CrimsonParser.ParameterContext context); + Result VisitParameterList([NotNull] CrimsonParser.ParameterListContext context); /// /// Visit a parse tree produced by . /// @@ -280,12 +280,6 @@ public interface ICrimsonVisitor : IParseTreeVisitor { /// The visitor result. Result VisitStructureBody([NotNull] CrimsonParser.StructureBodyContext context); /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitType([NotNull] CrimsonParser.TypeContext context); - /// /// Visit a parse tree produced by . /// /// The parse tree. diff --git a/Crimson/CSharp/Core/ScopeVisitor.cs b/Crimson/CSharp/Core/ScopeVisitor.cs index afa0b2a..b458a9a 100644 --- a/Crimson/CSharp/Core/ScopeVisitor.cs +++ b/Crimson/CSharp/Core/ScopeVisitor.cs @@ -122,11 +122,9 @@ private AbstractCrimsonStatement ParseStatement (CrimsonParser.StatementContext public override OperationHandlerCStatement VisitOperationHandler ([NotNull] CrimsonParser.OperationHandlerContext context) { - CrimsonTypeCToken type1 = VisitType(context.t1); OperationResolvableValueCToken.OperationType opType = OperationResolvableValueCToken.ParseOpType(context.op.Text); - CrimsonTypeCToken type2 = VisitType(context.t2); FullNameCToken id = VisitFullName(context.identifier); - OperationHandlerCStatement ohsc = new OperationHandlerCStatement(type1, opType, type2, id); + OperationHandlerCStatement ohsc = new OperationHandlerCStatement(opType, id); return ohsc; } @@ -134,12 +132,11 @@ public override OperationHandlerCStatement VisitOperationHandler ([NotNull] Crim public override GlobalVariableCStatement VisitGlobalVariableDeclaration ([NotNull] CrimsonParser.GlobalVariableDeclarationContext context) { CrimsonParser.InternalVariableDeclarationContext ivdc = context.internalVariableDeclaration(); - CrimsonTypeCToken type = VisitType(ivdc.type()); FullNameCToken identifier = VisitFullName(ivdc.fullName()); SimpleValueCToken? simple; ComplexValueCToken? complex; - if (ivdc.simple != null) return new GlobalVariableCStatement(type, identifier, VisitSimpleValue(ivdc.simple)); - else if (ivdc.complex != null) return new GlobalVariableCStatement(type, identifier, VisitComplexValue(ivdc.complex)); + if (ivdc.simple != null) return new GlobalVariableCStatement(identifier, VisitSimpleValue(ivdc.simple)); + else if (ivdc.complex != null) return new GlobalVariableCStatement(identifier, VisitComplexValue(ivdc.complex)); else throw new CrimsonParserException("Cannot parse GlobalVariableDeclarationContext with value " + ivdc.GetText()); } @@ -153,10 +150,9 @@ public override FunctionCStatement VisitFunctionDeclaration ([NotNull] CrimsonPa public override FunctionCStatement.Header VisitFunctionHeader ([NotNull] CrimsonParser.FunctionHeaderContext context) { - CrimsonTypeCToken returnType = VisitType(context.returnType); FullNameCToken identifier = VisitFullName(context.name); List parameters = VisitParameterList(context.parameters); - return new FunctionCStatement.Header(returnType, identifier, parameters); + return new FunctionCStatement.Header(identifier, parameters); } public override StructureCStatement VisitStructureDeclaration ([NotNull] CrimsonParser.StructureDeclarationContext context) @@ -195,20 +191,14 @@ public VariableAssignmentCStatement ParseAssignVariable ([NotNull] CrimsonParser } } - public override CrimsonTypeCToken VisitType ([NotNull] CrimsonParser.TypeContext context) - { - FullNameCToken name = new FullNameCToken(context.GetText()); - return CrimsonTypeCToken.Parse(name); - } - public override List VisitParameterList ([NotNull] CrimsonParser.ParameterListContext context) { List parameters = new List(); - foreach (CrimsonParser.ParameterContext paCxt in context.parameter()) + foreach (CrimsonParser.ParameterContext paCtx in context.parameter()) { - CrimsonTypeCToken type = VisitType(paCxt.type()); - FullNameCToken identifier = VisitFullName(paCxt.name); - FunctionCStatement.Parameter parameter = new FunctionCStatement.Parameter(type, identifier); + FullNameCToken identifier = VisitFullName(paCtx.fullName()); + SimpleValueCToken size = VisitSimpleValue(paCtx.size); + FunctionCStatement.Parameter parameter = new FunctionCStatement.Parameter(size, identifier); parameters.Add(parameter); } return parameters; @@ -220,12 +210,12 @@ public override CrimsonTypeCToken VisitType ([NotNull] CrimsonParser.TypeContext public override InternalVariableCStatement VisitInternalVariableDeclaration ([NotNull] CrimsonParser.InternalVariableDeclarationContext context) { - CrimsonTypeCToken type = VisitType(context.type()); FullNameCToken identifier = VisitFullName(context.fullName()); + SimpleValueCToken size = VisitSimpleValue(context.size); SimpleValueCToken? simple; ComplexValueCToken? complex; - if (context.simple != null) return new InternalVariableCStatement(type, identifier, VisitSimpleValue(context.simple)); - else if (context.complex != null) return new InternalVariableCStatement(type, identifier, VisitComplexValue(context.complex)); + if (context.simple != null) return new InternalVariableCStatement(size, identifier, VisitSimpleValue(context.simple)); + else if (context.complex != null) return new InternalVariableCStatement(size, identifier, VisitComplexValue(context.complex)); else throw new CrimsonParserException("Cannot parse InternalVariableDeclarationContext with value " + context.GetText()); } diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs index d420ea3..a8e36a8 100644 --- a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs @@ -75,38 +75,35 @@ public Scope GetScope () public class Parameter : ICrimsonToken { - public CrimsonTypeCToken Type { get; } + public SimpleValueCToken Size { get; set; } public FullNameCToken Identifier { get; set; } - public Parameter (CrimsonTypeCToken type, FullNameCToken identifier) + public Parameter (SimpleValueCToken size, FullNameCToken identifier) { - Type = type; + Size = size; Identifier = identifier; } void ICrimsonToken.Link (LinkingContext ctx) { - Type.Link(ctx); + Size.Link(ctx); Identifier = LinkerHelper.LinkIdentifier(Identifier, ctx); } } public class Header : ICrimsonToken { - public CrimsonTypeCToken ReturnType { get; set; } public FullNameCToken Identifier { get; set; } public List Parameters { get; protected set; } - public Header (CrimsonTypeCToken returnType, FullNameCToken identifier, List parameters) + public Header (FullNameCToken identifier, List parameters) { - ReturnType = returnType; Identifier = identifier; Parameters = parameters; } void ICrimsonToken.Link (LinkingContext ctx) { - ReturnType.Link(ctx); Identifier = LinkerHelper.LinkIdentifier(Identifier, ctx); foreach (var p in Parameters) { diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs index 8d423e5..73775ad 100644 --- a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs @@ -37,8 +37,8 @@ public override Fragment GetCrimsonBasic () f.Add(new CommentBStatement("FC start")); // Allocate space for input/output - int inputSize = CalculateInputBufferSize(); - int outputSize = CalculateOutputBufferSize(); + //int inputSize = CalculateInputBufferSize(); + //int outputSize = CalculateOutputBufferSize(); // Push inputs onto stack @@ -47,8 +47,8 @@ public override Fragment GetCrimsonBasic () // CPU stack. // Increment stack pointer - int total = inputSize + outputSize; - f.Add(new IncSpBStatement(total)); + //int total = inputSize + outputSize; + //f.Add(new IncSpBStatement(total)); // Jump to subroutine f.Add(new JumpSubBStatement(targetFunction!.Name.ToString())); @@ -57,24 +57,6 @@ public override Fragment GetCrimsonBasic () return f; } - private int CalculateInputBufferSize () - { - int inputSize = 0; - FunctionCStatement.Header header = targetFunction!.FunctionHeader; - foreach (var param in header.Parameters) - { - inputSize += param.Type.GetSize(); - } - return inputSize; - } - - private int CalculateOutputBufferSize () - { - FunctionCStatement.Header header = targetFunction!.FunctionHeader; - int outputSize = header.ReturnType.GetSize(); - return outputSize; - } - public override void Link (LinkingContext ctx) { if (Linked) return; diff --git a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs index c62bb4d..ce7e06a 100644 --- a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs @@ -16,22 +16,19 @@ namespace Crimson.CSharp.Grammar.Statements /// public class GlobalVariableCStatement : AbstractCrimsonStatement, INamed { - private CrimsonTypeCToken type; public FullNameCToken Name { get; protected set; } public ComplexValueCToken? Complex { get; } public SimpleValueCToken? Simple { get; } - public GlobalVariableCStatement (CrimsonTypeCToken type, FullNameCToken identifier, ComplexValueCToken value) + public GlobalVariableCStatement (FullNameCToken identifier, ComplexValueCToken value) { - this.type = type; Name = identifier; Complex = value; } - public GlobalVariableCStatement (CrimsonTypeCToken type, FullNameCToken identifier, SimpleValueCToken value) + public GlobalVariableCStatement (FullNameCToken identifier, SimpleValueCToken value) { - this.type = type; Name = identifier; Simple = value; } @@ -60,13 +57,11 @@ public override Fragment GetCrimsonBasic () { Fragment valueStatements = Complex.GetBasicFragment(); statements.Add(valueStatements); - statements.Add(new IncSpBStatement(type.GetSize())); statements.Add(new SetBStatement(Name.ToString(), -1, valueStatements.ResultHolder!)); } else if (Simple != null) { - statements.Add(new IncSpBStatement(type.GetSize())); 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 55f2416..1c7350d 100644 --- a/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs @@ -3,6 +3,7 @@ using Crimson.CSharp.Grammar.Tokens; using CrimsonBasic.CSharp.Core; using CrimsonBasic.CSharp.Statements; +using System.Drawing; using System.Xml.Linq; using static Crimson.CSharp.Grammar.Tokens.Comparator; @@ -10,35 +11,31 @@ namespace Crimson.CSharp.Grammar.Statements { public class InternalVariableCStatement : AbstractCrimsonStatement { - private CrimsonTypeCToken type; + public SimpleValueCToken Size { get; set; } public FullNameCToken Identifier { get; private set; } public ComplexValueCToken? Complex { get; } public SimpleValueCToken? Simple { get; } - public InternalVariableCStatement (CrimsonTypeCToken type, FullNameCToken identifier, SimpleValueCToken simple) + private InternalVariableCStatement (SimpleValueCToken size, FullNameCToken identifier) { - this.type = type; - this.Identifier = identifier; - Simple = simple; + Size = size; + Identifier = identifier; if (identifier == null) throw new CrimsonParserException("Null identifier"); if (identifier.HasLibrary()) throw new CrimsonParserException($"Identifier {identifier} for internal variable may not contain a library name."); if (!identifier.HasMember()) throw new CrimsonParserException($"Identifier {identifier} for internal variable must have a member name."); - if (type == null) throw new CrimsonParserException($"Null type for variable {identifier}"); + } + + public InternalVariableCStatement (SimpleValueCToken size, FullNameCToken identifier, SimpleValueCToken simple) : this(size, identifier) + { + Simple = simple; if (Simple == null) throw new CrimsonParserException($"Must assign initial (declaration) value to variable {identifier}"); } - public InternalVariableCStatement (CrimsonTypeCToken type, FullNameCToken identifier, ComplexValueCToken complex) + public InternalVariableCStatement (SimpleValueCToken size, FullNameCToken identifier, ComplexValueCToken complex) : this(size, identifier) { - this.type = type; - this.Identifier = identifier; Complex = complex; - - if (identifier == null) throw new CrimsonParserException("Null identifier"); - if (identifier.HasLibrary()) throw new CrimsonParserException($"Identifier {identifier} for internal variable may not contain a library name."); - if (!identifier.HasMember()) throw new CrimsonParserException($"Identifier {identifier} for internal variable must have a member name."); - if (type == null) throw new CrimsonParserException($"Null type for variable {identifier}"); if (Complex == null) throw new CrimsonParserException($"Must assign initial (declaration) value to variable {identifier}"); } @@ -59,13 +56,11 @@ public override Fragment GetCrimsonBasic () { Fragment valueStatements = Complex.GetBasicFragment(); statements.Add(valueStatements); - statements.Add(new IncSpBStatement(type.GetSize())); statements.Add(new SetBStatement(Identifier.ToString(), -1, valueStatements.ResultHolder!)); } else if (Simple != null) { - statements.Add(new IncSpBStatement(type.GetSize())); statements.Add(new SetBStatement(Identifier.ToString(), -1, Simple.GetText())); } else diff --git a/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs b/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs index cbbdab9..b75d724 100644 --- a/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs @@ -6,25 +6,16 @@ namespace Crimson.CSharp.Grammar.Statements { public class OperationHandlerCStatement : AbstractCrimsonStatement { - public CrimsonTypeCToken Type1 { get; protected set; } public OperationResolvableValueCToken.OperationType OpType { get; protected set; } - public CrimsonTypeCToken Type2 { get; protected set; } public FullNameCToken FunctionIdentifier { get; protected set; } public FunctionCStatement? TargetFunction { get; protected set; } - public OperationHandlerCStatement (CrimsonTypeCToken type1, OperationResolvableValueCToken.OperationType opType, CrimsonTypeCToken type2, FullNameCToken identifier) + public OperationHandlerCStatement (OperationResolvableValueCToken.OperationType opType, FullNameCToken identifier) { - Type1 = type1; OpType = opType; - Type2 = type2; FunctionIdentifier = identifier; } - public bool CanApply (CrimsonTypeCToken type1, CrimsonTypeCToken type2) - { - return false; - } - public FunctionCallCStatement Apply (FunctionArgumentCToken arg1, FunctionArgumentCToken arg2) { return null; @@ -32,8 +23,6 @@ public FunctionCallCStatement Apply (FunctionArgumentCToken arg1, FunctionArgume public override void Link (LinkingContext ctx) { - Type1.Link(ctx); - Type2.Link(ctx); TargetFunction = LinkerHelper.LinkFunctionCall(FunctionIdentifier, ctx); } diff --git a/Crimson/CSharp/Grammar/Tokens/CrimsonTypeCToken.cs b/Crimson/CSharp/Grammar/Tokens/CrimsonTypeCToken.cs deleted file mode 100644 index bdda7dd..0000000 --- a/Crimson/CSharp/Grammar/Tokens/CrimsonTypeCToken.cs +++ /dev/null @@ -1,49 +0,0 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Grammar.Statements; -using Crimson.CSharp.Grammar.Types; -using System.Text.RegularExpressions; - -namespace Crimson.CSharp.Grammar.Tokens -{ - public abstract class CrimsonTypeCToken : ICrimsonToken - { - - public FullNameCToken Name { get; private set; } - - public CrimsonTypeCToken (FullNameCToken name) - { - Name = name; - } - - public abstract void Link (LinkingContext ctx); - public abstract int GetSize (); - - public static CrimsonTypeCToken Parse (FullNameCToken name) - { - if (!name.HasMember()) throw new ArgumentNullException($"A name for a type must have a member name but was given {name}"); - - if (name.MemberName.StartsWith('[') && name.MemberName.EndsWith(']')) - { - string inner = name.MemberName.Substring(1, name.MemberName.Length - 2); - CrimsonTypeCToken type = Parse(new FullNameCToken(inner)); - return new ArrayCrimsonType(name, type); - } - - if (GetRawtypeSize(name.MemberName) >= 0) return new RawtypeCrimsonType(name.MemberName); - - return new StructureCrimsonType(name); - } - - internal static int GetRawtypeSize (string name) - { - return name.Trim() switch - { - "int" => Crimson.CSharp.Core.Crimson.Options.DataWidth, - "byte" => 1, - "ptr" => Crimson.CSharp.Core.Crimson.Options.DataWidth, - "null" => 0, - _ => -1, - }; - } - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Tokens/IdentifierSimpleValueCToken.cs b/Crimson/CSharp/Grammar/Tokens/IdentifierSimpleValueCToken.cs index 1ceee15..adf2b17 100644 --- a/Crimson/CSharp/Grammar/Tokens/IdentifierSimpleValueCToken.cs +++ b/Crimson/CSharp/Grammar/Tokens/IdentifierSimpleValueCToken.cs @@ -9,7 +9,7 @@ public class IdentifierSimpleValueCToken : SimpleValueCToken { public FullNameCToken Identifier { get; private set; } - public IdentifierSimpleValueCToken (FullNameCToken identifier) : base(null) // NOT Identifier... need to get type from somewhere else + public IdentifierSimpleValueCToken (FullNameCToken identifier) { Identifier = identifier; } diff --git a/Crimson/CSharp/Grammar/Tokens/ParameterCToken.cs b/Crimson/CSharp/Grammar/Tokens/ParameterCToken.cs index cde964a..633d51d 100644 --- a/Crimson/CSharp/Grammar/Tokens/ParameterCToken.cs +++ b/Crimson/CSharp/Grammar/Tokens/ParameterCToken.cs @@ -2,13 +2,11 @@ { internal class ParameterCToken { - public ParameterCToken(CrimsonTypeCToken type, string identifier) + public ParameterCToken (string identifier) { - Type1 = type; Identifier = identifier; } - public CrimsonTypeCToken Type1 { get; } public string Identifier { get; } TypeCToken Type { get; set; } string Name { get; set; } diff --git a/Crimson/CSharp/Grammar/Tokens/RawResolvableValueCToken.cs b/Crimson/CSharp/Grammar/Tokens/RawResolvableValueCToken.cs index 6740968..10adb00 100644 --- a/Crimson/CSharp/Grammar/Tokens/RawResolvableValueCToken.cs +++ b/Crimson/CSharp/Grammar/Tokens/RawResolvableValueCToken.cs @@ -9,7 +9,7 @@ public class RawResolvableValueCToken : SimpleValueCToken { public string Content { get; } - public RawResolvableValueCToken (string s) : base(CrimsonTypeCToken.Parse(new FullNameCToken(s))) + public RawResolvableValueCToken (string s) { Content = s; } diff --git a/Crimson/CSharp/Grammar/Tokens/SimpleValueCToken.cs b/Crimson/CSharp/Grammar/Tokens/SimpleValueCToken.cs index 46dadaa..958b5bb 100644 --- a/Crimson/CSharp/Grammar/Tokens/SimpleValueCToken.cs +++ b/Crimson/CSharp/Grammar/Tokens/SimpleValueCToken.cs @@ -10,12 +10,8 @@ namespace Crimson.CSharp.Grammar.Tokens { public abstract class SimpleValueCToken : ICrimsonToken { - - public CrimsonTypeCToken Type { get; set; } - - public SimpleValueCToken (CrimsonTypeCToken type) + public SimpleValueCToken () { - Type = type; } public abstract void Link (LinkingContext ctx); public abstract string GetText (); diff --git a/Crimson/CSharp/Grammar/Types/ArrayCrimsonType.cs b/Crimson/CSharp/Grammar/Types/ArrayCrimsonType.cs deleted file mode 100644 index 8624688..0000000 --- a/Crimson/CSharp/Grammar/Types/ArrayCrimsonType.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Grammar.Tokens; - -namespace Crimson.CSharp.Grammar.Types -{ - internal class ArrayCrimsonType : CrimsonTypeCToken - { - private CrimsonTypeCToken type; - - public ArrayCrimsonType (FullNameCToken name, CrimsonTypeCToken type) : base(name) - { - this.type = type; - } - - public override int GetSize () - { - return type.GetSize() * -1000; - } - - public override void Link (LinkingContext ctx) - { - } - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Types/RawtypeCrimsonType.cs b/Crimson/CSharp/Grammar/Types/RawtypeCrimsonType.cs deleted file mode 100644 index 5f47f13..0000000 --- a/Crimson/CSharp/Grammar/Types/RawtypeCrimsonType.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Grammar.Tokens; - -namespace Crimson.CSharp.Grammar.Types -{ - internal class RawtypeCrimsonType : CrimsonTypeCToken - { - public RawtypeCrimsonType (string name) : base(new FullNameCToken(name)) - { - } - - public override int GetSize () - { - return GetRawtypeSize(Name.MemberName); - } - - public override void Link (LinkingContext ctx) - { - // No linking required - } - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Types/StructureCrimsonType.cs b/Crimson/CSharp/Grammar/Types/StructureCrimsonType.cs deleted file mode 100644 index 59b604f..0000000 --- a/Crimson/CSharp/Grammar/Types/StructureCrimsonType.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar.Statements; -using Crimson.CSharp.Grammar.Tokens; - -namespace Crimson.CSharp.Grammar.Types -{ - internal class StructureCrimsonType : CrimsonTypeCToken - { - - public StructureCStatement? Structure { get; set; } - - public StructureCrimsonType (FullNameCToken name) : base(name) - { - } - - public override int GetSize () - { - throw new NotImplementedException(); - } - - public override void Link (LinkingContext ctx) - { - Scope scope; - - if (Name.HasLibrary()) - { - if (!ctx.HasScope(Name.LibraryName!)) - throw new LinkingException($"Error linking type {Name}! " + - $"The given scope alias {Name.LibraryName} could not be found in the current linking context: {ctx}. " + - $"Available scope links: [{String.Join(',', ctx.Links.Select(pair => pair.Key))}]."); - scope = ctx.GetScope(Name.LibraryName!); - } - else - { - scope = ctx.CurrentScope; - } - - Structure = scope.FindStructure(Name.MemberName); - - if (Structure == null) - throw new LinkingException($"Error linking type {Name}! " + - $"The given structure name {Name.MemberName} could not be found in the given scope {Name.LibraryName}: {scope}. " + - $"Available structures: [{String.Join(',', scope.Structures.Select(pair => pair.Value.Name))}]."); - } - } -} \ No newline at end of file From 2b1995b23655a4e0e04f0a877395f3217ad5f0d6 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Mon, 20 Mar 2023 20:55:52 +0000 Subject: [PATCH 022/122] Converted .CRM test code to new syntax --- Crimson/Antlr/Input/Crimson.g4 | 11 +++----- Crimson/Resources/Native Library/console.crm | 2 +- Crimson/Resources/Native Library/fraction.crm | 4 +-- Crimson/Resources/Native Library/heap.crm | 27 ++++++++++--------- Crimson/Resources/Native Library/maths.crm | 6 ++--- .../Test Compilations/logging/log.crm | 6 ++--- Crimson/Resources/Test Compilations/main.crm | 27 ++++++++++--------- .../Test Compilations/utils/utils.crm | 6 ++--- 8 files changed, 46 insertions(+), 43 deletions(-) diff --git a/Crimson/Antlr/Input/Crimson.g4 b/Crimson/Antlr/Input/Crimson.g4 index d27acde..9c5b59f 100644 --- a/Crimson/Antlr/Input/Crimson.g4 +++ b/Crimson/Antlr/Input/Crimson.g4 @@ -15,7 +15,7 @@ operationHandler // Function-only statements statement - : internalVariableDeclaration #VariableDeclarationStatement + : variableDeclaration #VariableDeclarationStatement | functionReturn #ReturnStatement | assignVariable #AssignVariableStatement | functionCall SemiColon #FunctionCallStatement @@ -27,7 +27,7 @@ statement | functionDeclaration #FunctionDeclarationStatement | structureDeclaration #StructureDeclarationStatement ; -internalVariableDeclaration +variableDeclaration : name=fullName OpenBracket size=simpleValue CloseBracket DirectEquals (complex=complexValue | simple=simpleValue) SemiColon ; assignVariable @@ -56,10 +56,7 @@ assemblyCall : AssemblyCall assemblyText=String SemiColon ; globalVariableDeclaration - : Global declaration=internalVariableDeclaration - ; -scopedVariableDeclaration - : Scoped declaration=internalVariableDeclaration + : Global declaration=variableDeclaration ; functionDeclaration : Function header=functionHeader body=scope @@ -110,7 +107,7 @@ structureDeclaration : Structure name=fullName body=structureBody ; structureBody - : OpenBrace internalVariableDeclaration* CloseBrace + : OpenBrace variableDeclaration* CloseBrace ; array : OpenSquare blockSize=Number CloseSquare diff --git a/Crimson/Resources/Native Library/console.crm b/Crimson/Resources/Native Library/console.crm index 04751d2..b9eddb6 100644 --- a/Crimson/Resources/Native Library/console.crm +++ b/Crimson/Resources/Native Library/console.crm @@ -1,5 +1,5 @@ { - function null write (int i) { + function write (i(int_size)) { } } \ No newline at end of file diff --git a/Crimson/Resources/Native Library/fraction.crm b/Crimson/Resources/Native Library/fraction.crm index 9381fd3..e0739f8 100644 --- a/Crimson/Resources/Native Library/fraction.crm +++ b/Crimson/Resources/Native Library/fraction.crm @@ -1,6 +1,6 @@ { structure Fraction { - int numerator; - int denominator; + numerator(int_size); + denominator(int_size); } } \ No newline at end of file diff --git a/Crimson/Resources/Native Library/heap.crm b/Crimson/Resources/Native Library/heap.crm index 940edb0..fe85887 100644 --- a/Crimson/Resources/Native Library/heap.crm +++ b/Crimson/Resources/Native Library/heap.crm @@ -38,20 +38,23 @@ global int regions_i = 0; global int regions_length = 0; global int regions_region = 0; + + int_size(1) = 4; + ptr_size(1) = 4; // // Return a pointer to a block of memory which is at least of the given size. // - function int alloc (int size) + function alloc (size(int_size)) { - int i = 0; + i(int_size) = 0; while (i < regions_length) { // Replace with regions[i] if ( regions_i == 0 ) // Region i is empty { regions_i = 1; - int region_ptr = 0; + region_ptr(ptr_size) = 0; region_ptr = get_region_ptr(r); return region_ptr; } @@ -65,12 +68,12 @@ // This is given by the result of the calculation: // HeapOffset + exponential_offset + r*RegionMetaSize; // - function int get_region_ptr (int r) + function get_region_ptr (r(int_size)) { // Need to calculate this before r changes later on - int RRMS = r * RegionMetaSize; + RRMS(int_size) = r * RegionMetaSize; - int exponential_offset = 4; + exponential_offset(int_size) = 4; // R<0 is not permitted if (r < 0) { @@ -95,15 +98,15 @@ } // Calculate final pointer value as in described equation - int HO_EXP = HeapOffset + exponential_offset; - int HO_EXP_RRMS = HO_EXP + RRMS; + HO_EXP(int_size) = HeapOffset + exponential_offset; + HO_EXP_RRMS(ptr_size) = HO_EXP + RRMS; return HO_EXP_RRMS; } - function null freeptr (int pointer) + function freeptr (pointer(ptr_size)) { - int r = 0; - int region_ptr = get_region_ptr(r); + r(int_size) = 0; + region_ptr(ptr_size) = get_region_ptr(r); while ( pointer < region_ptr ) { r = r + 1; @@ -112,7 +115,7 @@ freeregion(r); } - function null freeregion (int region) + function freeregion (region(int_size)) { // Replace with regions[region] regions_region = 0; diff --git a/Crimson/Resources/Native Library/maths.crm b/Crimson/Resources/Native Library/maths.crm index 466bc23..dd97945 100644 --- a/Crimson/Resources/Native Library/maths.crm +++ b/Crimson/Resources/Native Library/maths.crm @@ -1,9 +1,9 @@ { - function int pwr (int number, int exponent) { + function pwr (number(int_size), exponent(int_size)) { while (exponent > 0) { - number = number * number; - exponent = exponent - 1; + number(int_size) = number * number; + exponent(int_size) = exponent - 1; } } } \ No newline at end of file diff --git a/Crimson/Resources/Test Compilations/logging/log.crm b/Crimson/Resources/Test Compilations/logging/log.crm index d6da2e0..a5359d3 100644 --- a/Crimson/Resources/Test Compilations/logging/log.crm +++ b/Crimson/Resources/Test Compilations/logging/log.crm @@ -2,13 +2,13 @@ #using "${NATIVE}/console.crm" as utils_stdout // Utility package - function [int] multiply (int num1, int num2) { + function multiply (num1(int_size), num2(int_size)) { utils_stdout.write(6); return num1; } - function ptr times (int num1, int num2) { - int ret = multiply(num1, num2); + function times (num1(int_size), num2(int_size)) { + ret(int_size) = multiply(num1, num2); return ret; } } \ No newline at end of file diff --git a/Crimson/Resources/Test Compilations/main.crm b/Crimson/Resources/Test Compilations/main.crm index 8200812..52d311a 100644 --- a/Crimson/Resources/Test Compilations/main.crm +++ b/Crimson/Resources/Test Compilations/main.crm @@ -9,22 +9,25 @@ // Declare ophandlers: // - #ophandler (int * int) -> {utils.multiply}; + #ophandler * -> utils.multiply; - global int counter = 0; + global counter(4) = 0; + + global int_size(1) = 4; + global ptr_size(1) = 4; - function ptr main () { + function main () { B~ "example basic call"; A~ "example assemby call"; - int a = utils.multiply(8); - int b = utils.times(); + a(int_size) = utils.multiply(8); + b(int_size) = utils.times(); if (true == true) { counter = 5; } else if (b == true) { - int c = utils.times(5, 3); - int d = heap.alloc(); + c(int_size) = utils.times(5, 3); + d(ptr_size) = heap.alloc(); } else { return b; } @@ -32,7 +35,7 @@ call(4, 7, 5); // Allocate memory on the heap for 'i' and get a pointer to it - ptr i = heap.alloc(4); + i(ptr_size) = heap.alloc(4); // Set memory at pointer 'i' i *= 4; @@ -40,17 +43,17 @@ // Note usage of functions from imported packages stdout.write(i); - ptr ret = heap.alloc(4); + ret(ptr_size) = heap.alloc(4); ret *= utils.multiply(i, 5); return ret; } - function ptr call () { - ptr test = heap.alloc(69); + function call () { + test(int_size) = heap.alloc(69); return test; } structure Person { - ptr age = heap.alloc(5); + age(ptr_size) = heap.alloc(5); } } \ No newline at end of file diff --git a/Crimson/Resources/Test Compilations/utils/utils.crm b/Crimson/Resources/Test Compilations/utils/utils.crm index 7612546..3019ce1 100644 --- a/Crimson/Resources/Test Compilations/utils/utils.crm +++ b/Crimson/Resources/Test Compilations/utils/utils.crm @@ -2,13 +2,13 @@ #using "${NATIVE}/console.crm" as utils_stdout // Utility package - function [int] multiply ( int num1, int num2 ) { + function multiply (num1(int_size), num2(int_size)) { utils_stdout.write(6); return num1; } - function ptr times ( int num1, int num2 ) { - int ret = multiply(num1, num2); + function times (num1(int_size), num2(int_size) ) { + ret(4) = multiply(num1, num2); return ret; } } \ No newline at end of file From cbc0a4d6e1d6174a8f62c50dd709c76ce321325b Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Mon, 20 Mar 2023 21:03:48 +0000 Subject: [PATCH 023/122] Alright, state reset. Let's get going! > Corrected missing brackets and wrong name type in grammar parameter rule > Corrected syntax errors in heap.crm and utils.crm --- Crimson/Antlr/Input/Crimson.g4 | 2 +- Crimson/Antlr/Output/Crimson.interp | 5 +- Crimson/Antlr/Output/CrimsonBaseListener.cs | 20 +- Crimson/Antlr/Output/CrimsonBaseVisitor.cs | 14 +- Crimson/Antlr/Output/CrimsonListener.cs | 18 +- Crimson/Antlr/Output/CrimsonParser.cs | 600 ++++++++---------- Crimson/Antlr/Output/CrimsonVisitor.cs | 10 +- Crimson/CSharp/Core/ScopeVisitor.cs | 14 +- Crimson/Resources/Native Library/heap.crm | 8 +- .../Test Compilations/result/main.cba | 29 +- .../Test Compilations/utils/utils.crm | 2 +- 11 files changed, 307 insertions(+), 415 deletions(-) diff --git a/Crimson/Antlr/Input/Crimson.g4 b/Crimson/Antlr/Input/Crimson.g4 index 9c5b59f..3676afe 100644 --- a/Crimson/Antlr/Input/Crimson.g4 +++ b/Crimson/Antlr/Input/Crimson.g4 @@ -95,7 +95,7 @@ operation // Parameters parameter - : size=simpleValue name=fullName + : size=simpleValue OpenBracket name=ShortName CloseBracket ; parameterList : OpenBracket CloseBracket diff --git a/Crimson/Antlr/Output/Crimson.interp b/Crimson/Antlr/Output/Crimson.interp index c34c057..6aff309 100644 --- a/Crimson/Antlr/Output/Crimson.interp +++ b/Crimson/Antlr/Output/Crimson.interp @@ -97,7 +97,7 @@ scope importUnit operationHandler statement -internalVariableDeclaration +variableDeclaration assignVariable ifBlock whileBlock @@ -107,7 +107,6 @@ elseBlock basicCall assemblyCall globalVariableDeclaration -scopedVariableDeclaration functionDeclaration functionHeader functionCall @@ -126,4 +125,4 @@ fullName atn: -[4, 1, 44, 264, 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, 1, 0, 1, 0, 5, 0, 63, 8, 0, 10, 0, 12, 0, 66, 9, 0, 1, 0, 5, 0, 69, 8, 0, 10, 0, 12, 0, 72, 9, 0, 1, 0, 5, 0, 75, 8, 0, 10, 0, 12, 0, 78, 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, 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, 109, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 118, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 126, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 134, 8, 5, 1, 5, 1, 5, 3, 5, 138, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 145, 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, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 3, 18, 187, 8, 18, 1, 18, 1, 18, 5, 18, 191, 8, 18, 10, 18, 12, 18, 194, 9, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 204, 8, 19, 1, 20, 1, 20, 3, 20, 208, 8, 20, 1, 20, 3, 20, 211, 8, 20, 1, 21, 1, 21, 3, 21, 215, 8, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 232, 8, 25, 10, 25, 12, 25, 235, 9, 25, 1, 25, 1, 25, 3, 25, 239, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 5, 27, 247, 8, 27, 10, 27, 12, 27, 250, 9, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 3, 29, 260, 8, 29, 1, 29, 1, 29, 1, 29, 0, 0, 30, 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, 0, 1, 2, 0, 16, 17, 42, 42, 262, 0, 60, 1, 0, 0, 0, 2, 81, 1, 0, 0, 0, 4, 88, 1, 0, 0, 0, 6, 108, 1, 0, 0, 0, 8, 110, 1, 0, 0, 0, 10, 137, 1, 0, 0, 0, 12, 139, 1, 0, 0, 0, 14, 146, 1, 0, 0, 0, 16, 150, 1, 0, 0, 0, 18, 154, 1, 0, 0, 0, 20, 157, 1, 0, 0, 0, 22, 160, 1, 0, 0, 0, 24, 164, 1, 0, 0, 0, 26, 168, 1, 0, 0, 0, 28, 171, 1, 0, 0, 0, 30, 174, 1, 0, 0, 0, 32, 178, 1, 0, 0, 0, 34, 181, 1, 0, 0, 0, 36, 184, 1, 0, 0, 0, 38, 203, 1, 0, 0, 0, 40, 210, 1, 0, 0, 0, 42, 214, 1, 0, 0, 0, 44, 216, 1, 0, 0, 0, 46, 218, 1, 0, 0, 0, 48, 222, 1, 0, 0, 0, 50, 238, 1, 0, 0, 0, 52, 240, 1, 0, 0, 0, 54, 244, 1, 0, 0, 0, 56, 253, 1, 0, 0, 0, 58, 259, 1, 0, 0, 0, 60, 64, 5, 31, 0, 0, 61, 63, 3, 2, 1, 0, 62, 61, 1, 0, 0, 0, 63, 66, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 64, 65, 1, 0, 0, 0, 65, 70, 1, 0, 0, 0, 66, 64, 1, 0, 0, 0, 67, 69, 3, 4, 2, 0, 68, 67, 1, 0, 0, 0, 69, 72, 1, 0, 0, 0, 70, 68, 1, 0, 0, 0, 70, 71, 1, 0, 0, 0, 71, 76, 1, 0, 0, 0, 72, 70, 1, 0, 0, 0, 73, 75, 3, 6, 3, 0, 74, 73, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 79, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 80, 5, 32, 0, 0, 80, 1, 1, 0, 0, 0, 81, 82, 5, 37, 0, 0, 82, 83, 5, 7, 0, 0, 83, 84, 5, 43, 0, 0, 84, 85, 5, 9, 0, 0, 85, 86, 3, 58, 29, 0, 86, 87, 5, 35, 0, 0, 87, 3, 1, 0, 0, 0, 88, 89, 5, 37, 0, 0, 89, 90, 5, 8, 0, 0, 90, 91, 5, 18, 0, 0, 91, 92, 5, 22, 0, 0, 92, 93, 3, 58, 29, 0, 93, 94, 5, 35, 0, 0, 94, 5, 1, 0, 0, 0, 95, 109, 3, 8, 4, 0, 96, 109, 3, 38, 19, 0, 97, 109, 3, 10, 5, 0, 98, 99, 3, 34, 17, 0, 99, 100, 5, 35, 0, 0, 100, 109, 1, 0, 0, 0, 101, 109, 3, 12, 6, 0, 102, 109, 3, 14, 7, 0, 103, 109, 3, 22, 11, 0, 104, 109, 3, 24, 12, 0, 105, 109, 3, 26, 13, 0, 106, 109, 3, 30, 15, 0, 107, 109, 3, 52, 26, 0, 108, 95, 1, 0, 0, 0, 108, 96, 1, 0, 0, 0, 108, 97, 1, 0, 0, 0, 108, 98, 1, 0, 0, 0, 108, 101, 1, 0, 0, 0, 108, 102, 1, 0, 0, 0, 108, 103, 1, 0, 0, 0, 108, 104, 1, 0, 0, 0, 108, 105, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 107, 1, 0, 0, 0, 109, 7, 1, 0, 0, 0, 110, 111, 3, 58, 29, 0, 111, 112, 5, 27, 0, 0, 112, 113, 3, 40, 20, 0, 113, 114, 5, 28, 0, 0, 114, 117, 5, 25, 0, 0, 115, 118, 3, 42, 21, 0, 116, 118, 3, 40, 20, 0, 117, 115, 1, 0, 0, 0, 117, 116, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 5, 35, 0, 0, 120, 9, 1, 0, 0, 0, 121, 122, 3, 58, 29, 0, 122, 125, 5, 25, 0, 0, 123, 126, 3, 42, 21, 0, 124, 126, 3, 40, 20, 0, 125, 123, 1, 0, 0, 0, 125, 124, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 128, 5, 35, 0, 0, 128, 138, 1, 0, 0, 0, 129, 130, 3, 58, 29, 0, 130, 133, 5, 26, 0, 0, 131, 134, 3, 42, 21, 0, 132, 134, 3, 40, 20, 0, 133, 131, 1, 0, 0, 0, 133, 132, 1, 0, 0, 0, 134, 135, 1, 0, 0, 0, 135, 136, 5, 35, 0, 0, 136, 138, 1, 0, 0, 0, 137, 121, 1, 0, 0, 0, 137, 129, 1, 0, 0, 0, 138, 11, 1, 0, 0, 0, 139, 140, 5, 10, 0, 0, 140, 141, 3, 16, 8, 0, 141, 144, 3, 0, 0, 0, 142, 145, 3, 20, 10, 0, 143, 145, 3, 18, 9, 0, 144, 142, 1, 0, 0, 0, 144, 143, 1, 0, 0, 0, 144, 145, 1, 0, 0, 0, 145, 13, 1, 0, 0, 0, 146, 147, 5, 11, 0, 0, 147, 148, 3, 16, 8, 0, 148, 149, 3, 0, 0, 0, 149, 15, 1, 0, 0, 0, 150, 151, 5, 27, 0, 0, 151, 152, 3, 46, 23, 0, 152, 153, 5, 28, 0, 0, 153, 17, 1, 0, 0, 0, 154, 155, 5, 12, 0, 0, 155, 156, 3, 12, 6, 0, 156, 19, 1, 0, 0, 0, 157, 158, 5, 12, 0, 0, 158, 159, 3, 0, 0, 0, 159, 21, 1, 0, 0, 0, 160, 161, 5, 23, 0, 0, 161, 162, 5, 43, 0, 0, 162, 163, 5, 35, 0, 0, 163, 23, 1, 0, 0, 0, 164, 165, 5, 24, 0, 0, 165, 166, 5, 43, 0, 0, 166, 167, 5, 35, 0, 0, 167, 25, 1, 0, 0, 0, 168, 169, 5, 3, 0, 0, 169, 170, 3, 8, 4, 0, 170, 27, 1, 0, 0, 0, 171, 172, 5, 4, 0, 0, 172, 173, 3, 8, 4, 0, 173, 29, 1, 0, 0, 0, 174, 175, 5, 2, 0, 0, 175, 176, 3, 32, 16, 0, 176, 177, 3, 0, 0, 0, 177, 31, 1, 0, 0, 0, 178, 179, 3, 58, 29, 0, 179, 180, 3, 50, 25, 0, 180, 33, 1, 0, 0, 0, 181, 182, 3, 58, 29, 0, 182, 183, 3, 36, 18, 0, 183, 35, 1, 0, 0, 0, 184, 186, 5, 27, 0, 0, 185, 187, 3, 40, 20, 0, 186, 185, 1, 0, 0, 0, 186, 187, 1, 0, 0, 0, 187, 192, 1, 0, 0, 0, 188, 189, 5, 33, 0, 0, 189, 191, 3, 40, 20, 0, 190, 188, 1, 0, 0, 0, 191, 194, 1, 0, 0, 0, 192, 190, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 195, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 195, 196, 5, 28, 0, 0, 196, 37, 1, 0, 0, 0, 197, 198, 5, 5, 0, 0, 198, 199, 3, 40, 20, 0, 199, 200, 5, 35, 0, 0, 200, 204, 1, 0, 0, 0, 201, 202, 5, 5, 0, 0, 202, 204, 5, 35, 0, 0, 203, 197, 1, 0, 0, 0, 203, 201, 1, 0, 0, 0, 204, 39, 1, 0, 0, 0, 205, 207, 3, 58, 29, 0, 206, 208, 5, 19, 0, 0, 207, 206, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 211, 1, 0, 0, 0, 209, 211, 3, 44, 22, 0, 210, 205, 1, 0, 0, 0, 210, 209, 1, 0, 0, 0, 211, 41, 1, 0, 0, 0, 212, 215, 3, 46, 23, 0, 213, 215, 3, 34, 17, 0, 214, 212, 1, 0, 0, 0, 214, 213, 1, 0, 0, 0, 215, 43, 1, 0, 0, 0, 216, 217, 7, 0, 0, 0, 217, 45, 1, 0, 0, 0, 218, 219, 3, 40, 20, 0, 219, 220, 5, 18, 0, 0, 220, 221, 3, 40, 20, 0, 221, 47, 1, 0, 0, 0, 222, 223, 3, 40, 20, 0, 223, 224, 3, 58, 29, 0, 224, 49, 1, 0, 0, 0, 225, 226, 5, 27, 0, 0, 226, 239, 5, 28, 0, 0, 227, 228, 5, 27, 0, 0, 228, 233, 3, 48, 24, 0, 229, 230, 5, 33, 0, 0, 230, 232, 3, 48, 24, 0, 231, 229, 1, 0, 0, 0, 232, 235, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 236, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 236, 237, 5, 28, 0, 0, 237, 239, 1, 0, 0, 0, 238, 225, 1, 0, 0, 0, 238, 227, 1, 0, 0, 0, 239, 51, 1, 0, 0, 0, 240, 241, 5, 6, 0, 0, 241, 242, 3, 58, 29, 0, 242, 243, 3, 54, 27, 0, 243, 53, 1, 0, 0, 0, 244, 248, 5, 31, 0, 0, 245, 247, 3, 8, 4, 0, 246, 245, 1, 0, 0, 0, 247, 250, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 251, 1, 0, 0, 0, 250, 248, 1, 0, 0, 0, 251, 252, 5, 32, 0, 0, 252, 55, 1, 0, 0, 0, 253, 254, 5, 29, 0, 0, 254, 255, 5, 42, 0, 0, 255, 256, 5, 30, 0, 0, 256, 57, 1, 0, 0, 0, 257, 258, 5, 44, 0, 0, 258, 260, 5, 34, 0, 0, 259, 257, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 261, 1, 0, 0, 0, 261, 262, 5, 44, 0, 0, 262, 59, 1, 0, 0, 0, 19, 64, 70, 76, 108, 117, 125, 133, 137, 144, 186, 192, 203, 207, 210, 214, 233, 238, 248, 259] \ No newline at end of file +[4, 1, 44, 261, 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, 1, 0, 1, 0, 5, 0, 61, 8, 0, 10, 0, 12, 0, 64, 9, 0, 1, 0, 5, 0, 67, 8, 0, 10, 0, 12, 0, 70, 9, 0, 1, 0, 5, 0, 73, 8, 0, 10, 0, 12, 0, 76, 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, 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, 107, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 116, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 124, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 132, 8, 5, 1, 5, 1, 5, 3, 5, 136, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 143, 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, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 3, 17, 182, 8, 17, 1, 17, 1, 17, 5, 17, 186, 8, 17, 10, 17, 12, 17, 189, 9, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 199, 8, 18, 1, 19, 1, 19, 3, 19, 203, 8, 19, 1, 19, 3, 19, 206, 8, 19, 1, 20, 1, 20, 3, 20, 210, 8, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 229, 8, 24, 10, 24, 12, 24, 232, 9, 24, 1, 24, 1, 24, 3, 24, 236, 8, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 5, 26, 244, 8, 26, 10, 26, 12, 26, 247, 9, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 3, 28, 257, 8, 28, 1, 28, 1, 28, 1, 28, 0, 0, 29, 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, 0, 1, 2, 0, 16, 17, 42, 42, 260, 0, 58, 1, 0, 0, 0, 2, 79, 1, 0, 0, 0, 4, 86, 1, 0, 0, 0, 6, 106, 1, 0, 0, 0, 8, 108, 1, 0, 0, 0, 10, 135, 1, 0, 0, 0, 12, 137, 1, 0, 0, 0, 14, 144, 1, 0, 0, 0, 16, 148, 1, 0, 0, 0, 18, 152, 1, 0, 0, 0, 20, 155, 1, 0, 0, 0, 22, 158, 1, 0, 0, 0, 24, 162, 1, 0, 0, 0, 26, 166, 1, 0, 0, 0, 28, 169, 1, 0, 0, 0, 30, 173, 1, 0, 0, 0, 32, 176, 1, 0, 0, 0, 34, 179, 1, 0, 0, 0, 36, 198, 1, 0, 0, 0, 38, 205, 1, 0, 0, 0, 40, 209, 1, 0, 0, 0, 42, 211, 1, 0, 0, 0, 44, 213, 1, 0, 0, 0, 46, 217, 1, 0, 0, 0, 48, 235, 1, 0, 0, 0, 50, 237, 1, 0, 0, 0, 52, 241, 1, 0, 0, 0, 54, 250, 1, 0, 0, 0, 56, 256, 1, 0, 0, 0, 58, 62, 5, 31, 0, 0, 59, 61, 3, 2, 1, 0, 60, 59, 1, 0, 0, 0, 61, 64, 1, 0, 0, 0, 62, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 68, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 65, 67, 3, 4, 2, 0, 66, 65, 1, 0, 0, 0, 67, 70, 1, 0, 0, 0, 68, 66, 1, 0, 0, 0, 68, 69, 1, 0, 0, 0, 69, 74, 1, 0, 0, 0, 70, 68, 1, 0, 0, 0, 71, 73, 3, 6, 3, 0, 72, 71, 1, 0, 0, 0, 73, 76, 1, 0, 0, 0, 74, 72, 1, 0, 0, 0, 74, 75, 1, 0, 0, 0, 75, 77, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 77, 78, 5, 32, 0, 0, 78, 1, 1, 0, 0, 0, 79, 80, 5, 37, 0, 0, 80, 81, 5, 7, 0, 0, 81, 82, 5, 43, 0, 0, 82, 83, 5, 9, 0, 0, 83, 84, 3, 56, 28, 0, 84, 85, 5, 35, 0, 0, 85, 3, 1, 0, 0, 0, 86, 87, 5, 37, 0, 0, 87, 88, 5, 8, 0, 0, 88, 89, 5, 18, 0, 0, 89, 90, 5, 22, 0, 0, 90, 91, 3, 56, 28, 0, 91, 92, 5, 35, 0, 0, 92, 5, 1, 0, 0, 0, 93, 107, 3, 8, 4, 0, 94, 107, 3, 36, 18, 0, 95, 107, 3, 10, 5, 0, 96, 97, 3, 32, 16, 0, 97, 98, 5, 35, 0, 0, 98, 107, 1, 0, 0, 0, 99, 107, 3, 12, 6, 0, 100, 107, 3, 14, 7, 0, 101, 107, 3, 22, 11, 0, 102, 107, 3, 24, 12, 0, 103, 107, 3, 26, 13, 0, 104, 107, 3, 28, 14, 0, 105, 107, 3, 50, 25, 0, 106, 93, 1, 0, 0, 0, 106, 94, 1, 0, 0, 0, 106, 95, 1, 0, 0, 0, 106, 96, 1, 0, 0, 0, 106, 99, 1, 0, 0, 0, 106, 100, 1, 0, 0, 0, 106, 101, 1, 0, 0, 0, 106, 102, 1, 0, 0, 0, 106, 103, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 106, 105, 1, 0, 0, 0, 107, 7, 1, 0, 0, 0, 108, 109, 3, 56, 28, 0, 109, 110, 5, 27, 0, 0, 110, 111, 3, 38, 19, 0, 111, 112, 5, 28, 0, 0, 112, 115, 5, 25, 0, 0, 113, 116, 3, 40, 20, 0, 114, 116, 3, 38, 19, 0, 115, 113, 1, 0, 0, 0, 115, 114, 1, 0, 0, 0, 116, 117, 1, 0, 0, 0, 117, 118, 5, 35, 0, 0, 118, 9, 1, 0, 0, 0, 119, 120, 3, 56, 28, 0, 120, 123, 5, 25, 0, 0, 121, 124, 3, 40, 20, 0, 122, 124, 3, 38, 19, 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, 136, 1, 0, 0, 0, 127, 128, 3, 56, 28, 0, 128, 131, 5, 26, 0, 0, 129, 132, 3, 40, 20, 0, 130, 132, 3, 38, 19, 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, 136, 1, 0, 0, 0, 135, 119, 1, 0, 0, 0, 135, 127, 1, 0, 0, 0, 136, 11, 1, 0, 0, 0, 137, 138, 5, 10, 0, 0, 138, 139, 3, 16, 8, 0, 139, 142, 3, 0, 0, 0, 140, 143, 3, 20, 10, 0, 141, 143, 3, 18, 9, 0, 142, 140, 1, 0, 0, 0, 142, 141, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 13, 1, 0, 0, 0, 144, 145, 5, 11, 0, 0, 145, 146, 3, 16, 8, 0, 146, 147, 3, 0, 0, 0, 147, 15, 1, 0, 0, 0, 148, 149, 5, 27, 0, 0, 149, 150, 3, 44, 22, 0, 150, 151, 5, 28, 0, 0, 151, 17, 1, 0, 0, 0, 152, 153, 5, 12, 0, 0, 153, 154, 3, 12, 6, 0, 154, 19, 1, 0, 0, 0, 155, 156, 5, 12, 0, 0, 156, 157, 3, 0, 0, 0, 157, 21, 1, 0, 0, 0, 158, 159, 5, 23, 0, 0, 159, 160, 5, 43, 0, 0, 160, 161, 5, 35, 0, 0, 161, 23, 1, 0, 0, 0, 162, 163, 5, 24, 0, 0, 163, 164, 5, 43, 0, 0, 164, 165, 5, 35, 0, 0, 165, 25, 1, 0, 0, 0, 166, 167, 5, 3, 0, 0, 167, 168, 3, 8, 4, 0, 168, 27, 1, 0, 0, 0, 169, 170, 5, 2, 0, 0, 170, 171, 3, 30, 15, 0, 171, 172, 3, 0, 0, 0, 172, 29, 1, 0, 0, 0, 173, 174, 3, 56, 28, 0, 174, 175, 3, 48, 24, 0, 175, 31, 1, 0, 0, 0, 176, 177, 3, 56, 28, 0, 177, 178, 3, 34, 17, 0, 178, 33, 1, 0, 0, 0, 179, 181, 5, 27, 0, 0, 180, 182, 3, 38, 19, 0, 181, 180, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 187, 1, 0, 0, 0, 183, 184, 5, 33, 0, 0, 184, 186, 3, 38, 19, 0, 185, 183, 1, 0, 0, 0, 186, 189, 1, 0, 0, 0, 187, 185, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 190, 1, 0, 0, 0, 189, 187, 1, 0, 0, 0, 190, 191, 5, 28, 0, 0, 191, 35, 1, 0, 0, 0, 192, 193, 5, 5, 0, 0, 193, 194, 3, 38, 19, 0, 194, 195, 5, 35, 0, 0, 195, 199, 1, 0, 0, 0, 196, 197, 5, 5, 0, 0, 197, 199, 5, 35, 0, 0, 198, 192, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 37, 1, 0, 0, 0, 200, 202, 3, 56, 28, 0, 201, 203, 5, 19, 0, 0, 202, 201, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 206, 1, 0, 0, 0, 204, 206, 3, 42, 21, 0, 205, 200, 1, 0, 0, 0, 205, 204, 1, 0, 0, 0, 206, 39, 1, 0, 0, 0, 207, 210, 3, 44, 22, 0, 208, 210, 3, 32, 16, 0, 209, 207, 1, 0, 0, 0, 209, 208, 1, 0, 0, 0, 210, 41, 1, 0, 0, 0, 211, 212, 7, 0, 0, 0, 212, 43, 1, 0, 0, 0, 213, 214, 3, 38, 19, 0, 214, 215, 5, 18, 0, 0, 215, 216, 3, 38, 19, 0, 216, 45, 1, 0, 0, 0, 217, 218, 3, 38, 19, 0, 218, 219, 5, 27, 0, 0, 219, 220, 5, 44, 0, 0, 220, 221, 5, 28, 0, 0, 221, 47, 1, 0, 0, 0, 222, 223, 5, 27, 0, 0, 223, 236, 5, 28, 0, 0, 224, 225, 5, 27, 0, 0, 225, 230, 3, 46, 23, 0, 226, 227, 5, 33, 0, 0, 227, 229, 3, 46, 23, 0, 228, 226, 1, 0, 0, 0, 229, 232, 1, 0, 0, 0, 230, 228, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 233, 1, 0, 0, 0, 232, 230, 1, 0, 0, 0, 233, 234, 5, 28, 0, 0, 234, 236, 1, 0, 0, 0, 235, 222, 1, 0, 0, 0, 235, 224, 1, 0, 0, 0, 236, 49, 1, 0, 0, 0, 237, 238, 5, 6, 0, 0, 238, 239, 3, 56, 28, 0, 239, 240, 3, 52, 26, 0, 240, 51, 1, 0, 0, 0, 241, 245, 5, 31, 0, 0, 242, 244, 3, 8, 4, 0, 243, 242, 1, 0, 0, 0, 244, 247, 1, 0, 0, 0, 245, 243, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 248, 1, 0, 0, 0, 247, 245, 1, 0, 0, 0, 248, 249, 5, 32, 0, 0, 249, 53, 1, 0, 0, 0, 250, 251, 5, 29, 0, 0, 251, 252, 5, 42, 0, 0, 252, 253, 5, 30, 0, 0, 253, 55, 1, 0, 0, 0, 254, 255, 5, 44, 0, 0, 255, 257, 5, 34, 0, 0, 256, 254, 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 259, 5, 44, 0, 0, 259, 57, 1, 0, 0, 0, 19, 62, 68, 74, 106, 115, 123, 131, 135, 142, 181, 187, 198, 202, 205, 209, 230, 235, 245, 256] \ No newline at end of file diff --git a/Crimson/Antlr/Output/CrimsonBaseListener.cs b/Crimson/Antlr/Output/CrimsonBaseListener.cs index 7b1226a..ffbc8f3 100644 --- a/Crimson/Antlr/Output/CrimsonBaseListener.cs +++ b/Crimson/Antlr/Output/CrimsonBaseListener.cs @@ -227,17 +227,17 @@ public virtual void EnterStructureDeclarationStatement([NotNull] CrimsonParser.S /// The parse tree. public virtual void ExitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context) { } /// - /// Enter a parse tree produced by . + /// Enter a parse tree produced by . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterInternalVariableDeclaration([NotNull] CrimsonParser.InternalVariableDeclarationContext context) { } + public virtual void EnterVariableDeclaration([NotNull] CrimsonParser.VariableDeclarationContext context) { } /// - /// Exit a parse tree produced by . + /// Exit a parse tree produced by . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitInternalVariableDeclaration([NotNull] CrimsonParser.InternalVariableDeclarationContext context) { } + public virtual void ExitVariableDeclaration([NotNull] CrimsonParser.VariableDeclarationContext context) { } /// /// Enter a parse tree produced by the AssignVariableDirect /// labeled alternative in . @@ -363,18 +363,6 @@ public virtual void EnterGlobalVariableDeclaration([NotNull] CrimsonParser.Globa /// 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. /// diff --git a/Crimson/Antlr/Output/CrimsonBaseVisitor.cs b/Crimson/Antlr/Output/CrimsonBaseVisitor.cs index c65da9f..431cc0f 100644 --- a/Crimson/Antlr/Output/CrimsonBaseVisitor.cs +++ b/Crimson/Antlr/Output/CrimsonBaseVisitor.cs @@ -187,7 +187,7 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitorThe visitor result. public virtual Result VisitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext 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 . @@ -195,7 +195,7 @@ 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 VisitVariableDeclaration([NotNull] CrimsonParser.VariableDeclarationContext context) { return VisitChildren(context); } /// /// Visit a parse tree produced by the AssignVariableDirect /// labeled alternative in . @@ -299,16 +299,6 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitorThe visitor result. public virtual Result VisitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext 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 VisitScopedVariableDeclaration([NotNull] CrimsonParser.ScopedVariableDeclarationContext context) { return VisitChildren(context); } - /// /// Visit a parse tree produced by . /// /// The default implementation returns the result of calling diff --git a/Crimson/Antlr/Output/CrimsonListener.cs b/Crimson/Antlr/Output/CrimsonListener.cs index c027c70..76c96bd 100644 --- a/Crimson/Antlr/Output/CrimsonListener.cs +++ b/Crimson/Antlr/Output/CrimsonListener.cs @@ -194,15 +194,15 @@ public interface ICrimsonListener : IParseTreeListener { /// The parse tree. void ExitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context); /// - /// Enter a parse tree produced by . + /// Enter a parse tree produced by . /// /// The parse tree. - void EnterInternalVariableDeclaration([NotNull] CrimsonParser.InternalVariableDeclarationContext context); + void EnterVariableDeclaration([NotNull] CrimsonParser.VariableDeclarationContext context); /// - /// Exit a parse tree produced by . + /// Exit a parse tree produced by . /// /// The parse tree. - void ExitInternalVariableDeclaration([NotNull] CrimsonParser.InternalVariableDeclarationContext context); + void ExitVariableDeclaration([NotNull] CrimsonParser.VariableDeclarationContext context); /// /// Enter a parse tree produced by the AssignVariableDirect /// labeled alternative in . @@ -308,16 +308,6 @@ public interface ICrimsonListener : IParseTreeListener { /// 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. diff --git a/Crimson/Antlr/Output/CrimsonParser.cs b/Crimson/Antlr/Output/CrimsonParser.cs index 74de60a..7660f9e 100644 --- a/Crimson/Antlr/Output/CrimsonParser.cs +++ b/Crimson/Antlr/Output/CrimsonParser.cs @@ -47,22 +47,22 @@ public const int Number=42, String=43, ShortName=44; public const int RULE_scope = 0, RULE_importUnit = 1, RULE_operationHandler = 2, RULE_statement = 3, - RULE_internalVariableDeclaration = 4, RULE_assignVariable = 5, RULE_ifBlock = 6, + RULE_variableDeclaration = 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_parameter = 24, RULE_parameterList = 25, RULE_structureDeclaration = 26, - RULE_structureBody = 27, RULE_array = 28, RULE_fullName = 29; + RULE_functionDeclaration = 14, RULE_functionHeader = 15, RULE_functionCall = 16, + RULE_arguments = 17, RULE_functionReturn = 18, RULE_simpleValue = 19, + RULE_complexValue = 20, RULE_rawValue = 21, RULE_operation = 22, RULE_parameter = 23, + RULE_parameterList = 24, RULE_structureDeclaration = 25, RULE_structureBody = 26, + RULE_array = 27, RULE_fullName = 28; public static readonly string[] ruleNames = { - "scope", "importUnit", "operationHandler", "statement", "internalVariableDeclaration", + "scope", "importUnit", "operationHandler", "statement", "variableDeclaration", "assignVariable", "ifBlock", "whileBlock", "condition", "elseIfBlock", "elseBlock", "basicCall", "assemblyCall", "globalVariableDeclaration", - "scopedVariableDeclaration", "functionDeclaration", "functionHeader", - "functionCall", "arguments", "functionReturn", "simpleValue", "complexValue", - "rawValue", "operation", "parameter", "parameterList", "structureDeclaration", - "structureBody", "array", "fullName" + "functionDeclaration", "functionHeader", "functionCall", "arguments", + "functionReturn", "simpleValue", "complexValue", "rawValue", "operation", + "parameter", "parameterList", "structureDeclaration", "structureBody", + "array", "fullName" }; private static readonly string[] _LiteralNames = { @@ -173,56 +173,56 @@ public ScopeContext scope() { int _alt; EnterOuterAlt(_localctx, 1); { - State = 60; + State = 58; Match(OpenBrace); - State = 64; + State = 62; 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 = 61; + State = 59; _localctx._importUnit = importUnit(); _localctx._imports.Add(_localctx._importUnit); } } } - State = 66; + State = 64; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,0,Context); } - State = 70; + State = 68; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==Hashtag) { { { - State = 67; + State = 65; _localctx._operationHandler = operationHandler(); _localctx._opHandlers.Add(_localctx._operationHandler); } } - State = 72; + State = 70; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 76; + State = 74; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (((_la) & ~0x3f) == 0 && ((1L << _la) & 17592211213420L) != 0) { { { - State = 73; + State = 71; _localctx._statement = statement(); _localctx._statements.Add(_localctx._statement); } } - State = 78; + State = 76; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 79; + State = 77; Match(CloseBrace); } } @@ -278,17 +278,17 @@ public ImportUnitContext importUnit() { try { EnterOuterAlt(_localctx, 1); { - State = 81; + State = 79; Match(Hashtag); - State = 82; + State = 80; Match(Using); - State = 83; + State = 81; _localctx.path = Match(String); - State = 84; + State = 82; Match(As); - State = 85; + State = 83; _localctx.identifier = fullName(); - State = 86; + State = 84; Match(SemiColon); } } @@ -344,17 +344,17 @@ public OperationHandlerContext operationHandler() { try { EnterOuterAlt(_localctx, 1); { - State = 88; + State = 86; Match(Hashtag); - State = 89; + State = 87; Match(OpHandler); - State = 90; + State = 88; _localctx.op = Match(Operator); - State = 91; + State = 89; Match(RightArrow); - State = 92; + State = 90; _localctx.identifier = fullName(); - State = 93; + State = 91; Match(SemiColon); } } @@ -537,8 +537,8 @@ public override TResult Accept(IParseTreeVisitor visitor) { } } public partial class VariableDeclarationStatementContext : StatementContext { - [System.Diagnostics.DebuggerNonUserCode] public InternalVariableDeclarationContext internalVariableDeclaration() { - return GetRuleContext(0); + [System.Diagnostics.DebuggerNonUserCode] public VariableDeclarationContext variableDeclaration() { + return GetRuleContext(0); } public VariableDeclarationStatementContext(StatementContext context) { CopyFrom(context); } [System.Diagnostics.DebuggerNonUserCode] @@ -630,22 +630,22 @@ public StatementContext statement() { StatementContext _localctx = new StatementContext(Context, State); EnterRule(_localctx, 6, RULE_statement); try { - State = 108; + State = 106; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,3,Context) ) { case 1: _localctx = new VariableDeclarationStatementContext(_localctx); EnterOuterAlt(_localctx, 1); { - State = 95; - internalVariableDeclaration(); + State = 93; + variableDeclaration(); } break; case 2: _localctx = new ReturnStatementContext(_localctx); EnterOuterAlt(_localctx, 2); { - State = 96; + State = 94; functionReturn(); } break; @@ -653,7 +653,7 @@ public StatementContext statement() { _localctx = new AssignVariableStatementContext(_localctx); EnterOuterAlt(_localctx, 3); { - State = 97; + State = 95; assignVariable(); } break; @@ -661,9 +661,9 @@ public StatementContext statement() { _localctx = new FunctionCallStatementContext(_localctx); EnterOuterAlt(_localctx, 4); { - State = 98; + State = 96; functionCall(); - State = 99; + State = 97; Match(SemiColon); } break; @@ -671,7 +671,7 @@ public StatementContext statement() { _localctx = new IfStatementContext(_localctx); EnterOuterAlt(_localctx, 5); { - State = 101; + State = 99; ifBlock(); } break; @@ -679,7 +679,7 @@ public StatementContext statement() { _localctx = new WhileStatementContext(_localctx); EnterOuterAlt(_localctx, 6); { - State = 102; + State = 100; whileBlock(); } break; @@ -687,7 +687,7 @@ public StatementContext statement() { _localctx = new BasicCallStatementContext(_localctx); EnterOuterAlt(_localctx, 7); { - State = 103; + State = 101; basicCall(); } break; @@ -695,7 +695,7 @@ public StatementContext statement() { _localctx = new AssemblyCallStatementContext(_localctx); EnterOuterAlt(_localctx, 8); { - State = 104; + State = 102; assemblyCall(); } break; @@ -703,7 +703,7 @@ public StatementContext statement() { _localctx = new GlobalVariableStatementContext(_localctx); EnterOuterAlt(_localctx, 9); { - State = 105; + State = 103; globalVariableDeclaration(); } break; @@ -711,7 +711,7 @@ public StatementContext statement() { _localctx = new FunctionDeclarationStatementContext(_localctx); EnterOuterAlt(_localctx, 10); { - State = 106; + State = 104; functionDeclaration(); } break; @@ -719,7 +719,7 @@ public StatementContext statement() { _localctx = new StructureDeclarationStatementContext(_localctx); EnterOuterAlt(_localctx, 11); { - State = 107; + State = 105; structureDeclaration(); } break; @@ -736,7 +736,7 @@ public StatementContext statement() { return _localctx; } - public partial class InternalVariableDeclarationContext : ParserRuleContext { + public partial class VariableDeclarationContext : ParserRuleContext { public FullNameContext name; public SimpleValueContext size; public ComplexValueContext complex; @@ -757,63 +757,63 @@ [System.Diagnostics.DebuggerNonUserCode] public SimpleValueContext simpleValue(i [System.Diagnostics.DebuggerNonUserCode] public ComplexValueContext complexValue() { return GetRuleContext(0); } - public InternalVariableDeclarationContext(ParserRuleContext parent, int invokingState) + public VariableDeclarationContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { } - public override int RuleIndex { get { return RULE_internalVariableDeclaration; } } + public override int RuleIndex { get { return RULE_variableDeclaration; } } [System.Diagnostics.DebuggerNonUserCode] public override void EnterRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterInternalVariableDeclaration(this); + if (typedListener != null) typedListener.EnterVariableDeclaration(this); } [System.Diagnostics.DebuggerNonUserCode] public override void ExitRule(IParseTreeListener listener) { ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitInternalVariableDeclaration(this); + if (typedListener != null) typedListener.ExitVariableDeclaration(this); } [System.Diagnostics.DebuggerNonUserCode] public override TResult Accept(IParseTreeVisitor visitor) { ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitInternalVariableDeclaration(this); + if (typedVisitor != null) return typedVisitor.VisitVariableDeclaration(this); else return visitor.VisitChildren(this); } } [RuleVersion(0)] - public InternalVariableDeclarationContext internalVariableDeclaration() { - InternalVariableDeclarationContext _localctx = new InternalVariableDeclarationContext(Context, State); - EnterRule(_localctx, 8, RULE_internalVariableDeclaration); + public VariableDeclarationContext variableDeclaration() { + VariableDeclarationContext _localctx = new VariableDeclarationContext(Context, State); + EnterRule(_localctx, 8, RULE_variableDeclaration); try { EnterOuterAlt(_localctx, 1); { - State = 110; + State = 108; _localctx.name = fullName(); - State = 111; + State = 109; Match(OpenBracket); - State = 112; + State = 110; _localctx.size = simpleValue(); - State = 113; + State = 111; Match(CloseBracket); - State = 114; + State = 112; Match(DirectEquals); - State = 117; + State = 115; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,4,Context) ) { case 1: { - State = 115; + State = 113; _localctx.complex = complexValue(); } break; case 2: { - State = 116; + State = 114; _localctx.simple = simpleValue(); } break; } - State = 119; + State = 117; Match(SemiColon); } } @@ -912,34 +912,34 @@ public AssignVariableContext assignVariable() { AssignVariableContext _localctx = new AssignVariableContext(Context, State); EnterRule(_localctx, 10, RULE_assignVariable); try { - State = 137; + State = 135; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,7,Context) ) { case 1: _localctx = new AssignVariableDirectContext(_localctx); EnterOuterAlt(_localctx, 1); { - State = 121; + State = 119; ((AssignVariableDirectContext)_localctx).name = fullName(); - State = 122; + State = 120; Match(DirectEquals); - State = 125; + State = 123; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,5,Context) ) { case 1: { - State = 123; + State = 121; ((AssignVariableDirectContext)_localctx).complex = complexValue(); } break; case 2: { - State = 124; + State = 122; ((AssignVariableDirectContext)_localctx).simple = simpleValue(); } break; } - State = 127; + State = 125; Match(SemiColon); } break; @@ -947,27 +947,27 @@ public AssignVariableContext assignVariable() { _localctx = new AssignVariableAtPointerContext(_localctx); EnterOuterAlt(_localctx, 2); { - State = 129; + State = 127; ((AssignVariableAtPointerContext)_localctx).name = fullName(); - State = 130; + State = 128; Match(PointerEquals); - State = 133; + State = 131; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,6,Context) ) { case 1: { - State = 131; + State = 129; ((AssignVariableAtPointerContext)_localctx).complex = complexValue(); } break; case 2: { - State = 132; + State = 130; ((AssignVariableAtPointerContext)_localctx).simple = simpleValue(); } break; } - State = 135; + State = 133; Match(SemiColon); } break; @@ -1028,24 +1028,24 @@ public IfBlockContext ifBlock() { try { EnterOuterAlt(_localctx, 1); { - State = 139; + State = 137; Match(If); - State = 140; + State = 138; condition(); - State = 141; + State = 139; scope(); - State = 144; + State = 142; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,8,Context) ) { case 1: { - State = 142; + State = 140; elseBlock(); } break; case 2: { - State = 143; + State = 141; elseIfBlock(); } break; @@ -1101,11 +1101,11 @@ public WhileBlockContext whileBlock() { try { EnterOuterAlt(_localctx, 1); { - State = 146; + State = 144; Match(While); - State = 147; + State = 145; condition(); - State = 148; + State = 146; scope(); } } @@ -1157,11 +1157,11 @@ public ConditionContext condition() { try { EnterOuterAlt(_localctx, 1); { - State = 150; + State = 148; Match(OpenBracket); - State = 151; + State = 149; _localctx.op = operation(); - State = 152; + State = 150; Match(CloseBracket); } } @@ -1211,9 +1211,9 @@ public ElseIfBlockContext elseIfBlock() { try { EnterOuterAlt(_localctx, 1); { - State = 154; + State = 152; Match(Else); - State = 155; + State = 153; ifBlock(); } } @@ -1263,9 +1263,9 @@ public ElseBlockContext elseBlock() { try { EnterOuterAlt(_localctx, 1); { - State = 157; + State = 155; Match(Else); - State = 158; + State = 156; scope(); } } @@ -1315,11 +1315,11 @@ public BasicCallContext basicCall() { try { EnterOuterAlt(_localctx, 1); { - State = 160; + State = 158; Match(BasicCall); - State = 161; + State = 159; _localctx.basicText = Match(String); - State = 162; + State = 160; Match(SemiColon); } } @@ -1369,11 +1369,11 @@ public AssemblyCallContext assemblyCall() { try { EnterOuterAlt(_localctx, 1); { - State = 164; + State = 162; Match(AssemblyCall); - State = 165; + State = 163; _localctx.assemblyText = Match(String); - State = 166; + State = 164; Match(SemiColon); } } @@ -1389,10 +1389,10 @@ public AssemblyCallContext assemblyCall() { } public partial class GlobalVariableDeclarationContext : ParserRuleContext { - public InternalVariableDeclarationContext declaration; + public VariableDeclarationContext declaration; [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Global() { return GetToken(CrimsonParser.Global, 0); } - [System.Diagnostics.DebuggerNonUserCode] public InternalVariableDeclarationContext internalVariableDeclaration() { - return GetRuleContext(0); + [System.Diagnostics.DebuggerNonUserCode] public VariableDeclarationContext variableDeclaration() { + return GetRuleContext(0); } public GlobalVariableDeclarationContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) @@ -1424,63 +1424,10 @@ public GlobalVariableDeclarationContext globalVariableDeclaration() { try { EnterOuterAlt(_localctx, 1); { - State = 168; + State = 166; Match(Global); - State = 169; - _localctx.declaration = internalVariableDeclaration(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - - public partial class ScopedVariableDeclarationContext : ParserRuleContext { - public InternalVariableDeclarationContext declaration; - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Scoped() { return GetToken(CrimsonParser.Scoped, 0); } - [System.Diagnostics.DebuggerNonUserCode] public InternalVariableDeclarationContext internalVariableDeclaration() { - return GetRuleContext(0); - } - public ScopedVariableDeclarationContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_scopedVariableDeclaration; } } - [System.Diagnostics.DebuggerNonUserCode] - public override void EnterRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterScopedVariableDeclaration(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override void ExitRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitScopedVariableDeclaration(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitScopedVariableDeclaration(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public ScopedVariableDeclarationContext scopedVariableDeclaration() { - ScopedVariableDeclarationContext _localctx = new ScopedVariableDeclarationContext(Context, State); - EnterRule(_localctx, 28, RULE_scopedVariableDeclaration); - try { - EnterOuterAlt(_localctx, 1); - { - State = 171; - Match(Scoped); - State = 172; - _localctx.declaration = internalVariableDeclaration(); + State = 167; + _localctx.declaration = variableDeclaration(); } } catch (RecognitionException re) { @@ -1530,15 +1477,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public FunctionDeclarationContext functionDeclaration() { FunctionDeclarationContext _localctx = new FunctionDeclarationContext(Context, State); - EnterRule(_localctx, 30, RULE_functionDeclaration); + EnterRule(_localctx, 28, RULE_functionDeclaration); try { EnterOuterAlt(_localctx, 1); { - State = 174; + State = 169; Match(Function); - State = 175; + State = 170; _localctx.header = functionHeader(); - State = 176; + State = 171; _localctx.body = scope(); } } @@ -1588,13 +1535,13 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public FunctionHeaderContext functionHeader() { FunctionHeaderContext _localctx = new FunctionHeaderContext(Context, State); - EnterRule(_localctx, 32, RULE_functionHeader); + EnterRule(_localctx, 30, RULE_functionHeader); try { EnterOuterAlt(_localctx, 1); { - State = 178; + State = 173; _localctx.name = fullName(); - State = 179; + State = 174; _localctx.parameters = parameterList(); } } @@ -1644,13 +1591,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, 32, RULE_functionCall); try { EnterOuterAlt(_localctx, 1); { - State = 181; + State = 176; _localctx.name = fullName(); - State = 182; + State = 177; _localctx.args = arguments(); } } @@ -1704,42 +1651,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, 34, RULE_arguments); int _la; try { EnterOuterAlt(_localctx, 1); { - State = 184; + State = 179; Match(OpenBracket); - State = 186; + State = 181; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (((_la) & ~0x3f) == 0 && ((1L << _la) & 21990232752128L) != 0) { { - State = 185; + State = 180; simpleValue(); } } - State = 192; + State = 187; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==Comma) { { { - State = 188; + State = 183; Match(Comma); { - State = 189; + State = 184; simpleValue(); } } } - State = 194; + State = 189; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 195; + State = 190; Match(CloseBracket); } } @@ -1786,28 +1733,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, 36, RULE_functionReturn); try { - State = 203; + State = 198; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,11,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 197; + State = 192; Match(Return); - State = 198; + State = 193; simpleValue(); - State = 199; + State = 194; Match(SemiColon); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 201; + State = 196; Match(Return); - State = 202; + State = 197; Match(SemiColon); } break; @@ -1861,23 +1808,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, 38, RULE_simpleValue); int _la; try { - State = 210; + State = 205; ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { case ShortName: EnterOuterAlt(_localctx, 1); { - State = 205; + State = 200; _localctx.id = fullName(); - State = 207; + State = 202; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==Asterisk) { { - State = 206; + State = 201; _localctx.pointer = Match(Asterisk); } } @@ -1889,7 +1836,7 @@ public SimpleValueContext simpleValue() { case Number: EnterOuterAlt(_localctx, 2); { - State = 209; + State = 204; _localctx.raw = rawValue(); } break; @@ -1943,22 +1890,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, 40, RULE_complexValue); try { - State = 214; + State = 209; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 212; + State = 207; _localctx.op = operation(); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 213; + State = 208; _localctx.func = functionCall(); } break; @@ -2005,12 +1952,12 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public RawValueContext rawValue() { RawValueContext _localctx = new RawValueContext(Context, State); - EnterRule(_localctx, 44, RULE_rawValue); + EnterRule(_localctx, 42, RULE_rawValue); int _la; try { EnterOuterAlt(_localctx, 1); { - State = 216; + State = 211; _la = TokenStream.LA(1); if ( !(((_la) & ~0x3f) == 0 && ((1L << _la) & 4398046707712L) != 0) ) { ErrorHandler.RecoverInline(this); @@ -2069,15 +2016,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, 44, RULE_operation); try { EnterOuterAlt(_localctx, 1); { - State = 218; + State = 213; _localctx.leftValue = simpleValue(); - State = 219; + State = 214; _localctx.@operator = Match(Operator); - State = 220; + State = 215; _localctx.rightValue = simpleValue(); } } @@ -2094,13 +2041,13 @@ public OperationContext operation() { public partial class ParameterContext : ParserRuleContext { public SimpleValueContext size; - public FullNameContext name; + public IToken name; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpenBracket() { return GetToken(CrimsonParser.OpenBracket, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CloseBracket() { return GetToken(CrimsonParser.CloseBracket, 0); } [System.Diagnostics.DebuggerNonUserCode] public SimpleValueContext simpleValue() { return GetRuleContext(0); } - [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { - return GetRuleContext(0); - } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ShortName() { return GetToken(CrimsonParser.ShortName, 0); } public ParameterContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { @@ -2127,14 +2074,18 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ParameterContext parameter() { ParameterContext _localctx = new ParameterContext(Context, State); - EnterRule(_localctx, 48, RULE_parameter); + EnterRule(_localctx, 46, RULE_parameter); try { EnterOuterAlt(_localctx, 1); { - State = 222; + State = 217; _localctx.size = simpleValue(); - State = 223; - _localctx.name = fullName(); + State = 218; + Match(OpenBracket); + State = 219; + _localctx.name = Match(ShortName); + State = 220; + Match(CloseBracket); } } catch (RecognitionException re) { @@ -2187,45 +2138,45 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ParameterListContext parameterList() { ParameterListContext _localctx = new ParameterListContext(Context, State); - EnterRule(_localctx, 50, RULE_parameterList); + EnterRule(_localctx, 48, RULE_parameterList); int _la; try { - State = 238; + State = 235; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,16,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 225; + State = 222; Match(OpenBracket); - State = 226; + State = 223; Match(CloseBracket); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 227; + State = 224; Match(OpenBracket); - State = 228; + State = 225; parameter(); - State = 233; + State = 230; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==Comma) { { { - State = 229; + State = 226; Match(Comma); - State = 230; + State = 227; parameter(); } } - State = 235; + State = 232; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 236; + State = 233; Match(CloseBracket); } break; @@ -2278,15 +2229,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, 50, RULE_structureDeclaration); try { EnterOuterAlt(_localctx, 1); { - State = 240; + State = 237; Match(Structure); - State = 241; + State = 238; _localctx.name = fullName(); - State = 242; + State = 239; _localctx.body = structureBody(); } } @@ -2304,11 +2255,11 @@ public StructureDeclarationContext structureDeclaration() { public partial class StructureBodyContext : ParserRuleContext { [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 InternalVariableDeclarationContext[] internalVariableDeclaration() { - return GetRuleContexts(); + [System.Diagnostics.DebuggerNonUserCode] public VariableDeclarationContext[] variableDeclaration() { + return GetRuleContexts(); } - [System.Diagnostics.DebuggerNonUserCode] public InternalVariableDeclarationContext internalVariableDeclaration(int i) { - return GetRuleContext(i); + [System.Diagnostics.DebuggerNonUserCode] public VariableDeclarationContext variableDeclaration(int i) { + return GetRuleContext(i); } public StructureBodyContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) @@ -2336,28 +2287,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, 52, RULE_structureBody); int _la; try { EnterOuterAlt(_localctx, 1); { - State = 244; + State = 241; Match(OpenBrace); - State = 248; + State = 245; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==ShortName) { { { - State = 245; - internalVariableDeclaration(); + State = 242; + variableDeclaration(); } } - State = 250; + State = 247; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 251; + State = 248; Match(CloseBrace); } } @@ -2403,15 +2354,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ArrayContext array() { ArrayContext _localctx = new ArrayContext(Context, State); - EnterRule(_localctx, 56, RULE_array); + EnterRule(_localctx, 54, RULE_array); try { EnterOuterAlt(_localctx, 1); { - State = 253; + State = 250; Match(OpenSquare); - State = 254; + State = 251; _localctx.blockSize = Match(Number); - State = 255; + State = 252; Match(CloseSquare); } } @@ -2460,23 +2411,23 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public FullNameContext fullName() { FullNameContext _localctx = new FullNameContext(Context, State); - EnterRule(_localctx, 58, RULE_fullName); + EnterRule(_localctx, 56, RULE_fullName); try { EnterOuterAlt(_localctx, 1); { - State = 259; + State = 256; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,18,Context) ) { case 1: { - State = 257; + State = 254; _localctx.libraryName = Match(ShortName); - State = 258; + State = 255; Match(Dot); } break; } - State = 261; + State = 258; _localctx.memberName = Match(ShortName); } } @@ -2492,87 +2443,86 @@ public FullNameContext fullName() { } private static int[] _serializedATN = { - 4,1,44,264,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,44,261,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,1,0,1,0,5,0,63,8,0,10,0,12,0,66,9,0,1,0,5,0,69,8,0,10,0,12,0, - 72,9,0,1,0,5,0,75,8,0,10,0,12,0,78,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,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,109,8,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,3,4,118,8,4,1,4, - 1,4,1,5,1,5,1,5,1,5,3,5,126,8,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,134,8,5,1, - 5,1,5,3,5,138,8,5,1,6,1,6,1,6,1,6,1,6,3,6,145,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,16,1,16,1, - 16,1,17,1,17,1,17,1,18,1,18,3,18,187,8,18,1,18,1,18,5,18,191,8,18,10,18, - 12,18,194,9,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,3,19,204,8,19,1, - 20,1,20,3,20,208,8,20,1,20,3,20,211,8,20,1,21,1,21,3,21,215,8,21,1,22, - 1,22,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25, - 5,25,232,8,25,10,25,12,25,235,9,25,1,25,1,25,3,25,239,8,25,1,26,1,26,1, - 26,1,26,1,27,1,27,5,27,247,8,27,10,27,12,27,250,9,27,1,27,1,27,1,28,1, - 28,1,28,1,28,1,29,1,29,3,29,260,8,29,1,29,1,29,1,29,0,0,30,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, - 0,1,2,0,16,17,42,42,262,0,60,1,0,0,0,2,81,1,0,0,0,4,88,1,0,0,0,6,108,1, - 0,0,0,8,110,1,0,0,0,10,137,1,0,0,0,12,139,1,0,0,0,14,146,1,0,0,0,16,150, - 1,0,0,0,18,154,1,0,0,0,20,157,1,0,0,0,22,160,1,0,0,0,24,164,1,0,0,0,26, - 168,1,0,0,0,28,171,1,0,0,0,30,174,1,0,0,0,32,178,1,0,0,0,34,181,1,0,0, - 0,36,184,1,0,0,0,38,203,1,0,0,0,40,210,1,0,0,0,42,214,1,0,0,0,44,216,1, - 0,0,0,46,218,1,0,0,0,48,222,1,0,0,0,50,238,1,0,0,0,52,240,1,0,0,0,54,244, - 1,0,0,0,56,253,1,0,0,0,58,259,1,0,0,0,60,64,5,31,0,0,61,63,3,2,1,0,62, - 61,1,0,0,0,63,66,1,0,0,0,64,62,1,0,0,0,64,65,1,0,0,0,65,70,1,0,0,0,66, - 64,1,0,0,0,67,69,3,4,2,0,68,67,1,0,0,0,69,72,1,0,0,0,70,68,1,0,0,0,70, - 71,1,0,0,0,71,76,1,0,0,0,72,70,1,0,0,0,73,75,3,6,3,0,74,73,1,0,0,0,75, - 78,1,0,0,0,76,74,1,0,0,0,76,77,1,0,0,0,77,79,1,0,0,0,78,76,1,0,0,0,79, - 80,5,32,0,0,80,1,1,0,0,0,81,82,5,37,0,0,82,83,5,7,0,0,83,84,5,43,0,0,84, - 85,5,9,0,0,85,86,3,58,29,0,86,87,5,35,0,0,87,3,1,0,0,0,88,89,5,37,0,0, - 89,90,5,8,0,0,90,91,5,18,0,0,91,92,5,22,0,0,92,93,3,58,29,0,93,94,5,35, - 0,0,94,5,1,0,0,0,95,109,3,8,4,0,96,109,3,38,19,0,97,109,3,10,5,0,98,99, - 3,34,17,0,99,100,5,35,0,0,100,109,1,0,0,0,101,109,3,12,6,0,102,109,3,14, - 7,0,103,109,3,22,11,0,104,109,3,24,12,0,105,109,3,26,13,0,106,109,3,30, - 15,0,107,109,3,52,26,0,108,95,1,0,0,0,108,96,1,0,0,0,108,97,1,0,0,0,108, - 98,1,0,0,0,108,101,1,0,0,0,108,102,1,0,0,0,108,103,1,0,0,0,108,104,1,0, - 0,0,108,105,1,0,0,0,108,106,1,0,0,0,108,107,1,0,0,0,109,7,1,0,0,0,110, - 111,3,58,29,0,111,112,5,27,0,0,112,113,3,40,20,0,113,114,5,28,0,0,114, - 117,5,25,0,0,115,118,3,42,21,0,116,118,3,40,20,0,117,115,1,0,0,0,117,116, - 1,0,0,0,118,119,1,0,0,0,119,120,5,35,0,0,120,9,1,0,0,0,121,122,3,58,29, - 0,122,125,5,25,0,0,123,126,3,42,21,0,124,126,3,40,20,0,125,123,1,0,0,0, - 125,124,1,0,0,0,126,127,1,0,0,0,127,128,5,35,0,0,128,138,1,0,0,0,129,130, - 3,58,29,0,130,133,5,26,0,0,131,134,3,42,21,0,132,134,3,40,20,0,133,131, - 1,0,0,0,133,132,1,0,0,0,134,135,1,0,0,0,135,136,5,35,0,0,136,138,1,0,0, - 0,137,121,1,0,0,0,137,129,1,0,0,0,138,11,1,0,0,0,139,140,5,10,0,0,140, - 141,3,16,8,0,141,144,3,0,0,0,142,145,3,20,10,0,143,145,3,18,9,0,144,142, - 1,0,0,0,144,143,1,0,0,0,144,145,1,0,0,0,145,13,1,0,0,0,146,147,5,11,0, - 0,147,148,3,16,8,0,148,149,3,0,0,0,149,15,1,0,0,0,150,151,5,27,0,0,151, - 152,3,46,23,0,152,153,5,28,0,0,153,17,1,0,0,0,154,155,5,12,0,0,155,156, - 3,12,6,0,156,19,1,0,0,0,157,158,5,12,0,0,158,159,3,0,0,0,159,21,1,0,0, - 0,160,161,5,23,0,0,161,162,5,43,0,0,162,163,5,35,0,0,163,23,1,0,0,0,164, - 165,5,24,0,0,165,166,5,43,0,0,166,167,5,35,0,0,167,25,1,0,0,0,168,169, - 5,3,0,0,169,170,3,8,4,0,170,27,1,0,0,0,171,172,5,4,0,0,172,173,3,8,4,0, - 173,29,1,0,0,0,174,175,5,2,0,0,175,176,3,32,16,0,176,177,3,0,0,0,177,31, - 1,0,0,0,178,179,3,58,29,0,179,180,3,50,25,0,180,33,1,0,0,0,181,182,3,58, - 29,0,182,183,3,36,18,0,183,35,1,0,0,0,184,186,5,27,0,0,185,187,3,40,20, - 0,186,185,1,0,0,0,186,187,1,0,0,0,187,192,1,0,0,0,188,189,5,33,0,0,189, - 191,3,40,20,0,190,188,1,0,0,0,191,194,1,0,0,0,192,190,1,0,0,0,192,193, - 1,0,0,0,193,195,1,0,0,0,194,192,1,0,0,0,195,196,5,28,0,0,196,37,1,0,0, - 0,197,198,5,5,0,0,198,199,3,40,20,0,199,200,5,35,0,0,200,204,1,0,0,0,201, - 202,5,5,0,0,202,204,5,35,0,0,203,197,1,0,0,0,203,201,1,0,0,0,204,39,1, - 0,0,0,205,207,3,58,29,0,206,208,5,19,0,0,207,206,1,0,0,0,207,208,1,0,0, - 0,208,211,1,0,0,0,209,211,3,44,22,0,210,205,1,0,0,0,210,209,1,0,0,0,211, - 41,1,0,0,0,212,215,3,46,23,0,213,215,3,34,17,0,214,212,1,0,0,0,214,213, - 1,0,0,0,215,43,1,0,0,0,216,217,7,0,0,0,217,45,1,0,0,0,218,219,3,40,20, - 0,219,220,5,18,0,0,220,221,3,40,20,0,221,47,1,0,0,0,222,223,3,40,20,0, - 223,224,3,58,29,0,224,49,1,0,0,0,225,226,5,27,0,0,226,239,5,28,0,0,227, - 228,5,27,0,0,228,233,3,48,24,0,229,230,5,33,0,0,230,232,3,48,24,0,231, - 229,1,0,0,0,232,235,1,0,0,0,233,231,1,0,0,0,233,234,1,0,0,0,234,236,1, - 0,0,0,235,233,1,0,0,0,236,237,5,28,0,0,237,239,1,0,0,0,238,225,1,0,0,0, - 238,227,1,0,0,0,239,51,1,0,0,0,240,241,5,6,0,0,241,242,3,58,29,0,242,243, - 3,54,27,0,243,53,1,0,0,0,244,248,5,31,0,0,245,247,3,8,4,0,246,245,1,0, - 0,0,247,250,1,0,0,0,248,246,1,0,0,0,248,249,1,0,0,0,249,251,1,0,0,0,250, - 248,1,0,0,0,251,252,5,32,0,0,252,55,1,0,0,0,253,254,5,29,0,0,254,255,5, - 42,0,0,255,256,5,30,0,0,256,57,1,0,0,0,257,258,5,44,0,0,258,260,5,34,0, - 0,259,257,1,0,0,0,259,260,1,0,0,0,260,261,1,0,0,0,261,262,5,44,0,0,262, - 59,1,0,0,0,19,64,70,76,108,117,125,133,137,144,186,192,203,207,210,214, - 233,238,248,259 + 1,0,1,0,5,0,61,8,0,10,0,12,0,64,9,0,1,0,5,0,67,8,0,10,0,12,0,70,9,0,1, + 0,5,0,73,8,0,10,0,12,0,76,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,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,107,8,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,3,4,116,8,4,1,4,1,4,1,5, + 1,5,1,5,1,5,3,5,124,8,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,132,8,5,1,5,1,5,3, + 5,136,8,5,1,6,1,6,1,6,1,6,1,6,3,6,143,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,14,1,15,1,15,1,15,1,16,1,16,1,16,1,17, + 1,17,3,17,182,8,17,1,17,1,17,5,17,186,8,17,10,17,12,17,189,9,17,1,17,1, + 17,1,18,1,18,1,18,1,18,1,18,1,18,3,18,199,8,18,1,19,1,19,3,19,203,8,19, + 1,19,3,19,206,8,19,1,20,1,20,3,20,210,8,20,1,21,1,21,1,22,1,22,1,22,1, + 22,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,5,24,229,8,24, + 10,24,12,24,232,9,24,1,24,1,24,3,24,236,8,24,1,25,1,25,1,25,1,25,1,26, + 1,26,5,26,244,8,26,10,26,12,26,247,9,26,1,26,1,26,1,27,1,27,1,27,1,27, + 1,28,1,28,3,28,257,8,28,1,28,1,28,1,28,0,0,29,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,0,1,2,0,16,17, + 42,42,260,0,58,1,0,0,0,2,79,1,0,0,0,4,86,1,0,0,0,6,106,1,0,0,0,8,108,1, + 0,0,0,10,135,1,0,0,0,12,137,1,0,0,0,14,144,1,0,0,0,16,148,1,0,0,0,18,152, + 1,0,0,0,20,155,1,0,0,0,22,158,1,0,0,0,24,162,1,0,0,0,26,166,1,0,0,0,28, + 169,1,0,0,0,30,173,1,0,0,0,32,176,1,0,0,0,34,179,1,0,0,0,36,198,1,0,0, + 0,38,205,1,0,0,0,40,209,1,0,0,0,42,211,1,0,0,0,44,213,1,0,0,0,46,217,1, + 0,0,0,48,235,1,0,0,0,50,237,1,0,0,0,52,241,1,0,0,0,54,250,1,0,0,0,56,256, + 1,0,0,0,58,62,5,31,0,0,59,61,3,2,1,0,60,59,1,0,0,0,61,64,1,0,0,0,62,60, + 1,0,0,0,62,63,1,0,0,0,63,68,1,0,0,0,64,62,1,0,0,0,65,67,3,4,2,0,66,65, + 1,0,0,0,67,70,1,0,0,0,68,66,1,0,0,0,68,69,1,0,0,0,69,74,1,0,0,0,70,68, + 1,0,0,0,71,73,3,6,3,0,72,71,1,0,0,0,73,76,1,0,0,0,74,72,1,0,0,0,74,75, + 1,0,0,0,75,77,1,0,0,0,76,74,1,0,0,0,77,78,5,32,0,0,78,1,1,0,0,0,79,80, + 5,37,0,0,80,81,5,7,0,0,81,82,5,43,0,0,82,83,5,9,0,0,83,84,3,56,28,0,84, + 85,5,35,0,0,85,3,1,0,0,0,86,87,5,37,0,0,87,88,5,8,0,0,88,89,5,18,0,0,89, + 90,5,22,0,0,90,91,3,56,28,0,91,92,5,35,0,0,92,5,1,0,0,0,93,107,3,8,4,0, + 94,107,3,36,18,0,95,107,3,10,5,0,96,97,3,32,16,0,97,98,5,35,0,0,98,107, + 1,0,0,0,99,107,3,12,6,0,100,107,3,14,7,0,101,107,3,22,11,0,102,107,3,24, + 12,0,103,107,3,26,13,0,104,107,3,28,14,0,105,107,3,50,25,0,106,93,1,0, + 0,0,106,94,1,0,0,0,106,95,1,0,0,0,106,96,1,0,0,0,106,99,1,0,0,0,106,100, + 1,0,0,0,106,101,1,0,0,0,106,102,1,0,0,0,106,103,1,0,0,0,106,104,1,0,0, + 0,106,105,1,0,0,0,107,7,1,0,0,0,108,109,3,56,28,0,109,110,5,27,0,0,110, + 111,3,38,19,0,111,112,5,28,0,0,112,115,5,25,0,0,113,116,3,40,20,0,114, + 116,3,38,19,0,115,113,1,0,0,0,115,114,1,0,0,0,116,117,1,0,0,0,117,118, + 5,35,0,0,118,9,1,0,0,0,119,120,3,56,28,0,120,123,5,25,0,0,121,124,3,40, + 20,0,122,124,3,38,19,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,136,1,0,0,0,127,128,3,56,28,0,128,131,5,26,0,0,129, + 132,3,40,20,0,130,132,3,38,19,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,136,1,0,0,0,135,119,1,0,0,0,135,127,1,0,0, + 0,136,11,1,0,0,0,137,138,5,10,0,0,138,139,3,16,8,0,139,142,3,0,0,0,140, + 143,3,20,10,0,141,143,3,18,9,0,142,140,1,0,0,0,142,141,1,0,0,0,142,143, + 1,0,0,0,143,13,1,0,0,0,144,145,5,11,0,0,145,146,3,16,8,0,146,147,3,0,0, + 0,147,15,1,0,0,0,148,149,5,27,0,0,149,150,3,44,22,0,150,151,5,28,0,0,151, + 17,1,0,0,0,152,153,5,12,0,0,153,154,3,12,6,0,154,19,1,0,0,0,155,156,5, + 12,0,0,156,157,3,0,0,0,157,21,1,0,0,0,158,159,5,23,0,0,159,160,5,43,0, + 0,160,161,5,35,0,0,161,23,1,0,0,0,162,163,5,24,0,0,163,164,5,43,0,0,164, + 165,5,35,0,0,165,25,1,0,0,0,166,167,5,3,0,0,167,168,3,8,4,0,168,27,1,0, + 0,0,169,170,5,2,0,0,170,171,3,30,15,0,171,172,3,0,0,0,172,29,1,0,0,0,173, + 174,3,56,28,0,174,175,3,48,24,0,175,31,1,0,0,0,176,177,3,56,28,0,177,178, + 3,34,17,0,178,33,1,0,0,0,179,181,5,27,0,0,180,182,3,38,19,0,181,180,1, + 0,0,0,181,182,1,0,0,0,182,187,1,0,0,0,183,184,5,33,0,0,184,186,3,38,19, + 0,185,183,1,0,0,0,186,189,1,0,0,0,187,185,1,0,0,0,187,188,1,0,0,0,188, + 190,1,0,0,0,189,187,1,0,0,0,190,191,5,28,0,0,191,35,1,0,0,0,192,193,5, + 5,0,0,193,194,3,38,19,0,194,195,5,35,0,0,195,199,1,0,0,0,196,197,5,5,0, + 0,197,199,5,35,0,0,198,192,1,0,0,0,198,196,1,0,0,0,199,37,1,0,0,0,200, + 202,3,56,28,0,201,203,5,19,0,0,202,201,1,0,0,0,202,203,1,0,0,0,203,206, + 1,0,0,0,204,206,3,42,21,0,205,200,1,0,0,0,205,204,1,0,0,0,206,39,1,0,0, + 0,207,210,3,44,22,0,208,210,3,32,16,0,209,207,1,0,0,0,209,208,1,0,0,0, + 210,41,1,0,0,0,211,212,7,0,0,0,212,43,1,0,0,0,213,214,3,38,19,0,214,215, + 5,18,0,0,215,216,3,38,19,0,216,45,1,0,0,0,217,218,3,38,19,0,218,219,5, + 27,0,0,219,220,5,44,0,0,220,221,5,28,0,0,221,47,1,0,0,0,222,223,5,27,0, + 0,223,236,5,28,0,0,224,225,5,27,0,0,225,230,3,46,23,0,226,227,5,33,0,0, + 227,229,3,46,23,0,228,226,1,0,0,0,229,232,1,0,0,0,230,228,1,0,0,0,230, + 231,1,0,0,0,231,233,1,0,0,0,232,230,1,0,0,0,233,234,5,28,0,0,234,236,1, + 0,0,0,235,222,1,0,0,0,235,224,1,0,0,0,236,49,1,0,0,0,237,238,5,6,0,0,238, + 239,3,56,28,0,239,240,3,52,26,0,240,51,1,0,0,0,241,245,5,31,0,0,242,244, + 3,8,4,0,243,242,1,0,0,0,244,247,1,0,0,0,245,243,1,0,0,0,245,246,1,0,0, + 0,246,248,1,0,0,0,247,245,1,0,0,0,248,249,5,32,0,0,249,53,1,0,0,0,250, + 251,5,29,0,0,251,252,5,42,0,0,252,253,5,30,0,0,253,55,1,0,0,0,254,255, + 5,44,0,0,255,257,5,34,0,0,256,254,1,0,0,0,256,257,1,0,0,0,257,258,1,0, + 0,0,258,259,5,44,0,0,259,57,1,0,0,0,19,62,68,74,106,115,123,131,135,142, + 181,187,198,202,205,209,230,235,245,256 }; public static readonly ATN _ATN = diff --git a/Crimson/Antlr/Output/CrimsonVisitor.cs b/Crimson/Antlr/Output/CrimsonVisitor.cs index dd6d069..1fbb24e 100644 --- a/Crimson/Antlr/Output/CrimsonVisitor.cs +++ b/Crimson/Antlr/Output/CrimsonVisitor.cs @@ -128,11 +128,11 @@ public interface ICrimsonVisitor : IParseTreeVisitor { /// The visitor result. Result VisitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context); /// - /// Visit a parse tree produced by . + /// Visit a parse tree produced by . /// /// The parse tree. /// The visitor result. - Result VisitInternalVariableDeclaration([NotNull] CrimsonParser.InternalVariableDeclarationContext context); + Result VisitVariableDeclaration([NotNull] CrimsonParser.VariableDeclarationContext context); /// /// Visit a parse tree produced by the AssignVariableDirect /// labeled alternative in . @@ -196,12 +196,6 @@ public interface ICrimsonVisitor : IParseTreeVisitor { /// The visitor result. Result VisitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context); /// - /// Visit a parse tree produced by . - /// - /// The parse tree. - /// The visitor result. - Result VisitScopedVariableDeclaration([NotNull] CrimsonParser.ScopedVariableDeclarationContext context); - /// /// Visit a parse tree produced by . /// /// The parse tree. diff --git a/Crimson/CSharp/Core/ScopeVisitor.cs b/Crimson/CSharp/Core/ScopeVisitor.cs index b458a9a..ea64aaf 100644 --- a/Crimson/CSharp/Core/ScopeVisitor.cs +++ b/Crimson/CSharp/Core/ScopeVisitor.cs @@ -72,8 +72,8 @@ private AbstractCrimsonStatement ParseStatement (CrimsonParser.StatementContext } else if (stCtx is CrimsonParser.VariableDeclarationStatementContext variableContext) { - CrimsonParser.InternalVariableDeclarationContext ivdCtx = variableContext.internalVariableDeclaration(); - return VisitInternalVariableDeclaration(ivdCtx); + CrimsonParser.VariableDeclarationContext ivdCtx = variableContext.variableDeclaration(); + return VisitVariableDeclaration(ivdCtx); } else if (stCtx is CrimsonParser.ReturnStatementContext returnContext) { @@ -131,7 +131,7 @@ public override OperationHandlerCStatement VisitOperationHandler ([NotNull] Crim public override GlobalVariableCStatement VisitGlobalVariableDeclaration ([NotNull] CrimsonParser.GlobalVariableDeclarationContext context) { - CrimsonParser.InternalVariableDeclarationContext ivdc = context.internalVariableDeclaration(); + CrimsonParser.VariableDeclarationContext ivdc = context.variableDeclaration(); FullNameCToken identifier = VisitFullName(ivdc.fullName()); SimpleValueCToken? simple; ComplexValueCToken? complex; @@ -166,9 +166,9 @@ public override StructureCStatement VisitStructureDeclaration ([NotNull] Crimson public override IList VisitStructureBody ([NotNull] CrimsonParser.StructureBodyContext context) { IList statements = new List(); - foreach (CrimsonParser.InternalVariableDeclarationContext ivdCtx in context.internalVariableDeclaration()) + foreach (CrimsonParser.VariableDeclarationContext ivdCtx in context.variableDeclaration()) { - InternalVariableCStatement var = VisitInternalVariableDeclaration(ivdCtx); + InternalVariableCStatement var = VisitVariableDeclaration(ivdCtx); statements.Add(var); } return statements; @@ -196,7 +196,7 @@ public VariableAssignmentCStatement ParseAssignVariable ([NotNull] CrimsonParser List parameters = new List(); foreach (CrimsonParser.ParameterContext paCtx in context.parameter()) { - FullNameCToken identifier = VisitFullName(paCtx.fullName()); + FullNameCToken identifier = new FullNameCToken(paCtx.name.Text); SimpleValueCToken size = VisitSimpleValue(paCtx.size); FunctionCStatement.Parameter parameter = new FunctionCStatement.Parameter(size, identifier); parameters.Add(parameter); @@ -208,7 +208,7 @@ public VariableAssignmentCStatement ParseAssignVariable ([NotNull] CrimsonParser // ------------------------------------ STATEMENTS // ---------------------------------------------------- - public override InternalVariableCStatement VisitInternalVariableDeclaration ([NotNull] CrimsonParser.InternalVariableDeclarationContext context) + public override InternalVariableCStatement VisitVariableDeclaration ([NotNull] CrimsonParser.VariableDeclarationContext context) { FullNameCToken identifier = VisitFullName(context.fullName()); SimpleValueCToken size = VisitSimpleValue(context.size); diff --git a/Crimson/Resources/Native Library/heap.crm b/Crimson/Resources/Native Library/heap.crm index fe85887..6a30f30 100644 --- a/Crimson/Resources/Native Library/heap.crm +++ b/Crimson/Resources/Native Library/heap.crm @@ -28,16 +28,14 @@ // It should be at a static location relative to the start of process memory. // int[] regions = new int[256]; - { - #using "${NATIVE}/maths.crm" as maths // IMPORTANT!! // regions_i and regions_region will be removed!! // They should not be used and are purely for testing linking - global int regions_i = 0; - global int regions_length = 0; - global int regions_region = 0; + global regions_i(int_size) = 0; + global regions_length(int_size) = 0; + global regions_region(int_size) = 0; int_size(1) = 4; ptr_size(1) = 4; diff --git a/Crimson/Resources/Test Compilations/result/main.cba b/Crimson/Resources/Test Compilations/result/main.cba index e9f2096..1cebdd6 100644 --- a/Crimson/Resources/Test Compilations/result/main.cba +++ b/Crimson/Resources/Test Compilations/result/main.cba @@ -9,14 +9,12 @@ // ============================== Global Variables ============================== -inc_sp 4; var_set gvar_regions_i_0, -1, 0; -inc_sp 4; var_set gvar_regions_length_0, -1, 0; -inc_sp 4; var_set gvar_regions_region_0, -1, 0; -inc_sp 4; var_set gvar_counter_0, -1, 0; +var_set gvar_int_size_0, -1, 4; +var_set gvar_ptr_size_0, -1, 4; // (Structures shouldn't be a part of CB) // ============================== Structures ============================== @@ -26,10 +24,8 @@ var_set gvar_counter_0, -1, 0; example basic call A~ "example assemby call" // Function Call - inc_sp 4; var_set a, -1, ; // Function Call - inc_sp 4; var_set b, -1, ; jeq c_r_h 0 NEXT_ELIF @@ -38,10 +34,8 @@ var_set gvar_counter_0, -1, 0; jeq c_r_h 0 NEXT_ELIF // Function Call - inc_sp 4; var_set c, -1, ; // Function Call - inc_sp 4; var_set d, -1, ; jump END_branch_1 @@ -52,17 +46,15 @@ var_set gvar_counter_0, -1, 0; :END_branch_0: // FC start - inc_sp 4; + jump func_call_0 // FC end // Function Call - inc_sp 4; var_set i, -1, ; // 4 // FC start - inc_sp 4; + jump func_write_0 // FC end // Function Call - inc_sp 4; var_set ret, -1, ; // Function Call var_set ret, -1, VAR_ASSIGN_C_VAL; @@ -73,14 +65,13 @@ return; // ============================== Functions ============================== :func_multiply_0: // FC start - inc_sp 4; + jump func_write_0 // FC end return; return; :func_times_0: // Function Call - inc_sp 4; var_set ret, -1, ; return; return; @@ -89,7 +80,6 @@ return; return; :func_alloc_0: - inc_sp 4; var_set i, -1, 0; // >> TODO IMPLEMENT WHILE (start) << @@ -100,9 +90,7 @@ return; :func_get_region_ptr_0: // Operation - inc_sp 4; var_set RRMS, -1, ; - inc_sp 4; var_set exponential_offset, -1, 4; jeq c_r_h 0 NEXT_ELIF @@ -128,26 +116,22 @@ return; :END_branch_2: // Operation - inc_sp 4; var_set HO_EXP, -1, ; // Operation - inc_sp 4; var_set HO_EXP_RRMS, -1, ; return; return; :func_freeptr_0: - inc_sp 4; var_set r, -1, 0; // Function Call - inc_sp 4; var_set region_ptr, -1, ; // >> TODO IMPLEMENT WHILE (start) << // >> TODO IMPLEMENT WHILE (end) << // FC start - inc_sp 4; + jump func_freeregion_0 // FC end return; @@ -164,7 +148,6 @@ return; :func_call_0: // Function Call - inc_sp 4; var_set test, -1, ; return; return; diff --git a/Crimson/Resources/Test Compilations/utils/utils.crm b/Crimson/Resources/Test Compilations/utils/utils.crm index 3019ce1..46c0bab 100644 --- a/Crimson/Resources/Test Compilations/utils/utils.crm +++ b/Crimson/Resources/Test Compilations/utils/utils.crm @@ -1,5 +1,5 @@ { - #using "${NATIVE}/console.crm" as utils_stdout + #using "${NATIVE}/console.crm" as utils_stdout; // Utility package function multiply (num1(int_size), num2(int_size)) { From b0a0e22ae3b0b13b81a94506b4911a9d87045197 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 21 Mar 2023 00:46:37 +0000 Subject: [PATCH 024/122] im tired > Lots of variable assignment > Maybe added syntax i dont rememver --- Crimson/Antlr/Input/Crimson.g4 | 49 +- Crimson/Antlr/Output/Crimson.interp | 23 +- Crimson/Antlr/Output/Crimson.tokens | 107 ++- Crimson/Antlr/Output/CrimsonBaseListener.cs | 64 +- Crimson/Antlr/Output/CrimsonBaseVisitor.cs | 44 +- Crimson/Antlr/Output/CrimsonLexer.cs | 280 +++--- Crimson/Antlr/Output/CrimsonLexer.interp | 31 +- Crimson/Antlr/Output/CrimsonLexer.tokens | 107 ++- Crimson/Antlr/Output/CrimsonListener.cs | 54 +- Crimson/Antlr/Output/CrimsonParser.cs | 872 +++++++++--------- Crimson/Antlr/Output/CrimsonVisitor.cs | 32 +- Crimson/CSharp/Core/Flattener.cs | 8 +- Crimson/CSharp/Core/ScopeVisitor.cs | 66 +- .../Statements/GlobalVariableCStatement.cs | 31 +- ...tatement.cs => ScopeVariableCStatement.cs} | 8 +- .../VariableAssignmentCStatement.cs | 14 +- Crimson/Resources/CrimsonNotepad++.xml | 14 +- Crimson/Resources/Native Library/console.crm | 2 +- Crimson/Resources/Native Library/fraction.crm | 4 +- Crimson/Resources/Native Library/heap.crm | 46 +- Crimson/Resources/Native Library/maths.crm | 8 +- .../Test Compilations/logging/log.crm | 6 +- Crimson/Resources/Test Compilations/main.crm | 37 +- .../Test Compilations/result/main.cba | 16 +- .../Test Compilations/utils/utils.crm | 4 +- 25 files changed, 988 insertions(+), 939 deletions(-) rename Crimson/CSharp/Grammar/Statements/{InternalVariableCStatement.cs => ScopeVariableCStatement.cs} (84%) diff --git a/Crimson/Antlr/Input/Crimson.g4 b/Crimson/Antlr/Input/Crimson.g4 index 3676afe..b99cfa9 100644 --- a/Crimson/Antlr/Input/Crimson.g4 +++ b/Crimson/Antlr/Input/Crimson.g4 @@ -15,8 +15,7 @@ operationHandler // Function-only statements statement - : variableDeclaration #VariableDeclarationStatement - | functionReturn #ReturnStatement + : functionReturn #ReturnStatement | assignVariable #AssignVariableStatement | functionCall SemiColon #FunctionCallStatement | ifBlock #IfStatement @@ -24,15 +23,13 @@ statement | basicCall #BasicCallStatement | assemblyCall #AssemblyCallStatement | globalVariableDeclaration #GlobalVariableStatement + | scopeVariableDeclaration #ScopeVariableStatement | functionDeclaration #FunctionDeclarationStatement | structureDeclaration #StructureDeclarationStatement ; -variableDeclaration - : name=fullName OpenBracket size=simpleValue CloseBracket DirectEquals (complex=complexValue | simple=simpleValue) SemiColon - ; assignVariable - : name=fullName DirectEquals (complex=complexValue | simple=simpleValue) SemiColon #AssignVariableDirect - | name=fullName PointerEquals (complex=complexValue | simple=simpleValue) SemiColon #AssignVariableAtPointer + : name=ShortName DirectEquals (complex=complexValue | simple=simpleValue) size=datasize SemiColon #AssignVariableDirect + | name=ShortName PointerEquals (complex=complexValue | simple=simpleValue) size=datasize SemiColon #AssignVariableAtPointer ; ifBlock : If condition scope (elseBlock | elseIfBlock)? @@ -56,7 +53,10 @@ assemblyCall : AssemblyCall assemblyText=String SemiColon ; globalVariableDeclaration - : Global declaration=variableDeclaration + : Global assignment=assignVariable + ; +scopeVariableDeclaration + : Scope name=ShortName size=datasize SemiColon ; functionDeclaration : Function header=functionHeader body=scope @@ -85,9 +85,8 @@ complexValue | func=functionCall ; rawValue - : Null - | Number - | BooleanValue + : Number + | String ; operation : leftValue=simpleValue operator=Operator rightValue=simpleValue @@ -95,7 +94,7 @@ operation // Parameters parameter - : size=simpleValue OpenBracket name=ShortName CloseBracket + : name=ShortName size=datasize ; parameterList : OpenBracket CloseBracket @@ -107,16 +106,19 @@ structureDeclaration : Structure name=fullName body=structureBody ; structureBody - : OpenBrace variableDeclaration* CloseBrace + : OpenBrace scopeVariableDeclaration* CloseBrace ; array - : OpenSquare blockSize=Number CloseSquare + : OpenSquare blockSize=datasize CloseSquare ; +datasize + : OpenTriangle sizeVal=simpleValue CloseTriangle + ; // Misc fullName : (libraryName=ShortName Dot)? memberName=ShortName - ; + ; /* * = @@ -127,7 +129,7 @@ fullName Allocator: 'allocator'; Function: 'function'; Global: 'global'; -Scoped: 'scoped'; +Scope: 'scope'; Return: 'return'; Structure: 'structure'; Using: 'using'; @@ -138,14 +140,6 @@ While: 'while'; Else: 'else'; Elif: 'elif'; -Integer: 'int'; -Boolean: 'bool'; -Null: 'null'; - -fragment True: 'true'; -fragment False: 'false'; -BooleanValue: True | False; - Operator: Comparator | MathsOperator; fragment Plus: '+'; @@ -154,9 +148,9 @@ Asterisk: '*'; fragment Slash: '/'; MathsOperator: Plus | Minus | Asterisk | Slash; -fragment Less: '<'; +fragment Less: '?<'; fragment LessEqual: '<='; -fragment Greater: '>'; +fragment Greater: '?>'; fragment GreaterEqual: '>='; fragment EqualTo: '=='; Comparator: Less | LessEqual | Greater | GreaterEqual | EqualTo; @@ -170,8 +164,11 @@ OpenBracket: '('; CloseBracket: ')'; OpenSquare: '['; CloseSquare: ']'; +Colon: ':'; OpenBrace: '{'; CloseBrace: '}'; +OpenTriangle: '<'; +CloseTriangle: '>'; Comma: ','; Dot: '.'; SemiColon: ';'; diff --git a/Crimson/Antlr/Output/Crimson.interp b/Crimson/Antlr/Output/Crimson.interp index 6aff309..abf01ba 100644 --- a/Crimson/Antlr/Output/Crimson.interp +++ b/Crimson/Antlr/Output/Crimson.interp @@ -3,7 +3,7 @@ null 'allocator' 'function' 'global' -'scoped' +'scope' 'return' 'structure' 'using' @@ -13,10 +13,6 @@ null 'while' 'else' 'elif' -'int' -'bool' -'null' -null null '*' null @@ -30,8 +26,11 @@ null ')' '[' ']' +':' '{' '}' +'<' +'>' ',' '.' ';' @@ -50,7 +49,7 @@ null Allocator Function Global -Scoped +Scope Return Structure Using @@ -60,10 +59,6 @@ If While Else Elif -Integer -Boolean -Null -BooleanValue Operator Asterisk MathsOperator @@ -77,8 +72,11 @@ OpenBracket CloseBracket OpenSquare CloseSquare +Colon OpenBrace CloseBrace +OpenTriangle +CloseTriangle Comma Dot SemiColon @@ -97,7 +95,6 @@ scope importUnit operationHandler statement -variableDeclaration assignVariable ifBlock whileBlock @@ -107,6 +104,7 @@ elseBlock basicCall assemblyCall globalVariableDeclaration +scopeVariableDeclaration functionDeclaration functionHeader functionCall @@ -121,8 +119,9 @@ parameterList structureDeclaration structureBody array +datasize fullName atn: -[4, 1, 44, 261, 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, 1, 0, 1, 0, 5, 0, 61, 8, 0, 10, 0, 12, 0, 64, 9, 0, 1, 0, 5, 0, 67, 8, 0, 10, 0, 12, 0, 70, 9, 0, 1, 0, 5, 0, 73, 8, 0, 10, 0, 12, 0, 76, 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, 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, 107, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 116, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 124, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 132, 8, 5, 1, 5, 1, 5, 3, 5, 136, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 143, 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, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 3, 17, 182, 8, 17, 1, 17, 1, 17, 5, 17, 186, 8, 17, 10, 17, 12, 17, 189, 9, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 199, 8, 18, 1, 19, 1, 19, 3, 19, 203, 8, 19, 1, 19, 3, 19, 206, 8, 19, 1, 20, 1, 20, 3, 20, 210, 8, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 229, 8, 24, 10, 24, 12, 24, 232, 9, 24, 1, 24, 1, 24, 3, 24, 236, 8, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 5, 26, 244, 8, 26, 10, 26, 12, 26, 247, 9, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 3, 28, 257, 8, 28, 1, 28, 1, 28, 1, 28, 0, 0, 29, 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, 0, 1, 2, 0, 16, 17, 42, 42, 260, 0, 58, 1, 0, 0, 0, 2, 79, 1, 0, 0, 0, 4, 86, 1, 0, 0, 0, 6, 106, 1, 0, 0, 0, 8, 108, 1, 0, 0, 0, 10, 135, 1, 0, 0, 0, 12, 137, 1, 0, 0, 0, 14, 144, 1, 0, 0, 0, 16, 148, 1, 0, 0, 0, 18, 152, 1, 0, 0, 0, 20, 155, 1, 0, 0, 0, 22, 158, 1, 0, 0, 0, 24, 162, 1, 0, 0, 0, 26, 166, 1, 0, 0, 0, 28, 169, 1, 0, 0, 0, 30, 173, 1, 0, 0, 0, 32, 176, 1, 0, 0, 0, 34, 179, 1, 0, 0, 0, 36, 198, 1, 0, 0, 0, 38, 205, 1, 0, 0, 0, 40, 209, 1, 0, 0, 0, 42, 211, 1, 0, 0, 0, 44, 213, 1, 0, 0, 0, 46, 217, 1, 0, 0, 0, 48, 235, 1, 0, 0, 0, 50, 237, 1, 0, 0, 0, 52, 241, 1, 0, 0, 0, 54, 250, 1, 0, 0, 0, 56, 256, 1, 0, 0, 0, 58, 62, 5, 31, 0, 0, 59, 61, 3, 2, 1, 0, 60, 59, 1, 0, 0, 0, 61, 64, 1, 0, 0, 0, 62, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 68, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 65, 67, 3, 4, 2, 0, 66, 65, 1, 0, 0, 0, 67, 70, 1, 0, 0, 0, 68, 66, 1, 0, 0, 0, 68, 69, 1, 0, 0, 0, 69, 74, 1, 0, 0, 0, 70, 68, 1, 0, 0, 0, 71, 73, 3, 6, 3, 0, 72, 71, 1, 0, 0, 0, 73, 76, 1, 0, 0, 0, 74, 72, 1, 0, 0, 0, 74, 75, 1, 0, 0, 0, 75, 77, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 77, 78, 5, 32, 0, 0, 78, 1, 1, 0, 0, 0, 79, 80, 5, 37, 0, 0, 80, 81, 5, 7, 0, 0, 81, 82, 5, 43, 0, 0, 82, 83, 5, 9, 0, 0, 83, 84, 3, 56, 28, 0, 84, 85, 5, 35, 0, 0, 85, 3, 1, 0, 0, 0, 86, 87, 5, 37, 0, 0, 87, 88, 5, 8, 0, 0, 88, 89, 5, 18, 0, 0, 89, 90, 5, 22, 0, 0, 90, 91, 3, 56, 28, 0, 91, 92, 5, 35, 0, 0, 92, 5, 1, 0, 0, 0, 93, 107, 3, 8, 4, 0, 94, 107, 3, 36, 18, 0, 95, 107, 3, 10, 5, 0, 96, 97, 3, 32, 16, 0, 97, 98, 5, 35, 0, 0, 98, 107, 1, 0, 0, 0, 99, 107, 3, 12, 6, 0, 100, 107, 3, 14, 7, 0, 101, 107, 3, 22, 11, 0, 102, 107, 3, 24, 12, 0, 103, 107, 3, 26, 13, 0, 104, 107, 3, 28, 14, 0, 105, 107, 3, 50, 25, 0, 106, 93, 1, 0, 0, 0, 106, 94, 1, 0, 0, 0, 106, 95, 1, 0, 0, 0, 106, 96, 1, 0, 0, 0, 106, 99, 1, 0, 0, 0, 106, 100, 1, 0, 0, 0, 106, 101, 1, 0, 0, 0, 106, 102, 1, 0, 0, 0, 106, 103, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 106, 105, 1, 0, 0, 0, 107, 7, 1, 0, 0, 0, 108, 109, 3, 56, 28, 0, 109, 110, 5, 27, 0, 0, 110, 111, 3, 38, 19, 0, 111, 112, 5, 28, 0, 0, 112, 115, 5, 25, 0, 0, 113, 116, 3, 40, 20, 0, 114, 116, 3, 38, 19, 0, 115, 113, 1, 0, 0, 0, 115, 114, 1, 0, 0, 0, 116, 117, 1, 0, 0, 0, 117, 118, 5, 35, 0, 0, 118, 9, 1, 0, 0, 0, 119, 120, 3, 56, 28, 0, 120, 123, 5, 25, 0, 0, 121, 124, 3, 40, 20, 0, 122, 124, 3, 38, 19, 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, 136, 1, 0, 0, 0, 127, 128, 3, 56, 28, 0, 128, 131, 5, 26, 0, 0, 129, 132, 3, 40, 20, 0, 130, 132, 3, 38, 19, 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, 136, 1, 0, 0, 0, 135, 119, 1, 0, 0, 0, 135, 127, 1, 0, 0, 0, 136, 11, 1, 0, 0, 0, 137, 138, 5, 10, 0, 0, 138, 139, 3, 16, 8, 0, 139, 142, 3, 0, 0, 0, 140, 143, 3, 20, 10, 0, 141, 143, 3, 18, 9, 0, 142, 140, 1, 0, 0, 0, 142, 141, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 13, 1, 0, 0, 0, 144, 145, 5, 11, 0, 0, 145, 146, 3, 16, 8, 0, 146, 147, 3, 0, 0, 0, 147, 15, 1, 0, 0, 0, 148, 149, 5, 27, 0, 0, 149, 150, 3, 44, 22, 0, 150, 151, 5, 28, 0, 0, 151, 17, 1, 0, 0, 0, 152, 153, 5, 12, 0, 0, 153, 154, 3, 12, 6, 0, 154, 19, 1, 0, 0, 0, 155, 156, 5, 12, 0, 0, 156, 157, 3, 0, 0, 0, 157, 21, 1, 0, 0, 0, 158, 159, 5, 23, 0, 0, 159, 160, 5, 43, 0, 0, 160, 161, 5, 35, 0, 0, 161, 23, 1, 0, 0, 0, 162, 163, 5, 24, 0, 0, 163, 164, 5, 43, 0, 0, 164, 165, 5, 35, 0, 0, 165, 25, 1, 0, 0, 0, 166, 167, 5, 3, 0, 0, 167, 168, 3, 8, 4, 0, 168, 27, 1, 0, 0, 0, 169, 170, 5, 2, 0, 0, 170, 171, 3, 30, 15, 0, 171, 172, 3, 0, 0, 0, 172, 29, 1, 0, 0, 0, 173, 174, 3, 56, 28, 0, 174, 175, 3, 48, 24, 0, 175, 31, 1, 0, 0, 0, 176, 177, 3, 56, 28, 0, 177, 178, 3, 34, 17, 0, 178, 33, 1, 0, 0, 0, 179, 181, 5, 27, 0, 0, 180, 182, 3, 38, 19, 0, 181, 180, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 187, 1, 0, 0, 0, 183, 184, 5, 33, 0, 0, 184, 186, 3, 38, 19, 0, 185, 183, 1, 0, 0, 0, 186, 189, 1, 0, 0, 0, 187, 185, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 190, 1, 0, 0, 0, 189, 187, 1, 0, 0, 0, 190, 191, 5, 28, 0, 0, 191, 35, 1, 0, 0, 0, 192, 193, 5, 5, 0, 0, 193, 194, 3, 38, 19, 0, 194, 195, 5, 35, 0, 0, 195, 199, 1, 0, 0, 0, 196, 197, 5, 5, 0, 0, 197, 199, 5, 35, 0, 0, 198, 192, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 37, 1, 0, 0, 0, 200, 202, 3, 56, 28, 0, 201, 203, 5, 19, 0, 0, 202, 201, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 206, 1, 0, 0, 0, 204, 206, 3, 42, 21, 0, 205, 200, 1, 0, 0, 0, 205, 204, 1, 0, 0, 0, 206, 39, 1, 0, 0, 0, 207, 210, 3, 44, 22, 0, 208, 210, 3, 32, 16, 0, 209, 207, 1, 0, 0, 0, 209, 208, 1, 0, 0, 0, 210, 41, 1, 0, 0, 0, 211, 212, 7, 0, 0, 0, 212, 43, 1, 0, 0, 0, 213, 214, 3, 38, 19, 0, 214, 215, 5, 18, 0, 0, 215, 216, 3, 38, 19, 0, 216, 45, 1, 0, 0, 0, 217, 218, 3, 38, 19, 0, 218, 219, 5, 27, 0, 0, 219, 220, 5, 44, 0, 0, 220, 221, 5, 28, 0, 0, 221, 47, 1, 0, 0, 0, 222, 223, 5, 27, 0, 0, 223, 236, 5, 28, 0, 0, 224, 225, 5, 27, 0, 0, 225, 230, 3, 46, 23, 0, 226, 227, 5, 33, 0, 0, 227, 229, 3, 46, 23, 0, 228, 226, 1, 0, 0, 0, 229, 232, 1, 0, 0, 0, 230, 228, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 233, 1, 0, 0, 0, 232, 230, 1, 0, 0, 0, 233, 234, 5, 28, 0, 0, 234, 236, 1, 0, 0, 0, 235, 222, 1, 0, 0, 0, 235, 224, 1, 0, 0, 0, 236, 49, 1, 0, 0, 0, 237, 238, 5, 6, 0, 0, 238, 239, 3, 56, 28, 0, 239, 240, 3, 52, 26, 0, 240, 51, 1, 0, 0, 0, 241, 245, 5, 31, 0, 0, 242, 244, 3, 8, 4, 0, 243, 242, 1, 0, 0, 0, 244, 247, 1, 0, 0, 0, 245, 243, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 248, 1, 0, 0, 0, 247, 245, 1, 0, 0, 0, 248, 249, 5, 32, 0, 0, 249, 53, 1, 0, 0, 0, 250, 251, 5, 29, 0, 0, 251, 252, 5, 42, 0, 0, 252, 253, 5, 30, 0, 0, 253, 55, 1, 0, 0, 0, 254, 255, 5, 44, 0, 0, 255, 257, 5, 34, 0, 0, 256, 254, 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 259, 5, 44, 0, 0, 259, 57, 1, 0, 0, 0, 19, 62, 68, 74, 106, 115, 123, 131, 135, 142, 181, 187, 198, 202, 205, 209, 230, 235, 245, 256] \ No newline at end of file +[4, 1, 43, 261, 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, 1, 0, 1, 0, 5, 0, 63, 8, 0, 10, 0, 12, 0, 66, 9, 0, 1, 0, 5, 0, 69, 8, 0, 10, 0, 12, 0, 72, 9, 0, 1, 0, 5, 0, 75, 8, 0, 10, 0, 12, 0, 78, 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, 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, 109, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 115, 8, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 124, 8, 4, 1, 4, 1, 4, 1, 4, 3, 4, 129, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 136, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 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, 11, 1, 11, 1, 11, 1, 11, 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, 16, 1, 16, 1, 16, 1, 17, 1, 17, 3, 17, 180, 8, 17, 1, 17, 1, 17, 5, 17, 184, 8, 17, 10, 17, 12, 17, 187, 9, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 197, 8, 18, 1, 19, 1, 19, 3, 19, 201, 8, 19, 1, 19, 3, 19, 204, 8, 19, 1, 20, 1, 20, 3, 20, 208, 8, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 225, 8, 24, 10, 24, 12, 24, 228, 9, 24, 1, 24, 1, 24, 3, 24, 232, 8, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 5, 26, 240, 8, 26, 10, 26, 12, 26, 243, 9, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 3, 29, 257, 8, 29, 1, 29, 1, 29, 1, 29, 0, 0, 30, 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, 0, 1, 1, 0, 41, 42, 258, 0, 60, 1, 0, 0, 0, 2, 81, 1, 0, 0, 0, 4, 88, 1, 0, 0, 0, 6, 108, 1, 0, 0, 0, 8, 128, 1, 0, 0, 0, 10, 130, 1, 0, 0, 0, 12, 137, 1, 0, 0, 0, 14, 141, 1, 0, 0, 0, 16, 145, 1, 0, 0, 0, 18, 148, 1, 0, 0, 0, 20, 151, 1, 0, 0, 0, 22, 155, 1, 0, 0, 0, 24, 159, 1, 0, 0, 0, 26, 162, 1, 0, 0, 0, 28, 167, 1, 0, 0, 0, 30, 171, 1, 0, 0, 0, 32, 174, 1, 0, 0, 0, 34, 177, 1, 0, 0, 0, 36, 196, 1, 0, 0, 0, 38, 203, 1, 0, 0, 0, 40, 207, 1, 0, 0, 0, 42, 209, 1, 0, 0, 0, 44, 211, 1, 0, 0, 0, 46, 215, 1, 0, 0, 0, 48, 231, 1, 0, 0, 0, 50, 233, 1, 0, 0, 0, 52, 237, 1, 0, 0, 0, 54, 246, 1, 0, 0, 0, 56, 250, 1, 0, 0, 0, 58, 256, 1, 0, 0, 0, 60, 64, 5, 28, 0, 0, 61, 63, 3, 2, 1, 0, 62, 61, 1, 0, 0, 0, 63, 66, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 64, 65, 1, 0, 0, 0, 65, 70, 1, 0, 0, 0, 66, 64, 1, 0, 0, 0, 67, 69, 3, 4, 2, 0, 68, 67, 1, 0, 0, 0, 69, 72, 1, 0, 0, 0, 70, 68, 1, 0, 0, 0, 70, 71, 1, 0, 0, 0, 71, 76, 1, 0, 0, 0, 72, 70, 1, 0, 0, 0, 73, 75, 3, 6, 3, 0, 74, 73, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 79, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 80, 5, 29, 0, 0, 80, 1, 1, 0, 0, 0, 81, 82, 5, 36, 0, 0, 82, 83, 5, 7, 0, 0, 83, 84, 5, 42, 0, 0, 84, 85, 5, 9, 0, 0, 85, 86, 3, 58, 29, 0, 86, 87, 5, 34, 0, 0, 87, 3, 1, 0, 0, 0, 88, 89, 5, 36, 0, 0, 89, 90, 5, 8, 0, 0, 90, 91, 5, 14, 0, 0, 91, 92, 5, 18, 0, 0, 92, 93, 3, 58, 29, 0, 93, 94, 5, 34, 0, 0, 94, 5, 1, 0, 0, 0, 95, 109, 3, 36, 18, 0, 96, 109, 3, 8, 4, 0, 97, 98, 3, 32, 16, 0, 98, 99, 5, 34, 0, 0, 99, 109, 1, 0, 0, 0, 100, 109, 3, 10, 5, 0, 101, 109, 3, 12, 6, 0, 102, 109, 3, 20, 10, 0, 103, 109, 3, 22, 11, 0, 104, 109, 3, 24, 12, 0, 105, 109, 3, 26, 13, 0, 106, 109, 3, 28, 14, 0, 107, 109, 3, 50, 25, 0, 108, 95, 1, 0, 0, 0, 108, 96, 1, 0, 0, 0, 108, 97, 1, 0, 0, 0, 108, 100, 1, 0, 0, 0, 108, 101, 1, 0, 0, 0, 108, 102, 1, 0, 0, 0, 108, 103, 1, 0, 0, 0, 108, 104, 1, 0, 0, 0, 108, 105, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 107, 1, 0, 0, 0, 109, 7, 1, 0, 0, 0, 110, 111, 5, 43, 0, 0, 111, 114, 5, 21, 0, 0, 112, 115, 3, 40, 20, 0, 113, 115, 3, 38, 19, 0, 114, 112, 1, 0, 0, 0, 114, 113, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 117, 3, 56, 28, 0, 117, 118, 5, 34, 0, 0, 118, 129, 1, 0, 0, 0, 119, 120, 5, 43, 0, 0, 120, 123, 5, 22, 0, 0, 121, 124, 3, 40, 20, 0, 122, 124, 3, 38, 19, 0, 123, 121, 1, 0, 0, 0, 123, 122, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 126, 3, 56, 28, 0, 126, 127, 5, 34, 0, 0, 127, 129, 1, 0, 0, 0, 128, 110, 1, 0, 0, 0, 128, 119, 1, 0, 0, 0, 129, 9, 1, 0, 0, 0, 130, 131, 5, 10, 0, 0, 131, 132, 3, 14, 7, 0, 132, 135, 3, 0, 0, 0, 133, 136, 3, 18, 9, 0, 134, 136, 3, 16, 8, 0, 135, 133, 1, 0, 0, 0, 135, 134, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 11, 1, 0, 0, 0, 137, 138, 5, 11, 0, 0, 138, 139, 3, 14, 7, 0, 139, 140, 3, 0, 0, 0, 140, 13, 1, 0, 0, 0, 141, 142, 5, 23, 0, 0, 142, 143, 3, 44, 22, 0, 143, 144, 5, 24, 0, 0, 144, 15, 1, 0, 0, 0, 145, 146, 5, 12, 0, 0, 146, 147, 3, 10, 5, 0, 147, 17, 1, 0, 0, 0, 148, 149, 5, 12, 0, 0, 149, 150, 3, 0, 0, 0, 150, 19, 1, 0, 0, 0, 151, 152, 5, 19, 0, 0, 152, 153, 5, 42, 0, 0, 153, 154, 5, 34, 0, 0, 154, 21, 1, 0, 0, 0, 155, 156, 5, 20, 0, 0, 156, 157, 5, 42, 0, 0, 157, 158, 5, 34, 0, 0, 158, 23, 1, 0, 0, 0, 159, 160, 5, 3, 0, 0, 160, 161, 3, 8, 4, 0, 161, 25, 1, 0, 0, 0, 162, 163, 5, 4, 0, 0, 163, 164, 5, 43, 0, 0, 164, 165, 3, 56, 28, 0, 165, 166, 5, 34, 0, 0, 166, 27, 1, 0, 0, 0, 167, 168, 5, 2, 0, 0, 168, 169, 3, 30, 15, 0, 169, 170, 3, 0, 0, 0, 170, 29, 1, 0, 0, 0, 171, 172, 3, 58, 29, 0, 172, 173, 3, 48, 24, 0, 173, 31, 1, 0, 0, 0, 174, 175, 3, 58, 29, 0, 175, 176, 3, 34, 17, 0, 176, 33, 1, 0, 0, 0, 177, 179, 5, 23, 0, 0, 178, 180, 3, 38, 19, 0, 179, 178, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 185, 1, 0, 0, 0, 181, 182, 5, 32, 0, 0, 182, 184, 3, 38, 19, 0, 183, 181, 1, 0, 0, 0, 184, 187, 1, 0, 0, 0, 185, 183, 1, 0, 0, 0, 185, 186, 1, 0, 0, 0, 186, 188, 1, 0, 0, 0, 187, 185, 1, 0, 0, 0, 188, 189, 5, 24, 0, 0, 189, 35, 1, 0, 0, 0, 190, 191, 5, 5, 0, 0, 191, 192, 3, 38, 19, 0, 192, 193, 5, 34, 0, 0, 193, 197, 1, 0, 0, 0, 194, 195, 5, 5, 0, 0, 195, 197, 5, 34, 0, 0, 196, 190, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 197, 37, 1, 0, 0, 0, 198, 200, 3, 58, 29, 0, 199, 201, 5, 15, 0, 0, 200, 199, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 204, 1, 0, 0, 0, 202, 204, 3, 42, 21, 0, 203, 198, 1, 0, 0, 0, 203, 202, 1, 0, 0, 0, 204, 39, 1, 0, 0, 0, 205, 208, 3, 44, 22, 0, 206, 208, 3, 32, 16, 0, 207, 205, 1, 0, 0, 0, 207, 206, 1, 0, 0, 0, 208, 41, 1, 0, 0, 0, 209, 210, 7, 0, 0, 0, 210, 43, 1, 0, 0, 0, 211, 212, 3, 38, 19, 0, 212, 213, 5, 14, 0, 0, 213, 214, 3, 38, 19, 0, 214, 45, 1, 0, 0, 0, 215, 216, 5, 43, 0, 0, 216, 217, 3, 56, 28, 0, 217, 47, 1, 0, 0, 0, 218, 219, 5, 23, 0, 0, 219, 232, 5, 24, 0, 0, 220, 221, 5, 23, 0, 0, 221, 226, 3, 46, 23, 0, 222, 223, 5, 32, 0, 0, 223, 225, 3, 46, 23, 0, 224, 222, 1, 0, 0, 0, 225, 228, 1, 0, 0, 0, 226, 224, 1, 0, 0, 0, 226, 227, 1, 0, 0, 0, 227, 229, 1, 0, 0, 0, 228, 226, 1, 0, 0, 0, 229, 230, 5, 24, 0, 0, 230, 232, 1, 0, 0, 0, 231, 218, 1, 0, 0, 0, 231, 220, 1, 0, 0, 0, 232, 49, 1, 0, 0, 0, 233, 234, 5, 6, 0, 0, 234, 235, 3, 58, 29, 0, 235, 236, 3, 52, 26, 0, 236, 51, 1, 0, 0, 0, 237, 241, 5, 28, 0, 0, 238, 240, 3, 26, 13, 0, 239, 238, 1, 0, 0, 0, 240, 243, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 244, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 244, 245, 5, 29, 0, 0, 245, 53, 1, 0, 0, 0, 246, 247, 5, 25, 0, 0, 247, 248, 3, 56, 28, 0, 248, 249, 5, 26, 0, 0, 249, 55, 1, 0, 0, 0, 250, 251, 5, 30, 0, 0, 251, 252, 3, 38, 19, 0, 252, 253, 5, 31, 0, 0, 253, 57, 1, 0, 0, 0, 254, 255, 5, 43, 0, 0, 255, 257, 5, 33, 0, 0, 256, 254, 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 259, 5, 43, 0, 0, 259, 59, 1, 0, 0, 0, 18, 64, 70, 76, 108, 114, 123, 128, 135, 179, 185, 196, 200, 203, 207, 226, 231, 241, 256] \ No newline at end of file diff --git a/Crimson/Antlr/Output/Crimson.tokens b/Crimson/Antlr/Output/Crimson.tokens index 5677047..3d08dde 100644 --- a/Crimson/Antlr/Output/Crimson.tokens +++ b/Crimson/Antlr/Output/Crimson.tokens @@ -1,7 +1,7 @@ Allocator=1 Function=2 Global=3 -Scoped=4 +Scope=4 Return=5 Structure=6 Using=7 @@ -11,41 +11,40 @@ 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 +Operator=14 +Asterisk=15 +MathsOperator=16 +Comparator=17 +RightArrow=18 +BasicCall=19 +AssemblyCall=20 +DirectEquals=21 +PointerEquals=22 +OpenBracket=23 +CloseBracket=24 +OpenSquare=25 +CloseSquare=26 +Colon=27 +OpenBrace=28 +CloseBrace=29 +OpenTriangle=30 +CloseTriangle=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 +'scope'=4 'return'=5 'structure'=6 'using'=7 @@ -55,24 +54,24 @@ ShortName=44 '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 +'*'=15 +'->'=18 +'B~'=19 +'A~'=20 +'='=21 +'*='=22 +'('=23 +')'=24 +'['=25 +']'=26 +':'=27 +'{'=28 +'}'=29 +'<'=30 +'>'=31 +','=32 +'.'=33 +';'=34 +'_'=35 +'#'=36 +'"'=37 diff --git a/Crimson/Antlr/Output/CrimsonBaseListener.cs b/Crimson/Antlr/Output/CrimsonBaseListener.cs index ffbc8f3..73ec8a8 100644 --- a/Crimson/Antlr/Output/CrimsonBaseListener.cs +++ b/Crimson/Antlr/Output/CrimsonBaseListener.cs @@ -73,20 +73,6 @@ 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 VariableDeclarationStatement - /// labeled alternative in . - /// The default implementation does nothing. - /// - /// The parse tree. - public virtual void EnterVariableDeclarationStatement([NotNull] CrimsonParser.VariableDeclarationStatementContext context) { } - /// - /// Exit a parse tree produced by the VariableDeclarationStatement - /// labeled alternative in . - /// The default implementation does nothing. - /// - /// The parse tree. - public virtual void ExitVariableDeclarationStatement([NotNull] CrimsonParser.VariableDeclarationStatementContext context) { } - /// /// Enter a parse tree produced by the ReturnStatement /// labeled alternative in . /// The default implementation does nothing. @@ -199,45 +185,47 @@ public virtual void EnterGlobalVariableStatement([NotNull] CrimsonParser.GlobalV /// The parse tree. public virtual void ExitGlobalVariableStatement([NotNull] CrimsonParser.GlobalVariableStatementContext context) { } /// - /// Enter a parse tree produced by the FunctionDeclarationStatement + /// Enter a parse tree produced by the ScopeVariableStatement /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context) { } + public virtual void EnterScopeVariableStatement([NotNull] CrimsonParser.ScopeVariableStatementContext context) { } /// - /// Exit a parse tree produced by the FunctionDeclarationStatement + /// Exit a parse tree produced by the ScopeVariableStatement /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context) { } + public virtual void ExitScopeVariableStatement([NotNull] CrimsonParser.ScopeVariableStatementContext context) { } /// - /// Enter a parse tree produced by the StructureDeclarationStatement + /// Enter a parse tree produced by the FunctionDeclarationStatement /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context) { } + public virtual void EnterFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context) { } /// - /// Exit a parse tree produced by the StructureDeclarationStatement + /// Exit a parse tree produced by the FunctionDeclarationStatement /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context) { } + public virtual void ExitFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context) { } /// - /// Enter a parse tree produced by . + /// Enter a parse tree produced by the StructureDeclarationStatement + /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterVariableDeclaration([NotNull] CrimsonParser.VariableDeclarationContext context) { } + public virtual void EnterStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context) { } /// - /// Exit a parse tree produced by . + /// Exit a parse tree produced by the StructureDeclarationStatement + /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitVariableDeclaration([NotNull] CrimsonParser.VariableDeclarationContext context) { } + public virtual void ExitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context) { } /// /// Enter a parse tree produced by the AssignVariableDirect /// labeled alternative in . @@ -363,6 +351,18 @@ public virtual void EnterGlobalVariableDeclaration([NotNull] CrimsonParser.Globa /// 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 EnterScopeVariableDeclaration([NotNull] CrimsonParser.ScopeVariableDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitScopeVariableDeclaration([NotNull] CrimsonParser.ScopeVariableDeclarationContext context) { } + /// /// Enter a parse tree produced by . /// The default implementation does nothing. /// @@ -531,6 +531,18 @@ public virtual void EnterArray([NotNull] CrimsonParser.ArrayContext context) { } /// The parse tree. public virtual void ExitArray([NotNull] CrimsonParser.ArrayContext context) { } /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDatasize([NotNull] CrimsonParser.DatasizeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDatasize([NotNull] CrimsonParser.DatasizeContext 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 431cc0f..8f13635 100644 --- a/Crimson/Antlr/Output/CrimsonBaseVisitor.cs +++ b/Crimson/Antlr/Output/CrimsonBaseVisitor.cs @@ -66,17 +66,6 @@ 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 VariableDeclarationStatement - /// labeled alternative in . - /// - /// The default implementation returns the result of calling - /// on . - /// - /// - /// The parse tree. - /// The visitor result. - public virtual Result VisitVariableDeclarationStatement([NotNull] CrimsonParser.VariableDeclarationStatementContext context) { return VisitChildren(context); } - /// /// Visit a parse tree produced by the ReturnStatement /// labeled alternative in . /// @@ -165,7 +154,7 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitorThe visitor result. public virtual Result VisitGlobalVariableStatement([NotNull] CrimsonParser.GlobalVariableStatementContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by the FunctionDeclarationStatement + /// Visit a parse tree produced by the ScopeVariableStatement /// labeled alternative in . /// /// The default implementation returns the result of calling @@ -174,9 +163,9 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor /// The parse tree. /// The visitor result. - public virtual Result VisitFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context) { return VisitChildren(context); } + public virtual Result VisitScopeVariableStatement([NotNull] CrimsonParser.ScopeVariableStatementContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by the StructureDeclarationStatement + /// Visit a parse tree produced by the FunctionDeclarationStatement /// labeled alternative in . /// /// The default implementation returns the result of calling @@ -185,9 +174,10 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor /// The parse tree. /// The visitor result. - public virtual Result VisitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context) { return VisitChildren(context); } + public virtual Result VisitFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by . + /// Visit a parse tree produced by the StructureDeclarationStatement + /// labeled alternative in . /// /// The default implementation returns the result of calling /// on . @@ -195,7 +185,7 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitor /// The parse tree. /// The visitor result. - public virtual Result VisitVariableDeclaration([NotNull] CrimsonParser.VariableDeclarationContext context) { return VisitChildren(context); } + public virtual Result VisitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context) { return VisitChildren(context); } /// /// Visit a parse tree produced by the AssignVariableDirect /// labeled alternative in . @@ -299,6 +289,16 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitorThe visitor result. public virtual Result VisitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext 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 VisitScopeVariableDeclaration([NotNull] CrimsonParser.ScopeVariableDeclarationContext context) { return VisitChildren(context); } + /// /// Visit a parse tree produced by . /// /// The default implementation returns the result of calling @@ -439,6 +439,16 @@ public partial class CrimsonBaseVisitor : AbstractParseTreeVisitorThe visitor result. public virtual Result VisitArray([NotNull] CrimsonParser.ArrayContext 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 VisitDatasize([NotNull] CrimsonParser.DatasizeContext 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 3bafe1a..7f29e78 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, 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, Scope=4, Return=5, Structure=6, Using=7, + OpHandler=8, As=9, If=10, While=11, Else=12, Elif=13, Operator=14, Asterisk=15, + MathsOperator=16, Comparator=17, RightArrow=18, BasicCall=19, AssemblyCall=20, + DirectEquals=21, PointerEquals=22, OpenBracket=23, CloseBracket=24, OpenSquare=25, + CloseSquare=26, Colon=27, OpenBrace=28, CloseBrace=29, OpenTriangle=30, + CloseTriangle=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,15 @@ public const int }; public static readonly string[] ruleNames = { - "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", + "Allocator", "Function", "Global", "Scope", "Return", "Structure", "Using", + "OpHandler", "As", "If", "While", "Else", "Elif", "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" + "CloseSquare", "Colon", "OpenBrace", "CloseBrace", "OpenTriangle", "CloseTriangle", + "Comma", "Dot", "SemiColon", "Underscore", "Hashtag", "Quote", "SkipTokens", + "LineComment", "BlockComment", "Number", "String", "ShortName", "Alphabetic", + "Digit", "Punctuation", "WhiteSpace", "Newline" }; @@ -74,21 +73,21 @@ public CrimsonLexer(ICharStream input, TextWriter output, TextWriter errorOutput } private static readonly string[] _LiteralNames = { - null, "'allocator'", "'function'", "'global'", "'scoped'", "'return'", + null, "'allocator'", "'function'", "'global'", "'scope'", "'return'", "'structure'", "'using'", "'ophandler'", "'as'", "'if'", "'while'", "'else'", - "'elif'", "'int'", "'bool'", "'null'", null, null, "'*'", null, null, - "'->'", "'B~'", "'A~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'", - "'}'", "','", "'.'", "';'", "'_'", "'#'", "'\"'" + "'elif'", null, "'*'", null, null, "'->'", "'B~'", "'A~'", "'='", "'*='", + "'('", "')'", "'['", "']'", "':'", "'{'", "'}'", "'<'", "'>'", "','", + "'.'", "';'", "'_'", "'#'", "'\"'" }; private static readonly string[] _SymbolicNames = { - 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" + null, "Allocator", "Function", "Global", "Scope", "Return", "Structure", + "Using", "OpHandler", "As", "If", "While", "Else", "Elif", "Operator", + "Asterisk", "MathsOperator", "Comparator", "RightArrow", "BasicCall", + "AssemblyCall", "DirectEquals", "PointerEquals", "OpenBracket", "CloseBracket", + "OpenSquare", "CloseSquare", "Colon", "OpenBrace", "CloseBrace", "OpenTriangle", + "CloseTriangle", "Comma", "Dot", "SemiColon", "Underscore", "Hashtag", + "Quote", "SkipTokens", "LineComment", "BlockComment", "Number", "String", + "ShortName" }; public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); @@ -118,129 +117,120 @@ static CrimsonLexer() { } } private static int[] _serializedATN = { - 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, + 4,0,43,355,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 + 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,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,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,3,13,203,8,13,1,14,1,14,1,15,1,15,1,16,1,16,1,17,1,17, + 1,18,1,18,1,18,1,18,3,18,217,8,18,1,19,1,19,1,19,1,20,1,20,1,20,1,21,1, + 21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,3,24,239, + 8,24,1,25,1,25,1,25,1,26,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,31,1,31,1,32,1,32,1,33,1,33,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,45,1,45,3,45,289,8,45,1,45,1,45,1,46,1,46,1, + 46,1,46,5,46,297,8,46,10,46,12,46,300,9,46,1,47,1,47,1,47,1,47,5,47,306, + 8,47,10,47,12,47,309,9,47,1,47,1,47,1,47,1,48,4,48,315,8,48,11,48,12,48, + 316,1,49,1,49,5,49,321,8,49,10,49,12,49,324,9,49,1,49,1,49,1,50,1,50,1, + 50,1,50,5,50,332,8,50,10,50,12,50,335,9,50,1,51,1,51,1,52,1,52,1,53,1, + 53,1,54,4,54,344,8,54,11,54,12,54,345,1,55,4,55,349,8,55,11,55,12,55,350, + 1,55,3,55,354,8,55,1,307,0,56,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,0,31,0,33,15,35,0,37,16,39,0,41,0,43, + 0,45,0,47,0,49,17,51,18,53,19,55,20,57,21,59,22,61,23,63,24,65,25,67,26, + 69,27,71,28,73,29,75,30,77,31,79,32,81,33,83,34,85,35,87,36,89,37,91,38, + 93,39,95,40,97,41,99,42,101,43,103,0,105,0,107,0,109,0,111,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,362,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,33,1,0,0,0,0,37,1,0,0, + 0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,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,1, + 113,1,0,0,0,3,123,1,0,0,0,5,132,1,0,0,0,7,139,1,0,0,0,9,145,1,0,0,0,11, + 152,1,0,0,0,13,162,1,0,0,0,15,168,1,0,0,0,17,178,1,0,0,0,19,181,1,0,0, + 0,21,184,1,0,0,0,23,190,1,0,0,0,25,195,1,0,0,0,27,202,1,0,0,0,29,204,1, + 0,0,0,31,206,1,0,0,0,33,208,1,0,0,0,35,210,1,0,0,0,37,216,1,0,0,0,39,218, + 1,0,0,0,41,221,1,0,0,0,43,224,1,0,0,0,45,227,1,0,0,0,47,230,1,0,0,0,49, + 238,1,0,0,0,51,240,1,0,0,0,53,243,1,0,0,0,55,246,1,0,0,0,57,249,1,0,0, + 0,59,251,1,0,0,0,61,254,1,0,0,0,63,256,1,0,0,0,65,258,1,0,0,0,67,260,1, + 0,0,0,69,262,1,0,0,0,71,264,1,0,0,0,73,266,1,0,0,0,75,268,1,0,0,0,77,270, + 1,0,0,0,79,272,1,0,0,0,81,274,1,0,0,0,83,276,1,0,0,0,85,278,1,0,0,0,87, + 280,1,0,0,0,89,282,1,0,0,0,91,288,1,0,0,0,93,292,1,0,0,0,95,301,1,0,0, + 0,97,314,1,0,0,0,99,318,1,0,0,0,101,327,1,0,0,0,103,336,1,0,0,0,105,338, + 1,0,0,0,107,340,1,0,0,0,109,343,1,0,0,0,111,353,1,0,0,0,113,114,5,97,0, + 0,114,115,5,108,0,0,115,116,5,108,0,0,116,117,5,111,0,0,117,118,5,99,0, + 0,118,119,5,97,0,0,119,120,5,116,0,0,120,121,5,111,0,0,121,122,5,114,0, + 0,122,2,1,0,0,0,123,124,5,102,0,0,124,125,5,117,0,0,125,126,5,110,0,0, + 126,127,5,99,0,0,127,128,5,116,0,0,128,129,5,105,0,0,129,130,5,111,0,0, + 130,131,5,110,0,0,131,4,1,0,0,0,132,133,5,103,0,0,133,134,5,108,0,0,134, + 135,5,111,0,0,135,136,5,98,0,0,136,137,5,97,0,0,137,138,5,108,0,0,138, + 6,1,0,0,0,139,140,5,115,0,0,140,141,5,99,0,0,141,142,5,111,0,0,142,143, + 5,112,0,0,143,144,5,101,0,0,144,8,1,0,0,0,145,146,5,114,0,0,146,147,5, + 101,0,0,147,148,5,116,0,0,148,149,5,117,0,0,149,150,5,114,0,0,150,151, + 5,110,0,0,151,10,1,0,0,0,152,153,5,115,0,0,153,154,5,116,0,0,154,155,5, + 114,0,0,155,156,5,117,0,0,156,157,5,99,0,0,157,158,5,116,0,0,158,159,5, + 117,0,0,159,160,5,114,0,0,160,161,5,101,0,0,161,12,1,0,0,0,162,163,5,117, + 0,0,163,164,5,115,0,0,164,165,5,105,0,0,165,166,5,110,0,0,166,167,5,103, + 0,0,167,14,1,0,0,0,168,169,5,111,0,0,169,170,5,112,0,0,170,171,5,104,0, + 0,171,172,5,97,0,0,172,173,5,110,0,0,173,174,5,100,0,0,174,175,5,108,0, + 0,175,176,5,101,0,0,176,177,5,114,0,0,177,16,1,0,0,0,178,179,5,97,0,0, + 179,180,5,115,0,0,180,18,1,0,0,0,181,182,5,105,0,0,182,183,5,102,0,0,183, + 20,1,0,0,0,184,185,5,119,0,0,185,186,5,104,0,0,186,187,5,105,0,0,187,188, + 5,108,0,0,188,189,5,101,0,0,189,22,1,0,0,0,190,191,5,101,0,0,191,192,5, + 108,0,0,192,193,5,115,0,0,193,194,5,101,0,0,194,24,1,0,0,0,195,196,5,101, + 0,0,196,197,5,108,0,0,197,198,5,105,0,0,198,199,5,102,0,0,199,26,1,0,0, + 0,200,203,3,49,24,0,201,203,3,37,18,0,202,200,1,0,0,0,202,201,1,0,0,0, + 203,28,1,0,0,0,204,205,5,43,0,0,205,30,1,0,0,0,206,207,5,45,0,0,207,32, + 1,0,0,0,208,209,5,42,0,0,209,34,1,0,0,0,210,211,5,47,0,0,211,36,1,0,0, + 0,212,217,3,29,14,0,213,217,3,31,15,0,214,217,3,33,16,0,215,217,3,35,17, + 0,216,212,1,0,0,0,216,213,1,0,0,0,216,214,1,0,0,0,216,215,1,0,0,0,217, + 38,1,0,0,0,218,219,5,63,0,0,219,220,5,60,0,0,220,40,1,0,0,0,221,222,5, + 60,0,0,222,223,5,61,0,0,223,42,1,0,0,0,224,225,5,63,0,0,225,226,5,62,0, + 0,226,44,1,0,0,0,227,228,5,62,0,0,228,229,5,61,0,0,229,46,1,0,0,0,230, + 231,5,61,0,0,231,232,5,61,0,0,232,48,1,0,0,0,233,239,3,39,19,0,234,239, + 3,41,20,0,235,239,3,43,21,0,236,239,3,45,22,0,237,239,3,47,23,0,238,233, + 1,0,0,0,238,234,1,0,0,0,238,235,1,0,0,0,238,236,1,0,0,0,238,237,1,0,0, + 0,239,50,1,0,0,0,240,241,5,45,0,0,241,242,5,62,0,0,242,52,1,0,0,0,243, + 244,5,66,0,0,244,245,5,126,0,0,245,54,1,0,0,0,246,247,5,65,0,0,247,248, + 5,126,0,0,248,56,1,0,0,0,249,250,5,61,0,0,250,58,1,0,0,0,251,252,5,42, + 0,0,252,253,5,61,0,0,253,60,1,0,0,0,254,255,5,40,0,0,255,62,1,0,0,0,256, + 257,5,41,0,0,257,64,1,0,0,0,258,259,5,91,0,0,259,66,1,0,0,0,260,261,5, + 93,0,0,261,68,1,0,0,0,262,263,5,58,0,0,263,70,1,0,0,0,264,265,5,123,0, + 0,265,72,1,0,0,0,266,267,5,125,0,0,267,74,1,0,0,0,268,269,5,60,0,0,269, + 76,1,0,0,0,270,271,5,62,0,0,271,78,1,0,0,0,272,273,5,44,0,0,273,80,1,0, + 0,0,274,275,5,46,0,0,275,82,1,0,0,0,276,277,5,59,0,0,277,84,1,0,0,0,278, + 279,5,95,0,0,279,86,1,0,0,0,280,281,5,35,0,0,281,88,1,0,0,0,282,283,5, + 34,0,0,283,90,1,0,0,0,284,289,3,109,54,0,285,289,3,111,55,0,286,289,3, + 93,46,0,287,289,3,95,47,0,288,284,1,0,0,0,288,285,1,0,0,0,288,286,1,0, + 0,0,288,287,1,0,0,0,289,290,1,0,0,0,290,291,6,45,0,0,291,92,1,0,0,0,292, + 293,5,47,0,0,293,294,5,47,0,0,294,298,1,0,0,0,295,297,8,0,0,0,296,295, + 1,0,0,0,297,300,1,0,0,0,298,296,1,0,0,0,298,299,1,0,0,0,299,94,1,0,0,0, + 300,298,1,0,0,0,301,302,5,47,0,0,302,303,5,42,0,0,303,307,1,0,0,0,304, + 306,9,0,0,0,305,304,1,0,0,0,306,309,1,0,0,0,307,308,1,0,0,0,307,305,1, + 0,0,0,308,310,1,0,0,0,309,307,1,0,0,0,310,311,5,42,0,0,311,312,5,47,0, + 0,312,96,1,0,0,0,313,315,3,105,52,0,314,313,1,0,0,0,315,316,1,0,0,0,316, + 314,1,0,0,0,316,317,1,0,0,0,317,98,1,0,0,0,318,322,3,89,44,0,319,321,8, + 1,0,0,320,319,1,0,0,0,321,324,1,0,0,0,322,320,1,0,0,0,322,323,1,0,0,0, + 323,325,1,0,0,0,324,322,1,0,0,0,325,326,3,89,44,0,326,100,1,0,0,0,327, + 333,3,103,51,0,328,332,3,103,51,0,329,332,3,97,48,0,330,332,3,85,42,0, + 331,328,1,0,0,0,331,329,1,0,0,0,331,330,1,0,0,0,332,335,1,0,0,0,333,331, + 1,0,0,0,333,334,1,0,0,0,334,102,1,0,0,0,335,333,1,0,0,0,336,337,7,2,0, + 0,337,104,1,0,0,0,338,339,7,3,0,0,339,106,1,0,0,0,340,341,7,4,0,0,341, + 108,1,0,0,0,342,344,7,5,0,0,343,342,1,0,0,0,344,345,1,0,0,0,345,343,1, + 0,0,0,345,346,1,0,0,0,346,110,1,0,0,0,347,349,7,0,0,0,348,347,1,0,0,0, + 349,350,1,0,0,0,350,348,1,0,0,0,350,351,1,0,0,0,351,354,1,0,0,0,352,354, + 5,0,0,1,353,348,1,0,0,0,353,352,1,0,0,0,354,112,1,0,0,0,14,0,202,216,238, + 288,298,307,316,322,331,333,345,350,353,1,6,0,0 }; public static readonly ATN _ATN = diff --git a/Crimson/Antlr/Output/CrimsonLexer.interp b/Crimson/Antlr/Output/CrimsonLexer.interp index 9c4594b..253681a 100644 --- a/Crimson/Antlr/Output/CrimsonLexer.interp +++ b/Crimson/Antlr/Output/CrimsonLexer.interp @@ -3,7 +3,7 @@ null 'allocator' 'function' 'global' -'scoped' +'scope' 'return' 'structure' 'using' @@ -13,10 +13,6 @@ null 'while' 'else' 'elif' -'int' -'bool' -'null' -null null '*' null @@ -30,8 +26,11 @@ null ')' '[' ']' +':' '{' '}' +'<' +'>' ',' '.' ';' @@ -50,7 +49,7 @@ null Allocator Function Global -Scoped +Scope Return Structure Using @@ -60,10 +59,6 @@ If While Else Elif -Integer -Boolean -Null -BooleanValue Operator Asterisk MathsOperator @@ -77,8 +72,11 @@ OpenBracket CloseBracket OpenSquare CloseSquare +Colon OpenBrace CloseBrace +OpenTriangle +CloseTriangle Comma Dot SemiColon @@ -96,7 +94,7 @@ rule names: Allocator Function Global -Scoped +Scope Return Structure Using @@ -106,12 +104,6 @@ If While Else Elif -Integer -Boolean -Null -True -False -BooleanValue Operator Plus Minus @@ -133,8 +125,11 @@ OpenBracket CloseBracket OpenSquare CloseSquare +Colon OpenBrace CloseBrace +OpenTriangle +CloseTriangle Comma Dot SemiColon @@ -161,4 +156,4 @@ mode names: DEFAULT_MODE atn: -[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 +[4, 0, 43, 355, 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, 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, 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, 3, 13, 203, 8, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 217, 8, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 239, 8, 24, 1, 25, 1, 25, 1, 25, 1, 26, 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, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 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, 45, 1, 45, 3, 45, 289, 8, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 297, 8, 46, 10, 46, 12, 46, 300, 9, 46, 1, 47, 1, 47, 1, 47, 1, 47, 5, 47, 306, 8, 47, 10, 47, 12, 47, 309, 9, 47, 1, 47, 1, 47, 1, 47, 1, 48, 4, 48, 315, 8, 48, 11, 48, 12, 48, 316, 1, 49, 1, 49, 5, 49, 321, 8, 49, 10, 49, 12, 49, 324, 9, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 5, 50, 332, 8, 50, 10, 50, 12, 50, 335, 9, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 4, 54, 344, 8, 54, 11, 54, 12, 54, 345, 1, 55, 4, 55, 349, 8, 55, 11, 55, 12, 55, 350, 1, 55, 3, 55, 354, 8, 55, 1, 307, 0, 56, 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, 0, 31, 0, 33, 15, 35, 0, 37, 16, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 17, 51, 18, 53, 19, 55, 20, 57, 21, 59, 22, 61, 23, 63, 24, 65, 25, 67, 26, 69, 27, 71, 28, 73, 29, 75, 30, 77, 31, 79, 32, 81, 33, 83, 34, 85, 35, 87, 36, 89, 37, 91, 38, 93, 39, 95, 40, 97, 41, 99, 42, 101, 43, 103, 0, 105, 0, 107, 0, 109, 0, 111, 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, 362, 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, 33, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 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, 1, 113, 1, 0, 0, 0, 3, 123, 1, 0, 0, 0, 5, 132, 1, 0, 0, 0, 7, 139, 1, 0, 0, 0, 9, 145, 1, 0, 0, 0, 11, 152, 1, 0, 0, 0, 13, 162, 1, 0, 0, 0, 15, 168, 1, 0, 0, 0, 17, 178, 1, 0, 0, 0, 19, 181, 1, 0, 0, 0, 21, 184, 1, 0, 0, 0, 23, 190, 1, 0, 0, 0, 25, 195, 1, 0, 0, 0, 27, 202, 1, 0, 0, 0, 29, 204, 1, 0, 0, 0, 31, 206, 1, 0, 0, 0, 33, 208, 1, 0, 0, 0, 35, 210, 1, 0, 0, 0, 37, 216, 1, 0, 0, 0, 39, 218, 1, 0, 0, 0, 41, 221, 1, 0, 0, 0, 43, 224, 1, 0, 0, 0, 45, 227, 1, 0, 0, 0, 47, 230, 1, 0, 0, 0, 49, 238, 1, 0, 0, 0, 51, 240, 1, 0, 0, 0, 53, 243, 1, 0, 0, 0, 55, 246, 1, 0, 0, 0, 57, 249, 1, 0, 0, 0, 59, 251, 1, 0, 0, 0, 61, 254, 1, 0, 0, 0, 63, 256, 1, 0, 0, 0, 65, 258, 1, 0, 0, 0, 67, 260, 1, 0, 0, 0, 69, 262, 1, 0, 0, 0, 71, 264, 1, 0, 0, 0, 73, 266, 1, 0, 0, 0, 75, 268, 1, 0, 0, 0, 77, 270, 1, 0, 0, 0, 79, 272, 1, 0, 0, 0, 81, 274, 1, 0, 0, 0, 83, 276, 1, 0, 0, 0, 85, 278, 1, 0, 0, 0, 87, 280, 1, 0, 0, 0, 89, 282, 1, 0, 0, 0, 91, 288, 1, 0, 0, 0, 93, 292, 1, 0, 0, 0, 95, 301, 1, 0, 0, 0, 97, 314, 1, 0, 0, 0, 99, 318, 1, 0, 0, 0, 101, 327, 1, 0, 0, 0, 103, 336, 1, 0, 0, 0, 105, 338, 1, 0, 0, 0, 107, 340, 1, 0, 0, 0, 109, 343, 1, 0, 0, 0, 111, 353, 1, 0, 0, 0, 113, 114, 5, 97, 0, 0, 114, 115, 5, 108, 0, 0, 115, 116, 5, 108, 0, 0, 116, 117, 5, 111, 0, 0, 117, 118, 5, 99, 0, 0, 118, 119, 5, 97, 0, 0, 119, 120, 5, 116, 0, 0, 120, 121, 5, 111, 0, 0, 121, 122, 5, 114, 0, 0, 122, 2, 1, 0, 0, 0, 123, 124, 5, 102, 0, 0, 124, 125, 5, 117, 0, 0, 125, 126, 5, 110, 0, 0, 126, 127, 5, 99, 0, 0, 127, 128, 5, 116, 0, 0, 128, 129, 5, 105, 0, 0, 129, 130, 5, 111, 0, 0, 130, 131, 5, 110, 0, 0, 131, 4, 1, 0, 0, 0, 132, 133, 5, 103, 0, 0, 133, 134, 5, 108, 0, 0, 134, 135, 5, 111, 0, 0, 135, 136, 5, 98, 0, 0, 136, 137, 5, 97, 0, 0, 137, 138, 5, 108, 0, 0, 138, 6, 1, 0, 0, 0, 139, 140, 5, 115, 0, 0, 140, 141, 5, 99, 0, 0, 141, 142, 5, 111, 0, 0, 142, 143, 5, 112, 0, 0, 143, 144, 5, 101, 0, 0, 144, 8, 1, 0, 0, 0, 145, 146, 5, 114, 0, 0, 146, 147, 5, 101, 0, 0, 147, 148, 5, 116, 0, 0, 148, 149, 5, 117, 0, 0, 149, 150, 5, 114, 0, 0, 150, 151, 5, 110, 0, 0, 151, 10, 1, 0, 0, 0, 152, 153, 5, 115, 0, 0, 153, 154, 5, 116, 0, 0, 154, 155, 5, 114, 0, 0, 155, 156, 5, 117, 0, 0, 156, 157, 5, 99, 0, 0, 157, 158, 5, 116, 0, 0, 158, 159, 5, 117, 0, 0, 159, 160, 5, 114, 0, 0, 160, 161, 5, 101, 0, 0, 161, 12, 1, 0, 0, 0, 162, 163, 5, 117, 0, 0, 163, 164, 5, 115, 0, 0, 164, 165, 5, 105, 0, 0, 165, 166, 5, 110, 0, 0, 166, 167, 5, 103, 0, 0, 167, 14, 1, 0, 0, 0, 168, 169, 5, 111, 0, 0, 169, 170, 5, 112, 0, 0, 170, 171, 5, 104, 0, 0, 171, 172, 5, 97, 0, 0, 172, 173, 5, 110, 0, 0, 173, 174, 5, 100, 0, 0, 174, 175, 5, 108, 0, 0, 175, 176, 5, 101, 0, 0, 176, 177, 5, 114, 0, 0, 177, 16, 1, 0, 0, 0, 178, 179, 5, 97, 0, 0, 179, 180, 5, 115, 0, 0, 180, 18, 1, 0, 0, 0, 181, 182, 5, 105, 0, 0, 182, 183, 5, 102, 0, 0, 183, 20, 1, 0, 0, 0, 184, 185, 5, 119, 0, 0, 185, 186, 5, 104, 0, 0, 186, 187, 5, 105, 0, 0, 187, 188, 5, 108, 0, 0, 188, 189, 5, 101, 0, 0, 189, 22, 1, 0, 0, 0, 190, 191, 5, 101, 0, 0, 191, 192, 5, 108, 0, 0, 192, 193, 5, 115, 0, 0, 193, 194, 5, 101, 0, 0, 194, 24, 1, 0, 0, 0, 195, 196, 5, 101, 0, 0, 196, 197, 5, 108, 0, 0, 197, 198, 5, 105, 0, 0, 198, 199, 5, 102, 0, 0, 199, 26, 1, 0, 0, 0, 200, 203, 3, 49, 24, 0, 201, 203, 3, 37, 18, 0, 202, 200, 1, 0, 0, 0, 202, 201, 1, 0, 0, 0, 203, 28, 1, 0, 0, 0, 204, 205, 5, 43, 0, 0, 205, 30, 1, 0, 0, 0, 206, 207, 5, 45, 0, 0, 207, 32, 1, 0, 0, 0, 208, 209, 5, 42, 0, 0, 209, 34, 1, 0, 0, 0, 210, 211, 5, 47, 0, 0, 211, 36, 1, 0, 0, 0, 212, 217, 3, 29, 14, 0, 213, 217, 3, 31, 15, 0, 214, 217, 3, 33, 16, 0, 215, 217, 3, 35, 17, 0, 216, 212, 1, 0, 0, 0, 216, 213, 1, 0, 0, 0, 216, 214, 1, 0, 0, 0, 216, 215, 1, 0, 0, 0, 217, 38, 1, 0, 0, 0, 218, 219, 5, 63, 0, 0, 219, 220, 5, 60, 0, 0, 220, 40, 1, 0, 0, 0, 221, 222, 5, 60, 0, 0, 222, 223, 5, 61, 0, 0, 223, 42, 1, 0, 0, 0, 224, 225, 5, 63, 0, 0, 225, 226, 5, 62, 0, 0, 226, 44, 1, 0, 0, 0, 227, 228, 5, 62, 0, 0, 228, 229, 5, 61, 0, 0, 229, 46, 1, 0, 0, 0, 230, 231, 5, 61, 0, 0, 231, 232, 5, 61, 0, 0, 232, 48, 1, 0, 0, 0, 233, 239, 3, 39, 19, 0, 234, 239, 3, 41, 20, 0, 235, 239, 3, 43, 21, 0, 236, 239, 3, 45, 22, 0, 237, 239, 3, 47, 23, 0, 238, 233, 1, 0, 0, 0, 238, 234, 1, 0, 0, 0, 238, 235, 1, 0, 0, 0, 238, 236, 1, 0, 0, 0, 238, 237, 1, 0, 0, 0, 239, 50, 1, 0, 0, 0, 240, 241, 5, 45, 0, 0, 241, 242, 5, 62, 0, 0, 242, 52, 1, 0, 0, 0, 243, 244, 5, 66, 0, 0, 244, 245, 5, 126, 0, 0, 245, 54, 1, 0, 0, 0, 246, 247, 5, 65, 0, 0, 247, 248, 5, 126, 0, 0, 248, 56, 1, 0, 0, 0, 249, 250, 5, 61, 0, 0, 250, 58, 1, 0, 0, 0, 251, 252, 5, 42, 0, 0, 252, 253, 5, 61, 0, 0, 253, 60, 1, 0, 0, 0, 254, 255, 5, 40, 0, 0, 255, 62, 1, 0, 0, 0, 256, 257, 5, 41, 0, 0, 257, 64, 1, 0, 0, 0, 258, 259, 5, 91, 0, 0, 259, 66, 1, 0, 0, 0, 260, 261, 5, 93, 0, 0, 261, 68, 1, 0, 0, 0, 262, 263, 5, 58, 0, 0, 263, 70, 1, 0, 0, 0, 264, 265, 5, 123, 0, 0, 265, 72, 1, 0, 0, 0, 266, 267, 5, 125, 0, 0, 267, 74, 1, 0, 0, 0, 268, 269, 5, 60, 0, 0, 269, 76, 1, 0, 0, 0, 270, 271, 5, 62, 0, 0, 271, 78, 1, 0, 0, 0, 272, 273, 5, 44, 0, 0, 273, 80, 1, 0, 0, 0, 274, 275, 5, 46, 0, 0, 275, 82, 1, 0, 0, 0, 276, 277, 5, 59, 0, 0, 277, 84, 1, 0, 0, 0, 278, 279, 5, 95, 0, 0, 279, 86, 1, 0, 0, 0, 280, 281, 5, 35, 0, 0, 281, 88, 1, 0, 0, 0, 282, 283, 5, 34, 0, 0, 283, 90, 1, 0, 0, 0, 284, 289, 3, 109, 54, 0, 285, 289, 3, 111, 55, 0, 286, 289, 3, 93, 46, 0, 287, 289, 3, 95, 47, 0, 288, 284, 1, 0, 0, 0, 288, 285, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 288, 287, 1, 0, 0, 0, 289, 290, 1, 0, 0, 0, 290, 291, 6, 45, 0, 0, 291, 92, 1, 0, 0, 0, 292, 293, 5, 47, 0, 0, 293, 294, 5, 47, 0, 0, 294, 298, 1, 0, 0, 0, 295, 297, 8, 0, 0, 0, 296, 295, 1, 0, 0, 0, 297, 300, 1, 0, 0, 0, 298, 296, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 94, 1, 0, 0, 0, 300, 298, 1, 0, 0, 0, 301, 302, 5, 47, 0, 0, 302, 303, 5, 42, 0, 0, 303, 307, 1, 0, 0, 0, 304, 306, 9, 0, 0, 0, 305, 304, 1, 0, 0, 0, 306, 309, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 307, 305, 1, 0, 0, 0, 308, 310, 1, 0, 0, 0, 309, 307, 1, 0, 0, 0, 310, 311, 5, 42, 0, 0, 311, 312, 5, 47, 0, 0, 312, 96, 1, 0, 0, 0, 313, 315, 3, 105, 52, 0, 314, 313, 1, 0, 0, 0, 315, 316, 1, 0, 0, 0, 316, 314, 1, 0, 0, 0, 316, 317, 1, 0, 0, 0, 317, 98, 1, 0, 0, 0, 318, 322, 3, 89, 44, 0, 319, 321, 8, 1, 0, 0, 320, 319, 1, 0, 0, 0, 321, 324, 1, 0, 0, 0, 322, 320, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 325, 1, 0, 0, 0, 324, 322, 1, 0, 0, 0, 325, 326, 3, 89, 44, 0, 326, 100, 1, 0, 0, 0, 327, 333, 3, 103, 51, 0, 328, 332, 3, 103, 51, 0, 329, 332, 3, 97, 48, 0, 330, 332, 3, 85, 42, 0, 331, 328, 1, 0, 0, 0, 331, 329, 1, 0, 0, 0, 331, 330, 1, 0, 0, 0, 332, 335, 1, 0, 0, 0, 333, 331, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 102, 1, 0, 0, 0, 335, 333, 1, 0, 0, 0, 336, 337, 7, 2, 0, 0, 337, 104, 1, 0, 0, 0, 338, 339, 7, 3, 0, 0, 339, 106, 1, 0, 0, 0, 340, 341, 7, 4, 0, 0, 341, 108, 1, 0, 0, 0, 342, 344, 7, 5, 0, 0, 343, 342, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 110, 1, 0, 0, 0, 347, 349, 7, 0, 0, 0, 348, 347, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 354, 1, 0, 0, 0, 352, 354, 5, 0, 0, 1, 353, 348, 1, 0, 0, 0, 353, 352, 1, 0, 0, 0, 354, 112, 1, 0, 0, 0, 14, 0, 202, 216, 238, 288, 298, 307, 316, 322, 331, 333, 345, 350, 353, 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 5677047..3d08dde 100644 --- a/Crimson/Antlr/Output/CrimsonLexer.tokens +++ b/Crimson/Antlr/Output/CrimsonLexer.tokens @@ -1,7 +1,7 @@ Allocator=1 Function=2 Global=3 -Scoped=4 +Scope=4 Return=5 Structure=6 Using=7 @@ -11,41 +11,40 @@ 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 +Operator=14 +Asterisk=15 +MathsOperator=16 +Comparator=17 +RightArrow=18 +BasicCall=19 +AssemblyCall=20 +DirectEquals=21 +PointerEquals=22 +OpenBracket=23 +CloseBracket=24 +OpenSquare=25 +CloseSquare=26 +Colon=27 +OpenBrace=28 +CloseBrace=29 +OpenTriangle=30 +CloseTriangle=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 +'scope'=4 'return'=5 'structure'=6 'using'=7 @@ -55,24 +54,24 @@ ShortName=44 '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 +'*'=15 +'->'=18 +'B~'=19 +'A~'=20 +'='=21 +'*='=22 +'('=23 +')'=24 +'['=25 +']'=26 +':'=27 +'{'=28 +'}'=29 +'<'=30 +'>'=31 +','=32 +'.'=33 +';'=34 +'_'=35 +'#'=36 +'"'=37 diff --git a/Crimson/Antlr/Output/CrimsonListener.cs b/Crimson/Antlr/Output/CrimsonListener.cs index 76c96bd..8a8a437 100644 --- a/Crimson/Antlr/Output/CrimsonListener.cs +++ b/Crimson/Antlr/Output/CrimsonListener.cs @@ -62,18 +62,6 @@ public interface ICrimsonListener : IParseTreeListener { /// The parse tree. void ExitOperationHandler([NotNull] CrimsonParser.OperationHandlerContext context); /// - /// Enter a parse tree produced by the VariableDeclarationStatement - /// labeled alternative in . - /// - /// The parse tree. - void EnterVariableDeclarationStatement([NotNull] CrimsonParser.VariableDeclarationStatementContext context); - /// - /// Exit a parse tree produced by the VariableDeclarationStatement - /// labeled alternative in . - /// - /// The parse tree. - void ExitVariableDeclarationStatement([NotNull] CrimsonParser.VariableDeclarationStatementContext context); - /// /// Enter a parse tree produced by the ReturnStatement /// labeled alternative in . /// @@ -170,6 +158,18 @@ public interface ICrimsonListener : IParseTreeListener { /// The parse tree. void ExitGlobalVariableStatement([NotNull] CrimsonParser.GlobalVariableStatementContext context); /// + /// Enter a parse tree produced by the ScopeVariableStatement + /// labeled alternative in . + /// + /// The parse tree. + void EnterScopeVariableStatement([NotNull] CrimsonParser.ScopeVariableStatementContext context); + /// + /// Exit a parse tree produced by the ScopeVariableStatement + /// labeled alternative in . + /// + /// The parse tree. + void ExitScopeVariableStatement([NotNull] CrimsonParser.ScopeVariableStatementContext context); + /// /// Enter a parse tree produced by the FunctionDeclarationStatement /// labeled alternative in . /// @@ -194,16 +194,6 @@ public interface ICrimsonListener : IParseTreeListener { /// The parse tree. void ExitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context); /// - /// Enter a parse tree produced by . - /// - /// The parse tree. - void EnterVariableDeclaration([NotNull] CrimsonParser.VariableDeclarationContext context); - /// - /// Exit a parse tree produced by . - /// - /// The parse tree. - void ExitVariableDeclaration([NotNull] CrimsonParser.VariableDeclarationContext context); - /// /// Enter a parse tree produced by the AssignVariableDirect /// labeled alternative in . /// @@ -308,6 +298,16 @@ public interface ICrimsonListener : IParseTreeListener { /// The parse tree. void ExitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context); /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterScopeVariableDeclaration([NotNull] CrimsonParser.ScopeVariableDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitScopeVariableDeclaration([NotNull] CrimsonParser.ScopeVariableDeclarationContext context); + /// /// Enter a parse tree produced by . /// /// The parse tree. @@ -448,6 +448,16 @@ public interface ICrimsonListener : IParseTreeListener { /// The parse tree. void ExitArray([NotNull] CrimsonParser.ArrayContext context); /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDatasize([NotNull] CrimsonParser.DatasizeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDatasize([NotNull] CrimsonParser.DatasizeContext 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 7660f9e..00261bb 100644 --- a/Crimson/Antlr/Output/CrimsonParser.cs +++ b/Crimson/Antlr/Output/CrimsonParser.cs @@ -37,50 +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, 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, Scope=4, Return=5, Structure=6, Using=7, + OpHandler=8, As=9, If=10, While=11, Else=12, Elif=13, Operator=14, Asterisk=15, + MathsOperator=16, Comparator=17, RightArrow=18, BasicCall=19, AssemblyCall=20, + DirectEquals=21, PointerEquals=22, OpenBracket=23, CloseBracket=24, OpenSquare=25, + CloseSquare=26, Colon=27, OpenBrace=28, CloseBrace=29, OpenTriangle=30, + CloseTriangle=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_scope = 0, RULE_importUnit = 1, RULE_operationHandler = 2, RULE_statement = 3, - RULE_variableDeclaration = 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_assignVariable = 4, RULE_ifBlock = 5, RULE_whileBlock = 6, RULE_condition = 7, + RULE_elseIfBlock = 8, RULE_elseBlock = 9, RULE_basicCall = 10, RULE_assemblyCall = 11, + RULE_globalVariableDeclaration = 12, RULE_scopeVariableDeclaration = 13, RULE_functionDeclaration = 14, RULE_functionHeader = 15, RULE_functionCall = 16, RULE_arguments = 17, RULE_functionReturn = 18, RULE_simpleValue = 19, RULE_complexValue = 20, RULE_rawValue = 21, RULE_operation = 22, RULE_parameter = 23, RULE_parameterList = 24, RULE_structureDeclaration = 25, RULE_structureBody = 26, - RULE_array = 27, RULE_fullName = 28; + RULE_array = 27, RULE_datasize = 28, RULE_fullName = 29; public static readonly string[] ruleNames = { - "scope", "importUnit", "operationHandler", "statement", "variableDeclaration", - "assignVariable", "ifBlock", "whileBlock", "condition", "elseIfBlock", - "elseBlock", "basicCall", "assemblyCall", "globalVariableDeclaration", + "scope", "importUnit", "operationHandler", "statement", "assignVariable", + "ifBlock", "whileBlock", "condition", "elseIfBlock", "elseBlock", "basicCall", + "assemblyCall", "globalVariableDeclaration", "scopeVariableDeclaration", "functionDeclaration", "functionHeader", "functionCall", "arguments", "functionReturn", "simpleValue", "complexValue", "rawValue", "operation", "parameter", "parameterList", "structureDeclaration", "structureBody", - "array", "fullName" + "array", "datasize", "fullName" }; private static readonly string[] _LiteralNames = { - null, "'allocator'", "'function'", "'global'", "'scoped'", "'return'", + null, "'allocator'", "'function'", "'global'", "'scope'", "'return'", "'structure'", "'using'", "'ophandler'", "'as'", "'if'", "'while'", "'else'", - "'elif'", "'int'", "'bool'", "'null'", null, null, "'*'", null, null, - "'->'", "'B~'", "'A~'", "'='", "'*='", "'('", "')'", "'['", "']'", "'{'", - "'}'", "','", "'.'", "';'", "'_'", "'#'", "'\"'" + "'elif'", null, "'*'", null, null, "'->'", "'B~'", "'A~'", "'='", "'*='", + "'('", "')'", "'['", "']'", "':'", "'{'", "'}'", "'<'", "'>'", "','", + "'.'", "';'", "'_'", "'#'", "'\"'" }; private static readonly string[] _SymbolicNames = { - 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" + null, "Allocator", "Function", "Global", "Scope", "Return", "Structure", + "Using", "OpHandler", "As", "If", "While", "Else", "Elif", "Operator", + "Asterisk", "MathsOperator", "Comparator", "RightArrow", "BasicCall", + "AssemblyCall", "DirectEquals", "PointerEquals", "OpenBracket", "CloseBracket", + "OpenSquare", "CloseSquare", "Colon", "OpenBrace", "CloseBrace", "OpenTriangle", + "CloseTriangle", "Comma", "Dot", "SemiColon", "Underscore", "Hashtag", + "Quote", "SkipTokens", "LineComment", "BlockComment", "Number", "String", + "ShortName" }; public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); @@ -173,56 +173,56 @@ public ScopeContext scope() { int _alt; EnterOuterAlt(_localctx, 1); { - State = 58; + State = 60; Match(OpenBrace); - State = 62; + State = 64; 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 = 59; + State = 61; _localctx._importUnit = importUnit(); _localctx._imports.Add(_localctx._importUnit); } } } - State = 64; + State = 66; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,0,Context); } - State = 68; + State = 70; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==Hashtag) { { { - State = 65; + State = 67; _localctx._operationHandler = operationHandler(); _localctx._opHandlers.Add(_localctx._operationHandler); } } - State = 70; + State = 72; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 74; + State = 76; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - while (((_la) & ~0x3f) == 0 && ((1L << _la) & 17592211213420L) != 0) { + while (((_la) & ~0x3f) == 0 && ((1L << _la) & 8796094598268L) != 0) { { { - State = 71; + State = 73; _localctx._statement = statement(); _localctx._statements.Add(_localctx._statement); } } - State = 76; + State = 78; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 77; + State = 79; Match(CloseBrace); } } @@ -278,17 +278,17 @@ public ImportUnitContext importUnit() { try { EnterOuterAlt(_localctx, 1); { - State = 79; + State = 81; Match(Hashtag); - State = 80; + State = 82; Match(Using); - State = 81; + State = 83; _localctx.path = Match(String); - State = 82; + State = 84; Match(As); - State = 83; + State = 85; _localctx.identifier = fullName(); - State = 84; + State = 86; Match(SemiColon); } } @@ -344,17 +344,17 @@ public OperationHandlerContext operationHandler() { try { EnterOuterAlt(_localctx, 1); { - State = 86; + State = 88; Match(Hashtag); - State = 87; + State = 89; Match(OpHandler); - State = 88; + State = 90; _localctx.op = Match(Operator); - State = 89; + State = 91; Match(RightArrow); - State = 90; + State = 92; _localctx.identifier = fullName(); - State = 91; + State = 93; Match(SemiColon); } } @@ -381,6 +381,28 @@ public virtual void CopyFrom(StatementContext context) { base.CopyFrom(context); } } + public partial class ScopeVariableStatementContext : StatementContext { + [System.Diagnostics.DebuggerNonUserCode] public ScopeVariableDeclarationContext scopeVariableDeclaration() { + return GetRuleContext(0); + } + public ScopeVariableStatementContext(StatementContext context) { CopyFrom(context); } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.EnterScopeVariableStatement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.ExitScopeVariableStatement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; + if (typedVisitor != null) return typedVisitor.VisitScopeVariableStatement(this); + else return visitor.VisitChildren(this); + } + } public partial class StructureDeclarationStatementContext : StatementContext { [System.Diagnostics.DebuggerNonUserCode] public StructureDeclarationContext structureDeclaration() { return GetRuleContext(0); @@ -536,28 +558,6 @@ public override TResult Accept(IParseTreeVisitor visitor) { else return visitor.VisitChildren(this); } } - public partial class VariableDeclarationStatementContext : StatementContext { - [System.Diagnostics.DebuggerNonUserCode] public VariableDeclarationContext variableDeclaration() { - return GetRuleContext(0); - } - public VariableDeclarationStatementContext(StatementContext context) { CopyFrom(context); } - [System.Diagnostics.DebuggerNonUserCode] - public override void EnterRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterVariableDeclarationStatement(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override void ExitRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitVariableDeclarationStatement(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitVariableDeclarationStatement(this); - else return visitor.VisitChildren(this); - } - } public partial class WhileStatementContext : StatementContext { [System.Diagnostics.DebuggerNonUserCode] public WhileBlockContext whileBlock() { return GetRuleContext(0); @@ -630,88 +630,88 @@ public StatementContext statement() { StatementContext _localctx = new StatementContext(Context, State); EnterRule(_localctx, 6, RULE_statement); try { - State = 106; + State = 108; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,3,Context) ) { case 1: - _localctx = new VariableDeclarationStatementContext(_localctx); + _localctx = new ReturnStatementContext(_localctx); EnterOuterAlt(_localctx, 1); { - State = 93; - variableDeclaration(); + State = 95; + functionReturn(); } break; case 2: - _localctx = new ReturnStatementContext(_localctx); + _localctx = new AssignVariableStatementContext(_localctx); EnterOuterAlt(_localctx, 2); { - State = 94; - functionReturn(); + State = 96; + assignVariable(); } break; case 3: - _localctx = new AssignVariableStatementContext(_localctx); + _localctx = new FunctionCallStatementContext(_localctx); EnterOuterAlt(_localctx, 3); { - State = 95; - assignVariable(); + State = 97; + functionCall(); + State = 98; + Match(SemiColon); } break; case 4: - _localctx = new FunctionCallStatementContext(_localctx); + _localctx = new IfStatementContext(_localctx); EnterOuterAlt(_localctx, 4); { - State = 96; - functionCall(); - State = 97; - Match(SemiColon); + State = 100; + ifBlock(); } break; case 5: - _localctx = new IfStatementContext(_localctx); + _localctx = new WhileStatementContext(_localctx); EnterOuterAlt(_localctx, 5); { - State = 99; - ifBlock(); + State = 101; + whileBlock(); } break; case 6: - _localctx = new WhileStatementContext(_localctx); + _localctx = new BasicCallStatementContext(_localctx); EnterOuterAlt(_localctx, 6); { - State = 100; - whileBlock(); + State = 102; + basicCall(); } break; case 7: - _localctx = new BasicCallStatementContext(_localctx); + _localctx = new AssemblyCallStatementContext(_localctx); EnterOuterAlt(_localctx, 7); { - State = 101; - basicCall(); + State = 103; + assemblyCall(); } break; case 8: - _localctx = new AssemblyCallStatementContext(_localctx); + _localctx = new GlobalVariableStatementContext(_localctx); EnterOuterAlt(_localctx, 8); { - State = 102; - assemblyCall(); + State = 104; + globalVariableDeclaration(); } break; case 9: - _localctx = new GlobalVariableStatementContext(_localctx); + _localctx = new ScopeVariableStatementContext(_localctx); EnterOuterAlt(_localctx, 9); { - State = 103; - globalVariableDeclaration(); + State = 105; + scopeVariableDeclaration(); } break; case 10: _localctx = new FunctionDeclarationStatementContext(_localctx); EnterOuterAlt(_localctx, 10); { - State = 104; + State = 106; functionDeclaration(); } break; @@ -719,7 +719,7 @@ public StatementContext statement() { _localctx = new StructureDeclarationStatementContext(_localctx); EnterOuterAlt(_localctx, 11); { - State = 105; + State = 107; structureDeclaration(); } break; @@ -736,98 +736,6 @@ public StatementContext statement() { return _localctx; } - public partial class VariableDeclarationContext : ParserRuleContext { - public FullNameContext name; - public SimpleValueContext size; - public ComplexValueContext complex; - public SimpleValueContext simple; - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpenBracket() { return GetToken(CrimsonParser.OpenBracket, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CloseBracket() { return GetToken(CrimsonParser.CloseBracket, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DirectEquals() { return GetToken(CrimsonParser.DirectEquals, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SemiColon() { return GetToken(CrimsonParser.SemiColon, 0); } - [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { - return GetRuleContext(0); - } - [System.Diagnostics.DebuggerNonUserCode] public SimpleValueContext[] simpleValue() { - return GetRuleContexts(); - } - [System.Diagnostics.DebuggerNonUserCode] public SimpleValueContext simpleValue(int i) { - return GetRuleContext(i); - } - [System.Diagnostics.DebuggerNonUserCode] public ComplexValueContext complexValue() { - return GetRuleContext(0); - } - public VariableDeclarationContext(ParserRuleContext parent, int invokingState) - : base(parent, invokingState) - { - } - public override int RuleIndex { get { return RULE_variableDeclaration; } } - [System.Diagnostics.DebuggerNonUserCode] - public override void EnterRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.EnterVariableDeclaration(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override void ExitRule(IParseTreeListener listener) { - ICrimsonListener typedListener = listener as ICrimsonListener; - if (typedListener != null) typedListener.ExitVariableDeclaration(this); - } - [System.Diagnostics.DebuggerNonUserCode] - public override TResult Accept(IParseTreeVisitor visitor) { - ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; - if (typedVisitor != null) return typedVisitor.VisitVariableDeclaration(this); - else return visitor.VisitChildren(this); - } - } - - [RuleVersion(0)] - public VariableDeclarationContext variableDeclaration() { - VariableDeclarationContext _localctx = new VariableDeclarationContext(Context, State); - EnterRule(_localctx, 8, RULE_variableDeclaration); - try { - EnterOuterAlt(_localctx, 1); - { - State = 108; - _localctx.name = fullName(); - State = 109; - Match(OpenBracket); - State = 110; - _localctx.size = simpleValue(); - State = 111; - Match(CloseBracket); - State = 112; - Match(DirectEquals); - State = 115; - ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,4,Context) ) { - case 1: - { - State = 113; - _localctx.complex = complexValue(); - } - break; - case 2: - { - State = 114; - _localctx.simple = simpleValue(); - } - break; - } - State = 117; - Match(SemiColon); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - ErrorHandler.ReportError(this, re); - ErrorHandler.Recover(this, re); - } - finally { - ExitRule(); - } - return _localctx; - } - public partial class AssignVariableContext : ParserRuleContext { public AssignVariableContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) @@ -841,13 +749,15 @@ public virtual void CopyFrom(AssignVariableContext context) { } } public partial class AssignVariableAtPointerContext : AssignVariableContext { - public FullNameContext name; + public IToken name; public ComplexValueContext complex; public SimpleValueContext simple; + public DatasizeContext size; [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PointerEquals() { return GetToken(CrimsonParser.PointerEquals, 0); } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SemiColon() { return GetToken(CrimsonParser.SemiColon, 0); } - [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { - return GetRuleContext(0); + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ShortName() { return GetToken(CrimsonParser.ShortName, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DatasizeContext datasize() { + return GetRuleContext(0); } [System.Diagnostics.DebuggerNonUserCode] public ComplexValueContext complexValue() { return GetRuleContext(0); @@ -874,13 +784,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { } } public partial class AssignVariableDirectContext : AssignVariableContext { - public FullNameContext name; + public IToken name; public ComplexValueContext complex; public SimpleValueContext simple; + public DatasizeContext size; [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DirectEquals() { return GetToken(CrimsonParser.DirectEquals, 0); } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SemiColon() { return GetToken(CrimsonParser.SemiColon, 0); } - [System.Diagnostics.DebuggerNonUserCode] public FullNameContext fullName() { - return GetRuleContext(0); + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ShortName() { return GetToken(CrimsonParser.ShortName, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DatasizeContext datasize() { + return GetRuleContext(0); } [System.Diagnostics.DebuggerNonUserCode] public ComplexValueContext complexValue() { return GetRuleContext(0); @@ -910,36 +822,38 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public AssignVariableContext assignVariable() { AssignVariableContext _localctx = new AssignVariableContext(Context, State); - EnterRule(_localctx, 10, RULE_assignVariable); + EnterRule(_localctx, 8, RULE_assignVariable); try { - State = 135; + State = 128; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,7,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,6,Context) ) { case 1: _localctx = new AssignVariableDirectContext(_localctx); EnterOuterAlt(_localctx, 1); { - State = 119; - ((AssignVariableDirectContext)_localctx).name = fullName(); - State = 120; + State = 110; + ((AssignVariableDirectContext)_localctx).name = Match(ShortName); + State = 111; Match(DirectEquals); - State = 123; + State = 114; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,5,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,4,Context) ) { case 1: { - State = 121; + State = 112; ((AssignVariableDirectContext)_localctx).complex = complexValue(); } break; case 2: { - State = 122; + State = 113; ((AssignVariableDirectContext)_localctx).simple = simpleValue(); } break; } - State = 125; + State = 116; + ((AssignVariableDirectContext)_localctx).size = datasize(); + State = 117; Match(SemiColon); } break; @@ -947,27 +861,29 @@ public AssignVariableContext assignVariable() { _localctx = new AssignVariableAtPointerContext(_localctx); EnterOuterAlt(_localctx, 2); { - State = 127; - ((AssignVariableAtPointerContext)_localctx).name = fullName(); - State = 128; + State = 119; + ((AssignVariableAtPointerContext)_localctx).name = Match(ShortName); + State = 120; Match(PointerEquals); - State = 131; + State = 123; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,6,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,5,Context) ) { case 1: { - State = 129; + State = 121; ((AssignVariableAtPointerContext)_localctx).complex = complexValue(); } break; case 2: { - State = 130; + State = 122; ((AssignVariableAtPointerContext)_localctx).simple = simpleValue(); } break; } - State = 133; + State = 125; + ((AssignVariableAtPointerContext)_localctx).size = datasize(); + State = 126; Match(SemiColon); } break; @@ -1024,28 +940,28 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public IfBlockContext ifBlock() { IfBlockContext _localctx = new IfBlockContext(Context, State); - EnterRule(_localctx, 12, RULE_ifBlock); + EnterRule(_localctx, 10, RULE_ifBlock); try { EnterOuterAlt(_localctx, 1); { - State = 137; + State = 130; Match(If); - State = 138; + State = 131; condition(); - State = 139; + State = 132; scope(); - State = 142; + State = 135; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,8,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,7,Context) ) { case 1: { - State = 140; + State = 133; elseBlock(); } break; case 2: { - State = 141; + State = 134; elseIfBlock(); } break; @@ -1097,15 +1013,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public WhileBlockContext whileBlock() { WhileBlockContext _localctx = new WhileBlockContext(Context, State); - EnterRule(_localctx, 14, RULE_whileBlock); + EnterRule(_localctx, 12, RULE_whileBlock); try { EnterOuterAlt(_localctx, 1); { - State = 144; + State = 137; Match(While); - State = 145; + State = 138; condition(); - State = 146; + State = 139; scope(); } } @@ -1153,15 +1069,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ConditionContext condition() { ConditionContext _localctx = new ConditionContext(Context, State); - EnterRule(_localctx, 16, RULE_condition); + EnterRule(_localctx, 14, RULE_condition); try { EnterOuterAlt(_localctx, 1); { - State = 148; + State = 141; Match(OpenBracket); - State = 149; + State = 142; _localctx.op = operation(); - State = 150; + State = 143; Match(CloseBracket); } } @@ -1207,13 +1123,13 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ElseIfBlockContext elseIfBlock() { ElseIfBlockContext _localctx = new ElseIfBlockContext(Context, State); - EnterRule(_localctx, 18, RULE_elseIfBlock); + EnterRule(_localctx, 16, RULE_elseIfBlock); try { EnterOuterAlt(_localctx, 1); { - State = 152; + State = 145; Match(Else); - State = 153; + State = 146; ifBlock(); } } @@ -1259,13 +1175,13 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public ElseBlockContext elseBlock() { ElseBlockContext _localctx = new ElseBlockContext(Context, State); - EnterRule(_localctx, 20, RULE_elseBlock); + EnterRule(_localctx, 18, RULE_elseBlock); try { EnterOuterAlt(_localctx, 1); { - State = 155; + State = 148; Match(Else); - State = 156; + State = 149; scope(); } } @@ -1311,15 +1227,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public BasicCallContext basicCall() { BasicCallContext _localctx = new BasicCallContext(Context, State); - EnterRule(_localctx, 22, RULE_basicCall); + EnterRule(_localctx, 20, RULE_basicCall); try { EnterOuterAlt(_localctx, 1); { - State = 158; + State = 151; Match(BasicCall); - State = 159; + State = 152; _localctx.basicText = Match(String); - State = 160; + State = 153; Match(SemiColon); } } @@ -1365,15 +1281,15 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public AssemblyCallContext assemblyCall() { AssemblyCallContext _localctx = new AssemblyCallContext(Context, State); - EnterRule(_localctx, 24, RULE_assemblyCall); + EnterRule(_localctx, 22, RULE_assemblyCall); try { EnterOuterAlt(_localctx, 1); { - State = 162; + State = 155; Match(AssemblyCall); - State = 163; + State = 156; _localctx.assemblyText = Match(String); - State = 164; + State = 157; Match(SemiColon); } } @@ -1389,10 +1305,10 @@ public AssemblyCallContext assemblyCall() { } public partial class GlobalVariableDeclarationContext : ParserRuleContext { - public VariableDeclarationContext declaration; + public AssignVariableContext assignment; [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Global() { return GetToken(CrimsonParser.Global, 0); } - [System.Diagnostics.DebuggerNonUserCode] public VariableDeclarationContext variableDeclaration() { - return GetRuleContext(0); + [System.Diagnostics.DebuggerNonUserCode] public AssignVariableContext assignVariable() { + return GetRuleContext(0); } public GlobalVariableDeclarationContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) @@ -1420,14 +1336,74 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public GlobalVariableDeclarationContext globalVariableDeclaration() { GlobalVariableDeclarationContext _localctx = new GlobalVariableDeclarationContext(Context, State); - EnterRule(_localctx, 26, RULE_globalVariableDeclaration); + EnterRule(_localctx, 24, RULE_globalVariableDeclaration); try { EnterOuterAlt(_localctx, 1); { - State = 166; + State = 159; Match(Global); - State = 167; - _localctx.declaration = variableDeclaration(); + State = 160; + _localctx.assignment = assignVariable(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ScopeVariableDeclarationContext : ParserRuleContext { + public IToken name; + public DatasizeContext size; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Scope() { return GetToken(CrimsonParser.Scope, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SemiColon() { return GetToken(CrimsonParser.SemiColon, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ShortName() { return GetToken(CrimsonParser.ShortName, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DatasizeContext datasize() { + return GetRuleContext(0); + } + public ScopeVariableDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_scopeVariableDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.EnterScopeVariableDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.ExitScopeVariableDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; + if (typedVisitor != null) return typedVisitor.VisitScopeVariableDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ScopeVariableDeclarationContext scopeVariableDeclaration() { + ScopeVariableDeclarationContext _localctx = new ScopeVariableDeclarationContext(Context, State); + EnterRule(_localctx, 26, RULE_scopeVariableDeclaration); + try { + EnterOuterAlt(_localctx, 1); + { + State = 162; + Match(Scope); + State = 163; + _localctx.name = Match(ShortName); + State = 164; + _localctx.size = datasize(); + State = 165; + Match(SemiColon); } } catch (RecognitionException re) { @@ -1481,11 +1457,11 @@ public FunctionDeclarationContext functionDeclaration() { try { EnterOuterAlt(_localctx, 1); { - State = 169; + State = 167; Match(Function); - State = 170; + State = 168; _localctx.header = functionHeader(); - State = 171; + State = 169; _localctx.body = scope(); } } @@ -1539,9 +1515,9 @@ public FunctionHeaderContext functionHeader() { try { EnterOuterAlt(_localctx, 1); { - State = 173; + State = 171; _localctx.name = fullName(); - State = 174; + State = 172; _localctx.parameters = parameterList(); } } @@ -1595,9 +1571,9 @@ public FunctionCallContext functionCall() { try { EnterOuterAlt(_localctx, 1); { - State = 176; + State = 174; _localctx.name = fullName(); - State = 177; + State = 175; _localctx.args = arguments(); } } @@ -1656,37 +1632,37 @@ public ArgumentsContext arguments() { try { EnterOuterAlt(_localctx, 1); { - State = 179; + State = 177; Match(OpenBracket); - State = 181; + State = 179; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - if (((_la) & ~0x3f) == 0 && ((1L << _la) & 21990232752128L) != 0) { + if (((_la) & ~0x3f) == 0 && ((1L << _la) & 15393162788864L) != 0) { { - State = 180; + State = 178; simpleValue(); } } - State = 187; + State = 185; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==Comma) { { { - State = 183; + State = 181; Match(Comma); { - State = 184; + State = 182; simpleValue(); } } } - State = 189; + State = 187; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 190; + State = 188; Match(CloseBracket); } } @@ -1735,26 +1711,26 @@ public FunctionReturnContext functionReturn() { FunctionReturnContext _localctx = new FunctionReturnContext(Context, State); EnterRule(_localctx, 36, RULE_functionReturn); try { - State = 198; + State = 196; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,11,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,10,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 192; + State = 190; Match(Return); - State = 193; + State = 191; simpleValue(); - State = 194; + State = 192; Match(SemiColon); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 196; + State = 194; Match(Return); - State = 197; + State = 195; Match(SemiColon); } break; @@ -1811,32 +1787,31 @@ public SimpleValueContext simpleValue() { EnterRule(_localctx, 38, RULE_simpleValue); int _la; try { - State = 205; + State = 203; ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { case ShortName: EnterOuterAlt(_localctx, 1); { - State = 200; + State = 198; _localctx.id = fullName(); - State = 202; + State = 200; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==Asterisk) { { - State = 201; + State = 199; _localctx.pointer = Match(Asterisk); } } } break; - case Null: - case BooleanValue: case Number: + case String: EnterOuterAlt(_localctx, 2); { - State = 204; + State = 202; _localctx.raw = rawValue(); } break; @@ -1892,20 +1867,20 @@ public ComplexValueContext complexValue() { ComplexValueContext _localctx = new ComplexValueContext(Context, State); EnterRule(_localctx, 40, RULE_complexValue); try { - State = 209; + State = 207; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,13,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 207; + State = 205; _localctx.op = operation(); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 208; + State = 206; _localctx.func = functionCall(); } break; @@ -1923,9 +1898,8 @@ public ComplexValueContext complexValue() { } public partial class RawValueContext : ParserRuleContext { - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Null() { return GetToken(CrimsonParser.Null, 0); } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Number() { return GetToken(CrimsonParser.Number, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BooleanValue() { return GetToken(CrimsonParser.BooleanValue, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode String() { return GetToken(CrimsonParser.String, 0); } public RawValueContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { @@ -1957,9 +1931,9 @@ public RawValueContext rawValue() { try { EnterOuterAlt(_localctx, 1); { - State = 211; + State = 209; _la = TokenStream.LA(1); - if ( !(((_la) & ~0x3f) == 0 && ((1L << _la) & 4398046707712L) != 0) ) { + if ( !(_la==Number || _la==String) ) { ErrorHandler.RecoverInline(this); } else { @@ -2020,11 +1994,11 @@ public OperationContext operation() { try { EnterOuterAlt(_localctx, 1); { - State = 213; + State = 211; _localctx.leftValue = simpleValue(); - State = 214; + State = 212; _localctx.@operator = Match(Operator); - State = 215; + State = 213; _localctx.rightValue = simpleValue(); } } @@ -2040,14 +2014,12 @@ public OperationContext operation() { } public partial class ParameterContext : ParserRuleContext { - public SimpleValueContext size; public IToken name; - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpenBracket() { return GetToken(CrimsonParser.OpenBracket, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CloseBracket() { return GetToken(CrimsonParser.CloseBracket, 0); } - [System.Diagnostics.DebuggerNonUserCode] public SimpleValueContext simpleValue() { - return GetRuleContext(0); - } + public DatasizeContext size; [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ShortName() { return GetToken(CrimsonParser.ShortName, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DatasizeContext datasize() { + return GetRuleContext(0); + } public ParameterContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { @@ -2078,14 +2050,10 @@ public ParameterContext parameter() { try { EnterOuterAlt(_localctx, 1); { - State = 217; - _localctx.size = simpleValue(); - State = 218; - Match(OpenBracket); - State = 219; + State = 215; _localctx.name = Match(ShortName); - State = 220; - Match(CloseBracket); + State = 216; + _localctx.size = datasize(); } } catch (RecognitionException re) { @@ -2141,42 +2109,42 @@ public ParameterListContext parameterList() { EnterRule(_localctx, 48, RULE_parameterList); int _la; try { - State = 235; + State = 231; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,16,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,15,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 222; + State = 218; Match(OpenBracket); - State = 223; + State = 219; Match(CloseBracket); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 224; + State = 220; Match(OpenBracket); - State = 225; + State = 221; parameter(); - State = 230; + State = 226; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==Comma) { { { - State = 226; + State = 222; Match(Comma); - State = 227; + State = 223; parameter(); } } - State = 232; + State = 228; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 233; + State = 229; Match(CloseBracket); } break; @@ -2233,11 +2201,11 @@ public StructureDeclarationContext structureDeclaration() { try { EnterOuterAlt(_localctx, 1); { - State = 237; + State = 233; Match(Structure); - State = 238; + State = 234; _localctx.name = fullName(); - State = 239; + State = 235; _localctx.body = structureBody(); } } @@ -2255,11 +2223,11 @@ public StructureDeclarationContext structureDeclaration() { public partial class StructureBodyContext : ParserRuleContext { [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 VariableDeclarationContext[] variableDeclaration() { - return GetRuleContexts(); + [System.Diagnostics.DebuggerNonUserCode] public ScopeVariableDeclarationContext[] scopeVariableDeclaration() { + return GetRuleContexts(); } - [System.Diagnostics.DebuggerNonUserCode] public VariableDeclarationContext variableDeclaration(int i) { - return GetRuleContext(i); + [System.Diagnostics.DebuggerNonUserCode] public ScopeVariableDeclarationContext scopeVariableDeclaration(int i) { + return GetRuleContext(i); } public StructureBodyContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) @@ -2292,23 +2260,23 @@ public StructureBodyContext structureBody() { try { EnterOuterAlt(_localctx, 1); { - State = 241; + State = 237; Match(OpenBrace); - State = 245; + State = 241; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - while (_la==ShortName) { + while (_la==Scope) { { { - State = 242; - variableDeclaration(); + State = 238; + scopeVariableDeclaration(); } } - State = 247; + State = 243; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } - State = 248; + State = 244; Match(CloseBrace); } } @@ -2324,10 +2292,12 @@ public StructureBodyContext structureBody() { } public partial class ArrayContext : ParserRuleContext { - public IToken blockSize; + public DatasizeContext blockSize; [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpenSquare() { return GetToken(CrimsonParser.OpenSquare, 0); } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CloseSquare() { return GetToken(CrimsonParser.CloseSquare, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Number() { return GetToken(CrimsonParser.Number, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DatasizeContext datasize() { + return GetRuleContext(0); + } public ArrayContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { @@ -2358,12 +2328,68 @@ public ArrayContext array() { try { EnterOuterAlt(_localctx, 1); { - State = 250; + State = 246; Match(OpenSquare); + State = 247; + _localctx.blockSize = datasize(); + State = 248; + Match(CloseSquare); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DatasizeContext : ParserRuleContext { + public SimpleValueContext sizeVal; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OpenTriangle() { return GetToken(CrimsonParser.OpenTriangle, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CloseTriangle() { return GetToken(CrimsonParser.CloseTriangle, 0); } + [System.Diagnostics.DebuggerNonUserCode] public SimpleValueContext simpleValue() { + return GetRuleContext(0); + } + public DatasizeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_datasize; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.EnterDatasize(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ICrimsonListener typedListener = listener as ICrimsonListener; + if (typedListener != null) typedListener.ExitDatasize(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ICrimsonVisitor typedVisitor = visitor as ICrimsonVisitor; + if (typedVisitor != null) return typedVisitor.VisitDatasize(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DatasizeContext datasize() { + DatasizeContext _localctx = new DatasizeContext(Context, State); + EnterRule(_localctx, 56, RULE_datasize); + try { + EnterOuterAlt(_localctx, 1); + { + State = 250; + Match(OpenTriangle); State = 251; - _localctx.blockSize = Match(Number); + _localctx.sizeVal = simpleValue(); State = 252; - Match(CloseSquare); + Match(CloseTriangle); } } catch (RecognitionException re) { @@ -2411,13 +2437,13 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public FullNameContext fullName() { FullNameContext _localctx = new FullNameContext(Context, State); - EnterRule(_localctx, 56, RULE_fullName); + EnterRule(_localctx, 58, RULE_fullName); try { EnterOuterAlt(_localctx, 1); { State = 256; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,18,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,17,Context) ) { case 1: { State = 254; @@ -2443,86 +2469,86 @@ public FullNameContext fullName() { } private static int[] _serializedATN = { - 4,1,44,261,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,261,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, - 1,0,1,0,5,0,61,8,0,10,0,12,0,64,9,0,1,0,5,0,67,8,0,10,0,12,0,70,9,0,1, - 0,5,0,73,8,0,10,0,12,0,76,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,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,107,8,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,3,4,116,8,4,1,4,1,4,1,5, - 1,5,1,5,1,5,3,5,124,8,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,132,8,5,1,5,1,5,3, - 5,136,8,5,1,6,1,6,1,6,1,6,1,6,3,6,143,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,14,1,15,1,15,1,15,1,16,1,16,1,16,1,17, - 1,17,3,17,182,8,17,1,17,1,17,5,17,186,8,17,10,17,12,17,189,9,17,1,17,1, - 17,1,18,1,18,1,18,1,18,1,18,1,18,3,18,199,8,18,1,19,1,19,3,19,203,8,19, - 1,19,3,19,206,8,19,1,20,1,20,3,20,210,8,20,1,21,1,21,1,22,1,22,1,22,1, - 22,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,5,24,229,8,24, - 10,24,12,24,232,9,24,1,24,1,24,3,24,236,8,24,1,25,1,25,1,25,1,25,1,26, - 1,26,5,26,244,8,26,10,26,12,26,247,9,26,1,26,1,26,1,27,1,27,1,27,1,27, - 1,28,1,28,3,28,257,8,28,1,28,1,28,1,28,0,0,29,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,0,1,2,0,16,17, - 42,42,260,0,58,1,0,0,0,2,79,1,0,0,0,4,86,1,0,0,0,6,106,1,0,0,0,8,108,1, - 0,0,0,10,135,1,0,0,0,12,137,1,0,0,0,14,144,1,0,0,0,16,148,1,0,0,0,18,152, - 1,0,0,0,20,155,1,0,0,0,22,158,1,0,0,0,24,162,1,0,0,0,26,166,1,0,0,0,28, - 169,1,0,0,0,30,173,1,0,0,0,32,176,1,0,0,0,34,179,1,0,0,0,36,198,1,0,0, - 0,38,205,1,0,0,0,40,209,1,0,0,0,42,211,1,0,0,0,44,213,1,0,0,0,46,217,1, - 0,0,0,48,235,1,0,0,0,50,237,1,0,0,0,52,241,1,0,0,0,54,250,1,0,0,0,56,256, - 1,0,0,0,58,62,5,31,0,0,59,61,3,2,1,0,60,59,1,0,0,0,61,64,1,0,0,0,62,60, - 1,0,0,0,62,63,1,0,0,0,63,68,1,0,0,0,64,62,1,0,0,0,65,67,3,4,2,0,66,65, - 1,0,0,0,67,70,1,0,0,0,68,66,1,0,0,0,68,69,1,0,0,0,69,74,1,0,0,0,70,68, - 1,0,0,0,71,73,3,6,3,0,72,71,1,0,0,0,73,76,1,0,0,0,74,72,1,0,0,0,74,75, - 1,0,0,0,75,77,1,0,0,0,76,74,1,0,0,0,77,78,5,32,0,0,78,1,1,0,0,0,79,80, - 5,37,0,0,80,81,5,7,0,0,81,82,5,43,0,0,82,83,5,9,0,0,83,84,3,56,28,0,84, - 85,5,35,0,0,85,3,1,0,0,0,86,87,5,37,0,0,87,88,5,8,0,0,88,89,5,18,0,0,89, - 90,5,22,0,0,90,91,3,56,28,0,91,92,5,35,0,0,92,5,1,0,0,0,93,107,3,8,4,0, - 94,107,3,36,18,0,95,107,3,10,5,0,96,97,3,32,16,0,97,98,5,35,0,0,98,107, - 1,0,0,0,99,107,3,12,6,0,100,107,3,14,7,0,101,107,3,22,11,0,102,107,3,24, - 12,0,103,107,3,26,13,0,104,107,3,28,14,0,105,107,3,50,25,0,106,93,1,0, - 0,0,106,94,1,0,0,0,106,95,1,0,0,0,106,96,1,0,0,0,106,99,1,0,0,0,106,100, - 1,0,0,0,106,101,1,0,0,0,106,102,1,0,0,0,106,103,1,0,0,0,106,104,1,0,0, - 0,106,105,1,0,0,0,107,7,1,0,0,0,108,109,3,56,28,0,109,110,5,27,0,0,110, - 111,3,38,19,0,111,112,5,28,0,0,112,115,5,25,0,0,113,116,3,40,20,0,114, - 116,3,38,19,0,115,113,1,0,0,0,115,114,1,0,0,0,116,117,1,0,0,0,117,118, - 5,35,0,0,118,9,1,0,0,0,119,120,3,56,28,0,120,123,5,25,0,0,121,124,3,40, - 20,0,122,124,3,38,19,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,136,1,0,0,0,127,128,3,56,28,0,128,131,5,26,0,0,129, - 132,3,40,20,0,130,132,3,38,19,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,136,1,0,0,0,135,119,1,0,0,0,135,127,1,0,0, - 0,136,11,1,0,0,0,137,138,5,10,0,0,138,139,3,16,8,0,139,142,3,0,0,0,140, - 143,3,20,10,0,141,143,3,18,9,0,142,140,1,0,0,0,142,141,1,0,0,0,142,143, - 1,0,0,0,143,13,1,0,0,0,144,145,5,11,0,0,145,146,3,16,8,0,146,147,3,0,0, - 0,147,15,1,0,0,0,148,149,5,27,0,0,149,150,3,44,22,0,150,151,5,28,0,0,151, - 17,1,0,0,0,152,153,5,12,0,0,153,154,3,12,6,0,154,19,1,0,0,0,155,156,5, - 12,0,0,156,157,3,0,0,0,157,21,1,0,0,0,158,159,5,23,0,0,159,160,5,43,0, - 0,160,161,5,35,0,0,161,23,1,0,0,0,162,163,5,24,0,0,163,164,5,43,0,0,164, - 165,5,35,0,0,165,25,1,0,0,0,166,167,5,3,0,0,167,168,3,8,4,0,168,27,1,0, - 0,0,169,170,5,2,0,0,170,171,3,30,15,0,171,172,3,0,0,0,172,29,1,0,0,0,173, - 174,3,56,28,0,174,175,3,48,24,0,175,31,1,0,0,0,176,177,3,56,28,0,177,178, - 3,34,17,0,178,33,1,0,0,0,179,181,5,27,0,0,180,182,3,38,19,0,181,180,1, - 0,0,0,181,182,1,0,0,0,182,187,1,0,0,0,183,184,5,33,0,0,184,186,3,38,19, - 0,185,183,1,0,0,0,186,189,1,0,0,0,187,185,1,0,0,0,187,188,1,0,0,0,188, - 190,1,0,0,0,189,187,1,0,0,0,190,191,5,28,0,0,191,35,1,0,0,0,192,193,5, - 5,0,0,193,194,3,38,19,0,194,195,5,35,0,0,195,199,1,0,0,0,196,197,5,5,0, - 0,197,199,5,35,0,0,198,192,1,0,0,0,198,196,1,0,0,0,199,37,1,0,0,0,200, - 202,3,56,28,0,201,203,5,19,0,0,202,201,1,0,0,0,202,203,1,0,0,0,203,206, - 1,0,0,0,204,206,3,42,21,0,205,200,1,0,0,0,205,204,1,0,0,0,206,39,1,0,0, - 0,207,210,3,44,22,0,208,210,3,32,16,0,209,207,1,0,0,0,209,208,1,0,0,0, - 210,41,1,0,0,0,211,212,7,0,0,0,212,43,1,0,0,0,213,214,3,38,19,0,214,215, - 5,18,0,0,215,216,3,38,19,0,216,45,1,0,0,0,217,218,3,38,19,0,218,219,5, - 27,0,0,219,220,5,44,0,0,220,221,5,28,0,0,221,47,1,0,0,0,222,223,5,27,0, - 0,223,236,5,28,0,0,224,225,5,27,0,0,225,230,3,46,23,0,226,227,5,33,0,0, - 227,229,3,46,23,0,228,226,1,0,0,0,229,232,1,0,0,0,230,228,1,0,0,0,230, - 231,1,0,0,0,231,233,1,0,0,0,232,230,1,0,0,0,233,234,5,28,0,0,234,236,1, - 0,0,0,235,222,1,0,0,0,235,224,1,0,0,0,236,49,1,0,0,0,237,238,5,6,0,0,238, - 239,3,56,28,0,239,240,3,52,26,0,240,51,1,0,0,0,241,245,5,31,0,0,242,244, - 3,8,4,0,243,242,1,0,0,0,244,247,1,0,0,0,245,243,1,0,0,0,245,246,1,0,0, - 0,246,248,1,0,0,0,247,245,1,0,0,0,248,249,5,32,0,0,249,53,1,0,0,0,250, - 251,5,29,0,0,251,252,5,42,0,0,252,253,5,30,0,0,253,55,1,0,0,0,254,255, - 5,44,0,0,255,257,5,34,0,0,256,254,1,0,0,0,256,257,1,0,0,0,257,258,1,0, - 0,0,258,259,5,44,0,0,259,57,1,0,0,0,19,62,68,74,106,115,123,131,135,142, - 181,187,198,202,205,209,230,235,245,256 + 2,29,7,29,1,0,1,0,5,0,63,8,0,10,0,12,0,66,9,0,1,0,5,0,69,8,0,10,0,12,0, + 72,9,0,1,0,5,0,75,8,0,10,0,12,0,78,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,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,109,8,3,1,4,1,4,1,4,1,4,3,4,115,8,4,1,4,1,4,1,4,1,4, + 1,4,1,4,1,4,3,4,124,8,4,1,4,1,4,1,4,3,4,129,8,4,1,5,1,5,1,5,1,5,1,5,3, + 5,136,8,5,1,6,1,6,1,6,1,6,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,11,1,11,1,11,1,11,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,16,1,16,1,16,1,17,1,17,3,17, + 180,8,17,1,17,1,17,5,17,184,8,17,10,17,12,17,187,9,17,1,17,1,17,1,18,1, + 18,1,18,1,18,1,18,1,18,3,18,197,8,18,1,19,1,19,3,19,201,8,19,1,19,3,19, + 204,8,19,1,20,1,20,3,20,208,8,20,1,21,1,21,1,22,1,22,1,22,1,22,1,23,1, + 23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,5,24,225,8,24,10,24,12,24,228,9, + 24,1,24,1,24,3,24,232,8,24,1,25,1,25,1,25,1,25,1,26,1,26,5,26,240,8,26, + 10,26,12,26,243,9,26,1,26,1,26,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28, + 1,29,1,29,3,29,257,8,29,1,29,1,29,1,29,0,0,30,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,0,1,1,0,41, + 42,258,0,60,1,0,0,0,2,81,1,0,0,0,4,88,1,0,0,0,6,108,1,0,0,0,8,128,1,0, + 0,0,10,130,1,0,0,0,12,137,1,0,0,0,14,141,1,0,0,0,16,145,1,0,0,0,18,148, + 1,0,0,0,20,151,1,0,0,0,22,155,1,0,0,0,24,159,1,0,0,0,26,162,1,0,0,0,28, + 167,1,0,0,0,30,171,1,0,0,0,32,174,1,0,0,0,34,177,1,0,0,0,36,196,1,0,0, + 0,38,203,1,0,0,0,40,207,1,0,0,0,42,209,1,0,0,0,44,211,1,0,0,0,46,215,1, + 0,0,0,48,231,1,0,0,0,50,233,1,0,0,0,52,237,1,0,0,0,54,246,1,0,0,0,56,250, + 1,0,0,0,58,256,1,0,0,0,60,64,5,28,0,0,61,63,3,2,1,0,62,61,1,0,0,0,63,66, + 1,0,0,0,64,62,1,0,0,0,64,65,1,0,0,0,65,70,1,0,0,0,66,64,1,0,0,0,67,69, + 3,4,2,0,68,67,1,0,0,0,69,72,1,0,0,0,70,68,1,0,0,0,70,71,1,0,0,0,71,76, + 1,0,0,0,72,70,1,0,0,0,73,75,3,6,3,0,74,73,1,0,0,0,75,78,1,0,0,0,76,74, + 1,0,0,0,76,77,1,0,0,0,77,79,1,0,0,0,78,76,1,0,0,0,79,80,5,29,0,0,80,1, + 1,0,0,0,81,82,5,36,0,0,82,83,5,7,0,0,83,84,5,42,0,0,84,85,5,9,0,0,85,86, + 3,58,29,0,86,87,5,34,0,0,87,3,1,0,0,0,88,89,5,36,0,0,89,90,5,8,0,0,90, + 91,5,14,0,0,91,92,5,18,0,0,92,93,3,58,29,0,93,94,5,34,0,0,94,5,1,0,0,0, + 95,109,3,36,18,0,96,109,3,8,4,0,97,98,3,32,16,0,98,99,5,34,0,0,99,109, + 1,0,0,0,100,109,3,10,5,0,101,109,3,12,6,0,102,109,3,20,10,0,103,109,3, + 22,11,0,104,109,3,24,12,0,105,109,3,26,13,0,106,109,3,28,14,0,107,109, + 3,50,25,0,108,95,1,0,0,0,108,96,1,0,0,0,108,97,1,0,0,0,108,100,1,0,0,0, + 108,101,1,0,0,0,108,102,1,0,0,0,108,103,1,0,0,0,108,104,1,0,0,0,108,105, + 1,0,0,0,108,106,1,0,0,0,108,107,1,0,0,0,109,7,1,0,0,0,110,111,5,43,0,0, + 111,114,5,21,0,0,112,115,3,40,20,0,113,115,3,38,19,0,114,112,1,0,0,0,114, + 113,1,0,0,0,115,116,1,0,0,0,116,117,3,56,28,0,117,118,5,34,0,0,118,129, + 1,0,0,0,119,120,5,43,0,0,120,123,5,22,0,0,121,124,3,40,20,0,122,124,3, + 38,19,0,123,121,1,0,0,0,123,122,1,0,0,0,124,125,1,0,0,0,125,126,3,56,28, + 0,126,127,5,34,0,0,127,129,1,0,0,0,128,110,1,0,0,0,128,119,1,0,0,0,129, + 9,1,0,0,0,130,131,5,10,0,0,131,132,3,14,7,0,132,135,3,0,0,0,133,136,3, + 18,9,0,134,136,3,16,8,0,135,133,1,0,0,0,135,134,1,0,0,0,135,136,1,0,0, + 0,136,11,1,0,0,0,137,138,5,11,0,0,138,139,3,14,7,0,139,140,3,0,0,0,140, + 13,1,0,0,0,141,142,5,23,0,0,142,143,3,44,22,0,143,144,5,24,0,0,144,15, + 1,0,0,0,145,146,5,12,0,0,146,147,3,10,5,0,147,17,1,0,0,0,148,149,5,12, + 0,0,149,150,3,0,0,0,150,19,1,0,0,0,151,152,5,19,0,0,152,153,5,42,0,0,153, + 154,5,34,0,0,154,21,1,0,0,0,155,156,5,20,0,0,156,157,5,42,0,0,157,158, + 5,34,0,0,158,23,1,0,0,0,159,160,5,3,0,0,160,161,3,8,4,0,161,25,1,0,0,0, + 162,163,5,4,0,0,163,164,5,43,0,0,164,165,3,56,28,0,165,166,5,34,0,0,166, + 27,1,0,0,0,167,168,5,2,0,0,168,169,3,30,15,0,169,170,3,0,0,0,170,29,1, + 0,0,0,171,172,3,58,29,0,172,173,3,48,24,0,173,31,1,0,0,0,174,175,3,58, + 29,0,175,176,3,34,17,0,176,33,1,0,0,0,177,179,5,23,0,0,178,180,3,38,19, + 0,179,178,1,0,0,0,179,180,1,0,0,0,180,185,1,0,0,0,181,182,5,32,0,0,182, + 184,3,38,19,0,183,181,1,0,0,0,184,187,1,0,0,0,185,183,1,0,0,0,185,186, + 1,0,0,0,186,188,1,0,0,0,187,185,1,0,0,0,188,189,5,24,0,0,189,35,1,0,0, + 0,190,191,5,5,0,0,191,192,3,38,19,0,192,193,5,34,0,0,193,197,1,0,0,0,194, + 195,5,5,0,0,195,197,5,34,0,0,196,190,1,0,0,0,196,194,1,0,0,0,197,37,1, + 0,0,0,198,200,3,58,29,0,199,201,5,15,0,0,200,199,1,0,0,0,200,201,1,0,0, + 0,201,204,1,0,0,0,202,204,3,42,21,0,203,198,1,0,0,0,203,202,1,0,0,0,204, + 39,1,0,0,0,205,208,3,44,22,0,206,208,3,32,16,0,207,205,1,0,0,0,207,206, + 1,0,0,0,208,41,1,0,0,0,209,210,7,0,0,0,210,43,1,0,0,0,211,212,3,38,19, + 0,212,213,5,14,0,0,213,214,3,38,19,0,214,45,1,0,0,0,215,216,5,43,0,0,216, + 217,3,56,28,0,217,47,1,0,0,0,218,219,5,23,0,0,219,232,5,24,0,0,220,221, + 5,23,0,0,221,226,3,46,23,0,222,223,5,32,0,0,223,225,3,46,23,0,224,222, + 1,0,0,0,225,228,1,0,0,0,226,224,1,0,0,0,226,227,1,0,0,0,227,229,1,0,0, + 0,228,226,1,0,0,0,229,230,5,24,0,0,230,232,1,0,0,0,231,218,1,0,0,0,231, + 220,1,0,0,0,232,49,1,0,0,0,233,234,5,6,0,0,234,235,3,58,29,0,235,236,3, + 52,26,0,236,51,1,0,0,0,237,241,5,28,0,0,238,240,3,26,13,0,239,238,1,0, + 0,0,240,243,1,0,0,0,241,239,1,0,0,0,241,242,1,0,0,0,242,244,1,0,0,0,243, + 241,1,0,0,0,244,245,5,29,0,0,245,53,1,0,0,0,246,247,5,25,0,0,247,248,3, + 56,28,0,248,249,5,26,0,0,249,55,1,0,0,0,250,251,5,30,0,0,251,252,3,38, + 19,0,252,253,5,31,0,0,253,57,1,0,0,0,254,255,5,43,0,0,255,257,5,33,0,0, + 256,254,1,0,0,0,256,257,1,0,0,0,257,258,1,0,0,0,258,259,5,43,0,0,259,59, + 1,0,0,0,18,64,70,76,108,114,123,128,135,179,185,196,200,203,207,226,231, + 241,256 }; public static readonly ATN _ATN = diff --git a/Crimson/Antlr/Output/CrimsonVisitor.cs b/Crimson/Antlr/Output/CrimsonVisitor.cs index 1fbb24e..45f8da6 100644 --- a/Crimson/Antlr/Output/CrimsonVisitor.cs +++ b/Crimson/Antlr/Output/CrimsonVisitor.cs @@ -51,13 +51,6 @@ public interface ICrimsonVisitor : IParseTreeVisitor { /// The visitor result. Result VisitOperationHandler([NotNull] CrimsonParser.OperationHandlerContext context); /// - /// Visit a parse tree produced by the VariableDeclarationStatement - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitVariableDeclarationStatement([NotNull] CrimsonParser.VariableDeclarationStatementContext context); - /// /// Visit a parse tree produced by the ReturnStatement /// labeled alternative in . /// @@ -114,25 +107,26 @@ public interface ICrimsonVisitor : IParseTreeVisitor { /// The visitor result. Result VisitGlobalVariableStatement([NotNull] CrimsonParser.GlobalVariableStatementContext context); /// - /// Visit a parse tree produced by the FunctionDeclarationStatement + /// Visit a parse tree produced by the ScopeVariableStatement /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context); + Result VisitScopeVariableStatement([NotNull] CrimsonParser.ScopeVariableStatementContext context); /// - /// Visit a parse tree produced by the StructureDeclarationStatement + /// Visit a parse tree produced by the FunctionDeclarationStatement /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context); + Result VisitFunctionDeclarationStatement([NotNull] CrimsonParser.FunctionDeclarationStatementContext context); /// - /// Visit a parse tree produced by . + /// Visit a parse tree produced by the StructureDeclarationStatement + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitVariableDeclaration([NotNull] CrimsonParser.VariableDeclarationContext context); + Result VisitStructureDeclarationStatement([NotNull] CrimsonParser.StructureDeclarationStatementContext context); /// /// Visit a parse tree produced by the AssignVariableDirect /// labeled alternative in . @@ -196,6 +190,12 @@ public interface ICrimsonVisitor : IParseTreeVisitor { /// The visitor result. Result VisitGlobalVariableDeclaration([NotNull] CrimsonParser.GlobalVariableDeclarationContext context); /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitScopeVariableDeclaration([NotNull] CrimsonParser.ScopeVariableDeclarationContext context); + /// /// Visit a parse tree produced by . /// /// The parse tree. @@ -280,6 +280,12 @@ public interface ICrimsonVisitor : IParseTreeVisitor { /// The visitor result. Result VisitArray([NotNull] CrimsonParser.ArrayContext context); /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDatasize([NotNull] CrimsonParser.DatasizeContext 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 2cc20d1..7e13cf5 100644 --- a/Crimson/CSharp/Core/Flattener.cs +++ b/Crimson/CSharp/Core/Flattener.cs @@ -1,4 +1,6 @@ -using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Atn; +using Antlr4.Runtime.Misc; +using Crimson.AntlrBuild; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar; using Crimson.CSharp.Grammar.Statements; @@ -74,7 +76,7 @@ internal BasicProgram Flatten (Compilation compilation) { Fragment bs = pair.Value.GetCrimsonBasic(); program.Add(bs); - LOGGER.Debug($"Added GlobalVariable {pair.Value.Name}"); + LOGGER.Debug($"Added GlobalVariable {pair.Value.Assignment.Name}"); } // Add structures @@ -164,7 +166,7 @@ private string GetFlattenedPrefix (System.Type type) { return "gvar"; } - if (type == typeof(InternalVariableCStatement)) + if (type == typeof(ScopeVariableCStatement)) { return "ivar"; } diff --git a/Crimson/CSharp/Core/ScopeVisitor.cs b/Crimson/CSharp/Core/ScopeVisitor.cs index ea64aaf..8cc86d2 100644 --- a/Crimson/CSharp/Core/ScopeVisitor.cs +++ b/Crimson/CSharp/Core/ScopeVisitor.cs @@ -60,6 +60,11 @@ private AbstractCrimsonStatement ParseStatement (CrimsonParser.StatementContext CrimsonParser.GlobalVariableDeclarationContext declaration = globalContext.globalVariableDeclaration(); return VisitGlobalVariableDeclaration(declaration); } + else if (stCtx is CrimsonParser.ScopeVariableStatementContext scopeVarContext) + { + CrimsonParser.ScopeVariableDeclarationContext declaration = scopeVarContext.scopeVariableDeclaration(); + return VisitScopeVariableDeclaration(declaration); + } else if (stCtx is CrimsonParser.FunctionDeclarationStatementContext functionContext) { CrimsonParser.FunctionDeclarationContext declaration = functionContext.functionDeclaration(); @@ -70,11 +75,6 @@ private AbstractCrimsonStatement ParseStatement (CrimsonParser.StatementContext CrimsonParser.StructureDeclarationContext declaration = structureContext.structureDeclaration(); return VisitStructureDeclaration(declaration); } - else if (stCtx is CrimsonParser.VariableDeclarationStatementContext variableContext) - { - CrimsonParser.VariableDeclarationContext ivdCtx = variableContext.variableDeclaration(); - return VisitVariableDeclaration(ivdCtx); - } else if (stCtx is CrimsonParser.ReturnStatementContext returnContext) { CrimsonParser.FunctionReturnContext rtnCtx = returnContext.functionReturn(); @@ -131,13 +131,24 @@ public override OperationHandlerCStatement VisitOperationHandler ([NotNull] Crim public override GlobalVariableCStatement VisitGlobalVariableDeclaration ([NotNull] CrimsonParser.GlobalVariableDeclarationContext context) { - CrimsonParser.VariableDeclarationContext ivdc = context.variableDeclaration(); - FullNameCToken identifier = VisitFullName(ivdc.fullName()); - SimpleValueCToken? simple; - ComplexValueCToken? complex; - if (ivdc.simple != null) return new GlobalVariableCStatement(identifier, VisitSimpleValue(ivdc.simple)); - else if (ivdc.complex != null) return new GlobalVariableCStatement(identifier, VisitComplexValue(ivdc.complex)); - else throw new CrimsonParserException("Cannot parse GlobalVariableDeclarationContext with value " + ivdc.GetText()); + CrimsonParser.AssignVariableContext ivdc = context.assignVariable(); + VariableAssignmentCStatement assignment; + + if (ivdc is CrimsonParser.AssignVariableDirectContext direct) assignment = VisitAssignVariableDirect(direct); + else if (ivdc is CrimsonParser.AssignVariableAtPointerContext pointer) assignment = VisitAssignVariableAtPointer(pointer); + else throw new CrimsonParserException("Cannot parse GlobalVariableDeclarationContext with unknown assignment type " + ivdc.GetType()); + + return new GlobalVariableCStatement(assignment); + } + + public override ScopeVariableCStatement VisitScopeVariableDeclaration ([NotNull] CrimsonParser.ScopeVariableDeclarationContext context) + { + return null; + } + + public override object VisitScopeVariableStatement ([NotNull] CrimsonParser.ScopeVariableStatementContext context) + { + return null; } public override FunctionCStatement VisitFunctionDeclaration ([NotNull] CrimsonParser.FunctionDeclarationContext context) @@ -166,14 +177,24 @@ public override StructureCStatement VisitStructureDeclaration ([NotNull] Crimson public override IList VisitStructureBody ([NotNull] CrimsonParser.StructureBodyContext context) { IList statements = new List(); - foreach (CrimsonParser.VariableDeclarationContext ivdCtx in context.variableDeclaration()) + foreach (CrimsonParser.ScopeVariableDeclarationContext ivdCtx in context.scopeVariableDeclaration()) { - InternalVariableCStatement var = VisitVariableDeclaration(ivdCtx); + ScopeVariableCStatement var = VisitScopeVariableDeclaration(ivdCtx); statements.Add(var); } return statements; } + public override object VisitArray ([NotNull] CrimsonParser.ArrayContext context) + { + return base.VisitArray(context); + } + + public override SimpleValueCToken VisitDatasize ([NotNull] CrimsonParser.DatasizeContext context) + { + return VisitSimpleValue(context.sizeVal); + } + public VariableAssignmentCStatement ParseAssignVariable ([NotNull] CrimsonParser.AssignVariableContext context) { if (context == null) throw new StatementParseException("Illegal null CrimsonParser.AssignVariableContext"); @@ -197,7 +218,7 @@ public VariableAssignmentCStatement ParseAssignVariable ([NotNull] CrimsonParser foreach (CrimsonParser.ParameterContext paCtx in context.parameter()) { FullNameCToken identifier = new FullNameCToken(paCtx.name.Text); - SimpleValueCToken size = VisitSimpleValue(paCtx.size); + SimpleValueCToken size = VisitDatasize(paCtx.size); FunctionCStatement.Parameter parameter = new FunctionCStatement.Parameter(size, identifier); parameters.Add(parameter); } @@ -208,17 +229,6 @@ public VariableAssignmentCStatement ParseAssignVariable ([NotNull] CrimsonParser // ------------------------------------ STATEMENTS // ---------------------------------------------------- - public override InternalVariableCStatement VisitVariableDeclaration ([NotNull] CrimsonParser.VariableDeclarationContext context) - { - FullNameCToken identifier = VisitFullName(context.fullName()); - SimpleValueCToken size = VisitSimpleValue(context.size); - SimpleValueCToken? simple; - ComplexValueCToken? complex; - if (context.simple != null) return new InternalVariableCStatement(size, identifier, VisitSimpleValue(context.simple)); - else if (context.complex != null) return new InternalVariableCStatement(size, identifier, VisitComplexValue(context.complex)); - else throw new CrimsonParserException("Cannot parse InternalVariableDeclarationContext with value " + context.GetText()); - } - public override FunctionCallCStatement VisitFunctionCall ([NotNull] CrimsonParser.FunctionCallContext context) { FullNameCToken identifier = VisitFullName(context.name); @@ -249,7 +259,7 @@ public override WhileBlockCStatement VisitWhileBlock ([NotNull] CrimsonParser.Wh public override VariableAssignmentCStatement VisitAssignVariableDirect ([NotNull] CrimsonParser.AssignVariableDirectContext context) { - FullNameCToken identifier = VisitFullName(context.name); + FullNameCToken identifier = new FullNameCToken(context.name.Text); if (context.simple != null) return new VariableAssignmentCStatement(identifier, VisitSimpleValue(context.simple)); else if (context.complex != null) return new VariableAssignmentCStatement(identifier, VisitComplexValue(context.complex)); else throw new CrimsonParserException($"Cannot assign no value to variable {identifier}"); @@ -258,7 +268,7 @@ public override VariableAssignmentCStatement VisitAssignVariableDirect ([NotNull public override VariableAssignmentCStatement VisitAssignVariableAtPointer ([NotNull] CrimsonParser.AssignVariableAtPointerContext context) { //TODO AssignVariableAtPointer just adds an asterisk to the variable name - FullNameCToken identifier = VisitFullName(context.fullName()); + FullNameCToken identifier = new FullNameCToken(context.name.Text); if (context.simple != null) return new VariableAssignmentCStatement(identifier, VisitSimpleValue(context.simple)); else if (context.complex != null) return new VariableAssignmentCStatement(identifier, VisitComplexValue(context.complex)); else throw new CrimsonParserException($"Cannot assign no value to variable {identifier}"); diff --git a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs index ce7e06a..894ba39 100644 --- a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs @@ -16,22 +16,9 @@ namespace Crimson.CSharp.Grammar.Statements /// public class GlobalVariableCStatement : AbstractCrimsonStatement, INamed { - public FullNameCToken Name { get; protected set; } + public VariableAssignmentCStatement Assignment { get; } - public ComplexValueCToken? Complex { get; } - public SimpleValueCToken? Simple { get; } - - public GlobalVariableCStatement (FullNameCToken identifier, ComplexValueCToken value) - { - Name = identifier; - Complex = value; - } - - public GlobalVariableCStatement (FullNameCToken identifier, SimpleValueCToken value) - { - Name = identifier; - Simple = value; - } + public GlobalVariableCStatement (VariableAssignmentCStatement assignment) => Assignment = assignment; public override void Link (LinkingContext ctx) { @@ -40,12 +27,12 @@ public override void Link (LinkingContext ctx) public FullNameCToken GetName () { - return Name; + return Assignment.Name; } public void SetName (FullNameCToken name) { - Name = name; + Assignment.Name = name; } public override Fragment GetCrimsonBasic () @@ -53,16 +40,16 @@ public override Fragment GetCrimsonBasic () Fragment statements = new Fragment(0); // int i = (6 + 5); - if (Complex != null) + if (Assignment.Complex != null) { - Fragment valueStatements = Complex.GetBasicFragment(); + Fragment valueStatements = Assignment.Complex.GetBasicFragment(); statements.Add(valueStatements); - statements.Add(new SetBStatement(Name.ToString(), -1, valueStatements.ResultHolder!)); + statements.Add(new SetBStatement(Assignment.Name.ToString(), -1, valueStatements.ResultHolder!)); } - else if (Simple != null) + else if (Assignment.Simple != null) { - statements.Add(new SetBStatement(Name.ToString(), -1, Simple.GetText())); + statements.Add(new SetBStatement(Assignment.Name.ToString(), -1, Assignment.Simple.GetText())); } else { diff --git a/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/ScopeVariableCStatement.cs similarity index 84% rename from Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs rename to Crimson/CSharp/Grammar/Statements/ScopeVariableCStatement.cs index 1c7350d..3e73188 100644 --- a/Crimson/CSharp/Grammar/Statements/InternalVariableCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/ScopeVariableCStatement.cs @@ -9,7 +9,7 @@ namespace Crimson.CSharp.Grammar.Statements { - public class InternalVariableCStatement : AbstractCrimsonStatement + public class ScopeVariableCStatement : AbstractCrimsonStatement { public SimpleValueCToken Size { get; set; } public FullNameCToken Identifier { get; private set; } @@ -17,7 +17,7 @@ public class InternalVariableCStatement : AbstractCrimsonStatement public ComplexValueCToken? Complex { get; } public SimpleValueCToken? Simple { get; } - private InternalVariableCStatement (SimpleValueCToken size, FullNameCToken identifier) + private ScopeVariableCStatement (SimpleValueCToken size, FullNameCToken identifier) { Size = size; Identifier = identifier; @@ -27,13 +27,13 @@ private InternalVariableCStatement (SimpleValueCToken size, FullNameCToken ident if (!identifier.HasMember()) throw new CrimsonParserException($"Identifier {identifier} for internal variable must have a member name."); } - public InternalVariableCStatement (SimpleValueCToken size, FullNameCToken identifier, SimpleValueCToken simple) : this(size, identifier) + public ScopeVariableCStatement (SimpleValueCToken size, FullNameCToken identifier, SimpleValueCToken simple) : this(size, identifier) { Simple = simple; if (Simple == null) throw new CrimsonParserException($"Must assign initial (declaration) value to variable {identifier}"); } - public InternalVariableCStatement (SimpleValueCToken size, FullNameCToken identifier, ComplexValueCToken complex) : this(size, identifier) + public ScopeVariableCStatement (SimpleValueCToken size, FullNameCToken identifier, ComplexValueCToken complex) : this(size, identifier) { Complex = complex; if (Complex == null) throw new CrimsonParserException($"Must assign initial (declaration) value to variable {identifier}"); diff --git a/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs b/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs index f23fb10..465cc1a 100644 --- a/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs @@ -7,28 +7,28 @@ namespace Crimson.CSharp.Grammar.Statements { - internal class VariableAssignmentCStatement : AbstractCrimsonStatement + public class VariableAssignmentCStatement : AbstractCrimsonStatement { - public FullNameCToken Identifier { get; set; } + public FullNameCToken Name { get; set; } public SimpleValueCToken? Simple { get; } public ComplexValueCToken? Complex { get; } public VariableAssignmentCStatement (FullNameCToken identifier, SimpleValueCToken value) { - Identifier = identifier; + Name = identifier; Simple = value; } public VariableAssignmentCStatement (FullNameCToken identifier, ComplexValueCToken value) { - Identifier = identifier; + Name = identifier; Complex = value; } public override void Link (LinkingContext ctx) { - Identifier = LinkerHelper.LinkIdentifier(Identifier, ctx); + Name = LinkerHelper.LinkIdentifier(Name, ctx); Simple?.Link(ctx); Complex?.Link(ctx); Linked = true; @@ -45,11 +45,11 @@ public override Fragment GetCrimsonBasic () else if (Complex != null) { result.Add(Complex.GetBasicFragment()); - result.Add(new SetBStatement(Identifier.ToString(), -1, "VAR_ASSIGN_C_VAL")); + result.Add(new SetBStatement(Name.ToString(), -1, "VAR_ASSIGN_C_VAL")); } else { - throw new FlatteningException($"No value to be assigned to variable {Identifier}"); + throw new FlatteningException($"No value to be assigned to variable {Name}"); } return result; diff --git a/Crimson/Resources/CrimsonNotepad++.xml b/Crimson/Resources/CrimsonNotepad++.xml index 1e19be8..a742346 100644 --- a/Crimson/Resources/CrimsonNotepad++.xml +++ b/Crimson/Resources/CrimsonNotepad++.xml @@ -26,13 +26,13 @@ function structure #using #ophandler as - global - ptr int + global scope + A~ B~ if while else return - true false - A~ B~ + + - 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 @@ -42,7 +42,7 @@ - + @@ -53,7 +53,7 @@ - + diff --git a/Crimson/Resources/Native Library/console.crm b/Crimson/Resources/Native Library/console.crm index b9eddb6..77fff6f 100644 --- a/Crimson/Resources/Native Library/console.crm +++ b/Crimson/Resources/Native Library/console.crm @@ -1,5 +1,5 @@ { - function write (i(int_size)) { + function write (i:int_size:) { } } \ No newline at end of file diff --git a/Crimson/Resources/Native Library/fraction.crm b/Crimson/Resources/Native Library/fraction.crm index e0739f8..c92e477 100644 --- a/Crimson/Resources/Native Library/fraction.crm +++ b/Crimson/Resources/Native Library/fraction.crm @@ -1,6 +1,6 @@ { structure Fraction { - numerator(int_size); - denominator(int_size); + numerator:int_size:; + denominator:int_size:; } } \ No newline at end of file diff --git a/Crimson/Resources/Native Library/heap.crm b/Crimson/Resources/Native Library/heap.crm index 6a30f30..c35b4d2 100644 --- a/Crimson/Resources/Native Library/heap.crm +++ b/Crimson/Resources/Native Library/heap.crm @@ -33,26 +33,26 @@ // IMPORTANT!! // regions_i and regions_region will be removed!! // They should not be used and are purely for testing linking - global regions_i(int_size) = 0; - global regions_length(int_size) = 0; - global regions_region(int_size) = 0; + global regions_i = 0:int_size:; + global regions_length = 0:int_size:; + global regions_region = 0:int_size:; - int_size(1) = 4; - ptr_size(1) = 4; + scope int_size = 4:1:; + scope ptr_size = 4:1:; // // Return a pointer to a block of memory which is at least of the given size. // - function alloc (size(int_size)) + function alloc (size:int_size:) { - i(int_size) = 0; - while (i < regions_length) + i:int_size: = 0; + while (i : regions_length) { // Replace with regions[i] if ( regions_i == 0 ) // Region i is empty { regions_i = 1; - region_ptr(ptr_size) = 0; + region_ptr:ptr_size: = 0; region_ptr = get_region_ptr(r); return region_ptr; } @@ -66,15 +66,15 @@ // This is given by the result of the calculation: // HeapOffset + exponential_offset + r*RegionMetaSize; // - function get_region_ptr (r(int_size)) + function get_region_ptr (r:int_size:) { // Need to calculate this before r changes later on - RRMS(int_size) = r * RegionMetaSize; + RRMS:int_size: = r * RegionMetaSize; - exponential_offset(int_size) = 4; + exponential_offset:int_size: = 4; - // R<0 is not permitted - if (r < 0) { + // R:0 is not permitted + if (r : 0) { // HELP!!!! // HOW DO I CRASH!? } @@ -87,25 +87,25 @@ exponential_offset = 2; } - // R>=2 is calculated automatically + // R:=2 is calculated automatically else { - while ( r > 0 ) { + while ( r : 0 ) { exponential_offset = exponential_offset * 2; r = r - 1; } } // Calculate final pointer value as in described equation - HO_EXP(int_size) = HeapOffset + exponential_offset; - HO_EXP_RRMS(ptr_size) = HO_EXP + RRMS; + HO_EXP:int_size: = HeapOffset + exponential_offset; + HO_EXP_RRMS:ptr_size: = HO_EXP + RRMS; return HO_EXP_RRMS; } - function freeptr (pointer(ptr_size)) + function freeptr (pointer:ptr_size:) { - r(int_size) = 0; - region_ptr(ptr_size) = get_region_ptr(r); - while ( pointer < region_ptr ) + r:int_size: = 0; + region_ptr:ptr_size: = get_region_ptr(r); + while ( pointer : region_ptr ) { r = r + 1; region_ptr = get_region_ptr(r); @@ -113,7 +113,7 @@ freeregion(r); } - function freeregion (region(int_size)) + function freeregion (region:int_size:) { // Replace with regions[region] regions_region = 0; diff --git a/Crimson/Resources/Native Library/maths.crm b/Crimson/Resources/Native Library/maths.crm index dd97945..795c49d 100644 --- a/Crimson/Resources/Native Library/maths.crm +++ b/Crimson/Resources/Native Library/maths.crm @@ -1,9 +1,9 @@ { - function pwr (number(int_size), exponent(int_size)) { - while (exponent > 0) + function pwr (number:int_size:, exponent:int_size:) { + while (exponent : 0) { - number(int_size) = number * number; - exponent(int_size) = exponent - 1; + number:int_size: = number * number; + exponent:int_size: = exponent - 1; } } } \ No newline at end of file diff --git a/Crimson/Resources/Test Compilations/logging/log.crm b/Crimson/Resources/Test Compilations/logging/log.crm index a5359d3..54b444a 100644 --- a/Crimson/Resources/Test Compilations/logging/log.crm +++ b/Crimson/Resources/Test Compilations/logging/log.crm @@ -2,13 +2,13 @@ #using "${NATIVE}/console.crm" as utils_stdout // Utility package - function multiply (num1(int_size), num2(int_size)) { + function multiply (num1:int_size:, num2:int_size:) { utils_stdout.write(6); return num1; } - function times (num1(int_size), num2(int_size)) { - ret(int_size) = multiply(num1, num2); + function times (num1:int_size:, num2:int_size:) { + ret:int_size: = multiply(num1, num2); return ret; } } \ No newline at end of file diff --git a/Crimson/Resources/Test Compilations/main.crm b/Crimson/Resources/Test Compilations/main.crm index 52d311a..30de6bc 100644 --- a/Crimson/Resources/Test Compilations/main.crm +++ b/Crimson/Resources/Test Compilations/main.crm @@ -11,23 +11,25 @@ // #ophandler * -> utils.multiply; - global counter(4) = 0; + global counter = 0<4>; - global int_size(1) = 4; - global ptr_size(1) = 4; + global int = 4<1>; + global ptr = 4<1>; function main () { B~ "example basic call"; A~ "example assemby call"; - a(int_size) = utils.multiply(8); - b(int_size) = utils.times(); + scope a; + scope a; + a *= utils.multiply(8); + b *= utils.times(); if (true == true) { - counter = 5; + counter = 5; } else if (b == true) { - c(int_size) = utils.times(5, 3); - d(ptr_size) = heap.alloc(); + c = utils.times(5, 3); + d = heap.alloc(); } else { return b; } @@ -35,25 +37,30 @@ call(4, 7, 5); // Allocate memory on the heap for 'i' and get a pointer to it - i(ptr_size) = heap.alloc(4); + scope i; + i = heap.alloc(4); // Set memory at pointer 'i' - i *= 4; + // Don't need <> because it already exists! + i *= 4; // Note usage of functions from imported packages - stdout.write(i); + stdout.write(i); - ret(ptr_size) = heap.alloc(4); - ret *= utils.multiply(i, 5); + scope ret; + ret = heap.alloc(4); + ret *= utils.multiply(i, 5); return ret; } function call () { - test(int_size) = heap.alloc(69); + scope test; + test = heap.alloc(69); return test; } structure Person { - age(ptr_size) = heap.alloc(5); + scope age; + age = heap.alloc(5); } } \ 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 1cebdd6..3b7fdca 100644 --- a/Crimson/Resources/Test Compilations/result/main.cba +++ b/Crimson/Resources/Test Compilations/result/main.cba @@ -82,8 +82,8 @@ return; :func_alloc_0: var_set i, -1, 0; - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << + // :: TODO IMPLEMENT WHILE (start) :: + // :: TODO IMPLEMENT WHILE (end) :: return; return; @@ -106,8 +106,8 @@ return; :ELSE: - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << + // :: TODO IMPLEMENT WHILE (start) :: + // :: TODO IMPLEMENT WHILE (end) :: :END_branch_4: @@ -127,8 +127,8 @@ return; // Function Call var_set region_ptr, -1, ; - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << + // :: TODO IMPLEMENT WHILE (start) :: + // :: TODO IMPLEMENT WHILE (end) :: // FC start jump func_freeregion_0 @@ -141,8 +141,8 @@ return; :func_pwr_0: - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << + // :: TODO IMPLEMENT WHILE (start) :: + // :: TODO IMPLEMENT WHILE (end) :: return; diff --git a/Crimson/Resources/Test Compilations/utils/utils.crm b/Crimson/Resources/Test Compilations/utils/utils.crm index 46c0bab..7a98b2d 100644 --- a/Crimson/Resources/Test Compilations/utils/utils.crm +++ b/Crimson/Resources/Test Compilations/utils/utils.crm @@ -2,12 +2,12 @@ #using "${NATIVE}/console.crm" as utils_stdout; // Utility package - function multiply (num1(int_size), num2(int_size)) { + function multiply (num1:int_size:, num2:int_size:) { utils_stdout.write(6); return num1; } - function times (num1(int_size), num2(int_size) ) { + function times (num1:int_size:, num2:int_size: ) { ret(4) = multiply(num1, num2); return ret; } From 4bb72b2894d33d0039ccd3b22853363fa6ac0e91 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 21 Mar 2023 00:53:51 +0000 Subject: [PATCH 025/122] grammar innit --- Crimson/Antlr/Input/Crimson.g4 | 4 +- Crimson/Antlr/Output/CrimsonLexer.cs | 4 +- Crimson/Antlr/Output/CrimsonLexer.interp | 2 +- Crimson/Resources/CrimsonNotepad++.xml | 4 +- Crimson/Resources/Native Library/console.crm | 2 +- Crimson/Resources/Native Library/fraction.crm | 4 +- Crimson/Resources/Native Library/heap.crm | 42 +++++++++---------- Crimson/Resources/Native Library/maths.crm | 6 +-- .../Test Compilations/logging/log.crm | 6 +-- Crimson/Resources/Test Compilations/main.crm | 6 +-- .../Test Compilations/utils/utils.crm | 6 +-- 11 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Crimson/Antlr/Input/Crimson.g4 b/Crimson/Antlr/Input/Crimson.g4 index b99cfa9..4a0f238 100644 --- a/Crimson/Antlr/Input/Crimson.g4 +++ b/Crimson/Antlr/Input/Crimson.g4 @@ -148,9 +148,9 @@ Asterisk: '*'; fragment Slash: '/'; MathsOperator: Plus | Minus | Asterisk | Slash; -fragment Less: '?<'; +fragment Less: ''; +fragment Greater: '>?'; fragment GreaterEqual: '>='; fragment EqualTo: '=='; Comparator: Less | LessEqual | Greater | GreaterEqual | EqualTo; diff --git a/Crimson/Antlr/Output/CrimsonLexer.cs b/Crimson/Antlr/Output/CrimsonLexer.cs index 7f29e78..7cb37b7 100644 --- a/Crimson/Antlr/Output/CrimsonLexer.cs +++ b/Crimson/Antlr/Output/CrimsonLexer.cs @@ -194,8 +194,8 @@ static CrimsonLexer() { 1,0,0,0,208,209,5,42,0,0,209,34,1,0,0,0,210,211,5,47,0,0,211,36,1,0,0, 0,212,217,3,29,14,0,213,217,3,31,15,0,214,217,3,33,16,0,215,217,3,35,17, 0,216,212,1,0,0,0,216,213,1,0,0,0,216,214,1,0,0,0,216,215,1,0,0,0,217, - 38,1,0,0,0,218,219,5,63,0,0,219,220,5,60,0,0,220,40,1,0,0,0,221,222,5, - 60,0,0,222,223,5,61,0,0,223,42,1,0,0,0,224,225,5,63,0,0,225,226,5,62,0, + 38,1,0,0,0,218,219,5,60,0,0,219,220,5,63,0,0,220,40,1,0,0,0,221,222,5, + 60,0,0,222,223,5,61,0,0,223,42,1,0,0,0,224,225,5,62,0,0,225,226,5,63,0, 0,226,44,1,0,0,0,227,228,5,62,0,0,228,229,5,61,0,0,229,46,1,0,0,0,230, 231,5,61,0,0,231,232,5,61,0,0,232,48,1,0,0,0,233,239,3,39,19,0,234,239, 3,41,20,0,235,239,3,43,21,0,236,239,3,45,22,0,237,239,3,47,23,0,238,233, diff --git a/Crimson/Antlr/Output/CrimsonLexer.interp b/Crimson/Antlr/Output/CrimsonLexer.interp index 253681a..6393718 100644 --- a/Crimson/Antlr/Output/CrimsonLexer.interp +++ b/Crimson/Antlr/Output/CrimsonLexer.interp @@ -156,4 +156,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 43, 355, 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, 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, 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, 3, 13, 203, 8, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 217, 8, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 239, 8, 24, 1, 25, 1, 25, 1, 25, 1, 26, 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, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 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, 45, 1, 45, 3, 45, 289, 8, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 297, 8, 46, 10, 46, 12, 46, 300, 9, 46, 1, 47, 1, 47, 1, 47, 1, 47, 5, 47, 306, 8, 47, 10, 47, 12, 47, 309, 9, 47, 1, 47, 1, 47, 1, 47, 1, 48, 4, 48, 315, 8, 48, 11, 48, 12, 48, 316, 1, 49, 1, 49, 5, 49, 321, 8, 49, 10, 49, 12, 49, 324, 9, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 5, 50, 332, 8, 50, 10, 50, 12, 50, 335, 9, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 4, 54, 344, 8, 54, 11, 54, 12, 54, 345, 1, 55, 4, 55, 349, 8, 55, 11, 55, 12, 55, 350, 1, 55, 3, 55, 354, 8, 55, 1, 307, 0, 56, 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, 0, 31, 0, 33, 15, 35, 0, 37, 16, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 17, 51, 18, 53, 19, 55, 20, 57, 21, 59, 22, 61, 23, 63, 24, 65, 25, 67, 26, 69, 27, 71, 28, 73, 29, 75, 30, 77, 31, 79, 32, 81, 33, 83, 34, 85, 35, 87, 36, 89, 37, 91, 38, 93, 39, 95, 40, 97, 41, 99, 42, 101, 43, 103, 0, 105, 0, 107, 0, 109, 0, 111, 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, 362, 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, 33, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 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, 1, 113, 1, 0, 0, 0, 3, 123, 1, 0, 0, 0, 5, 132, 1, 0, 0, 0, 7, 139, 1, 0, 0, 0, 9, 145, 1, 0, 0, 0, 11, 152, 1, 0, 0, 0, 13, 162, 1, 0, 0, 0, 15, 168, 1, 0, 0, 0, 17, 178, 1, 0, 0, 0, 19, 181, 1, 0, 0, 0, 21, 184, 1, 0, 0, 0, 23, 190, 1, 0, 0, 0, 25, 195, 1, 0, 0, 0, 27, 202, 1, 0, 0, 0, 29, 204, 1, 0, 0, 0, 31, 206, 1, 0, 0, 0, 33, 208, 1, 0, 0, 0, 35, 210, 1, 0, 0, 0, 37, 216, 1, 0, 0, 0, 39, 218, 1, 0, 0, 0, 41, 221, 1, 0, 0, 0, 43, 224, 1, 0, 0, 0, 45, 227, 1, 0, 0, 0, 47, 230, 1, 0, 0, 0, 49, 238, 1, 0, 0, 0, 51, 240, 1, 0, 0, 0, 53, 243, 1, 0, 0, 0, 55, 246, 1, 0, 0, 0, 57, 249, 1, 0, 0, 0, 59, 251, 1, 0, 0, 0, 61, 254, 1, 0, 0, 0, 63, 256, 1, 0, 0, 0, 65, 258, 1, 0, 0, 0, 67, 260, 1, 0, 0, 0, 69, 262, 1, 0, 0, 0, 71, 264, 1, 0, 0, 0, 73, 266, 1, 0, 0, 0, 75, 268, 1, 0, 0, 0, 77, 270, 1, 0, 0, 0, 79, 272, 1, 0, 0, 0, 81, 274, 1, 0, 0, 0, 83, 276, 1, 0, 0, 0, 85, 278, 1, 0, 0, 0, 87, 280, 1, 0, 0, 0, 89, 282, 1, 0, 0, 0, 91, 288, 1, 0, 0, 0, 93, 292, 1, 0, 0, 0, 95, 301, 1, 0, 0, 0, 97, 314, 1, 0, 0, 0, 99, 318, 1, 0, 0, 0, 101, 327, 1, 0, 0, 0, 103, 336, 1, 0, 0, 0, 105, 338, 1, 0, 0, 0, 107, 340, 1, 0, 0, 0, 109, 343, 1, 0, 0, 0, 111, 353, 1, 0, 0, 0, 113, 114, 5, 97, 0, 0, 114, 115, 5, 108, 0, 0, 115, 116, 5, 108, 0, 0, 116, 117, 5, 111, 0, 0, 117, 118, 5, 99, 0, 0, 118, 119, 5, 97, 0, 0, 119, 120, 5, 116, 0, 0, 120, 121, 5, 111, 0, 0, 121, 122, 5, 114, 0, 0, 122, 2, 1, 0, 0, 0, 123, 124, 5, 102, 0, 0, 124, 125, 5, 117, 0, 0, 125, 126, 5, 110, 0, 0, 126, 127, 5, 99, 0, 0, 127, 128, 5, 116, 0, 0, 128, 129, 5, 105, 0, 0, 129, 130, 5, 111, 0, 0, 130, 131, 5, 110, 0, 0, 131, 4, 1, 0, 0, 0, 132, 133, 5, 103, 0, 0, 133, 134, 5, 108, 0, 0, 134, 135, 5, 111, 0, 0, 135, 136, 5, 98, 0, 0, 136, 137, 5, 97, 0, 0, 137, 138, 5, 108, 0, 0, 138, 6, 1, 0, 0, 0, 139, 140, 5, 115, 0, 0, 140, 141, 5, 99, 0, 0, 141, 142, 5, 111, 0, 0, 142, 143, 5, 112, 0, 0, 143, 144, 5, 101, 0, 0, 144, 8, 1, 0, 0, 0, 145, 146, 5, 114, 0, 0, 146, 147, 5, 101, 0, 0, 147, 148, 5, 116, 0, 0, 148, 149, 5, 117, 0, 0, 149, 150, 5, 114, 0, 0, 150, 151, 5, 110, 0, 0, 151, 10, 1, 0, 0, 0, 152, 153, 5, 115, 0, 0, 153, 154, 5, 116, 0, 0, 154, 155, 5, 114, 0, 0, 155, 156, 5, 117, 0, 0, 156, 157, 5, 99, 0, 0, 157, 158, 5, 116, 0, 0, 158, 159, 5, 117, 0, 0, 159, 160, 5, 114, 0, 0, 160, 161, 5, 101, 0, 0, 161, 12, 1, 0, 0, 0, 162, 163, 5, 117, 0, 0, 163, 164, 5, 115, 0, 0, 164, 165, 5, 105, 0, 0, 165, 166, 5, 110, 0, 0, 166, 167, 5, 103, 0, 0, 167, 14, 1, 0, 0, 0, 168, 169, 5, 111, 0, 0, 169, 170, 5, 112, 0, 0, 170, 171, 5, 104, 0, 0, 171, 172, 5, 97, 0, 0, 172, 173, 5, 110, 0, 0, 173, 174, 5, 100, 0, 0, 174, 175, 5, 108, 0, 0, 175, 176, 5, 101, 0, 0, 176, 177, 5, 114, 0, 0, 177, 16, 1, 0, 0, 0, 178, 179, 5, 97, 0, 0, 179, 180, 5, 115, 0, 0, 180, 18, 1, 0, 0, 0, 181, 182, 5, 105, 0, 0, 182, 183, 5, 102, 0, 0, 183, 20, 1, 0, 0, 0, 184, 185, 5, 119, 0, 0, 185, 186, 5, 104, 0, 0, 186, 187, 5, 105, 0, 0, 187, 188, 5, 108, 0, 0, 188, 189, 5, 101, 0, 0, 189, 22, 1, 0, 0, 0, 190, 191, 5, 101, 0, 0, 191, 192, 5, 108, 0, 0, 192, 193, 5, 115, 0, 0, 193, 194, 5, 101, 0, 0, 194, 24, 1, 0, 0, 0, 195, 196, 5, 101, 0, 0, 196, 197, 5, 108, 0, 0, 197, 198, 5, 105, 0, 0, 198, 199, 5, 102, 0, 0, 199, 26, 1, 0, 0, 0, 200, 203, 3, 49, 24, 0, 201, 203, 3, 37, 18, 0, 202, 200, 1, 0, 0, 0, 202, 201, 1, 0, 0, 0, 203, 28, 1, 0, 0, 0, 204, 205, 5, 43, 0, 0, 205, 30, 1, 0, 0, 0, 206, 207, 5, 45, 0, 0, 207, 32, 1, 0, 0, 0, 208, 209, 5, 42, 0, 0, 209, 34, 1, 0, 0, 0, 210, 211, 5, 47, 0, 0, 211, 36, 1, 0, 0, 0, 212, 217, 3, 29, 14, 0, 213, 217, 3, 31, 15, 0, 214, 217, 3, 33, 16, 0, 215, 217, 3, 35, 17, 0, 216, 212, 1, 0, 0, 0, 216, 213, 1, 0, 0, 0, 216, 214, 1, 0, 0, 0, 216, 215, 1, 0, 0, 0, 217, 38, 1, 0, 0, 0, 218, 219, 5, 63, 0, 0, 219, 220, 5, 60, 0, 0, 220, 40, 1, 0, 0, 0, 221, 222, 5, 60, 0, 0, 222, 223, 5, 61, 0, 0, 223, 42, 1, 0, 0, 0, 224, 225, 5, 63, 0, 0, 225, 226, 5, 62, 0, 0, 226, 44, 1, 0, 0, 0, 227, 228, 5, 62, 0, 0, 228, 229, 5, 61, 0, 0, 229, 46, 1, 0, 0, 0, 230, 231, 5, 61, 0, 0, 231, 232, 5, 61, 0, 0, 232, 48, 1, 0, 0, 0, 233, 239, 3, 39, 19, 0, 234, 239, 3, 41, 20, 0, 235, 239, 3, 43, 21, 0, 236, 239, 3, 45, 22, 0, 237, 239, 3, 47, 23, 0, 238, 233, 1, 0, 0, 0, 238, 234, 1, 0, 0, 0, 238, 235, 1, 0, 0, 0, 238, 236, 1, 0, 0, 0, 238, 237, 1, 0, 0, 0, 239, 50, 1, 0, 0, 0, 240, 241, 5, 45, 0, 0, 241, 242, 5, 62, 0, 0, 242, 52, 1, 0, 0, 0, 243, 244, 5, 66, 0, 0, 244, 245, 5, 126, 0, 0, 245, 54, 1, 0, 0, 0, 246, 247, 5, 65, 0, 0, 247, 248, 5, 126, 0, 0, 248, 56, 1, 0, 0, 0, 249, 250, 5, 61, 0, 0, 250, 58, 1, 0, 0, 0, 251, 252, 5, 42, 0, 0, 252, 253, 5, 61, 0, 0, 253, 60, 1, 0, 0, 0, 254, 255, 5, 40, 0, 0, 255, 62, 1, 0, 0, 0, 256, 257, 5, 41, 0, 0, 257, 64, 1, 0, 0, 0, 258, 259, 5, 91, 0, 0, 259, 66, 1, 0, 0, 0, 260, 261, 5, 93, 0, 0, 261, 68, 1, 0, 0, 0, 262, 263, 5, 58, 0, 0, 263, 70, 1, 0, 0, 0, 264, 265, 5, 123, 0, 0, 265, 72, 1, 0, 0, 0, 266, 267, 5, 125, 0, 0, 267, 74, 1, 0, 0, 0, 268, 269, 5, 60, 0, 0, 269, 76, 1, 0, 0, 0, 270, 271, 5, 62, 0, 0, 271, 78, 1, 0, 0, 0, 272, 273, 5, 44, 0, 0, 273, 80, 1, 0, 0, 0, 274, 275, 5, 46, 0, 0, 275, 82, 1, 0, 0, 0, 276, 277, 5, 59, 0, 0, 277, 84, 1, 0, 0, 0, 278, 279, 5, 95, 0, 0, 279, 86, 1, 0, 0, 0, 280, 281, 5, 35, 0, 0, 281, 88, 1, 0, 0, 0, 282, 283, 5, 34, 0, 0, 283, 90, 1, 0, 0, 0, 284, 289, 3, 109, 54, 0, 285, 289, 3, 111, 55, 0, 286, 289, 3, 93, 46, 0, 287, 289, 3, 95, 47, 0, 288, 284, 1, 0, 0, 0, 288, 285, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 288, 287, 1, 0, 0, 0, 289, 290, 1, 0, 0, 0, 290, 291, 6, 45, 0, 0, 291, 92, 1, 0, 0, 0, 292, 293, 5, 47, 0, 0, 293, 294, 5, 47, 0, 0, 294, 298, 1, 0, 0, 0, 295, 297, 8, 0, 0, 0, 296, 295, 1, 0, 0, 0, 297, 300, 1, 0, 0, 0, 298, 296, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 94, 1, 0, 0, 0, 300, 298, 1, 0, 0, 0, 301, 302, 5, 47, 0, 0, 302, 303, 5, 42, 0, 0, 303, 307, 1, 0, 0, 0, 304, 306, 9, 0, 0, 0, 305, 304, 1, 0, 0, 0, 306, 309, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 307, 305, 1, 0, 0, 0, 308, 310, 1, 0, 0, 0, 309, 307, 1, 0, 0, 0, 310, 311, 5, 42, 0, 0, 311, 312, 5, 47, 0, 0, 312, 96, 1, 0, 0, 0, 313, 315, 3, 105, 52, 0, 314, 313, 1, 0, 0, 0, 315, 316, 1, 0, 0, 0, 316, 314, 1, 0, 0, 0, 316, 317, 1, 0, 0, 0, 317, 98, 1, 0, 0, 0, 318, 322, 3, 89, 44, 0, 319, 321, 8, 1, 0, 0, 320, 319, 1, 0, 0, 0, 321, 324, 1, 0, 0, 0, 322, 320, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 325, 1, 0, 0, 0, 324, 322, 1, 0, 0, 0, 325, 326, 3, 89, 44, 0, 326, 100, 1, 0, 0, 0, 327, 333, 3, 103, 51, 0, 328, 332, 3, 103, 51, 0, 329, 332, 3, 97, 48, 0, 330, 332, 3, 85, 42, 0, 331, 328, 1, 0, 0, 0, 331, 329, 1, 0, 0, 0, 331, 330, 1, 0, 0, 0, 332, 335, 1, 0, 0, 0, 333, 331, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 102, 1, 0, 0, 0, 335, 333, 1, 0, 0, 0, 336, 337, 7, 2, 0, 0, 337, 104, 1, 0, 0, 0, 338, 339, 7, 3, 0, 0, 339, 106, 1, 0, 0, 0, 340, 341, 7, 4, 0, 0, 341, 108, 1, 0, 0, 0, 342, 344, 7, 5, 0, 0, 343, 342, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 110, 1, 0, 0, 0, 347, 349, 7, 0, 0, 0, 348, 347, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 354, 1, 0, 0, 0, 352, 354, 5, 0, 0, 1, 353, 348, 1, 0, 0, 0, 353, 352, 1, 0, 0, 0, 354, 112, 1, 0, 0, 0, 14, 0, 202, 216, 238, 288, 298, 307, 316, 322, 331, 333, 345, 350, 353, 1, 6, 0, 0] \ No newline at end of file +[4, 0, 43, 355, 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, 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, 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, 3, 13, 203, 8, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 217, 8, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 239, 8, 24, 1, 25, 1, 25, 1, 25, 1, 26, 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, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 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, 45, 1, 45, 3, 45, 289, 8, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 297, 8, 46, 10, 46, 12, 46, 300, 9, 46, 1, 47, 1, 47, 1, 47, 1, 47, 5, 47, 306, 8, 47, 10, 47, 12, 47, 309, 9, 47, 1, 47, 1, 47, 1, 47, 1, 48, 4, 48, 315, 8, 48, 11, 48, 12, 48, 316, 1, 49, 1, 49, 5, 49, 321, 8, 49, 10, 49, 12, 49, 324, 9, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 5, 50, 332, 8, 50, 10, 50, 12, 50, 335, 9, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 4, 54, 344, 8, 54, 11, 54, 12, 54, 345, 1, 55, 4, 55, 349, 8, 55, 11, 55, 12, 55, 350, 1, 55, 3, 55, 354, 8, 55, 1, 307, 0, 56, 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, 0, 31, 0, 33, 15, 35, 0, 37, 16, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 17, 51, 18, 53, 19, 55, 20, 57, 21, 59, 22, 61, 23, 63, 24, 65, 25, 67, 26, 69, 27, 71, 28, 73, 29, 75, 30, 77, 31, 79, 32, 81, 33, 83, 34, 85, 35, 87, 36, 89, 37, 91, 38, 93, 39, 95, 40, 97, 41, 99, 42, 101, 43, 103, 0, 105, 0, 107, 0, 109, 0, 111, 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, 362, 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, 33, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 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, 1, 113, 1, 0, 0, 0, 3, 123, 1, 0, 0, 0, 5, 132, 1, 0, 0, 0, 7, 139, 1, 0, 0, 0, 9, 145, 1, 0, 0, 0, 11, 152, 1, 0, 0, 0, 13, 162, 1, 0, 0, 0, 15, 168, 1, 0, 0, 0, 17, 178, 1, 0, 0, 0, 19, 181, 1, 0, 0, 0, 21, 184, 1, 0, 0, 0, 23, 190, 1, 0, 0, 0, 25, 195, 1, 0, 0, 0, 27, 202, 1, 0, 0, 0, 29, 204, 1, 0, 0, 0, 31, 206, 1, 0, 0, 0, 33, 208, 1, 0, 0, 0, 35, 210, 1, 0, 0, 0, 37, 216, 1, 0, 0, 0, 39, 218, 1, 0, 0, 0, 41, 221, 1, 0, 0, 0, 43, 224, 1, 0, 0, 0, 45, 227, 1, 0, 0, 0, 47, 230, 1, 0, 0, 0, 49, 238, 1, 0, 0, 0, 51, 240, 1, 0, 0, 0, 53, 243, 1, 0, 0, 0, 55, 246, 1, 0, 0, 0, 57, 249, 1, 0, 0, 0, 59, 251, 1, 0, 0, 0, 61, 254, 1, 0, 0, 0, 63, 256, 1, 0, 0, 0, 65, 258, 1, 0, 0, 0, 67, 260, 1, 0, 0, 0, 69, 262, 1, 0, 0, 0, 71, 264, 1, 0, 0, 0, 73, 266, 1, 0, 0, 0, 75, 268, 1, 0, 0, 0, 77, 270, 1, 0, 0, 0, 79, 272, 1, 0, 0, 0, 81, 274, 1, 0, 0, 0, 83, 276, 1, 0, 0, 0, 85, 278, 1, 0, 0, 0, 87, 280, 1, 0, 0, 0, 89, 282, 1, 0, 0, 0, 91, 288, 1, 0, 0, 0, 93, 292, 1, 0, 0, 0, 95, 301, 1, 0, 0, 0, 97, 314, 1, 0, 0, 0, 99, 318, 1, 0, 0, 0, 101, 327, 1, 0, 0, 0, 103, 336, 1, 0, 0, 0, 105, 338, 1, 0, 0, 0, 107, 340, 1, 0, 0, 0, 109, 343, 1, 0, 0, 0, 111, 353, 1, 0, 0, 0, 113, 114, 5, 97, 0, 0, 114, 115, 5, 108, 0, 0, 115, 116, 5, 108, 0, 0, 116, 117, 5, 111, 0, 0, 117, 118, 5, 99, 0, 0, 118, 119, 5, 97, 0, 0, 119, 120, 5, 116, 0, 0, 120, 121, 5, 111, 0, 0, 121, 122, 5, 114, 0, 0, 122, 2, 1, 0, 0, 0, 123, 124, 5, 102, 0, 0, 124, 125, 5, 117, 0, 0, 125, 126, 5, 110, 0, 0, 126, 127, 5, 99, 0, 0, 127, 128, 5, 116, 0, 0, 128, 129, 5, 105, 0, 0, 129, 130, 5, 111, 0, 0, 130, 131, 5, 110, 0, 0, 131, 4, 1, 0, 0, 0, 132, 133, 5, 103, 0, 0, 133, 134, 5, 108, 0, 0, 134, 135, 5, 111, 0, 0, 135, 136, 5, 98, 0, 0, 136, 137, 5, 97, 0, 0, 137, 138, 5, 108, 0, 0, 138, 6, 1, 0, 0, 0, 139, 140, 5, 115, 0, 0, 140, 141, 5, 99, 0, 0, 141, 142, 5, 111, 0, 0, 142, 143, 5, 112, 0, 0, 143, 144, 5, 101, 0, 0, 144, 8, 1, 0, 0, 0, 145, 146, 5, 114, 0, 0, 146, 147, 5, 101, 0, 0, 147, 148, 5, 116, 0, 0, 148, 149, 5, 117, 0, 0, 149, 150, 5, 114, 0, 0, 150, 151, 5, 110, 0, 0, 151, 10, 1, 0, 0, 0, 152, 153, 5, 115, 0, 0, 153, 154, 5, 116, 0, 0, 154, 155, 5, 114, 0, 0, 155, 156, 5, 117, 0, 0, 156, 157, 5, 99, 0, 0, 157, 158, 5, 116, 0, 0, 158, 159, 5, 117, 0, 0, 159, 160, 5, 114, 0, 0, 160, 161, 5, 101, 0, 0, 161, 12, 1, 0, 0, 0, 162, 163, 5, 117, 0, 0, 163, 164, 5, 115, 0, 0, 164, 165, 5, 105, 0, 0, 165, 166, 5, 110, 0, 0, 166, 167, 5, 103, 0, 0, 167, 14, 1, 0, 0, 0, 168, 169, 5, 111, 0, 0, 169, 170, 5, 112, 0, 0, 170, 171, 5, 104, 0, 0, 171, 172, 5, 97, 0, 0, 172, 173, 5, 110, 0, 0, 173, 174, 5, 100, 0, 0, 174, 175, 5, 108, 0, 0, 175, 176, 5, 101, 0, 0, 176, 177, 5, 114, 0, 0, 177, 16, 1, 0, 0, 0, 178, 179, 5, 97, 0, 0, 179, 180, 5, 115, 0, 0, 180, 18, 1, 0, 0, 0, 181, 182, 5, 105, 0, 0, 182, 183, 5, 102, 0, 0, 183, 20, 1, 0, 0, 0, 184, 185, 5, 119, 0, 0, 185, 186, 5, 104, 0, 0, 186, 187, 5, 105, 0, 0, 187, 188, 5, 108, 0, 0, 188, 189, 5, 101, 0, 0, 189, 22, 1, 0, 0, 0, 190, 191, 5, 101, 0, 0, 191, 192, 5, 108, 0, 0, 192, 193, 5, 115, 0, 0, 193, 194, 5, 101, 0, 0, 194, 24, 1, 0, 0, 0, 195, 196, 5, 101, 0, 0, 196, 197, 5, 108, 0, 0, 197, 198, 5, 105, 0, 0, 198, 199, 5, 102, 0, 0, 199, 26, 1, 0, 0, 0, 200, 203, 3, 49, 24, 0, 201, 203, 3, 37, 18, 0, 202, 200, 1, 0, 0, 0, 202, 201, 1, 0, 0, 0, 203, 28, 1, 0, 0, 0, 204, 205, 5, 43, 0, 0, 205, 30, 1, 0, 0, 0, 206, 207, 5, 45, 0, 0, 207, 32, 1, 0, 0, 0, 208, 209, 5, 42, 0, 0, 209, 34, 1, 0, 0, 0, 210, 211, 5, 47, 0, 0, 211, 36, 1, 0, 0, 0, 212, 217, 3, 29, 14, 0, 213, 217, 3, 31, 15, 0, 214, 217, 3, 33, 16, 0, 215, 217, 3, 35, 17, 0, 216, 212, 1, 0, 0, 0, 216, 213, 1, 0, 0, 0, 216, 214, 1, 0, 0, 0, 216, 215, 1, 0, 0, 0, 217, 38, 1, 0, 0, 0, 218, 219, 5, 60, 0, 0, 219, 220, 5, 63, 0, 0, 220, 40, 1, 0, 0, 0, 221, 222, 5, 60, 0, 0, 222, 223, 5, 61, 0, 0, 223, 42, 1, 0, 0, 0, 224, 225, 5, 62, 0, 0, 225, 226, 5, 63, 0, 0, 226, 44, 1, 0, 0, 0, 227, 228, 5, 62, 0, 0, 228, 229, 5, 61, 0, 0, 229, 46, 1, 0, 0, 0, 230, 231, 5, 61, 0, 0, 231, 232, 5, 61, 0, 0, 232, 48, 1, 0, 0, 0, 233, 239, 3, 39, 19, 0, 234, 239, 3, 41, 20, 0, 235, 239, 3, 43, 21, 0, 236, 239, 3, 45, 22, 0, 237, 239, 3, 47, 23, 0, 238, 233, 1, 0, 0, 0, 238, 234, 1, 0, 0, 0, 238, 235, 1, 0, 0, 0, 238, 236, 1, 0, 0, 0, 238, 237, 1, 0, 0, 0, 239, 50, 1, 0, 0, 0, 240, 241, 5, 45, 0, 0, 241, 242, 5, 62, 0, 0, 242, 52, 1, 0, 0, 0, 243, 244, 5, 66, 0, 0, 244, 245, 5, 126, 0, 0, 245, 54, 1, 0, 0, 0, 246, 247, 5, 65, 0, 0, 247, 248, 5, 126, 0, 0, 248, 56, 1, 0, 0, 0, 249, 250, 5, 61, 0, 0, 250, 58, 1, 0, 0, 0, 251, 252, 5, 42, 0, 0, 252, 253, 5, 61, 0, 0, 253, 60, 1, 0, 0, 0, 254, 255, 5, 40, 0, 0, 255, 62, 1, 0, 0, 0, 256, 257, 5, 41, 0, 0, 257, 64, 1, 0, 0, 0, 258, 259, 5, 91, 0, 0, 259, 66, 1, 0, 0, 0, 260, 261, 5, 93, 0, 0, 261, 68, 1, 0, 0, 0, 262, 263, 5, 58, 0, 0, 263, 70, 1, 0, 0, 0, 264, 265, 5, 123, 0, 0, 265, 72, 1, 0, 0, 0, 266, 267, 5, 125, 0, 0, 267, 74, 1, 0, 0, 0, 268, 269, 5, 60, 0, 0, 269, 76, 1, 0, 0, 0, 270, 271, 5, 62, 0, 0, 271, 78, 1, 0, 0, 0, 272, 273, 5, 44, 0, 0, 273, 80, 1, 0, 0, 0, 274, 275, 5, 46, 0, 0, 275, 82, 1, 0, 0, 0, 276, 277, 5, 59, 0, 0, 277, 84, 1, 0, 0, 0, 278, 279, 5, 95, 0, 0, 279, 86, 1, 0, 0, 0, 280, 281, 5, 35, 0, 0, 281, 88, 1, 0, 0, 0, 282, 283, 5, 34, 0, 0, 283, 90, 1, 0, 0, 0, 284, 289, 3, 109, 54, 0, 285, 289, 3, 111, 55, 0, 286, 289, 3, 93, 46, 0, 287, 289, 3, 95, 47, 0, 288, 284, 1, 0, 0, 0, 288, 285, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 288, 287, 1, 0, 0, 0, 289, 290, 1, 0, 0, 0, 290, 291, 6, 45, 0, 0, 291, 92, 1, 0, 0, 0, 292, 293, 5, 47, 0, 0, 293, 294, 5, 47, 0, 0, 294, 298, 1, 0, 0, 0, 295, 297, 8, 0, 0, 0, 296, 295, 1, 0, 0, 0, 297, 300, 1, 0, 0, 0, 298, 296, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 94, 1, 0, 0, 0, 300, 298, 1, 0, 0, 0, 301, 302, 5, 47, 0, 0, 302, 303, 5, 42, 0, 0, 303, 307, 1, 0, 0, 0, 304, 306, 9, 0, 0, 0, 305, 304, 1, 0, 0, 0, 306, 309, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 307, 305, 1, 0, 0, 0, 308, 310, 1, 0, 0, 0, 309, 307, 1, 0, 0, 0, 310, 311, 5, 42, 0, 0, 311, 312, 5, 47, 0, 0, 312, 96, 1, 0, 0, 0, 313, 315, 3, 105, 52, 0, 314, 313, 1, 0, 0, 0, 315, 316, 1, 0, 0, 0, 316, 314, 1, 0, 0, 0, 316, 317, 1, 0, 0, 0, 317, 98, 1, 0, 0, 0, 318, 322, 3, 89, 44, 0, 319, 321, 8, 1, 0, 0, 320, 319, 1, 0, 0, 0, 321, 324, 1, 0, 0, 0, 322, 320, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 325, 1, 0, 0, 0, 324, 322, 1, 0, 0, 0, 325, 326, 3, 89, 44, 0, 326, 100, 1, 0, 0, 0, 327, 333, 3, 103, 51, 0, 328, 332, 3, 103, 51, 0, 329, 332, 3, 97, 48, 0, 330, 332, 3, 85, 42, 0, 331, 328, 1, 0, 0, 0, 331, 329, 1, 0, 0, 0, 331, 330, 1, 0, 0, 0, 332, 335, 1, 0, 0, 0, 333, 331, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 102, 1, 0, 0, 0, 335, 333, 1, 0, 0, 0, 336, 337, 7, 2, 0, 0, 337, 104, 1, 0, 0, 0, 338, 339, 7, 3, 0, 0, 339, 106, 1, 0, 0, 0, 340, 341, 7, 4, 0, 0, 341, 108, 1, 0, 0, 0, 342, 344, 7, 5, 0, 0, 343, 342, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 110, 1, 0, 0, 0, 347, 349, 7, 0, 0, 0, 348, 347, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 354, 1, 0, 0, 0, 352, 354, 5, 0, 0, 1, 353, 348, 1, 0, 0, 0, 353, 352, 1, 0, 0, 0, 354, 112, 1, 0, 0, 0, 14, 0, 202, 216, 238, 288, 298, 307, 316, 322, 331, 333, 345, 350, 353, 1, 6, 0, 0] \ No newline at end of file diff --git a/Crimson/Resources/CrimsonNotepad++.xml b/Crimson/Resources/CrimsonNotepad++.xml index a742346..454f41e 100644 --- a/Crimson/Resources/CrimsonNotepad++.xml +++ b/Crimson/Resources/CrimsonNotepad++.xml @@ -2,7 +2,7 @@ - + 00// 01 02 03 04 @@ -29,7 +29,7 @@ global scope A~ B~ if while else return - + : 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/Native Library/console.crm b/Crimson/Resources/Native Library/console.crm index 77fff6f..576da6c 100644 --- a/Crimson/Resources/Native Library/console.crm +++ b/Crimson/Resources/Native Library/console.crm @@ -1,5 +1,5 @@ { - function write (i:int_size:) { + function write (i) { } } \ No newline at end of file diff --git a/Crimson/Resources/Native Library/fraction.crm b/Crimson/Resources/Native Library/fraction.crm index c92e477..48165c7 100644 --- a/Crimson/Resources/Native Library/fraction.crm +++ b/Crimson/Resources/Native Library/fraction.crm @@ -1,6 +1,6 @@ { structure Fraction { - numerator:int_size:; - denominator:int_size:; + numerator; + denominator; } } \ No newline at end of file diff --git a/Crimson/Resources/Native Library/heap.crm b/Crimson/Resources/Native Library/heap.crm index c35b4d2..6a9cd0e 100644 --- a/Crimson/Resources/Native Library/heap.crm +++ b/Crimson/Resources/Native Library/heap.crm @@ -28,32 +28,32 @@ // It should be at a static location relative to the start of process memory. // int[] regions = new int[256]; - #using "${NATIVE}/maths.crm" as maths + #using "${NATIVE}/maths.crm" as maths; // IMPORTANT!! // regions_i and regions_region will be removed!! // They should not be used and are purely for testing linking - global regions_i = 0:int_size:; - global regions_length = 0:int_size:; - global regions_region = 0:int_size:; + global regions_i = 0; + global regions_length = 0; + global regions_region = 0; - scope int_size = 4:1:; - scope ptr_size = 4:1:; + global int_size = 4<4>; + global ptr_size = 4<4>; // // Return a pointer to a block of memory which is at least of the given size. // - function alloc (size:int_size:) + function alloc (size) { - i:int_size: = 0; - while (i : regions_length) + i = 0; + while (i ; + region_ptr = 0; + region_ptr = get_region_ptr(r); return region_ptr; } i = i + 1; @@ -66,12 +66,12 @@ // This is given by the result of the calculation: // HeapOffset + exponential_offset + r*RegionMetaSize; // - function get_region_ptr (r:int_size:) + function get_region_ptr (r) { // Need to calculate this before r changes later on - RRMS:int_size: = r * RegionMetaSize; + RRMS = r * RegionMetaSize; - exponential_offset:int_size: = 4; + exponential_offset = 4; // R:0 is not permitted if (r : 0) { @@ -96,15 +96,15 @@ } // Calculate final pointer value as in described equation - HO_EXP:int_size: = HeapOffset + exponential_offset; - HO_EXP_RRMS:ptr_size: = HO_EXP + RRMS; + HO_EXP = HeapOffset + exponential_offset; + HO_EXP_RRMS = HO_EXP + RRMS; return HO_EXP_RRMS; } - function freeptr (pointer:ptr_size:) + function freeptr (pointer) { - r:int_size: = 0; - region_ptr:ptr_size: = get_region_ptr(r); + r = 0; + region_ptr = get_region_ptr(r); while ( pointer : region_ptr ) { r = r + 1; @@ -113,7 +113,7 @@ freeregion(r); } - function freeregion (region:int_size:) + function freeregion (region) { // Replace with regions[region] regions_region = 0; diff --git a/Crimson/Resources/Native Library/maths.crm b/Crimson/Resources/Native Library/maths.crm index 795c49d..35f94e5 100644 --- a/Crimson/Resources/Native Library/maths.crm +++ b/Crimson/Resources/Native Library/maths.crm @@ -1,9 +1,9 @@ { - function pwr (number:int_size:, exponent:int_size:) { + function pwr (number, exponent) { while (exponent : 0) { - number:int_size: = number * number; - exponent:int_size: = exponent - 1; + number = number * number; + exponent = exponent - 1; } } } \ No newline at end of file diff --git a/Crimson/Resources/Test Compilations/logging/log.crm b/Crimson/Resources/Test Compilations/logging/log.crm index 54b444a..a605c69 100644 --- a/Crimson/Resources/Test Compilations/logging/log.crm +++ b/Crimson/Resources/Test Compilations/logging/log.crm @@ -2,13 +2,13 @@ #using "${NATIVE}/console.crm" as utils_stdout // Utility package - function multiply (num1:int_size:, num2:int_size:) { + function multiply (num1, num2) { utils_stdout.write(6); return num1; } - function times (num1:int_size:, num2:int_size:) { - ret:int_size: = multiply(num1, num2); + function times (num1, num2) { + ret = multiply(num1, num2); return ret; } } \ No newline at end of file diff --git a/Crimson/Resources/Test Compilations/main.crm b/Crimson/Resources/Test Compilations/main.crm index 30de6bc..b914006 100644 --- a/Crimson/Resources/Test Compilations/main.crm +++ b/Crimson/Resources/Test Compilations/main.crm @@ -28,8 +28,8 @@ if (true == true) { counter = 5; } else if (b == true) { - c = utils.times(5, 3); - d = heap.alloc(); + c = utils.times(5, 3); + d = heap.alloc(); } else { return b; } @@ -45,7 +45,7 @@ i *= 4; // Note usage of functions from imported packages - stdout.write(i); + stdout.write(i); scope ret; ret = heap.alloc(4); diff --git a/Crimson/Resources/Test Compilations/utils/utils.crm b/Crimson/Resources/Test Compilations/utils/utils.crm index 7a98b2d..c23fcde 100644 --- a/Crimson/Resources/Test Compilations/utils/utils.crm +++ b/Crimson/Resources/Test Compilations/utils/utils.crm @@ -2,13 +2,13 @@ #using "${NATIVE}/console.crm" as utils_stdout; // Utility package - function multiply (num1:int_size:, num2:int_size:) { + function multiply (num1, num2) { utils_stdout.write(6); return num1; } - function times (num1:int_size:, num2:int_size: ) { - ret(4) = multiply(num1, num2); + function times (num1, num2 ) { + ret = multiply(num1, num2)<4>; return ret; } } \ No newline at end of file From c96d24c3675ab91a7dd5f3a191de3d9dfdb02422 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 21 Mar 2023 21:35:40 +0000 Subject: [PATCH 026/122] < and > are making me sad > '<' and '>' are making the Notepad ++ highlight things it shouldn't, so they've temporarily been replaced by '<<>' and '<>>' --- Crimson/Antlr/Input/Crimson.g4 | 4 +- Crimson/Antlr/Output/CrimsonLexer.cs | 203 +++++++++--------- Crimson/Antlr/Output/CrimsonLexer.interp | 2 +- .../Tokens/OperationResolvableValueCToken.cs | 9 +- Crimson/Resources/Native Library/heap.crm | 36 ++-- Crimson/Resources/Native Library/maths.crm | 6 +- 6 files changed, 134 insertions(+), 126 deletions(-) diff --git a/Crimson/Antlr/Input/Crimson.g4 b/Crimson/Antlr/Input/Crimson.g4 index 4a0f238..18c5cd2 100644 --- a/Crimson/Antlr/Input/Crimson.g4 +++ b/Crimson/Antlr/Input/Crimson.g4 @@ -148,9 +148,9 @@ Asterisk: '*'; fragment Slash: '/'; MathsOperator: Plus | Minus | Asterisk | Slash; -fragment Less: ''; fragment LessEqual: '<='; -fragment Greater: '>?'; +fragment Greater: '<>>'; fragment GreaterEqual: '>='; fragment EqualTo: '=='; Comparator: Less | LessEqual | Greater | GreaterEqual | EqualTo; diff --git a/Crimson/Antlr/Output/CrimsonLexer.cs b/Crimson/Antlr/Output/CrimsonLexer.cs index 7cb37b7..ede3a39 100644 --- a/Crimson/Antlr/Output/CrimsonLexer.cs +++ b/Crimson/Antlr/Output/CrimsonLexer.cs @@ -117,7 +117,7 @@ static CrimsonLexer() { } } private static int[] _serializedATN = { - 4,0,43,355,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,357,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, @@ -131,106 +131,107 @@ static CrimsonLexer() { 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,3,13,203,8,13,1,14,1,14,1,15,1,15,1,16,1,16,1,17,1,17, - 1,18,1,18,1,18,1,18,3,18,217,8,18,1,19,1,19,1,19,1,20,1,20,1,20,1,21,1, - 21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,3,24,239, - 8,24,1,25,1,25,1,25,1,26,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,31,1,31,1,32,1,32,1,33,1,33,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,45,1,45,3,45,289,8,45,1,45,1,45,1,46,1,46,1, - 46,1,46,5,46,297,8,46,10,46,12,46,300,9,46,1,47,1,47,1,47,1,47,5,47,306, - 8,47,10,47,12,47,309,9,47,1,47,1,47,1,47,1,48,4,48,315,8,48,11,48,12,48, - 316,1,49,1,49,5,49,321,8,49,10,49,12,49,324,9,49,1,49,1,49,1,50,1,50,1, - 50,1,50,5,50,332,8,50,10,50,12,50,335,9,50,1,51,1,51,1,52,1,52,1,53,1, - 53,1,54,4,54,344,8,54,11,54,12,54,345,1,55,4,55,349,8,55,11,55,12,55,350, - 1,55,3,55,354,8,55,1,307,0,56,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,0,31,0,33,15,35,0,37,16,39,0,41,0,43, - 0,45,0,47,0,49,17,51,18,53,19,55,20,57,21,59,22,61,23,63,24,65,25,67,26, - 69,27,71,28,73,29,75,30,77,31,79,32,81,33,83,34,85,35,87,36,89,37,91,38, - 93,39,95,40,97,41,99,42,101,43,103,0,105,0,107,0,109,0,111,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,362,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,33,1,0,0,0,0,37,1,0,0, - 0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,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,1, - 113,1,0,0,0,3,123,1,0,0,0,5,132,1,0,0,0,7,139,1,0,0,0,9,145,1,0,0,0,11, - 152,1,0,0,0,13,162,1,0,0,0,15,168,1,0,0,0,17,178,1,0,0,0,19,181,1,0,0, - 0,21,184,1,0,0,0,23,190,1,0,0,0,25,195,1,0,0,0,27,202,1,0,0,0,29,204,1, - 0,0,0,31,206,1,0,0,0,33,208,1,0,0,0,35,210,1,0,0,0,37,216,1,0,0,0,39,218, - 1,0,0,0,41,221,1,0,0,0,43,224,1,0,0,0,45,227,1,0,0,0,47,230,1,0,0,0,49, - 238,1,0,0,0,51,240,1,0,0,0,53,243,1,0,0,0,55,246,1,0,0,0,57,249,1,0,0, - 0,59,251,1,0,0,0,61,254,1,0,0,0,63,256,1,0,0,0,65,258,1,0,0,0,67,260,1, - 0,0,0,69,262,1,0,0,0,71,264,1,0,0,0,73,266,1,0,0,0,75,268,1,0,0,0,77,270, - 1,0,0,0,79,272,1,0,0,0,81,274,1,0,0,0,83,276,1,0,0,0,85,278,1,0,0,0,87, - 280,1,0,0,0,89,282,1,0,0,0,91,288,1,0,0,0,93,292,1,0,0,0,95,301,1,0,0, - 0,97,314,1,0,0,0,99,318,1,0,0,0,101,327,1,0,0,0,103,336,1,0,0,0,105,338, - 1,0,0,0,107,340,1,0,0,0,109,343,1,0,0,0,111,353,1,0,0,0,113,114,5,97,0, - 0,114,115,5,108,0,0,115,116,5,108,0,0,116,117,5,111,0,0,117,118,5,99,0, - 0,118,119,5,97,0,0,119,120,5,116,0,0,120,121,5,111,0,0,121,122,5,114,0, - 0,122,2,1,0,0,0,123,124,5,102,0,0,124,125,5,117,0,0,125,126,5,110,0,0, - 126,127,5,99,0,0,127,128,5,116,0,0,128,129,5,105,0,0,129,130,5,111,0,0, - 130,131,5,110,0,0,131,4,1,0,0,0,132,133,5,103,0,0,133,134,5,108,0,0,134, - 135,5,111,0,0,135,136,5,98,0,0,136,137,5,97,0,0,137,138,5,108,0,0,138, - 6,1,0,0,0,139,140,5,115,0,0,140,141,5,99,0,0,141,142,5,111,0,0,142,143, - 5,112,0,0,143,144,5,101,0,0,144,8,1,0,0,0,145,146,5,114,0,0,146,147,5, - 101,0,0,147,148,5,116,0,0,148,149,5,117,0,0,149,150,5,114,0,0,150,151, - 5,110,0,0,151,10,1,0,0,0,152,153,5,115,0,0,153,154,5,116,0,0,154,155,5, - 114,0,0,155,156,5,117,0,0,156,157,5,99,0,0,157,158,5,116,0,0,158,159,5, - 117,0,0,159,160,5,114,0,0,160,161,5,101,0,0,161,12,1,0,0,0,162,163,5,117, - 0,0,163,164,5,115,0,0,164,165,5,105,0,0,165,166,5,110,0,0,166,167,5,103, - 0,0,167,14,1,0,0,0,168,169,5,111,0,0,169,170,5,112,0,0,170,171,5,104,0, - 0,171,172,5,97,0,0,172,173,5,110,0,0,173,174,5,100,0,0,174,175,5,108,0, - 0,175,176,5,101,0,0,176,177,5,114,0,0,177,16,1,0,0,0,178,179,5,97,0,0, - 179,180,5,115,0,0,180,18,1,0,0,0,181,182,5,105,0,0,182,183,5,102,0,0,183, - 20,1,0,0,0,184,185,5,119,0,0,185,186,5,104,0,0,186,187,5,105,0,0,187,188, - 5,108,0,0,188,189,5,101,0,0,189,22,1,0,0,0,190,191,5,101,0,0,191,192,5, - 108,0,0,192,193,5,115,0,0,193,194,5,101,0,0,194,24,1,0,0,0,195,196,5,101, - 0,0,196,197,5,108,0,0,197,198,5,105,0,0,198,199,5,102,0,0,199,26,1,0,0, - 0,200,203,3,49,24,0,201,203,3,37,18,0,202,200,1,0,0,0,202,201,1,0,0,0, - 203,28,1,0,0,0,204,205,5,43,0,0,205,30,1,0,0,0,206,207,5,45,0,0,207,32, - 1,0,0,0,208,209,5,42,0,0,209,34,1,0,0,0,210,211,5,47,0,0,211,36,1,0,0, - 0,212,217,3,29,14,0,213,217,3,31,15,0,214,217,3,33,16,0,215,217,3,35,17, - 0,216,212,1,0,0,0,216,213,1,0,0,0,216,214,1,0,0,0,216,215,1,0,0,0,217, - 38,1,0,0,0,218,219,5,60,0,0,219,220,5,63,0,0,220,40,1,0,0,0,221,222,5, - 60,0,0,222,223,5,61,0,0,223,42,1,0,0,0,224,225,5,62,0,0,225,226,5,63,0, - 0,226,44,1,0,0,0,227,228,5,62,0,0,228,229,5,61,0,0,229,46,1,0,0,0,230, - 231,5,61,0,0,231,232,5,61,0,0,232,48,1,0,0,0,233,239,3,39,19,0,234,239, - 3,41,20,0,235,239,3,43,21,0,236,239,3,45,22,0,237,239,3,47,23,0,238,233, - 1,0,0,0,238,234,1,0,0,0,238,235,1,0,0,0,238,236,1,0,0,0,238,237,1,0,0, - 0,239,50,1,0,0,0,240,241,5,45,0,0,241,242,5,62,0,0,242,52,1,0,0,0,243, - 244,5,66,0,0,244,245,5,126,0,0,245,54,1,0,0,0,246,247,5,65,0,0,247,248, - 5,126,0,0,248,56,1,0,0,0,249,250,5,61,0,0,250,58,1,0,0,0,251,252,5,42, - 0,0,252,253,5,61,0,0,253,60,1,0,0,0,254,255,5,40,0,0,255,62,1,0,0,0,256, - 257,5,41,0,0,257,64,1,0,0,0,258,259,5,91,0,0,259,66,1,0,0,0,260,261,5, - 93,0,0,261,68,1,0,0,0,262,263,5,58,0,0,263,70,1,0,0,0,264,265,5,123,0, - 0,265,72,1,0,0,0,266,267,5,125,0,0,267,74,1,0,0,0,268,269,5,60,0,0,269, - 76,1,0,0,0,270,271,5,62,0,0,271,78,1,0,0,0,272,273,5,44,0,0,273,80,1,0, - 0,0,274,275,5,46,0,0,275,82,1,0,0,0,276,277,5,59,0,0,277,84,1,0,0,0,278, - 279,5,95,0,0,279,86,1,0,0,0,280,281,5,35,0,0,281,88,1,0,0,0,282,283,5, - 34,0,0,283,90,1,0,0,0,284,289,3,109,54,0,285,289,3,111,55,0,286,289,3, - 93,46,0,287,289,3,95,47,0,288,284,1,0,0,0,288,285,1,0,0,0,288,286,1,0, - 0,0,288,287,1,0,0,0,289,290,1,0,0,0,290,291,6,45,0,0,291,92,1,0,0,0,292, - 293,5,47,0,0,293,294,5,47,0,0,294,298,1,0,0,0,295,297,8,0,0,0,296,295, - 1,0,0,0,297,300,1,0,0,0,298,296,1,0,0,0,298,299,1,0,0,0,299,94,1,0,0,0, - 300,298,1,0,0,0,301,302,5,47,0,0,302,303,5,42,0,0,303,307,1,0,0,0,304, - 306,9,0,0,0,305,304,1,0,0,0,306,309,1,0,0,0,307,308,1,0,0,0,307,305,1, - 0,0,0,308,310,1,0,0,0,309,307,1,0,0,0,310,311,5,42,0,0,311,312,5,47,0, - 0,312,96,1,0,0,0,313,315,3,105,52,0,314,313,1,0,0,0,315,316,1,0,0,0,316, - 314,1,0,0,0,316,317,1,0,0,0,317,98,1,0,0,0,318,322,3,89,44,0,319,321,8, - 1,0,0,320,319,1,0,0,0,321,324,1,0,0,0,322,320,1,0,0,0,322,323,1,0,0,0, - 323,325,1,0,0,0,324,322,1,0,0,0,325,326,3,89,44,0,326,100,1,0,0,0,327, - 333,3,103,51,0,328,332,3,103,51,0,329,332,3,97,48,0,330,332,3,85,42,0, - 331,328,1,0,0,0,331,329,1,0,0,0,331,330,1,0,0,0,332,335,1,0,0,0,333,331, - 1,0,0,0,333,334,1,0,0,0,334,102,1,0,0,0,335,333,1,0,0,0,336,337,7,2,0, - 0,337,104,1,0,0,0,338,339,7,3,0,0,339,106,1,0,0,0,340,341,7,4,0,0,341, - 108,1,0,0,0,342,344,7,5,0,0,343,342,1,0,0,0,344,345,1,0,0,0,345,343,1, - 0,0,0,345,346,1,0,0,0,346,110,1,0,0,0,347,349,7,0,0,0,348,347,1,0,0,0, - 349,350,1,0,0,0,350,348,1,0,0,0,350,351,1,0,0,0,351,354,1,0,0,0,352,354, - 5,0,0,1,353,348,1,0,0,0,353,352,1,0,0,0,354,112,1,0,0,0,14,0,202,216,238, - 288,298,307,316,322,331,333,345,350,353,1,6,0,0 + 1,18,1,18,1,18,1,18,3,18,217,8,18,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1, + 21,1,21,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1, + 24,3,24,241,8,24,1,25,1,25,1,25,1,26,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,31,1,31,1,32,1,32,1,33,1,33,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,45,1,45,3,45,291,8,45,1,45,1,45,1, + 46,1,46,1,46,1,46,5,46,299,8,46,10,46,12,46,302,9,46,1,47,1,47,1,47,1, + 47,5,47,308,8,47,10,47,12,47,311,9,47,1,47,1,47,1,47,1,48,4,48,317,8,48, + 11,48,12,48,318,1,49,1,49,5,49,323,8,49,10,49,12,49,326,9,49,1,49,1,49, + 1,50,1,50,1,50,1,50,5,50,334,8,50,10,50,12,50,337,9,50,1,51,1,51,1,52, + 1,52,1,53,1,53,1,54,4,54,346,8,54,11,54,12,54,347,1,55,4,55,351,8,55,11, + 55,12,55,352,1,55,3,55,356,8,55,1,309,0,56,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,0,31,0,33,15,35,0,37,16,39, + 0,41,0,43,0,45,0,47,0,49,17,51,18,53,19,55,20,57,21,59,22,61,23,63,24, + 65,25,67,26,69,27,71,28,73,29,75,30,77,31,79,32,81,33,83,34,85,35,87,36, + 89,37,91,38,93,39,95,40,97,41,99,42,101,43,103,0,105,0,107,0,109,0,111, + 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,364,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,33,1,0,0, + 0,0,37,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57, + 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,1,113,1,0,0,0,3,123,1,0,0,0,5,132,1,0,0,0,7,139,1,0,0,0,9,145, + 1,0,0,0,11,152,1,0,0,0,13,162,1,0,0,0,15,168,1,0,0,0,17,178,1,0,0,0,19, + 181,1,0,0,0,21,184,1,0,0,0,23,190,1,0,0,0,25,195,1,0,0,0,27,202,1,0,0, + 0,29,204,1,0,0,0,31,206,1,0,0,0,33,208,1,0,0,0,35,210,1,0,0,0,37,216,1, + 0,0,0,39,218,1,0,0,0,41,222,1,0,0,0,43,225,1,0,0,0,45,229,1,0,0,0,47,232, + 1,0,0,0,49,240,1,0,0,0,51,242,1,0,0,0,53,245,1,0,0,0,55,248,1,0,0,0,57, + 251,1,0,0,0,59,253,1,0,0,0,61,256,1,0,0,0,63,258,1,0,0,0,65,260,1,0,0, + 0,67,262,1,0,0,0,69,264,1,0,0,0,71,266,1,0,0,0,73,268,1,0,0,0,75,270,1, + 0,0,0,77,272,1,0,0,0,79,274,1,0,0,0,81,276,1,0,0,0,83,278,1,0,0,0,85,280, + 1,0,0,0,87,282,1,0,0,0,89,284,1,0,0,0,91,290,1,0,0,0,93,294,1,0,0,0,95, + 303,1,0,0,0,97,316,1,0,0,0,99,320,1,0,0,0,101,329,1,0,0,0,103,338,1,0, + 0,0,105,340,1,0,0,0,107,342,1,0,0,0,109,345,1,0,0,0,111,355,1,0,0,0,113, + 114,5,97,0,0,114,115,5,108,0,0,115,116,5,108,0,0,116,117,5,111,0,0,117, + 118,5,99,0,0,118,119,5,97,0,0,119,120,5,116,0,0,120,121,5,111,0,0,121, + 122,5,114,0,0,122,2,1,0,0,0,123,124,5,102,0,0,124,125,5,117,0,0,125,126, + 5,110,0,0,126,127,5,99,0,0,127,128,5,116,0,0,128,129,5,105,0,0,129,130, + 5,111,0,0,130,131,5,110,0,0,131,4,1,0,0,0,132,133,5,103,0,0,133,134,5, + 108,0,0,134,135,5,111,0,0,135,136,5,98,0,0,136,137,5,97,0,0,137,138,5, + 108,0,0,138,6,1,0,0,0,139,140,5,115,0,0,140,141,5,99,0,0,141,142,5,111, + 0,0,142,143,5,112,0,0,143,144,5,101,0,0,144,8,1,0,0,0,145,146,5,114,0, + 0,146,147,5,101,0,0,147,148,5,116,0,0,148,149,5,117,0,0,149,150,5,114, + 0,0,150,151,5,110,0,0,151,10,1,0,0,0,152,153,5,115,0,0,153,154,5,116,0, + 0,154,155,5,114,0,0,155,156,5,117,0,0,156,157,5,99,0,0,157,158,5,116,0, + 0,158,159,5,117,0,0,159,160,5,114,0,0,160,161,5,101,0,0,161,12,1,0,0,0, + 162,163,5,117,0,0,163,164,5,115,0,0,164,165,5,105,0,0,165,166,5,110,0, + 0,166,167,5,103,0,0,167,14,1,0,0,0,168,169,5,111,0,0,169,170,5,112,0,0, + 170,171,5,104,0,0,171,172,5,97,0,0,172,173,5,110,0,0,173,174,5,100,0,0, + 174,175,5,108,0,0,175,176,5,101,0,0,176,177,5,114,0,0,177,16,1,0,0,0,178, + 179,5,97,0,0,179,180,5,115,0,0,180,18,1,0,0,0,181,182,5,105,0,0,182,183, + 5,102,0,0,183,20,1,0,0,0,184,185,5,119,0,0,185,186,5,104,0,0,186,187,5, + 105,0,0,187,188,5,108,0,0,188,189,5,101,0,0,189,22,1,0,0,0,190,191,5,101, + 0,0,191,192,5,108,0,0,192,193,5,115,0,0,193,194,5,101,0,0,194,24,1,0,0, + 0,195,196,5,101,0,0,196,197,5,108,0,0,197,198,5,105,0,0,198,199,5,102, + 0,0,199,26,1,0,0,0,200,203,3,49,24,0,201,203,3,37,18,0,202,200,1,0,0,0, + 202,201,1,0,0,0,203,28,1,0,0,0,204,205,5,43,0,0,205,30,1,0,0,0,206,207, + 5,45,0,0,207,32,1,0,0,0,208,209,5,42,0,0,209,34,1,0,0,0,210,211,5,47,0, + 0,211,36,1,0,0,0,212,217,3,29,14,0,213,217,3,31,15,0,214,217,3,33,16,0, + 215,217,3,35,17,0,216,212,1,0,0,0,216,213,1,0,0,0,216,214,1,0,0,0,216, + 215,1,0,0,0,217,38,1,0,0,0,218,219,5,60,0,0,219,220,5,60,0,0,220,221,5, + 62,0,0,221,40,1,0,0,0,222,223,5,60,0,0,223,224,5,61,0,0,224,42,1,0,0,0, + 225,226,5,60,0,0,226,227,5,62,0,0,227,228,5,62,0,0,228,44,1,0,0,0,229, + 230,5,62,0,0,230,231,5,61,0,0,231,46,1,0,0,0,232,233,5,61,0,0,233,234, + 5,61,0,0,234,48,1,0,0,0,235,241,3,39,19,0,236,241,3,41,20,0,237,241,3, + 43,21,0,238,241,3,45,22,0,239,241,3,47,23,0,240,235,1,0,0,0,240,236,1, + 0,0,0,240,237,1,0,0,0,240,238,1,0,0,0,240,239,1,0,0,0,241,50,1,0,0,0,242, + 243,5,45,0,0,243,244,5,62,0,0,244,52,1,0,0,0,245,246,5,66,0,0,246,247, + 5,126,0,0,247,54,1,0,0,0,248,249,5,65,0,0,249,250,5,126,0,0,250,56,1,0, + 0,0,251,252,5,61,0,0,252,58,1,0,0,0,253,254,5,42,0,0,254,255,5,61,0,0, + 255,60,1,0,0,0,256,257,5,40,0,0,257,62,1,0,0,0,258,259,5,41,0,0,259,64, + 1,0,0,0,260,261,5,91,0,0,261,66,1,0,0,0,262,263,5,93,0,0,263,68,1,0,0, + 0,264,265,5,58,0,0,265,70,1,0,0,0,266,267,5,123,0,0,267,72,1,0,0,0,268, + 269,5,125,0,0,269,74,1,0,0,0,270,271,5,60,0,0,271,76,1,0,0,0,272,273,5, + 62,0,0,273,78,1,0,0,0,274,275,5,44,0,0,275,80,1,0,0,0,276,277,5,46,0,0, + 277,82,1,0,0,0,278,279,5,59,0,0,279,84,1,0,0,0,280,281,5,95,0,0,281,86, + 1,0,0,0,282,283,5,35,0,0,283,88,1,0,0,0,284,285,5,34,0,0,285,90,1,0,0, + 0,286,291,3,109,54,0,287,291,3,111,55,0,288,291,3,93,46,0,289,291,3,95, + 47,0,290,286,1,0,0,0,290,287,1,0,0,0,290,288,1,0,0,0,290,289,1,0,0,0,291, + 292,1,0,0,0,292,293,6,45,0,0,293,92,1,0,0,0,294,295,5,47,0,0,295,296,5, + 47,0,0,296,300,1,0,0,0,297,299,8,0,0,0,298,297,1,0,0,0,299,302,1,0,0,0, + 300,298,1,0,0,0,300,301,1,0,0,0,301,94,1,0,0,0,302,300,1,0,0,0,303,304, + 5,47,0,0,304,305,5,42,0,0,305,309,1,0,0,0,306,308,9,0,0,0,307,306,1,0, + 0,0,308,311,1,0,0,0,309,310,1,0,0,0,309,307,1,0,0,0,310,312,1,0,0,0,311, + 309,1,0,0,0,312,313,5,42,0,0,313,314,5,47,0,0,314,96,1,0,0,0,315,317,3, + 105,52,0,316,315,1,0,0,0,317,318,1,0,0,0,318,316,1,0,0,0,318,319,1,0,0, + 0,319,98,1,0,0,0,320,324,3,89,44,0,321,323,8,1,0,0,322,321,1,0,0,0,323, + 326,1,0,0,0,324,322,1,0,0,0,324,325,1,0,0,0,325,327,1,0,0,0,326,324,1, + 0,0,0,327,328,3,89,44,0,328,100,1,0,0,0,329,335,3,103,51,0,330,334,3,103, + 51,0,331,334,3,97,48,0,332,334,3,85,42,0,333,330,1,0,0,0,333,331,1,0,0, + 0,333,332,1,0,0,0,334,337,1,0,0,0,335,333,1,0,0,0,335,336,1,0,0,0,336, + 102,1,0,0,0,337,335,1,0,0,0,338,339,7,2,0,0,339,104,1,0,0,0,340,341,7, + 3,0,0,341,106,1,0,0,0,342,343,7,4,0,0,343,108,1,0,0,0,344,346,7,5,0,0, + 345,344,1,0,0,0,346,347,1,0,0,0,347,345,1,0,0,0,347,348,1,0,0,0,348,110, + 1,0,0,0,349,351,7,0,0,0,350,349,1,0,0,0,351,352,1,0,0,0,352,350,1,0,0, + 0,352,353,1,0,0,0,353,356,1,0,0,0,354,356,5,0,0,1,355,350,1,0,0,0,355, + 354,1,0,0,0,356,112,1,0,0,0,14,0,202,216,240,290,300,309,318,324,333,335, + 347,352,355,1,6,0,0 }; public static readonly ATN _ATN = diff --git a/Crimson/Antlr/Output/CrimsonLexer.interp b/Crimson/Antlr/Output/CrimsonLexer.interp index 6393718..d9da8ef 100644 --- a/Crimson/Antlr/Output/CrimsonLexer.interp +++ b/Crimson/Antlr/Output/CrimsonLexer.interp @@ -156,4 +156,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 43, 355, 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, 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, 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, 3, 13, 203, 8, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 217, 8, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 239, 8, 24, 1, 25, 1, 25, 1, 25, 1, 26, 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, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 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, 45, 1, 45, 3, 45, 289, 8, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 297, 8, 46, 10, 46, 12, 46, 300, 9, 46, 1, 47, 1, 47, 1, 47, 1, 47, 5, 47, 306, 8, 47, 10, 47, 12, 47, 309, 9, 47, 1, 47, 1, 47, 1, 47, 1, 48, 4, 48, 315, 8, 48, 11, 48, 12, 48, 316, 1, 49, 1, 49, 5, 49, 321, 8, 49, 10, 49, 12, 49, 324, 9, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 5, 50, 332, 8, 50, 10, 50, 12, 50, 335, 9, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 4, 54, 344, 8, 54, 11, 54, 12, 54, 345, 1, 55, 4, 55, 349, 8, 55, 11, 55, 12, 55, 350, 1, 55, 3, 55, 354, 8, 55, 1, 307, 0, 56, 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, 0, 31, 0, 33, 15, 35, 0, 37, 16, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 17, 51, 18, 53, 19, 55, 20, 57, 21, 59, 22, 61, 23, 63, 24, 65, 25, 67, 26, 69, 27, 71, 28, 73, 29, 75, 30, 77, 31, 79, 32, 81, 33, 83, 34, 85, 35, 87, 36, 89, 37, 91, 38, 93, 39, 95, 40, 97, 41, 99, 42, 101, 43, 103, 0, 105, 0, 107, 0, 109, 0, 111, 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, 362, 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, 33, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 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, 1, 113, 1, 0, 0, 0, 3, 123, 1, 0, 0, 0, 5, 132, 1, 0, 0, 0, 7, 139, 1, 0, 0, 0, 9, 145, 1, 0, 0, 0, 11, 152, 1, 0, 0, 0, 13, 162, 1, 0, 0, 0, 15, 168, 1, 0, 0, 0, 17, 178, 1, 0, 0, 0, 19, 181, 1, 0, 0, 0, 21, 184, 1, 0, 0, 0, 23, 190, 1, 0, 0, 0, 25, 195, 1, 0, 0, 0, 27, 202, 1, 0, 0, 0, 29, 204, 1, 0, 0, 0, 31, 206, 1, 0, 0, 0, 33, 208, 1, 0, 0, 0, 35, 210, 1, 0, 0, 0, 37, 216, 1, 0, 0, 0, 39, 218, 1, 0, 0, 0, 41, 221, 1, 0, 0, 0, 43, 224, 1, 0, 0, 0, 45, 227, 1, 0, 0, 0, 47, 230, 1, 0, 0, 0, 49, 238, 1, 0, 0, 0, 51, 240, 1, 0, 0, 0, 53, 243, 1, 0, 0, 0, 55, 246, 1, 0, 0, 0, 57, 249, 1, 0, 0, 0, 59, 251, 1, 0, 0, 0, 61, 254, 1, 0, 0, 0, 63, 256, 1, 0, 0, 0, 65, 258, 1, 0, 0, 0, 67, 260, 1, 0, 0, 0, 69, 262, 1, 0, 0, 0, 71, 264, 1, 0, 0, 0, 73, 266, 1, 0, 0, 0, 75, 268, 1, 0, 0, 0, 77, 270, 1, 0, 0, 0, 79, 272, 1, 0, 0, 0, 81, 274, 1, 0, 0, 0, 83, 276, 1, 0, 0, 0, 85, 278, 1, 0, 0, 0, 87, 280, 1, 0, 0, 0, 89, 282, 1, 0, 0, 0, 91, 288, 1, 0, 0, 0, 93, 292, 1, 0, 0, 0, 95, 301, 1, 0, 0, 0, 97, 314, 1, 0, 0, 0, 99, 318, 1, 0, 0, 0, 101, 327, 1, 0, 0, 0, 103, 336, 1, 0, 0, 0, 105, 338, 1, 0, 0, 0, 107, 340, 1, 0, 0, 0, 109, 343, 1, 0, 0, 0, 111, 353, 1, 0, 0, 0, 113, 114, 5, 97, 0, 0, 114, 115, 5, 108, 0, 0, 115, 116, 5, 108, 0, 0, 116, 117, 5, 111, 0, 0, 117, 118, 5, 99, 0, 0, 118, 119, 5, 97, 0, 0, 119, 120, 5, 116, 0, 0, 120, 121, 5, 111, 0, 0, 121, 122, 5, 114, 0, 0, 122, 2, 1, 0, 0, 0, 123, 124, 5, 102, 0, 0, 124, 125, 5, 117, 0, 0, 125, 126, 5, 110, 0, 0, 126, 127, 5, 99, 0, 0, 127, 128, 5, 116, 0, 0, 128, 129, 5, 105, 0, 0, 129, 130, 5, 111, 0, 0, 130, 131, 5, 110, 0, 0, 131, 4, 1, 0, 0, 0, 132, 133, 5, 103, 0, 0, 133, 134, 5, 108, 0, 0, 134, 135, 5, 111, 0, 0, 135, 136, 5, 98, 0, 0, 136, 137, 5, 97, 0, 0, 137, 138, 5, 108, 0, 0, 138, 6, 1, 0, 0, 0, 139, 140, 5, 115, 0, 0, 140, 141, 5, 99, 0, 0, 141, 142, 5, 111, 0, 0, 142, 143, 5, 112, 0, 0, 143, 144, 5, 101, 0, 0, 144, 8, 1, 0, 0, 0, 145, 146, 5, 114, 0, 0, 146, 147, 5, 101, 0, 0, 147, 148, 5, 116, 0, 0, 148, 149, 5, 117, 0, 0, 149, 150, 5, 114, 0, 0, 150, 151, 5, 110, 0, 0, 151, 10, 1, 0, 0, 0, 152, 153, 5, 115, 0, 0, 153, 154, 5, 116, 0, 0, 154, 155, 5, 114, 0, 0, 155, 156, 5, 117, 0, 0, 156, 157, 5, 99, 0, 0, 157, 158, 5, 116, 0, 0, 158, 159, 5, 117, 0, 0, 159, 160, 5, 114, 0, 0, 160, 161, 5, 101, 0, 0, 161, 12, 1, 0, 0, 0, 162, 163, 5, 117, 0, 0, 163, 164, 5, 115, 0, 0, 164, 165, 5, 105, 0, 0, 165, 166, 5, 110, 0, 0, 166, 167, 5, 103, 0, 0, 167, 14, 1, 0, 0, 0, 168, 169, 5, 111, 0, 0, 169, 170, 5, 112, 0, 0, 170, 171, 5, 104, 0, 0, 171, 172, 5, 97, 0, 0, 172, 173, 5, 110, 0, 0, 173, 174, 5, 100, 0, 0, 174, 175, 5, 108, 0, 0, 175, 176, 5, 101, 0, 0, 176, 177, 5, 114, 0, 0, 177, 16, 1, 0, 0, 0, 178, 179, 5, 97, 0, 0, 179, 180, 5, 115, 0, 0, 180, 18, 1, 0, 0, 0, 181, 182, 5, 105, 0, 0, 182, 183, 5, 102, 0, 0, 183, 20, 1, 0, 0, 0, 184, 185, 5, 119, 0, 0, 185, 186, 5, 104, 0, 0, 186, 187, 5, 105, 0, 0, 187, 188, 5, 108, 0, 0, 188, 189, 5, 101, 0, 0, 189, 22, 1, 0, 0, 0, 190, 191, 5, 101, 0, 0, 191, 192, 5, 108, 0, 0, 192, 193, 5, 115, 0, 0, 193, 194, 5, 101, 0, 0, 194, 24, 1, 0, 0, 0, 195, 196, 5, 101, 0, 0, 196, 197, 5, 108, 0, 0, 197, 198, 5, 105, 0, 0, 198, 199, 5, 102, 0, 0, 199, 26, 1, 0, 0, 0, 200, 203, 3, 49, 24, 0, 201, 203, 3, 37, 18, 0, 202, 200, 1, 0, 0, 0, 202, 201, 1, 0, 0, 0, 203, 28, 1, 0, 0, 0, 204, 205, 5, 43, 0, 0, 205, 30, 1, 0, 0, 0, 206, 207, 5, 45, 0, 0, 207, 32, 1, 0, 0, 0, 208, 209, 5, 42, 0, 0, 209, 34, 1, 0, 0, 0, 210, 211, 5, 47, 0, 0, 211, 36, 1, 0, 0, 0, 212, 217, 3, 29, 14, 0, 213, 217, 3, 31, 15, 0, 214, 217, 3, 33, 16, 0, 215, 217, 3, 35, 17, 0, 216, 212, 1, 0, 0, 0, 216, 213, 1, 0, 0, 0, 216, 214, 1, 0, 0, 0, 216, 215, 1, 0, 0, 0, 217, 38, 1, 0, 0, 0, 218, 219, 5, 60, 0, 0, 219, 220, 5, 63, 0, 0, 220, 40, 1, 0, 0, 0, 221, 222, 5, 60, 0, 0, 222, 223, 5, 61, 0, 0, 223, 42, 1, 0, 0, 0, 224, 225, 5, 62, 0, 0, 225, 226, 5, 63, 0, 0, 226, 44, 1, 0, 0, 0, 227, 228, 5, 62, 0, 0, 228, 229, 5, 61, 0, 0, 229, 46, 1, 0, 0, 0, 230, 231, 5, 61, 0, 0, 231, 232, 5, 61, 0, 0, 232, 48, 1, 0, 0, 0, 233, 239, 3, 39, 19, 0, 234, 239, 3, 41, 20, 0, 235, 239, 3, 43, 21, 0, 236, 239, 3, 45, 22, 0, 237, 239, 3, 47, 23, 0, 238, 233, 1, 0, 0, 0, 238, 234, 1, 0, 0, 0, 238, 235, 1, 0, 0, 0, 238, 236, 1, 0, 0, 0, 238, 237, 1, 0, 0, 0, 239, 50, 1, 0, 0, 0, 240, 241, 5, 45, 0, 0, 241, 242, 5, 62, 0, 0, 242, 52, 1, 0, 0, 0, 243, 244, 5, 66, 0, 0, 244, 245, 5, 126, 0, 0, 245, 54, 1, 0, 0, 0, 246, 247, 5, 65, 0, 0, 247, 248, 5, 126, 0, 0, 248, 56, 1, 0, 0, 0, 249, 250, 5, 61, 0, 0, 250, 58, 1, 0, 0, 0, 251, 252, 5, 42, 0, 0, 252, 253, 5, 61, 0, 0, 253, 60, 1, 0, 0, 0, 254, 255, 5, 40, 0, 0, 255, 62, 1, 0, 0, 0, 256, 257, 5, 41, 0, 0, 257, 64, 1, 0, 0, 0, 258, 259, 5, 91, 0, 0, 259, 66, 1, 0, 0, 0, 260, 261, 5, 93, 0, 0, 261, 68, 1, 0, 0, 0, 262, 263, 5, 58, 0, 0, 263, 70, 1, 0, 0, 0, 264, 265, 5, 123, 0, 0, 265, 72, 1, 0, 0, 0, 266, 267, 5, 125, 0, 0, 267, 74, 1, 0, 0, 0, 268, 269, 5, 60, 0, 0, 269, 76, 1, 0, 0, 0, 270, 271, 5, 62, 0, 0, 271, 78, 1, 0, 0, 0, 272, 273, 5, 44, 0, 0, 273, 80, 1, 0, 0, 0, 274, 275, 5, 46, 0, 0, 275, 82, 1, 0, 0, 0, 276, 277, 5, 59, 0, 0, 277, 84, 1, 0, 0, 0, 278, 279, 5, 95, 0, 0, 279, 86, 1, 0, 0, 0, 280, 281, 5, 35, 0, 0, 281, 88, 1, 0, 0, 0, 282, 283, 5, 34, 0, 0, 283, 90, 1, 0, 0, 0, 284, 289, 3, 109, 54, 0, 285, 289, 3, 111, 55, 0, 286, 289, 3, 93, 46, 0, 287, 289, 3, 95, 47, 0, 288, 284, 1, 0, 0, 0, 288, 285, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 288, 287, 1, 0, 0, 0, 289, 290, 1, 0, 0, 0, 290, 291, 6, 45, 0, 0, 291, 92, 1, 0, 0, 0, 292, 293, 5, 47, 0, 0, 293, 294, 5, 47, 0, 0, 294, 298, 1, 0, 0, 0, 295, 297, 8, 0, 0, 0, 296, 295, 1, 0, 0, 0, 297, 300, 1, 0, 0, 0, 298, 296, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 94, 1, 0, 0, 0, 300, 298, 1, 0, 0, 0, 301, 302, 5, 47, 0, 0, 302, 303, 5, 42, 0, 0, 303, 307, 1, 0, 0, 0, 304, 306, 9, 0, 0, 0, 305, 304, 1, 0, 0, 0, 306, 309, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 307, 305, 1, 0, 0, 0, 308, 310, 1, 0, 0, 0, 309, 307, 1, 0, 0, 0, 310, 311, 5, 42, 0, 0, 311, 312, 5, 47, 0, 0, 312, 96, 1, 0, 0, 0, 313, 315, 3, 105, 52, 0, 314, 313, 1, 0, 0, 0, 315, 316, 1, 0, 0, 0, 316, 314, 1, 0, 0, 0, 316, 317, 1, 0, 0, 0, 317, 98, 1, 0, 0, 0, 318, 322, 3, 89, 44, 0, 319, 321, 8, 1, 0, 0, 320, 319, 1, 0, 0, 0, 321, 324, 1, 0, 0, 0, 322, 320, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 325, 1, 0, 0, 0, 324, 322, 1, 0, 0, 0, 325, 326, 3, 89, 44, 0, 326, 100, 1, 0, 0, 0, 327, 333, 3, 103, 51, 0, 328, 332, 3, 103, 51, 0, 329, 332, 3, 97, 48, 0, 330, 332, 3, 85, 42, 0, 331, 328, 1, 0, 0, 0, 331, 329, 1, 0, 0, 0, 331, 330, 1, 0, 0, 0, 332, 335, 1, 0, 0, 0, 333, 331, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 102, 1, 0, 0, 0, 335, 333, 1, 0, 0, 0, 336, 337, 7, 2, 0, 0, 337, 104, 1, 0, 0, 0, 338, 339, 7, 3, 0, 0, 339, 106, 1, 0, 0, 0, 340, 341, 7, 4, 0, 0, 341, 108, 1, 0, 0, 0, 342, 344, 7, 5, 0, 0, 343, 342, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 110, 1, 0, 0, 0, 347, 349, 7, 0, 0, 0, 348, 347, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 354, 1, 0, 0, 0, 352, 354, 5, 0, 0, 1, 353, 348, 1, 0, 0, 0, 353, 352, 1, 0, 0, 0, 354, 112, 1, 0, 0, 0, 14, 0, 202, 216, 238, 288, 298, 307, 316, 322, 331, 333, 345, 350, 353, 1, 6, 0, 0] \ No newline at end of file +[4, 0, 43, 357, 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, 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, 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, 3, 13, 203, 8, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 217, 8, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 241, 8, 24, 1, 25, 1, 25, 1, 25, 1, 26, 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, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 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, 45, 1, 45, 3, 45, 291, 8, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 299, 8, 46, 10, 46, 12, 46, 302, 9, 46, 1, 47, 1, 47, 1, 47, 1, 47, 5, 47, 308, 8, 47, 10, 47, 12, 47, 311, 9, 47, 1, 47, 1, 47, 1, 47, 1, 48, 4, 48, 317, 8, 48, 11, 48, 12, 48, 318, 1, 49, 1, 49, 5, 49, 323, 8, 49, 10, 49, 12, 49, 326, 9, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 5, 50, 334, 8, 50, 10, 50, 12, 50, 337, 9, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 4, 54, 346, 8, 54, 11, 54, 12, 54, 347, 1, 55, 4, 55, 351, 8, 55, 11, 55, 12, 55, 352, 1, 55, 3, 55, 356, 8, 55, 1, 309, 0, 56, 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, 0, 31, 0, 33, 15, 35, 0, 37, 16, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 17, 51, 18, 53, 19, 55, 20, 57, 21, 59, 22, 61, 23, 63, 24, 65, 25, 67, 26, 69, 27, 71, 28, 73, 29, 75, 30, 77, 31, 79, 32, 81, 33, 83, 34, 85, 35, 87, 36, 89, 37, 91, 38, 93, 39, 95, 40, 97, 41, 99, 42, 101, 43, 103, 0, 105, 0, 107, 0, 109, 0, 111, 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, 364, 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, 33, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 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, 1, 113, 1, 0, 0, 0, 3, 123, 1, 0, 0, 0, 5, 132, 1, 0, 0, 0, 7, 139, 1, 0, 0, 0, 9, 145, 1, 0, 0, 0, 11, 152, 1, 0, 0, 0, 13, 162, 1, 0, 0, 0, 15, 168, 1, 0, 0, 0, 17, 178, 1, 0, 0, 0, 19, 181, 1, 0, 0, 0, 21, 184, 1, 0, 0, 0, 23, 190, 1, 0, 0, 0, 25, 195, 1, 0, 0, 0, 27, 202, 1, 0, 0, 0, 29, 204, 1, 0, 0, 0, 31, 206, 1, 0, 0, 0, 33, 208, 1, 0, 0, 0, 35, 210, 1, 0, 0, 0, 37, 216, 1, 0, 0, 0, 39, 218, 1, 0, 0, 0, 41, 222, 1, 0, 0, 0, 43, 225, 1, 0, 0, 0, 45, 229, 1, 0, 0, 0, 47, 232, 1, 0, 0, 0, 49, 240, 1, 0, 0, 0, 51, 242, 1, 0, 0, 0, 53, 245, 1, 0, 0, 0, 55, 248, 1, 0, 0, 0, 57, 251, 1, 0, 0, 0, 59, 253, 1, 0, 0, 0, 61, 256, 1, 0, 0, 0, 63, 258, 1, 0, 0, 0, 65, 260, 1, 0, 0, 0, 67, 262, 1, 0, 0, 0, 69, 264, 1, 0, 0, 0, 71, 266, 1, 0, 0, 0, 73, 268, 1, 0, 0, 0, 75, 270, 1, 0, 0, 0, 77, 272, 1, 0, 0, 0, 79, 274, 1, 0, 0, 0, 81, 276, 1, 0, 0, 0, 83, 278, 1, 0, 0, 0, 85, 280, 1, 0, 0, 0, 87, 282, 1, 0, 0, 0, 89, 284, 1, 0, 0, 0, 91, 290, 1, 0, 0, 0, 93, 294, 1, 0, 0, 0, 95, 303, 1, 0, 0, 0, 97, 316, 1, 0, 0, 0, 99, 320, 1, 0, 0, 0, 101, 329, 1, 0, 0, 0, 103, 338, 1, 0, 0, 0, 105, 340, 1, 0, 0, 0, 107, 342, 1, 0, 0, 0, 109, 345, 1, 0, 0, 0, 111, 355, 1, 0, 0, 0, 113, 114, 5, 97, 0, 0, 114, 115, 5, 108, 0, 0, 115, 116, 5, 108, 0, 0, 116, 117, 5, 111, 0, 0, 117, 118, 5, 99, 0, 0, 118, 119, 5, 97, 0, 0, 119, 120, 5, 116, 0, 0, 120, 121, 5, 111, 0, 0, 121, 122, 5, 114, 0, 0, 122, 2, 1, 0, 0, 0, 123, 124, 5, 102, 0, 0, 124, 125, 5, 117, 0, 0, 125, 126, 5, 110, 0, 0, 126, 127, 5, 99, 0, 0, 127, 128, 5, 116, 0, 0, 128, 129, 5, 105, 0, 0, 129, 130, 5, 111, 0, 0, 130, 131, 5, 110, 0, 0, 131, 4, 1, 0, 0, 0, 132, 133, 5, 103, 0, 0, 133, 134, 5, 108, 0, 0, 134, 135, 5, 111, 0, 0, 135, 136, 5, 98, 0, 0, 136, 137, 5, 97, 0, 0, 137, 138, 5, 108, 0, 0, 138, 6, 1, 0, 0, 0, 139, 140, 5, 115, 0, 0, 140, 141, 5, 99, 0, 0, 141, 142, 5, 111, 0, 0, 142, 143, 5, 112, 0, 0, 143, 144, 5, 101, 0, 0, 144, 8, 1, 0, 0, 0, 145, 146, 5, 114, 0, 0, 146, 147, 5, 101, 0, 0, 147, 148, 5, 116, 0, 0, 148, 149, 5, 117, 0, 0, 149, 150, 5, 114, 0, 0, 150, 151, 5, 110, 0, 0, 151, 10, 1, 0, 0, 0, 152, 153, 5, 115, 0, 0, 153, 154, 5, 116, 0, 0, 154, 155, 5, 114, 0, 0, 155, 156, 5, 117, 0, 0, 156, 157, 5, 99, 0, 0, 157, 158, 5, 116, 0, 0, 158, 159, 5, 117, 0, 0, 159, 160, 5, 114, 0, 0, 160, 161, 5, 101, 0, 0, 161, 12, 1, 0, 0, 0, 162, 163, 5, 117, 0, 0, 163, 164, 5, 115, 0, 0, 164, 165, 5, 105, 0, 0, 165, 166, 5, 110, 0, 0, 166, 167, 5, 103, 0, 0, 167, 14, 1, 0, 0, 0, 168, 169, 5, 111, 0, 0, 169, 170, 5, 112, 0, 0, 170, 171, 5, 104, 0, 0, 171, 172, 5, 97, 0, 0, 172, 173, 5, 110, 0, 0, 173, 174, 5, 100, 0, 0, 174, 175, 5, 108, 0, 0, 175, 176, 5, 101, 0, 0, 176, 177, 5, 114, 0, 0, 177, 16, 1, 0, 0, 0, 178, 179, 5, 97, 0, 0, 179, 180, 5, 115, 0, 0, 180, 18, 1, 0, 0, 0, 181, 182, 5, 105, 0, 0, 182, 183, 5, 102, 0, 0, 183, 20, 1, 0, 0, 0, 184, 185, 5, 119, 0, 0, 185, 186, 5, 104, 0, 0, 186, 187, 5, 105, 0, 0, 187, 188, 5, 108, 0, 0, 188, 189, 5, 101, 0, 0, 189, 22, 1, 0, 0, 0, 190, 191, 5, 101, 0, 0, 191, 192, 5, 108, 0, 0, 192, 193, 5, 115, 0, 0, 193, 194, 5, 101, 0, 0, 194, 24, 1, 0, 0, 0, 195, 196, 5, 101, 0, 0, 196, 197, 5, 108, 0, 0, 197, 198, 5, 105, 0, 0, 198, 199, 5, 102, 0, 0, 199, 26, 1, 0, 0, 0, 200, 203, 3, 49, 24, 0, 201, 203, 3, 37, 18, 0, 202, 200, 1, 0, 0, 0, 202, 201, 1, 0, 0, 0, 203, 28, 1, 0, 0, 0, 204, 205, 5, 43, 0, 0, 205, 30, 1, 0, 0, 0, 206, 207, 5, 45, 0, 0, 207, 32, 1, 0, 0, 0, 208, 209, 5, 42, 0, 0, 209, 34, 1, 0, 0, 0, 210, 211, 5, 47, 0, 0, 211, 36, 1, 0, 0, 0, 212, 217, 3, 29, 14, 0, 213, 217, 3, 31, 15, 0, 214, 217, 3, 33, 16, 0, 215, 217, 3, 35, 17, 0, 216, 212, 1, 0, 0, 0, 216, 213, 1, 0, 0, 0, 216, 214, 1, 0, 0, 0, 216, 215, 1, 0, 0, 0, 217, 38, 1, 0, 0, 0, 218, 219, 5, 60, 0, 0, 219, 220, 5, 60, 0, 0, 220, 221, 5, 62, 0, 0, 221, 40, 1, 0, 0, 0, 222, 223, 5, 60, 0, 0, 223, 224, 5, 61, 0, 0, 224, 42, 1, 0, 0, 0, 225, 226, 5, 60, 0, 0, 226, 227, 5, 62, 0, 0, 227, 228, 5, 62, 0, 0, 228, 44, 1, 0, 0, 0, 229, 230, 5, 62, 0, 0, 230, 231, 5, 61, 0, 0, 231, 46, 1, 0, 0, 0, 232, 233, 5, 61, 0, 0, 233, 234, 5, 61, 0, 0, 234, 48, 1, 0, 0, 0, 235, 241, 3, 39, 19, 0, 236, 241, 3, 41, 20, 0, 237, 241, 3, 43, 21, 0, 238, 241, 3, 45, 22, 0, 239, 241, 3, 47, 23, 0, 240, 235, 1, 0, 0, 0, 240, 236, 1, 0, 0, 0, 240, 237, 1, 0, 0, 0, 240, 238, 1, 0, 0, 0, 240, 239, 1, 0, 0, 0, 241, 50, 1, 0, 0, 0, 242, 243, 5, 45, 0, 0, 243, 244, 5, 62, 0, 0, 244, 52, 1, 0, 0, 0, 245, 246, 5, 66, 0, 0, 246, 247, 5, 126, 0, 0, 247, 54, 1, 0, 0, 0, 248, 249, 5, 65, 0, 0, 249, 250, 5, 126, 0, 0, 250, 56, 1, 0, 0, 0, 251, 252, 5, 61, 0, 0, 252, 58, 1, 0, 0, 0, 253, 254, 5, 42, 0, 0, 254, 255, 5, 61, 0, 0, 255, 60, 1, 0, 0, 0, 256, 257, 5, 40, 0, 0, 257, 62, 1, 0, 0, 0, 258, 259, 5, 41, 0, 0, 259, 64, 1, 0, 0, 0, 260, 261, 5, 91, 0, 0, 261, 66, 1, 0, 0, 0, 262, 263, 5, 93, 0, 0, 263, 68, 1, 0, 0, 0, 264, 265, 5, 58, 0, 0, 265, 70, 1, 0, 0, 0, 266, 267, 5, 123, 0, 0, 267, 72, 1, 0, 0, 0, 268, 269, 5, 125, 0, 0, 269, 74, 1, 0, 0, 0, 270, 271, 5, 60, 0, 0, 271, 76, 1, 0, 0, 0, 272, 273, 5, 62, 0, 0, 273, 78, 1, 0, 0, 0, 274, 275, 5, 44, 0, 0, 275, 80, 1, 0, 0, 0, 276, 277, 5, 46, 0, 0, 277, 82, 1, 0, 0, 0, 278, 279, 5, 59, 0, 0, 279, 84, 1, 0, 0, 0, 280, 281, 5, 95, 0, 0, 281, 86, 1, 0, 0, 0, 282, 283, 5, 35, 0, 0, 283, 88, 1, 0, 0, 0, 284, 285, 5, 34, 0, 0, 285, 90, 1, 0, 0, 0, 286, 291, 3, 109, 54, 0, 287, 291, 3, 111, 55, 0, 288, 291, 3, 93, 46, 0, 289, 291, 3, 95, 47, 0, 290, 286, 1, 0, 0, 0, 290, 287, 1, 0, 0, 0, 290, 288, 1, 0, 0, 0, 290, 289, 1, 0, 0, 0, 291, 292, 1, 0, 0, 0, 292, 293, 6, 45, 0, 0, 293, 92, 1, 0, 0, 0, 294, 295, 5, 47, 0, 0, 295, 296, 5, 47, 0, 0, 296, 300, 1, 0, 0, 0, 297, 299, 8, 0, 0, 0, 298, 297, 1, 0, 0, 0, 299, 302, 1, 0, 0, 0, 300, 298, 1, 0, 0, 0, 300, 301, 1, 0, 0, 0, 301, 94, 1, 0, 0, 0, 302, 300, 1, 0, 0, 0, 303, 304, 5, 47, 0, 0, 304, 305, 5, 42, 0, 0, 305, 309, 1, 0, 0, 0, 306, 308, 9, 0, 0, 0, 307, 306, 1, 0, 0, 0, 308, 311, 1, 0, 0, 0, 309, 310, 1, 0, 0, 0, 309, 307, 1, 0, 0, 0, 310, 312, 1, 0, 0, 0, 311, 309, 1, 0, 0, 0, 312, 313, 5, 42, 0, 0, 313, 314, 5, 47, 0, 0, 314, 96, 1, 0, 0, 0, 315, 317, 3, 105, 52, 0, 316, 315, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 316, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, 98, 1, 0, 0, 0, 320, 324, 3, 89, 44, 0, 321, 323, 8, 1, 0, 0, 322, 321, 1, 0, 0, 0, 323, 326, 1, 0, 0, 0, 324, 322, 1, 0, 0, 0, 324, 325, 1, 0, 0, 0, 325, 327, 1, 0, 0, 0, 326, 324, 1, 0, 0, 0, 327, 328, 3, 89, 44, 0, 328, 100, 1, 0, 0, 0, 329, 335, 3, 103, 51, 0, 330, 334, 3, 103, 51, 0, 331, 334, 3, 97, 48, 0, 332, 334, 3, 85, 42, 0, 333, 330, 1, 0, 0, 0, 333, 331, 1, 0, 0, 0, 333, 332, 1, 0, 0, 0, 334, 337, 1, 0, 0, 0, 335, 333, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 102, 1, 0, 0, 0, 337, 335, 1, 0, 0, 0, 338, 339, 7, 2, 0, 0, 339, 104, 1, 0, 0, 0, 340, 341, 7, 3, 0, 0, 341, 106, 1, 0, 0, 0, 342, 343, 7, 4, 0, 0, 343, 108, 1, 0, 0, 0, 344, 346, 7, 5, 0, 0, 345, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 110, 1, 0, 0, 0, 349, 351, 7, 0, 0, 0, 350, 349, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 350, 1, 0, 0, 0, 352, 353, 1, 0, 0, 0, 353, 356, 1, 0, 0, 0, 354, 356, 5, 0, 0, 1, 355, 350, 1, 0, 0, 0, 355, 354, 1, 0, 0, 0, 356, 112, 1, 0, 0, 0, 14, 0, 202, 216, 240, 290, 300, 309, 318, 324, 333, 335, 347, 352, 355, 1, 6, 0, 0] \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs b/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs index a241283..172cc06 100644 --- a/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs +++ b/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs @@ -45,6 +45,10 @@ public static OperationType ParseOpType (string s) "%" => OperationType.PER, "^" => OperationType.HAT, "&" => OperationType.AMP, + + + "<<>" => OperationType.LES_TEMP, + "<>>" => OperationType.GTR_TEMP, _ => throw new CrimsonParserException("Illegal operator type '" + s + "'"), }; } @@ -65,7 +69,10 @@ public enum OperationType EQU, LEQ, LES, GEQ, GTR, // Misc - POU, DOL, PER, HAT, AMP + POU, DOL, PER, HAT, AMP, + + // Temp + LES_TEMP, GTR_TEMP } } } \ No newline at end of file diff --git a/Crimson/Resources/Native Library/heap.crm b/Crimson/Resources/Native Library/heap.crm index 6a9cd0e..b61a368 100644 --- a/Crimson/Resources/Native Library/heap.crm +++ b/Crimson/Resources/Native Library/heap.crm @@ -46,7 +46,7 @@ function alloc (size) { i = 0; - while (i regions_length) { // Replace with regions[i] if ( regions_i == 0 ) // Region i is empty @@ -56,7 +56,7 @@ region_ptr = get_region_ptr(r); return region_ptr; } - i = i + 1; + i = i + 1 <4>; } return 0; } @@ -69,46 +69,46 @@ function get_region_ptr (r) { // Need to calculate this before r changes later on - RRMS = r * RegionMetaSize; + RRMS = r * RegionMetaSize ; - exponential_offset = 4; + exponential_offset = 4; // R:0 is not permitted - if (r : 0) { + if (r <<> 0) { // HELP!!!! // HOW DO I CRASH!? } // R=0 and R=1 would need 4*0.25 or 4*0.5 so we just handle them manually else if (r == 0) { - exponential_offset = 1; + exponential_offset = 1; } else if (r == 1) { - exponential_offset = 2; + exponential_offset = 2; } // R:=2 is calculated automatically else { - while ( r : 0 ) { - exponential_offset = exponential_offset * 2; - r = r - 1; + while ( r <<> 0 ) { + exponential_offset = exponential_offset * 2; + r = r - 1; } } // Calculate final pointer value as in described equation - HO_EXP = HeapOffset + exponential_offset; - HO_EXP_RRMS = HO_EXP + RRMS; + HO_EXP = HeapOffset + exponential_offset; + HO_EXP_RRMS = HO_EXP + RRMS; return HO_EXP_RRMS; } function freeptr (pointer) { - r = 0; - region_ptr = get_region_ptr(r); - while ( pointer : region_ptr ) + r = 0; + region_ptr = get_region_ptr(r); + while ( pointer <<> region_ptr ) { - r = r + 1; - region_ptr = get_region_ptr(r); + r = r + 1; + region_ptr = get_region_ptr(r); } freeregion(r); } @@ -116,6 +116,6 @@ function freeregion (region) { // Replace with regions[region] - regions_region = 0; + regions_region = 0; } } \ No newline at end of file diff --git a/Crimson/Resources/Native Library/maths.crm b/Crimson/Resources/Native Library/maths.crm index 35f94e5..0462856 100644 --- a/Crimson/Resources/Native Library/maths.crm +++ b/Crimson/Resources/Native Library/maths.crm @@ -1,9 +1,9 @@ { function pwr (number, exponent) { - while (exponent : 0) + while (exponent <<> 0) { - number = number * number; - exponent = exponent - 1; + number = number * number; + exponent = exponent - 1; } } } \ No newline at end of file From 7f97a8ba7c333b772a2fa1f5763ffbebd2d9e174 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 21 Mar 2023 22:00:10 +0000 Subject: [PATCH 027/122] Implemented ScopeVariableCStatement > Implemented ScopeVariableCStatement > ScopeVisitor.VisitScopeVariableStatement/Declaration now returns non-null + Null-checking for Scope.AddStatement (why wasn't this checked before?) --- Crimson/CSharp/Core/ScopeVisitor.cs | 7 ++- Crimson/CSharp/Grammar/Scope.cs | 14 ++++- .../Statements/ScopeVariableCStatement.cs | 40 ++----------- Crimson/Resources/Test Compilations/main.crm | 5 -- .../Test Compilations/result/main.cba | 60 +++++++++++-------- 5 files changed, 59 insertions(+), 67 deletions(-) diff --git a/Crimson/CSharp/Core/ScopeVisitor.cs b/Crimson/CSharp/Core/ScopeVisitor.cs index 8cc86d2..d770b49 100644 --- a/Crimson/CSharp/Core/ScopeVisitor.cs +++ b/Crimson/CSharp/Core/ScopeVisitor.cs @@ -143,12 +143,15 @@ public override GlobalVariableCStatement VisitGlobalVariableDeclaration ([NotNul public override ScopeVariableCStatement VisitScopeVariableDeclaration ([NotNull] CrimsonParser.ScopeVariableDeclarationContext context) { - return null; + FullNameCToken name = new FullNameCToken(context.name.Text); + SimpleValueCToken size = VisitDatasize(context.size); + + return new ScopeVariableCStatement(name, size); } public override object VisitScopeVariableStatement ([NotNull] CrimsonParser.ScopeVariableStatementContext context) { - return null; + return VisitScopeVariableDeclaration(context.scopeVariableDeclaration()); } public override FunctionCStatement VisitFunctionDeclaration ([NotNull] CrimsonParser.FunctionDeclarationContext context) diff --git a/Crimson/CSharp/Grammar/Scope.cs b/Crimson/CSharp/Grammar/Scope.cs index 2bd6fbc..98087a3 100644 --- a/Crimson/CSharp/Grammar/Scope.cs +++ b/Crimson/CSharp/Grammar/Scope.cs @@ -119,9 +119,14 @@ public string GetPath () public void AddStatement (AbstractCrimsonStatement statement) { + if (statement == null) throw new ArgumentNullException($"Cannot add null statement to scope {this}."); void AddNamedIfNotDuplicate (Dictionary d, GCS gcs, string typeNameForError) where GCS : AbstractCrimsonStatement, INamed { + if (d == null) throw new ArgumentNullException($"Cannot pass null {typeof(Dictionary)} for statement adding."); + if (gcs == null) throw new ArgumentNullException($"Cannot pass null {typeof(GCS)} for statement adding."); + if (String.IsNullOrWhiteSpace(typeNameForError)) throw new ArgumentNullException("Cannot pass null or whitespace type name for statement adding."); + if (d.ContainsKey(gcs.GetName().ToString())) throw new StatementParseException($"Duplicate GlobalStatement name '{gcs.GetName()}' for statement '{statement}' in unit: {this}"); string name = gcs.GetName().ToString(); d.Add(name, gcs); @@ -204,7 +209,14 @@ public override void Link (LinkingContext ctx) foreach (var d in Delegates) { - d.Invoke().Link(newContext); + AbstractCrimsonStatement s = d.Invoke(); + if (s == null) + { + _ = d.Invoke(); + throw new NullReferenceException($"Delegate {d} returned a null statement during linking of {ctx}."); + } + + s.Link(newContext); } } diff --git a/Crimson/CSharp/Grammar/Statements/ScopeVariableCStatement.cs b/Crimson/CSharp/Grammar/Statements/ScopeVariableCStatement.cs index 3e73188..e50f827 100644 --- a/Crimson/CSharp/Grammar/Statements/ScopeVariableCStatement.cs +++ b/Crimson/CSharp/Grammar/Statements/ScopeVariableCStatement.cs @@ -14,10 +14,7 @@ public class ScopeVariableCStatement : AbstractCrimsonStatement public SimpleValueCToken Size { get; set; } public FullNameCToken Identifier { get; private set; } - public ComplexValueCToken? Complex { get; } - public SimpleValueCToken? Simple { get; } - - private ScopeVariableCStatement (SimpleValueCToken size, FullNameCToken identifier) + public ScopeVariableCStatement (FullNameCToken identifier, SimpleValueCToken size) { Size = size; Identifier = identifier; @@ -27,23 +24,10 @@ private ScopeVariableCStatement (SimpleValueCToken size, FullNameCToken identifi if (!identifier.HasMember()) throw new CrimsonParserException($"Identifier {identifier} for internal variable must have a member name."); } - public ScopeVariableCStatement (SimpleValueCToken size, FullNameCToken identifier, SimpleValueCToken simple) : this(size, identifier) - { - Simple = simple; - if (Simple == null) throw new CrimsonParserException($"Must assign initial (declaration) value to variable {identifier}"); - } - - public ScopeVariableCStatement (SimpleValueCToken size, FullNameCToken identifier, ComplexValueCToken complex) : this(size, identifier) - { - Complex = complex; - if (Complex == null) throw new CrimsonParserException($"Must assign initial (declaration) value to variable {identifier}"); - } - public override void Link (LinkingContext ctx) { - // Only run if not null - Simple?.Link(ctx); - Complex?.Link(ctx); + Size.Link(ctx); + Identifier.Link(ctx); Linked = true; } @@ -51,22 +35,8 @@ public override Fragment GetCrimsonBasic () { Fragment statements = new Fragment(0); - // int i = (6 + 5); - if (Complex != null) - { - Fragment valueStatements = Complex.GetBasicFragment(); - statements.Add(valueStatements); - statements.Add(new SetBStatement(Identifier.ToString(), -1, valueStatements.ResultHolder!)); - - } - else if (Simple != null) - { - statements.Add(new SetBStatement(Identifier.ToString(), -1, Simple.GetText())); - } - else - { - throw new FlatteningException("Unable to flatten internal variable with no simple or complex value"); - } + statements.Add(new CommentBStatement($"Declare {Identifier}")); + statements.Add(new CommentBStatement($"IncSp {Identifier}")); return statements; } diff --git a/Crimson/Resources/Test Compilations/main.crm b/Crimson/Resources/Test Compilations/main.crm index b914006..fc5d5a0 100644 --- a/Crimson/Resources/Test Compilations/main.crm +++ b/Crimson/Resources/Test Compilations/main.crm @@ -58,9 +58,4 @@ test = heap.alloc(69); return test; } - - structure Person { - scope age; - age = heap.alloc(5); - } } \ 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 3b7fdca..45f9be0 100644 --- a/Crimson/Resources/Test Compilations/result/main.cba +++ b/Crimson/Resources/Test Compilations/result/main.cba @@ -12,9 +12,11 @@ var_set gvar_regions_i_0, -1, 0; var_set gvar_regions_length_0, -1, 0; var_set gvar_regions_region_0, -1, 0; -var_set gvar_counter_0, -1, 0; var_set gvar_int_size_0, -1, 4; var_set gvar_ptr_size_0, -1, 4; +var_set gvar_counter_0, -1, 0; +var_set gvar_int_0, -1, 4; +var_set gvar_ptr_0, -1, 4; // (Structures shouldn't be a part of CB) // ============================== Structures ============================== @@ -23,10 +25,14 @@ var_set gvar_ptr_size_0, -1, 4; :func_main_0: example basic call A~ "example assemby call" + // Declare a + // IncSp a + // Declare a + // IncSp a // Function Call - var_set a, -1, ; + var_set a, -1, VAR_ASSIGN_C_VAL; // Function Call - var_set b, -1, ; + var_set b, -1, VAR_ASSIGN_C_VAL; jeq c_r_h 0 NEXT_ELIF // 5 @@ -34,9 +40,9 @@ var_set gvar_ptr_size_0, -1, 4; jeq c_r_h 0 NEXT_ELIF // Function Call - var_set c, -1, ; + var_set c, -1, VAR_ASSIGN_C_VAL; // Function Call - var_set d, -1, ; + var_set d, -1, VAR_ASSIGN_C_VAL; jump END_branch_1 :ELSE: @@ -48,14 +54,18 @@ var_set gvar_ptr_size_0, -1, 4; // FC start jump func_call_0 // FC end + // Declare i + // IncSp i // Function Call - var_set i, -1, ; + var_set i, -1, VAR_ASSIGN_C_VAL; // 4 // FC start jump func_write_0 // FC end + // Declare ret + // IncSp ret // Function Call - var_set ret, -1, ; + var_set ret, -1, VAR_ASSIGN_C_VAL; // Function Call var_set ret, -1, VAR_ASSIGN_C_VAL; return; @@ -72,7 +82,7 @@ return; :func_times_0: // Function Call - var_set ret, -1, ; + var_set ret, -1, VAR_ASSIGN_C_VAL; return; return; @@ -80,18 +90,18 @@ return; return; :func_alloc_0: - var_set i, -1, 0; + // 0 - // :: TODO IMPLEMENT WHILE (start) :: - // :: TODO IMPLEMENT WHILE (end) :: + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << return; return; :func_get_region_ptr_0: // Operation - var_set RRMS, -1, ; - var_set exponential_offset, -1, 4; + var_set RRMS, -1, VAR_ASSIGN_C_VAL; + // 4 jeq c_r_h 0 NEXT_ELIF jump END_branch_2 @@ -106,8 +116,8 @@ return; :ELSE: - // :: TODO IMPLEMENT WHILE (start) :: - // :: TODO IMPLEMENT WHILE (end) :: + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << :END_branch_4: @@ -116,19 +126,19 @@ return; :END_branch_2: // Operation - var_set HO_EXP, -1, ; + var_set HO_EXP, -1, VAR_ASSIGN_C_VAL; // Operation - var_set HO_EXP_RRMS, -1, ; + var_set HO_EXP_RRMS, -1, VAR_ASSIGN_C_VAL; return; return; :func_freeptr_0: - var_set r, -1, 0; + // 0 // Function Call - var_set region_ptr, -1, ; + var_set region_ptr, -1, VAR_ASSIGN_C_VAL; - // :: TODO IMPLEMENT WHILE (start) :: - // :: TODO IMPLEMENT WHILE (end) :: + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << // FC start jump func_freeregion_0 @@ -141,14 +151,16 @@ return; :func_pwr_0: - // :: TODO IMPLEMENT WHILE (start) :: - // :: TODO IMPLEMENT WHILE (end) :: + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << return; :func_call_0: + // Declare test + // IncSp test // Function Call - var_set test, -1, ; + var_set test, -1, VAR_ASSIGN_C_VAL; return; return; From a98005fe7762bcfe3f085063fc6c83dddcab9743 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Wed, 22 Mar 2023 21:08:27 +0000 Subject: [PATCH 028/122] Removed CrimsonBasic as Crimson dependency Don't worry, I have a plan... --- Crimson/CSharp/Core/Crimson.cs | 1 - Crimson/Crimson.csproj | 4 ---- RedFoxVM.sln | 12 +++--------- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index ed3311a..eeae7ce 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -2,7 +2,6 @@ using NLog; using Antlr4.Runtime; using Crimson.AntlrBuild; -using System.IO.Abstractions; namespace Crimson.CSharp.Core { diff --git a/Crimson/Crimson.csproj b/Crimson/Crimson.csproj index 82e1577..296cf75 100644 --- a/Crimson/Crimson.csproj +++ b/Crimson/Crimson.csproj @@ -26,10 +26,6 @@ - - - - Crimson.ANTLR.Crimson diff --git a/RedFoxVM.sln b/RedFoxVM.sln index a79d59b..6dfa8e6 100644 --- a/RedFoxVM.sln +++ b/RedFoxVM.sln @@ -9,16 +9,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RedFoxAssembly", "RedFoxAss EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crimson", "Crimson\Crimson.csproj", "{47108A9A-41EF-46E8-87D8-FE55E3869286}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CrimsonBasic", "CrimsonBasic\CrimsonBasic.csproj", "{0F45D43A-D6F1-4E64-BA39-EA714533DA1A}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution 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 @@ -32,10 +27,9 @@ Global {47108A9A-41EF-46E8-87D8-FE55E3869286}.Debug|Any CPU.Build.0 = Debug|Any CPU {47108A9A-41EF-46E8-87D8-FE55E3869286}.Release|Any CPU.ActiveCfg = Release|Any CPU {47108A9A-41EF-46E8-87D8-FE55E3869286}.Release|Any CPU.Build.0 = Release|Any CPU - {0F45D43A-D6F1-4E64-BA39-EA714533DA1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0F45D43A-D6F1-4E64-BA39-EA714533DA1A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {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} From 72ffa7063c9575d7f8fbcda6f079d33cedfef773 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Wed, 22 Mar 2023 21:11:37 +0000 Subject: [PATCH 029/122] Update Crimson.csproj --- Crimson/Crimson.csproj | 60 ++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/Crimson/Crimson.csproj b/Crimson/Crimson.csproj index 296cf75..56b78f3 100644 --- a/Crimson/Crimson.csproj +++ b/Crimson/Crimson.csproj @@ -1,36 +1,40 @@  - - Exe - net6.0 - enable - enable - Crimson.CSharp.Core.Crimson - + + Exe + net6.0 + enable + enable + Crimson.CSharp.Core.Crimson + - - - - - + + + + + - - - Crimson.AntlrBuild - - + + + Crimson.AntlrBuild + + - - - - - + + + + + - - - Crimson.ANTLR.Crimson - Crimson.Antlr - - + + + Crimson.ANTLR.Crimson + Crimson.Antlr + + + + + + From 57b2bd1e1df3b5a3b817dba836eb54fc05d37892 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Thu, 23 Mar 2023 22:12:05 +0000 Subject: [PATCH 030/122] With the replacement of CrimsonBasic comes a lot of refactoring... --- Crimson/CSharp/Core/Compilation.cs | 1 - Crimson/CSharp/Core/Crimson.cs | 4 +- Crimson/CSharp/Core/CrimsonCompiler.cs | 19 ++--- Crimson/CSharp/Core/Library.cs | 1 + .../Flattening/AbstractAssemblyProgram.cs | 14 ++++ .../Flattening/AbstractAssemblyStatement.cs | 6 ++ .../{Core => Flattening}/FlattenerHelper.cs | 6 +- Crimson/CSharp/Flattening/Fragment.cs | 60 ++++++++++++++ Crimson/CSharp/Flattening/IFlattener.cs | 26 ++++++ .../CSharp/Flattening/RFASM/RFASMComment.cs | 21 +++++ .../RFASM/RFASMFlattener.cs} | 79 ++++++++----------- .../CSharp/Flattening/RFASM/RFASMProgram.cs | 32 ++++++++ .../CSharp/Flattening/RFASM/RFASMStatement.cs | 12 +++ .../Grammar/Tokens/ComplexValueCToken.cs | 21 ----- Crimson/CSharp/{Core => Linking}/Linker.cs | 10 +-- .../CSharp/{Core => Linking}/LinkerHelper.cs | 2 +- .../{Core => Linking}/LinkingContext.cs | 17 ++-- .../CSharp/{Grammar => Parsing}/IHasScope.cs | 0 Crimson/CSharp/{Grammar => Parsing}/Scope.cs | 4 +- .../CSharp/{Core => Parsing}/ScopeVisitor.cs | 2 +- .../Statements/AbstractCrimsonStatement.cs | 4 +- .../Statements/AssemblyCallCStatement.cs | 5 +- .../Statements/BasicCallCStatement.cs | 5 +- .../Statements/FunctionCStatement.cs | 10 +-- .../Statements/FunctionCallCStatement.cs | 5 +- .../Statements/GlobalVariableCStatement.cs | 10 +-- .../{Grammar => Parsing}/Statements/INamed.cs | 1 - .../Statements/IfBlockCStatement.cs | 7 +- .../Statements/ImportCStatement.cs | 0 .../Statements/OperationHandlerCStatement.cs | 4 +- .../Statements/ReturnCStatement.cs | 5 +- .../Statements/ScopeVariableCStatement.cs | 8 +- .../Statements/StructureCStatement.cs | 4 +- .../VariableAssignmentCStatement.cs | 5 +- .../Statements/WhileBlockCStatement.cs | 5 +- .../Tokens/ComparatorCToken.cs | 0 .../Parsing/Tokens/ComplexValueCToken.cs | 16 ++++ .../Tokens/ConditionCToken.cs | 11 ++- .../Tokens/ElifBlockCToken.cs | 11 ++- .../Tokens/ElseBlockCToken.cs | 5 +- .../Tokens/FullNameCToken.cs | 2 +- .../Tokens/FunctionArgumentCToken.cs | 0 .../FunctionCallResolvableValueCToken.cs | 11 ++- .../Tokens/ICrimsonToken.cs | 5 +- .../Tokens/IdentifierSimpleValueCToken.cs | 5 +- .../Tokens/OperationResolvableValueCToken.cs | 5 +- .../Tokens/ParameterCToken.cs | 0 .../Tokens/RawResolvableValueCToken.cs | 5 +- .../Tokens/SimpleValueCToken.cs | 4 +- .../{Grammar => Parsing}/Tokens/TypeCToken.cs | 0 Crimson/Crimson.csproj | 4 - 51 files changed, 305 insertions(+), 194 deletions(-) create mode 100644 Crimson/CSharp/Flattening/AbstractAssemblyProgram.cs create mode 100644 Crimson/CSharp/Flattening/AbstractAssemblyStatement.cs rename Crimson/CSharp/{Core => Flattening}/FlattenerHelper.cs (69%) create mode 100644 Crimson/CSharp/Flattening/Fragment.cs create mode 100644 Crimson/CSharp/Flattening/IFlattener.cs create mode 100644 Crimson/CSharp/Flattening/RFASM/RFASMComment.cs rename Crimson/CSharp/{Core/Flattener.cs => Flattening/RFASM/RFASMFlattener.cs} (59%) create mode 100644 Crimson/CSharp/Flattening/RFASM/RFASMProgram.cs create mode 100644 Crimson/CSharp/Flattening/RFASM/RFASMStatement.cs delete mode 100644 Crimson/CSharp/Grammar/Tokens/ComplexValueCToken.cs rename Crimson/CSharp/{Core => Linking}/Linker.cs (91%) rename Crimson/CSharp/{Core => Linking}/LinkerHelper.cs (99%) rename Crimson/CSharp/{Core => Linking}/LinkingContext.cs (78%) rename Crimson/CSharp/{Grammar => Parsing}/IHasScope.cs (100%) rename Crimson/CSharp/{Grammar => Parsing}/Scope.cs (99%) rename Crimson/CSharp/{Core => Parsing}/ScopeVisitor.cs (99%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/AbstractCrimsonStatement.cs (86%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/AssemblyCallCStatement.cs (85%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/BasicCallCStatement.cs (85%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/FunctionCStatement.cs (93%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/FunctionCallCStatement.cs (95%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/GlobalVariableCStatement.cs (88%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/INamed.cs (92%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/IfBlockCStatement.cs (94%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/ImportCStatement.cs (100%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/OperationHandlerCStatement.cs (94%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/ReturnCStatement.cs (85%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/ScopeVariableCStatement.cs (87%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/StructureCStatement.cs (93%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/VariableAssignmentCStatement.cs (94%) rename Crimson/CSharp/{Grammar => Parsing}/Statements/WhileBlockCStatement.cs (94%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/ComparatorCToken.cs (100%) create mode 100644 Crimson/CSharp/Parsing/Tokens/ComplexValueCToken.cs rename Crimson/CSharp/{Grammar => Parsing}/Tokens/ConditionCToken.cs (83%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/ElifBlockCToken.cs (69%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/ElseBlockCToken.cs (90%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/FullNameCToken.cs (98%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/FunctionArgumentCToken.cs (100%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/FunctionCallResolvableValueCToken.cs (65%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/ICrimsonToken.cs (67%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/IdentifierSimpleValueCToken.cs (86%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/OperationResolvableValueCToken.cs (95%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/ParameterCToken.cs (100%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/RawResolvableValueCToken.cs (83%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/SimpleValueCToken.cs (80%) rename Crimson/CSharp/{Grammar => Parsing}/Tokens/TypeCToken.cs (100%) diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/CSharp/Core/Compilation.cs index c9a7256..3792a9c 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/CSharp/Core/Compilation.cs @@ -1,5 +1,4 @@ using Crimson.CSharp.Grammar; -using CrimsonBasic.CSharp.Core; using NLog; namespace Crimson.CSharp.Core diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index eeae7ce..2b6f031 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -2,6 +2,8 @@ using NLog; using Antlr4.Runtime; using Crimson.AntlrBuild; +using Crimson.CSharp.Assembly.RFASM; +using Crimson.CSharp.Assembly; namespace Crimson.CSharp.Core { @@ -50,7 +52,7 @@ static int Main (string[] args) Library generator = new Library(Options); Linker linker = new Linker(Options); - Flattener flattener = new Flattener(Options); + IFlattener flattener = new RFASMFlattener(); //TODO Don't default to RFASM Flattener Compiler = new CrimsonCompiler(Options, generator, linker, flattener); try diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 9212721..190e6f3 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -1,7 +1,7 @@ using Antlr4.Runtime; using Crimson.AntlrBuild; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Grammar; -using CrimsonBasic.CSharp.Core; using NLog; namespace Crimson.CSharp.Core @@ -15,9 +15,9 @@ internal class CrimsonCompiler public CrimsonOptions Options { get; } public Library Library { get; } public Linker Linker { get; } - public Flattener Flattener { get; } + public IFlattener Flattener { get; } - public CrimsonCompiler(CrimsonOptions options, Library unitGenerator, Linker linker, Flattener flattener) + public CrimsonCompiler (CrimsonOptions options, Library unitGenerator, Linker linker, IFlattener flattener) { Options = options; Library = unitGenerator; @@ -25,7 +25,7 @@ public CrimsonCompiler(CrimsonOptions options, Library unitGenerator, Linker lin Flattener = flattener; } - public int FullyCompileFromOptions() + public int FullyCompileFromOptions () { /* * == PARSING STAGE == @@ -85,7 +85,7 @@ public int FullyCompileFromOptions() */ LOGGER.Info("\n\n"); LOGGER.Info(" F L A T T E N I N G "); - BasicProgram basicProgram = Flattener.Flatten(compilation); + AbstractAssemblyProgram basicProgram = Flattener.Flatten(compilation); /* * == FURTHER COMPILATION STAGES == @@ -95,14 +95,14 @@ public int FullyCompileFromOptions() */ LOGGER.Info("\n\n"); LOGGER.Info(" D E L E G A T I N G"); - DumpBasicProgram(basicProgram); + DumpAssemblyProgram(basicProgram); LOGGER.Info("\n\n"); LOGGER.Info("Done!"); return 1; } - private void DumpBasicProgram(BasicProgram basicProgram) + private void DumpAssemblyProgram (AbstractAssemblyProgram basicProgram) { if (Options.DumpIntermediates) { @@ -110,7 +110,7 @@ private void DumpBasicProgram(BasicProgram basicProgram) LOGGER.Info("Dumping CrimsonBasic program to " + basicTarget); List lines = new List(); - foreach (var f in basicProgram.Fragments) + foreach (var f in basicProgram.GetFragments()) { lines.AddRange(f.GetLines()); } @@ -118,7 +118,8 @@ private void DumpBasicProgram(BasicProgram basicProgram) Directory.CreateDirectory(Path.GetDirectoryName(Options.TranslationTargetPath)); File.WriteAllLines(basicTarget, lines.ToArray()); LOGGER.Info("Finished CrimsonBasic dump!"); - } else + } + else { LOGGER.Info("Skipping dumping of CrimsonBasic program"); } diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 8eb5e25..4db3c3e 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -2,6 +2,7 @@ using Crimson.AntlrBuild; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar; +using Crimson.CSharp.Parsing; using NLog; namespace Crimson.CSharp.Core diff --git a/Crimson/CSharp/Flattening/AbstractAssemblyProgram.cs b/Crimson/CSharp/Flattening/AbstractAssemblyProgram.cs new file mode 100644 index 0000000..add4734 --- /dev/null +++ b/Crimson/CSharp/Flattening/AbstractAssemblyProgram.cs @@ -0,0 +1,14 @@ +using Crimson.CSharp.Assembly.RFASM; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Assembly +{ + public abstract class AbstractAssemblyProgram + { + + } +} diff --git a/Crimson/CSharp/Flattening/AbstractAssemblyStatement.cs b/Crimson/CSharp/Flattening/AbstractAssemblyStatement.cs new file mode 100644 index 0000000..dbb7096 --- /dev/null +++ b/Crimson/CSharp/Flattening/AbstractAssemblyStatement.cs @@ -0,0 +1,6 @@ +namespace Crimson.CSharp.Assembly +{ + public abstract class AbstractAssemblyStatement + { + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Core/FlattenerHelper.cs b/Crimson/CSharp/Flattening/FlattenerHelper.cs similarity index 69% rename from Crimson/CSharp/Core/FlattenerHelper.cs rename to Crimson/CSharp/Flattening/FlattenerHelper.cs index b08c655..3614ceb 100644 --- a/Crimson/CSharp/Core/FlattenerHelper.cs +++ b/Crimson/CSharp/Flattening/FlattenerHelper.cs @@ -1,17 +1,17 @@ using Crimson.CSharp.Exception; -namespace Crimson.CSharp.Core +namespace Crimson.CSharp.Flattening { internal class FlattenerHelper { private static int branchNameCounter = 0; - public static string GetUniqueBranchName() + public static string GetUniqueBranchName () { return $"branch_{branchNameCounter++}"; } private static int resolvableValueFieldNameCounter = 0; - public static string GetUniqueResolvableValueFieldName() + public static string GetUniqueResolvableValueFieldName () { return $"rval_{resolvableValueFieldNameCounter++}"; } diff --git a/Crimson/CSharp/Flattening/Fragment.cs b/Crimson/CSharp/Flattening/Fragment.cs new file mode 100644 index 0000000..87bd3bd --- /dev/null +++ b/Crimson/CSharp/Flattening/Fragment.cs @@ -0,0 +1,60 @@ +namespace Crimson.CSharp.Assembly +{ + public class Fragment + { + private List _statements; + private List _indents; + private int _indentation; + public string? ResultHolder { get; set; } + + public Fragment (int indentation) + { + _statements = new List(); + _indents = new List(); + _indentation = indentation; + } + + + public void Add (AbstractAssemblyStatement statement) + { + if (statement == null) throw new ArgumentNullException("Cannot add a null BasicStatement to a Fragment"); + _statements.Add(statement); + _indents.Add(_indentation); + } + + public void Add (IList statements) + { + foreach (var s in statements) + Add(s); + } + + public void Add (Fragment fragment) + { + for (int i = 0; i < fragment._statements.Count; i++) + { + _statements.Add(fragment._statements[i]); + _indents.Add(_indentation + fragment._indentation + fragment._indents[i]); + } + } + + public List GetLines () + { + List lines = new List(); + for (int i = 0; i < _statements.Count; i++) + { + int j = _indents[i]; + var s = _statements[i]; + string indent = string.Concat(Enumerable.Repeat(" ", j)); + lines.Add(indent + s); + } + return lines; + } + + public Fragment WithIndentation (int indentation) + { + _indentation = indentation; + return this; + } + + } +} diff --git a/Crimson/CSharp/Flattening/IFlattener.cs b/Crimson/CSharp/Flattening/IFlattener.cs new file mode 100644 index 0000000..ac45474 --- /dev/null +++ b/Crimson/CSharp/Flattening/IFlattener.cs @@ -0,0 +1,26 @@ +using Crimson.CSharp.Assembly; +using Crimson.CSharp.Assembly.RFASM; +using NLog; + +namespace Crimson.CSharp.Core +{ + /// + /// + /// + public interface IFlattener + { + + /// + /// + /// - Flattening member names - + /// Each member knows its own name. + /// All of these are singletons, so updating the name of a member in one location will update it in all locations. + /// When a new member is declared, if the name already exists, it will be given a new name (e.g. 'originalname_1'). + /// This name will be updated across all locations because the target member is a singleton. + /// + /// + /// + /// + public AbstractAssemblyProgram Flatten (Compilation compilation); + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Flattening/RFASM/RFASMComment.cs b/Crimson/CSharp/Flattening/RFASM/RFASMComment.cs new file mode 100644 index 0000000..dec9daf --- /dev/null +++ b/Crimson/CSharp/Flattening/RFASM/RFASMComment.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Assembly.RFASM +{ + internal class RFASMComment : RFASMStatement + { + public string Comment { get; private set; } + + public RFASMComment (string comment) => Comment = comment; + + public override string ToString () + { + if (Comment.Equals("") || Comment.StartsWith("//")) return Comment; + return "// " + Comment; + } + } +} diff --git a/Crimson/CSharp/Core/Flattener.cs b/Crimson/CSharp/Flattening/RFASM/RFASMFlattener.cs similarity index 59% rename from Crimson/CSharp/Core/Flattener.cs rename to Crimson/CSharp/Flattening/RFASM/RFASMFlattener.cs index 7e13cf5..6b71681 100644 --- a/Crimson/CSharp/Core/Flattener.cs +++ b/Crimson/CSharp/Flattening/RFASM/RFASMFlattener.cs @@ -1,37 +1,20 @@ -using Antlr4.Runtime.Atn; -using Antlr4.Runtime.Misc; -using Crimson.AntlrBuild; +using Crimson.CSharp.Core; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar; using Crimson.CSharp.Grammar.Statements; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; using NLog; using System.Text.RegularExpressions; -namespace Crimson.CSharp.Core +namespace Crimson.CSharp.Assembly.RFASM { - public class Flattener + internal class RFASMFlattener : IFlattener { - public static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - public CrimsonOptions Options { get; } + private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - internal Flattener (CrimsonOptions options) + public AbstractAssemblyProgram Flatten (Compilation compilation) { - Options = options; - } - - /* - * - Flattening member names - - * Each member knows its own name. - * All of these are singletons, so updating the name of a member in one location will update it in all locations. - * When a new member is declared, if the name already exists, it will be given a new name (e.g. 'originalname_1'). - * This name will be updated across all locations because the target member is a singleton. - */ - internal BasicProgram Flatten (Compilation compilation) - { - BasicProgram program = new BasicProgram(); + RFASMProgram program = new RFASMProgram(); Dictionary functions = new Dictionary(); Dictionary structures = new Dictionary(); @@ -59,53 +42,52 @@ internal BasicProgram Flatten (Compilation compilation) } // Add versioning and credits - program.Add(new CommentBStatement("This CrimsonBasic program was automatically generated by the Crimson compiler.")); - program.Add(new CommentBStatement("Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x")); - program.Add(new CommentBStatement("Crimson version " + Crimson.VERSION)); - program.Add(new CommentBStatement("CrimsonBasic version " + CrimsonBasic.CSharp.Core.CrimsonBasic.VERSION)); - program.Add(new CommentBStatement("Crimson, CrimsonBasic and RedFoxAssembly are parts of GamesMaster3000X's RedFoxVirtualMachine.")); - program.Add(new CommentBStatement("The main repository for this project can be found at: https://github.com/gamesmaster3000x/RF_ASM")); - program.Add(new CommentBStatement("Crimson, CrimsonBasic and RedFoxAssembly were implemented by me, GenElectrovise.")); - program.Add(new CommentBStatement("My development fork of the project can be found at: https://github.com/GenElectrovise/RF_ASM")); - program.Add(new CommentBStatement("")); + program.Add(new RFASMComment("This CrimsonBasic program was automatically generated by the Crimson compiler.")); + program.Add(new RFASMComment("Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x")); + program.Add(new RFASMComment("Crimson version " + Core.Crimson.VERSION)); + program.Add(new RFASMComment("Crimson, CrimsonBasic and RedFoxAssembly are parts of GamesMaster3000X's RedFoxVirtualMachine.")); + program.Add(new RFASMComment("The main repository for this project can be found at: https://github.com/gamesmaster3000x/RF_ASM")); + program.Add(new RFASMComment("Crimson, CrimsonBasic and RedFoxAssembly were implemented by me, GenElectrovise.")); + program.Add(new RFASMComment("My development fork of the project can be found at: https://github.com/GenElectrovise/RF_ASM")); + program.Add(new RFASMComment("")); // Add global variables - program.Add(new CommentBStatement("")); - program.Add(new CommentBStatement("============================== Global Variables ==============================")); + program.Add(new RFASMComment("")); + program.Add(new RFASMComment("============================== Global Variables ==============================")); foreach (var pair in variables) { - Fragment bs = pair.Value.GetCrimsonBasic(); + Fragment bs = pair.Value.GetCrimsonBasic(); program.Add(bs); LOGGER.Debug($"Added GlobalVariable {pair.Value.Assignment.Name}"); } // Add structures - program.Add(new CommentBStatement("")); - program.Add(new CommentBStatement("(Structures shouldn't be a part of CB)")); - program.Add(new CommentBStatement("============================== Structures ==============================")); + program.Add(new RFASMComment("")); + program.Add(new RFASMComment("(Structures shouldn't be a part of CB)")); + program.Add(new RFASMComment("============================== Structures ==============================")); foreach (var pair in structures) { - Fragment bs = pair.Value.GetCrimsonBasic(); + Fragment bs = pair.Value.GetCrimsonBasic(); program.Add(bs); LOGGER.Debug($"Added Structure {pair.Value.Name}"); } // Add main (entry) function - program.Add(new CommentBStatement("")); - program.Add(new CommentBStatement("============================== Entry Function ==============================")); + program.Add(new RFASMComment("")); + program.Add(new RFASMComment("============================== Entry Function ==============================")); FunctionCStatement entry = GetEntryFunction(compilation); LOGGER.Info($"Found entry Function {entry.Name}"); - Fragment entryBs = entry.GetCrimsonBasic(); + Fragment entryBs = entry.GetCrimsonBasic(); program.Add(entryBs); LOGGER.Debug($"Added entry Function {entry.Name}"); // Add remaining functions - program.Add(new CommentBStatement("")); - program.Add(new CommentBStatement("============================== Functions ==============================")); + program.Add(new RFASMComment("")); + program.Add(new RFASMComment("============================== Functions ==============================")); foreach (var pair in functions) { if (pair.Value == entry) continue; - Fragment bs = pair.Value.GetCrimsonBasic(); + Fragment bs = pair.Value.GetCrimsonBasic(); program.Add(bs); LOGGER.Debug($"Added Function {pair.Value.Name}"); } @@ -113,9 +95,10 @@ internal BasicProgram Flatten (Compilation compilation) return program; } + private FunctionCStatement GetEntryFunction (Compilation compilation) { - string baseName = Options.EntryFunctionName; + string baseName = Core.Crimson.Options.EntryFunctionName; Scope rootUnit = compilation.GetRootUnit(); string pattern = $"^func_{baseName}_[0-9]+$"; // Match name_090923 (anchored to start and end) Regex regex = new Regex(pattern); @@ -123,7 +106,7 @@ private FunctionCStatement GetEntryFunction (Compilation compilation) IList funcs = rootUnit.Functions.Values.Where(func => regex.IsMatch(func.Name.ToString())).ToList(); 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}'."); + throw new FlatteningException($"No valid entry function found. Invalid contenders were: [{String.Join(',', rootUnit.Functions.Values.Select(f => f.Name))}]. Searched for Crimson name '{Core.Crimson.Options.EntryFunctionName}' using Regex: '{pattern}'."); } else if (funcs.Count == 1) { @@ -173,4 +156,4 @@ private string GetFlattenedPrefix (System.Type type) return ""; } } -} \ No newline at end of file +} diff --git a/Crimson/CSharp/Flattening/RFASM/RFASMProgram.cs b/Crimson/CSharp/Flattening/RFASM/RFASMProgram.cs new file mode 100644 index 0000000..1c4e325 --- /dev/null +++ b/Crimson/CSharp/Flattening/RFASM/RFASMProgram.cs @@ -0,0 +1,32 @@ +namespace Crimson.CSharp.Assembly.RFASM +{ + internal class RFASMProgram : AbstractAssemblyProgram + { + + public List> Fragments { get; } + + public RFASMProgram () + { + Fragments = new List>(); + } + + public void Add (Fragment f) + { + Fragments.Add(f); + } + + public void Add (params RFASMStatement[] statements) + { + Fragment f = new Fragment(0); + f.Add(statements); + Add(f); + } + + public void Add (RFASMStatement statement) + { + Fragment f = new Fragment(0); + f.Add(statement); + Fragments.Add(f); + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Flattening/RFASM/RFASMStatement.cs b/Crimson/CSharp/Flattening/RFASM/RFASMStatement.cs new file mode 100644 index 0000000..79ea3d4 --- /dev/null +++ b/Crimson/CSharp/Flattening/RFASM/RFASMStatement.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Assembly.RFASM +{ + public class RFASMStatement : AbstractAssemblyStatement + { + } +} diff --git a/Crimson/CSharp/Grammar/Tokens/ComplexValueCToken.cs b/Crimson/CSharp/Grammar/Tokens/ComplexValueCToken.cs deleted file mode 100644 index 49ec64c..0000000 --- a/Crimson/CSharp/Grammar/Tokens/ComplexValueCToken.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Crimson.AntlrBuild; -using Crimson.CSharp.Core; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar.Statements; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; -using System.Net.Http; - -namespace Crimson.CSharp.Grammar.Tokens -{ - public abstract class ComplexValueCToken : ICrimsonToken - { - - public ComplexValueCToken() - { - } - - public abstract void Link(LinkingContext ctx); - public abstract Fragment GetBasicFragment(); - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Core/Linker.cs b/Crimson/CSharp/Linking/Linker.cs similarity index 91% rename from Crimson/CSharp/Core/Linker.cs rename to Crimson/CSharp/Linking/Linker.cs index e7ae6d1..d883867 100644 --- a/Crimson/CSharp/Core/Linker.cs +++ b/Crimson/CSharp/Linking/Linker.cs @@ -1,12 +1,12 @@ using Antlr4.Runtime.Misc; +using Crimson.CSharp.Core; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar; using Crimson.CSharp.Grammar.Statements; -using CrimsonBasic.CSharp.Core; using NLog; using System.Linq; -namespace Crimson.CSharp.Core +namespace Crimson.CSharp.Linking { /// /// Converts a CompilationUnit to a LinkedUnit. @@ -16,7 +16,7 @@ internal class Linker private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); public CrimsonOptions Options { get; } - public Linker (CrimsonOptions options) + public Linker(CrimsonOptions options) { Options = options; } @@ -25,7 +25,7 @@ public Linker (CrimsonOptions options) /// Links the FunctionCalls in a Compilation. /// /// - public void Link (Compilation compilation) + public void Link(Compilation compilation) { LOGGER.Info("Linking compilation " + compilation); @@ -49,7 +49,7 @@ public void Link (Compilation compilation) return; } - private static List GetAllStatements (Scope unit) + private static List GetAllStatements(Scope unit) { var statements = new List(); foreach (var s in unit.Functions.Values) diff --git a/Crimson/CSharp/Core/LinkerHelper.cs b/Crimson/CSharp/Linking/LinkerHelper.cs similarity index 99% rename from Crimson/CSharp/Core/LinkerHelper.cs rename to Crimson/CSharp/Linking/LinkerHelper.cs index 5b3c399..6cdc8ee 100644 --- a/Crimson/CSharp/Core/LinkerHelper.cs +++ b/Crimson/CSharp/Linking/LinkerHelper.cs @@ -3,7 +3,7 @@ using Crimson.CSharp.Grammar.Statements; using Crimson.CSharp.Grammar.Tokens; -namespace Crimson.CSharp.Core +namespace Crimson.CSharp.Linking { internal class LinkerHelper { diff --git a/Crimson/CSharp/Core/LinkingContext.cs b/Crimson/CSharp/Linking/LinkingContext.cs similarity index 78% rename from Crimson/CSharp/Core/LinkingContext.cs rename to Crimson/CSharp/Linking/LinkingContext.cs index cd5dade..b984f4c 100644 --- a/Crimson/CSharp/Core/LinkingContext.cs +++ b/Crimson/CSharp/Linking/LinkingContext.cs @@ -1,8 +1,9 @@ -using Crimson.CSharp.Exception; +using Crimson.CSharp.Core; +using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar; using Crimson.CSharp.Grammar.Statements; -namespace Crimson.CSharp.Core +namespace Crimson.CSharp.Linking { public class LinkingContext { @@ -11,7 +12,7 @@ public class LinkingContext internal Dictionary Links { get; private set; } public Compilation Compilation { get; private set; } - public LinkingContext (Scope currentScope, Dictionary links, Compilation compilation) + public LinkingContext(Scope currentScope, Dictionary links, Compilation compilation) { CurrentScope = currentScope; Links = links; @@ -29,7 +30,7 @@ public LinkingContext (Scope currentScope, Dictionary links, Comp /// be affected by edits to the new context's links. /// /// - public LinkingContext (Scope currentScope, LinkingContext ctx) + public LinkingContext(Scope currentScope, LinkingContext ctx) { CurrentScope = currentScope; @@ -42,12 +43,12 @@ public LinkingContext (Scope currentScope, LinkingContext ctx) } } - public bool HasScope (string alias) + public bool HasScope(string alias) { return Links.ContainsKey(alias); } - internal Scope GetScope (string alias) + internal Scope GetScope(string alias) { if (HasScope(alias)) { @@ -57,9 +58,9 @@ internal Scope GetScope (string alias) throw new LinkingException("No alias '" + alias + "' in " + ToString()); } - public override string ToString () + public override string ToString() { - return $"LinkingContext (scope:{CurrentScope}; links:[{String.Join(",", Links)}])"; + return $"LinkingContext (scope:{CurrentScope}; links:[{string.Join(",", Links)}])"; } } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/IHasScope.cs b/Crimson/CSharp/Parsing/IHasScope.cs similarity index 100% rename from Crimson/CSharp/Grammar/IHasScope.cs rename to Crimson/CSharp/Parsing/IHasScope.cs diff --git a/Crimson/CSharp/Grammar/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs similarity index 99% rename from Crimson/CSharp/Grammar/Scope.cs rename to Crimson/CSharp/Parsing/Scope.cs index 98087a3..773c714 100644 --- a/Crimson/CSharp/Grammar/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -1,7 +1,7 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; +using Crimson.CSharp.Core; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar.Statements; -using CrimsonBasic.CSharp.Core; using NLog; namespace Crimson.CSharp.Grammar diff --git a/Crimson/CSharp/Core/ScopeVisitor.cs b/Crimson/CSharp/Parsing/ScopeVisitor.cs similarity index 99% rename from Crimson/CSharp/Core/ScopeVisitor.cs rename to Crimson/CSharp/Parsing/ScopeVisitor.cs index d770b49..037d7a0 100644 --- a/Crimson/CSharp/Core/ScopeVisitor.cs +++ b/Crimson/CSharp/Parsing/ScopeVisitor.cs @@ -7,7 +7,7 @@ using NLog; using static Crimson.CSharp.Grammar.Tokens.Comparator; -namespace Crimson.CSharp.Core +namespace Crimson.CSharp.Parsing { internal class ScopeVisitor : CrimsonBaseVisitor { diff --git a/Crimson/CSharp/Grammar/Statements/AbstractCrimsonStatement.cs b/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs similarity index 86% rename from Crimson/CSharp/Grammar/Statements/AbstractCrimsonStatement.cs rename to Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs index d60d771..50340a3 100644 --- a/Crimson/CSharp/Grammar/Statements/AbstractCrimsonStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs @@ -1,6 +1,6 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs b/Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs similarity index 85% rename from Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs rename to Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs index b64df4e..fe09f02 100644 --- a/Crimson/CSharp/Grammar/Statements/AssemblyCallCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs @@ -1,6 +1,5 @@ -using Crimson.CSharp.Core; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Assembly; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs b/Crimson/CSharp/Parsing/Statements/BasicCallCStatement.cs similarity index 85% rename from Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs rename to Crimson/CSharp/Parsing/Statements/BasicCallCStatement.cs index 8b75c63..4d2e492 100644 --- a/Crimson/CSharp/Grammar/Statements/BasicCallCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/BasicCallCStatement.cs @@ -1,6 +1,5 @@ -using Crimson.CSharp.Core; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Assembly; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs b/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs similarity index 93% rename from Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs rename to Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs index a8e36a8..860674f 100644 --- a/Crimson/CSharp/Grammar/Statements/FunctionCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs @@ -1,12 +1,6 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs b/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs similarity index 95% rename from Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs rename to Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs index 73775ad..35e4806 100644 --- a/Crimson/CSharp/Grammar/Statements/FunctionCallCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs @@ -1,8 +1,7 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs b/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs similarity index 88% rename from Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs rename to Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs index 894ba39..427d1fe 100644 --- a/Crimson/CSharp/Grammar/Statements/GlobalVariableCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs @@ -1,13 +1,7 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Statements/INamed.cs b/Crimson/CSharp/Parsing/Statements/INamed.cs similarity index 92% rename from Crimson/CSharp/Grammar/Statements/INamed.cs rename to Crimson/CSharp/Parsing/Statements/INamed.cs index 3c02f03..cc9b1e1 100644 --- a/Crimson/CSharp/Grammar/Statements/INamed.cs +++ b/Crimson/CSharp/Parsing/Statements/INamed.cs @@ -1,6 +1,5 @@ using Crimson.CSharp.Core; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs b/Crimson/CSharp/Parsing/Statements/IfBlockCStatement.cs similarity index 94% rename from Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs rename to Crimson/CSharp/Parsing/Statements/IfBlockCStatement.cs index be4f6bc..d98df59 100644 --- a/Crimson/CSharp/Grammar/Statements/IfBlockCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/IfBlockCStatement.cs @@ -1,8 +1,7 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; +using Crimson.CSharp.Flattening; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; -using static System.Formats.Asn1.AsnWriter; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Statements/ImportCStatement.cs b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs similarity index 100% rename from Crimson/CSharp/Grammar/Statements/ImportCStatement.cs rename to Crimson/CSharp/Parsing/Statements/ImportCStatement.cs diff --git a/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs b/Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs similarity index 94% rename from Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs rename to Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs index b75d724..894e194 100644 --- a/Crimson/CSharp/Grammar/Statements/OperationHandlerCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs @@ -1,6 +1,6 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Statements/ReturnCStatement.cs b/Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs similarity index 85% rename from Crimson/CSharp/Grammar/Statements/ReturnCStatement.cs rename to Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs index b20e07c..4ac2d4b 100644 --- a/Crimson/CSharp/Grammar/Statements/ReturnCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs @@ -1,7 +1,6 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Statements/ScopeVariableCStatement.cs b/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs similarity index 87% rename from Crimson/CSharp/Grammar/Statements/ScopeVariableCStatement.cs rename to Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs index e50f827..73a73a3 100644 --- a/Crimson/CSharp/Grammar/Statements/ScopeVariableCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs @@ -1,11 +1,7 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; -using System.Drawing; -using System.Xml.Linq; -using static Crimson.CSharp.Grammar.Tokens.Comparator; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs b/Crimson/CSharp/Parsing/Statements/StructureCStatement.cs similarity index 93% rename from Crimson/CSharp/Grammar/Statements/StructureCStatement.cs rename to Crimson/CSharp/Parsing/Statements/StructureCStatement.cs index 1f5312d..b12b567 100644 --- a/Crimson/CSharp/Grammar/Statements/StructureCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/StructureCStatement.cs @@ -1,6 +1,6 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs b/Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs similarity index 94% rename from Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs rename to Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs index 465cc1a..ca8356e 100644 --- a/Crimson/CSharp/Grammar/Statements/VariableAssignmentCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs @@ -1,8 +1,7 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Linking; using System; namespace Crimson.CSharp.Grammar.Statements diff --git a/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs b/Crimson/CSharp/Parsing/Statements/WhileBlockCStatement.cs similarity index 94% rename from Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs rename to Crimson/CSharp/Parsing/Statements/WhileBlockCStatement.cs index 50e60e5..3e90be7 100644 --- a/Crimson/CSharp/Grammar/Statements/WhileBlockCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/WhileBlockCStatement.cs @@ -1,7 +1,6 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Grammar.Tokens; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Statements { diff --git a/Crimson/CSharp/Grammar/Tokens/ComparatorCToken.cs b/Crimson/CSharp/Parsing/Tokens/ComparatorCToken.cs similarity index 100% rename from Crimson/CSharp/Grammar/Tokens/ComparatorCToken.cs rename to Crimson/CSharp/Parsing/Tokens/ComparatorCToken.cs diff --git a/Crimson/CSharp/Parsing/Tokens/ComplexValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/ComplexValueCToken.cs new file mode 100644 index 0000000..59b4049 --- /dev/null +++ b/Crimson/CSharp/Parsing/Tokens/ComplexValueCToken.cs @@ -0,0 +1,16 @@ +using Crimson.CSharp.Assembly; +using Crimson.CSharp.Linking; + +namespace Crimson.CSharp.Grammar.Tokens +{ + public abstract class ComplexValueCToken : ICrimsonToken + { + + public ComplexValueCToken () + { + } + + public abstract void Link (LinkingContext ctx); + public abstract Fragment GetBasicFragment (); + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Tokens/ConditionCToken.cs b/Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs similarity index 83% rename from Crimson/CSharp/Grammar/Tokens/ConditionCToken.cs rename to Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs index 00ed7d4..49905bf 100644 --- a/Crimson/CSharp/Grammar/Tokens/ConditionCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs @@ -1,6 +1,5 @@ -using Crimson.CSharp.Core; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Assembly; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Tokens { @@ -8,13 +7,13 @@ internal class ConditionCToken : ICrimsonToken { public OperationResolvableValueCToken Operation { get; } - public ConditionCToken(OperationResolvableValueCToken operation) + public ConditionCToken (OperationResolvableValueCToken operation) { Operation = operation; } - public Fragment GetCrimsonBasic() + public Fragment GetCrimsonBasic () { /* @@ -43,7 +42,7 @@ public Fragment GetCrimsonBasic() return combined; } - public void Link(LinkingContext ctx) + public void Link (LinkingContext ctx) { Operation.Link(ctx); } diff --git a/Crimson/CSharp/Grammar/Tokens/ElifBlockCToken.cs b/Crimson/CSharp/Parsing/Tokens/ElifBlockCToken.cs similarity index 69% rename from Crimson/CSharp/Grammar/Tokens/ElifBlockCToken.cs rename to Crimson/CSharp/Parsing/Tokens/ElifBlockCToken.cs index 9ea5608..f4e97fe 100644 --- a/Crimson/CSharp/Grammar/Tokens/ElifBlockCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/ElifBlockCToken.cs @@ -1,7 +1,6 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Grammar.Statements; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Tokens { @@ -11,19 +10,19 @@ internal class ElseIfBlockCToken : ICrimsonToken /// /// /// An IfBlock representing the "if" part of this statement (NOT THIS STATEMENT'S PARENT) - public ElseIfBlockCToken(IfBlockCStatement ifBlock) + public ElseIfBlockCToken (IfBlockCStatement ifBlock) { IfBlock = ifBlock; } public IfBlockCStatement IfBlock { get; } - public Fragment GetCrimsonBasic() + public Fragment GetCrimsonBasic () { return IfBlock.GetCrimsonBasic(); } - public void Link(LinkingContext ctx) + public void Link (LinkingContext ctx) { IfBlock.Link(ctx); } diff --git a/Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs b/Crimson/CSharp/Parsing/Tokens/ElseBlockCToken.cs similarity index 90% rename from Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs rename to Crimson/CSharp/Parsing/Tokens/ElseBlockCToken.cs index 0b5f294..cb7bb4e 100644 --- a/Crimson/CSharp/Grammar/Tokens/ElseBlockCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/ElseBlockCToken.cs @@ -1,7 +1,6 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Grammar.Statements; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Tokens { diff --git a/Crimson/CSharp/Grammar/Tokens/FullNameCToken.cs b/Crimson/CSharp/Parsing/Tokens/FullNameCToken.cs similarity index 98% rename from Crimson/CSharp/Grammar/Tokens/FullNameCToken.cs rename to Crimson/CSharp/Parsing/Tokens/FullNameCToken.cs index 9c8fe89..9838774 100644 --- a/Crimson/CSharp/Grammar/Tokens/FullNameCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/FullNameCToken.cs @@ -1,6 +1,6 @@ using Antlr4.Runtime; -using Crimson.CSharp.Core; using Crimson.CSharp.Exception; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Tokens { diff --git a/Crimson/CSharp/Grammar/Tokens/FunctionArgumentCToken.cs b/Crimson/CSharp/Parsing/Tokens/FunctionArgumentCToken.cs similarity index 100% rename from Crimson/CSharp/Grammar/Tokens/FunctionArgumentCToken.cs rename to Crimson/CSharp/Parsing/Tokens/FunctionArgumentCToken.cs diff --git a/Crimson/CSharp/Grammar/Tokens/FunctionCallResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs similarity index 65% rename from Crimson/CSharp/Grammar/Tokens/FunctionCallResolvableValueCToken.cs rename to Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs index c0efb44..29ed3f0 100644 --- a/Crimson/CSharp/Grammar/Tokens/FunctionCallResolvableValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs @@ -1,8 +1,7 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar.Statements; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Tokens { @@ -10,17 +9,17 @@ public class FunctionCallResolvableValueCToken : ComplexValueCToken { public FunctionCallCStatement FunctionCall { get; } - public FunctionCallResolvableValueCToken(FunctionCallCStatement functionCall) + public FunctionCallResolvableValueCToken (FunctionCallCStatement functionCall) { FunctionCall = functionCall; } - public override void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { FunctionCall.Link(ctx); } - public override Fragment GetBasicFragment() + public override Fragment GetBasicFragment () { Fragment fragment = new Fragment(0); fragment.Add(new CommentBStatement("Function Call")); diff --git a/Crimson/CSharp/Grammar/Tokens/ICrimsonToken.cs b/Crimson/CSharp/Parsing/Tokens/ICrimsonToken.cs similarity index 67% rename from Crimson/CSharp/Grammar/Tokens/ICrimsonToken.cs rename to Crimson/CSharp/Parsing/Tokens/ICrimsonToken.cs index 3e625f5..accf8c2 100644 --- a/Crimson/CSharp/Grammar/Tokens/ICrimsonToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/ICrimsonToken.cs @@ -1,5 +1,4 @@ -using Crimson.CSharp.Core; -using CrimsonBasic.CSharp.Core; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Tokens { @@ -8,6 +7,6 @@ namespace Crimson.CSharp.Grammar.Tokens /// public interface ICrimsonToken { - public void Link(LinkingContext ctx); + public void Link (LinkingContext ctx); } } \ No newline at end of file diff --git a/Crimson/CSharp/Grammar/Tokens/IdentifierSimpleValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs similarity index 86% rename from Crimson/CSharp/Grammar/Tokens/IdentifierSimpleValueCToken.cs rename to Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs index adf2b17..11c1ae3 100644 --- a/Crimson/CSharp/Grammar/Tokens/IdentifierSimpleValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs @@ -1,7 +1,4 @@ - -using Crimson.CSharp.Core; -using CrimsonBasic.CSharp.Core; -using System.Net.Http; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Tokens { diff --git a/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/OperationResolvableValueCToken.cs similarity index 95% rename from Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs rename to Crimson/CSharp/Parsing/Tokens/OperationResolvableValueCToken.cs index 172cc06..bb11c62 100644 --- a/Crimson/CSharp/Grammar/Tokens/OperationResolvableValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/OperationResolvableValueCToken.cs @@ -1,7 +1,6 @@ -using Crimson.CSharp.Core; +using Crimson.CSharp.Assembly; using Crimson.CSharp.Exception; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Linking; using System.Net.Http; namespace Crimson.CSharp.Grammar.Tokens diff --git a/Crimson/CSharp/Grammar/Tokens/ParameterCToken.cs b/Crimson/CSharp/Parsing/Tokens/ParameterCToken.cs similarity index 100% rename from Crimson/CSharp/Grammar/Tokens/ParameterCToken.cs rename to Crimson/CSharp/Parsing/Tokens/ParameterCToken.cs diff --git a/Crimson/CSharp/Grammar/Tokens/RawResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs similarity index 83% rename from Crimson/CSharp/Grammar/Tokens/RawResolvableValueCToken.cs rename to Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs index 10adb00..70c06a1 100644 --- a/Crimson/CSharp/Grammar/Tokens/RawResolvableValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs @@ -1,7 +1,4 @@ - -using Crimson.CSharp.Core; -using CrimsonBasic.CSharp.Core; -using System.Net.Http; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Grammar.Tokens { diff --git a/Crimson/CSharp/Grammar/Tokens/SimpleValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/SimpleValueCToken.cs similarity index 80% rename from Crimson/CSharp/Grammar/Tokens/SimpleValueCToken.cs rename to Crimson/CSharp/Parsing/Tokens/SimpleValueCToken.cs index 958b5bb..f9717ef 100644 --- a/Crimson/CSharp/Grammar/Tokens/SimpleValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/SimpleValueCToken.cs @@ -1,9 +1,7 @@ using Crimson.AntlrBuild; -using Crimson.CSharp.Core; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar.Statements; -using CrimsonBasic.CSharp.Core; -using CrimsonBasic.CSharp.Statements; +using Crimson.CSharp.Linking; using System.Net.Http; namespace Crimson.CSharp.Grammar.Tokens diff --git a/Crimson/CSharp/Grammar/Tokens/TypeCToken.cs b/Crimson/CSharp/Parsing/Tokens/TypeCToken.cs similarity index 100% rename from Crimson/CSharp/Grammar/Tokens/TypeCToken.cs rename to Crimson/CSharp/Parsing/Tokens/TypeCToken.cs diff --git a/Crimson/Crimson.csproj b/Crimson/Crimson.csproj index 56b78f3..1261e3a 100644 --- a/Crimson/Crimson.csproj +++ b/Crimson/Crimson.csproj @@ -33,8 +33,4 @@ - - - - From 07afedcd30323cc93a7dfbd76e6c799d6fa92acc Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Thu, 23 Mar 2023 22:19:05 +0000 Subject: [PATCH 031/122] Now there are just loads of undefined classes --- Crimson/CSharp/Core/Crimson.cs | 1 + Crimson/CSharp/Core/CrimsonCompiler.cs | 1 + .../CSharp/Flattening/AbstractAssemblyProgram.cs | 2 +- Crimson/CSharp/Flattening/RFASM/RFASMFlattener.cs | 8 ++++---- Crimson/CSharp/Flattening/RFASM/RFASMProgram.cs | 15 ++++++++++----- Crimson/CSharp/Parsing/Scope.cs | 1 + 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 2b6f031..6b878ef 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -4,6 +4,7 @@ using Crimson.AntlrBuild; using Crimson.CSharp.Assembly.RFASM; using Crimson.CSharp.Assembly; +using Crimson.CSharp.Linking; namespace Crimson.CSharp.Core { diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 190e6f3..ed20207 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -2,6 +2,7 @@ using Crimson.AntlrBuild; using Crimson.CSharp.Assembly; using Crimson.CSharp.Grammar; +using Crimson.CSharp.Linking; using NLog; namespace Crimson.CSharp.Core diff --git a/Crimson/CSharp/Flattening/AbstractAssemblyProgram.cs b/Crimson/CSharp/Flattening/AbstractAssemblyProgram.cs index add4734..40504b9 100644 --- a/Crimson/CSharp/Flattening/AbstractAssemblyProgram.cs +++ b/Crimson/CSharp/Flattening/AbstractAssemblyProgram.cs @@ -9,6 +9,6 @@ namespace Crimson.CSharp.Assembly { public abstract class AbstractAssemblyProgram { - + internal abstract IEnumerable GetFragments (); } } diff --git a/Crimson/CSharp/Flattening/RFASM/RFASMFlattener.cs b/Crimson/CSharp/Flattening/RFASM/RFASMFlattener.cs index 6b71681..0cafb1c 100644 --- a/Crimson/CSharp/Flattening/RFASM/RFASMFlattener.cs +++ b/Crimson/CSharp/Flattening/RFASM/RFASMFlattener.cs @@ -56,7 +56,7 @@ public AbstractAssemblyProgram Flatten (Compilation compilation) program.Add(new RFASMComment("============================== Global Variables ==============================")); foreach (var pair in variables) { - Fragment bs = pair.Value.GetCrimsonBasic(); + Fragment bs = pair.Value.GetCrimsonBasic(); program.Add(bs); LOGGER.Debug($"Added GlobalVariable {pair.Value.Assignment.Name}"); } @@ -67,7 +67,7 @@ public AbstractAssemblyProgram Flatten (Compilation compilation) program.Add(new RFASMComment("============================== Structures ==============================")); foreach (var pair in structures) { - Fragment bs = pair.Value.GetCrimsonBasic(); + Fragment bs = pair.Value.GetCrimsonBasic(); program.Add(bs); LOGGER.Debug($"Added Structure {pair.Value.Name}"); } @@ -77,7 +77,7 @@ public AbstractAssemblyProgram Flatten (Compilation compilation) program.Add(new RFASMComment("============================== Entry Function ==============================")); FunctionCStatement entry = GetEntryFunction(compilation); LOGGER.Info($"Found entry Function {entry.Name}"); - Fragment entryBs = entry.GetCrimsonBasic(); + Fragment entryBs = entry.GetCrimsonBasic(); program.Add(entryBs); LOGGER.Debug($"Added entry Function {entry.Name}"); @@ -87,7 +87,7 @@ public AbstractAssemblyProgram Flatten (Compilation compilation) foreach (var pair in functions) { if (pair.Value == entry) continue; - Fragment bs = pair.Value.GetCrimsonBasic(); + Fragment bs = pair.Value.GetCrimsonBasic(); program.Add(bs); LOGGER.Debug($"Added Function {pair.Value.Name}"); } diff --git a/Crimson/CSharp/Flattening/RFASM/RFASMProgram.cs b/Crimson/CSharp/Flattening/RFASM/RFASMProgram.cs index 1c4e325..627281e 100644 --- a/Crimson/CSharp/Flattening/RFASM/RFASMProgram.cs +++ b/Crimson/CSharp/Flattening/RFASM/RFASMProgram.cs @@ -3,30 +3,35 @@ internal class RFASMProgram : AbstractAssemblyProgram { - public List> Fragments { get; } + public List Fragments { get; } public RFASMProgram () { - Fragments = new List>(); + Fragments = new List(); } - public void Add (Fragment f) + public void Add (Fragment f) { Fragments.Add(f); } public void Add (params RFASMStatement[] statements) { - Fragment f = new Fragment(0); + Fragment f = new Fragment(0); f.Add(statements); Add(f); } public void Add (RFASMStatement statement) { - Fragment f = new Fragment(0); + Fragment f = new Fragment(0); f.Add(statement); Fragments.Add(f); } + + internal override IEnumerable GetFragments () + { + return Fragments; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs index 773c714..b44f19a 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -2,6 +2,7 @@ using Crimson.CSharp.Core; using Crimson.CSharp.Exception; using Crimson.CSharp.Grammar.Statements; +using Crimson.CSharp.Linking; using NLog; namespace Crimson.CSharp.Grammar From ac47cd496e3f54042cbb492fffc531b603c77b63 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Fri, 24 Mar 2023 20:02:51 +0000 Subject: [PATCH 032/122] It compiles once again... --- Crimson/CSharp/Core/Compilation.cs | 32 +++- Crimson/CSharp/Core/Crimson.cs | 15 +- Crimson/CSharp/Core/CrimsonCompiler.cs | 69 +++----- Crimson/CSharp/Core/Library.cs | 3 +- .../Exception/StatementParseException.cs | 21 --- .../CrimsonParserException.cs | 6 +- .../FlatteningException.cs | 6 +- .../LexerErrorListener.cs | 7 +- .../LexerException.cs | 6 +- .../LinkingException.cs | 6 +- .../ParserErrorStrategy.cs | 2 +- .../Exceptions/StatementParseException.cs | 21 +++ .../UnitGeneratorException.cs | 6 +- .../Flattening/AbstractAssemblyStatement.cs | 6 - Crimson/CSharp/Flattening/FlattenerHelper.cs | 19 --- .../CSharp/Flattening/RFASM/RFASMFlattener.cs | 159 ------------------ .../CSharp/Flattening/RFASM/RFASMStatement.cs | 12 -- .../Generalising/GeneralAssemblyProgram.cs | 18 ++ .../Generalising/GeneralisationContext.cs | 29 ++++ Crimson/CSharp/Generalising/Generaliser.cs | 135 +++++++++++++++ .../Generalising/IGeneralAssemblyStructure.cs | 13 ++ .../Structures/ArbitraryAssemblyStructure.cs | 22 +++ .../Structures/CommentAssemblyStructure.cs | 31 ++++ .../Structures/ConstantAssemblyStructure.cs | 30 ++++ .../Structures/EmptyAssemblyStructure.cs | 14 ++ .../Structures/IndentAssemblyStructure.cs | 27 +++ .../Structures/JumpAssemblyStructure.cs | 22 +++ .../Structures/LabelAssemblyStructure.cs | 22 +++ .../Structures/ReturnAssemblyStructure.cs | 14 ++ .../Structures/ScopeAssemblyStructure.cs | 21 +++ .../Structures/SubroutineAssemblyStructure.cs | 40 +++++ Crimson/CSharp/Linking/Linker.cs | 15 +- Crimson/CSharp/Linking/LinkerHelper.cs | 8 +- Crimson/CSharp/Linking/LinkingContext.cs | 15 +- Crimson/CSharp/Parsing/IHasScope.cs | 4 +- Crimson/CSharp/Parsing/Scope.cs | 42 ++--- Crimson/CSharp/Parsing/ScopeVisitor.cs | 19 ++- .../Statements/AbstractCrimsonStatement.cs | 9 +- .../Statements/AssemblyCallCStatement.cs | 13 +- .../Parsing/Statements/BasicCallCStatement.cs | 18 +- .../Parsing/Statements/FunctionCStatement.cs | 36 ++-- .../Statements/FunctionCallCStatement.cs | 23 ++- .../Statements/GlobalVariableCStatement.cs | 27 ++- Crimson/CSharp/Parsing/Statements/INamed.cs | 4 +- .../Parsing/Statements/IfBlockCStatement.cs | 45 ++--- .../Parsing/Statements/ImportCStatement.cs | 6 +- .../Statements/OperationHandlerCStatement.cs | 12 +- .../Parsing/Statements/ReturnCStatement.cs | 13 +- .../Statements/ScopeVariableCStatement.cs | 24 +-- .../Parsing/Statements/StructureCStatement.cs | 12 +- .../VariableAssignmentCStatement.cs | 56 +++--- .../Statements/WhileBlockCStatement.cs | 20 +-- .../CSharp/Parsing/Tokens/ComparatorCToken.cs | 8 +- .../Parsing/Tokens/ComplexValueCToken.cs | 7 +- .../CSharp/Parsing/Tokens/ConditionCToken.cs | 6 +- .../CSharp/Parsing/Tokens/ElifBlockCToken.cs | 13 +- .../CSharp/Parsing/Tokens/ElseBlockCToken.cs | 24 +-- .../CSharp/Parsing/Tokens/FullNameCToken.cs | 20 +-- .../Parsing/Tokens/FunctionArgumentCToken.cs | 2 +- .../FunctionCallResolvableValueCToken.cs | 16 +- .../CSharp/Parsing/Tokens/ICrimsonToken.cs | 2 +- .../Tokens/IdentifierSimpleValueCToken.cs | 12 +- .../Tokens/OperationResolvableValueCToken.cs | 13 +- .../CSharp/Parsing/Tokens/ParameterCToken.cs | 2 +- .../Tokens/RawResolvableValueCToken.cs | 12 +- .../Parsing/Tokens/SimpleValueCToken.cs | 10 +- Crimson/CSharp/Parsing/Tokens/TypeCToken.cs | 2 +- .../AbstractSpecificAssemblyProgram.cs} | 7 +- .../AbstractSpecificAssemblyStatement.cs | 6 + .../{Flattening => Specialising}/Fragment.cs | 10 +- .../ISpecialiser.cs} | 11 +- .../RFASM/RFASMComment.cs | 6 +- .../RFASM/RFASMProgram.cs | 16 +- .../Specialising/RFASM/RFASMSpecialiser.cs | 15 ++ .../Specialising/RFASM/RFASMStatement.cs | 13 ++ 75 files changed, 857 insertions(+), 631 deletions(-) delete mode 100644 Crimson/CSharp/Exception/StatementParseException.cs rename Crimson/CSharp/{Exception => Exceptions}/CrimsonParserException.cs (55%) rename Crimson/CSharp/{Exception => Exceptions}/FlatteningException.cs (55%) rename Crimson/CSharp/{Exception => Exceptions}/LexerErrorListener.cs (83%) rename Crimson/CSharp/{Exception => Exceptions}/LexerException.cs (54%) rename Crimson/CSharp/{Exception => Exceptions}/LinkingException.cs (54%) rename Crimson/CSharp/{Exception => Exceptions}/ParserErrorStrategy.cs (94%) create mode 100644 Crimson/CSharp/Exceptions/StatementParseException.cs rename Crimson/CSharp/{Exception => Exceptions}/UnitGeneratorException.cs (55%) delete mode 100644 Crimson/CSharp/Flattening/AbstractAssemblyStatement.cs delete mode 100644 Crimson/CSharp/Flattening/FlattenerHelper.cs delete mode 100644 Crimson/CSharp/Flattening/RFASM/RFASMFlattener.cs delete mode 100644 Crimson/CSharp/Flattening/RFASM/RFASMStatement.cs create mode 100644 Crimson/CSharp/Generalising/GeneralAssemblyProgram.cs create mode 100644 Crimson/CSharp/Generalising/GeneralisationContext.cs create mode 100644 Crimson/CSharp/Generalising/Generaliser.cs create mode 100644 Crimson/CSharp/Generalising/IGeneralAssemblyStructure.cs create mode 100644 Crimson/CSharp/Generalising/Structures/ArbitraryAssemblyStructure.cs create mode 100644 Crimson/CSharp/Generalising/Structures/CommentAssemblyStructure.cs create mode 100644 Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs create mode 100644 Crimson/CSharp/Generalising/Structures/EmptyAssemblyStructure.cs create mode 100644 Crimson/CSharp/Generalising/Structures/IndentAssemblyStructure.cs create mode 100644 Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs create mode 100644 Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs create mode 100644 Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs create mode 100644 Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs create mode 100644 Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs rename Crimson/CSharp/{Flattening/AbstractAssemblyProgram.cs => Specialising/AbstractSpecificAssemblyProgram.cs} (57%) create mode 100644 Crimson/CSharp/Specialising/AbstractSpecificAssemblyStatement.cs rename Crimson/CSharp/{Flattening => Specialising}/Fragment.cs (81%) rename Crimson/CSharp/{Flattening/IFlattener.cs => Specialising/ISpecialiser.cs} (75%) rename Crimson/CSharp/{Flattening => Specialising}/RFASM/RFASMComment.cs (71%) rename Crimson/CSharp/{Flattening => Specialising}/RFASM/RFASMProgram.cs (54%) create mode 100644 Crimson/CSharp/Specialising/RFASM/RFASMSpecialiser.cs create mode 100644 Crimson/CSharp/Specialising/RFASM/RFASMStatement.cs diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/CSharp/Core/Compilation.cs index 3792a9c..28c9ab6 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/CSharp/Core/Compilation.cs @@ -1,5 +1,8 @@ -using Crimson.CSharp.Grammar; +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Parsing; +using Crimson.CSharp.Parsing.Statements; using NLog; +using System.Text.RegularExpressions; namespace Crimson.CSharp.Core { @@ -64,5 +67,32 @@ public override string ToString () { return $"Compilation(RootUnit={GetRootUnit()}; Library={Library.ToString()})"; } + + public FunctionCStatement GetEntryFunction () + { + string baseName = Core.Crimson.Options.EntryFunctionName; + Scope rootUnit = GetRootUnit(); + string pattern = $"^func_{baseName}_[0-9]+$"; // Match name_090923 (anchored to start and end) + Regex regex = new Regex(pattern); + + IList funcs = rootUnit.Functions.Values.Where(func => regex.IsMatch(func.Name.ToString())).ToList(); + 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 '{Core.Crimson.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}"); + } + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 6b878ef..4882816 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -1,10 +1,8 @@ -using CommandLine; -using NLog; -using Antlr4.Runtime; -using Crimson.AntlrBuild; -using Crimson.CSharp.Assembly.RFASM; -using Crimson.CSharp.Assembly; +using NLog; using Crimson.CSharp.Linking; +using Crimson.CSharp.Specialising; +using Crimson.CSharp.Specialising.RFASM; +using Crimson.CSharp.Generalising; namespace Crimson.CSharp.Core { @@ -53,8 +51,9 @@ static int Main (string[] args) Library generator = new Library(Options); Linker linker = new Linker(Options); - IFlattener flattener = new RFASMFlattener(); //TODO Don't default to RFASM Flattener - Compiler = new CrimsonCompiler(Options, generator, linker, flattener); + Generaliser generaliser = new Generaliser(); + ISpecialiser specialiser = new RFASMSpecialiser(); //TODO Don't default to RFASM + Compiler = new CrimsonCompiler(Options, generator, linker, generaliser, specialiser); try { diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index ed20207..454a9e3 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -1,8 +1,7 @@ -using Antlr4.Runtime; -using Crimson.AntlrBuild; -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Grammar; +using Crimson.CSharp.Generalising; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing; +using Crimson.CSharp.Specialising; using NLog; namespace Crimson.CSharp.Core @@ -16,14 +15,16 @@ internal class CrimsonCompiler public CrimsonOptions Options { get; } public Library Library { get; } public Linker Linker { get; } - public IFlattener Flattener { get; } + public Generaliser Generaliser { get; } + public ISpecialiser Specialiser { get; } - public CrimsonCompiler (CrimsonOptions options, Library unitGenerator, Linker linker, IFlattener flattener) + public CrimsonCompiler (CrimsonOptions options, Library unitGenerator, Linker linker, Generaliser generaliser, ISpecialiser flattener) { Options = options; Library = unitGenerator; Linker = linker; - Flattener = flattener; + Generaliser = generaliser; + Specialiser = flattener; } public int FullyCompileFromOptions () @@ -54,56 +55,38 @@ public int FullyCompileFromOptions () /* - * == FLATTENING STAGE == + * == GENERALISING STAGE == * - * Now we need to break this list into simple statements - a strange kind of Crimson/RFASM mash-up. - * This strange intermediate language will have some high-level features from Crimson, but will use a flattened control flow. - * This basically means that conditions will be replaced with jumps. - * - * >> main.crm - * function main () { - * int i = 5; - * - * if (i == 4) { - * i = 6; - * } else { - * return false; - * } - * } - * - * >> main.crmrfp - * ::func_main - * int i = 5 - * - * bool b = (i == 4) // Condition has been extracted - * JNE b, true, "not_equal" // Jump if condition false (ie. i != 4) - * i = 6 - * JMP "end_condition" - * ::not_equal // This is the else block - * return false; - * ::end_condition - * ::endfunc_main + * Converts the program into a list of general assembly statements covering the concepts of the program + * without tying it to one assembly language. */ LOGGER.Info("\n\n"); - LOGGER.Info(" F L A T T E N I N G "); - AbstractAssemblyProgram basicProgram = Flattener.Flatten(compilation); + LOGGER.Info(" G E N E R A L I S I N G "); + GeneralAssemblyProgram generalProgram = Generaliser.Generalise(compilation); /* - * == FURTHER COMPILATION STAGES == - * - * Depending on specified options, the CrimsonBasic or RFASM compilers may now be invoked. + * == SPECIALISING STAGE == * + * Convert the generic program into one targetting the desired assembly language. + * For each language, you'll need a different ISpecialiser. + */ + LOGGER.Info("\n\n"); + LOGGER.Info(" S P E C I A L I S I N G "); + AbstractSpecificAssemblyProgram specialisedProgram = Specialiser.Specialise(generalProgram); + + /* + * == CLEANUP == */ LOGGER.Info("\n\n"); - LOGGER.Info(" D E L E G A T I N G"); - DumpAssemblyProgram(basicProgram); + LOGGER.Info("Writing to disk..."); + DumpSpecialisedProgram(specialisedProgram); LOGGER.Info("\n\n"); LOGGER.Info("Done!"); return 1; } - private void DumpAssemblyProgram (AbstractAssemblyProgram basicProgram) + private void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram basicProgram) { if (Options.DumpIntermediates) { diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 4db3c3e..3990414 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -1,7 +1,6 @@ using Antlr4.Runtime; using Crimson.AntlrBuild; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar; +using Crimson.CSharp.Exceptions; using Crimson.CSharp.Parsing; using NLog; diff --git a/Crimson/CSharp/Exception/StatementParseException.cs b/Crimson/CSharp/Exception/StatementParseException.cs deleted file mode 100644 index b4244bb..0000000 --- a/Crimson/CSharp/Exception/StatementParseException.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Exception -{ - internal class StatementParseException: ArgumentException - { - public StatementParseException(string message) : base (message) - { - - } - - public StatementParseException(string message, SystemException cause) : base(message, cause) - { - - } - } -} diff --git a/Crimson/CSharp/Exception/CrimsonParserException.cs b/Crimson/CSharp/Exceptions/CrimsonParserException.cs similarity index 55% rename from Crimson/CSharp/Exception/CrimsonParserException.cs rename to Crimson/CSharp/Exceptions/CrimsonParserException.cs index 739a6bf..7793324 100644 --- a/Crimson/CSharp/Exception/CrimsonParserException.cs +++ b/Crimson/CSharp/Exceptions/CrimsonParserException.cs @@ -4,16 +4,16 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Exception +namespace Crimson.CSharp.Exceptions { internal class CrimsonParserException : ArgumentException { - public CrimsonParserException(string message) : base (message) + public CrimsonParserException (string message) : base(message) { } - public CrimsonParserException(string message, System.Exception cause) : base(message, cause) + public CrimsonParserException (string message, Exception cause) : base(message, cause) { } diff --git a/Crimson/CSharp/Exception/FlatteningException.cs b/Crimson/CSharp/Exceptions/FlatteningException.cs similarity index 55% rename from Crimson/CSharp/Exception/FlatteningException.cs rename to Crimson/CSharp/Exceptions/FlatteningException.cs index 28a5d3d..d7fbc8f 100644 --- a/Crimson/CSharp/Exception/FlatteningException.cs +++ b/Crimson/CSharp/Exceptions/FlatteningException.cs @@ -4,16 +4,16 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Exception +namespace Crimson.CSharp.Exceptions { internal class FlatteningException : ArgumentException { - public FlatteningException(string message) : base (message) + public FlatteningException (string message) : base(message) { } - public FlatteningException(string message, System.Exception cause) : base(message, cause) + public FlatteningException (string message, Exception cause) : base(message, cause) { } diff --git a/Crimson/CSharp/Exception/LexerErrorListener.cs b/Crimson/CSharp/Exceptions/LexerErrorListener.cs similarity index 83% rename from Crimson/CSharp/Exception/LexerErrorListener.cs rename to Crimson/CSharp/Exceptions/LexerErrorListener.cs index 713bacd..3189dac 100644 --- a/Crimson/CSharp/Exception/LexerErrorListener.cs +++ b/Crimson/CSharp/Exceptions/LexerErrorListener.cs @@ -1,12 +1,7 @@ using Antlr4.Runtime; using NLog; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace Crimson.CSharp.Exception +namespace Crimson.CSharp.Exceptions { internal class LexerErrorListener : IAntlrErrorListener { diff --git a/Crimson/CSharp/Exception/LexerException.cs b/Crimson/CSharp/Exceptions/LexerException.cs similarity index 54% rename from Crimson/CSharp/Exception/LexerException.cs rename to Crimson/CSharp/Exceptions/LexerException.cs index 38a16fd..22b92fa 100644 --- a/Crimson/CSharp/Exception/LexerException.cs +++ b/Crimson/CSharp/Exceptions/LexerException.cs @@ -4,16 +4,16 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Exception +namespace Crimson.CSharp.Exceptions { internal class LexerException : ArgumentException { - public LexerException(string message) : base (message) + public LexerException (string message) : base(message) { } - public LexerException(string message, System.Exception cause) : base(message, cause) + public LexerException (string message, Exception cause) : base(message, cause) { } diff --git a/Crimson/CSharp/Exception/LinkingException.cs b/Crimson/CSharp/Exceptions/LinkingException.cs similarity index 54% rename from Crimson/CSharp/Exception/LinkingException.cs rename to Crimson/CSharp/Exceptions/LinkingException.cs index 32328f8..b40daec 100644 --- a/Crimson/CSharp/Exception/LinkingException.cs +++ b/Crimson/CSharp/Exceptions/LinkingException.cs @@ -4,16 +4,16 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Exception +namespace Crimson.CSharp.Exceptions { internal class LinkingException : ArgumentException { - public LinkingException(string message) : base (message) + public LinkingException (string message) : base(message) { } - public LinkingException(string message, System.Exception cause) : base(message, cause) + public LinkingException (string message, Exception cause) : base(message, cause) { } diff --git a/Crimson/CSharp/Exception/ParserErrorStrategy.cs b/Crimson/CSharp/Exceptions/ParserErrorStrategy.cs similarity index 94% rename from Crimson/CSharp/Exception/ParserErrorStrategy.cs rename to Crimson/CSharp/Exceptions/ParserErrorStrategy.cs index 7f340b5..3a81122 100644 --- a/Crimson/CSharp/Exception/ParserErrorStrategy.cs +++ b/Crimson/CSharp/Exceptions/ParserErrorStrategy.cs @@ -6,7 +6,7 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Exception +namespace Crimson.CSharp.Exceptions { internal class ParserErrorStrategy : DefaultErrorStrategy { diff --git a/Crimson/CSharp/Exceptions/StatementParseException.cs b/Crimson/CSharp/Exceptions/StatementParseException.cs new file mode 100644 index 0000000..fcb8566 --- /dev/null +++ b/Crimson/CSharp/Exceptions/StatementParseException.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Exceptions +{ + internal class StatementParseException : ArgumentException + { + public StatementParseException (string message) : base(message) + { + + } + + public StatementParseException (string message, SystemException cause) : base(message, cause) + { + + } + } +} diff --git a/Crimson/CSharp/Exception/UnitGeneratorException.cs b/Crimson/CSharp/Exceptions/UnitGeneratorException.cs similarity index 55% rename from Crimson/CSharp/Exception/UnitGeneratorException.cs rename to Crimson/CSharp/Exceptions/UnitGeneratorException.cs index 55e094f..8731f68 100644 --- a/Crimson/CSharp/Exception/UnitGeneratorException.cs +++ b/Crimson/CSharp/Exceptions/UnitGeneratorException.cs @@ -4,16 +4,16 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Exception +namespace Crimson.CSharp.Exceptions { internal class UnitGeneratorException : FileNotFoundException { - public UnitGeneratorException(string message) : base (message) + public UnitGeneratorException (string message) : base(message) { } - public UnitGeneratorException(string message, System.Exception cause) : base(message, cause) + public UnitGeneratorException (string message, Exception cause) : base(message, cause) { } diff --git a/Crimson/CSharp/Flattening/AbstractAssemblyStatement.cs b/Crimson/CSharp/Flattening/AbstractAssemblyStatement.cs deleted file mode 100644 index dbb7096..0000000 --- a/Crimson/CSharp/Flattening/AbstractAssemblyStatement.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Crimson.CSharp.Assembly -{ - public abstract class AbstractAssemblyStatement - { - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Flattening/FlattenerHelper.cs b/Crimson/CSharp/Flattening/FlattenerHelper.cs deleted file mode 100644 index 3614ceb..0000000 --- a/Crimson/CSharp/Flattening/FlattenerHelper.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Crimson.CSharp.Exception; - -namespace Crimson.CSharp.Flattening -{ - internal class FlattenerHelper - { - private static int branchNameCounter = 0; - public static string GetUniqueBranchName () - { - return $"branch_{branchNameCounter++}"; - } - - private static int resolvableValueFieldNameCounter = 0; - public static string GetUniqueResolvableValueFieldName () - { - return $"rval_{resolvableValueFieldNameCounter++}"; - } - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Flattening/RFASM/RFASMFlattener.cs b/Crimson/CSharp/Flattening/RFASM/RFASMFlattener.cs deleted file mode 100644 index 0cafb1c..0000000 --- a/Crimson/CSharp/Flattening/RFASM/RFASMFlattener.cs +++ /dev/null @@ -1,159 +0,0 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar; -using Crimson.CSharp.Grammar.Statements; -using Crimson.CSharp.Grammar.Tokens; -using NLog; -using System.Text.RegularExpressions; - -namespace Crimson.CSharp.Assembly.RFASM -{ - internal class RFASMFlattener : IFlattener - { - private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - - public AbstractAssemblyProgram Flatten (Compilation compilation) - { - RFASMProgram program = new RFASMProgram(); - - Dictionary functions = new Dictionary(); - Dictionary structures = new Dictionary(); - Dictionary variables = new Dictionary(); - - /* - * Create 3 universal lists which contain all of the statements. - * These have already been dynamically mapped (they know which singletons each call refers to). - * During collection, these values are reassigned names (which are globally updated) to avoid name clashes. - */ - foreach (KeyValuePair pair in compilation.Library.Units) - { - foreach (var f in pair.Value.Functions) - { - FixNameAndAdd(functions, f.Value); - } - foreach (var s in pair.Value.Structures) - { - FixNameAndAdd(structures, s.Value); - } - foreach (var g in pair.Value.GlobalVariables) - { - FixNameAndAdd(variables, g.Value); - } - } - - // Add versioning and credits - program.Add(new RFASMComment("This CrimsonBasic program was automatically generated by the Crimson compiler.")); - program.Add(new RFASMComment("Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x")); - program.Add(new RFASMComment("Crimson version " + Core.Crimson.VERSION)); - program.Add(new RFASMComment("Crimson, CrimsonBasic and RedFoxAssembly are parts of GamesMaster3000X's RedFoxVirtualMachine.")); - program.Add(new RFASMComment("The main repository for this project can be found at: https://github.com/gamesmaster3000x/RF_ASM")); - program.Add(new RFASMComment("Crimson, CrimsonBasic and RedFoxAssembly were implemented by me, GenElectrovise.")); - program.Add(new RFASMComment("My development fork of the project can be found at: https://github.com/GenElectrovise/RF_ASM")); - program.Add(new RFASMComment("")); - - // Add global variables - program.Add(new RFASMComment("")); - program.Add(new RFASMComment("============================== Global Variables ==============================")); - foreach (var pair in variables) - { - Fragment bs = pair.Value.GetCrimsonBasic(); - program.Add(bs); - LOGGER.Debug($"Added GlobalVariable {pair.Value.Assignment.Name}"); - } - - // Add structures - program.Add(new RFASMComment("")); - program.Add(new RFASMComment("(Structures shouldn't be a part of CB)")); - program.Add(new RFASMComment("============================== Structures ==============================")); - foreach (var pair in structures) - { - Fragment bs = pair.Value.GetCrimsonBasic(); - program.Add(bs); - LOGGER.Debug($"Added Structure {pair.Value.Name}"); - } - - // Add main (entry) function - program.Add(new RFASMComment("")); - program.Add(new RFASMComment("============================== Entry Function ==============================")); - FunctionCStatement entry = GetEntryFunction(compilation); - LOGGER.Info($"Found entry Function {entry.Name}"); - Fragment entryBs = entry.GetCrimsonBasic(); - program.Add(entryBs); - LOGGER.Debug($"Added entry Function {entry.Name}"); - - // Add remaining functions - program.Add(new RFASMComment("")); - program.Add(new RFASMComment("============================== Functions ==============================")); - foreach (var pair in functions) - { - if (pair.Value == entry) continue; - Fragment bs = pair.Value.GetCrimsonBasic(); - program.Add(bs); - LOGGER.Debug($"Added Function {pair.Value.Name}"); - } - - return program; - } - - - private FunctionCStatement GetEntryFunction (Compilation compilation) - { - string baseName = Core.Crimson.Options.EntryFunctionName; - Scope rootUnit = compilation.GetRootUnit(); - string pattern = $"^func_{baseName}_[0-9]+$"; // Match name_090923 (anchored to start and end) - Regex regex = new Regex(pattern); - - IList funcs = rootUnit.Functions.Values.Where(func => regex.IsMatch(func.Name.ToString())).ToList(); - 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 '{Core.Crimson.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 : INamed - { - int i = 0; - string prefix = GetFlattenedPrefix(gs.GetType()); - while (map.ContainsKey(gs.GetName() + "_" + i)) - { - i++; - } - gs.SetName(new FullNameCToken($"{prefix}_{gs.GetName()}_{i}")); - map.Add(gs.GetName().ToString(), gs); - } - - private string GetFlattenedPrefix (System.Type type) - { - if (type == typeof(FunctionCStatement)) - { - return "func"; - } - if (type == typeof(StructureCStatement)) - { - return "stru"; - } - if (type == typeof(GlobalVariableCStatement)) - { - return "gvar"; - } - if (type == typeof(ScopeVariableCStatement)) - { - return "ivar"; - } - return ""; - } - } -} diff --git a/Crimson/CSharp/Flattening/RFASM/RFASMStatement.cs b/Crimson/CSharp/Flattening/RFASM/RFASMStatement.cs deleted file mode 100644 index 79ea3d4..0000000 --- a/Crimson/CSharp/Flattening/RFASM/RFASMStatement.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Assembly.RFASM -{ - public class RFASMStatement : AbstractAssemblyStatement - { - } -} diff --git a/Crimson/CSharp/Generalising/GeneralAssemblyProgram.cs b/Crimson/CSharp/Generalising/GeneralAssemblyProgram.cs new file mode 100644 index 0000000..558bb6b --- /dev/null +++ b/Crimson/CSharp/Generalising/GeneralAssemblyProgram.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Generalising +{ + public class GeneralAssemblyProgram + { + private List Structures { get; set; } + + public void AddStructure (IGeneralAssemblyStructure structure) + { + Structures.Add(structure); + } + } +} diff --git a/Crimson/CSharp/Generalising/GeneralisationContext.cs b/Crimson/CSharp/Generalising/GeneralisationContext.cs new file mode 100644 index 0000000..68f1b29 --- /dev/null +++ b/Crimson/CSharp/Generalising/GeneralisationContext.cs @@ -0,0 +1,29 @@ +namespace Crimson.CSharp.Generalising +{ + public class GeneralisationContext + { + private HashSet Subroutines { get; set; } = new HashSet(); + + public string CheckUniqueSubroutine (string sub) + { + if (!Subroutines.Add(sub)) throw new DuplicateNameException($"Cannot add second subroutine with name {sub} to GeneralisationContext."); + return sub; + } + + private int _globalAllocationHead = 0; + public int AllocGlobal (int size) + { + int addr = _globalAllocationHead; + _globalAllocationHead += size; + return addr; + } + + public class DuplicateNameException : Exception + { + public DuplicateNameException (string msg) : base(msg) + { + } + } + + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Generaliser.cs b/Crimson/CSharp/Generalising/Generaliser.cs new file mode 100644 index 0000000..6db6386 --- /dev/null +++ b/Crimson/CSharp/Generalising/Generaliser.cs @@ -0,0 +1,135 @@ +using Crimson.CSharp.Core; +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; +using Crimson.CSharp.Parsing; +using Crimson.CSharp.Parsing.Statements; +using Crimson.CSharp.Parsing.Tokens; +using NLog; +using System.Text.RegularExpressions; + +namespace Crimson.CSharp.Generalising +{ + internal class Generaliser + { + private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); + + public GeneralAssemblyProgram Generalise (Compilation compilation) + { + GeneralAssemblyProgram program = new GeneralAssemblyProgram(); + + GeneralisationContext context = new GeneralisationContext(); + + Dictionary functions = new Dictionary(); + Dictionary structures = new Dictionary(); + Dictionary variables = new Dictionary(); + + /* + * Create 3 universal lists which contain all of the statements. + * These have already been dynamically mapped (they know which singletons each call refers to). + * During collection, these values are reassigned names (which are globally updated) to avoid name clashes. + */ + foreach (KeyValuePair pair in compilation.Library.Units) + { + foreach (var f in pair.Value.Functions) + { + FixNameAndAdd(functions, f.Value); + } + foreach (var s in pair.Value.Structures) + { + FixNameAndAdd(structures, s.Value); + } + foreach (var g in pair.Value.GlobalVariables) + { + FixNameAndAdd(variables, g.Value); + } + } + + // Add versioning and credits + program.AddStructure(new CommentAssemblyStructure("This CrimsonBasic program was automatically generated by the Crimson compiler.")); + program.AddStructure(new CommentAssemblyStructure("Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x")); + program.AddStructure(new CommentAssemblyStructure("Crimson version " + Core.Crimson.VERSION)); + program.AddStructure(new CommentAssemblyStructure("Crimson, CrimsonBasic and RedFoxAssembly are parts of GamesMaster3000X's RedFoxVirtualMachine.")); + program.AddStructure(new CommentAssemblyStructure("The main repository for this project can be found at: https://github.com/gamesmaster3000x/RF_ASM")); + program.AddStructure(new CommentAssemblyStructure("Crimson, CrimsonBasic and RedFoxAssembly were implemented by me, GenElectrovise.")); + program.AddStructure(new CommentAssemblyStructure("My development fork of the project can be found at: https://github.com/GenElectrovise/RF_ASM")); + program.AddStructure(new CommentAssemblyStructure("")); + + // Add global variables + program.AddStructure(new CommentAssemblyStructure("")); + program.AddStructure(new CommentAssemblyStructure("============================== Global Variables ==============================")); + foreach (var pair in variables) + { + IGeneralAssemblyStructure bs = pair.Value.Generalise(context); + program.AddStructure(bs); + LOGGER.Debug($"Added GlobalVariable {pair.Value.Assignment.Name}"); + } + + // Add structures + program.AddStructure(new CommentAssemblyStructure("")); + program.AddStructure(new CommentAssemblyStructure("(Structures shouldn't be a part of CB)")); + program.AddStructure(new CommentAssemblyStructure("============================== Structures ==============================")); + foreach (var pair in structures) + { + IGeneralAssemblyStructure bs = pair.Value.Generalise(context); + program.AddStructure(bs); + LOGGER.Debug($"Added Structure {pair.Value.Name}"); + } + + // Add main (entry) function + program.AddStructure(new CommentAssemblyStructure("")); + program.AddStructure(new CommentAssemblyStructure("============================== Entry Function ==============================")); + FunctionCStatement entry = compilation.GetEntryFunction(); + LOGGER.Info($"Found entry Function {entry.Name}"); + IGeneralAssemblyStructure entryBs = entry.Generalise(context); + program.AddStructure(entryBs); + LOGGER.Debug($"Added entry Function {entry.Name}"); + + // Add remaining functions + program.AddStructure(new CommentAssemblyStructure("")); + program.AddStructure(new CommentAssemblyStructure("============================== Functions ==============================")); + foreach (var pair in functions) + { + if (pair.Value == entry) continue; + IGeneralAssemblyStructure bs = pair.Value.Generalise(context); + program.AddStructure(bs); + LOGGER.Debug($"Added Function {pair.Value.Name}"); + } + + return program; + } + + private void FixNameAndAdd (Dictionary map, GS gs) where GS : INamed + { + int i = 0; + string prefix = GetFlattenedPrefix(gs.GetType()); + while (map.ContainsKey(gs.GetName() + "_" + i)) + { + i++; + } + gs.SetName(new FullNameCToken($"{prefix}_{gs.GetName()}_{i}")); + map.Add(gs.GetName().ToString(), gs); + } + + private string GetFlattenedPrefix (Type type) + { + if (type == typeof(FunctionCStatement)) + { + return "func"; + } + if (type == typeof(StructureCStatement)) + { + return "stru"; + } + if (type == typeof(GlobalVariableCStatement)) + { + return "gvar"; + } + if (type == typeof(ScopeVariableCStatement)) + { + return "ivar"; + } + return ""; + } + } +} diff --git a/Crimson/CSharp/Generalising/IGeneralAssemblyStructure.cs b/Crimson/CSharp/Generalising/IGeneralAssemblyStructure.cs new file mode 100644 index 0000000..4c5b020 --- /dev/null +++ b/Crimson/CSharp/Generalising/IGeneralAssemblyStructure.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Generalising +{ + public interface IGeneralAssemblyStructure + { + public IEnumerable GetSubStructures (); + } +} diff --git a/Crimson/CSharp/Generalising/Structures/ArbitraryAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/ArbitraryAssemblyStructure.cs new file mode 100644 index 0000000..0e2c948 --- /dev/null +++ b/Crimson/CSharp/Generalising/Structures/ArbitraryAssemblyStructure.cs @@ -0,0 +1,22 @@ +namespace Crimson.CSharp.Generalising.Structures +{ + public class ArbitraryAssemblyStructure : IGeneralAssemblyStructure + { + public string Text { get; protected set; } + + public ArbitraryAssemblyStructure (string text) + { + Text = text; + } + + public override string ToString () + { + return Text; + } + + public IEnumerable GetSubStructures () + { + return Enumerable.Empty(); + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/CommentAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/CommentAssemblyStructure.cs new file mode 100644 index 0000000..bcf0ba3 --- /dev/null +++ b/Crimson/CSharp/Generalising/Structures/CommentAssemblyStructure.cs @@ -0,0 +1,31 @@ +using Crimson.CSharp.Generalising; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Generalising.Structures +{ + public class CommentAssemblyStructure : IGeneralAssemblyStructure + { + private string _text; + + public CommentAssemblyStructure (string text) + { + _text = text; + } + + public IEnumerable GetSubStructures () + { + return Enumerable.Empty(); + } + + public override string ToString () + { + if (_text.Equals("") || _text.StartsWith("//")) return _text; + return "// " + _text; + } + } +} diff --git a/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs new file mode 100644 index 0000000..450688d --- /dev/null +++ b/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs @@ -0,0 +1,30 @@ +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Parsing.Statements; +using Crimson.CSharp.Specialising; + +namespace Crimson.CSharp.Generalising.Structures +{ + /// + /// A constant value in the assembly, for example: + /// (RFASM) .WORD data + /// The clue is in the name: this value DOES NOT CHANGE. It is resolved HERE AND NOW - NO DEFERRING - so it needs to be VERY SIMPLE AND SMALL. + /// + public class ConstantAssemblyStructure : IGeneralAssemblyStructure + { + public GeneralisationContext Context { get; private set; } + public string Name { get; private set; } + public string Value { get; private set; } + + public ConstantAssemblyStructure (GeneralisationContext context, string name, string value) + { + Context = context; + Name = name; + Value = value; + } + + IEnumerable IGeneralAssemblyStructure.GetSubStructures () + { + return Enumerable.Empty(); + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/EmptyAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/EmptyAssemblyStructure.cs new file mode 100644 index 0000000..24f34b3 --- /dev/null +++ b/Crimson/CSharp/Generalising/Structures/EmptyAssemblyStructure.cs @@ -0,0 +1,14 @@ +namespace Crimson.CSharp.Generalising.Structures +{ + public class EmptyAssemblyStructure : IGeneralAssemblyStructure + { + public EmptyAssemblyStructure () + { + } + + public IEnumerable GetSubStructures () + { + return Enumerable.Empty(); + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/IndentAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/IndentAssemblyStructure.cs new file mode 100644 index 0000000..d4c079d --- /dev/null +++ b/Crimson/CSharp/Generalising/Structures/IndentAssemblyStructure.cs @@ -0,0 +1,27 @@ +namespace Crimson.CSharp.Generalising.Structures +{ + public class IndentAssemblyStructure : IGeneralAssemblyStructure + { + public int Indent { get; set; } + + public IndentAssemblyStructure (int indent) + { + Indent = indent; + } + + public List? GetSubStructures () + { + return null; + } + + public override string ToString () + { + return null!; + } + + IEnumerable IGeneralAssemblyStructure.GetSubStructures () + { + return Enumerable.Empty(); + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs new file mode 100644 index 0000000..3672fff --- /dev/null +++ b/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs @@ -0,0 +1,22 @@ +namespace Crimson.CSharp.Generalising.Structures +{ + public class JumpAssemblyStructure : IGeneralAssemblyStructure + { + public string Target { get; protected set; } + + public JumpAssemblyStructure (string target) + { + Target = target; + } + + public override string ToString () + { + return Target; + } + + public IEnumerable GetSubStructures () + { + return Enumerable.Empty(); + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs new file mode 100644 index 0000000..13b10f2 --- /dev/null +++ b/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs @@ -0,0 +1,22 @@ +namespace Crimson.CSharp.Generalising.Structures +{ + public class LabelAssemblyStructure : IGeneralAssemblyStructure + { + public string Text { get; protected set; } + + public LabelAssemblyStructure (string name) + { + Text = name; + } + + public override string ToString () + { + return Text; + } + + public IEnumerable GetSubStructures () + { + return Enumerable.Empty(); + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs new file mode 100644 index 0000000..3e4eed6 --- /dev/null +++ b/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs @@ -0,0 +1,14 @@ +namespace Crimson.CSharp.Generalising.Structures +{ + public class ReturnAssemblyStructure : IGeneralAssemblyStructure + { + public ReturnAssemblyStructure () + { + } + + public IEnumerable GetSubStructures () + { + return Enumerable.Empty(); + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs new file mode 100644 index 0000000..d3b3f3a --- /dev/null +++ b/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs @@ -0,0 +1,21 @@ +namespace Crimson.CSharp.Generalising.Structures +{ + internal class ScopeAssemblyStructure : IGeneralAssemblyStructure + { + public List Structures { get; private set; } + + public ScopeAssemblyStructure () + { + } + + internal void AddSubStructure (IGeneralAssemblyStructure labelAssemblyStructure) + { + Structures.Add(labelAssemblyStructure); + } + + IEnumerable IGeneralAssemblyStructure.GetSubStructures () + { + return Structures; + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs new file mode 100644 index 0000000..b60d69f --- /dev/null +++ b/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs @@ -0,0 +1,40 @@ +using System.Xml.Linq; + +namespace Crimson.CSharp.Generalising.Structures +{ + internal class SubroutineAssemblyStructure : IGeneralAssemblyStructure + { + public string Name { get; private set; } + + private List Structures { get; set; } + + public string EndName + { + get => $"end_{Name}"; + private set { } + } + + public SubroutineAssemblyStructure (GeneralisationContext context, string name) + { + Name = context.CheckUniqueSubroutine(name); + _ = context.CheckUniqueSubroutine(EndName); + Structures = new List(); + } + + public void AddSubStructure (IGeneralAssemblyStructure labelAssemblyStructure) + { + Structures.Add(labelAssemblyStructure); + } + + IEnumerable IGeneralAssemblyStructure.GetSubStructures () + { + return Structures // inner sub structures + .Prepend(new CommentAssemblyStructure(Name)) // // NAME + .Prepend(new JumpAssemblyStructure(EndName)) // JMP _END_NAME_ + .Prepend(new LabelAssemblyStructure(Name)) // ::__NAME__:: + .Append(new LabelAssemblyStructure(EndName)) // ::__END_NAME__:: + .Append(new CommentAssemblyStructure("")) // // (newline) + .ToList(); + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Linking/Linker.cs b/Crimson/CSharp/Linking/Linker.cs index d883867..a40f1a9 100644 --- a/Crimson/CSharp/Linking/Linker.cs +++ b/Crimson/CSharp/Linking/Linker.cs @@ -1,10 +1,7 @@ -using Antlr4.Runtime.Misc; -using Crimson.CSharp.Core; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar; -using Crimson.CSharp.Grammar.Statements; +using Crimson.CSharp.Core; +using Crimson.CSharp.Parsing; +using Crimson.CSharp.Parsing.Statements; using NLog; -using System.Linq; namespace Crimson.CSharp.Linking { @@ -16,7 +13,7 @@ internal class Linker private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); public CrimsonOptions Options { get; } - public Linker(CrimsonOptions options) + public Linker (CrimsonOptions options) { Options = options; } @@ -25,7 +22,7 @@ public Linker(CrimsonOptions options) /// Links the FunctionCalls in a Compilation. /// /// - public void Link(Compilation compilation) + public void Link (Compilation compilation) { LOGGER.Info("Linking compilation " + compilation); @@ -49,7 +46,7 @@ public void Link(Compilation compilation) return; } - private static List GetAllStatements(Scope unit) + private static List GetAllStatements (Scope unit) { var statements = new List(); foreach (var s in unit.Functions.Values) diff --git a/Crimson/CSharp/Linking/LinkerHelper.cs b/Crimson/CSharp/Linking/LinkerHelper.cs index 6cdc8ee..72db80d 100644 --- a/Crimson/CSharp/Linking/LinkerHelper.cs +++ b/Crimson/CSharp/Linking/LinkerHelper.cs @@ -1,7 +1,7 @@ -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar; -using Crimson.CSharp.Grammar.Statements; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Parsing; +using Crimson.CSharp.Parsing.Statements; +using Crimson.CSharp.Parsing.Tokens; namespace Crimson.CSharp.Linking { diff --git a/Crimson/CSharp/Linking/LinkingContext.cs b/Crimson/CSharp/Linking/LinkingContext.cs index b984f4c..8f41447 100644 --- a/Crimson/CSharp/Linking/LinkingContext.cs +++ b/Crimson/CSharp/Linking/LinkingContext.cs @@ -1,7 +1,6 @@ using Crimson.CSharp.Core; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar; -using Crimson.CSharp.Grammar.Statements; +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Parsing; namespace Crimson.CSharp.Linking { @@ -12,7 +11,7 @@ public class LinkingContext internal Dictionary Links { get; private set; } public Compilation Compilation { get; private set; } - public LinkingContext(Scope currentScope, Dictionary links, Compilation compilation) + public LinkingContext (Scope currentScope, Dictionary links, Compilation compilation) { CurrentScope = currentScope; Links = links; @@ -30,7 +29,7 @@ public LinkingContext(Scope currentScope, Dictionary links, Compi /// be affected by edits to the new context's links. /// /// - public LinkingContext(Scope currentScope, LinkingContext ctx) + public LinkingContext (Scope currentScope, LinkingContext ctx) { CurrentScope = currentScope; @@ -43,12 +42,12 @@ public LinkingContext(Scope currentScope, LinkingContext ctx) } } - public bool HasScope(string alias) + public bool HasScope (string alias) { return Links.ContainsKey(alias); } - internal Scope GetScope(string alias) + internal Scope GetScope (string alias) { if (HasScope(alias)) { @@ -58,7 +57,7 @@ internal Scope GetScope(string alias) throw new LinkingException("No alias '" + alias + "' in " + ToString()); } - public override string ToString() + public override string ToString () { return $"LinkingContext (scope:{CurrentScope}; links:[{string.Join(",", Links)}])"; } diff --git a/Crimson/CSharp/Parsing/IHasScope.cs b/Crimson/CSharp/Parsing/IHasScope.cs index 06668ae..7829460 100644 --- a/Crimson/CSharp/Parsing/IHasScope.cs +++ b/Crimson/CSharp/Parsing/IHasScope.cs @@ -1,6 +1,4 @@ -using Crimson.CSharp.Grammar.Statements; - -namespace Crimson.CSharp.Grammar +namespace Crimson.CSharp.Parsing { internal interface IHasScope { diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs index b44f19a..a2a8693 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -1,11 +1,12 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Core; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar.Statements; +using Crimson.CSharp.Core; +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Statements; using NLog; -namespace Crimson.CSharp.Grammar +namespace Crimson.CSharp.Parsing { /// /// An unlinked collection of statements which is the direct result of the parsing of a Crimson source file. A Linker may be used to convert this into a LinkedUnit. @@ -22,10 +23,8 @@ public string Name { get { - if (String.IsNullOrWhiteSpace(_name)) - { + if (string.IsNullOrWhiteSpace(_name)) return Parent == null ? "(root)" : "(anon)"; - } return _name; } set => _name = value; @@ -58,23 +57,18 @@ public Scope GetRoot () { Scope parent = GetParent(); do - { parent = parent.GetParent(); - } while (parent.HasParent()); + while (parent.HasParent()); return parent; } public string GetPath () { - if (!String.IsNullOrWhiteSpace(_path)) - { + if (!string.IsNullOrWhiteSpace(_path)) return _path; - } if (HasParent()) - { return GetParent().GetPath(); - } throw new NullReferenceException($"Scope tree has no associated path: {FamilyToString()}"); } @@ -126,7 +120,7 @@ void AddNamedIfNotDuplicate (Dictionary d, GCS gcs, string typ { if (d == null) throw new ArgumentNullException($"Cannot pass null {typeof(Dictionary)} for statement adding."); if (gcs == null) throw new ArgumentNullException($"Cannot pass null {typeof(GCS)} for statement adding."); - if (String.IsNullOrWhiteSpace(typeNameForError)) throw new ArgumentNullException("Cannot pass null or whitespace type name for statement adding."); + if (string.IsNullOrWhiteSpace(typeNameForError)) throw new ArgumentNullException("Cannot pass null or whitespace type name for statement adding."); if (d.ContainsKey(gcs.GetName().ToString())) throw new StatementParseException($"Duplicate GlobalStatement name '{gcs.GetName()}' for statement '{statement}' in unit: {this}"); string name = gcs.GetName().ToString(); @@ -139,16 +133,12 @@ void AddNamedIfNotDuplicate (Dictionary d, GCS gcs, string typ scopeStatement.GetScope().Parent = this; if (statement is INamed namedStatement) - { scopeStatement.GetScope().Name = namedStatement.GetName().ToString(); - } } // Special cases if (statement is FunctionCStatement f) - { AddNamedIfNotDuplicate(Functions, f, "Function"); - } else if (statement is GlobalVariableCStatement g) AddNamedIfNotDuplicate(GlobalVariables, g, "Global Variable"); else if (statement is StructureCStatement s) AddNamedIfNotDuplicate(Structures, s, "Structure"); else if (statement is Scope sc) @@ -204,9 +194,7 @@ public override void Link (LinkingContext ctx) Dictionary dictionary = GetLinks(newContext.Compilation); foreach (var link in dictionary) - { newContext.Links.Add(link.Key, link.Value); - } foreach (var d in Delegates) { @@ -221,16 +209,14 @@ public override void Link (LinkingContext ctx) } } - public override Fragment GetCrimsonBasic () + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - Fragment scopeFrag = new Fragment(1); + ScopeAssemblyStructure structure = new ScopeAssemblyStructure(); foreach (var d in Delegates) - { - scopeFrag.Add(d.Invoke().GetCrimsonBasic()); - } + structure.AddSubStructure(d.Invoke().Generalise(context)); - return scopeFrag; + return structure; } public override string ToString () diff --git a/Crimson/CSharp/Parsing/ScopeVisitor.cs b/Crimson/CSharp/Parsing/ScopeVisitor.cs index 037d7a0..c3e9be1 100644 --- a/Crimson/CSharp/Parsing/ScopeVisitor.cs +++ b/Crimson/CSharp/Parsing/ScopeVisitor.cs @@ -1,11 +1,10 @@ using Antlr4.Runtime.Misc; using Crimson.AntlrBuild; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar; -using Crimson.CSharp.Grammar.Statements; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Parsing.Statements; +using Crimson.CSharp.Parsing.Tokens; using NLog; -using static Crimson.CSharp.Grammar.Tokens.Comparator; +using static Crimson.CSharp.Parsing.Tokens.Comparator; namespace Crimson.CSharp.Parsing { @@ -263,8 +262,9 @@ public override WhileBlockCStatement VisitWhileBlock ([NotNull] CrimsonParser.Wh public override VariableAssignmentCStatement VisitAssignVariableDirect ([NotNull] CrimsonParser.AssignVariableDirectContext context) { FullNameCToken identifier = new FullNameCToken(context.name.Text); - if (context.simple != null) return new VariableAssignmentCStatement(identifier, VisitSimpleValue(context.simple)); - else if (context.complex != null) return new VariableAssignmentCStatement(identifier, VisitComplexValue(context.complex)); + SimpleValueCToken size = VisitDatasize(context.size); + if (context.simple != null) return new VariableAssignmentCStatement(identifier, size, VisitSimpleValue(context.simple)); + else if (context.complex != null) return new VariableAssignmentCStatement(identifier, size, VisitComplexValue(context.complex)); else throw new CrimsonParserException($"Cannot assign no value to variable {identifier}"); } @@ -272,8 +272,9 @@ public override VariableAssignmentCStatement VisitAssignVariableAtPointer ([NotN { //TODO AssignVariableAtPointer just adds an asterisk to the variable name FullNameCToken identifier = new FullNameCToken(context.name.Text); - if (context.simple != null) return new VariableAssignmentCStatement(identifier, VisitSimpleValue(context.simple)); - else if (context.complex != null) return new VariableAssignmentCStatement(identifier, VisitComplexValue(context.complex)); + SimpleValueCToken size = VisitDatasize(context.size); + if (context.simple != null) return new VariableAssignmentCStatement(identifier, size, VisitSimpleValue(context.simple)); + else if (context.complex != null) return new VariableAssignmentCStatement(identifier, size, VisitComplexValue(context.complex)); else throw new CrimsonParserException($"Cannot assign no value to variable {identifier}"); } diff --git a/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs b/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs index 50340a3..e74969e 100644 --- a/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs @@ -1,8 +1,7 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Generalising; using Crimson.CSharp.Linking; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { /// /// A collection of ICrimsonTokens which make a coherent "phrase". @@ -11,8 +10,8 @@ public abstract class AbstractCrimsonStatement { public bool Linked { get; set; } - public abstract void Link (LinkingContext ctx); + public abstract void Link (LinkingContext context); - public abstract Fragment GetCrimsonBasic (); + public abstract IGeneralAssemblyStructure Generalise (GeneralisationContext context); } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs b/Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs index fe09f02..7462200 100644 --- a/Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs @@ -1,7 +1,9 @@ -using Crimson.CSharp.Assembly; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { internal class AssemblyCallCStatement : AbstractCrimsonStatement { @@ -12,11 +14,10 @@ public AssemblyCallCStatement (string assemblyText) this.assemblyText = assemblyText; } - public override Fragment GetCrimsonBasic () + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - Fragment f = new Fragment(0); - f.Add(new AssemblyBStatement(assemblyText)); - return f; + ArbitraryAssemblyStructure structure = new ArbitraryAssemblyStructure(assemblyText); + return structure; } public override void Link (LinkingContext ctx) diff --git a/Crimson/CSharp/Parsing/Statements/BasicCallCStatement.cs b/Crimson/CSharp/Parsing/Statements/BasicCallCStatement.cs index 4d2e492..dc5ca1f 100644 --- a/Crimson/CSharp/Parsing/Statements/BasicCallCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/BasicCallCStatement.cs @@ -1,7 +1,8 @@ -using Crimson.CSharp.Assembly; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { internal class BasicCallCStatement : AbstractCrimsonStatement { @@ -11,16 +12,15 @@ public BasicCallCStatement (string assemblyText) { AssemblyText = assemblyText; } - - public override Fragment GetCrimsonBasic () - { - Fragment f = new Fragment(0); - f.Add(new ArbitraryBStatement(AssemblyText)); - return f; - } public override void Link (LinkingContext ctx) { Linked = true; } + + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) + { + ArbitraryAssemblyStructure structure = new ArbitraryAssemblyStructure(AssemblyText); + return structure; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs b/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs index 860674f..2d01a87 100644 --- a/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs @@ -1,8 +1,10 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { /// /// A function, defined with the function keyword. Is a member of a package. @@ -31,25 +33,21 @@ public override void Link (LinkingContext ctx) Linked = true; } - public override Fragment GetCrimsonBasic () + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - Fragment function = new Fragment(0); + string uniqueName = context.CheckUniqueSubroutine(Name.ToString()); + string uniqueNameEnd = context.CheckUniqueSubroutine(Name.ToString()); - Fragment functionHead = new Fragment(0); - functionHead.Add(new LabelBStatement(Name.ToString())); + SubroutineAssemblyStructure subroutine = new SubroutineAssemblyStructure(context, uniqueName); - Fragment functionBody = new Fragment(1); - functionBody.Add(Scope.GetCrimsonBasic()); + subroutine.AddSubStructure(new CommentAssemblyStructure(uniqueName)); + subroutine.AddSubStructure(new JumpAssemblyStructure(uniqueNameEnd)); + subroutine.AddSubStructure(new LabelAssemblyStructure(uniqueName)); + subroutine.AddSubStructure(Scope.Generalise(context)); + subroutine.AddSubStructure(new LabelAssemblyStructure(uniqueNameEnd)); + subroutine.AddSubStructure(new CommentAssemblyStructure("")); - Fragment functionFoot = new Fragment(0); - functionFoot.Add(new ReturnBStatement()); - functionFoot.Add(new CommentBStatement("")); - - function.Add(functionHead); - function.Add(functionBody); - function.Add(functionFoot); - - return function; + return subroutine; } public FullNameCToken GetName () @@ -100,9 +98,7 @@ void ICrimsonToken.Link (LinkingContext ctx) { Identifier = LinkerHelper.LinkIdentifier(Identifier, ctx); foreach (var p in Parameters) - { ((ICrimsonToken) p).Link(ctx); - } } } } diff --git a/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs b/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs index 35e4806..f99747e 100644 --- a/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs @@ -1,9 +1,10 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Tokens; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { public class FunctionCallCStatement : AbstractCrimsonStatement { @@ -30,10 +31,10 @@ public FunctionCallCStatement (FullNameCToken identifier, IList /// - public override Fragment GetCrimsonBasic () + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - Fragment f = new Fragment(0); - f.Add(new CommentBStatement("FC start")); + ScopeAssemblyStructure scope = new ScopeAssemblyStructure(); + scope.AddSubStructure(new CommentAssemblyStructure("FC start")); // Allocate space for input/output //int inputSize = CalculateInputBufferSize(); @@ -50,10 +51,10 @@ public override Fragment GetCrimsonBasic () //f.Add(new IncSpBStatement(total)); // Jump to subroutine - f.Add(new JumpSubBStatement(targetFunction!.Name.ToString())); + scope.AddSubStructure(new JumpAssemblyStructure(targetFunction!.Name.ToString())); - f.Add(new CommentBStatement("FC end")); - return f; + scope.AddSubStructure(new CommentAssemblyStructure("FC end")); + return scope; } public override void Link (LinkingContext ctx) @@ -63,9 +64,7 @@ public override void Link (LinkingContext ctx) targetFunction = LinkerHelper.LinkFunctionCall(identifier, ctx); foreach (var a in arguments) - { a.Link(ctx); - } Linked = true; } diff --git a/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs b/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs index 427d1fe..0b6cf1e 100644 --- a/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs @@ -1,9 +1,10 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Tokens; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { /// /// A uhm... global variable... Is a member of a package, rather than a function. @@ -29,28 +30,22 @@ public void SetName (FullNameCToken name) Assignment.Name = name; } - public override Fragment GetCrimsonBasic () + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - Fragment statements = new Fragment(0); + ScopeAssemblyStructure scope = new ScopeAssemblyStructure(); // int i = (6 + 5); if (Assignment.Complex != null) { - Fragment valueStatements = Assignment.Complex.GetBasicFragment(); - statements.Add(valueStatements); - statements.Add(new SetBStatement(Assignment.Name.ToString(), -1, valueStatements.ResultHolder!)); - + // Fragment valueStatements = Assignment.Complex.GetBasicFragment(); + scope.AddSubStructure(new CommentAssemblyStructure($"Set {Assignment.Name.ToString()}=RESULT")); } else if (Assignment.Simple != null) - { - statements.Add(new SetBStatement(Assignment.Name.ToString(), -1, Assignment.Simple.GetText())); - } + scope.AddSubStructure(new CommentAssemblyStructure($"Assign {Assignment.Name.ToString()}={Assignment.Simple.GetText()}")); else - { throw new FlatteningException("Unable to flatten internal variable with no simple or complex value"); - } - return statements; + return scope; } } } diff --git a/Crimson/CSharp/Parsing/Statements/INamed.cs b/Crimson/CSharp/Parsing/Statements/INamed.cs index cc9b1e1..9051e37 100644 --- a/Crimson/CSharp/Parsing/Statements/INamed.cs +++ b/Crimson/CSharp/Parsing/Statements/INamed.cs @@ -1,7 +1,7 @@ using Crimson.CSharp.Core; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Parsing.Tokens; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { /// /// A collection of ICrimsonTokens which make a coherent "phrase". diff --git a/Crimson/CSharp/Parsing/Statements/IfBlockCStatement.cs b/Crimson/CSharp/Parsing/Statements/IfBlockCStatement.cs index d98df59..d16192b 100644 --- a/Crimson/CSharp/Parsing/Statements/IfBlockCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/IfBlockCStatement.cs @@ -1,9 +1,10 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Flattening; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { internal class IfBlockCStatement : AbstractCrimsonStatement, IHasScope { @@ -56,40 +57,30 @@ public override void Link (LinkingContext ctx) * (3) * :END_IF */ - public override Fragment GetCrimsonBasic () + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - Fragment wholeBlock = new Fragment(0); - - wholeBlock.Add(new CommentBStatement("")); + ScopeAssemblyStructure scope = new ScopeAssemblyStructure(); + scope.AddSubStructure(new CommentAssemblyStructure("")); // If // Condition - Fragment condition = Condition.GetCrimsonBasic(); - Fragment ifHead = new Fragment(0); - string uniqueBranchName = FlattenerHelper.GetUniqueBranchName(); + string uniqueBranchName = "IF_BLOCK_UNIQUE_BRANCH_NAME"; string endLabelName = "END_" + uniqueBranchName; - ifHead.Add(new JumpEqualBStatement(condition.ResultHolder!, "0", "NEXT_ELIF")); - Fragment ifBody = new Fragment(1); - ifBody.Add(Scope.GetCrimsonBasic()); - Fragment ifFoot = new Fragment(1); - ifFoot.Add(new JumpBStatement(endLabelName)); - - wholeBlock.Add(condition); - wholeBlock.Add(ifHead); - wholeBlock.Add(ifBody); - wholeBlock.Add(ifFoot); + scope.AddSubStructure(new JumpAssemblyStructure("NEXT_ELIF")); + scope.AddSubStructure(Scope.Generalise(context)); + scope.AddSubStructure(new JumpAssemblyStructure(endLabelName)); // Elif and/or Else - if (ElifBlock != null) - wholeBlock.Add(ElifBlock.GetCrimsonBasic()); + /*if (ElifBlock != null) + scope.AddSubStructure(ElifBlock.G()); else if (ElseBlock != null) - wholeBlock.Add(ElseBlock.GetCrimsonBasic()); + scope.AddSubStructure(ElseBlock.GetCrimsonBasic());*/ // End of if - wholeBlock.Add(new LabelBStatement(endLabelName)); - wholeBlock.Add(new CommentBStatement("")); + scope.AddSubStructure(new LabelAssemblyStructure(endLabelName)); + scope.AddSubStructure(new CommentAssemblyStructure("")); - return wholeBlock; + return scope; } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs index b321caf..a06c9f4 100644 --- a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs @@ -1,7 +1,7 @@ -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Parsing.Tokens; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { public class ImportCStatement { diff --git a/Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs b/Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs index 894e194..1480def 100644 --- a/Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs @@ -1,8 +1,10 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { public class OperationHandlerCStatement : AbstractCrimsonStatement { @@ -26,9 +28,9 @@ public override void Link (LinkingContext ctx) TargetFunction = LinkerHelper.LinkFunctionCall(FunctionIdentifier, ctx); } - public override Fragment GetCrimsonBasic () + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - return new Fragment(0); + return new EmptyAssemblyStructure(); } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs b/Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs index 4ac2d4b..4a2dd05 100644 --- a/Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs @@ -1,8 +1,9 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Tokens; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { internal class ReturnCStatement : AbstractCrimsonStatement { @@ -18,11 +19,9 @@ public override void Link (LinkingContext ctx) Linked = true; } - public override Fragment GetCrimsonBasic () + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - Fragment f = new Fragment(0); - f.Add(new ReturnBStatement()); - return f; + return new ReturnAssemblyStructure(); } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs b/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs index 73a73a3..4616b02 100644 --- a/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs @@ -1,9 +1,11 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { public class ScopeVariableCStatement : AbstractCrimsonStatement { @@ -27,19 +29,9 @@ public override void Link (LinkingContext ctx) Linked = true; } - public override Fragment GetCrimsonBasic () + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - Fragment statements = new Fragment(0); - - statements.Add(new CommentBStatement($"Declare {Identifier}")); - statements.Add(new CommentBStatement($"IncSp {Identifier}")); - - return statements; - } - - public bool IsLinked () - { - throw new NotImplementedException(); + return new ArbitraryAssemblyStructure(ToString()!); } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Statements/StructureCStatement.cs b/Crimson/CSharp/Parsing/Statements/StructureCStatement.cs index b12b567..a2b702e 100644 --- a/Crimson/CSharp/Parsing/Statements/StructureCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/StructureCStatement.cs @@ -1,8 +1,10 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { public class StructureCStatement : AbstractCrimsonStatement, INamed { @@ -16,9 +18,9 @@ public StructureCStatement (FullNameCToken name, IList public IList Body { get; } - public override Fragment GetCrimsonBasic () + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - return new Fragment(0); + return new EmptyAssemblyStructure(); } public override void Link (LinkingContext ctx) diff --git a/Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs b/Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs index ca8356e..ef3023a 100644 --- a/Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs @@ -1,27 +1,32 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Specialising; using System; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { public class VariableAssignmentCStatement : AbstractCrimsonStatement { public FullNameCToken Name { get; set; } + public SimpleValueCToken Size { get; set; } public SimpleValueCToken? Simple { get; } public ComplexValueCToken? Complex { get; } - public VariableAssignmentCStatement (FullNameCToken identifier, SimpleValueCToken value) + public VariableAssignmentCStatement (FullNameCToken identifier, SimpleValueCToken size, SimpleValueCToken value) { Name = identifier; + Size = size; Simple = value; } - public VariableAssignmentCStatement (FullNameCToken identifier, ComplexValueCToken value) + public VariableAssignmentCStatement (FullNameCToken identifier, SimpleValueCToken size, ComplexValueCToken value) { Name = identifier; + Size = size; Complex = value; } @@ -33,25 +38,28 @@ public override void Link (LinkingContext ctx) Linked = true; } - public override Fragment GetCrimsonBasic () + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - Fragment result = new Fragment(0); - - if (Simple != null) - { - result.Add(new CommentBStatement(Simple.GetText())); - } - else if (Complex != null) - { - result.Add(Complex.GetBasicFragment()); - result.Add(new SetBStatement(Name.ToString(), -1, "VAR_ASSIGN_C_VAL")); - } - else - { - throw new FlatteningException($"No value to be assigned to variable {Name}"); - } - - return result; + ScopeAssemblyStructure result = new ScopeAssemblyStructure(); + + result.AddSubStructure(new CommentAssemblyStructure(ToString()!)); + + /* if (Simple != null) + result.AddSubStructure(new CommentAssemblyStructure(Simple.GetText())); + else if (Complex != null) + { + result.AddSubStructure(new CommentAssemblyStructure("Complex Fragment")); + result.AddSubStructure(new CommentAssemblyStructure($"Variable Assign {Name.ToString()}=VAR_ASSIGN_C_VAL")); + } + else + throw new FlatteningException($"No value to be assigned to variable {Name}");*/ + + return null; + } + + internal bool IsKnownAtCompileTime () + { + throw new NotImplementedException(); } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Statements/WhileBlockCStatement.cs b/Crimson/CSharp/Parsing/Statements/WhileBlockCStatement.cs index 3e90be7..21f8854 100644 --- a/Crimson/CSharp/Parsing/Statements/WhileBlockCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/WhileBlockCStatement.cs @@ -1,8 +1,10 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Grammar.Tokens; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Grammar.Statements +namespace Crimson.CSharp.Parsing.Statements { internal class WhileBlockCStatement : AbstractCrimsonStatement, IHasScope { @@ -50,16 +52,14 @@ public override void Link (LinkingContext ctx) * (3) * :END_IF */ - public override Fragment GetCrimsonBasic () + public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - Fragment wholeBlock = new Fragment(0); + ScopeAssemblyStructure scope = new ScopeAssemblyStructure(); - wholeBlock.Add(new CommentBStatement("")); - wholeBlock.Add(new CommentBStatement(" >> TODO IMPLEMENT WHILE (start) <<")); - wholeBlock.Add(new CommentBStatement(" >> TODO IMPLEMENT WHILE (end) <<")); - wholeBlock.Add(new CommentBStatement("")); + scope.AddSubStructure(new CommentAssemblyStructure(" >> TODO IMPLEMENT WHILE (start) <<")); + scope.AddSubStructure(new CommentAssemblyStructure(" >> TODO IMPLEMENT WHILE (end) <<")); - return wholeBlock; + return scope; } public bool IsLinked () diff --git a/Crimson/CSharp/Parsing/Tokens/ComparatorCToken.cs b/Crimson/CSharp/Parsing/Tokens/ComparatorCToken.cs index fdb7df3..89f6afd 100644 --- a/Crimson/CSharp/Parsing/Tokens/ComparatorCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/ComparatorCToken.cs @@ -1,6 +1,6 @@ -using static Crimson.CSharp.Grammar.Tokens.Comparator; +using static Crimson.CSharp.Parsing.Tokens.Comparator; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { public class Comparator { @@ -13,7 +13,7 @@ public enum Values EQUAL_TO } - public static Values Get(string value) + public static Values Get (string value) { switch (value) { @@ -27,7 +27,7 @@ public static Values Get(string value) throw new ArgumentException($"{value} cannot be parsed to a Comparator"); } - public static string ToString(Values comparator) + public static string ToString (Values comparator) { switch (comparator) { diff --git a/Crimson/CSharp/Parsing/Tokens/ComplexValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/ComplexValueCToken.cs index 59b4049..e654b94 100644 --- a/Crimson/CSharp/Parsing/Tokens/ComplexValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/ComplexValueCToken.cs @@ -1,7 +1,7 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Linking; +using Crimson.CSharp.Linking; +using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { public abstract class ComplexValueCToken : ICrimsonToken { @@ -11,6 +11,5 @@ public ComplexValueCToken () } public abstract void Link (LinkingContext ctx); - public abstract Fragment GetBasicFragment (); } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs b/Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs index 49905bf..13ae5f6 100644 --- a/Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs @@ -1,7 +1,7 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Linking; +using Crimson.CSharp.Linking; +using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { internal class ConditionCToken : ICrimsonToken { diff --git a/Crimson/CSharp/Parsing/Tokens/ElifBlockCToken.cs b/Crimson/CSharp/Parsing/Tokens/ElifBlockCToken.cs index f4e97fe..e453908 100644 --- a/Crimson/CSharp/Parsing/Tokens/ElifBlockCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/ElifBlockCToken.cs @@ -1,8 +1,8 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Grammar.Statements; -using Crimson.CSharp.Linking; +using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Statements; +using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { internal class ElseIfBlockCToken : ICrimsonToken { @@ -17,11 +17,6 @@ public ElseIfBlockCToken (IfBlockCStatement ifBlock) public IfBlockCStatement IfBlock { get; } - public Fragment GetCrimsonBasic () - { - return IfBlock.GetCrimsonBasic(); - } - public void Link (LinkingContext ctx) { IfBlock.Link(ctx); diff --git a/Crimson/CSharp/Parsing/Tokens/ElseBlockCToken.cs b/Crimson/CSharp/Parsing/Tokens/ElseBlockCToken.cs index cb7bb4e..5e56305 100644 --- a/Crimson/CSharp/Parsing/Tokens/ElseBlockCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/ElseBlockCToken.cs @@ -1,8 +1,7 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Grammar.Statements; -using Crimson.CSharp.Linking; +using Crimson.CSharp.Linking; +using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { internal class ElseBlockCToken : ICrimsonToken, IHasScope { @@ -15,23 +14,6 @@ public ElseBlockCToken (Scope statements) public Scope GetScope () => Scope; - public Fragment GetCrimsonBasic () - { - Fragment fragment = new Fragment(0); - fragment.Add(new CommentBStatement("")); - - Fragment elseHead = new Fragment(0); - elseHead.Add(new LabelBStatement("ELSE")); - - Fragment elseBody = new Fragment(1); - elseBody.Add(Scope.GetCrimsonBasic()); - - fragment.Add(elseHead); - fragment.Add(elseBody); - - return fragment; - } - public void Link (LinkingContext ctx) { Scope.Link(ctx); diff --git a/Crimson/CSharp/Parsing/Tokens/FullNameCToken.cs b/Crimson/CSharp/Parsing/Tokens/FullNameCToken.cs index 9838774..1331140 100644 --- a/Crimson/CSharp/Parsing/Tokens/FullNameCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/FullNameCToken.cs @@ -1,8 +1,8 @@ using Antlr4.Runtime; -using Crimson.CSharp.Exception; +using Crimson.CSharp.Exceptions; using Crimson.CSharp.Linking; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { public class FullNameCToken : ICrimsonToken { @@ -17,31 +17,29 @@ public FullNameCToken (string? libraryName, string memberName) public FullNameCToken (string fullName) { - string[] strings = fullName.Split ('.'); + string[] strings = fullName.Split('.'); if (strings.Length == 1) { LibraryName = null; MemberName = strings[0]; } - else if (strings.Length == 2) - { - LibraryName = strings[0]; + 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)"); - } } public bool HasMember () { - return !String.IsNullOrWhiteSpace(MemberName); + return !string.IsNullOrWhiteSpace(MemberName); } public bool HasLibrary () { - return !String.IsNullOrWhiteSpace(LibraryName); + return !string.IsNullOrWhiteSpace(LibraryName); } public void Link (LinkingContext ctx) diff --git a/Crimson/CSharp/Parsing/Tokens/FunctionArgumentCToken.cs b/Crimson/CSharp/Parsing/Tokens/FunctionArgumentCToken.cs index fa62eaf..6361ebe 100644 --- a/Crimson/CSharp/Parsing/Tokens/FunctionArgumentCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/FunctionArgumentCToken.cs @@ -1,4 +1,4 @@ -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { public class FunctionArgumentCToken { diff --git a/Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs index 29ed3f0..c60c8b7 100644 --- a/Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs @@ -1,9 +1,10 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar.Statements; +using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Statements; +using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { public class FunctionCallResolvableValueCToken : ComplexValueCToken { @@ -18,12 +19,5 @@ public override void Link (LinkingContext ctx) { FunctionCall.Link(ctx); } - - public override Fragment GetBasicFragment () - { - Fragment fragment = new Fragment(0); - fragment.Add(new CommentBStatement("Function Call")); - return fragment; - } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/ICrimsonToken.cs b/Crimson/CSharp/Parsing/Tokens/ICrimsonToken.cs index accf8c2..a157e73 100644 --- a/Crimson/CSharp/Parsing/Tokens/ICrimsonToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/ICrimsonToken.cs @@ -1,6 +1,6 @@ using Crimson.CSharp.Linking; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { /// /// ICrimsonStatements are made up of ICrimsonTokens. An ICrimsonToken cannot stand on its own. diff --git a/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs index 11c1ae3..7134828 100644 --- a/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs @@ -1,6 +1,6 @@ using Crimson.CSharp.Linking; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { public class IdentifierSimpleValueCToken : SimpleValueCToken { @@ -20,5 +20,15 @@ public override string GetText () { return Identifier.ToString(); } + + public override bool CanEvaluate () + { + return false; + } + + public override object Evaluate () + { + return Identifier; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/OperationResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/OperationResolvableValueCToken.cs index bb11c62..cbca1c7 100644 --- a/Crimson/CSharp/Parsing/Tokens/OperationResolvableValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/OperationResolvableValueCToken.cs @@ -1,9 +1,9 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Exception; +using Crimson.CSharp.Exceptions; using Crimson.CSharp.Linking; +using Crimson.CSharp.Specialising; using System.Net.Http; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { public class OperationResolvableValueCToken : ComplexValueCToken { @@ -52,13 +52,6 @@ public static OperationType ParseOpType (string s) }; } - public override Fragment GetBasicFragment () - { - Fragment fragment = new Fragment(0); - fragment.Add(new CommentBStatement("Operation")); - return fragment; - } - public enum OperationType { // Maths diff --git a/Crimson/CSharp/Parsing/Tokens/ParameterCToken.cs b/Crimson/CSharp/Parsing/Tokens/ParameterCToken.cs index 633d51d..1c98d8b 100644 --- a/Crimson/CSharp/Parsing/Tokens/ParameterCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/ParameterCToken.cs @@ -1,4 +1,4 @@ -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { internal class ParameterCToken { diff --git a/Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs index 70c06a1..283a961 100644 --- a/Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs @@ -1,6 +1,6 @@ using Crimson.CSharp.Linking; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { public class RawResolvableValueCToken : SimpleValueCToken { @@ -19,5 +19,15 @@ public override string GetText () { return Content; } + + public override object Evaluate () + { + return Content; + } + + public override bool CanEvaluate () + { + return true; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/SimpleValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/SimpleValueCToken.cs index f9717ef..3ba0ddb 100644 --- a/Crimson/CSharp/Parsing/Tokens/SimpleValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/SimpleValueCToken.cs @@ -1,10 +1,6 @@ -using Crimson.AntlrBuild; -using Crimson.CSharp.Exception; -using Crimson.CSharp.Grammar.Statements; -using Crimson.CSharp.Linking; -using System.Net.Http; +using Crimson.CSharp.Linking; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { public abstract class SimpleValueCToken : ICrimsonToken { @@ -13,5 +9,7 @@ public SimpleValueCToken () } public abstract void Link (LinkingContext ctx); public abstract string GetText (); + public abstract bool CanEvaluate (); + public abstract object Evaluate (); } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/TypeCToken.cs b/Crimson/CSharp/Parsing/Tokens/TypeCToken.cs index d32aec5..abd41f2 100644 --- a/Crimson/CSharp/Parsing/Tokens/TypeCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/TypeCToken.cs @@ -4,7 +4,7 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Grammar.Tokens +namespace Crimson.CSharp.Parsing.Tokens { internal class TypeCToken { diff --git a/Crimson/CSharp/Flattening/AbstractAssemblyProgram.cs b/Crimson/CSharp/Specialising/AbstractSpecificAssemblyProgram.cs similarity index 57% rename from Crimson/CSharp/Flattening/AbstractAssemblyProgram.cs rename to Crimson/CSharp/Specialising/AbstractSpecificAssemblyProgram.cs index 40504b9..72eb67a 100644 --- a/Crimson/CSharp/Flattening/AbstractAssemblyProgram.cs +++ b/Crimson/CSharp/Specialising/AbstractSpecificAssemblyProgram.cs @@ -1,13 +1,12 @@ -using Crimson.CSharp.Assembly.RFASM; -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Assembly +namespace Crimson.CSharp.Specialising { - public abstract class AbstractAssemblyProgram + public abstract class AbstractSpecificAssemblyProgram { internal abstract IEnumerable GetFragments (); } diff --git a/Crimson/CSharp/Specialising/AbstractSpecificAssemblyStatement.cs b/Crimson/CSharp/Specialising/AbstractSpecificAssemblyStatement.cs new file mode 100644 index 0000000..66c734d --- /dev/null +++ b/Crimson/CSharp/Specialising/AbstractSpecificAssemblyStatement.cs @@ -0,0 +1,6 @@ +namespace Crimson.CSharp.Specialising +{ + public abstract class AbstractSpecificAssemblyStatement + { + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Flattening/Fragment.cs b/Crimson/CSharp/Specialising/Fragment.cs similarity index 81% rename from Crimson/CSharp/Flattening/Fragment.cs rename to Crimson/CSharp/Specialising/Fragment.cs index 87bd3bd..36628b7 100644 --- a/Crimson/CSharp/Flattening/Fragment.cs +++ b/Crimson/CSharp/Specialising/Fragment.cs @@ -1,28 +1,28 @@ -namespace Crimson.CSharp.Assembly +namespace Crimson.CSharp.Specialising { public class Fragment { - private List _statements; + private List _statements; private List _indents; private int _indentation; public string? ResultHolder { get; set; } public Fragment (int indentation) { - _statements = new List(); + _statements = new List(); _indents = new List(); _indentation = indentation; } - public void Add (AbstractAssemblyStatement statement) + public void Add (AbstractSpecificAssemblyStatement statement) { if (statement == null) throw new ArgumentNullException("Cannot add a null BasicStatement to a Fragment"); _statements.Add(statement); _indents.Add(_indentation); } - public void Add (IList statements) + public void Add (IList statements) { foreach (var s in statements) Add(s); diff --git a/Crimson/CSharp/Flattening/IFlattener.cs b/Crimson/CSharp/Specialising/ISpecialiser.cs similarity index 75% rename from Crimson/CSharp/Flattening/IFlattener.cs rename to Crimson/CSharp/Specialising/ISpecialiser.cs index ac45474..c68716a 100644 --- a/Crimson/CSharp/Flattening/IFlattener.cs +++ b/Crimson/CSharp/Specialising/ISpecialiser.cs @@ -1,13 +1,12 @@ -using Crimson.CSharp.Assembly; -using Crimson.CSharp.Assembly.RFASM; -using NLog; +using Crimson.CSharp.Core; +using Crimson.CSharp.Generalising; -namespace Crimson.CSharp.Core +namespace Crimson.CSharp.Specialising { /// /// /// - public interface IFlattener + public interface ISpecialiser { /// @@ -21,6 +20,6 @@ public interface IFlattener /// /// /// - public AbstractAssemblyProgram Flatten (Compilation compilation); + public AbstractSpecificAssemblyProgram Specialise (GeneralAssemblyProgram general); } } \ No newline at end of file diff --git a/Crimson/CSharp/Flattening/RFASM/RFASMComment.cs b/Crimson/CSharp/Specialising/RFASM/RFASMComment.cs similarity index 71% rename from Crimson/CSharp/Flattening/RFASM/RFASMComment.cs rename to Crimson/CSharp/Specialising/RFASM/RFASMComment.cs index dec9daf..35a0e7d 100644 --- a/Crimson/CSharp/Flattening/RFASM/RFASMComment.cs +++ b/Crimson/CSharp/Specialising/RFASM/RFASMComment.cs @@ -4,15 +4,15 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Assembly.RFASM +namespace Crimson.CSharp.Specialising.RFASM { internal class RFASMComment : RFASMStatement { public string Comment { get; private set; } - public RFASMComment (string comment) => Comment = comment; + public RFASMComment(string comment) => Comment = comment; - public override string ToString () + public override string ToString() { if (Comment.Equals("") || Comment.StartsWith("//")) return Comment; return "// " + Comment; diff --git a/Crimson/CSharp/Flattening/RFASM/RFASMProgram.cs b/Crimson/CSharp/Specialising/RFASM/RFASMProgram.cs similarity index 54% rename from Crimson/CSharp/Flattening/RFASM/RFASMProgram.cs rename to Crimson/CSharp/Specialising/RFASM/RFASMProgram.cs index 627281e..e125f50 100644 --- a/Crimson/CSharp/Flattening/RFASM/RFASMProgram.cs +++ b/Crimson/CSharp/Specialising/RFASM/RFASMProgram.cs @@ -1,35 +1,37 @@ -namespace Crimson.CSharp.Assembly.RFASM +using Crimson.CSharp.Specialising; + +namespace Crimson.CSharp.Specialising.RFASM { - internal class RFASMProgram : AbstractAssemblyProgram + internal class RFASMProgram : AbstractSpecificAssemblyProgram { public List Fragments { get; } - public RFASMProgram () + public RFASMProgram() { Fragments = new List(); } - public void Add (Fragment f) + public void Add(Fragment f) { Fragments.Add(f); } - public void Add (params RFASMStatement[] statements) + public void Add(params RFASMStatement[] statements) { Fragment f = new Fragment(0); f.Add(statements); Add(f); } - public void Add (RFASMStatement statement) + public void Add(RFASMStatement statement) { Fragment f = new Fragment(0); f.Add(statement); Fragments.Add(f); } - internal override IEnumerable GetFragments () + internal override IEnumerable GetFragments() { return Fragments; } diff --git a/Crimson/CSharp/Specialising/RFASM/RFASMSpecialiser.cs b/Crimson/CSharp/Specialising/RFASM/RFASMSpecialiser.cs new file mode 100644 index 0000000..c61cf32 --- /dev/null +++ b/Crimson/CSharp/Specialising/RFASM/RFASMSpecialiser.cs @@ -0,0 +1,15 @@ +using Crimson.CSharp.Generalising; +using NLog; + +namespace Crimson.CSharp.Specialising.RFASM +{ + internal class RFASMSpecialiser : ISpecialiser + { + private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); + + public AbstractSpecificAssemblyProgram Specialise (GeneralAssemblyProgram general) + { + throw new NotImplementedException(); + } + } +} diff --git a/Crimson/CSharp/Specialising/RFASM/RFASMStatement.cs b/Crimson/CSharp/Specialising/RFASM/RFASMStatement.cs new file mode 100644 index 0000000..2c31895 --- /dev/null +++ b/Crimson/CSharp/Specialising/RFASM/RFASMStatement.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Crimson.CSharp.Specialising; + +namespace Crimson.CSharp.Specialising.RFASM +{ + public class RFASMStatement : AbstractSpecificAssemblyStatement + { + } +} From 0da6a68901baf8b0b942c632c819ca47ad14e7e9 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Fri, 24 Mar 2023 22:30:40 +0000 Subject: [PATCH 033/122] ToStrings for debugging --- Crimson/CSharp/Core/CrimsonCompiler.cs | 37 +++- .../Generalising/GeneralAssemblyProgram.cs | 8 +- .../Generalising/GeneralisationContext.cs | 2 +- Crimson/CSharp/Generalising/Generaliser.cs | 27 +-- .../Structures/ConstantAssemblyStructure.cs | 5 + .../Structures/EmptyAssemblyStructure.cs | 5 + .../Structures/IndentAssemblyStructure.cs | 2 +- .../Structures/JumpAssemblyStructure.cs | 2 +- .../Structures/LabelAssemblyStructure.cs | 2 +- .../Structures/ReturnAssemblyStructure.cs | 5 + .../Structures/ScopeAssemblyStructure.cs | 6 + .../Structures/SubroutineAssemblyStructure.cs | 10 +- .../Statements/AbstractCrimsonStatement.cs | 5 + .../Statements/AssemblyCallCStatement.cs | 5 + .../Parsing/Statements/FunctionCStatement.cs | 12 +- .../Statements/FunctionCallCStatement.cs | 6 +- .../Statements/GlobalVariableCStatement.cs | 8 +- .../VariableAssignmentCStatement.cs | 4 +- .../FunctionCallResolvableValueCToken.cs | 5 + .../Tokens/IdentifierSimpleValueCToken.cs | 5 + .../Tokens/RawResolvableValueCToken.cs | 5 + .../Test Compilations/result/main.gen | 178 ++++++++++++++++++ 22 files changed, 293 insertions(+), 51 deletions(-) create mode 100644 Crimson/Resources/Test Compilations/result/main.gen diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 454a9e3..d5e830f 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -64,6 +64,9 @@ public int FullyCompileFromOptions () LOGGER.Info(" G E N E R A L I S I N G "); GeneralAssemblyProgram generalProgram = Generaliser.Generalise(compilation); + LOGGER.Info("\n\n"); + DumpGeneralisedProgram(generalProgram); + /* * == SPECIALISING STAGE == * @@ -78,7 +81,6 @@ public int FullyCompileFromOptions () * == CLEANUP == */ LOGGER.Info("\n\n"); - LOGGER.Info("Writing to disk..."); DumpSpecialisedProgram(specialisedProgram); LOGGER.Info("\n\n"); @@ -86,26 +88,49 @@ public int FullyCompileFromOptions () return 1; } - private void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram basicProgram) + private void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram specificProgram) { if (Options.DumpIntermediates) { string basicTarget = Path.ChangeExtension(Options.TranslationTargetPath, ".cba"); - LOGGER.Info("Dumping CrimsonBasic program to " + basicTarget); + LOGGER.Info("Dumping specialised program to " + basicTarget); List lines = new List(); - foreach (var f in basicProgram.GetFragments()) + foreach (var f in specificProgram.GetFragments()) { lines.AddRange(f.GetLines()); } Directory.CreateDirectory(Path.GetDirectoryName(Options.TranslationTargetPath)); File.WriteAllLines(basicTarget, lines.ToArray()); - LOGGER.Info("Finished CrimsonBasic dump!"); + LOGGER.Info("Written!"); + } + else + { + LOGGER.Info("Skipping specialised program dump..."); + } + } + + private void DumpGeneralisedProgram (GeneralAssemblyProgram generalProgram) + { + if (Options.DumpIntermediates) + { + string basicTarget = Path.ChangeExtension(Options.TranslationTargetPath, ".gen"); + LOGGER.Info("Dumping generalised program to " + basicTarget); + + List lines = new List(); + foreach (var s in generalProgram.Structures) + { + lines.Add(s.ToString() ?? "(null)"); + } + + Directory.CreateDirectory(Path.GetDirectoryName(Options.TranslationTargetPath)); + File.WriteAllLines(basicTarget, lines.ToArray()); + LOGGER.Info("Written!"); } else { - LOGGER.Info("Skipping dumping of CrimsonBasic program"); + LOGGER.Info("Skipping generalised program dump..."); } } } diff --git a/Crimson/CSharp/Generalising/GeneralAssemblyProgram.cs b/Crimson/CSharp/Generalising/GeneralAssemblyProgram.cs index 558bb6b..412112f 100644 --- a/Crimson/CSharp/Generalising/GeneralAssemblyProgram.cs +++ b/Crimson/CSharp/Generalising/GeneralAssemblyProgram.cs @@ -8,7 +8,13 @@ namespace Crimson.CSharp.Generalising { public class GeneralAssemblyProgram { - private List Structures { get; set; } + public List Structures { get; private set; } + + public GeneralAssemblyProgram () + { + Structures = new List(); + } + public void AddStructure (IGeneralAssemblyStructure structure) { diff --git a/Crimson/CSharp/Generalising/GeneralisationContext.cs b/Crimson/CSharp/Generalising/GeneralisationContext.cs index 68f1b29..2075e9d 100644 --- a/Crimson/CSharp/Generalising/GeneralisationContext.cs +++ b/Crimson/CSharp/Generalising/GeneralisationContext.cs @@ -4,7 +4,7 @@ public class GeneralisationContext { private HashSet Subroutines { get; set; } = new HashSet(); - public string CheckUniqueSubroutine (string sub) + public string ReserveSubroutineName (string sub) { if (!Subroutines.Add(sub)) throw new DuplicateNameException($"Cannot add second subroutine with name {sub} to GeneralisationContext."); return sub; diff --git a/Crimson/CSharp/Generalising/Generaliser.cs b/Crimson/CSharp/Generalising/Generaliser.cs index 6db6386..b5f626c 100644 --- a/Crimson/CSharp/Generalising/Generaliser.cs +++ b/Crimson/CSharp/Generalising/Generaliser.cs @@ -49,13 +49,14 @@ public GeneralAssemblyProgram Generalise (Compilation compilation) program.AddStructure(new CommentAssemblyStructure("This CrimsonBasic program was automatically generated by the Crimson compiler.")); program.AddStructure(new CommentAssemblyStructure("Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x")); program.AddStructure(new CommentAssemblyStructure("Crimson version " + Core.Crimson.VERSION)); - program.AddStructure(new CommentAssemblyStructure("Crimson, CrimsonBasic and RedFoxAssembly are parts of GamesMaster3000X's RedFoxVirtualMachine.")); + program.AddStructure(new CommentAssemblyStructure("Crimson and RedFoxAssembly (RFASM) are parts of GamesMaster3000X's RedFoxVirtualMachine.")); program.AddStructure(new CommentAssemblyStructure("The main repository for this project can be found at: https://github.com/gamesmaster3000x/RF_ASM")); - program.AddStructure(new CommentAssemblyStructure("Crimson, CrimsonBasic and RedFoxAssembly were implemented by me, GenElectrovise.")); + program.AddStructure(new CommentAssemblyStructure("Crimson and RFASM were implemented by me, GenElectrovise.")); program.AddStructure(new CommentAssemblyStructure("My development fork of the project can be found at: https://github.com/GenElectrovise/RF_ASM")); program.AddStructure(new CommentAssemblyStructure("")); // Add global variables + LOGGER.Info("Generalising global variables"); program.AddStructure(new CommentAssemblyStructure("")); program.AddStructure(new CommentAssemblyStructure("============================== Global Variables ==============================")); foreach (var pair in variables) @@ -65,32 +66,22 @@ public GeneralAssemblyProgram Generalise (Compilation compilation) LOGGER.Debug($"Added GlobalVariable {pair.Value.Assignment.Name}"); } - // Add structures - program.AddStructure(new CommentAssemblyStructure("")); - program.AddStructure(new CommentAssemblyStructure("(Structures shouldn't be a part of CB)")); - program.AddStructure(new CommentAssemblyStructure("============================== Structures ==============================")); - foreach (var pair in structures) - { - IGeneralAssemblyStructure bs = pair.Value.Generalise(context); - program.AddStructure(bs); - LOGGER.Debug($"Added Structure {pair.Value.Name}"); - } - // Add main (entry) function program.AddStructure(new CommentAssemblyStructure("")); program.AddStructure(new CommentAssemblyStructure("============================== Entry Function ==============================")); - FunctionCStatement entry = compilation.GetEntryFunction(); - LOGGER.Info($"Found entry Function {entry.Name}"); - IGeneralAssemblyStructure entryBs = entry.Generalise(context); + FunctionCStatement entryFunction = compilation.GetEntryFunction(); + LOGGER.Info($"Found entry Function {entryFunction.Name}"); + IGeneralAssemblyStructure entryBs = entryFunction.Generalise(context); program.AddStructure(entryBs); - LOGGER.Debug($"Added entry Function {entry.Name}"); + LOGGER.Debug($"Added entry Function {entryFunction.Name}"); // Add remaining functions + LOGGER.Info("Generalising functions"); program.AddStructure(new CommentAssemblyStructure("")); program.AddStructure(new CommentAssemblyStructure("============================== Functions ==============================")); foreach (var pair in functions) { - if (pair.Value == entry) continue; + if (pair.Value == entryFunction) continue; IGeneralAssemblyStructure bs = pair.Value.Generalise(context); program.AddStructure(bs); LOGGER.Debug($"Added Function {pair.Value.Name}"); diff --git a/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs index 450688d..04abbac 100644 --- a/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs @@ -26,5 +26,10 @@ IEnumerable IGeneralAssemblyStructure.GetSubStructure { return Enumerable.Empty(); } + + public override string ToString () + { + return $"{Name}={Value}"; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/EmptyAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/EmptyAssemblyStructure.cs index 24f34b3..01c28aa 100644 --- a/Crimson/CSharp/Generalising/Structures/EmptyAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/EmptyAssemblyStructure.cs @@ -10,5 +10,10 @@ public IEnumerable GetSubStructures () { return Enumerable.Empty(); } + + public override string ToString () + { + return ""; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/IndentAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/IndentAssemblyStructure.cs index d4c079d..1cf0440 100644 --- a/Crimson/CSharp/Generalising/Structures/IndentAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/IndentAssemblyStructure.cs @@ -16,7 +16,7 @@ public IndentAssemblyStructure (int indent) public override string ToString () { - return null!; + return ""; } IEnumerable IGeneralAssemblyStructure.GetSubStructures () diff --git a/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs index 3672fff..b01e782 100644 --- a/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs @@ -11,7 +11,7 @@ public JumpAssemblyStructure (string target) public override string ToString () { - return Target; + return "Jump: " + Target; } public IEnumerable GetSubStructures () diff --git a/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs index 13b10f2..18a141e 100644 --- a/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs @@ -11,7 +11,7 @@ public LabelAssemblyStructure (string name) public override string ToString () { - return Text; + return "Label: " + Text; } public IEnumerable GetSubStructures () diff --git a/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs index 3e4eed6..cc9c001 100644 --- a/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs @@ -10,5 +10,10 @@ public IEnumerable GetSubStructures () { return Enumerable.Empty(); } + + public override string ToString () + { + return "Return"; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs index d3b3f3a..99b3346 100644 --- a/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs @@ -6,6 +6,7 @@ internal class ScopeAssemblyStructure : IGeneralAssemblyStructure public ScopeAssemblyStructure () { + Structures = new List(); } internal void AddSubStructure (IGeneralAssemblyStructure labelAssemblyStructure) @@ -17,5 +18,10 @@ IEnumerable IGeneralAssemblyStructure.GetSubStructure { return Structures; } + + public override string ToString () + { + return $"{{\n {String.Join("\n\t", Structures)} \n}}"; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs index b60d69f..18b3b48 100644 --- a/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs @@ -16,8 +16,9 @@ private set { } public SubroutineAssemblyStructure (GeneralisationContext context, string name) { - Name = context.CheckUniqueSubroutine(name); - _ = context.CheckUniqueSubroutine(EndName); + Name = name; + _ = context.ReserveSubroutineName(Name); + _ = context.ReserveSubroutineName(EndName); Structures = new List(); } @@ -26,6 +27,11 @@ public void AddSubStructure (IGeneralAssemblyStructure labelAssemblyStructure) Structures.Add(labelAssemblyStructure); } + public override string ToString () + { + return $"{Name}: {{\n{String.Join("\n ", Structures)}\n}}"; + } + IEnumerable IGeneralAssemblyStructure.GetSubStructures () { return Structures // inner sub structures diff --git a/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs b/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs index e74969e..9321ec3 100644 --- a/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs @@ -13,5 +13,10 @@ public abstract class AbstractCrimsonStatement public abstract void Link (LinkingContext context); public abstract IGeneralAssemblyStructure Generalise (GeneralisationContext context); + + public override string ToString () + { + return GetType().Name; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs b/Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs index 7462200..d9a0b61 100644 --- a/Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs @@ -24,5 +24,10 @@ public override void Link (LinkingContext ctx) { Linked = true; } + + public override string ToString () + { + return assemblyText; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs b/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs index 2d01a87..d582f12 100644 --- a/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs @@ -35,18 +35,8 @@ public override void Link (LinkingContext ctx) public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - string uniqueName = context.CheckUniqueSubroutine(Name.ToString()); - string uniqueNameEnd = context.CheckUniqueSubroutine(Name.ToString()); - - SubroutineAssemblyStructure subroutine = new SubroutineAssemblyStructure(context, uniqueName); - - subroutine.AddSubStructure(new CommentAssemblyStructure(uniqueName)); - subroutine.AddSubStructure(new JumpAssemblyStructure(uniqueNameEnd)); - subroutine.AddSubStructure(new LabelAssemblyStructure(uniqueName)); + SubroutineAssemblyStructure subroutine = new SubroutineAssemblyStructure(context, Name.ToString()); subroutine.AddSubStructure(Scope.Generalise(context)); - subroutine.AddSubStructure(new LabelAssemblyStructure(uniqueNameEnd)); - subroutine.AddSubStructure(new CommentAssemblyStructure("")); - return subroutine; } diff --git a/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs b/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs index f99747e..02abf7c 100644 --- a/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs @@ -8,7 +8,7 @@ namespace Crimson.CSharp.Parsing.Statements { public class FunctionCallCStatement : AbstractCrimsonStatement { - private FullNameCToken identifier; + public FullNameCToken Identifier { get; private set; } private FunctionCStatement? targetFunction; private IList arguments; @@ -18,7 +18,7 @@ public FunctionCallCStatement (FullNameCToken identifier, IList={Simple}/{Complex}")); /* if (Simple != null) result.AddSubStructure(new CommentAssemblyStructure(Simple.GetText())); @@ -54,7 +54,7 @@ public override IGeneralAssemblyStructure Generalise (GeneralisationContext cont else throw new FlatteningException($"No value to be assigned to variable {Name}");*/ - return null; + return result; } internal bool IsKnownAtCompileTime () diff --git a/Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs index c60c8b7..83c7780 100644 --- a/Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs @@ -19,5 +19,10 @@ public override void Link (LinkingContext ctx) { FunctionCall.Link(ctx); } + + public override string ToString () + { + return "Call: " + FunctionCall.Identifier.ToString() + "()"; + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs index 7134828..22b0a58 100644 --- a/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs @@ -16,6 +16,11 @@ public override void Link (LinkingContext ctx) Identifier = LinkerHelper.LinkIdentifier(Identifier, ctx); } + public override string ToString () + { + return GetText(); + } + public override string GetText () { return Identifier.ToString(); diff --git a/Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs index 283a961..7e371f0 100644 --- a/Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs @@ -15,6 +15,11 @@ public override void Link (LinkingContext ctx) { } + public override string ToString () + { + return GetText(); + } + public override string GetText () { return Content; diff --git a/Crimson/Resources/Test Compilations/result/main.gen b/Crimson/Resources/Test Compilations/result/main.gen new file mode 100644 index 0000000..ece9975 --- /dev/null +++ b/Crimson/Resources/Test Compilations/result/main.gen @@ -0,0 +1,178 @@ +// This CrimsonBasic program was automatically generated by the Crimson compiler. +// Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x +// Crimson version v0.0 +// Crimson and RedFoxAssembly (RFASM) are parts of GamesMaster3000X's RedFoxVirtualMachine. +// The main repository for this project can be found at: https://github.com/gamesmaster3000x/RF_ASM +// Crimson and RFASM were implemented by me, GenElectrovise. +// My development fork of the project can be found at: https://github.com/GenElectrovise/RF_ASM + + +// ============================== Global Variables ============================== +// Assign gvar_regions_i_0=0 +// Assign gvar_regions_length_0=0 +// Assign gvar_regions_region_0=0 +// Assign gvar_int_size_0=4 +// Assign gvar_ptr_size_0=4 +// Assign gvar_counter_0=0 +// Assign gvar_int_0=4 +// Assign gvar_ptr_0=4 + +// ============================== Entry Function ============================== +func_main_0: { +{ + example basic call + example assemby call + ScopeVariableCStatement + ScopeVariableCStatement + { + // a=/Call: utils.multiply() +} + { + // b=/Call: utils.times() +} + { + + Jump: NEXT_ELIF + { + { + // counter=5/ +} +} + Jump: END_IF_BLOCK_UNIQUE_BRANCH_NAME + Label: END_IF_BLOCK_UNIQUE_BRANCH_NAME + +} + { + // FC start + Jump: func_call_0 + // FC end +} + ScopeVariableCStatement + { + // i=/Call: heap.alloc() +} + { + // i=4/ +} + { + // FC start + Jump: func_write_0 + // FC end +} + ScopeVariableCStatement + { + // ret=/Call: heap.alloc() +} + { + // ret=/Call: utils.multiply() +} + Return +} +} + +// ============================== Functions ============================== +func_multiply_0: { +{ + { + // FC start + Jump: func_write_0 + // FC end +} + Return +} +} +func_times_0: { +{ + { + // ret<4>=/Call: multiply() +} + Return +} +} +func_write_0: { +{ + +} +} +func_alloc_0: { +{ + { + // i=0/ +} + { + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << +} + Return +} +} +func_get_region_ptr_0: { +{ + { + // RRMS=/Crimson.CSharp.Parsing.Tokens.OperationResolvableValueCToken +} + { + // exponential_offset=4/ +} + { + + Jump: NEXT_ELIF + { + +} + Jump: END_IF_BLOCK_UNIQUE_BRANCH_NAME + Label: END_IF_BLOCK_UNIQUE_BRANCH_NAME + +} + { + // HO_EXP=/Crimson.CSharp.Parsing.Tokens.OperationResolvableValueCToken +} + { + // HO_EXP_RRMS=/Crimson.CSharp.Parsing.Tokens.OperationResolvableValueCToken +} + Return +} +} +func_freeptr_0: { +{ + { + // r=0/ +} + { + // region_ptr=/Call: get_region_ptr() +} + { + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << +} + { + // FC start + Jump: func_freeregion_0 + // FC end +} +} +} +func_freeregion_0: { +{ + { + // regions_region=0/ +} +} +} +func_pwr_0: { +{ + { + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << +} +} +} +func_call_0: { +{ + ScopeVariableCStatement + { + // test=/Call: heap.alloc() +} + Return +} +} From 3e505740b33a27e08d9befc157a5a39e9a553210 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Fri, 24 Mar 2023 22:41:53 +0000 Subject: [PATCH 034/122] Improved program dumping/writing --- Crimson/CSharp/Core/CrimsonCompiler.cs | 18 +- .../AbstractSpecificAssemblyProgram.cs | 5 +- .../CSharp/Specialising/RFASM/RFASMProgram.cs | 32 +++- .../Specialising/RFASM/RFASMSpecialiser.cs | 9 +- .../Test Compilations/result/main.cba | 166 ---------------- .../Test Compilations/result/main.rfp | 178 ++++++++++++++++++ 6 files changed, 221 insertions(+), 187 deletions(-) delete mode 100644 Crimson/Resources/Test Compilations/result/main.cba create mode 100644 Crimson/Resources/Test Compilations/result/main.rfp diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index d5e830f..7477fe2 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -88,22 +88,12 @@ public int FullyCompileFromOptions () return 1; } - private void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram specificProgram) + private void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram specialisedProgram) { if (Options.DumpIntermediates) { - string basicTarget = Path.ChangeExtension(Options.TranslationTargetPath, ".cba"); - LOGGER.Info("Dumping specialised program to " + basicTarget); - - List lines = new List(); - foreach (var f in specificProgram.GetFragments()) - { - lines.AddRange(f.GetLines()); - } - - Directory.CreateDirectory(Path.GetDirectoryName(Options.TranslationTargetPath)); - File.WriteAllLines(basicTarget, lines.ToArray()); - LOGGER.Info("Written!"); + string basicTarget = Path.ChangeExtension(Options.TranslationTargetPath, specialisedProgram.GetExtension()); + specialisedProgram.Write(basicTarget); } else { @@ -124,7 +114,7 @@ private void DumpGeneralisedProgram (GeneralAssemblyProgram generalProgram) lines.Add(s.ToString() ?? "(null)"); } - Directory.CreateDirectory(Path.GetDirectoryName(Options.TranslationTargetPath)); + _ = Directory.CreateDirectory(Path.GetDirectoryName(Options.TranslationTargetPath)!); File.WriteAllLines(basicTarget, lines.ToArray()); LOGGER.Info("Written!"); } diff --git a/Crimson/CSharp/Specialising/AbstractSpecificAssemblyProgram.cs b/Crimson/CSharp/Specialising/AbstractSpecificAssemblyProgram.cs index 72eb67a..e61a088 100644 --- a/Crimson/CSharp/Specialising/AbstractSpecificAssemblyProgram.cs +++ b/Crimson/CSharp/Specialising/AbstractSpecificAssemblyProgram.cs @@ -8,6 +8,9 @@ namespace Crimson.CSharp.Specialising { public abstract class AbstractSpecificAssemblyProgram { - internal abstract IEnumerable GetFragments (); + + public abstract IEnumerable GetFragments (); + public abstract string GetExtension (); + public abstract void Write (string path); } } diff --git a/Crimson/CSharp/Specialising/RFASM/RFASMProgram.cs b/Crimson/CSharp/Specialising/RFASM/RFASMProgram.cs index e125f50..9de0e3a 100644 --- a/Crimson/CSharp/Specialising/RFASM/RFASMProgram.cs +++ b/Crimson/CSharp/Specialising/RFASM/RFASMProgram.cs @@ -1,39 +1,61 @@ using Crimson.CSharp.Specialising; +using NLog; namespace Crimson.CSharp.Specialising.RFASM { internal class RFASMProgram : AbstractSpecificAssemblyProgram { + private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); public List Fragments { get; } - public RFASMProgram() + public RFASMProgram () { Fragments = new List(); } - public void Add(Fragment f) + public void Add (Fragment f) { Fragments.Add(f); } - public void Add(params RFASMStatement[] statements) + public void Add (params RFASMStatement[] statements) { Fragment f = new Fragment(0); f.Add(statements); Add(f); } - public void Add(RFASMStatement statement) + public void Add (RFASMStatement statement) { Fragment f = new Fragment(0); f.Add(statement); Fragments.Add(f); } - internal override IEnumerable GetFragments() + public override IEnumerable GetFragments () { return Fragments; } + + public override string GetExtension () + { + return ".rfp"; + } + + public override void Write (string path) + { + LOGGER.Info("Writing RFASMProgram to " + path); + + List lines = new List(); + foreach (var f in GetFragments()) + { + lines.AddRange(f.GetLines()); + } + + _ = Directory.CreateDirectory(Path.GetDirectoryName(path)); + File.WriteAllLines(path, lines.ToArray()); + LOGGER.Info("Written!"); + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Specialising/RFASM/RFASMSpecialiser.cs b/Crimson/CSharp/Specialising/RFASM/RFASMSpecialiser.cs index c61cf32..6fdccc4 100644 --- a/Crimson/CSharp/Specialising/RFASM/RFASMSpecialiser.cs +++ b/Crimson/CSharp/Specialising/RFASM/RFASMSpecialiser.cs @@ -9,7 +9,14 @@ internal class RFASMSpecialiser : ISpecialiser public AbstractSpecificAssemblyProgram Specialise (GeneralAssemblyProgram general) { - throw new NotImplementedException(); + RFASMProgram program = new RFASMProgram(); + + foreach (var s in general.Structures) + { + program.Add(new RFASMComment(s.ToString())); + } + + return program; } } } diff --git a/Crimson/Resources/Test Compilations/result/main.cba b/Crimson/Resources/Test Compilations/result/main.cba deleted file mode 100644 index 45f9be0..0000000 --- a/Crimson/Resources/Test Compilations/result/main.cba +++ /dev/null @@ -1,166 +0,0 @@ -// This CrimsonBasic program was automatically generated by the Crimson compiler. -// Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x -// Crimson version v0.0 -// CrimsonBasic version v0.0 -// Crimson, CrimsonBasic and RedFoxAssembly are parts of GamesMaster3000X's RedFoxVirtualMachine. -// The main repository for this project can be found at: https://github.com/gamesmaster3000x/RF_ASM -// Crimson, CrimsonBasic and RedFoxAssembly were implemented by me, GenElectrovise. -// My development fork of the project can be found at: https://github.com/GenElectrovise/RF_ASM - - -// ============================== Global Variables ============================== -var_set gvar_regions_i_0, -1, 0; -var_set gvar_regions_length_0, -1, 0; -var_set gvar_regions_region_0, -1, 0; -var_set gvar_int_size_0, -1, 4; -var_set gvar_ptr_size_0, -1, 4; -var_set gvar_counter_0, -1, 0; -var_set gvar_int_0, -1, 4; -var_set gvar_ptr_0, -1, 4; - -// (Structures shouldn't be a part of CB) -// ============================== Structures ============================== - -// ============================== Entry Function ============================== -:func_main_0: - example basic call - A~ "example assemby call" - // Declare a - // IncSp a - // Declare a - // IncSp a - // Function Call - var_set a, -1, VAR_ASSIGN_C_VAL; - // Function Call - var_set b, -1, VAR_ASSIGN_C_VAL; - - jeq c_r_h 0 NEXT_ELIF - // 5 - jump END_branch_0 - - jeq c_r_h 0 NEXT_ELIF - // Function Call - var_set c, -1, VAR_ASSIGN_C_VAL; - // Function Call - var_set d, -1, VAR_ASSIGN_C_VAL; - jump END_branch_1 - - :ELSE: - return; - :END_branch_1: - - :END_branch_0: - - // FC start - jump func_call_0 - // FC end - // Declare i - // IncSp i - // Function Call - var_set i, -1, VAR_ASSIGN_C_VAL; - // 4 - // FC start - jump func_write_0 - // FC end - // Declare ret - // IncSp ret - // Function Call - var_set ret, -1, VAR_ASSIGN_C_VAL; - // Function Call - var_set ret, -1, VAR_ASSIGN_C_VAL; - return; -return; - - -// ============================== Functions ============================== -:func_multiply_0: - // FC start - jump func_write_0 - // FC end - return; -return; - -:func_times_0: - // Function Call - var_set ret, -1, VAR_ASSIGN_C_VAL; - return; -return; - -:func_write_0: -return; - -:func_alloc_0: - // 0 - - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << - - return; -return; - -:func_get_region_ptr_0: - // Operation - var_set RRMS, -1, VAR_ASSIGN_C_VAL; - // 4 - - jeq c_r_h 0 NEXT_ELIF - jump END_branch_2 - - jeq c_r_h 0 NEXT_ELIF - // 1 - jump END_branch_3 - - jeq c_r_h 0 NEXT_ELIF - // 2 - jump END_branch_4 - - :ELSE: - - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << - - :END_branch_4: - - :END_branch_3: - - :END_branch_2: - - // Operation - var_set HO_EXP, -1, VAR_ASSIGN_C_VAL; - // Operation - var_set HO_EXP_RRMS, -1, VAR_ASSIGN_C_VAL; - return; -return; - -:func_freeptr_0: - // 0 - // Function Call - var_set region_ptr, -1, VAR_ASSIGN_C_VAL; - - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << - - // FC start - jump func_freeregion_0 - // FC end -return; - -:func_freeregion_0: - // 0 -return; - -:func_pwr_0: - - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << - -return; - -:func_call_0: - // Declare test - // IncSp test - // Function Call - var_set test, -1, VAR_ASSIGN_C_VAL; - return; -return; - diff --git a/Crimson/Resources/Test Compilations/result/main.rfp b/Crimson/Resources/Test Compilations/result/main.rfp new file mode 100644 index 0000000..557bcbd --- /dev/null +++ b/Crimson/Resources/Test Compilations/result/main.rfp @@ -0,0 +1,178 @@ +// This CrimsonBasic program was automatically generated by the Crimson compiler. +// Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x +// Crimson version v0.0 +// Crimson and RedFoxAssembly (RFASM) are parts of GamesMaster3000X's RedFoxVirtualMachine. +// The main repository for this project can be found at: https://github.com/gamesmaster3000x/RF_ASM +// Crimson and RFASM were implemented by me, GenElectrovise. +// My development fork of the project can be found at: https://github.com/GenElectrovise/RF_ASM + + +// ============================== Global Variables ============================== +// Assign gvar_regions_i_0=0 +// Assign gvar_regions_length_0=0 +// Assign gvar_regions_region_0=0 +// Assign gvar_int_size_0=4 +// Assign gvar_ptr_size_0=4 +// Assign gvar_counter_0=0 +// Assign gvar_int_0=4 +// Assign gvar_ptr_0=4 + +// ============================== Entry Function ============================== +// func_main_0: { +{ + example basic call + example assemby call + ScopeVariableCStatement + ScopeVariableCStatement + { + // a=/Call: utils.multiply() +} + { + // b=/Call: utils.times() +} + { + + Jump: NEXT_ELIF + { + { + // counter=5/ +} +} + Jump: END_IF_BLOCK_UNIQUE_BRANCH_NAME + Label: END_IF_BLOCK_UNIQUE_BRANCH_NAME + +} + { + // FC start + Jump: func_call_0 + // FC end +} + ScopeVariableCStatement + { + // i=/Call: heap.alloc() +} + { + // i=4/ +} + { + // FC start + Jump: func_write_0 + // FC end +} + ScopeVariableCStatement + { + // ret=/Call: heap.alloc() +} + { + // ret=/Call: utils.multiply() +} + Return +} +} + +// ============================== Functions ============================== +// func_multiply_0: { +{ + { + // FC start + Jump: func_write_0 + // FC end +} + Return +} +} +// func_times_0: { +{ + { + // ret<4>=/Call: multiply() +} + Return +} +} +// func_write_0: { +{ + +} +} +// func_alloc_0: { +{ + { + // i=0/ +} + { + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << +} + Return +} +} +// func_get_region_ptr_0: { +{ + { + // RRMS=/Crimson.CSharp.Parsing.Tokens.OperationResolvableValueCToken +} + { + // exponential_offset=4/ +} + { + + Jump: NEXT_ELIF + { + +} + Jump: END_IF_BLOCK_UNIQUE_BRANCH_NAME + Label: END_IF_BLOCK_UNIQUE_BRANCH_NAME + +} + { + // HO_EXP=/Crimson.CSharp.Parsing.Tokens.OperationResolvableValueCToken +} + { + // HO_EXP_RRMS=/Crimson.CSharp.Parsing.Tokens.OperationResolvableValueCToken +} + Return +} +} +// func_freeptr_0: { +{ + { + // r=0/ +} + { + // region_ptr=/Call: get_region_ptr() +} + { + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << +} + { + // FC start + Jump: func_freeregion_0 + // FC end +} +} +} +// func_freeregion_0: { +{ + { + // regions_region=0/ +} +} +} +// func_pwr_0: { +{ + { + // >> TODO IMPLEMENT WHILE (start) << + // >> TODO IMPLEMENT WHILE (end) << +} +} +} +// func_call_0: { +{ + ScopeVariableCStatement + { + // test=/Call: heap.alloc() +} + Return +} +} From 9fe93254b1b2573caa344f1c891a44e1a9b271d7 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Fri, 24 Mar 2023 23:39:16 +0000 Subject: [PATCH 035/122] GeneralisationContext memory management + GeneralisationContext.AllocGlobal (and supporting fields) + GeneralisationContext.AllocStack (and supporting fields) > Scope and FunctionCStatement.Generalise now use EnterScope and LeaveScope --- .../Generalising/GeneralisationContext.cs | 84 ++++++++++++++++++- Crimson/CSharp/Parsing/Scope.cs | 2 + .../Parsing/Statements/FunctionCStatement.cs | 4 + 3 files changed, 89 insertions(+), 1 deletion(-) diff --git a/Crimson/CSharp/Generalising/GeneralisationContext.cs b/Crimson/CSharp/Generalising/GeneralisationContext.cs index 2075e9d..2e6cdde 100644 --- a/Crimson/CSharp/Generalising/GeneralisationContext.cs +++ b/Crimson/CSharp/Generalising/GeneralisationContext.cs @@ -2,15 +2,93 @@ { public class GeneralisationContext { - private HashSet Subroutines { get; set; } = new HashSet(); + private HashSet Subroutines { get; set; } + public GeneralisationContext () + { + Subroutines = new HashSet(); + StackPointerStack = new Stack(); + } + + /// + /// Adds the given name to a set of names of the subroutines contained within this context. + /// Fails if the given name already exists in the set. + /// There should be no duplicates at this stage because it would cause errors during linking, + /// but it's better to be safe than sorry because I really don't trust this process to not goof + /// sometimes. + /// + /// The name to check. + /// The input name. + /// If the given name has been reserved before. public string ReserveSubroutineName (string sub) { if (!Subroutines.Add(sub)) throw new DuplicateNameException($"Cannot add second subroutine with name {sub} to GeneralisationContext."); return sub; } + + // ==== STACK MEMORY ==== + + + /// + /// Starts a new stack frame to be used by the scope allocation head. + /// Pushes the old offset onto the C# stack pointer stack to save it for later. + /// + public void EnterScope () + { + StackPointerStack.Push(_virtualStackPointer); + _virtualStackPointer = 0; + } + + /// + /// Called when leaving a scope. + /// Resets the virtual stack pointer's position to its value before the exiting scope was entered. + /// + public void LeaveScope () + { + _virtualStackPointer = StackPointerStack.Pop(); + } + + /// + /// A stack to keep track of the virtual stack pointer's location in different nested scopes. + /// + private Stack StackPointerStack { get; set; } + + /// + /// The offset from the stack frame pointer at which memory should be allocated. + /// Tracked through different scopes with the stack pointer stack. + /// + private int _virtualStackPointer = 0; + + /// + /// Reserves the given number of bytes on the virtual stack. + /// Used to determine the offset from the stack frame pointer at which scope (stack) + /// variables will be stored and referenced from. + /// + /// The amount of memory to reserve, in bytes. + /// The starting address at which the block was allocated. + public int AllocStack (int size) + { + int addr = _globalAllocationHead; + _globalAllocationHead += size; + return addr; + } + + + // ==== GLOBAL MEMORY ==== + + + /// + /// Tracks the offset from the start of program memory to where the next global variable can be allocated. + /// private int _globalAllocationHead = 0; + + /// + /// Reserves the given number of bytes and return the start offset for the chunk. + /// Used to an address to a global variable, relative to the start of program memory. + /// + /// The amount of memory to reserve, in bytes. + /// The starting address at which the block was allocated. public int AllocGlobal (int size) { int addr = _globalAllocationHead; @@ -18,6 +96,10 @@ public int AllocGlobal (int size) return addr; } + + // ==== ==== + + public class DuplicateNameException : Exception { public DuplicateNameException (string msg) : base(msg) diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs index a2a8693..d50d8d4 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -212,10 +212,12 @@ public override void Link (LinkingContext ctx) public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { ScopeAssemblyStructure structure = new ScopeAssemblyStructure(); + context.EnterScope(); foreach (var d in Delegates) structure.AddSubStructure(d.Invoke().Generalise(context)); + context.LeaveScope(); return structure; } diff --git a/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs b/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs index d582f12..f35e629 100644 --- a/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs @@ -36,7 +36,11 @@ public override void Link (LinkingContext ctx) public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { SubroutineAssemblyStructure subroutine = new SubroutineAssemblyStructure(context, Name.ToString()); + context.EnterScope(); + subroutine.AddSubStructure(Scope.Generalise(context)); + + context.LeaveScope(); return subroutine; } From 015d6572119dfb7e06945df8dd4ed3c34b7dcd62 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Fri, 24 Mar 2023 23:41:06 +0000 Subject: [PATCH 036/122] Scope/GlobalVariableCStatement TODOs --- Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs | 2 ++ Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs | 1 + 2 files changed, 3 insertions(+) diff --git a/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs b/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs index ae17ba9..639b4cc 100644 --- a/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs @@ -32,6 +32,8 @@ public void SetName (FullNameCToken name) public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { + // TODO Global variable C statement GeneralisationContext.AllocGlobal() + //ScopeAssemblyStructure scope = new ScopeAssemblyStructure(); // int i = (6 + 5); diff --git a/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs b/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs index 4616b02..f92bfe9 100644 --- a/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs @@ -31,6 +31,7 @@ public override void Link (LinkingContext ctx) public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { + // TODO Scope variable C statement GeneralisationContext.AllocStack() return new ArbitraryAssemblyStructure(ToString()!); } } From 4cf48795cec213719738fb9ef723b76f5c043eeb Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Fri, 24 Mar 2023 23:41:31 +0000 Subject: [PATCH 037/122] Update IData.cs --- RedFoxAssembly/CSharp/Statements/IData.cs | 30 +++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/RedFoxAssembly/CSharp/Statements/IData.cs b/RedFoxAssembly/CSharp/Statements/IData.cs index 8fdd0af..7af761d 100644 --- a/RedFoxAssembly/CSharp/Statements/IData.cs +++ b/RedFoxAssembly/CSharp/Statements/IData.cs @@ -11,15 +11,15 @@ namespace RedFoxAssembly.CSharp.Statements { internal interface IData { - public byte[] GetBytes(RFASMCompiler compiler); + public byte[] GetBytes (RFASMCompiler compiler); - int GetWidth(RFASMCompiler compiler); + int GetWidth (RFASMCompiler compiler); - public bool IsTargetingRegister(); + public bool IsTargetingRegister (); - public string ToString(); + public string ToString (); - public static RegisterTarget ParseRegisterTarget(char c) + public static RegisterTarget ParseRegisterTarget (char c) { char u = Char.ToUpper(c); switch (u) @@ -33,19 +33,17 @@ public static RegisterTarget ParseRegisterTarget(char c) throw new ParsingException("Cannot parse register prefix " + u); } - public static int GetRegisterOffset(RegisterTarget t) + public static int GetRegisterOffset (RegisterTarget t) { - //TODO Get proper register offsets (IData) - switch (t) + return t switch { - case RegisterTarget.NONE: return 0; - case RegisterTarget.REGISTER: return 0; - case RegisterTarget.SPECIALISED_REGISTER: return 0; - case RegisterTarget.GENERAL_REGISTER: return 128; - case RegisterTarget.COMPONENT_REGISTER: return 64; - } - - throw new ParsingException("Cannot get offset for register target " + t); + RegisterTarget.NONE => 0, + RegisterTarget.REGISTER => 0, + RegisterTarget.SPECIALISED_REGISTER => 0, + RegisterTarget.GENERAL_REGISTER => 128, + RegisterTarget.COMPONENT_REGISTER => 64, + _ => throw new ParsingException("Cannot get offset for register target " + t), + }; } public enum RegisterTarget From 26094687542979e62ad6d75f8e5051f8888205f3 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sat, 25 Mar 2023 14:58:48 +0000 Subject: [PATCH 038/122] Changing name-fixing and some linking responsibilities - GeneralisationContext.ReserveSubroutineName - GeneralisationContext.Subroutines - Generaliser.FixNameAndAdd - Generaliser.GetFlattenedPrefix + Improved AssemblyStructure ToStrings - Linker.GetAllStatements > LinkerHelper.LinkIdentifier is no longer obsolete + LinkingContext naming + Name linking for Functions, Structures, and all Variables --- .../Generalising/GeneralisationContext.cs | 30 +-- Crimson/CSharp/Generalising/Generaliser.cs | 47 +---- .../Structures/ArbitraryAssemblyStructure.cs | 2 +- .../Structures/ConstantAssemblyStructure.cs | 2 +- .../Structures/JumpAssemblyStructure.cs | 2 +- .../Structures/LabelAssemblyStructure.cs | 2 +- .../Structures/ReturnAssemblyStructure.cs | 2 +- .../Structures/ScopeAssemblyStructure.cs | 3 +- .../Structures/SubroutineAssemblyStructure.cs | 5 +- Crimson/CSharp/Linking/Linker.cs | 20 +- Crimson/CSharp/Linking/LinkerHelper.cs | 1 - Crimson/CSharp/Linking/LinkingContext.cs | 45 ++++ Crimson/CSharp/Parsing/ScopeVisitor.cs | 1 + .../Parsing/Statements/FunctionCStatement.cs | 2 + .../Statements/FunctionCallCStatement.cs | 1 + .../Statements/GlobalVariableCStatement.cs | 34 +-- .../Statements/OperationHandlerCStatement.cs | 1 + .../Parsing/Statements/ReturnCStatement.cs | 2 +- .../Statements/ScopeVariableCStatement.cs | 2 + .../Parsing/Statements/StructureCStatement.cs | 1 + .../VariableAssignmentCStatement.cs | 1 + .../CSharp/Parsing/Tokens/ConditionCToken.cs | 1 + .../Tokens/IdentifierSimpleValueCToken.cs | 39 ---- .../Tokens/{ => Values}/ComplexValueCToken.cs | 2 +- .../FunctionCallResolvableValueCToken.cs | 8 +- .../Values/IdentifierSimpleValueCToken.cs | 56 +++++ .../OperationResolvableValueCToken.cs | 8 +- .../{ => Values}/RawResolvableValueCToken.cs | 7 +- .../Tokens/{ => Values}/SimpleValueCToken.cs | 7 +- .../Test Compilations/result/main.gen | 196 ++++-------------- .../Test Compilations/result/main.rfp | 196 ++++-------------- 31 files changed, 249 insertions(+), 477 deletions(-) delete mode 100644 Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs rename Crimson/CSharp/Parsing/Tokens/{ => Values}/ComplexValueCToken.cs (84%) rename Crimson/CSharp/Parsing/Tokens/{ => Values}/FunctionCallResolvableValueCToken.cs (70%) create mode 100644 Crimson/CSharp/Parsing/Tokens/Values/IdentifierSimpleValueCToken.cs rename Crimson/CSharp/Parsing/Tokens/{ => Values}/OperationResolvableValueCToken.cs (85%) rename Crimson/CSharp/Parsing/Tokens/{ => Values}/RawResolvableValueCToken.cs (76%) rename Crimson/CSharp/Parsing/Tokens/{ => Values}/SimpleValueCToken.cs (59%) diff --git a/Crimson/CSharp/Generalising/GeneralisationContext.cs b/Crimson/CSharp/Generalising/GeneralisationContext.cs index 2e6cdde..33819d2 100644 --- a/Crimson/CSharp/Generalising/GeneralisationContext.cs +++ b/Crimson/CSharp/Generalising/GeneralisationContext.cs @@ -1,29 +1,19 @@ -namespace Crimson.CSharp.Generalising +using Crimson.CSharp.Parsing.Statements; + +namespace Crimson.CSharp.Generalising { public class GeneralisationContext { - private HashSet Subroutines { get; set; } + public Dictionary Globals { get; } + public Dictionary Functions { get; } + public Dictionary Structures { get; } - public GeneralisationContext () + public GeneralisationContext (Dictionary functions, Dictionary structures, Dictionary globals) { - Subroutines = new HashSet(); StackPointerStack = new Stack(); - } - - /// - /// Adds the given name to a set of names of the subroutines contained within this context. - /// Fails if the given name already exists in the set. - /// There should be no duplicates at this stage because it would cause errors during linking, - /// but it's better to be safe than sorry because I really don't trust this process to not goof - /// sometimes. - /// - /// The name to check. - /// The input name. - /// If the given name has been reserved before. - public string ReserveSubroutineName (string sub) - { - if (!Subroutines.Add(sub)) throw new DuplicateNameException($"Cannot add second subroutine with name {sub} to GeneralisationContext."); - return sub; + Functions = functions; + Structures = structures; + Globals = globals; } diff --git a/Crimson/CSharp/Generalising/Generaliser.cs b/Crimson/CSharp/Generalising/Generaliser.cs index b5f626c..89d263b 100644 --- a/Crimson/CSharp/Generalising/Generaliser.cs +++ b/Crimson/CSharp/Generalising/Generaliser.cs @@ -18,11 +18,9 @@ public GeneralAssemblyProgram Generalise (Compilation compilation) { GeneralAssemblyProgram program = new GeneralAssemblyProgram(); - GeneralisationContext context = new GeneralisationContext(); - Dictionary functions = new Dictionary(); Dictionary structures = new Dictionary(); - Dictionary variables = new Dictionary(); + Dictionary globals = new Dictionary(); /* * Create 3 universal lists which contain all of the statements. @@ -33,18 +31,20 @@ public GeneralAssemblyProgram Generalise (Compilation compilation) { foreach (var f in pair.Value.Functions) { - FixNameAndAdd(functions, f.Value); + functions.Add(f.Value.Name.ToString(), f.Value); } foreach (var s in pair.Value.Structures) { - FixNameAndAdd(structures, s.Value); + structures.Add(s.Value.Name.ToString(), s.Value); } foreach (var g in pair.Value.GlobalVariables) { - FixNameAndAdd(variables, g.Value); + globals.Add(g.Value.GetName().ToString(), g.Value); } } + GeneralisationContext context = new GeneralisationContext(functions, structures, globals); + // Add versioning and credits program.AddStructure(new CommentAssemblyStructure("This CrimsonBasic program was automatically generated by the Crimson compiler.")); program.AddStructure(new CommentAssemblyStructure("Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x")); @@ -59,7 +59,7 @@ public GeneralAssemblyProgram Generalise (Compilation compilation) LOGGER.Info("Generalising global variables"); program.AddStructure(new CommentAssemblyStructure("")); program.AddStructure(new CommentAssemblyStructure("============================== Global Variables ==============================")); - foreach (var pair in variables) + foreach (var pair in globals) { IGeneralAssemblyStructure bs = pair.Value.Generalise(context); program.AddStructure(bs); @@ -89,38 +89,5 @@ public GeneralAssemblyProgram Generalise (Compilation compilation) return program; } - - private void FixNameAndAdd (Dictionary map, GS gs) where GS : INamed - { - int i = 0; - string prefix = GetFlattenedPrefix(gs.GetType()); - while (map.ContainsKey(gs.GetName() + "_" + i)) - { - i++; - } - gs.SetName(new FullNameCToken($"{prefix}_{gs.GetName()}_{i}")); - map.Add(gs.GetName().ToString(), gs); - } - - private string GetFlattenedPrefix (Type type) - { - if (type == typeof(FunctionCStatement)) - { - return "func"; - } - if (type == typeof(StructureCStatement)) - { - return "stru"; - } - if (type == typeof(GlobalVariableCStatement)) - { - return "gvar"; - } - if (type == typeof(ScopeVariableCStatement)) - { - return "ivar"; - } - return ""; - } } } diff --git a/Crimson/CSharp/Generalising/Structures/ArbitraryAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/ArbitraryAssemblyStructure.cs index 0e2c948..e4f3ce3 100644 --- a/Crimson/CSharp/Generalising/Structures/ArbitraryAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/ArbitraryAssemblyStructure.cs @@ -11,7 +11,7 @@ public ArbitraryAssemblyStructure (string text) public override string ToString () { - return Text; + return "ARB: " + Text; } public IEnumerable GetSubStructures () diff --git a/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs index 04abbac..8b5aef1 100644 --- a/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs @@ -29,7 +29,7 @@ IEnumerable IGeneralAssemblyStructure.GetSubStructure public override string ToString () { - return $"{Name}={Value}"; + return $"CON: {Name}={Value}"; } } } \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs index b01e782..a8a7014 100644 --- a/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs @@ -11,7 +11,7 @@ public JumpAssemblyStructure (string target) public override string ToString () { - return "Jump: " + Target; + return "JMP: " + Target; } public IEnumerable GetSubStructures () diff --git a/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs index 18a141e..5ff9bac 100644 --- a/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs @@ -11,7 +11,7 @@ public LabelAssemblyStructure (string name) public override string ToString () { - return "Label: " + Text; + return "LAB: " + Text; } public IEnumerable GetSubStructures () diff --git a/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs index cc9c001..19026c3 100644 --- a/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs @@ -13,7 +13,7 @@ public IEnumerable GetSubStructures () public override string ToString () { - return "Return"; + return "RET"; } } } \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs index 99b3346..cb29f85 100644 --- a/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs @@ -21,7 +21,8 @@ IEnumerable IGeneralAssemblyStructure.GetSubStructure public override string ToString () { - return $"{{\n {String.Join("\n\t", Structures)} \n}}"; + return $"SCP: " + + $"\n {String.Join("\n ", Structures)}"; } } } \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs b/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs index 18b3b48..95249a5 100644 --- a/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs +++ b/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs @@ -17,8 +17,6 @@ private set { } public SubroutineAssemblyStructure (GeneralisationContext context, string name) { Name = name; - _ = context.ReserveSubroutineName(Name); - _ = context.ReserveSubroutineName(EndName); Structures = new List(); } @@ -29,7 +27,8 @@ public void AddSubStructure (IGeneralAssemblyStructure labelAssemblyStructure) public override string ToString () { - return $"{Name}: {{\n{String.Join("\n ", Structures)}\n}}"; + return $"SUB:\n" + + $"{String.Join("\n ", Structures)}"; } IEnumerable IGeneralAssemblyStructure.GetSubStructures () diff --git a/Crimson/CSharp/Linking/Linker.cs b/Crimson/CSharp/Linking/Linker.cs index a40f1a9..c855e9e 100644 --- a/Crimson/CSharp/Linking/Linker.cs +++ b/Crimson/CSharp/Linking/Linker.cs @@ -18,6 +18,8 @@ public Linker (CrimsonOptions options) Options = options; } + // TODO Linking must include renaming functions/variables and reach down to identifiers simple values etc. + /// /// Links the FunctionCalls in a Compilation. /// @@ -45,23 +47,5 @@ public void Link (Compilation compilation) return; } - - private static List GetAllStatements (Scope unit) - { - var statements = new List(); - foreach (var s in unit.Functions.Values) - { - statements.Add(s); - } - foreach (var s in unit.Structures.Values) - { - statements.Add(s); - } - foreach (var s in unit.GlobalVariables.Values) - { - statements.Add(s); - } - return statements; - } } } \ No newline at end of file diff --git a/Crimson/CSharp/Linking/LinkerHelper.cs b/Crimson/CSharp/Linking/LinkerHelper.cs index 72db80d..d69ddac 100644 --- a/Crimson/CSharp/Linking/LinkerHelper.cs +++ b/Crimson/CSharp/Linking/LinkerHelper.cs @@ -57,7 +57,6 @@ internal static FunctionCStatement LinkFunctionCall (FullNameCToken identifier, throw new LinkingException($"The idenifier {identifier} with no member name somehow got through the parsing process?"); } - [Obsolete] internal static FullNameCToken LinkIdentifier (FullNameCToken identifier, LinkingContext ctx) { if (identifier == null) throw new LinkingException("Cannot link a null identifer"); diff --git a/Crimson/CSharp/Linking/LinkingContext.cs b/Crimson/CSharp/Linking/LinkingContext.cs index 8f41447..12e7290 100644 --- a/Crimson/CSharp/Linking/LinkingContext.cs +++ b/Crimson/CSharp/Linking/LinkingContext.cs @@ -1,6 +1,7 @@ using Crimson.CSharp.Core; using Crimson.CSharp.Exceptions; using Crimson.CSharp.Parsing; +using Crimson.CSharp.Parsing.Tokens; namespace Crimson.CSharp.Linking { @@ -57,6 +58,50 @@ internal Scope GetScope (string alias) throw new LinkingException("No alias '" + alias + "' in " + ToString()); } + // ===== NAMING ===== + + private Dictionary _gvarCounts = new Dictionary(); + public FullNameCToken GetUniqueGlobalVariableName (FullNameCToken commonName) + { + string name = commonName.ToString(); + if (!_gvarCounts.ContainsKey(name)) + _gvarCounts[name] = 0; + _gvarCounts[name]++; + return new FullNameCToken($"gvar_{name}_{_gvarCounts[name] - 1}"); + } + + private Dictionary _struCounts = new Dictionary(); + public FullNameCToken GetUniqueStructureName (FullNameCToken commonName) + { + string name = commonName.ToString(); + if (!_struCounts.ContainsKey(name)) + _struCounts[name] = 0; + _struCounts[name]++; + return new FullNameCToken($"stru_{name}_{_struCounts[name] - 1}"); + } + + private Dictionary _funcCounts = new Dictionary(); + public FullNameCToken GetUniqueFunctionName (FullNameCToken commonName) + { + string name = commonName.ToString(); + if (!_funcCounts.ContainsKey(name)) + _funcCounts[name] = 0; + _funcCounts[name]++; + return new FullNameCToken($"func_{name}_{_funcCounts[name] - 1}"); + } + + private Dictionary _svarCounts = new Dictionary(); + public FullNameCToken GetUniqueScopeVariableName (FullNameCToken commonName) + { + string name = commonName.ToString(); + if (!_svarCounts.ContainsKey(name)) + _svarCounts[name] = 0; + _svarCounts[name]++; + return new FullNameCToken($"svar_{name}_{_svarCounts[name] - 1}"); + } + + // ===== ===== + public override string ToString () { return $"LinkingContext (scope:{CurrentScope}; links:[{string.Join(",", Links)}])"; diff --git a/Crimson/CSharp/Parsing/ScopeVisitor.cs b/Crimson/CSharp/Parsing/ScopeVisitor.cs index c3e9be1..d509c17 100644 --- a/Crimson/CSharp/Parsing/ScopeVisitor.cs +++ b/Crimson/CSharp/Parsing/ScopeVisitor.cs @@ -3,6 +3,7 @@ using Crimson.CSharp.Exceptions; using Crimson.CSharp.Parsing.Statements; using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Parsing.Tokens.Values; using NLog; using static Crimson.CSharp.Parsing.Tokens.Comparator; diff --git a/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs b/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs index f35e629..29dd8ec 100644 --- a/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs @@ -2,6 +2,7 @@ using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Parsing.Tokens.Values; using Crimson.CSharp.Specialising; namespace Crimson.CSharp.Parsing.Statements @@ -26,6 +27,7 @@ public FunctionCStatement (Header header, Scope scope) public override void Link (LinkingContext ctx) { if (Linked) return; + Name = ctx.GetUniqueFunctionName(Name); ((ICrimsonToken) FunctionHeader).Link(ctx); Scope.Link(ctx); diff --git a/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs b/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs index 02abf7c..e473a8a 100644 --- a/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs @@ -3,6 +3,7 @@ using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Parsing.Tokens.Values; namespace Crimson.CSharp.Parsing.Statements { diff --git a/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs b/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs index 639b4cc..c559bcb 100644 --- a/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/GlobalVariableCStatement.cs @@ -17,6 +17,7 @@ public class GlobalVariableCStatement : AbstractCrimsonStatement, INamed public override void Link (LinkingContext ctx) { + Assignment.Name = ctx.GetUniqueGlobalVariableName(Assignment.Name); Linked = true; } @@ -32,22 +33,31 @@ public void SetName (FullNameCToken name) public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) { - // TODO Global variable C statement GeneralisationContext.AllocGlobal() + // Can evaluate size at compile time + if (Assignment.Size.CanEvaluate()) + { - //ScopeAssemblyStructure scope = new ScopeAssemblyStructure(); + // Desperately try to parse to an integer + object? eval = Assignment.Size.Evaluate(context); + if (eval == null) + throw new NullReferenceException($"Compile-time evaluation of a the global variable {GetName()}'s size may not return null."); + if (eval is not int size) + { + if (!Int32.TryParse(eval.ToString(), out size)) + { + throw new InvalidCastException($"The size '{eval}' of a of the global variable {GetName()} could not be parsed to an integer: found type {eval.GetType()}."); + } + } + + int addrOffset = context.AllocGlobal(size); + return new CommentAssemblyStructure($"GVAR: {GetName()}, addrOffset={addrOffset}"); + } - // int i = (6 + 5); - if (Assignment.Complex != null) + // Cannot evaluate size at compile time + else { - // Fragment valueStatements = Assignment.Complex.GetBasicFragment(); - return new CommentAssemblyStructure($"Set {Assignment.Name.ToString()}=RESULT"); + return new CommentAssemblyStructure($"GVAR: {GetName()}=?"); } - else if (Assignment.Simple != null) - return new CommentAssemblyStructure($"Assign {Assignment.Name.ToString()}={Assignment.Simple.GetText()}"); - else - throw new FlatteningException("Unable to flatten internal variable with no simple or complex value"); - - // return scope; } } } diff --git a/Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs b/Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs index 1480def..bfa7bab 100644 --- a/Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs @@ -2,6 +2,7 @@ using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Parsing.Tokens.Values; using Crimson.CSharp.Specialising; namespace Crimson.CSharp.Parsing.Statements diff --git a/Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs b/Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs index 4a2dd05..bc9a571 100644 --- a/Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs @@ -1,7 +1,7 @@ using Crimson.CSharp.Generalising; using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Parsing.Tokens.Values; namespace Crimson.CSharp.Parsing.Statements { diff --git a/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs b/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs index f92bfe9..97977b4 100644 --- a/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs @@ -3,6 +3,7 @@ using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Parsing.Tokens.Values; using Crimson.CSharp.Specialising; namespace Crimson.CSharp.Parsing.Statements @@ -24,6 +25,7 @@ public ScopeVariableCStatement (FullNameCToken identifier, SimpleValueCToken siz public override void Link (LinkingContext ctx) { + Identifier = ctx.GetUniqueScopeVariableName(Identifier); Size.Link(ctx); Identifier.Link(ctx); Linked = true; diff --git a/Crimson/CSharp/Parsing/Statements/StructureCStatement.cs b/Crimson/CSharp/Parsing/Statements/StructureCStatement.cs index a2b702e..40133cb 100644 --- a/Crimson/CSharp/Parsing/Statements/StructureCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/StructureCStatement.cs @@ -25,6 +25,7 @@ public override IGeneralAssemblyStructure Generalise (GeneralisationContext cont public override void Link (LinkingContext ctx) { + Name = ctx.GetUniqueFunctionName(Name); Linked = true; } diff --git a/Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs b/Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs index 262aadd..da1cc7d 100644 --- a/Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs @@ -3,6 +3,7 @@ using Crimson.CSharp.Generalising.Structures; using Crimson.CSharp.Linking; using Crimson.CSharp.Parsing.Tokens; +using Crimson.CSharp.Parsing.Tokens.Values; using Crimson.CSharp.Specialising; using System; diff --git a/Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs b/Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs index 13ae5f6..365fbf0 100644 --- a/Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs @@ -1,4 +1,5 @@ using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Tokens.Values; using Crimson.CSharp.Specialising; namespace Crimson.CSharp.Parsing.Tokens diff --git a/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs deleted file mode 100644 index 22b0a58..0000000 --- a/Crimson/CSharp/Parsing/Tokens/IdentifierSimpleValueCToken.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Crimson.CSharp.Linking; - -namespace Crimson.CSharp.Parsing.Tokens -{ - public class IdentifierSimpleValueCToken : SimpleValueCToken - { - public FullNameCToken Identifier { get; private set; } - - public IdentifierSimpleValueCToken (FullNameCToken identifier) - { - Identifier = identifier; - } - - public override void Link (LinkingContext ctx) - { - Identifier = LinkerHelper.LinkIdentifier(Identifier, ctx); - } - - public override string ToString () - { - return GetText(); - } - - public override string GetText () - { - return Identifier.ToString(); - } - - public override bool CanEvaluate () - { - return false; - } - - public override object Evaluate () - { - return Identifier; - } - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/ComplexValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/Values/ComplexValueCToken.cs similarity index 84% rename from Crimson/CSharp/Parsing/Tokens/ComplexValueCToken.cs rename to Crimson/CSharp/Parsing/Tokens/Values/ComplexValueCToken.cs index e654b94..fb7e398 100644 --- a/Crimson/CSharp/Parsing/Tokens/ComplexValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/Values/ComplexValueCToken.cs @@ -1,7 +1,7 @@ using Crimson.CSharp.Linking; using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.CSharp.Parsing.Tokens.Values { public abstract class ComplexValueCToken : ICrimsonToken { diff --git a/Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/Values/FunctionCallResolvableValueCToken.cs similarity index 70% rename from Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs rename to Crimson/CSharp/Parsing/Tokens/Values/FunctionCallResolvableValueCToken.cs index 83c7780..2d14cee 100644 --- a/Crimson/CSharp/Parsing/Tokens/FunctionCallResolvableValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/Values/FunctionCallResolvableValueCToken.cs @@ -4,23 +4,23 @@ using Crimson.CSharp.Parsing.Statements; using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.CSharp.Parsing.Tokens.Values { public class FunctionCallResolvableValueCToken : ComplexValueCToken { public FunctionCallCStatement FunctionCall { get; } - public FunctionCallResolvableValueCToken (FunctionCallCStatement functionCall) + public FunctionCallResolvableValueCToken(FunctionCallCStatement functionCall) { FunctionCall = functionCall; } - public override void Link (LinkingContext ctx) + public override void Link(LinkingContext ctx) { FunctionCall.Link(ctx); } - public override string ToString () + public override string ToString() { return "Call: " + FunctionCall.Identifier.ToString() + "()"; } diff --git a/Crimson/CSharp/Parsing/Tokens/Values/IdentifierSimpleValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/Values/IdentifierSimpleValueCToken.cs new file mode 100644 index 0000000..f7b10ca --- /dev/null +++ b/Crimson/CSharp/Parsing/Tokens/Values/IdentifierSimpleValueCToken.cs @@ -0,0 +1,56 @@ +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Linking; +using Crimson.CSharp.Parsing.Statements; +using static System.Formats.Asn1.AsnWriter; +using System.Numerics; + +namespace Crimson.CSharp.Parsing.Tokens.Values +{ + public class IdentifierSimpleValueCToken : SimpleValueCToken + { + public FullNameCToken Identifier { get; private set; } + public ScopeVariableCStatement? ScopeVariable { get; private set; } + public GlobalVariableCStatement? GlobalVariable { get; private set; } + + public IdentifierSimpleValueCToken (FullNameCToken identifier) + { + Identifier = identifier; + } + + public override void Link (LinkingContext ctx) + { + // TODO Scope.FindScopeVariable(MemberName); + ScopeVariable = ctx.CurrentScope.FindScopeVariable(Identifier.MemberName!); + + // TODO LinkingContext.GetGlobalVariable(MemberName); + if (ScopeVariable == null) + { + GlobalVariable = ctx.GetGlobalVariable(Identifier.MemberName); + } + } + + public override string ToString () + { + return GetText(); + } + + public override string GetText () + { + return Identifier.ToString(); + } + + public override bool CanEvaluate () + { + return true; + } + + public override object Evaluate (GeneralisationContext context) + { + if (context.Globals.TryGetValue(Identifier.ToString(), out GlobalVariableCStatement global)) + { + + } + throw new NullReferenceException($"Error generalising '{GetType()}' '{this}': there is no variable {Identifier}"); + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/OperationResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/Values/OperationResolvableValueCToken.cs similarity index 85% rename from Crimson/CSharp/Parsing/Tokens/OperationResolvableValueCToken.cs rename to Crimson/CSharp/Parsing/Tokens/Values/OperationResolvableValueCToken.cs index cbca1c7..6fc6e39 100644 --- a/Crimson/CSharp/Parsing/Tokens/OperationResolvableValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/Values/OperationResolvableValueCToken.cs @@ -3,7 +3,7 @@ using Crimson.CSharp.Specialising; using System.Net.Http; -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.CSharp.Parsing.Tokens.Values { public class OperationResolvableValueCToken : ComplexValueCToken { @@ -12,20 +12,20 @@ public class OperationResolvableValueCToken : ComplexValueCToken public SimpleValueCToken LeftToken { get; } public SimpleValueCToken RightToken { get; } - public OperationResolvableValueCToken (SimpleValueCToken leftToken, OperationType opType, SimpleValueCToken rightToken) + public OperationResolvableValueCToken(SimpleValueCToken leftToken, OperationType opType, SimpleValueCToken rightToken) { LeftToken = leftToken; OpType = opType; RightToken = rightToken; } - public override void Link (LinkingContext ctx) + public override void Link(LinkingContext ctx) { LeftToken.Link(ctx); RightToken.Link(ctx); } - public static OperationType ParseOpType (string s) + public static OperationType ParseOpType(string s) { s = s.Trim(); return s switch diff --git a/Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/Values/RawResolvableValueCToken.cs similarity index 76% rename from Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs rename to Crimson/CSharp/Parsing/Tokens/Values/RawResolvableValueCToken.cs index 7e371f0..596a981 100644 --- a/Crimson/CSharp/Parsing/Tokens/RawResolvableValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/Values/RawResolvableValueCToken.cs @@ -1,6 +1,7 @@ -using Crimson.CSharp.Linking; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Linking; -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.CSharp.Parsing.Tokens.Values { public class RawResolvableValueCToken : SimpleValueCToken { @@ -25,7 +26,7 @@ public override string GetText () return Content; } - public override object Evaluate () + public override object Evaluate (GeneralisationContext context) { return Content; } diff --git a/Crimson/CSharp/Parsing/Tokens/SimpleValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/Values/SimpleValueCToken.cs similarity index 59% rename from Crimson/CSharp/Parsing/Tokens/SimpleValueCToken.cs rename to Crimson/CSharp/Parsing/Tokens/Values/SimpleValueCToken.cs index 3ba0ddb..9d2c519 100644 --- a/Crimson/CSharp/Parsing/Tokens/SimpleValueCToken.cs +++ b/Crimson/CSharp/Parsing/Tokens/Values/SimpleValueCToken.cs @@ -1,6 +1,7 @@ -using Crimson.CSharp.Linking; +using Crimson.CSharp.Generalising; +using Crimson.CSharp.Linking; -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.CSharp.Parsing.Tokens.Values { public abstract class SimpleValueCToken : ICrimsonToken { @@ -10,6 +11,6 @@ public SimpleValueCToken () public abstract void Link (LinkingContext ctx); public abstract string GetText (); public abstract bool CanEvaluate (); - public abstract object Evaluate (); + public abstract object Evaluate (GeneralisationContext context); } } \ No newline at end of file diff --git a/Crimson/Resources/Test Compilations/result/main.gen b/Crimson/Resources/Test Compilations/result/main.gen index ece9975..69ea615 100644 --- a/Crimson/Resources/Test Compilations/result/main.gen +++ b/Crimson/Resources/Test Compilations/result/main.gen @@ -8,171 +8,45 @@ // ============================== Global Variables ============================== -// Assign gvar_regions_i_0=0 -// Assign gvar_regions_length_0=0 -// Assign gvar_regions_region_0=0 -// Assign gvar_int_size_0=4 -// Assign gvar_ptr_size_0=4 -// Assign gvar_counter_0=0 -// Assign gvar_int_0=4 -// Assign gvar_ptr_0=4 // ============================== Entry Function ============================== -func_main_0: { -{ - example basic call - example assemby call - ScopeVariableCStatement - ScopeVariableCStatement - { - // a=/Call: utils.multiply() -} - { - // b=/Call: utils.times() -} - { +SUB: +SCP: + ARB: example basic call + ARB: example assemby call + ARB: ScopeVariableCStatement + ARB: ScopeVariableCStatement + SCP: + // a=/Call: utils.multiply() + SCP: + // b=/Call: utils.times() + SCP: - Jump: NEXT_ELIF - { - { - // counter=5/ -} -} - Jump: END_IF_BLOCK_UNIQUE_BRANCH_NAME - Label: END_IF_BLOCK_UNIQUE_BRANCH_NAME - -} - { + JMP: NEXT_ELIF + SCP: + SCP: + // counter=5/ + JMP: END_IF_BLOCK_UNIQUE_BRANCH_NAME + LAB: END_IF_BLOCK_UNIQUE_BRANCH_NAME + + SCP: // FC start - Jump: func_call_0 - // FC end -} - ScopeVariableCStatement - { - // i=/Call: heap.alloc() -} - { - // i=4/ -} - { + JMP: func_call_0 + // FC end + ARB: ScopeVariableCStatement + SCP: + // i=/Call: heap.alloc() + SCP: + // i=4/ + SCP: // FC start - Jump: func_write_0 - // FC end -} - ScopeVariableCStatement - { - // ret=/Call: heap.alloc() -} - { - // ret=/Call: utils.multiply() -} - Return -} -} + JMP: func_write_0 + // FC end + ARB: ScopeVariableCStatement + SCP: + // ret=/Call: heap.alloc() + SCP: + // ret=/Call: utils.multiply() + RET // ============================== Functions ============================== -func_multiply_0: { -{ - { - // FC start - Jump: func_write_0 - // FC end -} - Return -} -} -func_times_0: { -{ - { - // ret<4>=/Call: multiply() -} - Return -} -} -func_write_0: { -{ - -} -} -func_alloc_0: { -{ - { - // i=0/ -} - { - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << -} - Return -} -} -func_get_region_ptr_0: { -{ - { - // RRMS=/Crimson.CSharp.Parsing.Tokens.OperationResolvableValueCToken -} - { - // exponential_offset=4/ -} - { - - Jump: NEXT_ELIF - { - -} - Jump: END_IF_BLOCK_UNIQUE_BRANCH_NAME - Label: END_IF_BLOCK_UNIQUE_BRANCH_NAME - -} - { - // HO_EXP=/Crimson.CSharp.Parsing.Tokens.OperationResolvableValueCToken -} - { - // HO_EXP_RRMS=/Crimson.CSharp.Parsing.Tokens.OperationResolvableValueCToken -} - Return -} -} -func_freeptr_0: { -{ - { - // r=0/ -} - { - // region_ptr=/Call: get_region_ptr() -} - { - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << -} - { - // FC start - Jump: func_freeregion_0 - // FC end -} -} -} -func_freeregion_0: { -{ - { - // regions_region=0/ -} -} -} -func_pwr_0: { -{ - { - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << -} -} -} -func_call_0: { -{ - ScopeVariableCStatement - { - // test=/Call: heap.alloc() -} - Return -} -} diff --git a/Crimson/Resources/Test Compilations/result/main.rfp b/Crimson/Resources/Test Compilations/result/main.rfp index 557bcbd..6f31f09 100644 --- a/Crimson/Resources/Test Compilations/result/main.rfp +++ b/Crimson/Resources/Test Compilations/result/main.rfp @@ -8,171 +8,45 @@ // ============================== Global Variables ============================== -// Assign gvar_regions_i_0=0 -// Assign gvar_regions_length_0=0 -// Assign gvar_regions_region_0=0 -// Assign gvar_int_size_0=4 -// Assign gvar_ptr_size_0=4 -// Assign gvar_counter_0=0 -// Assign gvar_int_0=4 -// Assign gvar_ptr_0=4 // ============================== Entry Function ============================== -// func_main_0: { -{ - example basic call - example assemby call - ScopeVariableCStatement - ScopeVariableCStatement - { - // a=/Call: utils.multiply() -} - { - // b=/Call: utils.times() -} - { +// SUB: +SCP: + ARB: example basic call + ARB: example assemby call + ARB: ScopeVariableCStatement + ARB: ScopeVariableCStatement + SCP: + // a=/Call: utils.multiply() + SCP: + // b=/Call: utils.times() + SCP: - Jump: NEXT_ELIF - { - { - // counter=5/ -} -} - Jump: END_IF_BLOCK_UNIQUE_BRANCH_NAME - Label: END_IF_BLOCK_UNIQUE_BRANCH_NAME - -} - { + JMP: NEXT_ELIF + SCP: + SCP: + // counter=5/ + JMP: END_IF_BLOCK_UNIQUE_BRANCH_NAME + LAB: END_IF_BLOCK_UNIQUE_BRANCH_NAME + + SCP: // FC start - Jump: func_call_0 - // FC end -} - ScopeVariableCStatement - { - // i=/Call: heap.alloc() -} - { - // i=4/ -} - { + JMP: func_call_0 + // FC end + ARB: ScopeVariableCStatement + SCP: + // i=/Call: heap.alloc() + SCP: + // i=4/ + SCP: // FC start - Jump: func_write_0 - // FC end -} - ScopeVariableCStatement - { - // ret=/Call: heap.alloc() -} - { - // ret=/Call: utils.multiply() -} - Return -} -} + JMP: func_write_0 + // FC end + ARB: ScopeVariableCStatement + SCP: + // ret=/Call: heap.alloc() + SCP: + // ret=/Call: utils.multiply() + RET // ============================== Functions ============================== -// func_multiply_0: { -{ - { - // FC start - Jump: func_write_0 - // FC end -} - Return -} -} -// func_times_0: { -{ - { - // ret<4>=/Call: multiply() -} - Return -} -} -// func_write_0: { -{ - -} -} -// func_alloc_0: { -{ - { - // i=0/ -} - { - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << -} - Return -} -} -// func_get_region_ptr_0: { -{ - { - // RRMS=/Crimson.CSharp.Parsing.Tokens.OperationResolvableValueCToken -} - { - // exponential_offset=4/ -} - { - - Jump: NEXT_ELIF - { - -} - Jump: END_IF_BLOCK_UNIQUE_BRANCH_NAME - Label: END_IF_BLOCK_UNIQUE_BRANCH_NAME - -} - { - // HO_EXP=/Crimson.CSharp.Parsing.Tokens.OperationResolvableValueCToken -} - { - // HO_EXP_RRMS=/Crimson.CSharp.Parsing.Tokens.OperationResolvableValueCToken -} - Return -} -} -// func_freeptr_0: { -{ - { - // r=0/ -} - { - // region_ptr=/Call: get_region_ptr() -} - { - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << -} - { - // FC start - Jump: func_freeregion_0 - // FC end -} -} -} -// func_freeregion_0: { -{ - { - // regions_region=0/ -} -} -} -// func_pwr_0: { -{ - { - // >> TODO IMPLEMENT WHILE (start) << - // >> TODO IMPLEMENT WHILE (end) << -} -} -} -// func_call_0: { -{ - ScopeVariableCStatement - { - // test=/Call: heap.alloc() -} - Return -} -} From b821d839d5b0b0695a76e80c1e6c037bcf010446 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 28 Mar 2023 18:17:59 +0100 Subject: [PATCH 039/122] Implement Scope.GetScopeVariable() --- Crimson/CSharp/Linking/LinkingContext.cs | 8 ++++++++ Crimson/CSharp/Parsing/Scope.cs | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/Crimson/CSharp/Linking/LinkingContext.cs b/Crimson/CSharp/Linking/LinkingContext.cs index 12e7290..36cd700 100644 --- a/Crimson/CSharp/Linking/LinkingContext.cs +++ b/Crimson/CSharp/Linking/LinkingContext.cs @@ -1,6 +1,7 @@ using Crimson.CSharp.Core; using Crimson.CSharp.Exceptions; using Crimson.CSharp.Parsing; +using Crimson.CSharp.Parsing.Statements; using Crimson.CSharp.Parsing.Tokens; namespace Crimson.CSharp.Linking @@ -106,5 +107,12 @@ public override string ToString () { return $"LinkingContext (scope:{CurrentScope}; links:[{string.Join(",", Links)}])"; } + + internal GlobalVariableCStatement? GetGlobalVariable(string memberName) + { + // TODO Check LinkingContext.GetGlobalVariable() works + + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs index d50d8d4..87fb2d2 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -93,6 +93,7 @@ public string GetPath () public Dictionary Imports { get; private set; } public List OpHandlers { get; private set; } public Dictionary Functions { get; private set; } + public Dictionary Variables { get; private set; } public Dictionary Structures { get; private set; } public Dictionary GlobalVariables { get; private set; } @@ -226,5 +227,17 @@ public override string ToString () return $"Scope({Name}; I:{Imports.Count} F:{Functions.Count} S:{Structures.Count} G:{GlobalVariables.Count})"; } + + internal ScopeVariableCStatement? FindScopeVariable(string name) + { + // TODO Check Scope.FindScopeVariable works + Scope parent = this; + ScopeVariableCStatement var = null; + if(!Variables.TryGetValue(name, out var) && HasParent()) + { + return GetParent().FindScopeVariable(name); + } + return var; + } } } \ No newline at end of file From 905be6f7095e896790a462a25784874047ef57e9 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 28 Mar 2023 22:09:35 +0100 Subject: [PATCH 040/122] Trying desperately to make VSCode work + Scope now tracking ScopeVariables seperately as well + ScopeVariable now implements INamed --- .vscode/launch.json | 26 ++++++++++++ .vscode/tasks.json | 41 +++++++++++++++++++ Crimson/CSharp/Parsing/Scope.cs | 13 +++--- .../Statements/ScopeVariableCStatement.cs | 12 +++++- 4 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..ed38ef6 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + "version": "0.2.0", + "configurations": [ + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/Crimson/bin/Debug/net6.0/Crimson.dll", + "args": [], + "cwd": "${workspaceFolder}/Crimson", + // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console + "console": "internalConsole", + "stopAtEntry": false + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..7e2a385 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,41 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/Crimson/Crimson.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/Crimson/Crimson.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "--project", + "${workspaceFolder}/Crimson/Crimson.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs index 87fb2d2..3d8d9f1 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -45,6 +45,7 @@ private Scope (string name, Scope? parent, string? path) Imports = new Dictionary(); OpHandlers = new List(); Functions = new Dictionary(); + ScopeVariables = new Dictionary(); Structures = new Dictionary(); GlobalVariables = new Dictionary(); } @@ -93,7 +94,7 @@ public string GetPath () public Dictionary Imports { get; private set; } public List OpHandlers { get; private set; } public Dictionary Functions { get; private set; } - public Dictionary Variables { get; private set; } + public Dictionary ScopeVariables { get; private set; } public Dictionary Structures { get; private set; } public Dictionary GlobalVariables { get; private set; } @@ -138,8 +139,8 @@ void AddNamedIfNotDuplicate (Dictionary d, GCS gcs, string typ } // Special cases - if (statement is FunctionCStatement f) - AddNamedIfNotDuplicate(Functions, f, "Function"); + if (statement is FunctionCStatement f) AddNamedIfNotDuplicate(Functions, f, "Function"); + else if (statement is ScopeVariableCStatement v) AddNamedIfNotDuplicate(ScopeVariables, v, "Scope Variables"); else if (statement is GlobalVariableCStatement g) AddNamedIfNotDuplicate(GlobalVariables, g, "Global Variable"); else if (statement is StructureCStatement s) AddNamedIfNotDuplicate(Structures, s, "Structure"); else if (statement is Scope sc) @@ -230,10 +231,10 @@ public override string ToString () internal ScopeVariableCStatement? FindScopeVariable(string name) { - // TODO Check Scope.FindScopeVariable works + // TODO Check Scope.FindScopeVariable works Scope parent = this; - ScopeVariableCStatement var = null; - if(!Variables.TryGetValue(name, out var) && HasParent()) + ScopeVariableCStatement? var = null; + if(!ScopeVariables.TryGetValue(name, out var) && HasParent()) { return GetParent().FindScopeVariable(name); } diff --git a/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs b/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs index 97977b4..fc77b07 100644 --- a/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs @@ -8,7 +8,7 @@ namespace Crimson.CSharp.Parsing.Statements { - public class ScopeVariableCStatement : AbstractCrimsonStatement + public class ScopeVariableCStatement : AbstractCrimsonStatement, INamed { public SimpleValueCToken Size { get; set; } public FullNameCToken Identifier { get; private set; } @@ -36,5 +36,15 @@ public override IGeneralAssemblyStructure Generalise (GeneralisationContext cont // TODO Scope variable C statement GeneralisationContext.AllocStack() return new ArbitraryAssemblyStructure(ToString()!); } + + public FullNameCToken GetName() + { + return Identifier; + } + + public void SetName(FullNameCToken name) + { + Identifier = name; + } } } \ No newline at end of file From e77fb97a7cde3a6289552bb5d9d733d3d39997e0 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Thu, 30 Mar 2023 19:26:29 +0100 Subject: [PATCH 041/122] Async things --- Crimson/CSharp/Core/Compilation.cs | 36 +---- Crimson/CSharp/Core/Crimson.cs | 2 +- Crimson/CSharp/Core/CrimsonCompiler.cs | 10 +- .../Core/{Library.cs => FileOnlyLibrary.cs} | 136 +++++++++++++----- Crimson/CSharp/Core/ILibrary.cs | 11 ++ Crimson/CSharp/Generalising/Generaliser.cs | 8 +- Crimson/CSharp/Linking/Linker.cs | 5 +- Crimson/CSharp/Parsing/Scope.cs | 10 +- 8 files changed, 131 insertions(+), 87 deletions(-) rename Crimson/CSharp/Core/{Library.cs => FileOnlyLibrary.cs} (55%) create mode 100644 Crimson/CSharp/Core/ILibrary.cs diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/CSharp/Core/Compilation.cs index 28c9ab6..6ad860a 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/CSharp/Core/Compilation.cs @@ -21,46 +21,16 @@ public class Compilation /// /// A library of all of the CompilationUnits used in this Compilation /// - internal Library Library { get; } + internal ILibrary Library { get; } public Compilation (Scope rootUnit, CrimsonOptions options) { - Library = new Library(options); - - LoadScopeDependencies(rootUnit); - Library.Units[Library.ROOT_FACET_NAME] = rootUnit; // This name is reserved and should be free - } - - /// - /// Loads dependencies for the given root CompilationUnit, as well as that unit's dependencies, recursively. - /// Also checks for nested scopes and loads them as well! - /// - /// - private void LoadScopeDependencies (Scope root) - { - // For each import - foreach (var i in root.Imports) - { - // Get the unit it refers to - Scope unit = Library.LoadScopeFromFile(i.Value.Path); - - // Get that units' dependencies (recursively) - LoadScopeDependencies(unit); - } - - // Check for imports in nested scopes - foreach (var del in root.Delegates) - { - if (del.Invoke() is IHasScope hasScope) - { - LoadScopeDependencies(hasScope.GetScope()); - } - } + Library = new FileOnlyLibrary(); } public Scope GetRootUnit () { - return Library.Units[Library.ROOT_FACET_NAME]; + return Library.GetScope(FileOnlyLibrary.ROOT_FACET_NAME)!; } public override string ToString () diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 4882816..126bcea 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -49,7 +49,7 @@ static int Main (string[] args) ConfigureNLog(); - Library generator = new Library(Options); + FileOnlyLibrary generator = new FileOnlyLibrary(); Linker linker = new Linker(Options); Generaliser generaliser = new Generaliser(); ISpecialiser specialiser = new RFASMSpecialiser(); //TODO Don't default to RFASM diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 7477fe2..ba160a6 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -13,12 +13,12 @@ internal class CrimsonCompiler { private static Logger LOGGER = LogManager.GetCurrentClassLogger(); public CrimsonOptions Options { get; } - public Library Library { get; } + public FileOnlyLibrary Library { get; } public Linker Linker { get; } public Generaliser Generaliser { get; } public ISpecialiser Specialiser { get; } - public CrimsonCompiler (CrimsonOptions options, Library unitGenerator, Linker linker, Generaliser generaliser, ISpecialiser flattener) + public CrimsonCompiler (CrimsonOptions options, FileOnlyLibrary unitGenerator, Linker linker, Generaliser generaliser, ISpecialiser flattener) { Options = options; Library = unitGenerator; @@ -39,8 +39,10 @@ public int FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" P A R S I N G "); - Scope rootUnit = Library.LoadScopeFromFile(Options.TranslationSourcePath); // Get the root unit (ie. main.crm) - Compilation compilation = new Compilation(rootUnit, Options); // Generate dependency units (all resources are henceforth accessible) + Task rootScopeTask = Library.LoadScopeAsync(Options.TranslationSourcePath, true); // Get the root unit (ie. main.crm) + rootScopeTask.Wait(); // Block until finished + Scope rootScope = rootScopeTask.Result; + Compilation compilation = new Compilation(rootScope, Options); // Generate dependency units (all resources are henceforth accessible) /* diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/FileOnlyLibrary.cs similarity index 55% rename from Crimson/CSharp/Core/Library.cs rename to Crimson/CSharp/Core/FileOnlyLibrary.cs index 3990414..718cf8e 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/FileOnlyLibrary.cs @@ -1,4 +1,5 @@ -using Antlr4.Runtime; +using System.Collections.Concurrent; +using Antlr4.Runtime; using Crimson.AntlrBuild; using Crimson.CSharp.Exceptions; using Crimson.CSharp.Parsing; @@ -9,15 +10,13 @@ namespace Crimson.CSharp.Core /// /// Generates CompilationUnits from input text with the power of ANTLR. /// - internal class Library + internal class FileOnlyLibrary : ILibrary { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); public static readonly string SYSTEM_LIBRARY_PREFIX = "${NATIVE}"; public static readonly string ROOT_FACET_NAME = "${ROOT}"; - private CrimsonOptions Options { get; } - /// /// The "master" list of units. Stored so that each unique unit is only created once. /// @@ -25,15 +24,93 @@ internal class Library /// [ C:/utils.crm => UTILS_UNIT ] /// [ C:/main.crm => MAIN_UNIT ] /// - internal Dictionary Units { get; } + public ConcurrentDictionary> Units { get; } + + public FileOnlyLibrary() + { + Units = new ConcurrentDictionary>(); + } + + public Task GetScope(string path) + { + if (Units.ContainsKey(path)) + { + return Units[path]; + } + else + { + var nativePath = StandardiseNativePath(path); + if (Units.ContainsKey(nativePath)) + { + return Units[nativePath]; + } + } + return null; + } + + public Task LoadScopeAsync(string path, bool root) + { + // Safety check to prevent double loading + // Immediately insert the key to reserve it + if(Units.ContainsKey(path)) return Units[path]; + Units[path] = null!; + + // Generate task + Task task = new Task(() => { + Scope scope = LoadScopeFromFile(path); + LoadScopeDependencies(scope); + return scope; + }); + + // Handle if root + if (root) + { + if (Units[ROOT_FACET_NAME] != null) + { + throw new NullReferenceException("There cannot be multiple root scopes in a FileOnlyLibrary."); + } + Units[ROOT_FACET_NAME] = task; // This name is reserved and should be free + } + + // Start loading + task.Start(); + return task; + } + + public IEnumerable> GetUnits() + { + return Units.Values; + } - public Library (CrimsonOptions options) + /// + /// Loads dependencies for the given root CompilationUnit, as well as that unit's dependencies, recursively. + /// Also checks for nested scopes and loads them as well! + /// + /// + private void LoadScopeDependencies (Scope root) { - Options = options; - Units = new Dictionary(); + // For each import + foreach (var i in root.Imports) + { + // Get the unit it refers to + Task task = LoadScopeAsync(i.Value.Path, false); + task.Wait(); + + // Get that units' dependencies (recursively) + LoadScopeDependencies(task.Result); + } + + // Check for imports in nested scopes + foreach (var del in root.Delegates) + { + if (del.Invoke() is IHasScope hasScope) + { + LoadScopeDependencies(hasScope.GetScope()); + } + } } - public Scope LoadScopeFromFile (string pathIn) + private async Scope LoadScopeFromFile(string pathIn) { IEnumerable lines = Enumerable.Empty(); @@ -44,7 +121,7 @@ public Scope LoadScopeFromFile (string pathIn) throw new UnitGeneratorException("Illegal unit path: Cannot import unit/facet/scope with reserved name '" + pathIn + "'"); } - Scope? unit = LookupScopeByPath(path); + Scope? unit = await GetScope(path); if (unit != null) { return unit; @@ -72,58 +149,43 @@ public Scope LoadScopeFromFile (string pathIn) } } - public Scope ParseScopeText (string sourceName, string textIn) + private Scope ParseScopeText(string sourcePath, string textIn) { - LOGGER.Debug($"Parsing {textIn.Length} characters in {sourceName} with ANTLR..."); + LOGGER.Debug($"Parsing {textIn.Length} characters in {sourcePath} with ANTLR..."); // Get Antlr context AntlrInputStream a4is = new AntlrInputStream(textIn); CrimsonLexer lexer = new CrimsonLexer(a4is); CommonTokenStream cts = new CommonTokenStream(lexer); CrimsonParser parser = new CrimsonParser(cts); - lexer.AddErrorListener(new LexerErrorListener(sourceName)); - parser.ErrorHandler = new ParserErrorStrategy(sourceName); + lexer.AddErrorListener(new LexerErrorListener(sourcePath)); + parser.ErrorHandler = new ParserErrorStrategy(sourcePath); CrimsonParser.ScopeContext cuCtx = parser.scope(); ScopeVisitor visitor = new ScopeVisitor(); - Scope compilationUnit = visitor.VisitScope(cuCtx); + Scope scope = visitor.VisitScope(cuCtx); + + scope.Path = sourcePath; - return compilationUnit; + return scope; } - public string StandardiseNativePath (string path) + private string StandardiseNativePath(string path) { if (path.StartsWith(SYSTEM_LIBRARY_PREFIX)) { - string result = Path.GetFullPath(path.Replace(SYSTEM_LIBRARY_PREFIX, Options.NativeLibraryPath)); + string result = Path.GetFullPath(path.Replace(SYSTEM_LIBRARY_PREFIX, Crimson.Options.NativeLibraryPath)); return result; } if (!Path.IsPathRooted(path)) { - string? parentDirectory = Path.GetDirectoryName(Options.TranslationSourcePath); + string? parentDirectory = Path.GetDirectoryName(Crimson.Options.TranslationSourcePath); path = Path.Combine(parentDirectory, path); } return path; } - public Scope? LookupScopeByPath (string path) - { - if (Units.ContainsKey(path)) - { - return Units[path]; - } - else - { - var nativePath = StandardiseNativePath(path); - if (Units.ContainsKey(nativePath)) - { - return Units[nativePath]; - } - } - return null; - } - - public override string ToString () + public override string ToString() { return $"Library(Units:[{String.Join(',', Units.Select(u => Path.GetFileName(u.Key)))}])"; } diff --git a/Crimson/CSharp/Core/ILibrary.cs b/Crimson/CSharp/Core/ILibrary.cs new file mode 100644 index 0000000..f6b2152 --- /dev/null +++ b/Crimson/CSharp/Core/ILibrary.cs @@ -0,0 +1,11 @@ +using Crimson.CSharp.Parsing; + +namespace Crimson.CSharp.Core +{ + internal interface ILibrary + { + Task GetScope(string path); + Task LoadScopeAsync(string path, bool root); + IEnumerable> GetUnits(); + } +} diff --git a/Crimson/CSharp/Generalising/Generaliser.cs b/Crimson/CSharp/Generalising/Generaliser.cs index 89d263b..7935b25 100644 --- a/Crimson/CSharp/Generalising/Generaliser.cs +++ b/Crimson/CSharp/Generalising/Generaliser.cs @@ -27,17 +27,17 @@ public GeneralAssemblyProgram Generalise (Compilation compilation) * These have already been dynamically mapped (they know which singletons each call refers to). * During collection, these values are reassigned names (which are globally updated) to avoid name clashes. */ - foreach (KeyValuePair pair in compilation.Library.Units) + foreach (Scope scope in compilation.Library.GetUnits()) { - foreach (var f in pair.Value.Functions) + foreach (var f in scope.Functions) { functions.Add(f.Value.Name.ToString(), f.Value); } - foreach (var s in pair.Value.Structures) + foreach (var s in scope.Structures) { structures.Add(s.Value.Name.ToString(), s.Value); } - foreach (var g in pair.Value.GlobalVariables) + foreach (var g in scope.GlobalVariables) { globals.Add(g.Value.GetName().ToString(), g.Value); } diff --git a/Crimson/CSharp/Linking/Linker.cs b/Crimson/CSharp/Linking/Linker.cs index c855e9e..d412e51 100644 --- a/Crimson/CSharp/Linking/Linker.cs +++ b/Crimson/CSharp/Linking/Linker.cs @@ -29,13 +29,12 @@ public void Link (Compilation compilation) LOGGER.Info("Linking compilation " + compilation); // Iterate through each relevant unit - foreach (KeyValuePair keyScopePair in compilation.Library.Units) + foreach (Scope scope in compilation.Library.GetUnits()) { - LOGGER.Info("Linking " + keyScopePair); + LOGGER.Info("Linking " + scope); // Generate linking context for the current unit (based on the aliases of imports) // This means mapping "ALIAS" to "UNIT" so that each statement can remap itself - Scope scope = keyScopePair.Value; LinkingContext ctx = new LinkingContext(scope, new Dictionary(), compilation); // Add links from the current unit diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs index 3d8d9f1..1bd3942 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -16,7 +16,7 @@ public class Scope : AbstractCrimsonStatement private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); public Scope? Parent { get; set; } - private string? _path; + public string? Path { get; set; } private string _name; public string Name @@ -37,7 +37,7 @@ public Scope (string name, string? path) : this(name, null, path) { } private Scope (string name, Scope? parent, string? path) { Parent = null; - _path = path; + Path = path; Name = name; Delegates = new List(); @@ -65,8 +65,8 @@ public Scope GetRoot () public string GetPath () { - if (!string.IsNullOrWhiteSpace(_path)) - return _path; + if (!string.IsNullOrWhiteSpace(Path)) + return Path; if (HasParent()) return GetParent().GetPath(); @@ -176,7 +176,7 @@ public Dictionary GetLinks (Compilation compilation) /* * */ - Scope? mappingUnit = compilation.Library.LookupScopeByPath(relativePath); + Scope? mappingUnit = compilation.Library.GetScope(relativePath); if (mappingUnit == null) throw new LinkingException("Could not add unloadable unit " + relativePath + " (alias=" + alias + ") to mapping context"); Links.Add(alias, mappingUnit); } From d417a84a404ddc39774e7e1d03b40c6028671b5c Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Thu, 30 Mar 2023 23:58:59 +0100 Subject: [PATCH 042/122] Async part 2 --- Crimson/CSharp/Core/Compilation.cs | 8 ++++---- Crimson/CSharp/Core/CrimsonCompiler.cs | 5 ++++- Crimson/CSharp/Core/FileOnlyLibrary.cs | 17 ++++++++++------- Crimson/CSharp/Generalising/Generaliser.cs | 12 ++++++------ Crimson/CSharp/Linking/Linker.cs | 5 +++-- Crimson/CSharp/Parsing/Scope.cs | 8 ++++---- 6 files changed, 31 insertions(+), 24 deletions(-) diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/CSharp/Core/Compilation.cs index 6ad860a..8a12830 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/CSharp/Core/Compilation.cs @@ -28,9 +28,9 @@ public Compilation (Scope rootUnit, CrimsonOptions options) Library = new FileOnlyLibrary(); } - public Scope GetRootUnit () + public Task GetRootUnit () { - return Library.GetScope(FileOnlyLibrary.ROOT_FACET_NAME)!; + return Library.GetScope(FileOnlyLibrary.ROOT_FACET_NAME); } public override string ToString () @@ -38,10 +38,10 @@ public override string ToString () return $"Compilation(RootUnit={GetRootUnit()}; Library={Library.ToString()})"; } - public FunctionCStatement GetEntryFunction () + public async Task GetEntryFunction () { string baseName = Core.Crimson.Options.EntryFunctionName; - Scope rootUnit = GetRootUnit(); + Scope rootUnit = await GetRootUnit(); string pattern = $"^func_{baseName}_[0-9]+$"; // Match name_090923 (anchored to start and end) Regex regex = new Regex(pattern); diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index ba160a6..a382557 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -64,7 +64,10 @@ public int FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" G E N E R A L I S I N G "); - GeneralAssemblyProgram generalProgram = Generaliser.Generalise(compilation); + Task generalProgramTask = Generaliser.Generalise(compilation); + generalProgramTask.Wait(); + GeneralAssemblyProgram generalProgram = generalProgramTask.Result; + LOGGER.Info("\n\n"); DumpGeneralisedProgram(generalProgram); diff --git a/Crimson/CSharp/Core/FileOnlyLibrary.cs b/Crimson/CSharp/Core/FileOnlyLibrary.cs index 718cf8e..30d2e72 100644 --- a/Crimson/CSharp/Core/FileOnlyLibrary.cs +++ b/Crimson/CSharp/Core/FileOnlyLibrary.cs @@ -45,7 +45,7 @@ public Task GetScope(string path) return Units[nativePath]; } } - return null; + return Task.FromResult(null!); } public Task LoadScopeAsync(string path, bool root) @@ -57,7 +57,7 @@ public Task LoadScopeAsync(string path, bool root) // Generate task Task task = new Task(() => { - Scope scope = LoadScopeFromFile(path); + Scope scope = LoadScopeFromFile(path).Result; LoadScopeDependencies(scope); return scope; }); @@ -65,14 +65,14 @@ public Task LoadScopeAsync(string path, bool root) // Handle if root if (root) { - if (Units[ROOT_FACET_NAME] != null) + if (Units.ContainsKey(ROOT_FACET_NAME)) { throw new NullReferenceException("There cannot be multiple root scopes in a FileOnlyLibrary."); } Units[ROOT_FACET_NAME] = task; // This name is reserved and should be free } - // Start loading + // Start loading (asynchronously) task.Start(); return task; } @@ -110,7 +110,7 @@ private void LoadScopeDependencies (Scope root) } } - private async Scope LoadScopeFromFile(string pathIn) + private async Task LoadScopeFromFile(string pathIn) { IEnumerable lines = Enumerable.Empty(); @@ -121,7 +121,7 @@ private async Scope LoadScopeFromFile(string pathIn) throw new UnitGeneratorException("Illegal unit path: Cannot import unit/facet/scope with reserved name '" + pathIn + "'"); } - Scope? unit = await GetScope(path); + Scope? unit = await GetScope(path) ?? null; if (unit != null) { return unit; @@ -132,7 +132,10 @@ private async Scope LoadScopeFromFile(string pathIn) { string programText = string.Join(Environment.NewLine, File.ReadLines(path)); Scope newUnit = ParseScopeText(path + " (" + pathIn + ")", programText); - Units[path] = newUnit; + + Task scope = Task.FromResult(newUnit); + Units[path] = scope; + return newUnit; } catch (IOException io) diff --git a/Crimson/CSharp/Generalising/Generaliser.cs b/Crimson/CSharp/Generalising/Generaliser.cs index 7935b25..0091963 100644 --- a/Crimson/CSharp/Generalising/Generaliser.cs +++ b/Crimson/CSharp/Generalising/Generaliser.cs @@ -14,7 +14,7 @@ internal class Generaliser { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - public GeneralAssemblyProgram Generalise (Compilation compilation) + public async Task Generalise (Compilation compilation) { GeneralAssemblyProgram program = new GeneralAssemblyProgram(); @@ -27,17 +27,17 @@ public GeneralAssemblyProgram Generalise (Compilation compilation) * These have already been dynamically mapped (they know which singletons each call refers to). * During collection, these values are reassigned names (which are globally updated) to avoid name clashes. */ - foreach (Scope scope in compilation.Library.GetUnits()) + foreach (Task scope in compilation.Library.GetUnits()) { - foreach (var f in scope.Functions) + foreach (var f in (await scope).Functions) { functions.Add(f.Value.Name.ToString(), f.Value); } - foreach (var s in scope.Structures) + foreach (var s in (await scope).Structures) { structures.Add(s.Value.Name.ToString(), s.Value); } - foreach (var g in scope.GlobalVariables) + foreach (var g in (await scope).GlobalVariables) { globals.Add(g.Value.GetName().ToString(), g.Value); } @@ -69,7 +69,7 @@ public GeneralAssemblyProgram Generalise (Compilation compilation) // Add main (entry) function program.AddStructure(new CommentAssemblyStructure("")); program.AddStructure(new CommentAssemblyStructure("============================== Entry Function ==============================")); - FunctionCStatement entryFunction = compilation.GetEntryFunction(); + FunctionCStatement entryFunction = await compilation.GetEntryFunction(); LOGGER.Info($"Found entry Function {entryFunction.Name}"); IGeneralAssemblyStructure entryBs = entryFunction.Generalise(context); program.AddStructure(entryBs); diff --git a/Crimson/CSharp/Linking/Linker.cs b/Crimson/CSharp/Linking/Linker.cs index d412e51..4953294 100644 --- a/Crimson/CSharp/Linking/Linker.cs +++ b/Crimson/CSharp/Linking/Linker.cs @@ -24,13 +24,14 @@ public Linker (CrimsonOptions options) /// Links the FunctionCalls in a Compilation. /// /// - public void Link (Compilation compilation) + public async void Link (Compilation compilation) { LOGGER.Info("Linking compilation " + compilation); // Iterate through each relevant unit - foreach (Scope scope in compilation.Library.GetUnits()) + foreach (Task scopeTask in compilation.Library.GetUnits()) { + Scope scope = await scopeTask; LOGGER.Info("Linking " + scope); // Generate linking context for the current unit (based on the aliases of imports) diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs index 1bd3942..a9a7c2d 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -154,7 +154,7 @@ void AddNamedIfNotDuplicate (Dictionary d, GCS gcs, string typ // Linking - public Dictionary GetLinks (Compilation compilation) + public async Task> GetLinks (Compilation compilation) { Dictionary Links = new Dictionary(); foreach (KeyValuePair importPair in Imports) @@ -176,7 +176,7 @@ public Dictionary GetLinks (Compilation compilation) /* * */ - Scope? mappingUnit = compilation.Library.GetScope(relativePath); + Scope? mappingUnit = await compilation.Library.GetScope(relativePath); if (mappingUnit == null) throw new LinkingException("Could not add unloadable unit " + relativePath + " (alias=" + alias + ") to mapping context"); Links.Add(alias, mappingUnit); } @@ -187,14 +187,14 @@ public Dictionary GetLinks (Compilation compilation) /// For Scope, this is being called when the Scope is within another Scope. This means that it will need to add its own links. /// /// - public override void Link (LinkingContext ctx) + public async override void Link (LinkingContext ctx) { LOGGER.Debug($"Linking Scope: {FamilyToString()}"); // Partially shallow-copy the old context (links in a lower level should not get carried up to higher levels) LinkingContext newContext = new LinkingContext(this, ctx); - Dictionary dictionary = GetLinks(newContext.Compilation); + Dictionary dictionary = await GetLinks(newContext.Compilation); foreach (var link in dictionary) newContext.Links.Add(link.Key, link.Value); From 4e6865e6705394f416fe29d3317609b094eb9503 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Fri, 31 Mar 2023 00:15:13 +0100 Subject: [PATCH 043/122] Async part 3 --- Crimson/CSharp/Core/FileOnlyLibrary.cs | 6 ++++-- Crimson/CSharp/Parsing/Scope.cs | 15 ++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Crimson/CSharp/Core/FileOnlyLibrary.cs b/Crimson/CSharp/Core/FileOnlyLibrary.cs index 30d2e72..04e8cf8 100644 --- a/Crimson/CSharp/Core/FileOnlyLibrary.cs +++ b/Crimson/CSharp/Core/FileOnlyLibrary.cs @@ -53,7 +53,9 @@ public Task LoadScopeAsync(string path, bool root) // Safety check to prevent double loading // Immediately insert the key to reserve it if(Units.ContainsKey(path)) return Units[path]; - Units[path] = null!; + Units[path] = Task.FromResult(null!); + + LOGGER.Info($"Async loading{(root ? $" root" : "")}: {path}"); // Generate task Task task = new Task(() => { @@ -121,7 +123,7 @@ private async Task LoadScopeFromFile(string pathIn) throw new UnitGeneratorException("Illegal unit path: Cannot import unit/facet/scope with reserved name '" + pathIn + "'"); } - Scope? unit = await GetScope(path) ?? null; + Scope? unit = await GetScope(path); if (unit != null) { return unit; diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs index a9a7c2d..a3a9a39 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -118,16 +118,17 @@ public void AddStatement (AbstractCrimsonStatement statement) { if (statement == null) throw new ArgumentNullException($"Cannot add null statement to scope {this}."); - void AddNamedIfNotDuplicate (Dictionary d, GCS gcs, string typeNameForError) where GCS : AbstractCrimsonStatement, INamed + void AddNamedIfNotDuplicate (Dictionary dict, AbsCrimSt acs, string typeNameForError) where AbsCrimSt : AbstractCrimsonStatement, INamed { - if (d == null) throw new ArgumentNullException($"Cannot pass null {typeof(Dictionary)} for statement adding."); - if (gcs == null) throw new ArgumentNullException($"Cannot pass null {typeof(GCS)} for statement adding."); + if (dict == null) throw new ArgumentNullException($"Cannot pass null {typeof(Dictionary)} for statement adding."); + if (acs == null) throw new ArgumentNullException($"Cannot pass null {typeof(AbsCrimSt)} for statement adding."); if (string.IsNullOrWhiteSpace(typeNameForError)) throw new ArgumentNullException("Cannot pass null or whitespace type name for statement adding."); - if (d.ContainsKey(gcs.GetName().ToString())) throw new StatementParseException($"Duplicate GlobalStatement name '{gcs.GetName()}' for statement '{statement}' in unit: {this}"); - string name = gcs.GetName().ToString(); - d.Add(name, gcs); - Delegates.Add(() => d[name]); + if (dict.ContainsKey(acs.GetName().ToString())) throw new StatementParseException($"Duplicate {typeNameForError} '{acs.GetName()}' in statement '{statement}' in scope: {this}"); + string name = acs.GetName().ToString(); + dict.Add(name, acs); + Delegates.Add(() => dict[name]); + LOGGER.Debug($"Adding {acs.GetName()}"); } if (statement is IHasScope scopeStatement) From 3959cc7c70fe81509441347f81936d18f9722725 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Fri, 31 Mar 2023 21:22:44 +0100 Subject: [PATCH 044/122] Transitioning from string paths to URIs --- Crimson/CSharp/Core/Compilation.cs | 4 +- Crimson/CSharp/Core/CrimsonCompiler.cs | 7 +- Crimson/CSharp/Core/FileOnlyLibrary.cs | 104 ++++++++++++------- Crimson/CSharp/Core/ILibrary.cs | 5 +- Crimson/Resources/Test Compilations/main.crm | 2 +- 5 files changed, 75 insertions(+), 47 deletions(-) diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/CSharp/Core/Compilation.cs index 8a12830..7c6d787 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/CSharp/Core/Compilation.cs @@ -28,9 +28,9 @@ public Compilation (Scope rootUnit, CrimsonOptions options) Library = new FileOnlyLibrary(); } - public Task GetRootUnit () + public async Task GetRootUnit () { - return Library.GetScope(FileOnlyLibrary.ROOT_FACET_NAME); + return await Library.GetScope(FileOnlyLibrary.ROOT_HOST); } public override string ToString () diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index a382557..847bfa8 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -27,7 +27,7 @@ public CrimsonCompiler (CrimsonOptions options, FileOnlyLibrary unitGenerator, L Specialiser = flattener; } - public int FullyCompileFromOptions () + public async void FullyCompileFromOptions () { /* * == PARSING STAGE == @@ -39,9 +39,7 @@ public int FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" P A R S I N G "); - Task rootScopeTask = Library.LoadScopeAsync(Options.TranslationSourcePath, true); // Get the root unit (ie. main.crm) - rootScopeTask.Wait(); // Block until finished - Scope rootScope = rootScopeTask.Result; + Scope rootScope = await Library.LoadScopeAsync(Options.TranslationSourcePath, true); // Get the root unit (ie. main.crm) Compilation compilation = new Compilation(rootScope, Options); // Generate dependency units (all resources are henceforth accessible) @@ -90,7 +88,6 @@ public int FullyCompileFromOptions () LOGGER.Info("\n\n"); LOGGER.Info("Done!"); - return 1; } private void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram specialisedProgram) diff --git a/Crimson/CSharp/Core/FileOnlyLibrary.cs b/Crimson/CSharp/Core/FileOnlyLibrary.cs index 04e8cf8..6ed6c35 100644 --- a/Crimson/CSharp/Core/FileOnlyLibrary.cs +++ b/Crimson/CSharp/Core/FileOnlyLibrary.cs @@ -1,4 +1,5 @@ -using System.Collections.Concurrent; +using System; +using System.Collections.Concurrent; using Antlr4.Runtime; using Crimson.AntlrBuild; using Crimson.CSharp.Exceptions; @@ -14,8 +15,8 @@ internal class FileOnlyLibrary : ILibrary { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - public static readonly string SYSTEM_LIBRARY_PREFIX = "${NATIVE}"; - public static readonly string ROOT_FACET_NAME = "${ROOT}"; + public static readonly string NATIVE_HOST = "crimson.native"; + public static readonly string ROOT_HOST = "crimson.root"; /// /// The "master" list of units. Stored so that each unique unit is only created once. @@ -24,42 +25,51 @@ internal class FileOnlyLibrary : ILibrary /// [ C:/utils.crm => UTILS_UNIT ] /// [ C:/main.crm => MAIN_UNIT ] /// - public ConcurrentDictionary> Units { get; } + public ConcurrentDictionary Units { get; } - public FileOnlyLibrary() + public FileOnlyLibrary () { - Units = new ConcurrentDictionary>(); + Units = new ConcurrentDictionary(); } - public Task GetScope(string path) + public Scope GetScope (Uri uri) { - if (Units.ContainsKey(path)) + if (Units.ContainsKey(uri)) { - return Units[path]; + return Units[uri]; } else { - var nativePath = StandardiseNativePath(path); + Uri nativePath = SquashUri(uri); if (Units.ContainsKey(nativePath)) { - return Units[nativePath]; + return Units[nativePath]; } } - return Task.FromResult(null!); + return null; } - public Task LoadScopeAsync(string path, bool root) + public Scope LoadScope (Uri uri, bool root) { // Safety check to prevent double loading // Immediately insert the key to reserve it - if(Units.ContainsKey(path)) return Units[path]; - Units[path] = Task.FromResult(null!); + Scope scope = GetScope(uri); + if (scope != null) return scope; - LOGGER.Info($"Async loading{(root ? $" root" : "")}: {path}"); + Units[uri] = null; + + LOGGER.Info($"Loading{(root ? $" root" : "")}: {uri}"); + + Stream source = GetStreamOf(uri); + StreamReader reader = new StreamReader(source); + string text = reader.ReadToEnd(); + + scope = ParseScopeText(uri.ToString(), text); // Generate task - Task task = new Task(() => { - Scope scope = LoadScopeFromFile(path).Result; + Task task = new Task(() => + { + Scope scope = LoadScopeFromFile(name).Result; LoadScopeDependencies(scope); return scope; }); @@ -67,11 +77,11 @@ public Task LoadScopeAsync(string path, bool root) // Handle if root if (root) { - if (Units.ContainsKey(ROOT_FACET_NAME)) + if (Units.ContainsKey(ROOT_HOST)) { throw new NullReferenceException("There cannot be multiple root scopes in a FileOnlyLibrary."); } - Units[ROOT_FACET_NAME] = task; // This name is reserved and should be free + Units[ROOT_HOST] = task; // This name is reserved and should be free } // Start loading (asynchronously) @@ -79,7 +89,7 @@ public Task LoadScopeAsync(string path, bool root) return task; } - public IEnumerable> GetUnits() + public IEnumerable> GetUnits () { return Units.Values; } @@ -89,17 +99,20 @@ public IEnumerable> GetUnits() /// Also checks for nested scopes and loads them as well! /// /// - private void LoadScopeDependencies (Scope root) + private async void LoadScopeDependencies (Scope root) { // For each import foreach (var i in root.Imports) { // Get the unit it refers to - Task task = LoadScopeAsync(i.Value.Path, false); - task.Wait(); + Scope scope = await LoadScopeAsync(i.Value.Path, false); + + //TODO remove LoadScopeDep. continue + if (scope == null) + continue; // Get that units' dependencies (recursively) - LoadScopeDependencies(task.Result); + LoadScopeDependencies(scope); } // Check for imports in nested scopes @@ -112,13 +125,14 @@ private void LoadScopeDependencies (Scope root) } } - private async Task LoadScopeFromFile(string pathIn) + [Obsolete] + private async Task LoadScopeFromFile (string pathIn) { IEnumerable lines = Enumerable.Empty(); string path = StandardiseNativePath(pathIn); - if (pathIn.Equals(ROOT_FACET_NAME) || pathIn.Equals(SYSTEM_LIBRARY_PREFIX)) + if (pathIn.Equals(ROOT_HOST) || pathIn.Equals(NATIVE_HOST)) { throw new UnitGeneratorException("Illegal unit path: Cannot import unit/facet/scope with reserved name '" + pathIn + "'"); } @@ -154,7 +168,7 @@ private async Task LoadScopeFromFile(string pathIn) } } - private Scope ParseScopeText(string sourcePath, string textIn) + private Scope ParseScopeText (string sourcePath, string textIn) { LOGGER.Debug($"Parsing {textIn.Length} characters in {sourcePath} with ANTLR..."); // Get Antlr context @@ -175,22 +189,40 @@ private Scope ParseScopeText(string sourcePath, string textIn) return scope; } - private string StandardiseNativePath(string path) + private Stream GetStreamOf (Uri uri) { - if (path.StartsWith(SYSTEM_LIBRARY_PREFIX)) + uri = SquashUri(uri); + FileStream stream = new FileStream(uri.AbsolutePath, FileMode.Open); + return stream; + } + + private Uri SquashUri (Uri uri) + { + UriBuilder builder = new UriBuilder(uri); + + if (uri.Scheme != Uri.UriSchemeFile) + throw new UriFormatException($"Crimson only accepts URIs of the file:/// scheme at this time. Found: {uri.Scheme}"); + + // file:///crimson.native/heap.crm + if (uri.Host.Equals(NATIVE_HOST)) { - string result = Path.GetFullPath(path.Replace(SYSTEM_LIBRARY_PREFIX, Crimson.Options.NativeLibraryPath)); - return result; + string localPath = Path.Combine(Crimson.Options.NativeLibraryPath, uri.AbsolutePath); + builder.Host = ""; + builder.Path = localPath; } - if (!Path.IsPathRooted(path)) + + // file:///heap.crm + if (!Path.IsPathRooted(uri.AbsolutePath)) { string? parentDirectory = Path.GetDirectoryName(Crimson.Options.TranslationSourcePath); - path = Path.Combine(parentDirectory, path); + string localPath = Path.Combine(parentDirectory, uri.AbsolutePath); + builder.Path = localPath; } - return path; + + return builder.Uri; } - public override string ToString() + public override string ToString () { return $"Library(Units:[{String.Join(',', Units.Select(u => Path.GetFileName(u.Key)))}])"; } diff --git a/Crimson/CSharp/Core/ILibrary.cs b/Crimson/CSharp/Core/ILibrary.cs index f6b2152..9747542 100644 --- a/Crimson/CSharp/Core/ILibrary.cs +++ b/Crimson/CSharp/Core/ILibrary.cs @@ -4,8 +4,7 @@ namespace Crimson.CSharp.Core { internal interface ILibrary { - Task GetScope(string path); - Task LoadScopeAsync(string path, bool root); - IEnumerable> GetUnits(); + Scope? GetScope (Uri uri); + IEnumerable> GetUnits (); } } diff --git a/Crimson/Resources/Test Compilations/main.crm b/Crimson/Resources/Test Compilations/main.crm index fc5d5a0..7f060da 100644 --- a/Crimson/Resources/Test Compilations/main.crm +++ b/Crimson/Resources/Test Compilations/main.crm @@ -22,7 +22,7 @@ A~ "example assemby call"; scope a; - scope a; + scope b; a *= utils.multiply(8); b *= utils.times(); if (true == true) { From f487df5890af5caae704646c0445031adba969bd Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sat, 1 Apr 2023 21:28:31 +0100 Subject: [PATCH 045/122] Async with logging changes --- Crimson/Antlr/Input/Crimson.g4 | 2 +- Crimson/Antlr/Output/CrimsonParser.cs | 4 +- Crimson/CSharp/Core/Compilation.cs | 15 +- Crimson/CSharp/Core/Crimson.cs | 40 +++-- Crimson/CSharp/Core/CrimsonCompiler.cs | 12 +- Crimson/CSharp/Core/CrimsonOptions.cs | 34 ++-- Crimson/CSharp/Core/ILibrary.cs | 10 -- .../Core/{FileOnlyLibrary.cs => Library.cs} | 145 +++++++----------- .../CSharp/Exceptions/LexerErrorListener.cs | 8 +- Crimson/CSharp/Generalising/Generaliser.cs | 10 +- Crimson/CSharp/Linking/Linker.cs | 5 +- Crimson/CSharp/Parsing/Scope.cs | 22 +-- Crimson/CSharp/Parsing/ScopeVisitor.cs | 8 +- .../Parsing/Statements/ImportCStatement.cs | 10 +- Crimson/Properties/launchSettings.json | 3 +- 15 files changed, 139 insertions(+), 189 deletions(-) delete mode 100644 Crimson/CSharp/Core/ILibrary.cs rename Crimson/CSharp/Core/{FileOnlyLibrary.cs => Library.cs} (54%) diff --git a/Crimson/Antlr/Input/Crimson.g4 b/Crimson/Antlr/Input/Crimson.g4 index 18c5cd2..0491fa2 100644 --- a/Crimson/Antlr/Input/Crimson.g4 +++ b/Crimson/Antlr/Input/Crimson.g4 @@ -7,7 +7,7 @@ scope // Scope header things importUnit - : Hashtag Using path=String As identifier=fullName SemiColon + : Hashtag Using uri=String As identifier=fullName SemiColon ; operationHandler : Hashtag OpHandler op=Operator RightArrow identifier=fullName SemiColon diff --git a/Crimson/Antlr/Output/CrimsonParser.cs b/Crimson/Antlr/Output/CrimsonParser.cs index 00261bb..3e0e088 100644 --- a/Crimson/Antlr/Output/CrimsonParser.cs +++ b/Crimson/Antlr/Output/CrimsonParser.cs @@ -238,7 +238,7 @@ public ScopeContext scope() { } public partial class ImportUnitContext : ParserRuleContext { - public IToken path; + public IToken uri; public FullNameContext identifier; [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Hashtag() { return GetToken(CrimsonParser.Hashtag, 0); } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Using() { return GetToken(CrimsonParser.Using, 0); } @@ -283,7 +283,7 @@ public ImportUnitContext importUnit() { State = 82; Match(Using); State = 83; - _localctx.path = Match(String); + _localctx.uri = Match(String); State = 84; Match(As); State = 85; diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/CSharp/Core/Compilation.cs index 7c6d787..35b88e9 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/CSharp/Core/Compilation.cs @@ -21,27 +21,22 @@ public class Compilation /// /// A library of all of the CompilationUnits used in this Compilation /// - internal ILibrary Library { get; } + internal Library Library { get; } public Compilation (Scope rootUnit, CrimsonOptions options) { - Library = new FileOnlyLibrary(); - } - - public async Task GetRootUnit () - { - return await Library.GetScope(FileOnlyLibrary.ROOT_HOST); + Library = new Library(); } public override string ToString () { - return $"Compilation(RootUnit={GetRootUnit()}; Library={Library.ToString()})"; + return $"Compilation(RootUnit={Library.Root}; Library={Library})"; } - public async Task GetEntryFunction () + public FunctionCStatement GetEntryFunction () { string baseName = Core.Crimson.Options.EntryFunctionName; - Scope rootUnit = await GetRootUnit(); + Scope rootUnit = Library.Root!; string pattern = $"^func_{baseName}_[0-9]+$"; // Match name_090923 (anchored to start and end) Regex regex = new Regex(pattern); diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 126bcea..9d4cacc 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -16,40 +16,48 @@ internal class Crimson public const int ERROR_UNKNOWN = -100; - static int Main (string[] args) + public static int Main (string[] args) { + // Start + ShowSplash(); + ShowCredits(); + + // Setup arguments + string CombineAndFormatPath (string a, string b) => Path.GetFullPath(Path.Combine(a, b)); bool useAutowiredArgs = true; if (useAutowiredArgs) { Console.WriteLine("Using autowired (debug) program arguments"); - string resourcesPath = "../../../Resources/"; // Escape bin, Debug, and net6.0 + string resourcesPath = "Resources/"; // Escape bin, Debug, and net6.0 + args = new string[] { - "-s", resourcesPath + "Test Compilations/main.crm", - "-t", resourcesPath + "Test Compilations/result/main", - "-n", resourcesPath + "Native Library/" , + $"-s {CombineAndFormatPath(resourcesPath, "Test Compilations/main.crm")}", + $"-t {CombineAndFormatPath(resourcesPath, "Test Compilations/result/main")}", + $"-n {CombineAndFormatPath(resourcesPath, "Native Library")}", "-w", "4", "--rfasm" }; - } - // Start - ShowSplash(); - ShowCredits(); + Console.WriteLine(String.Join(' ', args)); + } Console.WriteLine("Parsing Crimson options"); Options = CommandLine.Parser.Default.ParseArguments(args).Value; + if (Options == null) throw new NullReferenceException($"Unable to parse arguments {args}"); - Console.WriteLine(" Option: CompilationSourcePath: " + Options.TranslationSourcePath); - Console.WriteLine(" Option: CompilationTargetPath: " + Options.TranslationTargetPath); - Console.WriteLine(" Option: NativeLibraryPath: " + Options.NativeLibraryPath); + Console.WriteLine(" Option: SourceUri: " + Options.SourceUri); + Console.WriteLine(" Option: TargetUri: " + Options.TargetUri); + Console.WriteLine(" Option: NativeUri: " + Options.NativeUri); Console.WriteLine(" Option: DumpIntermediates: " + Options.DumpIntermediates); Console.WriteLine(" Option: DataWidth: " + Options.DataWidth); Console.WriteLine(" Option: (Platform) CrimsonBasic: " + Options.CrimsonBasic); Console.WriteLine(" Option: (Platform) RFASM: " + Options.RFASM); + // ConfigureNLog(); - FileOnlyLibrary generator = new FileOnlyLibrary(); + // + Library generator = new Library(); Linker linker = new Linker(Options); Generaliser generaliser = new Generaliser(); ISpecialiser specialiser = new RFASMSpecialiser(); //TODO Don't default to RFASM @@ -57,7 +65,7 @@ static int Main (string[] args) try { - return Compiler.FullyCompileFromOptions(); + Compiler.FullyCompileFromOptions(); } catch (System.Exception e) { @@ -65,6 +73,7 @@ static int Main (string[] args) LOGGER!.Error(e); return ERROR_UNKNOWN; } + return 0; } private static void ShowSplash () @@ -107,10 +116,11 @@ private static void ConfigureNLog () }; var consoleTarget = new NLog.Targets.ConsoleTarget("CrimsonConsoleLogTarget") { - Layout = "${level} | ${time} | ${logger} > ${message:withexception=true}" + Layout = "${level:uppercase=true:padding=-5} | ${time} | ${threadname:whenEmpty=${threadid}:padding=-5} | ${logger} > ${message:withexception=true}" }; config.AddRule(LogLevel.Trace, LogLevel.Fatal, fileTarget); config.AddRule(LogLevel.Trace, LogLevel.Fatal, consoleTarget); + LogManager.Configuration = config; Console.WriteLine("NLog configured!"); diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 847bfa8..bc8c8f5 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -13,12 +13,12 @@ internal class CrimsonCompiler { private static Logger LOGGER = LogManager.GetCurrentClassLogger(); public CrimsonOptions Options { get; } - public FileOnlyLibrary Library { get; } + public Library Library { get; } public Linker Linker { get; } public Generaliser Generaliser { get; } public ISpecialiser Specialiser { get; } - public CrimsonCompiler (CrimsonOptions options, FileOnlyLibrary unitGenerator, Linker linker, Generaliser generaliser, ISpecialiser flattener) + public CrimsonCompiler (CrimsonOptions options, Library unitGenerator, Linker linker, Generaliser generaliser, ISpecialiser flattener) { Options = options; Library = unitGenerator; @@ -39,7 +39,7 @@ public async void FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" P A R S I N G "); - Scope rootScope = await Library.LoadScopeAsync(Options.TranslationSourcePath, true); // Get the root unit (ie. main.crm) + Scope rootScope = await Library.LoadScopeAsync(Options.SourceUri); // Get the root unit (ie. main.crm) Compilation compilation = new Compilation(rootScope, Options); // Generate dependency units (all resources are henceforth accessible) @@ -94,7 +94,7 @@ private void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram specialised { if (Options.DumpIntermediates) { - string basicTarget = Path.ChangeExtension(Options.TranslationTargetPath, specialisedProgram.GetExtension()); + string basicTarget = Path.ChangeExtension(Options.TargetUri.AbsolutePath, specialisedProgram.GetExtension()); specialisedProgram.Write(basicTarget); } else @@ -107,7 +107,7 @@ private void DumpGeneralisedProgram (GeneralAssemblyProgram generalProgram) { if (Options.DumpIntermediates) { - string basicTarget = Path.ChangeExtension(Options.TranslationTargetPath, ".gen"); + string basicTarget = Path.ChangeExtension(Options.TargetUri.AbsolutePath, ".gen"); LOGGER.Info("Dumping generalised program to " + basicTarget); List lines = new List(); @@ -116,7 +116,7 @@ private void DumpGeneralisedProgram (GeneralAssemblyProgram generalProgram) lines.Add(s.ToString() ?? "(null)"); } - _ = Directory.CreateDirectory(Path.GetDirectoryName(Options.TranslationTargetPath)!); + _ = Directory.CreateDirectory(Path.GetDirectoryName(Options.TargetUri.AbsolutePath)!); File.WriteAllLines(basicTarget, lines.ToArray()); LOGGER.Info("Written!"); } diff --git a/Crimson/CSharp/Core/CrimsonOptions.cs b/Crimson/CSharp/Core/CrimsonOptions.cs index 9e7bbb0..25bb60a 100644 --- a/Crimson/CSharp/Core/CrimsonOptions.cs +++ b/Crimson/CSharp/Core/CrimsonOptions.cs @@ -4,41 +4,36 @@ using System.Text; using System.Threading.Tasks; using CommandLine; +using NLog.Targets; namespace Crimson.CSharp.Core { public class CrimsonOptions { // Source - private string _translationSourcePath; [Option(longName: "source", shortName: 's', Required = true, HelpText = "Path to the root source file to translate. " + "If no file extension given, .crm will be assumed.")] - public string TranslationSourcePath - { - get { return _translationSourcePath; } - set { _translationSourcePath = Path.GetFullPath(value); } - } + public Uri SourceUri { get; private set; } + public void SetSourcePath (string path) => SourceUri = new Uri(path); + public void SetSourcePath (Uri uri) => SourceUri = uri; + // Target - private string _translationTargetPath; [Option(longName: "target", shortName: 't', Required = false, HelpText = "Path to the desired target location or output file. " + "If no file extension provided, will assume .crm.")] - public string TranslationTargetPath - { - get { return _translationTargetPath; } - set { _translationTargetPath = Path.GetFullPath(value); } - } + public Uri TargetUri { get; private set; } + public void SetTargetPath (string path) => TargetUri = new Uri(path); + public void SetTargetPath (Uri uri) => TargetUri = uri; + // Native library - private string _nativeLibraryPath; [Option(longName: "native", shortName: 'n', Required = false, HelpText = "Path to the native Crimson library. " + "If not provided, will use a packaged version. " + "If provided, but a required file is not found, the file will be created from the packaged library.")] - public string NativeLibraryPath - { - get { return _nativeLibraryPath; } - set { _nativeLibraryPath = Path.GetFullPath(value); } - } + public Uri NativeUri { get; private set; } + public void SetNativePath (string path) => NativeUri = new Uri(path); + public void SetNativePath (Uri uri) => NativeUri = uri; + // Entry function private string _entryFunctionName; @@ -50,14 +45,17 @@ public string EntryFunctionName set { _entryFunctionName = value; } } + // DumpIntermediates [Option(longName: "clean", shortName: 'c', Required = false, Default = true, HelpText = "Should the compiler clean up its temporary files?")] public bool DumpIntermediates { get; set; } + // DumpIntermediates [Option(longName: "datawidth", shortName: 'w', Required = true, HelpText = "The width of an integer, in bytes.")] public int DataWidth { get; set; } + // Targeted language [Option(Group = "platform")] public bool CrimsonBasic { get; set; } [Option(Group = "platform")] public bool RFASM { get; set; } diff --git a/Crimson/CSharp/Core/ILibrary.cs b/Crimson/CSharp/Core/ILibrary.cs deleted file mode 100644 index 9747542..0000000 --- a/Crimson/CSharp/Core/ILibrary.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Crimson.CSharp.Parsing; - -namespace Crimson.CSharp.Core -{ - internal interface ILibrary - { - Scope? GetScope (Uri uri); - IEnumerable> GetUnits (); - } -} diff --git a/Crimson/CSharp/Core/FileOnlyLibrary.cs b/Crimson/CSharp/Core/Library.cs similarity index 54% rename from Crimson/CSharp/Core/FileOnlyLibrary.cs rename to Crimson/CSharp/Core/Library.cs index 6ed6c35..cb37ba5 100644 --- a/Crimson/CSharp/Core/FileOnlyLibrary.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Concurrent; +using System.Threading.Tasks; using Antlr4.Runtime; using Crimson.AntlrBuild; using Crimson.CSharp.Exceptions; @@ -11,7 +12,7 @@ namespace Crimson.CSharp.Core /// /// Generates CompilationUnits from input text with the power of ANTLR. /// - internal class FileOnlyLibrary : ILibrary + internal class Library { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); @@ -27,7 +28,9 @@ internal class FileOnlyLibrary : ILibrary /// public ConcurrentDictionary Units { get; } - public FileOnlyLibrary () + public Scope Root { get; set; } + + public Library () { Units = new ConcurrentDictionary(); } @@ -49,49 +52,44 @@ public Scope GetScope (Uri uri) return null; } - public Scope LoadScope (Uri uri, bool root) + public void SetRootScope (Scope scope) + { + if (Root != null) + LOGGER.Warn($"Overriding root scope {Root} with {scope}"); + else + LOGGER.Info($"Setting root scope to {scope}"); + + Root = scope; + } + + public Task LoadScopeAsync (Uri uri) { // Safety check to prevent double loading // Immediately insert the key to reserve it - Scope scope = GetScope(uri); - if (scope != null) return scope; - + Scope existingScope = GetScope(uri); + if (existingScope != null) return Task.FromResult(existingScope); Units[uri] = null; - LOGGER.Info($"Loading{(root ? $" root" : "")}: {uri}"); - - Stream source = GetStreamOf(uri); - StreamReader reader = new StreamReader(source); - string text = reader.ReadToEnd(); - - scope = ParseScopeText(uri.ToString(), text); + LOGGER.Info($"Loading scope from {uri}"); // Generate task - Task task = new Task(() => + return Task.Factory.StartNew(() => { - Scope scope = LoadScopeFromFile(name).Result; + Stream source = GetStreamOf(uri); + StreamReader reader = new StreamReader(source); + string text = reader.ReadToEnd(); + + Scope scope = ParseScopeText(uri, text); + LoadScopeDependencies(scope); - return scope; - }); - // Handle if root - if (root) - { - if (Units.ContainsKey(ROOT_HOST)) + if (Root == null) { - throw new NullReferenceException("There cannot be multiple root scopes in a FileOnlyLibrary."); + SetRootScope(scope); } - Units[ROOT_HOST] = task; // This name is reserved and should be free - } - // Start loading (asynchronously) - task.Start(); - return task; - } - - public IEnumerable> GetUnits () - { - return Units.Values; + return scope; + }); } /// @@ -101,18 +99,17 @@ public IEnumerable> GetUnits () /// private async void LoadScopeDependencies (Scope root) { - // For each import + LOGGER.Info($"Loading dependencies of {root}"); + List ongoingLoadingTasks = new List(); + + // Load each imported scope + // Queue loading of its dependencies (once it's loaded) foreach (var i in root.Imports) { - // Get the unit it refers to - Scope scope = await LoadScopeAsync(i.Value.Path, false); + Task scope = LoadScopeAsync(i.Value.URI); + Task dependencyTask = scope.ContinueWith(finishedTask => LoadScopeDependencies(finishedTask.Result)); - //TODO remove LoadScopeDep. continue - if (scope == null) - continue; - - // Get that units' dependencies (recursively) - LoadScopeDependencies(scope); + ongoingLoadingTasks.Add(dependencyTask); } // Check for imports in nested scopes @@ -123,68 +120,32 @@ private async void LoadScopeDependencies (Scope root) LoadScopeDependencies(hasScope.GetScope()); } } - } - - [Obsolete] - private async Task LoadScopeFromFile (string pathIn) - { - IEnumerable lines = Enumerable.Empty(); - - string path = StandardiseNativePath(pathIn); - - if (pathIn.Equals(ROOT_HOST) || pathIn.Equals(NATIVE_HOST)) - { - throw new UnitGeneratorException("Illegal unit path: Cannot import unit/facet/scope with reserved name '" + pathIn + "'"); - } - - Scope? unit = await GetScope(path); - if (unit != null) - { - return unit; - } - - LOGGER.Info($"Loading new root Scope from: {pathIn}"); - try - { - string programText = string.Join(Environment.NewLine, File.ReadLines(path)); - Scope newUnit = ParseScopeText(path + " (" + pathIn + ")", programText); - - Task scope = Task.FromResult(newUnit); - Units[path] = scope; - return newUnit; - } - catch (IOException io) - { - throw new UnitGeneratorException("Unable to find source file for CompilationUnit " + path + " (" + pathIn + ")", io); - } - catch (StatementParseException spe) - { - throw new UnitGeneratorException("Error while parsing '" + path + "' (" + pathIn + ")", spe); - } - catch (System.Exception e) - { - throw new UnitGeneratorException("Unexpected error while creating CompilationUnit from " + path + " (" + pathIn + ")", e); - } + // Wait for multithreading to finish before returning. + foreach (var task in ongoingLoadingTasks) await task; + LOGGER.Debug($"Finished loading dependencies of {root}"); } - private Scope ParseScopeText (string sourcePath, string textIn) + private Scope ParseScopeText (Uri source, string textIn) { - LOGGER.Debug($"Parsing {textIn.Length} characters in {sourcePath} with ANTLR..."); + LOGGER.Debug($"Parsing {textIn.Length} characters from {source} with ANTLR..."); + // Get Antlr context AntlrInputStream a4is = new AntlrInputStream(textIn); CrimsonLexer lexer = new CrimsonLexer(a4is); CommonTokenStream cts = new CommonTokenStream(lexer); CrimsonParser parser = new CrimsonParser(cts); - lexer.AddErrorListener(new LexerErrorListener(sourcePath)); - parser.ErrorHandler = new ParserErrorStrategy(sourcePath); + string sourceName = $"{source}"; + + lexer.AddErrorListener(new LexerErrorListener(sourceName)); + parser.ErrorHandler = new ParserErrorStrategy(sourceName); CrimsonParser.ScopeContext cuCtx = parser.scope(); ScopeVisitor visitor = new ScopeVisitor(); Scope scope = visitor.VisitScope(cuCtx); - scope.Path = sourcePath; + scope.Uri = source; return scope; } @@ -192,7 +153,7 @@ private Scope ParseScopeText (string sourcePath, string textIn) private Stream GetStreamOf (Uri uri) { uri = SquashUri(uri); - FileStream stream = new FileStream(uri.AbsolutePath, FileMode.Open); + FileStream stream = new FileStream(uri.LocalPath, FileMode.Open); return stream; } @@ -206,7 +167,7 @@ private Uri SquashUri (Uri uri) // file:///crimson.native/heap.crm if (uri.Host.Equals(NATIVE_HOST)) { - string localPath = Path.Combine(Crimson.Options.NativeLibraryPath, uri.AbsolutePath); + string localPath = Path.Combine(Crimson.Options.NativeUri.AbsolutePath, uri.AbsolutePath); builder.Host = ""; builder.Path = localPath; } @@ -214,7 +175,7 @@ private Uri SquashUri (Uri uri) // file:///heap.crm if (!Path.IsPathRooted(uri.AbsolutePath)) { - string? parentDirectory = Path.GetDirectoryName(Crimson.Options.TranslationSourcePath); + string? parentDirectory = Path.GetDirectoryName(Crimson.Options.SourceUri.AbsolutePath); string localPath = Path.Combine(parentDirectory, uri.AbsolutePath); builder.Path = localPath; } @@ -224,7 +185,7 @@ private Uri SquashUri (Uri uri) public override string ToString () { - return $"Library(Units:[{String.Join(',', Units.Select(u => Path.GetFileName(u.Key)))}])"; + return $"Library(Units:[{String.Join(',', Units.Select(u => u.Key))}])"; } } } diff --git a/Crimson/CSharp/Exceptions/LexerErrorListener.cs b/Crimson/CSharp/Exceptions/LexerErrorListener.cs index 3189dac..ec57fd5 100644 --- a/Crimson/CSharp/Exceptions/LexerErrorListener.cs +++ b/Crimson/CSharp/Exceptions/LexerErrorListener.cs @@ -7,15 +7,15 @@ internal class LexerErrorListener : IAntlrErrorListener { public static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - private string Path { get; set; } - public LexerErrorListener (string path) + private string Name { get; set; } + public LexerErrorListener (string name) { - Path = path; + Name = name; } void IAntlrErrorListener.SyntaxError (TextWriter output, IRecognizer recognizer, int offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) { - string message = $"Lexer error lexing {Path} @ line:{line} char:{charPositionInLine} msg:{msg}"; + string message = $"Lexer error lexing {Name} @ line:{line} char:{charPositionInLine} msg:{msg}"; LOGGER.Error(message); throw new LexerException(message, e); } diff --git a/Crimson/CSharp/Generalising/Generaliser.cs b/Crimson/CSharp/Generalising/Generaliser.cs index 0091963..cdff011 100644 --- a/Crimson/CSharp/Generalising/Generaliser.cs +++ b/Crimson/CSharp/Generalising/Generaliser.cs @@ -27,17 +27,17 @@ public async Task Generalise (Compilation compilation) * These have already been dynamically mapped (they know which singletons each call refers to). * During collection, these values are reassigned names (which are globally updated) to avoid name clashes. */ - foreach (Task scope in compilation.Library.GetUnits()) + foreach (Scope scope in compilation.Library.Units.Values) { - foreach (var f in (await scope).Functions) + foreach (var f in scope.Functions) { functions.Add(f.Value.Name.ToString(), f.Value); } - foreach (var s in (await scope).Structures) + foreach (var s in scope.Structures) { structures.Add(s.Value.Name.ToString(), s.Value); } - foreach (var g in (await scope).GlobalVariables) + foreach (var g in scope.GlobalVariables) { globals.Add(g.Value.GetName().ToString(), g.Value); } @@ -69,7 +69,7 @@ public async Task Generalise (Compilation compilation) // Add main (entry) function program.AddStructure(new CommentAssemblyStructure("")); program.AddStructure(new CommentAssemblyStructure("============================== Entry Function ==============================")); - FunctionCStatement entryFunction = await compilation.GetEntryFunction(); + FunctionCStatement entryFunction = compilation.GetEntryFunction(); LOGGER.Info($"Found entry Function {entryFunction.Name}"); IGeneralAssemblyStructure entryBs = entryFunction.Generalise(context); program.AddStructure(entryBs); diff --git a/Crimson/CSharp/Linking/Linker.cs b/Crimson/CSharp/Linking/Linker.cs index 4953294..3283d0b 100644 --- a/Crimson/CSharp/Linking/Linker.cs +++ b/Crimson/CSharp/Linking/Linker.cs @@ -24,14 +24,13 @@ public Linker (CrimsonOptions options) /// Links the FunctionCalls in a Compilation. /// /// - public async void Link (Compilation compilation) + public void Link (Compilation compilation) { LOGGER.Info("Linking compilation " + compilation); // Iterate through each relevant unit - foreach (Task scopeTask in compilation.Library.GetUnits()) + foreach (Scope scope in compilation.Library.Units.Values) { - Scope scope = await scopeTask; LOGGER.Info("Linking " + scope); // Generate linking context for the current unit (based on the aliases of imports) diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs index a3a9a39..19c1d02 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -16,7 +16,7 @@ public class Scope : AbstractCrimsonStatement private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); public Scope? Parent { get; set; } - public string? Path { get; set; } + public Uri? Uri { get; set; } private string _name; public string Name @@ -32,12 +32,12 @@ public string Name public Scope (string name, Scope? parent) : this(name, parent, null) { } - public Scope (string name, string? path) : this(name, null, path) { } + public Scope (string name, Uri? path) : this(name, null, path) { } - private Scope (string name, Scope? parent, string? path) + private Scope (string name, Scope? parent, Uri? path) { Parent = null; - Path = path; + Uri = path; Name = name; Delegates = new List(); @@ -63,10 +63,10 @@ public Scope GetRoot () return parent; } - public string GetPath () + public Uri GetPath () { - if (!string.IsNullOrWhiteSpace(Path)) - return Path; + if (Uri.IsWellFormedUriString(Uri.ToString(), UriKind.Absolute)) + return Uri; if (HasParent()) return GetParent().GetPath(); @@ -172,12 +172,12 @@ public async Task> GetLinks (Compilation compilation) * For example: * '#using "utils.crm" as u' may result in 'C:/utils.crm' */ - string relativePath = importPair.Value.Path; + Uri relativePath = importPair.Value.URI; /* * */ - Scope? mappingUnit = await compilation.Library.GetScope(relativePath); + Scope? mappingUnit = compilation.Library.GetScope(relativePath); if (mappingUnit == null) throw new LinkingException("Could not add unloadable unit " + relativePath + " (alias=" + alias + ") to mapping context"); Links.Add(alias, mappingUnit); } @@ -230,12 +230,12 @@ public override string ToString () return $"Scope({Name}; I:{Imports.Count} F:{Functions.Count} S:{Structures.Count} G:{GlobalVariables.Count})"; } - internal ScopeVariableCStatement? FindScopeVariable(string name) + internal ScopeVariableCStatement? FindScopeVariable (string name) { // TODO Check Scope.FindScopeVariable works Scope parent = this; ScopeVariableCStatement? var = null; - if(!ScopeVariables.TryGetValue(name, out var) && HasParent()) + if (!ScopeVariables.TryGetValue(name, out var) && HasParent()) { return GetParent().FindScopeVariable(name); } diff --git a/Crimson/CSharp/Parsing/ScopeVisitor.cs b/Crimson/CSharp/Parsing/ScopeVisitor.cs index d509c17..93533f1 100644 --- a/Crimson/CSharp/Parsing/ScopeVisitor.cs +++ b/Crimson/CSharp/Parsing/ScopeVisitor.cs @@ -21,13 +21,9 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) IList importCtxs = context._imports; foreach (CrimsonParser.ImportUnitContext importCtx in importCtxs) { - string path = importCtx.path.Text; - if (path.StartsWith("\"") && path.EndsWith("\"")) - { - path = path.Substring(1, path.Length - 2); - } + Uri uri = new Uri(importCtx.uri.Text); FullNameCToken id = VisitFullName(importCtx.fullName()); - ImportCStatement import = new ImportCStatement(path, id); + ImportCStatement import = new ImportCStatement(uri, id); scope.Imports.Add(id.ToString(), import); } diff --git a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs index a06c9f4..757c449 100644 --- a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs @@ -5,15 +5,15 @@ namespace Crimson.CSharp.Parsing.Statements { public class ImportCStatement { - public string Path { get; set; } + public Uri URI { get; set; } public FullNameCToken Alias { get; set; } - public ImportCStatement (string path, FullNameCToken alias) + public ImportCStatement (Uri uri, FullNameCToken alias) { - if (alias.HasLibrary()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{path}' because it must only contain a member name."); - if (!alias.HasMember()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{path}' because it does not contain a member name."); + if (alias.HasLibrary()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{uri}' because it must only contain a member name."); + if (!alias.HasMember()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{uri}' because it does not contain a member name."); - Path = path; + URI = uri; Alias = alias; } } diff --git a/Crimson/Properties/launchSettings.json b/Crimson/Properties/launchSettings.json index d414170..3e66f45 100644 --- a/Crimson/Properties/launchSettings.json +++ b/Crimson/Properties/launchSettings.json @@ -1,7 +1,8 @@ { "profiles": { "Crimson": { - "commandName": "Project" + "commandName": "Project", + "workingDirectory": "C:\\Users\\GenElectrovise\\OneDrive\\Desktop\\Programming\\RF_ASM\\Crimson" } } } \ No newline at end of file From d6a8060448309f4c2293451e9e79f19dadcbd629 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sun, 2 Apr 2023 18:02:24 +0100 Subject: [PATCH 046/122] maybe async works --- Crimson/CSharp/Core/Crimson.cs | 21 ++- Crimson/CSharp/Core/CrimsonCompiler.cs | 13 +- Crimson/CSharp/Core/Library.cs | 141 ++++++++++++------ .../Exceptions/CrimsonAntlrTextWriter.cs | 13 ++ .../Exceptions/StatementParseException.cs | 2 +- Crimson/CSharp/Generalising/Generaliser.cs | 2 +- Crimson/CSharp/Linking/Linker.cs | 2 +- Crimson/CSharp/Parsing/ScopeVisitor.cs | 68 +++++---- 8 files changed, 188 insertions(+), 74 deletions(-) create mode 100644 Crimson/CSharp/Exceptions/CrimsonAntlrTextWriter.cs diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 9d4cacc..9ed5bf6 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -18,6 +18,8 @@ internal class Crimson public static int Main (string[] args) { + Thread.CurrentThread.Name = "main"; + // Start ShowSplash(); ShowCredits(); @@ -116,7 +118,7 @@ private static void ConfigureNLog () }; var consoleTarget = new NLog.Targets.ConsoleTarget("CrimsonConsoleLogTarget") { - Layout = "${level:uppercase=true:padding=-5} | ${time} | ${threadname:whenEmpty=${threadid}:padding=-5} | ${logger} > ${message:withexception=true}" + Layout = "${level:uppercase=true:padding=-10} | ${time} | ${threadname:whenEmpty=${threadid}:padding=-5} | ${logger} > ${message:withexception=true}" }; config.AddRule(LogLevel.Trace, LogLevel.Fatal, fileTarget); config.AddRule(LogLevel.Trace, LogLevel.Fatal, consoleTarget); @@ -130,5 +132,22 @@ private static void ConfigureNLog () LOGGER.Fatal("Testing fatal level logging..."); Console.WriteLine("Did you see the TRACE and FATAL test messages?"); } + + public static void Panic (PanicCode code) + { + LOGGER!.Error(""); + LOGGER.Error(" ### COMPILER PANIC!! ###"); + LOGGER.Error("An error during compilation has caused the compiler to halt!"); + + int codeNum = (int) code; + LOGGER.Error($"Panic code: {codeNum}"); + + Environment.Exit((int) code); + } + + public enum PanicCode + { + PARSE = -10 + } } } \ No newline at end of file diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index bc8c8f5..d566fec 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -39,7 +39,18 @@ public async void FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" P A R S I N G "); - Scope rootScope = await Library.LoadScopeAsync(Options.SourceUri); // Get the root unit (ie. main.crm) + + Task scopeTask = Library.StartLoadingScope(Options.SourceUri); + try + { + scopeTask.Wait(); + } + catch (Exception ex) + { + LOGGER.Error(ex); + Crimson.Panic(Crimson.PanicCode.PARSE); + } + Scope rootScope = scopeTask.Result; // Get the root unit (ie. main.crm) Compilation compilation = new Compilation(rootScope, Options); // Generate dependency units (all resources are henceforth accessible) diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index cb37ba5..f65550e 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Concurrent; using System.Threading.Tasks; using Antlr4.Runtime; @@ -26,32 +27,55 @@ internal class Library /// [ C:/utils.crm => UTILS_UNIT ] /// [ C:/main.crm => MAIN_UNIT ] /// - public ConcurrentDictionary Units { get; } + private ConcurrentDictionary> Scopes { get; } public Scope Root { get; set; } public Library () { - Units = new ConcurrentDictionary(); + Scopes = new ConcurrentDictionary>(); } - public Scope GetScope (Uri uri) + + // ========== API ========== + + public Scope? GetScope (Uri uri) { - if (Units.ContainsKey(uri)) + if (Scopes.ContainsKey(uri)) { - return Units[uri]; + return GetScopeUnsafe(uri); } else { Uri nativePath = SquashUri(uri); - if (Units.ContainsKey(nativePath)) + if (Scopes.ContainsKey(nativePath)) { - return Units[nativePath]; + return GetScopeUnsafe(nativePath); } } return null; } + public List GetScopes () + { + List scopes = new List(); + + foreach (var pair in Scopes) + { + Task task = pair.Value; + + if (!task.IsCompleted) + { + LOGGER.Debug("Waiting for async loading to finish before returning scope list..."); + task.Wait(); + } + + scopes.Add(pair.Value.Result!); + } + + return scopes; + } + public void SetRootScope (Scope scope) { if (Root != null) @@ -62,34 +86,63 @@ public void SetRootScope (Scope scope) Root = scope; } - public Task LoadScopeAsync (Uri uri) + public Task StartLoadingScope (Uri uri) { // Safety check to prevent double loading // Immediately insert the key to reserve it - Scope existingScope = GetScope(uri); + Scope? existingScope = GetScope(uri); if (existingScope != null) return Task.FromResult(existingScope); - Units[uri] = null; + Scopes[uri] = null!; LOGGER.Info($"Loading scope from {uri}"); // Generate task - return Task.Factory.StartNew(() => + //return Task.Factory.StartNew(() => LoadScopeSync(uri)); + Task task = new Task(() => { - Stream source = GetStreamOf(uri); - StreamReader reader = new StreamReader(source); - string text = reader.ReadToEnd(); + Thread.CurrentThread.Name = $"{Thread.CurrentThread.Name}_c"; + return LoadScopeSync(uri); + }); + task.Start(); + return task; + } - Scope scope = ParseScopeText(uri, text); + public override string ToString () + { + return $"Library(Units:[{String.Join(',', Scopes.Select(u => u.Key))}])"; + } - LoadScopeDependencies(scope); - if (Root == null) - { - SetRootScope(scope); - } + // ========== INTERNALS ========== - return scope; - }); + + private Scope GetScopeUnsafe (Uri uri) + { + Task task = Scopes[uri]; + if (!task.IsCompleted) + { + LOGGER.Debug($"Waiting for scope {uri} to finish loading..."); + task.Wait(); + } + return task.Result; + } + + private Scope LoadScopeSync (Uri uri) + { + Stream source = GetStreamOf(uri); + StreamReader reader = new StreamReader(source); + string text = reader.ReadToEnd(); + + Scope scope = ParseScopeText(uri, text); + + LoadScopeDependencies(scope); + + if (Root == null) + { + SetRootScope(scope); + } + + return scope; } /// @@ -106,7 +159,7 @@ private async void LoadScopeDependencies (Scope root) // Queue loading of its dependencies (once it's loaded) foreach (var i in root.Imports) { - Task scope = LoadScopeAsync(i.Value.URI); + Task scope = StartLoadingScope(i.Value.URI); Task dependencyTask = scope.ContinueWith(finishedTask => LoadScopeDependencies(finishedTask.Result)); ongoingLoadingTasks.Add(dependencyTask); @@ -128,26 +181,35 @@ private async void LoadScopeDependencies (Scope root) private Scope ParseScopeText (Uri source, string textIn) { - LOGGER.Debug($"Parsing {textIn.Length} characters from {source} with ANTLR..."); + try + { + LOGGER.Debug($"Parsing {textIn.Length} characters from {source} with ANTLR..."); - // Get Antlr context - AntlrInputStream a4is = new AntlrInputStream(textIn); - CrimsonLexer lexer = new CrimsonLexer(a4is); - CommonTokenStream cts = new CommonTokenStream(lexer); - CrimsonParser parser = new CrimsonParser(cts); + // Get Antlr context + AntlrInputStream a4is = new AntlrInputStream(textIn); + CrimsonLexer lexer = new CrimsonLexer(a4is); + CommonTokenStream cts = new CommonTokenStream(lexer); + CrimsonParser parser = new CrimsonParser(cts); - string sourceName = $"{source}"; + string sourceName = $"{source}"; - lexer.AddErrorListener(new LexerErrorListener(sourceName)); - parser.ErrorHandler = new ParserErrorStrategy(sourceName); + lexer.AddErrorListener(new LexerErrorListener(sourceName)); + parser.ErrorHandler = new ParserErrorStrategy(sourceName); - CrimsonParser.ScopeContext cuCtx = parser.scope(); - ScopeVisitor visitor = new ScopeVisitor(); - Scope scope = visitor.VisitScope(cuCtx); + CrimsonParser.ScopeContext cuCtx = parser.scope(); + ScopeVisitor visitor = new ScopeVisitor(); + Scope scope = visitor.VisitScope(cuCtx); - scope.Uri = source; + scope.Uri = source; - return scope; + return scope; + } + catch (Exception ex) + { + LOGGER.Error("An error ocurred while parsing a scope"); + Console.WriteLine("An error ocurred while parsing a scope"); + throw new StatementParseException("A parser error occurred :( ", ex); + } } private Stream GetStreamOf (Uri uri) @@ -182,10 +244,5 @@ private Uri SquashUri (Uri uri) return builder.Uri; } - - public override string ToString () - { - return $"Library(Units:[{String.Join(',', Units.Select(u => u.Key))}])"; - } } } diff --git a/Crimson/CSharp/Exceptions/CrimsonAntlrTextWriter.cs b/Crimson/CSharp/Exceptions/CrimsonAntlrTextWriter.cs new file mode 100644 index 0000000..0556656 --- /dev/null +++ b/Crimson/CSharp/Exceptions/CrimsonAntlrTextWriter.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Exceptions +{ + internal class CrimsonAntlrTextWriter : TextWriter + { + public override Encoding Encoding => Encoding.UTF8; + } +} diff --git a/Crimson/CSharp/Exceptions/StatementParseException.cs b/Crimson/CSharp/Exceptions/StatementParseException.cs index fcb8566..2c9d0c6 100644 --- a/Crimson/CSharp/Exceptions/StatementParseException.cs +++ b/Crimson/CSharp/Exceptions/StatementParseException.cs @@ -13,7 +13,7 @@ public StatementParseException (string message) : base(message) } - public StatementParseException (string message, SystemException cause) : base(message, cause) + public StatementParseException (string message, Exception cause) : base(message, cause) { } diff --git a/Crimson/CSharp/Generalising/Generaliser.cs b/Crimson/CSharp/Generalising/Generaliser.cs index cdff011..d9b4229 100644 --- a/Crimson/CSharp/Generalising/Generaliser.cs +++ b/Crimson/CSharp/Generalising/Generaliser.cs @@ -27,7 +27,7 @@ public async Task Generalise (Compilation compilation) * These have already been dynamically mapped (they know which singletons each call refers to). * During collection, these values are reassigned names (which are globally updated) to avoid name clashes. */ - foreach (Scope scope in compilation.Library.Units.Values) + foreach (Scope scope in compilation.Library.GetScopes()) { foreach (var f in scope.Functions) { diff --git a/Crimson/CSharp/Linking/Linker.cs b/Crimson/CSharp/Linking/Linker.cs index 3283d0b..594da24 100644 --- a/Crimson/CSharp/Linking/Linker.cs +++ b/Crimson/CSharp/Linking/Linker.cs @@ -29,7 +29,7 @@ public void Link (Compilation compilation) LOGGER.Info("Linking compilation " + compilation); // Iterate through each relevant unit - foreach (Scope scope in compilation.Library.Units.Values) + foreach (Scope scope in compilation.Library.GetScopes()) { LOGGER.Info("Linking " + scope); diff --git a/Crimson/CSharp/Parsing/ScopeVisitor.cs b/Crimson/CSharp/Parsing/ScopeVisitor.cs index 93533f1..ce6d407 100644 --- a/Crimson/CSharp/Parsing/ScopeVisitor.cs +++ b/Crimson/CSharp/Parsing/ScopeVisitor.cs @@ -11,41 +11,55 @@ namespace Crimson.CSharp.Parsing { internal class ScopeVisitor : CrimsonBaseVisitor { + private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); + public static readonly Stack scopeStack = new Stack(); public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) { - Scope scope = new Scope(null, scopeStack.TryPeek(out Scope? result) ? result : null); - scopeStack.Push(scope); + // TODO TESTTING + // return new Scope("TEST", (Scope) null!); - // Visit imports - IList importCtxs = context._imports; - foreach (CrimsonParser.ImportUnitContext importCtx in importCtxs) + try { - Uri uri = new Uri(importCtx.uri.Text); - FullNameCToken id = VisitFullName(importCtx.fullName()); - ImportCStatement import = new ImportCStatement(uri, id); - scope.Imports.Add(id.ToString(), import); + Scope scope = new Scope(null, scopeStack.TryPeek(out Scope? result) ? result : null); + scopeStack.Push(scope); + + // Visit imports + IList importCtxs = context._imports; + foreach (CrimsonParser.ImportUnitContext importCtx in importCtxs) + { + Uri uri = new Uri(importCtx.uri.Text); + FullNameCToken id = VisitFullName(importCtx.fullName()); + ImportCStatement import = new ImportCStatement(uri, id); + scope.Imports.Add(id.ToString(), import); + } + + // Add operation handlers + IList operationHandlersCtxs = context._opHandlers; + foreach (CrimsonParser.OperationHandlerContext unitStatementCtx in operationHandlersCtxs) + { + OperationHandlerCStatement unitStatement = VisitOperationHandler(unitStatementCtx); + //TODO compilation.AddOpHandler(unitStatement); + } + + // Visit Compilation-Unit statements + IList unitStatementCtxs = context._statements; + foreach (CrimsonParser.StatementContext unitStatementCtx in unitStatementCtxs) + { + AbstractCrimsonStatement unitStatement = ParseStatement(unitStatementCtx); + scope.AddStatement(unitStatement); + } + + // Populate output fields + + return scopeStack.Pop(); } - - // Add operation handlers - IList operationHandlersCtxs = context._opHandlers; - foreach (CrimsonParser.OperationHandlerContext unitStatementCtx in operationHandlersCtxs) + catch (Exception ex) { - OperationHandlerCStatement unitStatement = VisitOperationHandler(unitStatementCtx); - //TODO compilation.AddOpHandler(unitStatement); + LOGGER.Error("VisitScope encountered an error!"); + Console.WriteLine("VisitScope encountered an error!"); + throw new StatementParseException("Unable to parse scope :(", ex); } - - // Visit Compilation-Unit statements - IList unitStatementCtxs = context._statements; - foreach (CrimsonParser.StatementContext unitStatementCtx in unitStatementCtxs) - { - AbstractCrimsonStatement unitStatement = ParseStatement(unitStatementCtx); - scope.AddStatement(unitStatement); - } - - // Populate output fields - - return scopeStack.Pop(); } private AbstractCrimsonStatement ParseStatement (CrimsonParser.StatementContext stCtx) From 0f00c5b34cf440422fc9ab6c5843b1a47cf4843d Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sun, 2 Apr 2023 18:49:39 +0100 Subject: [PATCH 047/122] YAY --- Crimson/CSharp/Core/Crimson.cs | 6 +- Crimson/CSharp/Core/CrimsonCompiler.cs | 126 ++++++++++++------------- Crimson/CSharp/Core/Library.cs | 20 +++- 3 files changed, 84 insertions(+), 68 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 9ed5bf6..87c76c7 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -147,7 +147,11 @@ public static void Panic (PanicCode code) public enum PanicCode { - PARSE = -10 + OK = 0, + PARSE = -100, + LINK = -200, + GENERALISE = -300, + SPECIALISE = -400, } } } \ No newline at end of file diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index d566fec..0fafdde 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -29,76 +29,74 @@ public CrimsonCompiler (CrimsonOptions options, Library unitGenerator, Linker li public async void FullyCompileFromOptions () { - /* - * == PARSING STAGE == - * - * The syntax of the source files must be parsed from text to an abstract syntax tree. - * In this case, the work is done by ANTLR, using the Crimson.g4 grammar file. - * This stage results in a collection of individual units which contain ComplexStatements exactly describing the input. - * - */ - LOGGER.Info("\n\n"); - LOGGER.Info(" P A R S I N G "); - - Task scopeTask = Library.StartLoadingScope(Options.SourceUri); try { - scopeTask.Wait(); + /* + * == PARSING STAGE == + * + * The syntax of the source files must be parsed from text to an abstract syntax tree. + * In this case, the work is done by ANTLR, using the Crimson.g4 grammar file. + * This stage results in a collection of individual units which contain ComplexStatements exactly describing the input. + * + */ + LOGGER.Info("\n\n"); + LOGGER.Info(" P A R S I N G "); + Scope rootScope = Library.LoadScope(Options.SourceUri); // Get the root unit (ie. main.crm) + Compilation compilation = new Compilation(rootScope, Options); // Generate dependency units (all resources are henceforth accessible) + + + /* + * == LINKING STAGE == + * + * Now that all of the statements have been flattened into one list, we can iterate through and link the FunctionCalls. + * + */ + LOGGER.Info("\n\n"); + LOGGER.Info(" L I N K I N G "); + Linker.Link(compilation); + + + /* + * == GENERALISING STAGE == + * + * Converts the program into a list of general assembly statements covering the concepts of the program + * without tying it to one assembly language. + */ + LOGGER.Info("\n\n"); + LOGGER.Info(" G E N E R A L I S I N G "); + Task generalProgramTask = Generaliser.Generalise(compilation); + generalProgramTask.Wait(); + GeneralAssemblyProgram generalProgram = generalProgramTask.Result; + + + LOGGER.Info("\n\n"); + DumpGeneralisedProgram(generalProgram); + + /* + * == SPECIALISING STAGE == + * + * Convert the generic program into one targetting the desired assembly language. + * For each language, you'll need a different ISpecialiser. + */ + LOGGER.Info("\n\n"); + LOGGER.Info(" S P E C I A L I S I N G "); + AbstractSpecificAssemblyProgram specialisedProgram = Specialiser.Specialise(generalProgram); + + /* + * == CLEANUP == + */ + LOGGER.Info("\n\n"); + DumpSpecialisedProgram(specialisedProgram); + + LOGGER.Info("\n\n"); + LOGGER.Info("Done!"); } - catch (Exception ex) + catch (Exception e) { - LOGGER.Error(ex); + LOGGER.Error("A critical error occurred during compilation."); + LOGGER.Error(e); Crimson.Panic(Crimson.PanicCode.PARSE); } - Scope rootScope = scopeTask.Result; // Get the root unit (ie. main.crm) - Compilation compilation = new Compilation(rootScope, Options); // Generate dependency units (all resources are henceforth accessible) - - - /* - * == LINKING STAGE == - * - * Now that all of the statements have been flattened into one list, we can iterate through and link the FunctionCalls. - * - */ - LOGGER.Info("\n\n"); - LOGGER.Info(" L I N K I N G "); - Linker.Link(compilation); - - - /* - * == GENERALISING STAGE == - * - * Converts the program into a list of general assembly statements covering the concepts of the program - * without tying it to one assembly language. - */ - LOGGER.Info("\n\n"); - LOGGER.Info(" G E N E R A L I S I N G "); - Task generalProgramTask = Generaliser.Generalise(compilation); - generalProgramTask.Wait(); - GeneralAssemblyProgram generalProgram = generalProgramTask.Result; - - - LOGGER.Info("\n\n"); - DumpGeneralisedProgram(generalProgram); - - /* - * == SPECIALISING STAGE == - * - * Convert the generic program into one targetting the desired assembly language. - * For each language, you'll need a different ISpecialiser. - */ - LOGGER.Info("\n\n"); - LOGGER.Info(" S P E C I A L I S I N G "); - AbstractSpecificAssemblyProgram specialisedProgram = Specialiser.Specialise(generalProgram); - - /* - * == CLEANUP == - */ - LOGGER.Info("\n\n"); - DumpSpecialisedProgram(specialisedProgram); - - LOGGER.Info("\n\n"); - LOGGER.Info("Done!"); } private void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram specialisedProgram) diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index f65550e..aeca4d2 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -86,7 +86,22 @@ public void SetRootScope (Scope scope) Root = scope; } - public Task StartLoadingScope (Uri uri) + public Scope LoadScope (Uri uri) + { + try + { + Task task = GetScopeLoadingTask(uri); + task.Start(); + task.Wait(); + return task.Result; + } + catch (Exception) + { + throw; + } + } + + private Task GetScopeLoadingTask (Uri uri) { // Safety check to prevent double loading // Immediately insert the key to reserve it @@ -103,7 +118,6 @@ public Task StartLoadingScope (Uri uri) Thread.CurrentThread.Name = $"{Thread.CurrentThread.Name}_c"; return LoadScopeSync(uri); }); - task.Start(); return task; } @@ -159,7 +173,7 @@ private async void LoadScopeDependencies (Scope root) // Queue loading of its dependencies (once it's loaded) foreach (var i in root.Imports) { - Task scope = StartLoadingScope(i.Value.URI); + Task scope = GetScopeLoadingTask(i.Value.URI); Task dependencyTask = scope.ContinueWith(finishedTask => LoadScopeDependencies(finishedTask.Result)); ongoingLoadingTasks.Add(dependencyTask); From 17eb99bc5b73485cdef988ed6e350c5f34f1005f Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:09:31 +0100 Subject: [PATCH 048/122] Alright now the issue is with parsing URIs... --- Crimson/CSharp/Core/Crimson.cs | 14 ++++++-- Crimson/CSharp/Core/CrimsonCompiler.cs | 4 +-- Crimson/CSharp/Core/Library.cs | 45 ++++++++------------------ Crimson/CSharp/Parsing/ScopeVisitor.cs | 9 ++---- 4 files changed, 28 insertions(+), 44 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 87c76c7..5beebbe 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -133,11 +133,19 @@ private static void ConfigureNLog () Console.WriteLine("Did you see the TRACE and FATAL test messages?"); } - public static void Panic (PanicCode code) + public static void Panic (PanicCode code, Exception e) { - LOGGER!.Error(""); + LOGGER.Error(""); LOGGER.Error(" ### COMPILER PANIC!! ###"); - LOGGER.Error("An error during compilation has caused the compiler to halt!"); + + if (e != null) + { + LOGGER.Error(e); + } + else + { + LOGGER.Error("An error during compilation has caused the compiler to halt!"); + } int codeNum = (int) code; LOGGER.Error($"Panic code: {codeNum}"); diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 0fafdde..574295d 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -93,9 +93,7 @@ public async void FullyCompileFromOptions () } catch (Exception e) { - LOGGER.Error("A critical error occurred during compilation."); - LOGGER.Error(e); - Crimson.Panic(Crimson.PanicCode.PARSE); + Crimson.Panic(Crimson.PanicCode.PARSE, e); } } diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index aeca4d2..6f38d54 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -88,17 +88,20 @@ public void SetRootScope (Scope scope) public Scope LoadScope (Uri uri) { - try - { - Task task = GetScopeLoadingTask(uri); - task.Start(); - task.Wait(); - return task.Result; - } - catch (Exception) + Stream source = GetStreamOf(uri); + StreamReader reader = new StreamReader(source); + string text = reader.ReadToEnd(); + + Scope scope = ParseScopeText(uri, text); + + LoadScopeDependencies(scope); + + if (Root == null) { - throw; + SetRootScope(scope); } + + return scope; } private Task GetScopeLoadingTask (Uri uri) @@ -116,7 +119,7 @@ private Task GetScopeLoadingTask (Uri uri) Task task = new Task(() => { Thread.CurrentThread.Name = $"{Thread.CurrentThread.Name}_c"; - return LoadScopeSync(uri); + return LoadScope(uri); }); return task; } @@ -141,24 +144,6 @@ private Scope GetScopeUnsafe (Uri uri) return task.Result; } - private Scope LoadScopeSync (Uri uri) - { - Stream source = GetStreamOf(uri); - StreamReader reader = new StreamReader(source); - string text = reader.ReadToEnd(); - - Scope scope = ParseScopeText(uri, text); - - LoadScopeDependencies(scope); - - if (Root == null) - { - SetRootScope(scope); - } - - return scope; - } - /// /// Loads dependencies for the given root CompilationUnit, as well as that unit's dependencies, recursively. /// Also checks for nested scopes and loads them as well! @@ -220,9 +205,7 @@ private Scope ParseScopeText (Uri source, string textIn) } catch (Exception ex) { - LOGGER.Error("An error ocurred while parsing a scope"); - Console.WriteLine("An error ocurred while parsing a scope"); - throw new StatementParseException("A parser error occurred :( ", ex); + throw new StatementParseException($"An error ocurred while parsing a scope originating from {source}", ex); } } diff --git a/Crimson/CSharp/Parsing/ScopeVisitor.cs b/Crimson/CSharp/Parsing/ScopeVisitor.cs index ce6d407..271b831 100644 --- a/Crimson/CSharp/Parsing/ScopeVisitor.cs +++ b/Crimson/CSharp/Parsing/ScopeVisitor.cs @@ -16,12 +16,9 @@ internal class ScopeVisitor : CrimsonBaseVisitor public static readonly Stack scopeStack = new Stack(); public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) { - // TODO TESTTING - // return new Scope("TEST", (Scope) null!); - try { - Scope scope = new Scope(null, scopeStack.TryPeek(out Scope? result) ? result : null); + Scope scope = new Scope(null!, scopeStack.TryPeek(out Scope? result) ? result : null); scopeStack.Push(scope); // Visit imports @@ -56,9 +53,7 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) } catch (Exception ex) { - LOGGER.Error("VisitScope encountered an error!"); - Console.WriteLine("VisitScope encountered an error!"); - throw new StatementParseException("Unable to parse scope :(", ex); + throw new StatementParseException($"{GetType()} was unable to parse the given {(context == null ? "NULL" : context.GetType())}", ex); } } From d0b5997362442e6956b5e20efc4dde7d0e69d1ff Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sun, 2 Apr 2023 21:03:10 +0100 Subject: [PATCH 049/122] Quotes are now trimmed off of URIs > ScopeVisitor trims ' ', '\t', '\n', '\v', '\f', '\r' and '"' off of URIs > Generaliser.Generalise() no longer async --- Crimson/CSharp/Core/CrimsonCompiler.cs | 5 ++--- Crimson/CSharp/Core/Library.cs | 4 ++-- Crimson/CSharp/Generalising/Generaliser.cs | 2 +- Crimson/CSharp/Parsing/ScopeVisitor.cs | 12 +++++++++++- Crimson/Resources/Native Library/heap.crm | 2 +- Crimson/Resources/Test Compilations/logging/log.crm | 2 +- Crimson/Resources/Test Compilations/main.crm | 6 +++--- Crimson/Resources/Test Compilations/utils/utils.crm | 2 +- 8 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 574295d..2119fd5 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -43,6 +43,7 @@ public async void FullyCompileFromOptions () LOGGER.Info(" P A R S I N G "); Scope rootScope = Library.LoadScope(Options.SourceUri); // Get the root unit (ie. main.crm) Compilation compilation = new Compilation(rootScope, Options); // Generate dependency units (all resources are henceforth accessible) + Library.Root = rootScope; /* @@ -64,9 +65,7 @@ public async void FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" G E N E R A L I S I N G "); - Task generalProgramTask = Generaliser.Generalise(compilation); - generalProgramTask.Wait(); - GeneralAssemblyProgram generalProgram = generalProgramTask.Result; + GeneralAssemblyProgram generalProgram = Generaliser.Generalise(compilation); LOGGER.Info("\n\n"); diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 6f38d54..827a351 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -17,8 +17,8 @@ internal class Library { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - public static readonly string NATIVE_HOST = "crimson.native"; - public static readonly string ROOT_HOST = "crimson.root"; + public static readonly string NATIVE_HOST = "native.crimson"; + public static readonly string ROOT_HOST = "root.crimson"; /// /// The "master" list of units. Stored so that each unique unit is only created once. diff --git a/Crimson/CSharp/Generalising/Generaliser.cs b/Crimson/CSharp/Generalising/Generaliser.cs index d9b4229..6bdd4a0 100644 --- a/Crimson/CSharp/Generalising/Generaliser.cs +++ b/Crimson/CSharp/Generalising/Generaliser.cs @@ -14,7 +14,7 @@ internal class Generaliser { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - public async Task Generalise (Compilation compilation) + public GeneralAssemblyProgram Generalise (Compilation compilation) { GeneralAssemblyProgram program = new GeneralAssemblyProgram(); diff --git a/Crimson/CSharp/Parsing/ScopeVisitor.cs b/Crimson/CSharp/Parsing/ScopeVisitor.cs index 271b831..05545c8 100644 --- a/Crimson/CSharp/Parsing/ScopeVisitor.cs +++ b/Crimson/CSharp/Parsing/ScopeVisitor.cs @@ -13,7 +13,10 @@ internal class ScopeVisitor : CrimsonBaseVisitor { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); + // ==================== VISITOR ==================== + public static readonly Stack scopeStack = new Stack(); + public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) { try @@ -25,7 +28,14 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) IList importCtxs = context._imports; foreach (CrimsonParser.ImportUnitContext importCtx in importCtxs) { - Uri uri = new Uri(importCtx.uri.Text); + string originalUriText = importCtx.uri.Text; + string trimmedUriText = originalUriText.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); + if (!originalUriText.Equals(trimmedUriText, StringComparison.OrdinalIgnoreCase)) + LOGGER.Debug($"Trimmed URI {originalUriText} to {trimmedUriText}"); + Uri? uri; + if (!Uri.TryCreate(trimmedUriText, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out uri)) + throw new StatementParseException($"Unable to parse illegal URI '{importCtx.uri.Text}'"); + FullNameCToken id = VisitFullName(importCtx.fullName()); ImportCStatement import = new ImportCStatement(uri, id); scope.Imports.Add(id.ToString(), import); diff --git a/Crimson/Resources/Native Library/heap.crm b/Crimson/Resources/Native Library/heap.crm index b61a368..2a6b465 100644 --- a/Crimson/Resources/Native Library/heap.crm +++ b/Crimson/Resources/Native Library/heap.crm @@ -28,7 +28,7 @@ // It should be at a static location relative to the start of process memory. // int[] regions = new int[256]; - #using "${NATIVE}/maths.crm" as maths; + #using "file://native.crimson/maths.crm" as maths; // IMPORTANT!! // regions_i and regions_region will be removed!! diff --git a/Crimson/Resources/Test Compilations/logging/log.crm b/Crimson/Resources/Test Compilations/logging/log.crm index a605c69..fd1fe50 100644 --- a/Crimson/Resources/Test Compilations/logging/log.crm +++ b/Crimson/Resources/Test Compilations/logging/log.crm @@ -1,5 +1,5 @@ { - #using "${NATIVE}/console.crm" as utils_stdout + #using "file://native.crimson/console.crm" as utils_stdout // Utility package function multiply (num1, num2) { diff --git a/Crimson/Resources/Test Compilations/main.crm b/Crimson/Resources/Test Compilations/main.crm index 7f060da..97e2a16 100644 --- a/Crimson/Resources/Test Compilations/main.crm +++ b/Crimson/Resources/Test Compilations/main.crm @@ -3,9 +3,9 @@ // - 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 "file://root.crimson/utils/utils.crm" as utils; + #using "file://native.crimson/console.crm" as stdout; + #using "file://native.crimson/heap.crm" as heap; // Declare ophandlers: // diff --git a/Crimson/Resources/Test Compilations/utils/utils.crm b/Crimson/Resources/Test Compilations/utils/utils.crm index c23fcde..3a3ec07 100644 --- a/Crimson/Resources/Test Compilations/utils/utils.crm +++ b/Crimson/Resources/Test Compilations/utils/utils.crm @@ -1,5 +1,5 @@ { - #using "${NATIVE}/console.crm" as utils_stdout; + #using "file:///native.crimson/console.crm" as utils_stdout; // Utility package function multiply (num1, num2) { From 3d3d7dd56cb28436db3b938c7075f27d2bfe8195 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sun, 2 Apr 2023 21:21:44 +0100 Subject: [PATCH 050/122] yay now tasks just aren't completing... --- Crimson/CSharp/Core/Compilation.cs | 4 ++-- Crimson/CSharp/Core/CrimsonCompiler.cs | 2 +- Crimson/CSharp/Core/Library.cs | 21 +++++++++++++++++---- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/CSharp/Core/Compilation.cs index 35b88e9..1c3d778 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/CSharp/Core/Compilation.cs @@ -23,9 +23,9 @@ public class Compilation /// internal Library Library { get; } - public Compilation (Scope rootUnit, CrimsonOptions options) + public Compilation (Library library) { - Library = new Library(); + Library = library; } public override string ToString () diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 2119fd5..9ab9952 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -42,8 +42,8 @@ public async void FullyCompileFromOptions () LOGGER.Info("\n\n"); LOGGER.Info(" P A R S I N G "); Scope rootScope = Library.LoadScope(Options.SourceUri); // Get the root unit (ie. main.crm) - Compilation compilation = new Compilation(rootScope, Options); // Generate dependency units (all resources are henceforth accessible) Library.Root = rootScope; + Compilation compilation = new Compilation(Library); // Generate dependency units (all resources are henceforth accessible) /* diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 827a351..2e9bcd6 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -13,7 +13,7 @@ namespace Crimson.CSharp.Core /// /// Generates CompilationUnits from input text with the power of ANTLR. /// - internal class Library + public class Library { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); @@ -64,8 +64,12 @@ public List GetScopes () { Task task = pair.Value; + if (task.Status == TaskStatus.Created) + task.Start(); + if (!task.IsCompleted) { + // TODO freezing here LOGGER.Debug("Waiting for async loading to finish before returning scope list..."); task.Wait(); } @@ -88,6 +92,12 @@ public void SetRootScope (Scope scope) public Scope LoadScope (Uri uri) { + if (Scopes.ContainsKey(uri)) + { + LOGGER.Debug($"{uri} is already loading, won't load twice, so waiting for that to finish..."); + Scopes[uri].Wait(); + return Scopes[uri].Result; + } Stream source = GetStreamOf(uri); StreamReader reader = new StreamReader(source); string text = reader.ReadToEnd(); @@ -110,7 +120,6 @@ private Task GetScopeLoadingTask (Uri uri) // Immediately insert the key to reserve it Scope? existingScope = GetScope(uri); if (existingScope != null) return Task.FromResult(existingScope); - Scopes[uri] = null!; LOGGER.Info($"Loading scope from {uri}"); @@ -118,9 +127,11 @@ private Task GetScopeLoadingTask (Uri uri) //return Task.Factory.StartNew(() => LoadScopeSync(uri)); Task task = new Task(() => { - Thread.CurrentThread.Name = $"{Thread.CurrentThread.Name}_c"; + Thread.CurrentThread.Name = $"{Thread.CurrentThread.Name}_{uri.ToString()}"; return LoadScope(uri); }); + + Scopes[uri] = task; return task; } @@ -160,6 +171,7 @@ private async void LoadScopeDependencies (Scope root) { Task scope = GetScopeLoadingTask(i.Value.URI); Task dependencyTask = scope.ContinueWith(finishedTask => LoadScopeDependencies(finishedTask.Result)); + scope.Start(); ongoingLoadingTasks.Add(dependencyTask); } @@ -174,7 +186,8 @@ private async void LoadScopeDependencies (Scope root) } // Wait for multithreading to finish before returning. - foreach (var task in ongoingLoadingTasks) await task; + foreach (var task in ongoingLoadingTasks) + await task; LOGGER.Debug($"Finished loading dependencies of {root}"); } From 49de58e621b4963276612ef30dff4e6c35d92505 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sun, 2 Apr 2023 22:39:44 +0100 Subject: [PATCH 051/122] Tidied up responsibilities within Library > Renamed GetScopeLoadingTask back to LoadScopeAsync > Already-loading check moved from LoadScope to LoadScopeAsync. Now also performed on parent thread (not in Task) > LoadScopeAsync now auto-starts its Task --- Crimson/CSharp/Core/Library.cs | 37 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 2e9bcd6..eac88cb 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -92,12 +92,8 @@ public void SetRootScope (Scope scope) public Scope LoadScope (Uri uri) { - if (Scopes.ContainsKey(uri)) - { - LOGGER.Debug($"{uri} is already loading, won't load twice, so waiting for that to finish..."); - Scopes[uri].Wait(); - return Scopes[uri].Result; - } + LOGGER.Info($"Loading scope from {uri}"); + Stream source = GetStreamOf(uri); StreamReader reader = new StreamReader(source); string text = reader.ReadToEnd(); @@ -114,23 +110,20 @@ public Scope LoadScope (Uri uri) return scope; } - private Task GetScopeLoadingTask (Uri uri) + private Task LoadScopeAsync (Uri uri) { - // Safety check to prevent double loading - // Immediately insert the key to reserve it - Scope? existingScope = GetScope(uri); - if (existingScope != null) return Task.FromResult(existingScope); - - LOGGER.Info($"Loading scope from {uri}"); + // Check if already loading/loaded and reserve key if not + if (Scopes.ContainsKey(uri)) return Scopes[uri]; + Scopes[uri] = null!; // Generate task - //return Task.Factory.StartNew(() => LoadScopeSync(uri)); - Task task = new Task(() => + Task task = Task.Factory.StartNew(() => { Thread.CurrentThread.Name = $"{Thread.CurrentThread.Name}_{uri.ToString()}"; return LoadScope(uri); }); + // Assign correct non-null task to key Scopes[uri] = task; return task; } @@ -169,9 +162,8 @@ private async void LoadScopeDependencies (Scope root) // Queue loading of its dependencies (once it's loaded) foreach (var i in root.Imports) { - Task scope = GetScopeLoadingTask(i.Value.URI); + Task scope = LoadScopeAsync(i.Value.URI); Task dependencyTask = scope.ContinueWith(finishedTask => LoadScopeDependencies(finishedTask.Result)); - scope.Start(); ongoingLoadingTasks.Add(dependencyTask); } @@ -187,7 +179,16 @@ private async void LoadScopeDependencies (Scope root) // Wait for multithreading to finish before returning. foreach (var task in ongoingLoadingTasks) - await task; + { + try + { + task.Wait(); + } + catch (Exception) + { + throw; + } + } LOGGER.Debug($"Finished loading dependencies of {root}"); } From bb8274543ac0eb36d387f766a5e4c8db38b92a38 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Mon, 3 Apr 2023 09:04:32 +0100 Subject: [PATCH 052/122] Improving error handling > Coalesced exceptions into single classes (ParsingExceptions, LinkingExceptions, etc) > More detailed Crimson.Panic --- Crimson/CSharp/Core/Compilation.cs | 6 +- Crimson/CSharp/Core/Crimson.cs | 34 +++++++++--- Crimson/CSharp/Core/Library.cs | 20 +++++-- Crimson/CSharp/Exceptions/CrimsonException.cs | 24 ++++++++ .../Exceptions/CrimsonParserException.cs | 21 ------- .../Exceptions/ExceptionCrimsonException.cs | 41 ++++++++++++++ .../CSharp/Exceptions/FlatteningException.cs | 21 ------- .../Exceptions/GeneralisingExceptions.cs | 21 +++++++ ...nkingException.cs => LinkingExceptions.cs} | 13 +++-- .../CSharp/Exceptions/ParsingExceptions.cs | 55 +++++++++++++++++++ .../Exceptions/StatementParseException.cs | 21 ------- .../Exceptions/UnitGeneratorException.cs | 21 ------- 12 files changed, 191 insertions(+), 107 deletions(-) create mode 100644 Crimson/CSharp/Exceptions/CrimsonException.cs delete mode 100644 Crimson/CSharp/Exceptions/CrimsonParserException.cs create mode 100644 Crimson/CSharp/Exceptions/ExceptionCrimsonException.cs delete mode 100644 Crimson/CSharp/Exceptions/FlatteningException.cs create mode 100644 Crimson/CSharp/Exceptions/GeneralisingExceptions.cs rename Crimson/CSharp/Exceptions/{LinkingException.cs => LinkingExceptions.cs} (56%) create mode 100644 Crimson/CSharp/Exceptions/ParsingExceptions.cs delete mode 100644 Crimson/CSharp/Exceptions/StatementParseException.cs delete mode 100644 Crimson/CSharp/Exceptions/UnitGeneratorException.cs diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/CSharp/Core/Compilation.cs index 1c3d778..3407b1a 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/CSharp/Core/Compilation.cs @@ -43,7 +43,7 @@ public FunctionCStatement GetEntryFunction () IList funcs = rootUnit.Functions.Values.Where(func => regex.IsMatch(func.Name.ToString())).ToList(); 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 '{Core.Crimson.Options.EntryFunctionName}' using Regex: '{pattern}'."); + throw new GeneralisingException($"No valid entry function found. Invalid contenders were: [{string.Join(',', rootUnit.Functions.Values.Select(f => f.Name))}]. Searched for Crimson name '{Core.Crimson.Options.EntryFunctionName}' using Regex: '{pattern}'."); } else if (funcs.Count == 1) { @@ -52,11 +52,11 @@ public FunctionCStatement GetEntryFunction () } 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))}]."); + throw new GeneralisingException($"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}"); + throw new GeneralisingException($"Congratulations, you've managed to find a very strange number of entry functions: {funcs.Count}"); } } } diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 5beebbe..630a2e3 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -3,6 +3,7 @@ using Crimson.CSharp.Specialising; using Crimson.CSharp.Specialising.RFASM; using Crimson.CSharp.Generalising; +using Crimson.CSharp.Exceptions; namespace Crimson.CSharp.Core { @@ -133,30 +134,45 @@ private static void ConfigureNLog () Console.WriteLine("Did you see the TRACE and FATAL test messages?"); } - public static void Panic (PanicCode code, Exception e) + public static void Panic (CrimsonException reason) { - LOGGER.Error(""); - LOGGER.Error(" ### COMPILER PANIC!! ###"); + List lines = new List + { + "", + " ### COMPILER PANIC!! ###" + }; + lines.AddRange(reason.GetDetailedMessage()); + lines.Add($"Panic code: {(int) reason.Code}"); + + lines.ForEach(line => LOGGER!.Error(line)); + lines.ForEach(line => Console.Error.WriteLine(line)); + Environment.Exit((int) reason.Code); + } - if (e != null) + public static void Panic (string message, PanicCode code, Exception e) + { + if (e is CrimsonException ce) { - LOGGER.Error(e); + Panic(ce); } else { - LOGGER.Error("An error during compilation has caused the compiler to halt!"); + ExceptionCrimsonException reason = new ExceptionCrimsonException(message, code, e); + Panic(reason); } - int codeNum = (int) code; - LOGGER.Error($"Panic code: {codeNum}"); - + // Exits before here Environment.Exit((int) code); } public enum PanicCode { OK = 0, + PARSE = -100, + PARSE_STATEMENT = -110, + PARSE_SCOPE = -120, + LINK = -200, GENERALISE = -300, SPECIALISE = -400, diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index eac88cb..576f800 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -162,6 +162,7 @@ private async void LoadScopeDependencies (Scope root) // Queue loading of its dependencies (once it's loaded) foreach (var i in root.Imports) { + if (Scopes.ContainsKey(i.Value.URI)) continue; Task scope = LoadScopeAsync(i.Value.URI); Task dependencyTask = scope.ContinueWith(finishedTask => LoadScopeDependencies(finishedTask.Result)); @@ -219,15 +220,24 @@ private Scope ParseScopeText (Uri source, string textIn) } catch (Exception ex) { - throw new StatementParseException($"An error ocurred while parsing a scope originating from {source}", ex); + Crimson.Panic($"An error ocurred while parsing a scope originating from {source}", Crimson.PanicCode.PARSE_SCOPE, ex); + Environment.Exit(1); } } private Stream GetStreamOf (Uri uri) { - uri = SquashUri(uri); - FileStream stream = new FileStream(uri.LocalPath, FileMode.Open); - return stream; + try + { + uri = SquashUri(uri); + FileStream stream = new FileStream(uri.LocalPath, FileMode.Open); + return stream; + } + catch (Exception e) + { + Crimson.Panic(Crimson.PanicCode.PARSE, e); + throw; + } } private Uri SquashUri (Uri uri) @@ -237,7 +247,7 @@ private Uri SquashUri (Uri uri) if (uri.Scheme != Uri.UriSchemeFile) throw new UriFormatException($"Crimson only accepts URIs of the file:/// scheme at this time. Found: {uri.Scheme}"); - // file:///crimson.native/heap.crm + // file:///native.crimson/heap.crm if (uri.Host.Equals(NATIVE_HOST)) { string localPath = Path.Combine(Crimson.Options.NativeUri.AbsolutePath, uri.AbsolutePath); diff --git a/Crimson/CSharp/Exceptions/CrimsonException.cs b/Crimson/CSharp/Exceptions/CrimsonException.cs new file mode 100644 index 0000000..1506169 --- /dev/null +++ b/Crimson/CSharp/Exceptions/CrimsonException.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Exceptions +{ + internal abstract class CrimsonException : Exception + { + public CrimsonException (Core.Crimson.PanicCode code) + { + Code = code; + } + + public Core.Crimson.PanicCode Code { get; private set; } + public abstract IList GetDetailedMessage (); + + public List FormatException (Exception e) + { + + } + } +} diff --git a/Crimson/CSharp/Exceptions/CrimsonParserException.cs b/Crimson/CSharp/Exceptions/CrimsonParserException.cs deleted file mode 100644 index 7793324..0000000 --- a/Crimson/CSharp/Exceptions/CrimsonParserException.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Exceptions -{ - internal class CrimsonParserException : ArgumentException - { - public CrimsonParserException (string message) : base(message) - { - - } - - public CrimsonParserException (string message, Exception cause) : base(message, cause) - { - - } - } -} diff --git a/Crimson/CSharp/Exceptions/ExceptionCrimsonException.cs b/Crimson/CSharp/Exceptions/ExceptionCrimsonException.cs new file mode 100644 index 0000000..24de42e --- /dev/null +++ b/Crimson/CSharp/Exceptions/ExceptionCrimsonException.cs @@ -0,0 +1,41 @@ +using Crimson.CSharp.Exceptions; +using NLog; + +namespace Crimson.CSharp.Core +{ + internal class ExceptionCrimsonException : CrimsonException + { + public string ErrMessage { get; } + public Exception E { get; } + + public ExceptionCrimsonException (string message, Crimson.PanicCode code, Exception e) : base(code) + { + ErrMessage = message; + E = e; + } + + public override IList GetDetailedMessage () + { + List message = new List + { + $"This is an automatically generated error-message. An unexpected non-{typeof(CrimsonException)} has occurred. Details may be limited.", + $"Please report this error to the maintainer of this software, including logs, system details, .NET version and any other relevant information." + }; + + // + if (String.IsNullOrWhiteSpace(ErrMessage)) + message.Add("No unique error message given."); + else + message.Add(ErrMessage); + + // + if (E == null) + message.Add("No exception details provided."); + else + message.AddRange(E.ToString().Split(Environment.NewLine)); + + // + return message; + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Exceptions/FlatteningException.cs b/Crimson/CSharp/Exceptions/FlatteningException.cs deleted file mode 100644 index d7fbc8f..0000000 --- a/Crimson/CSharp/Exceptions/FlatteningException.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Exceptions -{ - internal class FlatteningException : ArgumentException - { - public FlatteningException (string message) : base(message) - { - - } - - public FlatteningException (string message, Exception cause) : base(message, cause) - { - - } - } -} diff --git a/Crimson/CSharp/Exceptions/GeneralisingExceptions.cs b/Crimson/CSharp/Exceptions/GeneralisingExceptions.cs new file mode 100644 index 0000000..008f1c9 --- /dev/null +++ b/Crimson/CSharp/Exceptions/GeneralisingExceptions.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Exceptions +{ + internal class GeneralisingException : ArgumentException + { + public GeneralisingException (string message) : base(message) + { + + } + + public GeneralisingException (string message, Exception cause) : base(message, cause) + { + + } + } +} diff --git a/Crimson/CSharp/Exceptions/LinkingException.cs b/Crimson/CSharp/Exceptions/LinkingExceptions.cs similarity index 56% rename from Crimson/CSharp/Exceptions/LinkingException.cs rename to Crimson/CSharp/Exceptions/LinkingExceptions.cs index b40daec..5428f66 100644 --- a/Crimson/CSharp/Exceptions/LinkingException.cs +++ b/Crimson/CSharp/Exceptions/LinkingExceptions.cs @@ -8,14 +8,15 @@ namespace Crimson.CSharp.Exceptions { internal class LinkingException : ArgumentException { - public LinkingException (string message) : base(message) - { + public LinkingException (string message) : base(message) { } - } + public LinkingException (string message, Exception cause) : base(message, cause) { } + } - public LinkingException (string message, Exception cause) : base(message, cause) - { + internal class OtherLinkingException : ArgumentException + { + public OtherLinkingException (string message) : base(message) { } - } + public OtherLinkingException (string message, Exception cause) : base(message, cause) { } } } diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs new file mode 100644 index 0000000..b2797b8 --- /dev/null +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -0,0 +1,55 @@ +using Crimson.CSharp.Parsing.Statements; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Exceptions +{ + internal class StatementParseException : CrimsonException + { + public AbstractCrimsonStatement Statement { get; private set; } + public Exception Cause { get; private set; } + + public StatementParseException (AbstractCrimsonStatement statement, Exception cause) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) + { + Statement = statement; + Cause = cause; + } + + public override IList GetDetailedMessage () + { + List strings = new List(); + strings.Add($"An error occurred while parsing the statement {(Statement != null ? Statement : "NULL")}"); + strings.AddRange(FormatException(Cause)); + return strings; + } + } + + internal class CrimsonParserException : ArgumentException + { + public CrimsonParserException (string message) : base(message) + { + + } + + public CrimsonParserException (string message, Exception cause) : base(message, cause) + { + + } + } + + internal class ScopeGenerationException : CrimsonException + { + public ScopeGenerationException (string message) : base(message) + { + + } + + public ScopeGenerationException (string message, Exception cause) : base(message, cause) + { + + } + } +} diff --git a/Crimson/CSharp/Exceptions/StatementParseException.cs b/Crimson/CSharp/Exceptions/StatementParseException.cs deleted file mode 100644 index 2c9d0c6..0000000 --- a/Crimson/CSharp/Exceptions/StatementParseException.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Exceptions -{ - internal class StatementParseException : ArgumentException - { - public StatementParseException (string message) : base(message) - { - - } - - public StatementParseException (string message, Exception cause) : base(message, cause) - { - - } - } -} diff --git a/Crimson/CSharp/Exceptions/UnitGeneratorException.cs b/Crimson/CSharp/Exceptions/UnitGeneratorException.cs deleted file mode 100644 index 8731f68..0000000 --- a/Crimson/CSharp/Exceptions/UnitGeneratorException.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Exceptions -{ - internal class UnitGeneratorException : FileNotFoundException - { - public UnitGeneratorException (string message) : base(message) - { - - } - - public UnitGeneratorException (string message, Exception cause) : base(message, cause) - { - - } - } -} From a34d7ad833a0b0eb0329e0af6e50ddf86dac29f6 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Mon, 3 Apr 2023 15:39:28 +0100 Subject: [PATCH 053/122] More error handling (now the logs are really messy) --- Crimson/CSharp/Core/CrimsonCompiler.cs | 3 ++- Crimson/CSharp/Core/Library.cs | 4 +-- Crimson/CSharp/Exceptions/CrimsonException.cs | 8 ++++-- .../CSharp/Exceptions/ParserErrorStrategy.cs | 2 +- .../CSharp/Exceptions/ParsingExceptions.cs | 25 ++++++++----------- 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 9ab9952..7d3d8c4 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -92,7 +92,8 @@ public async void FullyCompileFromOptions () } catch (Exception e) { - Crimson.Panic(Crimson.PanicCode.PARSE, e); + Crimson.Panic("An uncaught exception occurred during the compilation process.", Crimson.PanicCode.PARSE, e); + throw; } } diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 576f800..49579b3 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -221,7 +221,7 @@ private Scope ParseScopeText (Uri source, string textIn) catch (Exception ex) { Crimson.Panic($"An error ocurred while parsing a scope originating from {source}", Crimson.PanicCode.PARSE_SCOPE, ex); - Environment.Exit(1); + throw; } } @@ -235,7 +235,7 @@ private Stream GetStreamOf (Uri uri) } catch (Exception e) { - Crimson.Panic(Crimson.PanicCode.PARSE, e); + Crimson.Panic($"An error occurred getting the stream of the resource at the uri {uri}", Crimson.PanicCode.PARSE, e); throw; } } diff --git a/Crimson/CSharp/Exceptions/CrimsonException.cs b/Crimson/CSharp/Exceptions/CrimsonException.cs index 1506169..358eb64 100644 --- a/Crimson/CSharp/Exceptions/CrimsonException.cs +++ b/Crimson/CSharp/Exceptions/CrimsonException.cs @@ -14,11 +14,15 @@ public CrimsonException (Core.Crimson.PanicCode code) } public Core.Crimson.PanicCode Code { get; private set; } - public abstract IList GetDetailedMessage (); - public List FormatException (Exception e) + public virtual IList GetDetailedMessage () { + return new List() { "No additional message detail provided." }; + } + public virtual IList FormatException (Exception e) + { + return e.ToString().Split(Environment.NewLine); } } } diff --git a/Crimson/CSharp/Exceptions/ParserErrorStrategy.cs b/Crimson/CSharp/Exceptions/ParserErrorStrategy.cs index 3a81122..10a9443 100644 --- a/Crimson/CSharp/Exceptions/ParserErrorStrategy.cs +++ b/Crimson/CSharp/Exceptions/ParserErrorStrategy.cs @@ -21,7 +21,7 @@ public ParserErrorStrategy (string path) public override void ReportError (Parser recognizer, RecognitionException e) { base.ReportError(recognizer, e); - throw new CrimsonParserException("", e); + throw new CrimsonParserException("CRIMSON PARSER EXCEPTION"); } } } diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs index b2797b8..91df1f5 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -12,6 +12,14 @@ internal class StatementParseException : CrimsonException public AbstractCrimsonStatement Statement { get; private set; } public Exception Cause { get; private set; } + public StatementParseException (object message, object other) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) + { + } + + public StatementParseException (object message) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) + { + } + public StatementParseException (AbstractCrimsonStatement statement, Exception cause) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) { Statement = statement; @@ -27,27 +35,16 @@ public override IList GetDetailedMessage () } } - internal class CrimsonParserException : ArgumentException + internal class CrimsonParserException : CrimsonException { - public CrimsonParserException (string message) : base(message) + public CrimsonParserException (string message) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) { - - } - - public CrimsonParserException (string message, Exception cause) : base(message, cause) - { - } } internal class ScopeGenerationException : CrimsonException { - public ScopeGenerationException (string message) : base(message) - { - - } - - public ScopeGenerationException (string message, Exception cause) : base(message, cause) + public ScopeGenerationException () : base(Core.Crimson.PanicCode.PARSE_SCOPE) { } From 0bf6d4811417a2d71291f16a1975d0bc4b478b4b Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Mon, 3 Apr 2023 15:44:06 +0100 Subject: [PATCH 054/122] Crimson.Panic now locks Stops several panics at once, which keeps the logs clean... --- Crimson/CSharp/Core/Crimson.cs | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 630a2e3..54f61a6 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -134,19 +134,24 @@ private static void ConfigureNLog () Console.WriteLine("Did you see the TRACE and FATAL test messages?"); } + private static readonly object panicLock = new object(); public static void Panic (CrimsonException reason) { - List lines = new List + // Prevent multi access (keep logs clean) + lock (panicLock) { - "", - " ### COMPILER PANIC!! ###" - }; - lines.AddRange(reason.GetDetailedMessage()); - lines.Add($"Panic code: {(int) reason.Code}"); + List lines = new List + { + "", + " ### COMPILER PANIC!! ###" + }; + lines.AddRange(reason.GetDetailedMessage()); + lines.Add($"Panic code: {(int) reason.Code}"); - lines.ForEach(line => LOGGER!.Error(line)); - lines.ForEach(line => Console.Error.WriteLine(line)); - Environment.Exit((int) reason.Code); + lines.ForEach(line => LOGGER!.Error(line)); + lines.ForEach(line => Console.Error.WriteLine(line)); + Environment.Exit((int) reason.Code); + } } public static void Panic (string message, PanicCode code, Exception e) From 9a128525dec3d98e1225c91618ddb0391ee50b41 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 4 Apr 2023 09:14:15 +0100 Subject: [PATCH 055/122] Failing to get streams from URIs --- Crimson/CSharp/Core/Crimson.cs | 2 +- Crimson/CSharp/Core/Library.cs | 12 ++++++++---- Crimson/CSharp/Exceptions/CrimsonException.cs | 4 ++-- Crimson/CSharp/Exceptions/ParsingExceptions.cs | 2 +- Crimson/Resources/Native Library/maths.crm | 2 ++ 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 54f61a6..5fbcd70 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -36,7 +36,7 @@ public static int Main (string[] args) args = new string[] { $"-s {CombineAndFormatPath(resourcesPath, "Test Compilations/main.crm")}", $"-t {CombineAndFormatPath(resourcesPath, "Test Compilations/result/main")}", - $"-n {CombineAndFormatPath(resourcesPath, "Native Library")}", + $"-n {CombineAndFormatPath(resourcesPath, "Native Library/")}", "-w", "4", "--rfasm" }; diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 49579b3..399bbdf 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -250,19 +250,23 @@ private Uri SquashUri (Uri uri) // file:///native.crimson/heap.crm if (uri.Host.Equals(NATIVE_HOST)) { - string localPath = Path.Combine(Crimson.Options.NativeUri.AbsolutePath, uri.AbsolutePath); + string localPath = $"{Crimson.Options.NativeUri.AbsolutePath}/{uri.AbsolutePath}"; builder.Host = ""; builder.Path = localPath; } - // file:///heap.crm - if (!Path.IsPathRooted(uri.AbsolutePath)) + // file://root.crimson/heap.crm + if (uri.Host.Equals(ROOT_HOST)) { string? parentDirectory = Path.GetDirectoryName(Crimson.Options.SourceUri.AbsolutePath); - string localPath = Path.Combine(parentDirectory, uri.AbsolutePath); + string localPath = $"{parentDirectory}/{uri.AbsolutePath}"; + builder.Host = ""; builder.Path = localPath; } + + + // file://C:/Crimson/Native%20Library/root.crimson/heap.crm or whatever return builder.Uri; } } diff --git a/Crimson/CSharp/Exceptions/CrimsonException.cs b/Crimson/CSharp/Exceptions/CrimsonException.cs index 358eb64..c0367cd 100644 --- a/Crimson/CSharp/Exceptions/CrimsonException.cs +++ b/Crimson/CSharp/Exceptions/CrimsonException.cs @@ -20,9 +20,9 @@ public virtual IList GetDetailedMessage () return new List() { "No additional message detail provided." }; } - public virtual IList FormatException (Exception e) + public virtual IList? FormatException (Exception e) { - return e.ToString().Split(Environment.NewLine); + return e?.ToString()?.Split(Environment.NewLine); } } } diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs index 91df1f5..24ad0b4 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -30,7 +30,7 @@ public override IList GetDetailedMessage () { List strings = new List(); strings.Add($"An error occurred while parsing the statement {(Statement != null ? Statement : "NULL")}"); - strings.AddRange(FormatException(Cause)); + strings.AddRange(FormatException(Cause) ?? Enumerable.Empty()); return strings; } } diff --git a/Crimson/Resources/Native Library/maths.crm b/Crimson/Resources/Native Library/maths.crm index 0462856..046709c 100644 --- a/Crimson/Resources/Native Library/maths.crm +++ b/Crimson/Resources/Native Library/maths.crm @@ -1,4 +1,6 @@ { + #using "file://native.crimson/heap.crm" as heap; + function pwr (number, exponent) { while (exponent <<> 0) { From fde0c3603678ca994ef3458853a05f192fcce521 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 4 Apr 2023 09:14:51 +0100 Subject: [PATCH 056/122] Failing to use HTTP to get scopes from URIs --- Crimson/CSharp/Core/CrimsonCompiler.cs | 2 +- Crimson/CSharp/Core/Library.cs | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 7d3d8c4..951fe9b 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -41,7 +41,7 @@ public async void FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" P A R S I N G "); - Scope rootScope = Library.LoadScope(Options.SourceUri); // Get the root unit (ie. main.crm) + Scope rootScope = await Library.LoadScope(Options.SourceUri); // Get the root unit (ie. main.crm) Library.Root = rootScope; Compilation compilation = new Compilation(Library); // Generate dependency units (all resources are henceforth accessible) diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 399bbdf..0d6151c 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -90,11 +90,11 @@ public void SetRootScope (Scope scope) Root = scope; } - public Scope LoadScope (Uri uri) + public async Task LoadScope (Uri uri) { LOGGER.Info($"Loading scope from {uri}"); - Stream source = GetStreamOf(uri); + Stream source = await GetStreamOf(uri); StreamReader reader = new StreamReader(source); string text = reader.ReadToEnd(); @@ -110,17 +110,17 @@ public Scope LoadScope (Uri uri) return scope; } - private Task LoadScopeAsync (Uri uri) + private async Task> LoadScopeAsync (Uri uri) { // Check if already loading/loaded and reserve key if not if (Scopes.ContainsKey(uri)) return Scopes[uri]; Scopes[uri] = null!; // Generate task - Task task = Task.Factory.StartNew(() => + Task task = await Task.Factory.StartNew(async () => { Thread.CurrentThread.Name = $"{Thread.CurrentThread.Name}_{uri.ToString()}"; - return LoadScope(uri); + return await LoadScope(uri); }); // Assign correct non-null task to key @@ -163,7 +163,7 @@ private async void LoadScopeDependencies (Scope root) foreach (var i in root.Imports) { if (Scopes.ContainsKey(i.Value.URI)) continue; - Task scope = LoadScopeAsync(i.Value.URI); + Task scope = await LoadScopeAsync(i.Value.URI); Task dependencyTask = scope.ContinueWith(finishedTask => LoadScopeDependencies(finishedTask.Result)); ongoingLoadingTasks.Add(dependencyTask); @@ -225,11 +225,18 @@ private Scope ParseScopeText (Uri source, string textIn) } } - private Stream GetStreamOf (Uri uri) + private async Task GetStreamOf (Uri uri) { try { uri = SquashUri(uri); + + // New HTTP stuff + HttpClient client = new HttpClient(); + var httpResponse = await client.GetAsync(uri); + return httpResponse.Content.ReadAsStream(); + // + FileStream stream = new FileStream(uri.LocalPath, FileMode.Open); return stream; } @@ -264,8 +271,6 @@ private Uri SquashUri (Uri uri) builder.Path = localPath; } - - // file://C:/Crimson/Native%20Library/root.crimson/heap.crm or whatever return builder.Uri; } From 4110f939bfcbfda0d1864cbd1e8819a430637070 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 4 Apr 2023 09:52:43 +0100 Subject: [PATCH 057/122] LoadScope for Root now waits for others to finish + ParsingExceptions.UriSchemeException > GetStreamOf uses File.OpenRead for file scheme, HttpClient for http and errors on others --- Crimson/CSharp/Core/Crimson.cs | 1 + Crimson/CSharp/Core/CrimsonCompiler.cs | 1 - Crimson/CSharp/Core/Library.cs | 65 +++++++++++++++---- .../CSharp/Exceptions/ParsingExceptions.cs | 20 ++++++ 4 files changed, 74 insertions(+), 13 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 5fbcd70..599ee53 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -177,6 +177,7 @@ public enum PanicCode PARSE = -100, PARSE_STATEMENT = -110, PARSE_SCOPE = -120, + PARSE_URI = -130, LINK = -200, GENERALISE = -300, diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 951fe9b..370bb14 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -42,7 +42,6 @@ public async void FullyCompileFromOptions () LOGGER.Info("\n\n"); LOGGER.Info(" P A R S I N G "); Scope rootScope = await Library.LoadScope(Options.SourceUri); // Get the root unit (ie. main.crm) - Library.Root = rootScope; Compilation compilation = new Compilation(Library); // Generate dependency units (all resources are henceforth accessible) diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 0d6151c..4690cd0 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Concurrent; +using System.Net; using System.Threading.Tasks; using Antlr4.Runtime; using Crimson.AntlrBuild; @@ -64,6 +65,7 @@ public List GetScopes () { Task task = pair.Value; + // TODO Key non-null, task null here if (task.Status == TaskStatus.Created) task.Start(); @@ -102,9 +104,33 @@ public async Task LoadScope (Uri uri) LoadScopeDependencies(scope); + // Only runs once (for root) if (Root == null) { SetRootScope(scope); + + bool waiting; + do + { + List waitingList = new List(); + foreach (var pair in Scopes) + { + if (pair.Value == null) waitingList.Add(pair.Key.ToString()); + } + + waiting = waitingList.Count > 0; + + if (waiting) + { + LOGGER.Info($"Waiting for: {String.Join(',', waitingList)}"); + Thread.Sleep(1000); + } + else + { + LOGGER.Info($"Finished loading root scope!"); + } + + } while (waiting); } return scope; @@ -162,7 +188,13 @@ private async void LoadScopeDependencies (Scope root) // Queue loading of its dependencies (once it's loaded) foreach (var i in root.Imports) { - if (Scopes.ContainsKey(i.Value.URI)) continue; + if (Scopes.ContainsKey(i.Value.URI)) + { + LOGGER.Debug($"Skipping duplicate loading of {i.Value.URI}"); + continue; + } + LOGGER.Debug($"Trying to load {i.Value.URI}"); + Task scope = await LoadScopeAsync(i.Value.URI); Task dependencyTask = scope.ContinueWith(finishedTask => LoadScopeDependencies(finishedTask.Result)); @@ -179,7 +211,7 @@ private async void LoadScopeDependencies (Scope root) } // Wait for multithreading to finish before returning. - foreach (var task in ongoingLoadingTasks) + /*foreach (var task in ongoingLoadingTasks) { try { @@ -189,7 +221,8 @@ private async void LoadScopeDependencies (Scope root) { throw; } - } + }*/ + LOGGER.Error(" ! NOT WAITING FOR DEPENDENCY LOADING TO FINISH ! "); LOGGER.Debug($"Finished loading dependencies of {root}"); } @@ -229,20 +262,28 @@ private async Task GetStreamOf (Uri uri) { try { - uri = SquashUri(uri); + if (uri.Scheme == Uri.UriSchemeFile) + { + return File.OpenRead(uri.LocalPath); + } + + else if (uri.Scheme == Uri.UriSchemeHttp) + { - // New HTTP stuff - HttpClient client = new HttpClient(); - var httpResponse = await client.GetAsync(uri); - return httpResponse.Content.ReadAsStream(); - // + // New HTTP stuff + HttpClient client = new HttpClient(); + HttpResponseMessage httpResponse = await client.GetAsync(uri); + return httpResponse.Content.ReadAsStream(); + } - FileStream stream = new FileStream(uri.LocalPath, FileMode.Open); - return stream; + else + { + throw new UriSchemeException(uri); + } } catch (Exception e) { - Crimson.Panic($"An error occurred getting the stream of the resource at the uri {uri}", Crimson.PanicCode.PARSE, e); + Crimson.Panic($"An error occurred getting the stream of the resource at the URI {uri}", Crimson.PanicCode.PARSE, e); throw; } } diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs index 24ad0b4..8752500 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -35,6 +35,26 @@ public override IList GetDetailedMessage () } } + internal class UriSchemeException : CrimsonException + { + public Uri URI { get; private set; } + + public UriSchemeException (Uri uri) : base(Core.Crimson.PanicCode.PARSE_URI) + { + URI = uri; + } + + public override IList GetDetailedMessage () + { + List strings = new List + { + $"The URI '{URI}' has a disallowed scheme: '{URI.Scheme}'.", + $"Only '{Uri.UriSchemeFile}' and '{Uri.UriSchemeHttp}' are allowed." + }; + return strings; + } + } + internal class CrimsonParserException : CrimsonException { public CrimsonParserException (string message) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) From a2a98fcd06a47089c188e581a57632d1356820ea Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 4 Apr 2023 10:26:26 +0100 Subject: [PATCH 058/122] Panic remarks ;-) --- Crimson/CSharp/Core/Crimson.cs | 58 ++++++++++++++++++++++---- Crimson/CSharp/Core/Library.cs | 3 +- Crimson/CSharp/Parsing/ScopeVisitor.cs | 14 ++++++- 3 files changed, 66 insertions(+), 9 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 599ee53..6b32cf2 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -156,20 +156,64 @@ public static void Panic (CrimsonException reason) public static void Panic (string message, PanicCode code, Exception e) { - if (e is CrimsonException ce) - { - Panic(ce); - } - else + lock (panicLock) { - ExceptionCrimsonException reason = new ExceptionCrimsonException(message, code, e); - Panic(reason); + CrimsonException? ce = e as CrimsonException; + + List lines = new List + { + $"", + $"", + $" >> COMPILER PANIC!!", + $" >> {GetPanicRemark()}", + $"", + $" >> {message}", + $"", + }; + lines.AddRange(ce.GetDetailedMessage()); + lines.Add($"Inner panic code: {(int) ce.Code}"); + lines.Add($"Outer panic code: {(int) code}"); + + lines.ForEach(line => LOGGER!.Error($" ### {line}")); + lines.ForEach(line => Console.Error.WriteLine($" ### {line}")); + Environment.Exit((int) ce.Code); } // Exits before here Environment.Exit((int) code); } + public static List PanicRemarks { get; set; } = new List + { + "Was that intentional?", + "I think you're enjoying this...", + "AAAAHHHAHHAHAHHGHG PANNNIIICCCC!!!", + "Everybody stay calm!", + "Is anyone here a doctor?", + "Nice one...", + "I need more coffee.", + "We're gonna need a bigger boat...", + "Don't worry, I'm a doctor!", + "You've got to be kidding me...", + "Again?", + "I thought you said we'd fixed this!", + "It's meant to do that, right?", + "Nerd.", + "Well this is awkward...", + "Hey, I'm compiler! What's your name?", + "Bonjour, mon ami!", + "Beep boop beep boop", + "*your computer catches fire*", + "It wasn't me, I swear!" + }; + + private static string GetPanicRemark () + { + Random random = new Random(); + int index = random.Next(PanicRemarks.Count); + return PanicRemarks[index]; + } + public enum PanicCode { OK = 0, diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 4690cd0..c8b6927 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -264,7 +264,8 @@ private async Task GetStreamOf (Uri uri) { if (uri.Scheme == Uri.UriSchemeFile) { - return File.OpenRead(uri.LocalPath); + uri = SquashUri(uri); + return File.OpenRead(uri.LocalPath); // TODO IO error here (path not found ) } else if (uri.Scheme == Uri.UriSchemeHttp) diff --git a/Crimson/CSharp/Parsing/ScopeVisitor.cs b/Crimson/CSharp/Parsing/ScopeVisitor.cs index 05545c8..6a3a42d 100644 --- a/Crimson/CSharp/Parsing/ScopeVisitor.cs +++ b/Crimson/CSharp/Parsing/ScopeVisitor.cs @@ -5,6 +5,7 @@ using Crimson.CSharp.Parsing.Tokens; using Crimson.CSharp.Parsing.Tokens.Values; using NLog; +using System.Text.RegularExpressions; using static Crimson.CSharp.Parsing.Tokens.Comparator; namespace Crimson.CSharp.Parsing @@ -17,6 +18,8 @@ internal class ScopeVisitor : CrimsonBaseVisitor public static readonly Stack scopeStack = new Stack(); + private static readonly Regex URI_SCHEME_FIXER = new Regex(@""); + public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) { try @@ -31,10 +34,18 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) string originalUriText = importCtx.uri.Text; string trimmedUriText = originalUriText.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); if (!originalUriText.Equals(trimmedUriText, StringComparison.OrdinalIgnoreCase)) + { LOGGER.Debug($"Trimmed URI {originalUriText} to {trimmedUriText}"); + } Uri? uri; if (!Uri.TryCreate(trimmedUriText, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out uri)) + { throw new StatementParseException($"Unable to parse illegal URI '{importCtx.uri.Text}'"); + } + if (String.IsNullOrWhiteSpace(uri.Host)) + { + throw new UriSchemeException(uri); + } FullNameCToken id = VisitFullName(importCtx.fullName()); ImportCStatement import = new ImportCStatement(uri, id); @@ -63,7 +74,8 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) } catch (Exception ex) { - throw new StatementParseException($"{GetType()} was unable to parse the given {(context == null ? "NULL" : context.GetType())}", ex); + Core.Crimson.Panic($"{GetType()} was unable to parse the given {(context == null ? "NULL" : context.GetType())}", Core.Crimson.PanicCode.PARSE_SCOPE, ex); + throw; } } From 7982a870afde8d0c49ec5b478ae71b85f623731c Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 4 Apr 2023 10:31:18 +0100 Subject: [PATCH 059/122] Panic now shows name of PanicCode --- Crimson/CSharp/Core/Crimson.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 6b32cf2..f619919 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -170,13 +170,16 @@ public static void Panic (string message, PanicCode code, Exception e) $" >> {message}", $"", }; - lines.AddRange(ce.GetDetailedMessage()); - lines.Add($"Inner panic code: {(int) ce.Code}"); - lines.Add($"Outer panic code: {(int) code}"); + if (ce != null) + { + lines.AddRange(ce.GetDetailedMessage()); + lines.Add($"Inner panic code: {(int) ce.Code} ({Enum.GetName(ce.Code)})"); + } + lines.Add($"Outer panic code: {(int) code} ({Enum.GetName(code)})"); lines.ForEach(line => LOGGER!.Error($" ### {line}")); lines.ForEach(line => Console.Error.WriteLine($" ### {line}")); - Environment.Exit((int) ce.Code); + Environment.Exit((int) code); } // Exits before here @@ -204,7 +207,9 @@ public static void Panic (string message, PanicCode code, Exception e) "Bonjour, mon ami!", "Beep boop beep boop", "*your computer catches fire*", - "It wasn't me, I swear!" + "It wasn't me, I swear!", + "Hello there!", + "Ah General Kenobi, the Negotiator!" }; private static string GetPanicRemark () @@ -216,7 +221,7 @@ private static string GetPanicRemark () public enum PanicCode { - OK = 0, + OK_OR_NONE = 0, PARSE = -100, PARSE_STATEMENT = -110, From a4dcddddb717953554f284a796a6bfe0eb714fed Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Thu, 6 Apr 2023 22:12:34 +0100 Subject: [PATCH 060/122] URI error handling --- Crimson/CSharp/Core/Crimson.cs | 11 +++++--- Crimson/CSharp/Core/Library.cs | 1 + .../CSharp/Exceptions/ParsingExceptions.cs | 25 +++++++++++++++++-- Crimson/CSharp/Parsing/ScopeVisitor.cs | 13 ++-------- .../Parsing/Statements/ImportCStatement.cs | 13 ++++++++++ 5 files changed, 46 insertions(+), 17 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index f619919..0e3e13a 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -158,8 +158,6 @@ public static void Panic (string message, PanicCode code, Exception e) { lock (panicLock) { - CrimsonException? ce = e as CrimsonException; - List lines = new List { $"", @@ -170,11 +168,15 @@ public static void Panic (string message, PanicCode code, Exception e) $" >> {message}", $"", }; - if (ce != null) + if (e is CrimsonException ce) { lines.AddRange(ce.GetDetailedMessage()); lines.Add($"Inner panic code: {(int) ce.Code} ({Enum.GetName(ce.Code)})"); } + else + { + lines.AddRange(e.ToString().Split(Environment.NewLine)); + } lines.Add($"Outer panic code: {(int) code} ({Enum.GetName(code)})"); lines.ForEach(line => LOGGER!.Error($" ### {line}")); @@ -226,7 +228,8 @@ public enum PanicCode PARSE = -100, PARSE_STATEMENT = -110, PARSE_SCOPE = -120, - PARSE_URI = -130, + PARSE_URI_SCHEME = -130, + PARSE_URI_HOST = -131, LINK = -200, GENERALISE = -300, diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index c8b6927..dc0e663 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -20,6 +20,7 @@ public class Library public static readonly string NATIVE_HOST = "native.crimson"; public static readonly string ROOT_HOST = "root.crimson"; + public static readonly string ABSOLUTE_HOST = "abs.crimson"; /// /// The "master" list of units. Stored so that each unique unit is only created once. diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs index 8752500..bcaec40 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -1,4 +1,5 @@ -using Crimson.CSharp.Parsing.Statements; +using Crimson.CSharp.Core; +using Crimson.CSharp.Parsing.Statements; using System; using System.Collections.Generic; using System.Linq; @@ -39,7 +40,7 @@ internal class UriSchemeException : CrimsonException { public Uri URI { get; private set; } - public UriSchemeException (Uri uri) : base(Core.Crimson.PanicCode.PARSE_URI) + public UriSchemeException (Uri uri) : base(Core.Crimson.PanicCode.PARSE_URI_SCHEME) { URI = uri; } @@ -55,6 +56,26 @@ public override IList GetDetailedMessage () } } + internal class UriHostException : CrimsonException + { + public Uri URI { get; private set; } + + public UriHostException (Uri uri) : base(Core.Crimson.PanicCode.PARSE_URI_HOST) + { + URI = uri; + } + + public override IList GetDetailedMessage () + { + List strings = new List + { + $"The URI '{URI}' has an illegal host: '{URI.Host}'.", + $"Only '{Library.ROOT_HOST}', '{Library.ABSOLUTE_HOST}' and '{Library.NATIVE_HOST}' are allowed." + }; + return strings; + } + } + internal class CrimsonParserException : CrimsonException { public CrimsonParserException (string message) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) diff --git a/Crimson/CSharp/Parsing/ScopeVisitor.cs b/Crimson/CSharp/Parsing/ScopeVisitor.cs index 6a3a42d..be16199 100644 --- a/Crimson/CSharp/Parsing/ScopeVisitor.cs +++ b/Crimson/CSharp/Parsing/ScopeVisitor.cs @@ -31,21 +31,12 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) IList importCtxs = context._imports; foreach (CrimsonParser.ImportUnitContext importCtx in importCtxs) { - string originalUriText = importCtx.uri.Text; - string trimmedUriText = originalUriText.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); - if (!originalUriText.Equals(trimmedUriText, StringComparison.OrdinalIgnoreCase)) - { - LOGGER.Debug($"Trimmed URI {originalUriText} to {trimmedUriText}"); - } + //TODO Uri? uri; - if (!Uri.TryCreate(trimmedUriText, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out uri)) + if (!Uri.TryCreate(importCtx.uri.Text, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out uri)) { throw new StatementParseException($"Unable to parse illegal URI '{importCtx.uri.Text}'"); } - if (String.IsNullOrWhiteSpace(uri.Host)) - { - throw new UriSchemeException(uri); - } FullNameCToken id = VisitFullName(importCtx.fullName()); ImportCStatement import = new ImportCStatement(uri, id); diff --git a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs index 757c449..e1e2a3a 100644 --- a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs @@ -1,5 +1,6 @@ using Crimson.CSharp.Exceptions; using Crimson.CSharp.Parsing.Tokens; +using NLog; namespace Crimson.CSharp.Parsing.Statements { @@ -13,6 +14,18 @@ public ImportCStatement (Uri uri, FullNameCToken alias) if (alias.HasLibrary()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{uri}' because it must only contain a member name."); if (!alias.HasMember()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{uri}' because it does not contain a member name."); + // TODO Import must vet own URIs + string originalUriText = importCtx.uri.Text; + string trimmedUriText = originalUriText.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); + if (!originalUriText.Equals(trimmedUriText, StringComparison.OrdinalIgnoreCase)) + { + LOGGER.Debug($"Trimmed URI {originalUriText} to {trimmedUriText}"); + } + if (String.IsNullOrWhiteSpace(uri.Host)) + { + throw new NullReferenceException($"The URI {uri} has no host!"); + } + URI = uri; Alias = alias; } From 266be81aac6910166f897ce7d3b71b7841f313a5 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Thu, 6 Apr 2023 23:42:51 +0100 Subject: [PATCH 061/122] Panic fixes + Panic does not die with null exception + Panic and CrimsonException give more information by default (overridable) --- Crimson/CSharp/Core/Crimson.cs | 35 ++++++--------- Crimson/CSharp/Exceptions/CrimsonException.cs | 2 +- .../CSharp/Exceptions/ParsingExceptions.cs | 26 +++++------ Crimson/CSharp/Parsing/Scope.cs | 2 +- Crimson/CSharp/Parsing/ScopeVisitor.cs | 15 ++----- .../Parsing/Statements/ImportCStatement.cs | 45 +++++++++++++++---- 6 files changed, 67 insertions(+), 58 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 0e3e13a..c7df9ec 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -135,24 +135,6 @@ private static void ConfigureNLog () } private static readonly object panicLock = new object(); - public static void Panic (CrimsonException reason) - { - // Prevent multi access (keep logs clean) - lock (panicLock) - { - List lines = new List - { - "", - " ### COMPILER PANIC!! ###" - }; - lines.AddRange(reason.GetDetailedMessage()); - lines.Add($"Panic code: {(int) reason.Code}"); - - lines.ForEach(line => LOGGER!.Error(line)); - lines.ForEach(line => Console.Error.WriteLine(line)); - Environment.Exit((int) reason.Code); - } - } public static void Panic (string message, PanicCode code, Exception e) { @@ -167,15 +149,24 @@ public static void Panic (string message, PanicCode code, Exception e) $"", $" >> {message}", $"", + $"{(e != null ? e.GetType().Name : "")}", }; - if (e is CrimsonException ce) + if (e != null) { - lines.AddRange(ce.GetDetailedMessage()); - lines.Add($"Inner panic code: {(int) ce.Code} ({Enum.GetName(ce.Code)})"); + if (e is CrimsonException ce) + { + lines.Add($"({typeof(CrimsonException).Name})"); + lines.AddRange(ce.GetDetailedMessage()); + lines.Add($"Inner panic code: {(int) ce.Code} ({Enum.GetName(ce.Code)})"); + } + else + { + lines.AddRange(e.ToString().Split(Environment.NewLine)); + } } else { - lines.AddRange(e.ToString().Split(Environment.NewLine)); + lines.Add("Causing exception is null. No further exception information available."); } lines.Add($"Outer panic code: {(int) code} ({Enum.GetName(code)})"); diff --git a/Crimson/CSharp/Exceptions/CrimsonException.cs b/Crimson/CSharp/Exceptions/CrimsonException.cs index c0367cd..02578c6 100644 --- a/Crimson/CSharp/Exceptions/CrimsonException.cs +++ b/Crimson/CSharp/Exceptions/CrimsonException.cs @@ -20,7 +20,7 @@ public virtual IList GetDetailedMessage () return new List() { "No additional message detail provided." }; } - public virtual IList? FormatException (Exception e) + public virtual IList? FormatException (Exception? e) { return e?.ToString()?.Split(Environment.NewLine); } diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs index bcaec40..f2cc7d1 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -10,28 +10,26 @@ namespace Crimson.CSharp.Exceptions { internal class StatementParseException : CrimsonException { - public AbstractCrimsonStatement Statement { get; private set; } - public Exception Cause { get; private set; } + public string Message { get; private set; } + public AbstractCrimsonStatement? Statement { get; private set; } + public Exception? Cause { get; private set; } - public StatementParseException (object message, object other) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) - { - } - - public StatementParseException (object message) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) - { - } - - public StatementParseException (AbstractCrimsonStatement statement, Exception cause) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) + public StatementParseException (string message, AbstractCrimsonStatement? statement, Exception? cause) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) { + Message = message; Statement = statement; Cause = cause; } public override IList GetDetailedMessage () { - List strings = new List(); - strings.Add($"An error occurred while parsing the statement {(Statement != null ? Statement : "NULL")}"); - strings.AddRange(FormatException(Cause) ?? Enumerable.Empty()); + List strings = new List() + { + $"An error occurred while parsing the statement {(Statement != null ? Statement : "NULL")}", + Message + }; + IEnumerable? formatted = FormatException(Cause); + strings.AddRange(formatted ?? Enumerable.Empty()); return strings; } } diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs index 19c1d02..e31a28f 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -124,7 +124,7 @@ void AddNamedIfNotDuplicate (Dictionary dict, AbsC if (acs == null) throw new ArgumentNullException($"Cannot pass null {typeof(AbsCrimSt)} for statement adding."); if (string.IsNullOrWhiteSpace(typeNameForError)) throw new ArgumentNullException("Cannot pass null or whitespace type name for statement adding."); - if (dict.ContainsKey(acs.GetName().ToString())) throw new StatementParseException($"Duplicate {typeNameForError} '{acs.GetName()}' in statement '{statement}' in scope: {this}"); + if (dict.ContainsKey(acs.GetName().ToString())) throw new StatementParseException($"Duplicate {typeNameForError} '{acs.GetName()}' in scope: {this}", statement, null); string name = acs.GetName().ToString(); dict.Add(name, acs); Delegates.Add(() => dict[name]); diff --git a/Crimson/CSharp/Parsing/ScopeVisitor.cs b/Crimson/CSharp/Parsing/ScopeVisitor.cs index be16199..431433f 100644 --- a/Crimson/CSharp/Parsing/ScopeVisitor.cs +++ b/Crimson/CSharp/Parsing/ScopeVisitor.cs @@ -31,15 +31,8 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) IList importCtxs = context._imports; foreach (CrimsonParser.ImportUnitContext importCtx in importCtxs) { - //TODO - Uri? uri; - if (!Uri.TryCreate(importCtx.uri.Text, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out uri)) - { - throw new StatementParseException($"Unable to parse illegal URI '{importCtx.uri.Text}'"); - } - FullNameCToken id = VisitFullName(importCtx.fullName()); - ImportCStatement import = new ImportCStatement(uri, id); + ImportCStatement import = new ImportCStatement(importCtx.uri.Text, id); scope.Imports.Add(id.ToString(), import); } @@ -130,7 +123,7 @@ private AbstractCrimsonStatement ParseStatement (CrimsonParser.StatementContext } else { - throw new StatementParseException("The given CrimsonParser.FunctionStatementContext " + stCtx + " is not of a permissable type"); + throw new StatementParseException("The given CrimsonParser.FunctionStatementContext " + stCtx + " is not of a permissable type", null, null); } } @@ -218,7 +211,7 @@ public override SimpleValueCToken VisitDatasize ([NotNull] CrimsonParser.Datasiz public VariableAssignmentCStatement ParseAssignVariable ([NotNull] CrimsonParser.AssignVariableContext context) { - if (context == null) throw new StatementParseException("Illegal null CrimsonParser.AssignVariableContext"); + if (context == null) throw new StatementParseException("Illegal null CrimsonParser.AssignVariableContext", null, null); if (context is CrimsonParser.AssignVariableDirectContext avdc) { return VisitAssignVariableDirect(avdc); @@ -229,7 +222,7 @@ public VariableAssignmentCStatement ParseAssignVariable ([NotNull] CrimsonParser } else { - throw new StatementParseException("The given CrimsonParser.AssignVariableContext (" + context + ") is not of a permissable type"); + throw new StatementParseException("The given CrimsonParser.AssignVariableContext (" + context + ") is not of a permissable type", null, null); } } diff --git a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs index e1e2a3a..15babee 100644 --- a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs @@ -1,6 +1,8 @@ -using Crimson.CSharp.Exceptions; +using Crimson.CSharp.Core; +using Crimson.CSharp.Exceptions; using Crimson.CSharp.Parsing.Tokens; using NLog; +using static System.Formats.Asn1.AsnWriter; namespace Crimson.CSharp.Parsing.Statements { @@ -9,25 +11,50 @@ public class ImportCStatement public Uri URI { get; set; } public FullNameCToken Alias { get; set; } + public ImportCStatement (string uri, FullNameCToken alias) : this(CreateUri(uri), alias) + { + } + public ImportCStatement (Uri uri, FullNameCToken alias) { if (alias.HasLibrary()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{uri}' because it must only contain a member name."); if (!alias.HasMember()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{uri}' because it does not contain a member name."); - // TODO Import must vet own URIs - string originalUriText = importCtx.uri.Text; - string trimmedUriText = originalUriText.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); - if (!originalUriText.Equals(trimmedUriText, StringComparison.OrdinalIgnoreCase)) + URI = uri; + Alias = alias; + } + + public static Uri CreateUri (string uriText) + { + + //TODO + Uri? uri; + if (!Uri.TryCreate(uriText, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out uri)) { - LOGGER.Debug($"Trimmed URI {originalUriText} to {trimmedUriText}"); + throw new UriFormatException($"Unable to parse illegal URI '{uriText}'"); } + throw new UriFormatException($"Unable to parse illegal URI '{uriText}'"); + } + + public static void VerifyUri (Uri uri) + { + // Check host if (String.IsNullOrWhiteSpace(uri.Host)) { - throw new NullReferenceException($"The URI {uri} has no host!"); + throw new UriHostException(uri); + } + else if ( + !new string[] { Library.ABSOLUTE_HOST, Library.NATIVE_HOST, Library.ROOT_HOST }.Contains(uri.Host) + ) + { + throw new UriHostException(uri); } - URI = uri; - Alias = alias; + // Check path + if (String.IsNullOrWhiteSpace(uri.AbsolutePath)) + { + // throw new UriPathException(); + } } } } \ No newline at end of file From 1c62f2b2dbd904a585a991b1d559fb1402a40be3 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Fri, 7 Apr 2023 18:12:31 +0100 Subject: [PATCH 062/122] Streams and remarks + Several new remarks + Created URIs utility class + Library.StreamFile and Library.StreamHttp --- Crimson/CSharp/Core/Crimson.cs | 15 +++- Crimson/CSharp/Core/Library.cs | 67 ++++------------- Crimson/CSharp/Core/URIs.cs | 71 +++++++++++++++++++ .../CSharp/Exceptions/ParsingExceptions.cs | 5 +- .../Parsing/Statements/ImportCStatement.cs | 18 +---- 5 files changed, 103 insertions(+), 73 deletions(-) create mode 100644 Crimson/CSharp/Core/URIs.cs diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index c7df9ec..305c4c8 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -4,6 +4,7 @@ using Crimson.CSharp.Specialising.RFASM; using Crimson.CSharp.Generalising; using Crimson.CSharp.Exceptions; +using System.Globalization; namespace Crimson.CSharp.Core { @@ -199,10 +200,20 @@ public static void Panic (string message, PanicCode code, Exception e) "Hey, I'm compiler! What's your name?", "Bonjour, mon ami!", "Beep boop beep boop", - "*your computer catches fire*", + "Houston, we have a problem...", "It wasn't me, I swear!", "Hello there!", - "Ah General Kenobi, the Negotiator!" + "Well look what the CPU dragged in...", + "Fight fire with fire!", + "There's no need to make a fuss...", + "Disco inferno!", + "You new round here?", + "Why did we hire this guy again?", + "What am I paying you for!?", + $"{(DateTime.UtcNow - new DateTime(1970, 1, 1)).Days}th time's the charm!", + "Why is it always raining in Denley Moor?", + "Hop to it!", + "You'll get it next time!" }; private static string GetPanicRemark () diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index dc0e663..ff4d823 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -18,10 +18,6 @@ public class Library { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - public static readonly string NATIVE_HOST = "native.crimson"; - public static readonly string ROOT_HOST = "root.crimson"; - public static readonly string ABSOLUTE_HOST = "abs.crimson"; - /// /// The "master" list of units. Stored so that each unique unit is only created once. /// @@ -49,7 +45,7 @@ public Library () } else { - Uri nativePath = SquashUri(uri); + Uri nativePath = URIs.StandardiseUri(uri); if (Scopes.ContainsKey(nativePath)) { return GetScopeUnsafe(nativePath); @@ -182,7 +178,6 @@ private Scope GetScopeUnsafe (Uri uri) /// private async void LoadScopeDependencies (Scope root) { - LOGGER.Info($"Loading dependencies of {root}"); List ongoingLoadingTasks = new List(); // Load each imported scope @@ -210,21 +205,6 @@ private async void LoadScopeDependencies (Scope root) LoadScopeDependencies(hasScope.GetScope()); } } - - // Wait for multithreading to finish before returning. - /*foreach (var task in ongoingLoadingTasks) - { - try - { - task.Wait(); - } - catch (Exception) - { - throw; - } - }*/ - LOGGER.Error(" ! NOT WAITING FOR DEPENDENCY LOADING TO FINISH ! "); - LOGGER.Debug($"Finished loading dependencies of {root}"); } private Scope ParseScopeText (Uri source, string textIn) @@ -265,17 +245,12 @@ private async Task GetStreamOf (Uri uri) { if (uri.Scheme == Uri.UriSchemeFile) { - uri = SquashUri(uri); - return File.OpenRead(uri.LocalPath); // TODO IO error here (path not found ) + return StreamFile(uri); } else if (uri.Scheme == Uri.UriSchemeHttp) { - - // New HTTP stuff - HttpClient client = new HttpClient(); - HttpResponseMessage httpResponse = await client.GetAsync(uri); - return httpResponse.Content.ReadAsStream(); + return await StreamHttp(uri); } else @@ -285,37 +260,23 @@ private async Task GetStreamOf (Uri uri) } catch (Exception e) { - Crimson.Panic($"An error occurred getting the stream of the resource at the URI {uri}", Crimson.PanicCode.PARSE, e); + Crimson.Panic($"An error occurred obtaining a stream of the resource at the URI {uri}", Crimson.PanicCode.PARSE, e); throw; } } - private Uri SquashUri (Uri uri) + private Stream StreamFile (Uri uri) { - UriBuilder builder = new UriBuilder(uri); - - if (uri.Scheme != Uri.UriSchemeFile) - throw new UriFormatException($"Crimson only accepts URIs of the file:/// scheme at this time. Found: {uri.Scheme}"); - - // file:///native.crimson/heap.crm - if (uri.Host.Equals(NATIVE_HOST)) - { - string localPath = $"{Crimson.Options.NativeUri.AbsolutePath}/{uri.AbsolutePath}"; - builder.Host = ""; - builder.Path = localPath; - } - - // file://root.crimson/heap.crm - if (uri.Host.Equals(ROOT_HOST)) - { - string? parentDirectory = Path.GetDirectoryName(Crimson.Options.SourceUri.AbsolutePath); - string localPath = $"{parentDirectory}/{uri.AbsolutePath}"; - builder.Host = ""; - builder.Path = localPath; - } + Uri standard = URIs.StandardiseUri(uri); + return File.OpenRead(standard.LocalPath); // TODO IO error here (path not found ) + } - // file://C:/Crimson/Native%20Library/root.crimson/heap.crm or whatever - return builder.Uri; + private async Task StreamHttp (Uri uri) + { + // New HTTP stuff + HttpClient client = new HttpClient(); + HttpResponseMessage httpResponse = await client.GetAsync(uri); + return httpResponse.Content.ReadAsStream(); } } } diff --git a/Crimson/CSharp/Core/URIs.cs b/Crimson/CSharp/Core/URIs.cs new file mode 100644 index 0000000..8535888 --- /dev/null +++ b/Crimson/CSharp/Core/URIs.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Core +{ + internal class URIs + { + + public static string[] CustomHosts { get => new string[] { NATIVE_HOST, ROOT_HOST, ABSOLUTE_HOST }; } + public static readonly string NATIVE_HOST = "native.crimson"; + public static readonly string ROOT_HOST = "root.crimson"; + public static readonly string ABSOLUTE_HOST = "abs.crimson"; + + + public static Uri CreateUri (string uriText) + { + string trimmedText = uriText.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); + + Uri? uri; + if (!Uri.TryCreate(trimmedText, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out uri)) + { + throw new UriFormatException($"Unable to parse illegal URI '{trimmedText}' ({uriText})"); + } + return uri; + } + + /// + /// Takes a URI such as file://native.crimson/memory/heap.crm, takes the path and + /// + /// + /// + /// + public static Uri StandardiseUri (Uri uri) + { + if (uri.Scheme == Uri.UriSchemeFile) + return StandardiseFileUri(uri); + else if (uri.Scheme == Uri.UriSchemeHttp) + return StandardiseHttpUri(uri); + + throw new UriFormatException($"Crimson only accepts URIs of the file:/// scheme at this time. Found: {uri.Scheme}"); + } + + public static Uri StandardiseFileUri (Uri uri) + { + UriBuilder builder = new UriBuilder(uri); + + // file:///native.crimson/heap.crm + if (uri.Host.Equals(NATIVE_HOST)) + { + builder.Path = $"{Crimson.Options.NativeUri.AbsolutePath}/{uri.AbsolutePath}"; + } + + // file://root.crimson/heap.crm + if (uri.Host.Equals(ROOT_HOST)) + { + string? parentDirectory = Path.GetDirectoryName(Crimson.Options.SourceUri.AbsolutePath); + builder.Path = $"{parentDirectory}/{uri.AbsolutePath}"; + } + + return builder.Uri; + } + public static Uri StandardiseHttpUri (Uri uri) + { + return uri; + } + } +} diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs index f2cc7d1..e6f735d 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -67,8 +67,9 @@ public override IList GetDetailedMessage () { List strings = new List { - $"The URI '{URI}' has an illegal host: '{URI.Host}'.", - $"Only '{Library.ROOT_HOST}', '{Library.ABSOLUTE_HOST}' and '{Library.NATIVE_HOST}' are allowed." + $"The URI '{URI}' host '{URI.Host}' could not be resolved.", + $"Please check that the given host is permitted in the current context.", + $"Crimson's custom hosts are: {String.Join(',', URIs.CustomHosts)}" }; return strings; } diff --git a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs index 15babee..e663f23 100644 --- a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs @@ -11,7 +11,7 @@ public class ImportCStatement public Uri URI { get; set; } public FullNameCToken Alias { get; set; } - public ImportCStatement (string uri, FullNameCToken alias) : this(CreateUri(uri), alias) + public ImportCStatement (string uri, FullNameCToken alias) : this(URIs.CreateUri(uri), alias) { } @@ -24,18 +24,6 @@ public ImportCStatement (Uri uri, FullNameCToken alias) Alias = alias; } - public static Uri CreateUri (string uriText) - { - - //TODO - Uri? uri; - if (!Uri.TryCreate(uriText, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out uri)) - { - throw new UriFormatException($"Unable to parse illegal URI '{uriText}'"); - } - throw new UriFormatException($"Unable to parse illegal URI '{uriText}'"); - } - public static void VerifyUri (Uri uri) { // Check host @@ -43,9 +31,7 @@ public static void VerifyUri (Uri uri) { throw new UriHostException(uri); } - else if ( - !new string[] { Library.ABSOLUTE_HOST, Library.NATIVE_HOST, Library.ROOT_HOST }.Contains(uri.Host) - ) + else if (!URIs.CustomHosts.Contains(uri.Host)) { throw new UriHostException(uri); } From 36cee9e7d732e02c1bbc13f3ab0ef1da70f1f747 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Fri, 7 Apr 2023 21:14:39 +0100 Subject: [PATCH 063/122] Loads of remarks! 18 to be precise! --- Crimson/CSharp/Core/Crimson.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 305c4c8..25455b8 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -213,7 +213,25 @@ public static void Panic (string message, PanicCode code, Exception e) $"{(DateTime.UtcNow - new DateTime(1970, 1, 1)).Days}th time's the charm!", "Why is it always raining in Denley Moor?", "Hop to it!", - "You'll get it next time!" + "You'll get it next time!", + "Oh no! I've thingemmyjigged my whatchamecallit!", + "Just blame it on a solar flare...", + "Congrats! You've found a new feature!", + "This is what we call an unscheduled rapid disassembly.", + "They'll be telling the stories for years...", + "You took me right into the danger zone!", + "Is it CO2 or foam for electrical fires?", + "Still a better error message than C.", + "I wonder if Python does this...", + "You ever heard the joke about the compiler which kept breaking?", + "Please star our GitHub repo :)", + "It all builds character...", + "*whistles nonchalantly*", + "I wouldn't worry about it.", + "It'll probably fix itself...", + "I gotta feeling that tonight's gonna be a good night...", + "Hello humans!", + "Please come back! The transistors miss you!" }; private static string GetPanicRemark () From ef534ca3ec26003cdf5d8af1ca6720e9a6abe0f6 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Fri, 7 Apr 2023 21:52:41 +0100 Subject: [PATCH 064/122] URIs and things --- Crimson/CSharp/Core/Crimson.cs | 1 + Crimson/CSharp/Core/CrimsonOptions.cs | 6 ++--- Crimson/CSharp/Core/Library.cs | 13 +++------ Crimson/CSharp/Core/URIs.cs | 27 +++++++++++++++---- .../CSharp/Exceptions/ParsingExceptions.cs | 2 +- .../Parsing/Statements/ImportCStatement.cs | 2 +- 6 files changed, 31 insertions(+), 20 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 25455b8..248bfe6 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -250,6 +250,7 @@ public enum PanicCode PARSE_SCOPE = -120, PARSE_URI_SCHEME = -130, PARSE_URI_HOST = -131, + PARSE_URI_STREAM = -131, LINK = -200, GENERALISE = -300, diff --git a/Crimson/CSharp/Core/CrimsonOptions.cs b/Crimson/CSharp/Core/CrimsonOptions.cs index 25bb60a..a663bfd 100644 --- a/Crimson/CSharp/Core/CrimsonOptions.cs +++ b/Crimson/CSharp/Core/CrimsonOptions.cs @@ -14,7 +14,7 @@ public class CrimsonOptions [Option(longName: "source", shortName: 's', Required = true, HelpText = "Path to the root source file to translate. " + "If no file extension given, .crm will be assumed.")] public Uri SourceUri { get; private set; } - public void SetSourcePath (string path) => SourceUri = new Uri(path); + public void SetSourcePath (string path) => SourceUri = URIs.CreateUri(path); public void SetSourcePath (Uri uri) => SourceUri = uri; @@ -22,7 +22,7 @@ public class CrimsonOptions [Option(longName: "target", shortName: 't', Required = false, HelpText = "Path to the desired target location or output file. " + "If no file extension provided, will assume .crm.")] public Uri TargetUri { get; private set; } - public void SetTargetPath (string path) => TargetUri = new Uri(path); + public void SetTargetPath (string path) => TargetUri = URIs.CreateUri(path); public void SetTargetPath (Uri uri) => TargetUri = uri; @@ -31,7 +31,7 @@ public class CrimsonOptions "If not provided, will use a packaged version. " + "If provided, but a required file is not found, the file will be created from the packaged library.")] public Uri NativeUri { get; private set; } - public void SetNativePath (string path) => NativeUri = new Uri(path); + public void SetNativePath (string path) => NativeUri = URIs.CreateUri(path); public void SetNativePath (Uri uri) => NativeUri = uri; diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index ff4d823..bdadd1f 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -244,19 +244,11 @@ private async Task GetStreamOf (Uri uri) try { if (uri.Scheme == Uri.UriSchemeFile) - { return StreamFile(uri); - } - else if (uri.Scheme == Uri.UriSchemeHttp) - { return await StreamHttp(uri); - } - else - { - throw new UriSchemeException(uri); - } + throw new UriSchemeException(uri); } catch (Exception e) { @@ -268,7 +260,8 @@ private async Task GetStreamOf (Uri uri) private Stream StreamFile (Uri uri) { Uri standard = URIs.StandardiseUri(uri); - return File.OpenRead(standard.LocalPath); // TODO IO error here (path not found ) + LOGGER.Info($"Standardised URI to {standard}"); + return File.OpenRead(standard.LocalPath); // TODO IO error here (path not found)# } private async Task StreamHttp (Uri uri) diff --git a/Crimson/CSharp/Core/URIs.cs b/Crimson/CSharp/Core/URIs.cs index 8535888..329d728 100644 --- a/Crimson/CSharp/Core/URIs.cs +++ b/Crimson/CSharp/Core/URIs.cs @@ -25,7 +25,8 @@ public static Uri CreateUri (string uriText) { throw new UriFormatException($"Unable to parse illegal URI '{trimmedText}' ({uriText})"); } - return uri; + + return StandardiseUri(uri); } /// @@ -44,25 +45,41 @@ public static Uri StandardiseUri (Uri uri) throw new UriFormatException($"Crimson only accepts URIs of the file:/// scheme at this time. Found: {uri.Scheme}"); } + /// + /// file://root.crimson/memory/heap.crm + /// + /// + /// public static Uri StandardiseFileUri (Uri uri) { UriBuilder builder = new UriBuilder(uri); + if (String.IsNullOrWhiteSpace(builder.Host)) + { + builder.Host = ABSOLUTE_HOST; + } + // file:///native.crimson/heap.crm - if (uri.Host.Equals(NATIVE_HOST)) + if (builder.Host.Equals(NATIVE_HOST)) { - builder.Path = $"{Crimson.Options.NativeUri.AbsolutePath}/{uri.AbsolutePath}"; + builder.Path = $"{Crimson.Options.NativeUri.AbsolutePath}/{builder.Path}"; } // file://root.crimson/heap.crm - if (uri.Host.Equals(ROOT_HOST)) + if (builder.Host.Equals(ROOT_HOST)) { string? parentDirectory = Path.GetDirectoryName(Crimson.Options.SourceUri.AbsolutePath); - builder.Path = $"{parentDirectory}/{uri.AbsolutePath}"; + builder.Path = $"{parentDirectory}/{builder.Path}"; } return builder.Uri; } + + /// + /// http://example.com/path/to/thing.crm + /// + /// + /// public static Uri StandardiseHttpUri (Uri uri) { return uri; diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs index e6f735d..22531fe 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -69,7 +69,7 @@ public override IList GetDetailedMessage () { $"The URI '{URI}' host '{URI.Host}' could not be resolved.", $"Please check that the given host is permitted in the current context.", - $"Crimson's custom hosts are: {String.Join(',', URIs.CustomHosts)}" + $"Crimson's custom hosts are: {string.Join(',', URIs.CustomHosts)}" }; return strings; } diff --git a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs index e663f23..0cc24ff 100644 --- a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs @@ -20,7 +20,7 @@ public ImportCStatement (Uri uri, FullNameCToken alias) if (alias.HasLibrary()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{uri}' because it must only contain a member name."); if (!alias.HasMember()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{uri}' because it does not contain a member name."); - URI = uri; + URI = URIs.StandardiseUri(uri); Alias = alias; } From 36254dbda08c2b674ed55e7cb93db5031ee2af44 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sat, 8 Apr 2023 14:30:46 +0100 Subject: [PATCH 065/122] Non-compiling Uri/URI weirdness --- Crimson/CSharp/Core/CrimsonOptions.cs | 18 +-- Crimson/CSharp/Core/Library.cs | 7 +- Crimson/CSharp/Core/URI.cs | 149 ++++++++++++++++++ Crimson/CSharp/Core/URIs.cs | 88 ----------- .../CSharp/Exceptions/ParsingExceptions.cs | 2 +- 5 files changed, 164 insertions(+), 100 deletions(-) create mode 100644 Crimson/CSharp/Core/URI.cs delete mode 100644 Crimson/CSharp/Core/URIs.cs diff --git a/Crimson/CSharp/Core/CrimsonOptions.cs b/Crimson/CSharp/Core/CrimsonOptions.cs index a663bfd..22871d2 100644 --- a/Crimson/CSharp/Core/CrimsonOptions.cs +++ b/Crimson/CSharp/Core/CrimsonOptions.cs @@ -13,26 +13,26 @@ public class CrimsonOptions // Source [Option(longName: "source", shortName: 's', Required = true, HelpText = "Path to the root source file to translate. " + "If no file extension given, .crm will be assumed.")] - public Uri SourceUri { get; private set; } - public void SetSourcePath (string path) => SourceUri = URIs.CreateUri(path); - public void SetSourcePath (Uri uri) => SourceUri = uri; + public URI SourceUri { get; private set; } + public void SetSourcePath (string path) => SourceUri = new URI(path); + public void SetSourcePath (URI uri) => SourceUri = uri; // Target [Option(longName: "target", shortName: 't', Required = false, HelpText = "Path to the desired target location or output file. " + "If no file extension provided, will assume .crm.")] - public Uri TargetUri { get; private set; } - public void SetTargetPath (string path) => TargetUri = URIs.CreateUri(path); - public void SetTargetPath (Uri uri) => TargetUri = uri; + public URI TargetUri { get; private set; } + public void SetTargetPath (string path) => TargetUri = new URI(path); + public void SetTargetPath (URI uri) => TargetUri = uri; // Native library [Option(longName: "native", shortName: 'n', Required = false, HelpText = "Path to the native Crimson library. " + "If not provided, will use a packaged version. " + "If provided, but a required file is not found, the file will be created from the packaged library.")] - public Uri NativeUri { get; private set; } - public void SetNativePath (string path) => NativeUri = URIs.CreateUri(path); - public void SetNativePath (Uri uri) => NativeUri = uri; + public URI NativeUri { get; private set; } + public void SetNativePath (string path) => NativeUri = new URI(path); + public void SetNativePath (URI uri) => NativeUri = uri; // Entry function diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index bdadd1f..30b7a21 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -259,9 +259,12 @@ private async Task GetStreamOf (Uri uri) private Stream StreamFile (Uri uri) { + Uri standard = URIs.StandardiseUri(uri); - LOGGER.Info($"Standardised URI to {standard}"); - return File.OpenRead(standard.LocalPath); // TODO IO error here (path not found)# + string path = URIs.GetAbsolutePath(standard); + LOGGER.Info($"Streaming file at URI {path}"); + + return File.OpenRead(path); // TODO IO error here (path not found)# } private async Task StreamHttp (Uri uri) diff --git a/Crimson/CSharp/Core/URI.cs b/Crimson/CSharp/Core/URI.cs new file mode 100644 index 0000000..bcfb59b --- /dev/null +++ b/Crimson/CSharp/Core/URI.cs @@ -0,0 +1,149 @@ +using Crimson.CSharp.Exceptions; +using NLog; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Core +{ + /// + /// A wrapper class for a Uri which conceals all of the strange things which Crimson + /// does in the background (i.e. custom "root.crimson" and "native.crimson" hosts). + /// + public class URI + { + private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); + + public static object?[] AcceptedSchemes { get; set; } = new string[] + { + Uri.UriSchemeFile, Uri.UriSchemeHttp + }; + public static readonly string NATIVE_HOST = "native.crimson"; + public static readonly string ROOT_HOST = "root.crimson"; + public static readonly string ABSOLUTE_HOST = "abs.crimson"; + public static string[] CustomHosts { get; set; } = new string[] + { + NATIVE_HOST, ROOT_HOST, ABSOLUTE_HOST + }; + + public Uri Uri { get; set; } + + public URI (string uriText) + { + string trimmedText = uriText.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); + + Uri? uri; + if (!Uri.TryCreate(trimmedText, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out uri)) + { + throw new UriFormatException($"Unable to parse illegal URI string '{trimmedText}' ({uriText})"); + } + Uri = StandardiseUri(uri); + } + + public URI (Uri uri) + { + Uri = StandardiseUri(uri); + } + + // ================ + + /// + /// Removes any annoying crimson witchcraft from the URI and converts it to something which could just be put into a browser. + /// + /// + /// + /// + private Uri StandardiseUri (Uri uri) + { + if (uri.Scheme == Uri.UriSchemeFile) + return StandardiseFileUri(uri); + else if (uri.Scheme == Uri.UriSchemeHttp) + return StandardiseHttpUri(uri); + + throw new UriFormatException($"Crimson only accepts URIs of the file:/// scheme at this time. Found: {uri.Scheme}"); + } + + /// + /// file://root.crimson/memory/heap.crm + /// + /// + /// + private Uri StandardiseFileUri (Uri uri) + { + UriBuilder builder = new UriBuilder(uri); + + if (String.IsNullOrWhiteSpace(builder.Host)) + { + builder.Host = ABSOLUTE_HOST; + } + + // file:///native.crimson/heap.crm + if (builder.Host.Equals(NATIVE_HOST)) + { + builder.Path = $"{Crimson.Options.NativeUri.AbsolutePath}/{builder.Path}"; + } + + // file://root.crimson/heap.crm + if (builder.Host.Equals(ROOT_HOST)) + { + string srcPath = URIs.GetAbsolutePath(Crimson.Options.SourceUri); + string? parentDirectory = Path.GetDirectoryName(srcPath); + builder.Path = $"{parentDirectory}{builder.Path}"; + } + + return builder.Uri; + } + + /// + /// http://example.com/path/to/thing.crm + /// + /// + /// + private Uri StandardiseHttpUri (Uri uri) + { + return uri; + } + + + + /// + /// file:// + /// + /// + /// + private string GetAbsolutePath (Uri uri) + { + if (uri.Scheme != Uri.UriSchemeFile) + throw new UriSchemeException(uri); + + string trimmed = uri.AbsolutePath.TrimStart('/', '\\', '\n', '\t'); + string uriPath = WebUtility.UrlDecode(trimmed); + + // file://abs.crimson/C:/etc/thing.crm + // C://etc/thing.crm + if (ABSOLUTE_HOST.Equals(uri.Host)) + { + return uriPath; + } + + if (NATIVE_HOST.Equals(uri.Host)) + { + if (Path.IsPathRooted(uriPath)) throw new UriFormatException($"The path of a URI with host {NATIVE_HOST} may not be rooted."); + string native = WebUtility.UrlDecode(Crimson.Options.NativeUri.AbsolutePath); + return Path.Combine(native, uriPath); + } + else if (ROOT_HOST.Equals(uri.Host)) + { + if (Path.IsPathRooted(uriPath)) throw new UriFormatException($"The path of a URI with host {ROOT_HOST} may not be rooted."); + string source = WebUtility.UrlDecode(Crimson.Options.SourceUri.AbsolutePath); + string dir = Path.GetDirectoryName(source)!; + return Path.Combine(dir, uriPath); + } + + return "URIS GET ABSOLUTE PATH TESTING"; + } + } +} diff --git a/Crimson/CSharp/Core/URIs.cs b/Crimson/CSharp/Core/URIs.cs deleted file mode 100644 index 329d728..0000000 --- a/Crimson/CSharp/Core/URIs.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Core -{ - internal class URIs - { - - public static string[] CustomHosts { get => new string[] { NATIVE_HOST, ROOT_HOST, ABSOLUTE_HOST }; } - public static readonly string NATIVE_HOST = "native.crimson"; - public static readonly string ROOT_HOST = "root.crimson"; - public static readonly string ABSOLUTE_HOST = "abs.crimson"; - - - public static Uri CreateUri (string uriText) - { - string trimmedText = uriText.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); - - Uri? uri; - if (!Uri.TryCreate(trimmedText, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out uri)) - { - throw new UriFormatException($"Unable to parse illegal URI '{trimmedText}' ({uriText})"); - } - - return StandardiseUri(uri); - } - - /// - /// Takes a URI such as file://native.crimson/memory/heap.crm, takes the path and - /// - /// - /// - /// - public static Uri StandardiseUri (Uri uri) - { - if (uri.Scheme == Uri.UriSchemeFile) - return StandardiseFileUri(uri); - else if (uri.Scheme == Uri.UriSchemeHttp) - return StandardiseHttpUri(uri); - - throw new UriFormatException($"Crimson only accepts URIs of the file:/// scheme at this time. Found: {uri.Scheme}"); - } - - /// - /// file://root.crimson/memory/heap.crm - /// - /// - /// - public static Uri StandardiseFileUri (Uri uri) - { - UriBuilder builder = new UriBuilder(uri); - - if (String.IsNullOrWhiteSpace(builder.Host)) - { - builder.Host = ABSOLUTE_HOST; - } - - // file:///native.crimson/heap.crm - if (builder.Host.Equals(NATIVE_HOST)) - { - builder.Path = $"{Crimson.Options.NativeUri.AbsolutePath}/{builder.Path}"; - } - - // file://root.crimson/heap.crm - if (builder.Host.Equals(ROOT_HOST)) - { - string? parentDirectory = Path.GetDirectoryName(Crimson.Options.SourceUri.AbsolutePath); - builder.Path = $"{parentDirectory}/{builder.Path}"; - } - - return builder.Uri; - } - - /// - /// http://example.com/path/to/thing.crm - /// - /// - /// - public static Uri StandardiseHttpUri (Uri uri) - { - return uri; - } - } -} diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs index 22531fe..7622c26 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -48,7 +48,7 @@ public override IList GetDetailedMessage () List strings = new List { $"The URI '{URI}' has a disallowed scheme: '{URI.Scheme}'.", - $"Only '{Uri.UriSchemeFile}' and '{Uri.UriSchemeHttp}' are allowed." + $"Only {String.Join(',', URIs.AcceptedSchemes)} are allowed." }; return strings; } From 63b686b1185e6d1431f14d1ee15510e3e8310ed4 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sat, 8 Apr 2023 18:48:30 +0100 Subject: [PATCH 066/122] AbstractCURI and ICURIFactory + AbstractCURI, ICURIFactory, FileAbsoluteCURI, HttpCURI, NativeCURI and RelativeCURI > Maintenance for implementing all of that --- Crimson/CSharp/Core/CURI/AbstractCURI.cs | 92 +++++++++++ Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs | 51 ++++++ Crimson/CSharp/Core/CURI/HttpCURI.cs | 37 +++++ Crimson/CSharp/Core/CURI/ICURIFactory.cs | 13 ++ Crimson/CSharp/Core/CURI/NativeCURI.cs | 49 ++++++ Crimson/CSharp/Core/CURI/RelativeCURI.cs | 48 ++++++ Crimson/CSharp/Core/Crimson.cs | 4 +- Crimson/CSharp/Core/CrimsonOptions.cs | 19 +-- Crimson/CSharp/Core/Library.cs | 60 ++----- Crimson/CSharp/Core/URI.cs | 149 ------------------ .../CSharp/Exceptions/ParsingExceptions.cs | 45 +++--- Crimson/CSharp/Parsing/Scope.cs | 9 +- .../Parsing/Statements/ImportCStatement.cs | 36 ++--- 13 files changed, 351 insertions(+), 261 deletions(-) create mode 100644 Crimson/CSharp/Core/CURI/AbstractCURI.cs create mode 100644 Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs create mode 100644 Crimson/CSharp/Core/CURI/HttpCURI.cs create mode 100644 Crimson/CSharp/Core/CURI/ICURIFactory.cs create mode 100644 Crimson/CSharp/Core/CURI/NativeCURI.cs create mode 100644 Crimson/CSharp/Core/CURI/RelativeCURI.cs delete mode 100644 Crimson/CSharp/Core/URI.cs diff --git a/Crimson/CSharp/Core/CURI/AbstractCURI.cs b/Crimson/CSharp/Core/CURI/AbstractCURI.cs new file mode 100644 index 0000000..c6d0ead --- /dev/null +++ b/Crimson/CSharp/Core/CURI/AbstractCURI.cs @@ -0,0 +1,92 @@ +using Crimson.CSharp.Exceptions; +using NLog; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Core.CURI +{ + /// + /// + /// Crimson URI + /// + /// + /// See and + /// + /// + /// A wrapper class for a Uri which conceals all of the strange things which Crimson + /// does in the background (i.e. custom "root.crimson" and "native.crimson" hosts). + /// + /// + public abstract class AbstractCURI : IEquatable + { + private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); + + /// + /// + /// Get a of the resource described by this + /// + /// + /// For example, a CURI describing "http://example.com/crimson/heap.crm" would get a stream of the bytes of the file "heap.crm" + /// + /// + /// + public abstract Task GetStream (); + + /// + /// + /// Used to compare CURIs in . + /// + /// + /// Override of the generic Equals method, derived from . + /// + /// + /// + /// + public abstract bool Equals (AbstractCURI? other); + + public virtual Uri Uri { get; set; } + + protected AbstractCURI (Uri uri) => Uri = uri; + + /// + /// + /// Contains the factories used for making CURIs. + /// The relevant factory is chosen based on the given URI's scheme (e.g. "http" in "http://example.com") + /// + /// + /// Maps a given scheme to an ICURIFactory, for example: "http" = new HttpCURI.Factory(). + /// + /// + public static Dictionary Factories { get; private set; } = new Dictionary() + { + { HttpCURI.SCHEME, new HttpCURI.Factory() }, + { FileAbsoluteCURI.SCHEME, new FileAbsoluteCURI.Factory() }, + { NativeCURI.SCHEME, new NativeCURI.Factory() }, + { RelativeCURI.SCHEME, new RelativeCURI.Factory() } + }; + + public static AbstractCURI Create (string uriText) + { + string trimmedText = uriText.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); + + if (Uri.TryCreate(trimmedText, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out Uri? uri)) + return Create(uri); + + throw new UriFormatException($"Unable to parse illegal URI string '{trimmedText}' ({uriText})"); + } + + public static AbstractCURI Create (Uri uri) + { + if (Factories.TryGetValue(uri.Scheme, out ICURIFactory? factory)) + { + return factory!.Make(uri); + } + + throw new UriFormatException($"No CURI factory is registered for URIs with scheme {uri.Host}: {uri}"); + } + } +} diff --git a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs b/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs new file mode 100644 index 0000000..a5603dd --- /dev/null +++ b/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs @@ -0,0 +1,51 @@ +using NLog; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Core.CURI +{ + internal class FileAbsoluteCURI : AbstractCURI + { + public static readonly string SCHEME = "file"; + + public FileAbsoluteCURI (Uri uri) : base(uri) + { + if (!Uri.UriSchemeHttp.Equals(uri.Scheme)) + { + throw new UriFormatException("The"); + } + } + + public override bool Equals (AbstractCURI? other) + { + throw new NotImplementedException(); + } + + public override async Task GetStream () + { + string trimmed = uri.AbsolutePath.TrimStart('/', '\\', '\n', '\t'); + string uriPath = WebUtility.UrlDecode(trimmed); + + // file://abs.crimson/C:/etc/thing.crm + // C://etc/thing.crm + if (ABSOLUTE_SCHEME.Equals(uri.Host)) + { + return uriPath; + } + + return File.OpenRead(path); // TODO IO error here (path not found)# + } + + public class Factory : ICURIFactory + { + public AbstractCURI Make (Uri uri) + { + + } + } + } +} diff --git a/Crimson/CSharp/Core/CURI/HttpCURI.cs b/Crimson/CSharp/Core/CURI/HttpCURI.cs new file mode 100644 index 0000000..0bd7c2a --- /dev/null +++ b/Crimson/CSharp/Core/CURI/HttpCURI.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Core.CURI +{ + internal class HttpCURI : AbstractCURI + { + public static readonly string SCHEME = "http"; + + public HttpCURI (Uri uri) : base(uri) + { + if (!Uri.UriSchemeHttp.Equals(uri.Scheme)) + { + throw new UriFormatException("The"); + } + } + + public override async Task GetStream () + { + // New HTTP stuff + HttpClient client = new HttpClient(); + HttpResponseMessage httpResponse = await client.GetAsync(Uri); + return httpResponse.Content.ReadAsStream(); + } + + public class Factory : ICURIFactory + { + public AbstractCURI Make (Uri uri) + { + return null; + } + } + } +} diff --git a/Crimson/CSharp/Core/CURI/ICURIFactory.cs b/Crimson/CSharp/Core/CURI/ICURIFactory.cs new file mode 100644 index 0000000..1480bc8 --- /dev/null +++ b/Crimson/CSharp/Core/CURI/ICURIFactory.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Core.CURI +{ + public interface ICURIFactory + { + AbstractCURI Make (Uri uri); + } +} diff --git a/Crimson/CSharp/Core/CURI/NativeCURI.cs b/Crimson/CSharp/Core/CURI/NativeCURI.cs new file mode 100644 index 0000000..b5b1ac2 --- /dev/null +++ b/Crimson/CSharp/Core/CURI/NativeCURI.cs @@ -0,0 +1,49 @@ +using Crimson.CSharp.Exceptions; +using NLog; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Core.CURI +{ + /// + /// + /// Crimson URI + /// + /// + /// A wrapper class for a Uri which conceals all of the strange things which Crimson + /// does in the background (i.e. custom "root.crimson" and "native.crimson" hosts). + /// + /// + public abstract class NativeCURI : AbstractCURI + { + + public static readonly string SCHEME = "native"; + + public NativeCURI (Uri uri) : base(uri) + { + if (!Uri.UriSchemeHttp.Equals(uri.Scheme)) + { + throw new UriFormatException("The"); + } + } + + public override async Task GetStream () + { + if (Path.IsPathRooted(uriPath)) throw new UriFormatException($"The path of a URI with host {NATIVE_SCHEME} may not be rooted."); + string native = WebUtility.UrlDecode(Crimson.Options.NativeUri.AbsolutePath); + return Path.Combine(native, uriPath); + } + + public class Factory : ICURIFactory + { + public AbstractCURI Make (Uri uri) + { + return null; + } + } + } +} diff --git a/Crimson/CSharp/Core/CURI/RelativeCURI.cs b/Crimson/CSharp/Core/CURI/RelativeCURI.cs new file mode 100644 index 0000000..e88f2db --- /dev/null +++ b/Crimson/CSharp/Core/CURI/RelativeCURI.cs @@ -0,0 +1,48 @@ +using Crimson.CSharp.Exceptions; +using NLog; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Core.CURI +{ + /// + /// + /// Crimson URI + /// + /// + /// A wrapper class for a Uri which conceals all of the strange things which Crimson + /// does in the background (i.e. custom "root.crimson" and "native.crimson" hosts). + /// + /// + public abstract class RelativeCURI : AbstractCURI + { + public static readonly string SCHEME = "relative"; + public RelativeCURI (Uri uri) : base(uri) + { + if (!Uri.UriSchemeHttp.Equals(uri.Scheme)) + { + throw new UriFormatException("The"); + } + } + + public override async Task GetStream () + { + if (Path.IsPathRooted(uriPath)) throw new UriFormatException($"The path of a URI with host {RELATIVE_SCHEME} may not be rooted."); + string source = WebUtility.UrlDecode(Crimson.Options.SourceUri.AbsolutePath); + string dir = Path.GetDirectoryName(source)!; + return Path.Combine(dir, uriPath); + } + + public class Factory : ICURIFactory + { + public AbstractCURI Make (Uri uri) + { + return null; + } + } + } +} diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 248bfe6..345ac9e 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -248,13 +248,11 @@ public enum PanicCode PARSE = -100, PARSE_STATEMENT = -110, PARSE_SCOPE = -120, - PARSE_URI_SCHEME = -130, - PARSE_URI_HOST = -131, - PARSE_URI_STREAM = -131, LINK = -200, GENERALISE = -300, SPECIALISE = -400, + CURI = -500, } } } \ No newline at end of file diff --git a/Crimson/CSharp/Core/CrimsonOptions.cs b/Crimson/CSharp/Core/CrimsonOptions.cs index 22871d2..444f0b4 100644 --- a/Crimson/CSharp/Core/CrimsonOptions.cs +++ b/Crimson/CSharp/Core/CrimsonOptions.cs @@ -4,6 +4,7 @@ using System.Text; using System.Threading.Tasks; using CommandLine; +using Crimson.CSharp.Core.CURI; using NLog.Targets; namespace Crimson.CSharp.Core @@ -13,26 +14,26 @@ public class CrimsonOptions // Source [Option(longName: "source", shortName: 's', Required = true, HelpText = "Path to the root source file to translate. " + "If no file extension given, .crm will be assumed.")] - public URI SourceUri { get; private set; } - public void SetSourcePath (string path) => SourceUri = new URI(path); - public void SetSourcePath (URI uri) => SourceUri = uri; + public AbstractCURI SourceUri { get; private set; } + public void SetSourcePath (string path) => SourceUri = AbstractCURI.Create(path); + public void SetSourcePath (AbstractCURI uri) => SourceUri = uri; // Target [Option(longName: "target", shortName: 't', Required = false, HelpText = "Path to the desired target location or output file. " + "If no file extension provided, will assume .crm.")] - public URI TargetUri { get; private set; } - public void SetTargetPath (string path) => TargetUri = new URI(path); - public void SetTargetPath (URI uri) => TargetUri = uri; + public AbstractCURI TargetUri { get; private set; } + public void SetTargetPath (string path) => TargetUri = AbstractCURI.Create(path); + public void SetTargetPath (AbstractCURI uri) => TargetUri = uri; // Native library [Option(longName: "native", shortName: 'n', Required = false, HelpText = "Path to the native Crimson library. " + "If not provided, will use a packaged version. " + "If provided, but a required file is not found, the file will be created from the packaged library.")] - public URI NativeUri { get; private set; } - public void SetNativePath (string path) => NativeUri = new URI(path); - public void SetNativePath (URI uri) => NativeUri = uri; + public AbstractCURI NativeUri { get; private set; } + public void SetNativePath (string path) => NativeUri = AbstractCURI.Create(path); + public void SetNativePath (AbstractCURI uri) => NativeUri = uri; // Entry function diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 30b7a21..4b72997 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Antlr4.Runtime; using Crimson.AntlrBuild; +using Crimson.CSharp.Core.CURI; using Crimson.CSharp.Exceptions; using Crimson.CSharp.Parsing; using NLog; @@ -25,33 +26,21 @@ public class Library /// [ C:/utils.crm => UTILS_UNIT ] /// [ C:/main.crm => MAIN_UNIT ] /// - private ConcurrentDictionary> Scopes { get; } + private ConcurrentDictionary> Scopes { get; } public Scope Root { get; set; } public Library () { - Scopes = new ConcurrentDictionary>(); + Scopes = new ConcurrentDictionary>(); } // ========== API ========== - public Scope? GetScope (Uri uri) + public Scope? GetScope (AbstractCURI curi) { - if (Scopes.ContainsKey(uri)) - { - return GetScopeUnsafe(uri); - } - else - { - Uri nativePath = URIs.StandardiseUri(uri); - if (Scopes.ContainsKey(nativePath)) - { - return GetScopeUnsafe(nativePath); - } - } - return null; + return GetScopeUnsafe(curi); } public List GetScopes () @@ -89,7 +78,7 @@ public void SetRootScope (Scope scope) Root = scope; } - public async Task LoadScope (Uri uri) + public async Task LoadScope (AbstractCURI uri) { LOGGER.Info($"Loading scope from {uri}"); @@ -133,7 +122,7 @@ public async Task LoadScope (Uri uri) return scope; } - private async Task> LoadScopeAsync (Uri uri) + private async Task> LoadScopeAsync (AbstractCURI uri) { // Check if already loading/loaded and reserve key if not if (Scopes.ContainsKey(uri)) return Scopes[uri]; @@ -160,14 +149,16 @@ public override string ToString () // ========== INTERNALS ========== - private Scope GetScopeUnsafe (Uri uri) + private Scope GetScopeUnsafe (AbstractCURI uri) { - Task task = Scopes[uri]; + if (!Scopes.TryGetValue(uri, out Task? task)) + throw new ArgumentNullException("UNSAFE NULL"); if (!task.IsCompleted) { LOGGER.Debug($"Waiting for scope {uri} to finish loading..."); task.Wait(); } + return task.Result; } @@ -207,7 +198,7 @@ private async void LoadScopeDependencies (Scope root) } } - private Scope ParseScopeText (Uri source, string textIn) + private Scope ParseScopeText (AbstractCURI source, string textIn) { try { @@ -239,16 +230,11 @@ private Scope ParseScopeText (Uri source, string textIn) } } - private async Task GetStreamOf (Uri uri) + private async Task GetStreamOf (AbstractCURI uri) { try { - if (uri.Scheme == Uri.UriSchemeFile) - return StreamFile(uri); - else if (uri.Scheme == Uri.UriSchemeHttp) - return await StreamHttp(uri); - - throw new UriSchemeException(uri); + return await uri.GetStream(); } catch (Exception e) { @@ -256,23 +242,5 @@ private async Task GetStreamOf (Uri uri) throw; } } - - private Stream StreamFile (Uri uri) - { - - Uri standard = URIs.StandardiseUri(uri); - string path = URIs.GetAbsolutePath(standard); - LOGGER.Info($"Streaming file at URI {path}"); - - return File.OpenRead(path); // TODO IO error here (path not found)# - } - - private async Task StreamHttp (Uri uri) - { - // New HTTP stuff - HttpClient client = new HttpClient(); - HttpResponseMessage httpResponse = await client.GetAsync(uri); - return httpResponse.Content.ReadAsStream(); - } } } diff --git a/Crimson/CSharp/Core/URI.cs b/Crimson/CSharp/Core/URI.cs deleted file mode 100644 index bcfb59b..0000000 --- a/Crimson/CSharp/Core/URI.cs +++ /dev/null @@ -1,149 +0,0 @@ -using Crimson.CSharp.Exceptions; -using NLog; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Core -{ - /// - /// A wrapper class for a Uri which conceals all of the strange things which Crimson - /// does in the background (i.e. custom "root.crimson" and "native.crimson" hosts). - /// - public class URI - { - private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - - public static object?[] AcceptedSchemes { get; set; } = new string[] - { - Uri.UriSchemeFile, Uri.UriSchemeHttp - }; - public static readonly string NATIVE_HOST = "native.crimson"; - public static readonly string ROOT_HOST = "root.crimson"; - public static readonly string ABSOLUTE_HOST = "abs.crimson"; - public static string[] CustomHosts { get; set; } = new string[] - { - NATIVE_HOST, ROOT_HOST, ABSOLUTE_HOST - }; - - public Uri Uri { get; set; } - - public URI (string uriText) - { - string trimmedText = uriText.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); - - Uri? uri; - if (!Uri.TryCreate(trimmedText, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out uri)) - { - throw new UriFormatException($"Unable to parse illegal URI string '{trimmedText}' ({uriText})"); - } - Uri = StandardiseUri(uri); - } - - public URI (Uri uri) - { - Uri = StandardiseUri(uri); - } - - // ================ - - /// - /// Removes any annoying crimson witchcraft from the URI and converts it to something which could just be put into a browser. - /// - /// - /// - /// - private Uri StandardiseUri (Uri uri) - { - if (uri.Scheme == Uri.UriSchemeFile) - return StandardiseFileUri(uri); - else if (uri.Scheme == Uri.UriSchemeHttp) - return StandardiseHttpUri(uri); - - throw new UriFormatException($"Crimson only accepts URIs of the file:/// scheme at this time. Found: {uri.Scheme}"); - } - - /// - /// file://root.crimson/memory/heap.crm - /// - /// - /// - private Uri StandardiseFileUri (Uri uri) - { - UriBuilder builder = new UriBuilder(uri); - - if (String.IsNullOrWhiteSpace(builder.Host)) - { - builder.Host = ABSOLUTE_HOST; - } - - // file:///native.crimson/heap.crm - if (builder.Host.Equals(NATIVE_HOST)) - { - builder.Path = $"{Crimson.Options.NativeUri.AbsolutePath}/{builder.Path}"; - } - - // file://root.crimson/heap.crm - if (builder.Host.Equals(ROOT_HOST)) - { - string srcPath = URIs.GetAbsolutePath(Crimson.Options.SourceUri); - string? parentDirectory = Path.GetDirectoryName(srcPath); - builder.Path = $"{parentDirectory}{builder.Path}"; - } - - return builder.Uri; - } - - /// - /// http://example.com/path/to/thing.crm - /// - /// - /// - private Uri StandardiseHttpUri (Uri uri) - { - return uri; - } - - - - /// - /// file:// - /// - /// - /// - private string GetAbsolutePath (Uri uri) - { - if (uri.Scheme != Uri.UriSchemeFile) - throw new UriSchemeException(uri); - - string trimmed = uri.AbsolutePath.TrimStart('/', '\\', '\n', '\t'); - string uriPath = WebUtility.UrlDecode(trimmed); - - // file://abs.crimson/C:/etc/thing.crm - // C://etc/thing.crm - if (ABSOLUTE_HOST.Equals(uri.Host)) - { - return uriPath; - } - - if (NATIVE_HOST.Equals(uri.Host)) - { - if (Path.IsPathRooted(uriPath)) throw new UriFormatException($"The path of a URI with host {NATIVE_HOST} may not be rooted."); - string native = WebUtility.UrlDecode(Crimson.Options.NativeUri.AbsolutePath); - return Path.Combine(native, uriPath); - } - else if (ROOT_HOST.Equals(uri.Host)) - { - if (Path.IsPathRooted(uriPath)) throw new UriFormatException($"The path of a URI with host {ROOT_HOST} may not be rooted."); - string source = WebUtility.UrlDecode(Crimson.Options.SourceUri.AbsolutePath); - string dir = Path.GetDirectoryName(source)!; - return Path.Combine(dir, uriPath); - } - - return "URIS GET ABSOLUTE PATH TESTING"; - } - } -} diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs index 7622c26..caf3680 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -1,4 +1,5 @@ using Crimson.CSharp.Core; +using Crimson.CSharp.Core.CURI; using Crimson.CSharp.Parsing.Statements; using System; using System.Collections.Generic; @@ -34,44 +35,42 @@ public override IList GetDetailedMessage () } } - internal class UriSchemeException : CrimsonException + internal class CURIException : CrimsonException { - public Uri URI { get; private set; } + public override string Message { get; } + public AbstractCURI? CURI { get; private set; } + public CURIExceptionReason Reason { get; private set; } - public UriSchemeException (Uri uri) : base(Core.Crimson.PanicCode.PARSE_URI_SCHEME) + public CURIException (string message, AbstractCURI uri, CURIExceptionReason reason) : base(Core.Crimson.PanicCode.CURI) { - URI = uri; + Message = message; + CURI = uri; + Reason = reason; } public override IList GetDetailedMessage () { List strings = new List { - $"The URI '{URI}' has a disallowed scheme: '{URI.Scheme}'.", - $"Only {String.Join(',', URIs.AcceptedSchemes)} are allowed." + $"The Crimson URI '{CURI}' is invalid in the given context.", + Message }; - return strings; - } - } - internal class UriHostException : CrimsonException - { - public Uri URI { get; private set; } + string extra = Reason switch + { + CURIExceptionReason.SCHEME => $"Scheme: {CURI.Scheme}.", + CURIExceptionReason.HOST => $"Host: {CURI.Uri.Host}.", + CURIExceptionReason.PATH => $"Path: {CURI.Uri.AbsolutePath}.", + _ => $"No extra information.", + }; + strings.Add(extra); - public UriHostException (Uri uri) : base(Core.Crimson.PanicCode.PARSE_URI_HOST) - { - URI = uri; + return strings; } - public override IList GetDetailedMessage () + public enum CURIExceptionReason { - List strings = new List - { - $"The URI '{URI}' host '{URI.Host}' could not be resolved.", - $"Please check that the given host is permitted in the current context.", - $"Crimson's custom hosts are: {string.Join(',', URIs.CustomHosts)}" - }; - return strings; + SCHEME, HOST, PATH } } diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs index e31a28f..347af94 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -1,4 +1,5 @@ using Crimson.CSharp.Core; +using Crimson.CSharp.Core.CURI; using Crimson.CSharp.Exceptions; using Crimson.CSharp.Generalising; using Crimson.CSharp.Generalising.Structures; @@ -16,7 +17,7 @@ public class Scope : AbstractCrimsonStatement private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); public Scope? Parent { get; set; } - public Uri? Uri { get; set; } + public AbstractCURI? Uri { get; set; } private string _name; public string Name @@ -32,9 +33,9 @@ public string Name public Scope (string name, Scope? parent) : this(name, parent, null) { } - public Scope (string name, Uri? path) : this(name, null, path) { } + public Scope (string name, AbstractCURI? path) : this(name, null, path) { } - private Scope (string name, Scope? parent, Uri? path) + private Scope (string name, Scope? parent, AbstractCURI? path) { Parent = null; Uri = path; @@ -63,7 +64,7 @@ public Scope GetRoot () return parent; } - public Uri GetPath () + public AbstractCURI GetPath () { if (Uri.IsWellFormedUriString(Uri.ToString(), UriKind.Absolute)) return Uri; diff --git a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs index 0cc24ff..4d178b7 100644 --- a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs @@ -1,46 +1,28 @@ using Crimson.CSharp.Core; +using Crimson.CSharp.Core.CURI; using Crimson.CSharp.Exceptions; using Crimson.CSharp.Parsing.Tokens; using NLog; +using System; using static System.Formats.Asn1.AsnWriter; namespace Crimson.CSharp.Parsing.Statements { public class ImportCStatement { - public Uri URI { get; set; } + public AbstractCURI URI { get; set; } public FullNameCToken Alias { get; set; } - public ImportCStatement (string uri, FullNameCToken alias) : this(URIs.CreateUri(uri), alias) - { - } + public ImportCStatement (string uri, FullNameCToken alias) : this(AbstractCURI.Create(uri), alias) { } + public ImportCStatement (Uri uri, FullNameCToken alias) : this(AbstractCURI.Create(uri), alias) { } - public ImportCStatement (Uri uri, FullNameCToken alias) + public ImportCStatement (AbstractCURI curi, FullNameCToken alias) { - if (alias.HasLibrary()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{uri}' because it must only contain a member name."); - if (!alias.HasMember()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{uri}' because it does not contain a member name."); + if (alias.HasLibrary()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{curi}' because it must only contain a member name."); + if (!alias.HasMember()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{curi}' because it does not contain a member name."); - URI = URIs.StandardiseUri(uri); + URI = curi; Alias = alias; } - - public static void VerifyUri (Uri uri) - { - // Check host - if (String.IsNullOrWhiteSpace(uri.Host)) - { - throw new UriHostException(uri); - } - else if (!URIs.CustomHosts.Contains(uri.Host)) - { - throw new UriHostException(uri); - } - - // Check path - if (String.IsNullOrWhiteSpace(uri.AbsolutePath)) - { - // throw new UriPathException(); - } - } } } \ No newline at end of file From 1934d009453e98165caaa09df86bb2e7d8a4cefc Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sat, 8 Apr 2023 20:22:23 +0100 Subject: [PATCH 067/122] WOAH IT COMPILES AGAIN > 100% CURI migration > Just kidding there's also some GetStream things and such --- Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs | 28 +++++++-------- Crimson/CSharp/Core/CURI/HttpCURI.cs | 15 ++++---- Crimson/CSharp/Core/CURI/NativeCURI.cs | 30 +++++++++++----- Crimson/CSharp/Core/CURI/RelativeCURI.cs | 35 ++++++++++++++----- Crimson/CSharp/Core/Crimson.cs | 6 ++-- Crimson/CSharp/Core/CrimsonCompiler.cs | 11 +++--- Crimson/CSharp/Core/CrimsonOptions.cs | 18 +++++----- Crimson/CSharp/Core/Library.cs | 10 +++--- .../CSharp/Exceptions/ParsingExceptions.cs | 4 +-- Crimson/CSharp/Parsing/Scope.cs | 10 +++--- .../Parsing/Statements/ImportCStatement.cs | 4 +-- 11 files changed, 102 insertions(+), 69 deletions(-) diff --git a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs b/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs index a5603dd..c0debcc 100644 --- a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs +++ b/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs @@ -12,39 +12,35 @@ internal class FileAbsoluteCURI : AbstractCURI { public static readonly string SCHEME = "file"; - public FileAbsoluteCURI (Uri uri) : base(uri) + public string AbsolutePath { - if (!Uri.UriSchemeHttp.Equals(uri.Scheme)) + get { - throw new UriFormatException("The"); + string path = WebUtility.UrlDecode(Uri.AbsolutePath); + return path; } } + public FileAbsoluteCURI (Uri uri) : base(uri) + { + if (!Uri.UriSchemeFile.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {Uri.UriSchemeFile}."); + } + public override bool Equals (AbstractCURI? other) { - throw new NotImplementedException(); + return other?.Uri?.Equals(Uri) ?? false; } public override async Task GetStream () { - string trimmed = uri.AbsolutePath.TrimStart('/', '\\', '\n', '\t'); - string uriPath = WebUtility.UrlDecode(trimmed); - - // file://abs.crimson/C:/etc/thing.crm - // C://etc/thing.crm - if (ABSOLUTE_SCHEME.Equals(uri.Host)) - { - return uriPath; - } - - return File.OpenRead(path); // TODO IO error here (path not found)# + return await Task.Run(() => File.OpenRead(AbsolutePath)); } public class Factory : ICURIFactory { public AbstractCURI Make (Uri uri) { - + return new FileAbsoluteCURI(uri); } } } diff --git a/Crimson/CSharp/Core/CURI/HttpCURI.cs b/Crimson/CSharp/Core/CURI/HttpCURI.cs index 0bd7c2a..2cd28f6 100644 --- a/Crimson/CSharp/Core/CURI/HttpCURI.cs +++ b/Crimson/CSharp/Core/CURI/HttpCURI.cs @@ -1,4 +1,5 @@ -using System; +using Crimson.CSharp.Exceptions; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -12,10 +13,12 @@ internal class HttpCURI : AbstractCURI public HttpCURI (Uri uri) : base(uri) { - if (!Uri.UriSchemeHttp.Equals(uri.Scheme)) - { - throw new UriFormatException("The"); - } + if (!Uri.UriSchemeFile.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {Uri.UriSchemeHttp}."); + } + + public override bool Equals (AbstractCURI? other) + { + return other?.Uri?.Equals(Uri) ?? false; } public override async Task GetStream () @@ -30,7 +33,7 @@ public class Factory : ICURIFactory { public AbstractCURI Make (Uri uri) { - return null; + return new HttpCURI(uri); } } } diff --git a/Crimson/CSharp/Core/CURI/NativeCURI.cs b/Crimson/CSharp/Core/CURI/NativeCURI.cs index b5b1ac2..6996196 100644 --- a/Crimson/CSharp/Core/CURI/NativeCURI.cs +++ b/Crimson/CSharp/Core/CURI/NativeCURI.cs @@ -18,31 +18,45 @@ namespace Crimson.CSharp.Core.CURI /// does in the background (i.e. custom "root.crimson" and "native.crimson" hosts). /// /// - public abstract class NativeCURI : AbstractCURI + public class NativeCURI : AbstractCURI { public static readonly string SCHEME = "native"; - public NativeCURI (Uri uri) : base(uri) + public string AbsolutePath { - if (!Uri.UriSchemeHttp.Equals(uri.Scheme)) + get { - throw new UriFormatException("The"); + string native = WebUtility.UrlDecode(Crimson.Options.NativeCURI.Uri.AbsolutePath); + + string abs = WebUtility.UrlDecode(Uri.AbsolutePath); + + string path = Path.Combine(native, abs); + return path; } } + public NativeCURI (Uri uri) : base(uri) + { + if (!SCHEME.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {SCHEME}."); + if (Path.IsPathRooted(AbsolutePath)) throw new UriFormatException($"The path of a URI with host {SCHEME} may not be rooted."); + } + + public override bool Equals (AbstractCURI? other) + { + return other?.Uri?.Equals(Uri) ?? false; + } + public override async Task GetStream () { - if (Path.IsPathRooted(uriPath)) throw new UriFormatException($"The path of a URI with host {NATIVE_SCHEME} may not be rooted."); - string native = WebUtility.UrlDecode(Crimson.Options.NativeUri.AbsolutePath); - return Path.Combine(native, uriPath); + return await Task.Run(() => File.OpenRead(AbsolutePath)); } public class Factory : ICURIFactory { public AbstractCURI Make (Uri uri) { - return null; + return new NativeCURI(uri); } } } diff --git a/Crimson/CSharp/Core/CURI/RelativeCURI.cs b/Crimson/CSharp/Core/CURI/RelativeCURI.cs index e88f2db..5edc89f 100644 --- a/Crimson/CSharp/Core/CURI/RelativeCURI.cs +++ b/Crimson/CSharp/Core/CURI/RelativeCURI.cs @@ -18,30 +18,47 @@ namespace Crimson.CSharp.Core.CURI /// does in the background (i.e. custom "root.crimson" and "native.crimson" hosts). /// /// - public abstract class RelativeCURI : AbstractCURI + public class RelativeCURI : AbstractCURI { public static readonly string SCHEME = "relative"; - public RelativeCURI (Uri uri) : base(uri) + + public string AbsolutePath { - if (!Uri.UriSchemeHttp.Equals(uri.Scheme)) + get { - throw new UriFormatException("The"); + string source = WebUtility.UrlDecode(Crimson.Options.NativeCURI.Uri.AbsolutePath); + string? dir = Path.GetDirectoryName(source); + + string uri = WebUtility.UrlDecode(Uri.AbsolutePath); + + string path = Path.Combine(dir!, uri); + return path; } } + public override bool Equals (AbstractCURI? other) + { + return other?.Uri?.Equals(Uri) ?? false; + } + + public RelativeCURI (Uri uri) : base(uri) + { + if (!SCHEME.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {SCHEME}."); + + string abs = WebUtility.UrlDecode(Uri.AbsolutePath); + if (Path.IsPathRooted(abs)) throw new UriFormatException($"The path of a {GetType()} may not be rooted."); + } + public override async Task GetStream () { - if (Path.IsPathRooted(uriPath)) throw new UriFormatException($"The path of a URI with host {RELATIVE_SCHEME} may not be rooted."); - string source = WebUtility.UrlDecode(Crimson.Options.SourceUri.AbsolutePath); - string dir = Path.GetDirectoryName(source)!; - return Path.Combine(dir, uriPath); + return await Task.Run(() => File.OpenRead(AbsolutePath)); } public class Factory : ICURIFactory { public AbstractCURI Make (Uri uri) { - return null; + return new RelativeCURI(uri); } } } diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 345ac9e..8ed92b3 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -49,9 +49,9 @@ public static int Main (string[] args) Options = CommandLine.Parser.Default.ParseArguments(args).Value; if (Options == null) throw new NullReferenceException($"Unable to parse arguments {args}"); - Console.WriteLine(" Option: SourceUri: " + Options.SourceUri); - Console.WriteLine(" Option: TargetUri: " + Options.TargetUri); - Console.WriteLine(" Option: NativeUri: " + Options.NativeUri); + Console.WriteLine(" Option: SourceUri: " + Options.SourceCURI); + Console.WriteLine(" Option: TargetUri: " + Options.TargetCURI); + Console.WriteLine(" Option: NativeUri: " + Options.NativeCURI); Console.WriteLine(" Option: DumpIntermediates: " + Options.DumpIntermediates); Console.WriteLine(" Option: DataWidth: " + Options.DataWidth); Console.WriteLine(" Option: (Platform) CrimsonBasic: " + Options.CrimsonBasic); diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index 370bb14..e04d492 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -3,6 +3,7 @@ using Crimson.CSharp.Parsing; using Crimson.CSharp.Specialising; using NLog; +using System.Net; namespace Crimson.CSharp.Core { @@ -41,7 +42,7 @@ public async void FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" P A R S I N G "); - Scope rootScope = await Library.LoadScope(Options.SourceUri); // Get the root unit (ie. main.crm) + Scope rootScope = await Library.LoadScope(Options.SourceCURI); // Get the root unit (ie. main.crm) Compilation compilation = new Compilation(Library); // Generate dependency units (all resources are henceforth accessible) @@ -100,7 +101,8 @@ private void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram specialised { if (Options.DumpIntermediates) { - string basicTarget = Path.ChangeExtension(Options.TargetUri.AbsolutePath, specialisedProgram.GetExtension()); + string target = WebUtility.UrlDecode(Options.TargetCURI.Uri.AbsolutePath); + string basicTarget = Path.ChangeExtension(target, specialisedProgram.GetExtension()); specialisedProgram.Write(basicTarget); } else @@ -113,7 +115,8 @@ private void DumpGeneralisedProgram (GeneralAssemblyProgram generalProgram) { if (Options.DumpIntermediates) { - string basicTarget = Path.ChangeExtension(Options.TargetUri.AbsolutePath, ".gen"); + string target = WebUtility.UrlDecode(Options.TargetCURI.Uri.AbsolutePath); + string basicTarget = Path.ChangeExtension(target, ".gen"); LOGGER.Info("Dumping generalised program to " + basicTarget); List lines = new List(); @@ -122,7 +125,7 @@ private void DumpGeneralisedProgram (GeneralAssemblyProgram generalProgram) lines.Add(s.ToString() ?? "(null)"); } - _ = Directory.CreateDirectory(Path.GetDirectoryName(Options.TargetUri.AbsolutePath)!); + _ = Directory.CreateDirectory(Path.GetDirectoryName(target)!); File.WriteAllLines(basicTarget, lines.ToArray()); LOGGER.Info("Written!"); } diff --git a/Crimson/CSharp/Core/CrimsonOptions.cs b/Crimson/CSharp/Core/CrimsonOptions.cs index 444f0b4..5f3de41 100644 --- a/Crimson/CSharp/Core/CrimsonOptions.cs +++ b/Crimson/CSharp/Core/CrimsonOptions.cs @@ -14,26 +14,26 @@ public class CrimsonOptions // Source [Option(longName: "source", shortName: 's', Required = true, HelpText = "Path to the root source file to translate. " + "If no file extension given, .crm will be assumed.")] - public AbstractCURI SourceUri { get; private set; } - public void SetSourcePath (string path) => SourceUri = AbstractCURI.Create(path); - public void SetSourcePath (AbstractCURI uri) => SourceUri = uri; + public AbstractCURI SourceCURI { get; private set; } + public void SetSourcePath (string path) => SourceCURI = AbstractCURI.Create(path); + public void SetSourcePath (AbstractCURI uri) => SourceCURI = uri; // Target [Option(longName: "target", shortName: 't', Required = false, HelpText = "Path to the desired target location or output file. " + "If no file extension provided, will assume .crm.")] - public AbstractCURI TargetUri { get; private set; } - public void SetTargetPath (string path) => TargetUri = AbstractCURI.Create(path); - public void SetTargetPath (AbstractCURI uri) => TargetUri = uri; + public AbstractCURI TargetCURI { get; private set; } + public void SetTargetPath (string path) => TargetCURI = AbstractCURI.Create(path); + public void SetTargetPath (AbstractCURI uri) => TargetCURI = uri; // Native library [Option(longName: "native", shortName: 'n', Required = false, HelpText = "Path to the native Crimson library. " + "If not provided, will use a packaged version. " + "If provided, but a required file is not found, the file will be created from the packaged library.")] - public AbstractCURI NativeUri { get; private set; } - public void SetNativePath (string path) => NativeUri = AbstractCURI.Create(path); - public void SetNativePath (AbstractCURI uri) => NativeUri = uri; + public AbstractCURI NativeCURI { get; private set; } + public void SetNativePath (string path) => NativeCURI = AbstractCURI.Create(path); + public void SetNativePath (AbstractCURI uri) => NativeCURI = uri; // Entry function diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 4b72997..fa07d3a 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -175,14 +175,14 @@ private async void LoadScopeDependencies (Scope root) // Queue loading of its dependencies (once it's loaded) foreach (var i in root.Imports) { - if (Scopes.ContainsKey(i.Value.URI)) + if (Scopes.ContainsKey(i.Value.CURI)) { - LOGGER.Debug($"Skipping duplicate loading of {i.Value.URI}"); + LOGGER.Debug($"Skipping duplicate loading of {i.Value.CURI}"); continue; } - LOGGER.Debug($"Trying to load {i.Value.URI}"); + LOGGER.Debug($"Trying to load {i.Value.CURI}"); - Task scope = await LoadScopeAsync(i.Value.URI); + Task scope = await LoadScopeAsync(i.Value.CURI); Task dependencyTask = scope.ContinueWith(finishedTask => LoadScopeDependencies(finishedTask.Result)); ongoingLoadingTasks.Add(dependencyTask); @@ -219,7 +219,7 @@ private Scope ParseScopeText (AbstractCURI source, string textIn) ScopeVisitor visitor = new ScopeVisitor(); Scope scope = visitor.VisitScope(cuCtx); - scope.Uri = source; + scope.CURI = source; return scope; } diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs index caf3680..60ce592 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -38,7 +38,7 @@ public override IList GetDetailedMessage () internal class CURIException : CrimsonException { public override string Message { get; } - public AbstractCURI? CURI { get; private set; } + public AbstractCURI CURI { get; private set; } public CURIExceptionReason Reason { get; private set; } public CURIException (string message, AbstractCURI uri, CURIExceptionReason reason) : base(Core.Crimson.PanicCode.CURI) @@ -58,7 +58,7 @@ public override IList GetDetailedMessage () string extra = Reason switch { - CURIExceptionReason.SCHEME => $"Scheme: {CURI.Scheme}.", + CURIExceptionReason.SCHEME => $"Scheme: {CURI.Uri.Scheme}.", CURIExceptionReason.HOST => $"Host: {CURI.Uri.Host}.", CURIExceptionReason.PATH => $"Path: {CURI.Uri.AbsolutePath}.", _ => $"No extra information.", diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/CSharp/Parsing/Scope.cs index 347af94..9fed792 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/CSharp/Parsing/Scope.cs @@ -17,7 +17,7 @@ public class Scope : AbstractCrimsonStatement private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); public Scope? Parent { get; set; } - public AbstractCURI? Uri { get; set; } + public AbstractCURI? CURI { get; set; } private string _name; public string Name @@ -38,7 +38,7 @@ public Scope (string name, AbstractCURI? path) : this(name, null, path) { } private Scope (string name, Scope? parent, AbstractCURI? path) { Parent = null; - Uri = path; + CURI = path; Name = name; Delegates = new List(); @@ -66,8 +66,8 @@ public Scope GetRoot () public AbstractCURI GetPath () { - if (Uri.IsWellFormedUriString(Uri.ToString(), UriKind.Absolute)) - return Uri; + if (CURI != null) + return CURI; if (HasParent()) return GetParent().GetPath(); @@ -173,7 +173,7 @@ public async Task> GetLinks (Compilation compilation) * For example: * '#using "utils.crm" as u' may result in 'C:/utils.crm' */ - Uri relativePath = importPair.Value.URI; + AbstractCURI relativePath = importPair.Value.CURI; /* * diff --git a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs index 4d178b7..bd04193 100644 --- a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs +++ b/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs @@ -10,7 +10,7 @@ namespace Crimson.CSharp.Parsing.Statements { public class ImportCStatement { - public AbstractCURI URI { get; set; } + public AbstractCURI CURI { get; set; } public FullNameCToken Alias { get; set; } public ImportCStatement (string uri, FullNameCToken alias) : this(AbstractCURI.Create(uri), alias) { } @@ -21,7 +21,7 @@ public ImportCStatement (AbstractCURI curi, FullNameCToken alias) if (alias.HasLibrary()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{curi}' because it must only contain a member name."); if (!alias.HasMember()) throw new CrimsonParserException($"The alias {alias} cannot be given to the import '{curi}' because it does not contain a member name."); - URI = curi; + CURI = curi; Alias = alias; } } From 76744fa16e68ef67c3b55571080c3fa9c258d114 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Mon, 10 Apr 2023 20:43:12 +0100 Subject: [PATCH 068/122] OMFG OMFG OMFG OMFG OMFG OMFG OMFG OMFG OMFG Alright so I fiddled a bit with where asyncs are and determined that most methods don't need it. It now runs just fine. I think that the async methods were doing some weird resource sharing things that were making ANTLR really unhappy, or were running into each other and crashing. --- Crimson/CSharp/Core/CURI/AbstractCURI.cs | 7 +- Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs | 12 +- Crimson/CSharp/Core/CURI/HttpCURI.cs | 19 +- Crimson/CSharp/Core/CURI/NativeCURI.cs | 12 +- Crimson/CSharp/Core/CURI/RelativeCURI.cs | 12 +- Crimson/CSharp/Core/Crimson.cs | 18 +- Crimson/CSharp/Core/CrimsonCompiler.cs | 6 +- Crimson/CSharp/Core/CrimsonOptions.cs | 29 +-- Crimson/CSharp/Core/Library.cs | 190 ++++++++++-------- .../Exceptions/CrimsonAntlrTextWriter.cs | 13 -- .../Exceptions/ExceptionCrimsonException.cs | 41 ---- .../CSharp/Exceptions/LexerErrorListener.cs | 6 +- Crimson/CSharp/Exceptions/LexerException.cs | 21 -- .../CSharp/Exceptions/ParserErrorListener.cs | 21 ++ .../CSharp/Exceptions/ParserErrorStrategy.cs | 27 --- Crimson/CSharp/Generalising/Generaliser.cs | 4 +- Crimson/CSharp/Linking/Linker.cs | 4 +- 17 files changed, 206 insertions(+), 236 deletions(-) delete mode 100644 Crimson/CSharp/Exceptions/CrimsonAntlrTextWriter.cs delete mode 100644 Crimson/CSharp/Exceptions/ExceptionCrimsonException.cs delete mode 100644 Crimson/CSharp/Exceptions/LexerException.cs create mode 100644 Crimson/CSharp/Exceptions/ParserErrorListener.cs delete mode 100644 Crimson/CSharp/Exceptions/ParserErrorStrategy.cs diff --git a/Crimson/CSharp/Core/CURI/AbstractCURI.cs b/Crimson/CSharp/Core/CURI/AbstractCURI.cs index c6d0ead..1cc34df 100644 --- a/Crimson/CSharp/Core/CURI/AbstractCURI.cs +++ b/Crimson/CSharp/Core/CURI/AbstractCURI.cs @@ -34,7 +34,7 @@ public abstract class AbstractCURI : IEquatable /// /// /// - public abstract Task GetStream (); + public abstract Stream GetStream (); /// /// @@ -88,5 +88,10 @@ public static AbstractCURI Create (Uri uri) throw new UriFormatException($"No CURI factory is registered for URIs with scheme {uri.Host}: {uri}"); } + + public override string ToString () + { + return Uri.ToString(); + } } } diff --git a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs b/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs index c0debcc..ab45a52 100644 --- a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs +++ b/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs @@ -31,9 +31,17 @@ public override bool Equals (AbstractCURI? other) return other?.Uri?.Equals(Uri) ?? false; } - public override async Task GetStream () + public override Stream GetStream () { - return await Task.Run(() => File.OpenRead(AbsolutePath)); + try + { + return File.OpenRead(AbsolutePath); + } + catch (Exception ex) + { + Crimson.Panic($"{GetType().Name}: An error occurred while awaiting a read operation on {AbsolutePath}.", Crimson.PanicCode.CURI_STREAM, ex); + throw; + } } public class Factory : ICURIFactory diff --git a/Crimson/CSharp/Core/CURI/HttpCURI.cs b/Crimson/CSharp/Core/CURI/HttpCURI.cs index 2cd28f6..b2a53d8 100644 --- a/Crimson/CSharp/Core/CURI/HttpCURI.cs +++ b/Crimson/CSharp/Core/CURI/HttpCURI.cs @@ -21,12 +21,21 @@ public override bool Equals (AbstractCURI? other) return other?.Uri?.Equals(Uri) ?? false; } - public override async Task GetStream () + public override Stream GetStream () { - // New HTTP stuff - HttpClient client = new HttpClient(); - HttpResponseMessage httpResponse = await client.GetAsync(Uri); - return httpResponse.Content.ReadAsStream(); + try + { + // New HTTP stuff + HttpClient client = new HttpClient(); + Task responseTask = client.GetAsync(Uri); + responseTask.Wait(); + return responseTask.Result.Content.ReadAsStream(); + } + catch (Exception ex) + { + Crimson.Panic($"{GetType().Name}: An error occurred while fetching {Uri}.", Crimson.PanicCode.CURI_STREAM, ex); + throw; + } } public class Factory : ICURIFactory diff --git a/Crimson/CSharp/Core/CURI/NativeCURI.cs b/Crimson/CSharp/Core/CURI/NativeCURI.cs index 6996196..1713cc5 100644 --- a/Crimson/CSharp/Core/CURI/NativeCURI.cs +++ b/Crimson/CSharp/Core/CURI/NativeCURI.cs @@ -47,9 +47,17 @@ public override bool Equals (AbstractCURI? other) return other?.Uri?.Equals(Uri) ?? false; } - public override async Task GetStream () + public override Stream GetStream () { - return await Task.Run(() => File.OpenRead(AbsolutePath)); + try + { + return File.OpenRead(AbsolutePath); + } + catch (Exception ex) + { + Crimson.Panic($"{GetType().Name}: An error occurred while awaiting a read operation on {AbsolutePath}.", Crimson.PanicCode.CURI_STREAM, ex); + throw; + } } public class Factory : ICURIFactory diff --git a/Crimson/CSharp/Core/CURI/RelativeCURI.cs b/Crimson/CSharp/Core/CURI/RelativeCURI.cs index 5edc89f..b515062 100644 --- a/Crimson/CSharp/Core/CURI/RelativeCURI.cs +++ b/Crimson/CSharp/Core/CURI/RelativeCURI.cs @@ -49,9 +49,17 @@ public RelativeCURI (Uri uri) : base(uri) if (Path.IsPathRooted(abs)) throw new UriFormatException($"The path of a {GetType()} may not be rooted."); } - public override async Task GetStream () + public override Stream GetStream () { - return await Task.Run(() => File.OpenRead(AbsolutePath)); + try + { + return File.OpenRead(AbsolutePath); + } + catch (Exception ex) + { + Crimson.Panic($"{GetType().Name}: An error occurred while awaiting a read operation on {AbsolutePath}.", Crimson.PanicCode.CURI_STREAM, ex); + throw; + } } public class Factory : ICURIFactory diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 8ed92b3..ba16a66 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -38,8 +38,7 @@ public static int Main (string[] args) $"-s {CombineAndFormatPath(resourcesPath, "Test Compilations/main.crm")}", $"-t {CombineAndFormatPath(resourcesPath, "Test Compilations/result/main")}", $"-n {CombineAndFormatPath(resourcesPath, "Native Library/")}", - "-w", "4", - "--rfasm" + "-w", "4" }; Console.WriteLine(String.Join(' ', args)); @@ -47,19 +46,20 @@ public static int Main (string[] args) Console.WriteLine("Parsing Crimson options"); Options = CommandLine.Parser.Default.ParseArguments(args).Value; - if (Options == null) throw new NullReferenceException($"Unable to parse arguments {args}"); + if (Options == null) throw new NullReferenceException($"Unable to parse arguments {args}. See above message for details."); Console.WriteLine(" Option: SourceUri: " + Options.SourceCURI); Console.WriteLine(" Option: TargetUri: " + Options.TargetCURI); Console.WriteLine(" Option: NativeUri: " + Options.NativeCURI); Console.WriteLine(" Option: DumpIntermediates: " + Options.DumpIntermediates); Console.WriteLine(" Option: DataWidth: " + Options.DataWidth); - Console.WriteLine(" Option: (Platform) CrimsonBasic: " + Options.CrimsonBasic); - Console.WriteLine(" Option: (Platform) RFASM: " + Options.RFASM); // ConfigureNLog(); + // + ConfigureMultithreading(); + // Library generator = new Library(); Linker linker = new Linker(Options); @@ -135,6 +135,10 @@ private static void ConfigureNLog () Console.WriteLine("Did you see the TRACE and FATAL test messages?"); } + private static void ConfigureMultithreading () + { + } + private static readonly object panicLock = new object(); public static void Panic (string message, PanicCode code, Exception e) @@ -248,11 +252,15 @@ public enum PanicCode PARSE = -100, PARSE_STATEMENT = -110, PARSE_SCOPE = -120, + PARSE_SCOPE_ASYNC = -121, + PARSE_SCOPE_DEPS = -122, LINK = -200, GENERALISE = -300, SPECIALISE = -400, + CURI = -500, + CURI_STREAM = -510, } } } \ No newline at end of file diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/CrimsonCompiler.cs index e04d492..7392250 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/CrimsonCompiler.cs @@ -42,7 +42,7 @@ public async void FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" P A R S I N G "); - Scope rootScope = await Library.LoadScope(Options.SourceCURI); // Get the root unit (ie. main.crm) + Scope rootScope = Library.LoadScope(Options.SourceCURI); // Get the root unit (ie. main.crm) Compilation compilation = new Compilation(Library); // Generate dependency units (all resources are henceforth accessible) @@ -54,7 +54,7 @@ public async void FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" L I N K I N G "); - Linker.Link(compilation); + await Linker.Link(compilation); /* @@ -65,7 +65,7 @@ public async void FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" G E N E R A L I S I N G "); - GeneralAssemblyProgram generalProgram = Generaliser.Generalise(compilation); + GeneralAssemblyProgram generalProgram = await Generaliser.Generalise(compilation); LOGGER.Info("\n\n"); diff --git a/Crimson/CSharp/Core/CrimsonOptions.cs b/Crimson/CSharp/Core/CrimsonOptions.cs index 5f3de41..1b91c09 100644 --- a/Crimson/CSharp/Core/CrimsonOptions.cs +++ b/Crimson/CSharp/Core/CrimsonOptions.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -14,37 +15,29 @@ public class CrimsonOptions // Source [Option(longName: "source", shortName: 's', Required = true, HelpText = "Path to the root source file to translate. " + "If no file extension given, .crm will be assumed.")] - public AbstractCURI SourceCURI { get; private set; } - public void SetSourcePath (string path) => SourceCURI = AbstractCURI.Create(path); - public void SetSourcePath (AbstractCURI uri) => SourceCURI = uri; + public string? SourcePath { get; set; } + public AbstractCURI SourceCURI { get => AbstractCURI.Create(SourcePath!); } // Target [Option(longName: "target", shortName: 't', Required = false, HelpText = "Path to the desired target location or output file. " + "If no file extension provided, will assume .crm.")] - public AbstractCURI TargetCURI { get; private set; } - public void SetTargetPath (string path) => TargetCURI = AbstractCURI.Create(path); - public void SetTargetPath (AbstractCURI uri) => TargetCURI = uri; + public string? TargetPath { get; set; } + public AbstractCURI TargetCURI { get => AbstractCURI.Create(TargetPath!); } // Native library [Option(longName: "native", shortName: 'n', Required = false, HelpText = "Path to the native Crimson library. " + "If not provided, will use a packaged version. " + "If provided, but a required file is not found, the file will be created from the packaged library.")] - public AbstractCURI NativeCURI { get; private set; } - public void SetNativePath (string path) => NativeCURI = AbstractCURI.Create(path); - public void SetNativePath (AbstractCURI uri) => NativeCURI = uri; + public string? NativePath { get; set; } + public AbstractCURI NativeCURI { get => AbstractCURI.Create(NativePath!); } // Entry function - private string _entryFunctionName; [Option(longName: "entry", shortName: 'e', Required = false, HelpText = "The name of the function where execution should " + "start in the primary source file.", Default = "main")] - public string EntryFunctionName - { - get { return _entryFunctionName; } - set { _entryFunctionName = value; } - } + public string? EntryFunctionName { get; set; } // DumpIntermediates @@ -55,11 +48,5 @@ public string EntryFunctionName // DumpIntermediates [Option(longName: "datawidth", shortName: 'w', Required = true, HelpText = "The width of an integer, in bytes.")] public int DataWidth { get; set; } - - - // Targeted language - [Option(Group = "platform")] public bool CrimsonBasic { get; set; } - [Option(Group = "platform")] public bool RFASM { get; set; } - } } diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index fa07d3a..6c9f054 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -43,7 +43,7 @@ public Library () return GetScopeUnsafe(curi); } - public List GetScopes () + public async Task> GetScopes () { List scopes = new List(); @@ -55,14 +55,15 @@ public List GetScopes () if (task.Status == TaskStatus.Created) task.Start(); - if (!task.IsCompleted) + try { - // TODO freezing here - LOGGER.Debug("Waiting for async loading to finish before returning scope list..."); - task.Wait(); + scopes.Add(await task); + } + catch (Exception ex) + { + Crimson.Panic("Unable to GetScopes", Crimson.PanicCode.PARSE, ex); + throw; } - - scopes.Add(pair.Value.Result!); } return scopes; @@ -78,62 +79,84 @@ public void SetRootScope (Scope scope) Root = scope; } - public async Task LoadScope (AbstractCURI uri) + public Scope LoadScope (AbstractCURI uri) { - LOGGER.Info($"Loading scope from {uri}"); - - Stream source = await GetStreamOf(uri); - StreamReader reader = new StreamReader(source); - string text = reader.ReadToEnd(); + try + { + LOGGER.Info($"Loading scope from {uri}"); - Scope scope = ParseScopeText(uri, text); + Stream source = uri.GetStream(); + StreamReader reader = new StreamReader(source); + string text = reader.ReadToEnd(); + source.Close(); - LoadScopeDependencies(scope); + Scope scope = ParseScopeText(uri, text); - // Only runs once (for root) - if (Root == null) - { - SetRootScope(scope); + LoadScopeDependencies(scope); - bool waiting; - do + // Only runs once (for root) + if (Root == null) { - List waitingList = new List(); - foreach (var pair in Scopes) - { - if (pair.Value == null) waitingList.Add(pair.Key.ToString()); - } - - waiting = waitingList.Count > 0; + SetRootScope(scope); - if (waiting) - { - LOGGER.Info($"Waiting for: {String.Join(',', waitingList)}"); - Thread.Sleep(1000); - } - else + // Wait for dependencies to load + bool waiting; + do { - LOGGER.Info($"Finished loading root scope!"); - } + List waitingList = new List(); + foreach (var pair in Scopes) + { + if (pair.Value == null) waitingList.Add(pair.Key.ToString()); + } + + waiting = waitingList.Count > 0; + + if (waiting) + { + LOGGER.Info($"Waiting for: {String.Join(',', waitingList)}"); + Thread.Sleep(1000); + } + else + { + LOGGER.Info($"Finished loading root scope!"); + } + + } while (waiting); + } - } while (waiting); + // + return scope; + } + catch (Exception ex) + { + Crimson.Panic($"Error loading scope from {uri}", Crimson.PanicCode.PARSE_SCOPE, ex); + throw; } - - return scope; } - private async Task> LoadScopeAsync (AbstractCURI uri) + private Task GetScopeLoadingTask (AbstractCURI uri) { // Check if already loading/loaded and reserve key if not if (Scopes.ContainsKey(uri)) return Scopes[uri]; Scopes[uri] = null!; - // Generate task - Task task = await Task.Factory.StartNew(async () => + // Kept seperate for debugging purposes + Func?> func = async () => { - Thread.CurrentThread.Name = $"{Thread.CurrentThread.Name}_{uri.ToString()}"; - return await LoadScope(uri); - }); + try + { + Thread.CurrentThread.Name = $"{Thread.CurrentThread.Name}_{uri.ToString()}"; + return LoadScope(uri); + } + catch (Exception ex) + { + Crimson.Panic($"An error occurred while async loading {uri}", Crimson.PanicCode.PARSE_SCOPE_ASYNC, ex); + throw; + } + }; + + // Generate task + Task task = Task.Run(func); // Assign correct non-null task to key Scopes[uri] = task; @@ -152,7 +175,10 @@ public override string ToString () private Scope GetScopeUnsafe (AbstractCURI uri) { if (!Scopes.TryGetValue(uri, out Task? task)) + { + LOGGER.Error("UNSAFE NULL"); throw new ArgumentNullException("UNSAFE NULL"); + } if (!task.IsCompleted) { LOGGER.Debug($"Waiting for scope {uri} to finish loading..."); @@ -167,35 +193,43 @@ private Scope GetScopeUnsafe (AbstractCURI uri) /// Also checks for nested scopes and loads them as well! /// /// - private async void LoadScopeDependencies (Scope root) + private void LoadScopeDependencies (Scope root) { - List ongoingLoadingTasks = new List(); - - // Load each imported scope - // Queue loading of its dependencies (once it's loaded) - foreach (var i in root.Imports) + try { - if (Scopes.ContainsKey(i.Value.CURI)) + List ongoingLoadingTasks = new List(); + + // Load each imported scope + // Queue loading of its dependencies (once it's loaded) + foreach (var i in root.Imports) { - LOGGER.Debug($"Skipping duplicate loading of {i.Value.CURI}"); - continue; - } - LOGGER.Debug($"Trying to load {i.Value.CURI}"); + if (Scopes.ContainsKey(i.Value.CURI)) + { + LOGGER.Debug($"Skipping duplicate loading of {i.Value.CURI}"); + continue; + } + LOGGER.Debug($"Trying to load {i.Value.CURI}"); - Task scope = await LoadScopeAsync(i.Value.CURI); - Task dependencyTask = scope.ContinueWith(finishedTask => LoadScopeDependencies(finishedTask.Result)); + Task scope = GetScopeLoadingTask(i.Value.CURI); + Task dependencyTask = scope.ContinueWith(finishedTask => LoadScopeDependencies(finishedTask.Result)); - ongoingLoadingTasks.Add(dependencyTask); - } + ongoingLoadingTasks.Add(dependencyTask); + } - // Check for imports in nested scopes - foreach (var del in root.Delegates) - { - if (del.Invoke() is IHasScope hasScope) + // Check for imports in nested scopes + foreach (var del in root.Delegates) { - LoadScopeDependencies(hasScope.GetScope()); + if (del.Invoke() is IHasScope hasScope) + { + LoadScopeDependencies(hasScope.GetScope()); + } } } + catch (Exception ex) + { + Crimson.Panic($"Error loading scope dependencies for {root}", Crimson.PanicCode.PARSE_SCOPE_DEPS, ex); + throw; + } } private Scope ParseScopeText (AbstractCURI source, string textIn) @@ -203,24 +237,23 @@ private Scope ParseScopeText (AbstractCURI source, string textIn) try { LOGGER.Debug($"Parsing {textIn.Length} characters from {source} with ANTLR..."); + string sourceName = $"{source}"; // Get Antlr context AntlrInputStream a4is = new AntlrInputStream(textIn); + CrimsonLexer lexer = new CrimsonLexer(a4is); + lexer.AddErrorListener(new LexerErrorListener(sourceName)); + CommonTokenStream cts = new CommonTokenStream(lexer); CrimsonParser parser = new CrimsonParser(cts); - - string sourceName = $"{source}"; - - lexer.AddErrorListener(new LexerErrorListener(sourceName)); - parser.ErrorHandler = new ParserErrorStrategy(sourceName); + parser.AddErrorListener(new ParserErrorListener(sourceName)); CrimsonParser.ScopeContext cuCtx = parser.scope(); ScopeVisitor visitor = new ScopeVisitor(); - Scope scope = visitor.VisitScope(cuCtx); + Scope scope = visitor.VisitScope(cuCtx); scope.CURI = source; - return scope; } catch (Exception ex) @@ -229,18 +262,5 @@ private Scope ParseScopeText (AbstractCURI source, string textIn) throw; } } - - private async Task GetStreamOf (AbstractCURI uri) - { - try - { - return await uri.GetStream(); - } - catch (Exception e) - { - Crimson.Panic($"An error occurred obtaining a stream of the resource at the URI {uri}", Crimson.PanicCode.PARSE, e); - throw; - } - } } } diff --git a/Crimson/CSharp/Exceptions/CrimsonAntlrTextWriter.cs b/Crimson/CSharp/Exceptions/CrimsonAntlrTextWriter.cs deleted file mode 100644 index 0556656..0000000 --- a/Crimson/CSharp/Exceptions/CrimsonAntlrTextWriter.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Exceptions -{ - internal class CrimsonAntlrTextWriter : TextWriter - { - public override Encoding Encoding => Encoding.UTF8; - } -} diff --git a/Crimson/CSharp/Exceptions/ExceptionCrimsonException.cs b/Crimson/CSharp/Exceptions/ExceptionCrimsonException.cs deleted file mode 100644 index 24de42e..0000000 --- a/Crimson/CSharp/Exceptions/ExceptionCrimsonException.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Crimson.CSharp.Exceptions; -using NLog; - -namespace Crimson.CSharp.Core -{ - internal class ExceptionCrimsonException : CrimsonException - { - public string ErrMessage { get; } - public Exception E { get; } - - public ExceptionCrimsonException (string message, Crimson.PanicCode code, Exception e) : base(code) - { - ErrMessage = message; - E = e; - } - - public override IList GetDetailedMessage () - { - List message = new List - { - $"This is an automatically generated error-message. An unexpected non-{typeof(CrimsonException)} has occurred. Details may be limited.", - $"Please report this error to the maintainer of this software, including logs, system details, .NET version and any other relevant information." - }; - - // - if (String.IsNullOrWhiteSpace(ErrMessage)) - message.Add("No unique error message given."); - else - message.Add(ErrMessage); - - // - if (E == null) - message.Add("No exception details provided."); - else - message.AddRange(E.ToString().Split(Environment.NewLine)); - - // - return message; - } - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Exceptions/LexerErrorListener.cs b/Crimson/CSharp/Exceptions/LexerErrorListener.cs index ec57fd5..d233937 100644 --- a/Crimson/CSharp/Exceptions/LexerErrorListener.cs +++ b/Crimson/CSharp/Exceptions/LexerErrorListener.cs @@ -13,11 +13,9 @@ public LexerErrorListener (string name) Name = name; } - void IAntlrErrorListener.SyntaxError (TextWriter output, IRecognizer recognizer, int offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) + public void SyntaxError (TextWriter output, IRecognizer recognizer, int offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) { - string message = $"Lexer error lexing {Name} @ line:{line} char:{charPositionInLine} msg:{msg}"; - LOGGER.Error(message); - throw new LexerException(message, e); + Core.Crimson.Panic($"A lexer error has occurred lexing {Name}", Core.Crimson.PanicCode.PARSE, null!); } } } diff --git a/Crimson/CSharp/Exceptions/LexerException.cs b/Crimson/CSharp/Exceptions/LexerException.cs deleted file mode 100644 index 22b92fa..0000000 --- a/Crimson/CSharp/Exceptions/LexerException.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Exceptions -{ - internal class LexerException : ArgumentException - { - public LexerException (string message) : base(message) - { - - } - - public LexerException (string message, Exception cause) : base(message, cause) - { - - } - } -} diff --git a/Crimson/CSharp/Exceptions/ParserErrorListener.cs b/Crimson/CSharp/Exceptions/ParserErrorListener.cs new file mode 100644 index 0000000..0461668 --- /dev/null +++ b/Crimson/CSharp/Exceptions/ParserErrorListener.cs @@ -0,0 +1,21 @@ +using Antlr4.Runtime; +using NLog; + +namespace Crimson.CSharp.Exceptions +{ + internal class ParserErrorListener : IAntlrErrorListener + { + public static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); + + private string Name { get; set; } + public ParserErrorListener (string name) + { + Name = name; + } + + public void SyntaxError (TextWriter output, IRecognizer recognizer, IToken offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) + { + Core.Crimson.Panic($"A parser error has occurred parsing {Name}", Core.Crimson.PanicCode.PARSE, null!); + } + } +} diff --git a/Crimson/CSharp/Exceptions/ParserErrorStrategy.cs b/Crimson/CSharp/Exceptions/ParserErrorStrategy.cs deleted file mode 100644 index 10a9443..0000000 --- a/Crimson/CSharp/Exceptions/ParserErrorStrategy.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Antlr4.Runtime; -using NLog; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Exceptions -{ - internal class ParserErrorStrategy : DefaultErrorStrategy - { - private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - - private string Path { get; set; } - public ParserErrorStrategy (string path) - { - Path = path; - } - - public override void ReportError (Parser recognizer, RecognitionException e) - { - base.ReportError(recognizer, e); - throw new CrimsonParserException("CRIMSON PARSER EXCEPTION"); - } - } -} diff --git a/Crimson/CSharp/Generalising/Generaliser.cs b/Crimson/CSharp/Generalising/Generaliser.cs index 6bdd4a0..a39b3ca 100644 --- a/Crimson/CSharp/Generalising/Generaliser.cs +++ b/Crimson/CSharp/Generalising/Generaliser.cs @@ -14,7 +14,7 @@ internal class Generaliser { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - public GeneralAssemblyProgram Generalise (Compilation compilation) + public async Task Generalise (Compilation compilation) { GeneralAssemblyProgram program = new GeneralAssemblyProgram(); @@ -27,7 +27,7 @@ public GeneralAssemblyProgram Generalise (Compilation compilation) * These have already been dynamically mapped (they know which singletons each call refers to). * During collection, these values are reassigned names (which are globally updated) to avoid name clashes. */ - foreach (Scope scope in compilation.Library.GetScopes()) + foreach (Scope scope in await compilation.Library.GetScopes()) { foreach (var f in scope.Functions) { diff --git a/Crimson/CSharp/Linking/Linker.cs b/Crimson/CSharp/Linking/Linker.cs index 594da24..2695a87 100644 --- a/Crimson/CSharp/Linking/Linker.cs +++ b/Crimson/CSharp/Linking/Linker.cs @@ -24,12 +24,12 @@ public Linker (CrimsonOptions options) /// Links the FunctionCalls in a Compilation. /// /// - public void Link (Compilation compilation) + public async Task Link (Compilation compilation) { LOGGER.Info("Linking compilation " + compilation); // Iterate through each relevant unit - foreach (Scope scope in compilation.Library.GetScopes()) + foreach (Scope scope in await compilation.Library.GetScopes()) { LOGGER.Info("Linking " + scope); From b829e34376b2cc8bad9543515eda029b97681dfc Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Mon, 10 Apr 2023 21:13:56 +0100 Subject: [PATCH 069/122] Logging updates for asynchronous work --- Crimson/CSharp/Core/Crimson.cs | 2 +- Crimson/CSharp/Core/Library.cs | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index ba16a66..5b17c97 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -120,7 +120,7 @@ private static void ConfigureNLog () }; var consoleTarget = new NLog.Targets.ConsoleTarget("CrimsonConsoleLogTarget") { - Layout = "${level:uppercase=true:padding=-10} | ${time} | ${threadname:whenEmpty=${threadid}:padding=-5} | ${logger} > ${message:withexception=true}" + Layout = "${level:uppercase=true:padding=-5} | ${time} | ${threadname:whenEmpty=${threadid}:padding=-6} | ${logger} > ${message:withexception=true}" }; config.AddRule(LogLevel.Trace, LogLevel.Fatal, fileTarget); config.AddRule(LogLevel.Trace, LogLevel.Fatal, consoleTarget); diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index 6c9f054..d0e2ec7 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -19,6 +19,27 @@ public class Library { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); + private static int _loaderIdCounter = 0; + private static object _loaderLock = new object(); + public static int LoaderId + { + get + { + lock (_loaderLock) + { + return _loaderIdCounter; + } + } + + set + { + lock (_loaderLock) + { + _loaderIdCounter = value; + } + } + } + /// /// The "master" list of units. Stored so that each unique unit is only created once. /// @@ -145,7 +166,9 @@ private Task GetScopeLoadingTask (AbstractCURI uri) { try { - Thread.CurrentThread.Name = $"{Thread.CurrentThread.Name}_{uri.ToString()}"; + int id = LoaderId++; + LOGGER.Info($"Delegating loading of {uri} to worker [{id}]"); + Thread.CurrentThread.Name = $"CrimsonScopeLoaderWorker[{id}]"; return LoadScope(uri); } catch (Exception ex) @@ -201,6 +224,7 @@ private void LoadScopeDependencies (Scope root) // Load each imported scope // Queue loading of its dependencies (once it's loaded) + LOGGER.Debug($"Dependencies for {root} are {String.Join(", ", root.Imports.Values.Select((i) => $"'{i.CURI}'"))}"); foreach (var i in root.Imports) { if (Scopes.ContainsKey(i.Value.CURI)) @@ -208,7 +232,6 @@ private void LoadScopeDependencies (Scope root) LOGGER.Debug($"Skipping duplicate loading of {i.Value.CURI}"); continue; } - LOGGER.Debug($"Trying to load {i.Value.CURI}"); Task scope = GetScopeLoadingTask(i.Value.CURI); Task dependencyTask = scope.ContinueWith(finishedTask => LoadScopeDependencies(finishedTask.Result)); From 9e7b673b0eced1cf033e3fa2705aca9dad884775 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 11 Apr 2023 12:21:25 +0100 Subject: [PATCH 070/122] Starting caching --- Crimson/CSharp/Core/CURI/AbstractCURI.cs | 5 +- Crimson/CSharp/Core/CURI/NativeCURI.cs | 2 +- Crimson/CSharp/Core/CURI/RelativeCURI.cs | 2 +- Crimson/CSharp/Core/Cache.cs | 212 ++++++++++++++++ Crimson/CSharp/Core/Compilation.cs | 4 +- .../Core/{CrimsonCompiler.cs => Compiler.cs} | 38 ++- Crimson/CSharp/Core/Crimson.cs | 240 +++++++++++++----- Crimson/CSharp/Core/CrimsonOptions.cs | 171 +++++++++++-- Crimson/CSharp/Core/Library.cs | 10 +- .../CSharp/Exceptions/LexerErrorListener.cs | 2 +- .../CSharp/Exceptions/ParserErrorListener.cs | 2 +- .../CSharp/Exceptions/ParsingExceptions.cs | 6 +- Crimson/CSharp/Linking/Linker.cs | 6 - Crimson/CSharp/Parsing/ScopeVisitor.cs | 2 +- 14 files changed, 571 insertions(+), 131 deletions(-) create mode 100644 Crimson/CSharp/Core/Cache.cs rename Crimson/CSharp/Core/{CrimsonCompiler.cs => Compiler.cs} (77%) diff --git a/Crimson/CSharp/Core/CURI/AbstractCURI.cs b/Crimson/CSharp/Core/CURI/AbstractCURI.cs index 1cc34df..e395fdf 100644 --- a/Crimson/CSharp/Core/CURI/AbstractCURI.cs +++ b/Crimson/CSharp/Core/CURI/AbstractCURI.cs @@ -69,8 +69,11 @@ public abstract class AbstractCURI : IEquatable { RelativeCURI.SCHEME, new RelativeCURI.Factory() } }; - public static AbstractCURI Create (string uriText) + public static AbstractCURI? Create (string uriText) { + if (String.IsNullOrWhiteSpace(uriText)) + return null; + string trimmedText = uriText.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); if (Uri.TryCreate(trimmedText, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out Uri? uri)) diff --git a/Crimson/CSharp/Core/CURI/NativeCURI.cs b/Crimson/CSharp/Core/CURI/NativeCURI.cs index 1713cc5..6d08888 100644 --- a/Crimson/CSharp/Core/CURI/NativeCURI.cs +++ b/Crimson/CSharp/Core/CURI/NativeCURI.cs @@ -27,7 +27,7 @@ public string AbsolutePath { get { - string native = WebUtility.UrlDecode(Crimson.Options.NativeCURI.Uri.AbsolutePath); + string native = WebUtility.UrlDecode(Compiler.Options?.NativeCURI.Uri.AbsolutePath); string abs = WebUtility.UrlDecode(Uri.AbsolutePath); diff --git a/Crimson/CSharp/Core/CURI/RelativeCURI.cs b/Crimson/CSharp/Core/CURI/RelativeCURI.cs index b515062..69f78dd 100644 --- a/Crimson/CSharp/Core/CURI/RelativeCURI.cs +++ b/Crimson/CSharp/Core/CURI/RelativeCURI.cs @@ -26,7 +26,7 @@ public string AbsolutePath { get { - string source = WebUtility.UrlDecode(Crimson.Options.NativeCURI.Uri.AbsolutePath); + string source = WebUtility.UrlDecode(Compiler.Options.SourceCURI.Uri.AbsolutePath); string? dir = Path.GetDirectoryName(source); string uri = WebUtility.UrlDecode(Uri.AbsolutePath); diff --git a/Crimson/CSharp/Core/Cache.cs b/Crimson/CSharp/Core/Cache.cs new file mode 100644 index 0000000..f2ebe4e --- /dev/null +++ b/Crimson/CSharp/Core/Cache.cs @@ -0,0 +1,212 @@ +using Crimson.CSharp.Core.CURI; +using NLog; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; + +namespace Crimson.CSharp.Core +{ + public class Cache + { + private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); + public static FileInfo CACHE_ROOT { get; private set; } = Crimson.GetRoamingFile("cache/"); + public static FileInfo INDEX { get; private set; } = Crimson.GetRoamingFile("cache/index.json"); + + public static CacheIndex Index { get; private set; } + public class CacheIndex + { + public DateTime CreatedTime { get; set; } + public Dictionary Contents { get; set; } + } + public class IndexEntry + { + public DateTime InstalledTime { get; set; } + public DateTime ModifiedTime { get; set; } + } + + static Cache () + { + try + { + Index = ReadIndex(); + } + catch (Exception ex) + { + Crimson.Panic("Unable to static-construct cache!", Crimson.PanicCode.CACHE, ex); + throw; + } + } + + private static void CreateIndexIfNotPresent () + { + INDEX.Refresh(); + + if (!INDEX.Exists) + { + string parent = Path.GetDirectoryName(INDEX.FullName)!; + _ = Directory.CreateDirectory(parent); + } + + string contents = ""; + using (FileStream readStream = INDEX.Open(FileMode.OpenOrCreate, FileAccess.Read)) + { + StreamReader reader = new StreamReader(readStream); + contents = reader.ReadToEnd(); + } + + if (String.IsNullOrWhiteSpace(contents)) + { + using (FileStream writeStream = INDEX.Open(FileMode.OpenOrCreate, FileAccess.Write)) + { + Index = new CacheIndex + { + CreatedTime = DateTime.Now, + Contents = new Dictionary() + }; + JsonSerializer.Serialize(writeStream, Index); + } + } + + INDEX.Refresh(); + } + + private static CacheIndex? ReadIndex () + { + CacheIndex? index; + try + { + CreateIndexIfNotPresent(); + using (FileStream stream = INDEX.Open(FileMode.OpenOrCreate, FileAccess.ReadWrite)) + { + index = JsonSerializer.Deserialize(stream); + } + } + catch (Exception ex) + { + Crimson.Panic($"Unable to deserialise cache index {INDEX}", Crimson.PanicCode.CACHE_JSON, ex); + throw; + } + return index; + } + + private static void WriteIndex () + { + try + { + CreateIndexIfNotPresent(); + using (FileStream stream = INDEX.Open(FileMode.OpenOrCreate, FileAccess.ReadWrite)) + { + string data = JsonSerializer.Serialize(Index, new JsonSerializerOptions { WriteIndented = true }); + StreamWriter writer = new StreamWriter(stream); + writer.Write(data); + } + } + catch (Exception ex) + { + Crimson.Panic($"Unable to write to cache index {INDEX}", Crimson.PanicCode.CACHE_JSON, ex); + throw; + } + return; + } + + private static void Fetch (AbstractCURI curi, bool overwrite) + { + try + { + string data; + using (Stream readStream = curi.GetStream()) + { + StreamReader reader = new StreamReader(readStream); + data = reader.ReadToEnd(); + } + Add(curi, data); + } + catch (Exception ex) + { + Crimson.Panic($"Error fetching {curi}", Crimson.PanicCode.CACHE_FETCH, ex); + throw; + } + } + + private static void Add (AbstractCURI curi, string data) + { + try + { + string path = GetLocalCachePath(curi); + _ = Directory.CreateDirectory(Path.GetDirectoryName(path)!); + using (Stream writeStream = Crimson.GetRoamingFile($"cache/{path}").Open(FileMode.OpenOrCreate, FileAccess.Write)) + { + StreamWriter writer = new StreamWriter(writeStream); + writer.Write(data); + } + + IndexEntry? entry = Index.Contents!.GetValueOrDefault(path, null) ?? new IndexEntry(); + entry.ModifiedTime = DateTime.Now; + + Index.Contents[path] = entry; + WriteIndex(); + } + catch (Exception ex) + { + Crimson.Panic($"Error adding {curi}", Crimson.PanicCode.CACHE_ADD, ex); + throw; + } + } + + private static string GetLocalCachePath (AbstractCURI curi) + { + return $"{curi.Uri.Scheme}/{curi.Uri.LocalPath}"; + } + + // =========== API =========== + public static void Clear (ClearMode clearMode) + { + throw new NotImplementedException(); + } + + public static void Install (AbstractCURI sourceCURI, bool forceRefreshCache) + { + throw new NotImplementedException(); + } + + public static void Refresh (AbstractCURI? sourceCURI, bool all = false) + { + if (all) + { + LOGGER.Info($"Refreshing all {Index.Contents.Count} indexed CURIs..."); + foreach (var pair in Index.Contents) + { + AbstractCURI? curi = AbstractCURI.Create(pair.Key); + Refresh(curi); + } + LOGGER.Info("Refresh complete."); + } + else if (sourceCURI != null) + { + LOGGER.Info($"Refreshing {sourceCURI}..."); + Fetch(sourceCURI, true); + LOGGER.Info($"Done!"); + } + else + { + LOGGER.Error("'--all' is false and the source CURI is null. Refresh failed."); + } + } + + public static void Info (AbstractCURI sourceCURI) + { + throw new NotImplementedException(); + } + + public enum ClearMode + { + ERASE, + INDEXED, + DIRECTORIES + } + } +} diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/CSharp/Core/Compilation.cs index 3407b1a..9149ccd 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/CSharp/Core/Compilation.cs @@ -35,7 +35,7 @@ public override string ToString () public FunctionCStatement GetEntryFunction () { - string baseName = Core.Crimson.Options.EntryFunctionName; + string baseName = Compiler.Options!.EntryFunctionName!; Scope rootUnit = Library.Root!; string pattern = $"^func_{baseName}_[0-9]+$"; // Match name_090923 (anchored to start and end) Regex regex = new Regex(pattern); @@ -43,7 +43,7 @@ public FunctionCStatement GetEntryFunction () IList funcs = rootUnit.Functions.Values.Where(func => regex.IsMatch(func.Name.ToString())).ToList(); if (funcs.Count == 0) { - throw new GeneralisingException($"No valid entry function found. Invalid contenders were: [{string.Join(',', rootUnit.Functions.Values.Select(f => f.Name))}]. Searched for Crimson name '{Core.Crimson.Options.EntryFunctionName}' using Regex: '{pattern}'."); + throw new GeneralisingException($"No valid entry function found. Invalid contenders were: [{string.Join(',', rootUnit.Functions.Values.Select(f => f.Name))}]. Searched for Crimson name '{Compiler.Options.EntryFunctionName}' using Regex: '{pattern}'."); } else if (funcs.Count == 1) { diff --git a/Crimson/CSharp/Core/CrimsonCompiler.cs b/Crimson/CSharp/Core/Compiler.cs similarity index 77% rename from Crimson/CSharp/Core/CrimsonCompiler.cs rename to Crimson/CSharp/Core/Compiler.cs index 7392250..0c8c605 100644 --- a/Crimson/CSharp/Core/CrimsonCompiler.cs +++ b/Crimson/CSharp/Core/Compiler.cs @@ -10,28 +10,20 @@ namespace Crimson.CSharp.Core /// /// The root of all compilation. Initiates and delegates tasks for the compilation process. /// - internal class CrimsonCompiler + internal class Compiler { private static Logger LOGGER = LogManager.GetCurrentClassLogger(); - public CrimsonOptions Options { get; } - public Library Library { get; } - public Linker Linker { get; } - public Generaliser Generaliser { get; } - public ISpecialiser Specialiser { get; } - public CrimsonCompiler (CrimsonOptions options, Library unitGenerator, Linker linker, Generaliser generaliser, ISpecialiser flattener) - { - Options = options; - Library = unitGenerator; - Linker = linker; - Generaliser = generaliser; - Specialiser = flattener; - } + public static CrimsonOptions.Compile? Options { get; private set; } = null; - public async void FullyCompileFromOptions () + private Compiler () { } + + public static async void Compile (CrimsonOptions.Compile options, Library library, Linker linker, Generaliser generaliser, ISpecialiser flattener) { try { + Options = options; + /* * == PARSING STAGE == * @@ -42,8 +34,8 @@ public async void FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" P A R S I N G "); - Scope rootScope = Library.LoadScope(Options.SourceCURI); // Get the root unit (ie. main.crm) - Compilation compilation = new Compilation(Library); // Generate dependency units (all resources are henceforth accessible) + Scope rootScope = library.LoadScope(Options.SourceCURI); // Get the root unit (ie. main.crm) + Compilation compilation = new Compilation(library); // Generate dependency units (all resources are henceforth accessible) /* @@ -54,7 +46,7 @@ public async void FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" L I N K I N G "); - await Linker.Link(compilation); + await linker.Link(compilation); /* @@ -65,7 +57,7 @@ public async void FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" G E N E R A L I S I N G "); - GeneralAssemblyProgram generalProgram = await Generaliser.Generalise(compilation); + GeneralAssemblyProgram generalProgram = await generaliser.Generalise(compilation); LOGGER.Info("\n\n"); @@ -79,7 +71,7 @@ public async void FullyCompileFromOptions () */ LOGGER.Info("\n\n"); LOGGER.Info(" S P E C I A L I S I N G "); - AbstractSpecificAssemblyProgram specialisedProgram = Specialiser.Specialise(generalProgram); + AbstractSpecificAssemblyProgram specialisedProgram = flattener.Specialise(generalProgram); /* * == CLEANUP == @@ -92,12 +84,12 @@ public async void FullyCompileFromOptions () } catch (Exception e) { - Crimson.Panic("An uncaught exception occurred during the compilation process.", Crimson.PanicCode.PARSE, e); + Crimson.Panic("An uncaught exception occurred during the compilation process.", Crimson.PanicCode.COMPILE_PARSE, e); throw; } } - private void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram specialisedProgram) + private static void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram specialisedProgram) { if (Options.DumpIntermediates) { @@ -111,7 +103,7 @@ private void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram specialised } } - private void DumpGeneralisedProgram (GeneralAssemblyProgram generalProgram) + private static void DumpGeneralisedProgram (GeneralAssemblyProgram generalProgram) { if (Options.DumpIntermediates) { diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 5b17c97..d9e98af 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -1,85 +1,113 @@ using NLog; +using Crimson.CSharp.Core; using Crimson.CSharp.Linking; using Crimson.CSharp.Specialising; using Crimson.CSharp.Specialising.RFASM; using Crimson.CSharp.Generalising; using Crimson.CSharp.Exceptions; using System.Globalization; +using CommandLine; +using System.Reflection; +using System.Runtime.Intrinsics.X86; +using Antlr4.Runtime.Misc; namespace Crimson.CSharp.Core { internal class Crimson { - private static Logger? LOGGER; - internal static readonly string VERSION = "v0.0"; - public static CrimsonOptions Options { get; private set; } - public static CrimsonCompiler Compiler { get; private set; } - - public const int ERROR_UNKNOWN = -100; + public static readonly string VERSION = "v0.0"; public static int Main (string[] args) { - Thread.CurrentThread.Name = "main"; - - // Start - ShowSplash(); - ShowCredits(); - - // Setup arguments - string CombineAndFormatPath (string a, string b) => Path.GetFullPath(Path.Combine(a, b)); - bool useAutowiredArgs = true; - if (useAutowiredArgs) + try { - Console.WriteLine("Using autowired (debug) program arguments"); - string resourcesPath = "Resources/"; // Escape bin, Debug, and net6.0 - - args = new string[] { - $"-s {CombineAndFormatPath(resourcesPath, "Test Compilations/main.crm")}", - $"-t {CombineAndFormatPath(resourcesPath, "Test Compilations/result/main")}", - $"-n {CombineAndFormatPath(resourcesPath, "Native Library/")}", - "-w", "4" - }; + Thread.CurrentThread.Name = "main"; + + // Start + ShowSplash(); + ShowCredits(); + // Setup arguments + bool useAutowiredArgs = true; + args = useAutowiredArgs ? GetTestArguments() : args; Console.WriteLine(String.Join(' ', args)); + + // + ConfigureNLog(); + + // + ConfigureMultithreading(); + + LOGGER!.Info("Parsing input arguments!"); + var verbs = Assembly.GetExecutingAssembly().GetTypes().Where(t => t.GetCustomAttribute() != null).ToArray(); + var result = Parser.Default.ParseArguments< + CrimsonOptions.Compile, + CrimsonOptions.Clear, + CrimsonOptions.Install, + CrimsonOptions.Refresh + >(args) + .WithParsed(options => Compile(options)) + .WithParsed(options => Install(options)) + .WithParsed(options => Clear(options)) + .WithParsed(options => Refresh(options)); + } + catch (Exception ex) + { + Crimson.Panic("An uncaught error occurred during program execution.", PanicCode.ARGUMENTS, ex); + throw; } + return 0; + } - Console.WriteLine("Parsing Crimson options"); - Options = CommandLine.Parser.Default.ParseArguments(args).Value; - if (Options == null) throw new NullReferenceException($"Unable to parse arguments {args}. See above message for details."); - Console.WriteLine(" Option: SourceUri: " + Options.SourceCURI); - Console.WriteLine(" Option: TargetUri: " + Options.TargetCURI); - Console.WriteLine(" Option: NativeUri: " + Options.NativeCURI); - Console.WriteLine(" Option: DumpIntermediates: " + Options.DumpIntermediates); - Console.WriteLine(" Option: DataWidth: " + Options.DataWidth); + // ================= STARTUP ================= - // - ConfigureNLog(); + private static string[] GetTestArguments () + { + Console.WriteLine("OVERRIDING INPUT ARGUMENTS FOR TESTING"); - // - ConfigureMultithreading(); + bool COMPILE = false; + if (COMPILE) + { + return new string[] { + $"compile", + $"-s Resources/Test Compilations/main.crm", + $"-t Resources/Test Compilations/result/main", + $"-n Resources/Native Library/", + $"-w 4" + }; + } - // - Library generator = new Library(); - Linker linker = new Linker(Options); - Generaliser generaliser = new Generaliser(); - ISpecialiser specialiser = new RFASMSpecialiser(); //TODO Don't default to RFASM - Compiler = new CrimsonCompiler(Options, generator, linker, generaliser, specialiser); + bool INSTALL = false; + if (INSTALL) + { + return new string[] { + $"install" + }; + } - try + bool CLEAR = false; + if (CLEAR) { - Compiler.FullyCompileFromOptions(); + return new string[] { + $"clear" + }; } - catch (System.Exception e) + + bool REFRESH = true; + if (REFRESH) { - Console.WriteLine(e); - LOGGER!.Error(e); - return ERROR_UNKNOWN; + return new string[] { + $"refresh", + $"-a" + }; } - return 0; + + return null!; } + private static void ShowSplash () { Console.WriteLine(""); @@ -139,6 +167,87 @@ private static void ConfigureMultithreading () { } + // + + public static FileInfo GetRoamingFile (string path) + { + string roaming = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); + string relative = $"Crimson/{path}"; + string full = Path.Combine(roaming, relative); + return new FileInfo(full); + } + + + // ================= VERBS ================= + + + private static void Compile (CrimsonOptions.Compile options) + { + try + { + Console.WriteLine(" Compile: SourceUri: " + options.SourceCURI); + Console.WriteLine(" Compile: TargetUri: " + options.TargetCURI); + Console.WriteLine(" Compile: NativeUri: " + options.NativeCURI); + Console.WriteLine(" Compile: DumpIntermediates: " + options.DumpIntermediates); + Console.WriteLine(" Compile: DataWidth: " + options.DataWidth); + + Library generator = new Library(); + Linker linker = new Linker(); + Generaliser generaliser = new Generaliser(); + ISpecialiser specialiser = new RFASMSpecialiser(); //TODO Don't default specialiser to RFASM + + Compiler.Compile(options, generator, linker, generaliser, specialiser); + } + catch (Exception ex) + { + Crimson.Panic("Error executing verb 'compile'.", PanicCode.COMPILE, ex); + throw; + } + } + + private static void Install (CrimsonOptions.Install options) + { + try + { + Cache.Install(options.SourceCURI, options.ForceRefreshCache); + } + catch (Exception ex) + { + Crimson.Panic("Error executing verb 'install'.", PanicCode.CACHE_INSTALL, ex); + throw; + } + } + + private static void Clear (CrimsonOptions.Clear options) + { + try + { + Cache.Clear(options.ClearMode); + } + catch (Exception ex) + { + Crimson.Panic("Error executing verb 'clear'.", PanicCode.CACHE_CLEAR, ex); + throw; + } + } + + private static void Refresh (CrimsonOptions.Refresh options) + { + try + { + Cache.Refresh(options.SourceCURI, options.All); + } + catch (Exception ex) + { + Crimson.Panic("Error executing verb 'clear'.", PanicCode.CACHE_CLEAR, ex); + throw; + } + } + + + // ================= PANIC ================= + + private static readonly object panicLock = new object(); public static void Panic (string message, PanicCode code, Exception e) @@ -248,19 +357,30 @@ private static string GetPanicRemark () public enum PanicCode { OK_OR_NONE = 0, + ARGUMENTS = -10, - PARSE = -100, - PARSE_STATEMENT = -110, - PARSE_SCOPE = -120, - PARSE_SCOPE_ASYNC = -121, - PARSE_SCOPE_DEPS = -122, + // CURI + CURI = -100, + CURI_STREAM = -110, - LINK = -200, - GENERALISE = -300, - SPECIALISE = -400, + // Compile + COMPILE = -1000, + COMPILE_PARSE = -1100, + COMPILE_PARSE_STATEMENT = -1110, + COMPILE_PARSE_SCOPE = -1120, + COMPILE_PARSE_SCOPE_ASYNC = -1121, + COMPILE_PARSE_SCOPE_DEPS = -1122, + COMPILE_LINK = -1200, + COMPILE_GENERALISE = -1300, + COMPILE_SPECIALISE = -1400, - CURI = -500, - CURI_STREAM = -510, + // Cache + CACHE = -2000, + CACHE_JSON = -2010, + CACHE_FETCH = -2020, + CACHE_ADD = -2021, + CACHE_INSTALL = -2100, + CACHE_CLEAR = -2200, } } } \ No newline at end of file diff --git a/Crimson/CSharp/Core/CrimsonOptions.cs b/Crimson/CSharp/Core/CrimsonOptions.cs index 1b91c09..e1d90b5 100644 --- a/Crimson/CSharp/Core/CrimsonOptions.cs +++ b/Crimson/CSharp/Core/CrimsonOptions.cs @@ -12,41 +12,160 @@ namespace Crimson.CSharp.Core { public class CrimsonOptions { - // Source - [Option(longName: "source", shortName: 's', Required = true, HelpText = "Path to the root source file to translate. " + - "If no file extension given, .crm will be assumed.")] - public string? SourcePath { get; set; } - public AbstractCURI SourceCURI { get => AbstractCURI.Create(SourcePath!); } + /// + /// + /// + [Verb(name: "compile", isDefault: false, aliases: null, Hidden = false, + HelpText = "Compile a source file into assembly.")] + public class Compile + { + // Source + [Option(longName: "source", shortName: 's', + Required = true, + HelpText = "Path to the root source file to translate. " + + "If no file extension given, .crm will be assumed.")] + public string SourcePath { get; set; } + public AbstractCURI SourceCURI { get => AbstractCURI.Create(SourcePath!); } - // Target - [Option(longName: "target", shortName: 't', Required = false, HelpText = "Path to the desired target location or output file. " + - "If no file extension provided, will assume .crm.")] - public string? TargetPath { get; set; } - public AbstractCURI TargetCURI { get => AbstractCURI.Create(TargetPath!); } + // Target + [Option(longName: "target", shortName: 't', + Required = false, + HelpText = "Path to the desired target location or output file. " + + "If no file extension provided, will assume .crm.")] + public string? TargetPath { get; set; } + public AbstractCURI TargetCURI { get => AbstractCURI.Create(TargetPath!); } - // Native library - [Option(longName: "native", shortName: 'n', Required = false, HelpText = "Path to the native Crimson library. " + - "If not provided, will use a packaged version. " + - "If provided, but a required file is not found, the file will be created from the packaged library.")] - public string? NativePath { get; set; } - public AbstractCURI NativeCURI { get => AbstractCURI.Create(NativePath!); } + // Native library + [Option(longName: "native", shortName: 'n', + Required = false, + HelpText = "Path to the native Crimson library. " + + "If not provided, will use a packaged version. " + + "If provided, but a required file is not found, the file will be created from the packaged library.")] + public string? NativePath { get; set; } + public AbstractCURI NativeCURI { get => AbstractCURI.Create(NativePath!); } - // Entry function - [Option(longName: "entry", shortName: 'e', Required = false, HelpText = "The name of the function where execution should " + - "start in the primary source file.", Default = "main")] - public string? EntryFunctionName { get; set; } + // Entry function + [Option(longName: "entry", shortName: 'e', + Required = false, Default = "main", + HelpText = "The name of the function where execution should " + + "start in the primary source file.")] + public string EntryFunctionName { get; set; } - // DumpIntermediates - [Option(longName: "clean", shortName: 'c', Required = false, Default = true, HelpText = "Should the compiler clean up its temporary files?")] - public bool DumpIntermediates { get; set; } + // DumpIntermediates + [Option(longName: "clean", shortName: 'c', + Required = false, Default = true, + HelpText = "Should the compiler clean up its temporary files?")] + public bool DumpIntermediates { get; set; } - // DumpIntermediates - [Option(longName: "datawidth", shortName: 'w', Required = true, HelpText = "The width of an integer, in bytes.")] - public int DataWidth { get; set; } + + // DumpIntermediates + [Option(longName: "datawidth", shortName: 'w', + Required = true, + HelpText = "The width of an integer, in bytes.")] + public int DataWidth { get; set; } + + + // Cache + [Option(longName: "usecache", shortName: 'c', + SetName = "togglecache", + Required = false, Default = true, + HelpText = "The width of an integer, in bytes.")] + public bool UseCache { get; set; } + + [Option(longName: "refresh", shortName: 'r', + SetName = "togglecache", + Required = false, Default = false, + HelpText = "The width of an integer, in bytes.")] + public bool ForceRefreshCache { get; set; } + } + + /// + /// + /// + [Verb(name: "install", isDefault: false, aliases: null, Hidden = false, + HelpText = "Install a source file to the Crimson cache for easy access later.")] + public class Install + { + // Source + [Option(longName: "source", shortName: 's', + Required = true, + HelpText = "URI to the source file to install.")] + public string? SourcePath { get; set; } + public AbstractCURI SourceCURI { get => AbstractCURI.Create(SourcePath!); } + + // + [Option(longName: "preserve", shortName: 'p', + Required = false, Default = false, + HelpText = "The width of an integer, in bytes.")] + public bool ForceRefreshCache { get; set; } + } + + /// + /// + /// + [Verb(name: "clear", isDefault: false, aliases: null, Hidden = false, + HelpText = "Clear the source file cache.")] + public class Clear + { + // Source + [Option(longName: "erase", shortName: 'e', + Required = false, + SetName = "mode", + HelpText = "Completely remove the cache directories... It's like it was never there!")] + public bool Erase { get; set; } + + // + [Option(longName: "directories", shortName: 'd', + Required = false, + SetName = "mode", + HelpText = "Remove directories regardless of contents.")] + public bool Directories { get; set; } + + // Source + [Option(longName: "indexed", shortName: 'i', + Required = false, + SetName = "mode", + HelpText = "Clean only files listed in the cache index.")] + public bool Indexed { get; set; } + + public Cache.ClearMode ClearMode + { + get => (Erase, Indexed, Directories) switch + { + (true, false, false) => Cache.ClearMode.ERASE, + (false, true, false) => Cache.ClearMode.INDEXED, + (false, false, true) => Cache.ClearMode.DIRECTORIES, + _ => throw new ArgumentException(), + }; + } + } + + /// + /// + /// + [Verb(name: "refresh", isDefault: false, aliases: null, Hidden = false, + HelpText = "Clear the source file cache.")] + public class Refresh + { + // Source + [Option(longName: "source", shortName: 's', + SetName = "options", + Default = "", + HelpText = "URI to the source file to refresh.")] + public string? SourcePath { get; set; } + public AbstractCURI SourceCURI { get => AbstractCURI.Create(SourcePath!); } + + // + [Option(longName: "all", shortName: 'a', + SetName = "options", + Default = false, + HelpText = "Refresh all items in the index.")] + public bool All { get; set; } + } } } diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index d0e2ec7..e471d79 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -82,7 +82,7 @@ public async Task> GetScopes () } catch (Exception ex) { - Crimson.Panic("Unable to GetScopes", Crimson.PanicCode.PARSE, ex); + Crimson.Panic("Unable to GetScopes", Crimson.PanicCode.COMPILE_PARSE, ex); throw; } } @@ -150,7 +150,7 @@ public Scope LoadScope (AbstractCURI uri) } catch (Exception ex) { - Crimson.Panic($"Error loading scope from {uri}", Crimson.PanicCode.PARSE_SCOPE, ex); + Crimson.Panic($"Error loading scope from {uri}", Crimson.PanicCode.COMPILE_PARSE_SCOPE, ex); throw; } } @@ -173,7 +173,7 @@ private Task GetScopeLoadingTask (AbstractCURI uri) } catch (Exception ex) { - Crimson.Panic($"An error occurred while async loading {uri}", Crimson.PanicCode.PARSE_SCOPE_ASYNC, ex); + Crimson.Panic($"An error occurred while async loading {uri}", Crimson.PanicCode.COMPILE_PARSE_SCOPE_ASYNC, ex); throw; } }; @@ -250,7 +250,7 @@ private void LoadScopeDependencies (Scope root) } catch (Exception ex) { - Crimson.Panic($"Error loading scope dependencies for {root}", Crimson.PanicCode.PARSE_SCOPE_DEPS, ex); + Crimson.Panic($"Error loading scope dependencies for {root}", Crimson.PanicCode.COMPILE_PARSE_SCOPE_DEPS, ex); throw; } } @@ -281,7 +281,7 @@ private Scope ParseScopeText (AbstractCURI source, string textIn) } catch (Exception ex) { - Crimson.Panic($"An error ocurred while parsing a scope originating from {source}", Crimson.PanicCode.PARSE_SCOPE, ex); + Crimson.Panic($"An error ocurred while parsing a scope originating from {source}", Crimson.PanicCode.COMPILE_PARSE_SCOPE, ex); throw; } } diff --git a/Crimson/CSharp/Exceptions/LexerErrorListener.cs b/Crimson/CSharp/Exceptions/LexerErrorListener.cs index d233937..7dd6218 100644 --- a/Crimson/CSharp/Exceptions/LexerErrorListener.cs +++ b/Crimson/CSharp/Exceptions/LexerErrorListener.cs @@ -15,7 +15,7 @@ public LexerErrorListener (string name) public void SyntaxError (TextWriter output, IRecognizer recognizer, int offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) { - Core.Crimson.Panic($"A lexer error has occurred lexing {Name}", Core.Crimson.PanicCode.PARSE, null!); + Core.Crimson.Panic($"A lexer error has occurred lexing {Name}", Core.Crimson.PanicCode.COMPILE_PARSE, null!); } } } diff --git a/Crimson/CSharp/Exceptions/ParserErrorListener.cs b/Crimson/CSharp/Exceptions/ParserErrorListener.cs index 0461668..41b8586 100644 --- a/Crimson/CSharp/Exceptions/ParserErrorListener.cs +++ b/Crimson/CSharp/Exceptions/ParserErrorListener.cs @@ -15,7 +15,7 @@ public ParserErrorListener (string name) public void SyntaxError (TextWriter output, IRecognizer recognizer, IToken offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) { - Core.Crimson.Panic($"A parser error has occurred parsing {Name}", Core.Crimson.PanicCode.PARSE, null!); + Core.Crimson.Panic($"A parser error has occurred parsing {Name}", Core.Crimson.PanicCode.COMPILE_PARSE, null!); } } } diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs index 60ce592..ace049d 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -15,7 +15,7 @@ internal class StatementParseException : CrimsonException public AbstractCrimsonStatement? Statement { get; private set; } public Exception? Cause { get; private set; } - public StatementParseException (string message, AbstractCrimsonStatement? statement, Exception? cause) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) + public StatementParseException (string message, AbstractCrimsonStatement? statement, Exception? cause) : base(Core.Crimson.PanicCode.COMPILE_PARSE_STATEMENT) { Message = message; Statement = statement; @@ -76,14 +76,14 @@ public enum CURIExceptionReason internal class CrimsonParserException : CrimsonException { - public CrimsonParserException (string message) : base(Core.Crimson.PanicCode.PARSE_STATEMENT) + public CrimsonParserException (string message) : base(Core.Crimson.PanicCode.COMPILE_PARSE_STATEMENT) { } } internal class ScopeGenerationException : CrimsonException { - public ScopeGenerationException () : base(Core.Crimson.PanicCode.PARSE_SCOPE) + public ScopeGenerationException () : base(Core.Crimson.PanicCode.COMPILE_PARSE_SCOPE) { } diff --git a/Crimson/CSharp/Linking/Linker.cs b/Crimson/CSharp/Linking/Linker.cs index 2695a87..0d0f2ea 100644 --- a/Crimson/CSharp/Linking/Linker.cs +++ b/Crimson/CSharp/Linking/Linker.cs @@ -12,12 +12,6 @@ internal class Linker { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - public CrimsonOptions Options { get; } - public Linker (CrimsonOptions options) - { - Options = options; - } - // TODO Linking must include renaming functions/variables and reach down to identifiers simple values etc. /// diff --git a/Crimson/CSharp/Parsing/ScopeVisitor.cs b/Crimson/CSharp/Parsing/ScopeVisitor.cs index 431433f..b1b8c49 100644 --- a/Crimson/CSharp/Parsing/ScopeVisitor.cs +++ b/Crimson/CSharp/Parsing/ScopeVisitor.cs @@ -58,7 +58,7 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) } catch (Exception ex) { - Core.Crimson.Panic($"{GetType()} was unable to parse the given {(context == null ? "NULL" : context.GetType())}", Core.Crimson.PanicCode.PARSE_SCOPE, ex); + Core.Crimson.Panic($"{GetType()} was unable to parse the given {(context == null ? "NULL" : context.GetType())}", Core.Crimson.PanicCode.COMPILE_PARSE_SCOPE, ex); throw; } } From 7af600723e488e01ce7e9133c00303c74ca73866 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 11 Apr 2023 21:38:33 +0100 Subject: [PATCH 071/122] Caching things --- Crimson/CSharp/Core/CURI/AbstractCURI.cs | 4 +- Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs | 2 +- Crimson/CSharp/Core/CURI/HttpCURI.cs | 2 +- Crimson/CSharp/Core/CURI/NativeCURI.cs | 2 +- Crimson/CSharp/Core/CURI/RelativeCURI.cs | 2 +- Crimson/CSharp/Core/Cache.cs | 158 ++++++++++++++----- Crimson/CSharp/Core/Crimson.cs | 14 +- Crimson/CSharp/Core/CrimsonOptions.cs | 6 +- Crimson/CSharp/Core/Library.cs | 8 +- 9 files changed, 141 insertions(+), 57 deletions(-) diff --git a/Crimson/CSharp/Core/CURI/AbstractCURI.cs b/Crimson/CSharp/Core/CURI/AbstractCURI.cs index e395fdf..4365286 100644 --- a/Crimson/CSharp/Core/CURI/AbstractCURI.cs +++ b/Crimson/CSharp/Core/CURI/AbstractCURI.cs @@ -27,7 +27,9 @@ public abstract class AbstractCURI : IEquatable /// /// - /// Get a of the resource described by this + /// Directly get the remote of the resource described by this . + /// Typically it is preferable to use as that will return a cached + /// version if it exists which may reduce latency due to, for example, internet speeds. /// /// /// For example, a CURI describing "http://example.com/crimson/heap.crm" would get a stream of the bytes of the file "heap.crm" diff --git a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs b/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs index ab45a52..d33831a 100644 --- a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs +++ b/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs @@ -23,7 +23,7 @@ public string AbsolutePath public FileAbsoluteCURI (Uri uri) : base(uri) { - if (!Uri.UriSchemeFile.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {Uri.UriSchemeFile}."); + if (!Uri.UriSchemeFile.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {Uri.UriSchemeFile}. Found '{uri.Scheme}'."); } public override bool Equals (AbstractCURI? other) diff --git a/Crimson/CSharp/Core/CURI/HttpCURI.cs b/Crimson/CSharp/Core/CURI/HttpCURI.cs index b2a53d8..9827e68 100644 --- a/Crimson/CSharp/Core/CURI/HttpCURI.cs +++ b/Crimson/CSharp/Core/CURI/HttpCURI.cs @@ -13,7 +13,7 @@ internal class HttpCURI : AbstractCURI public HttpCURI (Uri uri) : base(uri) { - if (!Uri.UriSchemeFile.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {Uri.UriSchemeHttp}."); + if (!Uri.UriSchemeHttp.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {Uri.UriSchemeHttp}. Found '{uri.Scheme}'."); } public override bool Equals (AbstractCURI? other) diff --git a/Crimson/CSharp/Core/CURI/NativeCURI.cs b/Crimson/CSharp/Core/CURI/NativeCURI.cs index 6d08888..e6c2475 100644 --- a/Crimson/CSharp/Core/CURI/NativeCURI.cs +++ b/Crimson/CSharp/Core/CURI/NativeCURI.cs @@ -38,7 +38,7 @@ public string AbsolutePath public NativeCURI (Uri uri) : base(uri) { - if (!SCHEME.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {SCHEME}."); + if (!SCHEME.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {SCHEME}. Found '{uri.Scheme}'."); if (Path.IsPathRooted(AbsolutePath)) throw new UriFormatException($"The path of a URI with host {SCHEME} may not be rooted."); } diff --git a/Crimson/CSharp/Core/CURI/RelativeCURI.cs b/Crimson/CSharp/Core/CURI/RelativeCURI.cs index 69f78dd..b7628da 100644 --- a/Crimson/CSharp/Core/CURI/RelativeCURI.cs +++ b/Crimson/CSharp/Core/CURI/RelativeCURI.cs @@ -43,7 +43,7 @@ public override bool Equals (AbstractCURI? other) public RelativeCURI (Uri uri) : base(uri) { - if (!SCHEME.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {SCHEME}."); + if (!SCHEME.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {SCHEME}. Found '{uri.Scheme}'."); string abs = WebUtility.UrlDecode(Uri.AbsolutePath); if (Path.IsPathRooted(abs)) throw new UriFormatException($"The path of a {GetType()} may not be rooted."); diff --git a/Crimson/CSharp/Core/Cache.cs b/Crimson/CSharp/Core/Cache.cs index f2ebe4e..890db71 100644 --- a/Crimson/CSharp/Core/Cache.cs +++ b/Crimson/CSharp/Core/Cache.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Text; using System.Text.Json; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Crimson.CSharp.Core @@ -17,13 +18,14 @@ public class Cache public static FileInfo INDEX { get; private set; } = Crimson.GetRoamingFile("cache/index.json"); public static CacheIndex Index { get; private set; } - public class CacheIndex + public record CacheIndex { public DateTime CreatedTime { get; set; } - public Dictionary Contents { get; set; } + public Dictionary Contents { get; set; } } - public class IndexEntry + public record IndexEntry { + public string URI { get; set; } public DateTime InstalledTime { get; set; } public DateTime ModifiedTime { get; set; } } @@ -41,6 +43,10 @@ static Cache () } } + + // ============ INDEX ============ + + private static void CreateIndexIfNotPresent () { INDEX.Refresh(); @@ -65,7 +71,7 @@ private static void CreateIndexIfNotPresent () Index = new CacheIndex { CreatedTime = DateTime.Now, - Contents = new Dictionary() + Contents = new Dictionary() }; JsonSerializer.Serialize(writeStream, Index); } @@ -113,64 +119,141 @@ private static void WriteIndex () return; } - private static void Fetch (AbstractCURI curi, bool overwrite) + private static readonly object _ioLock = new object(); + private static byte[] ReadCached (CacheKey key) { - try + lock (_ioLock) { - string data; - using (Stream readStream = curi.GetStream()) + FileInfo info = GetCachedFileInfo(key); + using (FileStream fileStream = info.OpenRead()) + using (MemoryStream memoryStream = new MemoryStream()) { - StreamReader reader = new StreamReader(readStream); - data = reader.ReadToEnd(); + fileStream.CopyTo(memoryStream); + return memoryStream.ToArray(); } - Add(curi, data); - } - catch (Exception ex) - { - Crimson.Panic($"Error fetching {curi}", Crimson.PanicCode.CACHE_FETCH, ex); - throw; } } - private static void Add (AbstractCURI curi, string data) + private static void WriteCached (CacheKey path, byte[] contents) { - try + lock (_ioLock) { - string path = GetLocalCachePath(curi); - _ = Directory.CreateDirectory(Path.GetDirectoryName(path)!); - using (Stream writeStream = Crimson.GetRoamingFile($"cache/{path}").Open(FileMode.OpenOrCreate, FileAccess.Write)) + FileInfo info = GetCachedFileInfo(path); + _ = Directory.CreateDirectory(Path.GetDirectoryName(info.FullName)!); + using (Stream writeStream = info.Open(FileMode.OpenOrCreate, FileAccess.Write)) { StreamWriter writer = new StreamWriter(writeStream); - writer.Write(data); + writer.Write(contents); } + } + } - IndexEntry? entry = Index.Contents!.GetValueOrDefault(path, null) ?? new IndexEntry(); - entry.ModifiedTime = DateTime.Now; - Index.Contents[path] = entry; - WriteIndex(); + // ============ KEYS ============ + + [JsonConverter(typeof(CacheKeyJsonConverter))] + public record CacheKey + { + public readonly string LocalPath; + public CacheKey (string localPath) => LocalPath = localPath; + } + + private static CacheKey GetCacheKey (AbstractCURI curi) + { + return new CacheKey($"{curi.Uri.Scheme}/{curi.Uri.LocalPath}"); + } + + public class CacheKeyJsonConverter : JsonConverter + { + public override CacheKey? Read (ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { } - catch (Exception ex) + + public override void Write (Utf8JsonWriter writer, CacheKey value, JsonSerializerOptions options) { - Crimson.Panic($"Error adding {curi}", Crimson.PanicCode.CACHE_ADD, ex); - throw; } } - private static string GetLocalCachePath (AbstractCURI curi) + private static FileInfo GetCachedFileInfo (CacheKey key) { - return $"{curi.Uri.Scheme}/{curi.Uri.LocalPath}"; + return Crimson.GetRoamingFile($"cache/{key.LocalPath}"); } // =========== API =========== + + public record GetCachedQueryResult + { + public readonly bool Exists = false; + public readonly CacheKey? CacheKey; + public readonly string? Contents = ""; + + public GetCachedQueryResult (bool exists, CacheKey? localPath = null, string? contents = "") + { + Exists = exists; + CacheKey = localPath; + Contents = contents; + } + } + + public static GetCachedQueryResult Get (AbstractCURI curi) + { + CacheKey key = GetCacheKey(curi); + + if (!Index.Contents.ContainsKey(key)) + return new GetCachedQueryResult(exists: false); + + FileInfo info = GetCachedFileInfo(key); + + using (Stream stream = info.OpenRead()) + { + StreamReader reader = new StreamReader(stream); + string contents = reader.ReadToEnd(); + return new GetCachedQueryResult(exists: true, localPath: key, contents: contents); + } + } + + public static GetCachedQueryResult GetOrInstall (AbstractCURI curi) + { + GetCachedQueryResult result = Get(curi); + if (result.Exists) return result; + + Install(curi, true); + return Get(curi); + } + public static void Clear (ClearMode clearMode) { throw new NotImplementedException(); } - public static void Install (AbstractCURI sourceCURI, bool forceRefreshCache) + public static void Install (AbstractCURI sourceCURI, bool overwrite = false) { - throw new NotImplementedException(); + GetCachedQueryResult getResult = Get(sourceCURI); + if (!overwrite && getResult.Exists) + { + LOGGER.Info($"{sourceCURI} is already installed and the 'overwrite' flag is not specified."); + return; + } + + if (getResult.Exists) { } + + CacheKey key = GetCacheKey(sourceCURI); + using (Stream curiStream = sourceCURI.GetStream()) + using (MemoryStream memStream = new MemoryStream()) + { + curiStream.CopyTo(memStream); + byte[] contents = memStream.ToArray(); + + WriteCached(key, contents); + } + + Index.Contents[key] = new IndexEntry() + { + InstalledTime = DateTime.Now, + ModifiedTime = DateTime.Now, + URI = sourceCURI.ToString(), + }; + WriteIndex(); } public static void Refresh (AbstractCURI? sourceCURI, bool all = false) @@ -180,7 +263,7 @@ public static void Refresh (AbstractCURI? sourceCURI, bool all = false) LOGGER.Info($"Refreshing all {Index.Contents.Count} indexed CURIs..."); foreach (var pair in Index.Contents) { - AbstractCURI? curi = AbstractCURI.Create(pair.Key); + AbstractCURI? curi = AbstractCURI.Create(pair.Value.URI); Refresh(curi); } LOGGER.Info("Refresh complete."); @@ -188,7 +271,7 @@ public static void Refresh (AbstractCURI? sourceCURI, bool all = false) else if (sourceCURI != null) { LOGGER.Info($"Refreshing {sourceCURI}..."); - Fetch(sourceCURI, true); + Install(sourceCURI); LOGGER.Info($"Done!"); } else @@ -197,11 +280,6 @@ public static void Refresh (AbstractCURI? sourceCURI, bool all = false) } } - public static void Info (AbstractCURI sourceCURI) - { - throw new NotImplementedException(); - } - public enum ClearMode { ERASE, diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index d9e98af..5ff6241 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -79,11 +79,13 @@ private static string[] GetTestArguments () }; } - bool INSTALL = false; + bool INSTALL = true; if (INSTALL) { return new string[] { - $"install" + $"install", + $"-s http://raw.githubusercontent.com/GenElectrovise/RF_ASM/master/Crimson/Resources/Native%20Library/heap.crm", + $"-o" }; } @@ -95,7 +97,7 @@ private static string[] GetTestArguments () }; } - bool REFRESH = true; + bool REFRESH = false; if (REFRESH) { return new string[] { @@ -183,6 +185,7 @@ public static FileInfo GetRoamingFile (string path) private static void Compile (CrimsonOptions.Compile options) { + LOGGER!.Info($"Compiling with: {options}"); try { Console.WriteLine(" Compile: SourceUri: " + options.SourceCURI); @@ -207,9 +210,10 @@ private static void Compile (CrimsonOptions.Compile options) private static void Install (CrimsonOptions.Install options) { + LOGGER!.Info($"Installing with: {options}"); try { - Cache.Install(options.SourceCURI, options.ForceRefreshCache); + Cache.Install(options.SourceCURI, options.Overwrite); } catch (Exception ex) { @@ -220,6 +224,7 @@ private static void Install (CrimsonOptions.Install options) private static void Clear (CrimsonOptions.Clear options) { + LOGGER!.Info($"Clearing with: {options}"); try { Cache.Clear(options.ClearMode); @@ -233,6 +238,7 @@ private static void Clear (CrimsonOptions.Clear options) private static void Refresh (CrimsonOptions.Refresh options) { + LOGGER!.Info($"Refreshing with: {options}"); try { Cache.Refresh(options.SourceCURI, options.All); diff --git a/Crimson/CSharp/Core/CrimsonOptions.cs b/Crimson/CSharp/Core/CrimsonOptions.cs index e1d90b5..de7d4ea 100644 --- a/Crimson/CSharp/Core/CrimsonOptions.cs +++ b/Crimson/CSharp/Core/CrimsonOptions.cs @@ -99,10 +99,10 @@ public class Install public AbstractCURI SourceCURI { get => AbstractCURI.Create(SourcePath!); } // - [Option(longName: "preserve", shortName: 'p', + [Option(longName: "overwrite", shortName: 'o', Required = false, Default = false, - HelpText = "The width of an integer, in bytes.")] - public bool ForceRefreshCache { get; set; } + HelpText = "Overwrite existing versions of this file. Consider using the 'refresh' verb instead.")] + public bool Overwrite { get; set; } } /// diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index e471d79..ab93d36 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -106,12 +106,10 @@ public Scope LoadScope (AbstractCURI uri) { LOGGER.Info($"Loading scope from {uri}"); - Stream source = uri.GetStream(); - StreamReader reader = new StreamReader(source); - string text = reader.ReadToEnd(); - source.Close(); + Cache.GetCachedQueryResult result = Cache.Get(uri); + if (!result.Exists) throw new NullReferenceException($"Library was unable to get cached or fetch new contents of {uri}."); - Scope scope = ParseScopeText(uri, text); + Scope scope = ParseScopeText(uri, result.Contents!); LoadScopeDependencies(scope); From 4a4fe1eedcbc241bf9f9f551a98697c969917e0f Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 11 Apr 2023 22:50:17 +0100 Subject: [PATCH 072/122] Settings! --- Crimson/CSharp/Core/Crimson.cs | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index 5ff6241..b731769 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -10,6 +10,7 @@ using System.Reflection; using System.Runtime.Intrinsics.X86; using Antlr4.Runtime.Misc; +using System.Text.Json; namespace Crimson.CSharp.Core { @@ -17,6 +18,7 @@ internal class Crimson { private static Logger? LOGGER; public static readonly string VERSION = "v0.0"; + public static SettingsRecord Settings; public static int Main (string[] args) { @@ -33,6 +35,9 @@ public static int Main (string[] args) args = useAutowiredArgs ? GetTestArguments() : args; Console.WriteLine(String.Join(' ', args)); + // + LoadSettings(); + // ConfigureNLog(); @@ -138,6 +143,54 @@ private static void ShowCredits () Console.WriteLine(""); } + public record SettingsRecord + { + + } + + public static readonly SettingsRecord DEFAULT_SETTINGS = new SettingsRecord() + { + + }; + + private static void LoadSettings () + { + try + { + FileInfo info = GetRoamingFile("settings.json"); + if (!info.Exists) + { + _ = Directory.CreateDirectory(Path.GetDirectoryName(info.FullName)); + using (Stream writeStream = info.Open(FileMode.OpenOrCreate, FileAccess.Write)) + { + string settings = JsonSerializer.Serialize(DEFAULT_SETTINGS, new JsonSerializerOptions() { WriteIndented = true }); + StreamWriter writer = new StreamWriter(writeStream); + writer.Write(settings); + } + } + + using (Stream readStream = info.OpenRead()) + { + StreamReader reader = new StreamReader(readStream); + string contents = reader.ReadToEnd(); + Settings = JsonSerializer.Deserialize(contents) ?? throw new JsonException("Failed to deserialise settings!"); + } + + + //var name = "PATH"; + //var scope = EnvironmentVariableTarget.Machine; // or User + //var oldValue = Environment.GetEnvironmentVariable(name, scope); + //var newValue = oldValue + @";C:\Program Files\MySQL\MySQL Server 5.1\bin\\"; + //Environment.SetEnvironmentVariable(name, newValue, scope); + + } + catch (Exception ex) + { + Crimson.Panic("Unable to read settings. Cannot continue.", PanicCode.SETTINGS, ex); + throw; + } + } + private static void ConfigureNLog () { Console.WriteLine("Configuring NLog..."); @@ -364,6 +417,7 @@ public enum PanicCode { OK_OR_NONE = 0, ARGUMENTS = -10, + SETTINGS = -20, // CURI CURI = -100, From a7bd616cf0b63a7111c4df80b35c72c8617992ef Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Tue, 11 Apr 2023 23:14:18 +0100 Subject: [PATCH 073/122] No more settings :) --- Crimson/CSharp/Core/Crimson.cs | 52 ---------------------------------- 1 file changed, 52 deletions(-) diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index b731769..f6c8a7b 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -18,7 +18,6 @@ internal class Crimson { private static Logger? LOGGER; public static readonly string VERSION = "v0.0"; - public static SettingsRecord Settings; public static int Main (string[] args) { @@ -35,9 +34,6 @@ public static int Main (string[] args) args = useAutowiredArgs ? GetTestArguments() : args; Console.WriteLine(String.Join(' ', args)); - // - LoadSettings(); - // ConfigureNLog(); @@ -143,54 +139,6 @@ private static void ShowCredits () Console.WriteLine(""); } - public record SettingsRecord - { - - } - - public static readonly SettingsRecord DEFAULT_SETTINGS = new SettingsRecord() - { - - }; - - private static void LoadSettings () - { - try - { - FileInfo info = GetRoamingFile("settings.json"); - if (!info.Exists) - { - _ = Directory.CreateDirectory(Path.GetDirectoryName(info.FullName)); - using (Stream writeStream = info.Open(FileMode.OpenOrCreate, FileAccess.Write)) - { - string settings = JsonSerializer.Serialize(DEFAULT_SETTINGS, new JsonSerializerOptions() { WriteIndented = true }); - StreamWriter writer = new StreamWriter(writeStream); - writer.Write(settings); - } - } - - using (Stream readStream = info.OpenRead()) - { - StreamReader reader = new StreamReader(readStream); - string contents = reader.ReadToEnd(); - Settings = JsonSerializer.Deserialize(contents) ?? throw new JsonException("Failed to deserialise settings!"); - } - - - //var name = "PATH"; - //var scope = EnvironmentVariableTarget.Machine; // or User - //var oldValue = Environment.GetEnvironmentVariable(name, scope); - //var newValue = oldValue + @";C:\Program Files\MySQL\MySQL Server 5.1\bin\\"; - //Environment.SetEnvironmentVariable(name, newValue, scope); - - } - catch (Exception ex) - { - Crimson.Panic("Unable to read settings. Cannot continue.", PanicCode.SETTINGS, ex); - throw; - } - } - private static void ConfigureNLog () { Console.WriteLine("Configuring NLog..."); From 5701cc62fa3d18bf812b51bca394252b1b3e7e11 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Wed, 12 Apr 2023 10:24:15 +0100 Subject: [PATCH 074/122] Caching updates + ClearModeException + AbstractCURI.ToShortString() > CrimsonOptions.Clear mode is now a Group not Set > Crimson.GetRoamingFile() corrects slashes > Crimson.Panic now shows "(CrimsonException)" on the same line if the exception is a CrimsonException (moved from the subsequent line) + CacheKeyJsonConverter > Fixed Cache.WriteCached not writing > Cache logging less and more verbose in places --- Crimson/CSharp/Core/CURI/AbstractCURI.cs | 28 ++++++++-- Crimson/CSharp/Core/Cache.cs | 54 +++++++++++++------ Crimson/CSharp/Core/Crimson.cs | 18 ++++--- Crimson/CSharp/Core/CrimsonOptions.cs | 10 ++-- .../CSharp/Exceptions/ParsingExceptions.cs | 24 +++++++++ 5 files changed, 101 insertions(+), 33 deletions(-) diff --git a/Crimson/CSharp/Core/CURI/AbstractCURI.cs b/Crimson/CSharp/Core/CURI/AbstractCURI.cs index 4365286..c5db1fd 100644 --- a/Crimson/CSharp/Core/CURI/AbstractCURI.cs +++ b/Crimson/CSharp/Core/CURI/AbstractCURI.cs @@ -54,6 +54,29 @@ public abstract class AbstractCURI : IEquatable protected AbstractCURI (Uri uri) => Uri = uri; + public string ToShortString () + { + List parts = new List(); + + if (Uri.Segments.Length <= 5) + { + parts.AddRange(Uri.Segments); + } + else + { + parts.AddRange(Uri.Segments.Take(3)); + parts.Add(".../"); + parts.AddRange(Uri.Segments.TakeLast(2)); + } + + return $"{Uri.Scheme}://{Uri.UserInfo}@{Uri.Host}:{Uri.Port}{String.Join("", parts)}"; + } + + public override string ToString () + { + return Uri.ToString(); + } + /// /// /// Contains the factories used for making CURIs. @@ -93,10 +116,5 @@ public static AbstractCURI Create (Uri uri) throw new UriFormatException($"No CURI factory is registered for URIs with scheme {uri.Host}: {uri}"); } - - public override string ToString () - { - return Uri.ToString(); - } } } diff --git a/Crimson/CSharp/Core/Cache.cs b/Crimson/CSharp/Core/Cache.cs index 890db71..99922fd 100644 --- a/Crimson/CSharp/Core/Cache.cs +++ b/Crimson/CSharp/Core/Cache.cs @@ -2,6 +2,7 @@ using NLog; using System; using System.Collections.Generic; +using System.ComponentModel; using System.IO; using System.Linq; using System.Text; @@ -103,20 +104,17 @@ private static void WriteIndex () { try { + LOGGER.Debug($"Writing to index {INDEX}"); CreateIndexIfNotPresent(); - using (FileStream stream = INDEX.Open(FileMode.OpenOrCreate, FileAccess.ReadWrite)) - { - string data = JsonSerializer.Serialize(Index, new JsonSerializerOptions { WriteIndented = true }); - StreamWriter writer = new StreamWriter(stream); - writer.Write(data); - } + string data = JsonSerializer.Serialize(Index, new JsonSerializerOptions { WriteIndented = true }); + File.WriteAllText(INDEX.FullName, data); + return; } catch (Exception ex) { Crimson.Panic($"Unable to write to cache index {INDEX}", Crimson.PanicCode.CACHE_JSON, ex); throw; } - return; } private static readonly object _ioLock = new object(); @@ -140,11 +138,7 @@ private static void WriteCached (CacheKey path, byte[] contents) { FileInfo info = GetCachedFileInfo(path); _ = Directory.CreateDirectory(Path.GetDirectoryName(info.FullName)!); - using (Stream writeStream = info.Open(FileMode.OpenOrCreate, FileAccess.Write)) - { - StreamWriter writer = new StreamWriter(writeStream); - writer.Write(contents); - } + File.WriteAllBytes(info.FullName, contents); } } @@ -152,25 +146,51 @@ private static void WriteCached (CacheKey path, byte[] contents) // ============ KEYS ============ [JsonConverter(typeof(CacheKeyJsonConverter))] + [TypeConverter(typeof(CacheKey))] public record CacheKey { public readonly string LocalPath; public CacheKey (string localPath) => LocalPath = localPath; + public override string ToString () => LocalPath; } private static CacheKey GetCacheKey (AbstractCURI curi) { - return new CacheKey($"{curi.Uri.Scheme}/{curi.Uri.LocalPath}"); + return new CacheKey($"{curi.Uri.Scheme}{curi.Uri.LocalPath}"); } public class CacheKeyJsonConverter : JsonConverter { + public override bool CanConvert (Type typeToConvert) + { + bool good = typeof(CacheKey).Equals(typeToConvert); + return good; + } + + public override CacheKey ReadAsPropertyName (ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options)!; + } + + public override void WriteAsPropertyName (Utf8JsonWriter writer, CacheKey value, JsonSerializerOptions options) + { + string? str = value.LocalPath; + if (String.IsNullOrWhiteSpace(str)) throw new JsonException("Cannot write NullOrWhiteSpace CacheKey."); + writer.WritePropertyName(str); + } + public override CacheKey? Read (ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + string? str = reader.GetString(); + if (String.IsNullOrWhiteSpace(str)) throw new JsonException("Cannot read NullOrWhiteSpace CacheKey."); + return new CacheKey(str!); } public override void Write (Utf8JsonWriter writer, CacheKey value, JsonSerializerOptions options) { + string? str = value.LocalPath; + if (String.IsNullOrWhiteSpace(str)) throw new JsonException("Cannot write NullOrWhiteSpace CacheKey."); + writer.WriteStringValue(str); } } @@ -235,7 +255,7 @@ public static void Install (AbstractCURI sourceCURI, bool overwrite = false) return; } - if (getResult.Exists) { } + LOGGER.Info($"Installing '{sourceCURI.ToShortString()}'..."); CacheKey key = GetCacheKey(sourceCURI); using (Stream curiStream = sourceCURI.GetStream()) @@ -247,12 +267,14 @@ public static void Install (AbstractCURI sourceCURI, bool overwrite = false) WriteCached(key, contents); } + LOGGER.Debug($"Indexing '{sourceCURI.ToShortString()}' as '{key}'..."); Index.Contents[key] = new IndexEntry() { InstalledTime = DateTime.Now, ModifiedTime = DateTime.Now, URI = sourceCURI.ToString(), }; + WriteIndex(); } @@ -270,8 +292,8 @@ public static void Refresh (AbstractCURI? sourceCURI, bool all = false) } else if (sourceCURI != null) { - LOGGER.Info($"Refreshing {sourceCURI}..."); - Install(sourceCURI); + LOGGER.Info($"Refreshing '{sourceCURI.ToShortString()}'..."); + Install(sourceCURI, true); LOGGER.Info($"Done!"); } else diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index f6c8a7b..b9041fb 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -80,21 +80,22 @@ private static string[] GetTestArguments () }; } - bool INSTALL = true; + bool INSTALL = false; if (INSTALL) { return new string[] { $"install", $"-s http://raw.githubusercontent.com/GenElectrovise/RF_ASM/master/Crimson/Resources/Native%20Library/heap.crm", - $"-o" + //$"-o" }; } - bool CLEAR = false; + bool CLEAR = true; if (CLEAR) { return new string[] { - $"clear" + $"clear", + $"-e" }; } @@ -103,7 +104,8 @@ private static string[] GetTestArguments () { return new string[] { $"refresh", - $"-a" + $"-s http://raw.githubusercontent.com/GenElectrovise/RF_ASM/master/Crimson/Resources/Native%20Library/heap.crm", + //$"-a" }; } @@ -176,7 +178,8 @@ public static FileInfo GetRoamingFile (string path) { string roaming = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); string relative = $"Crimson/{path}"; - string full = Path.Combine(roaming, relative); + string combined = Path.Combine(roaming, relative); + string full = Path.GetFullPath(combined); return new FileInfo(full); } @@ -270,13 +273,12 @@ public static void Panic (string message, PanicCode code, Exception e) $"", $" >> {message}", $"", - $"{(e != null ? e.GetType().Name : "")}", + $"{(e != null ? e.GetType().Name : "")} {(e is CrimsonException ? ($"({typeof(CrimsonException).Name})") : "")}", }; if (e != null) { if (e is CrimsonException ce) { - lines.Add($"({typeof(CrimsonException).Name})"); lines.AddRange(ce.GetDetailedMessage()); lines.Add($"Inner panic code: {(int) ce.Code} ({Enum.GetName(ce.Code)})"); } diff --git a/Crimson/CSharp/Core/CrimsonOptions.cs b/Crimson/CSharp/Core/CrimsonOptions.cs index de7d4ea..e46e32d 100644 --- a/Crimson/CSharp/Core/CrimsonOptions.cs +++ b/Crimson/CSharp/Core/CrimsonOptions.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using CommandLine; using Crimson.CSharp.Core.CURI; +using Crimson.CSharp.Exceptions; using NLog.Targets; namespace Crimson.CSharp.Core @@ -115,21 +116,21 @@ public class Clear // Source [Option(longName: "erase", shortName: 'e', Required = false, - SetName = "mode", + Group = "mode", HelpText = "Completely remove the cache directories... It's like it was never there!")] public bool Erase { get; set; } // [Option(longName: "directories", shortName: 'd', Required = false, - SetName = "mode", + Group = "mode", HelpText = "Remove directories regardless of contents.")] public bool Directories { get; set; } // Source [Option(longName: "indexed", shortName: 'i', Required = false, - SetName = "mode", + Group = "mode", HelpText = "Clean only files listed in the cache index.")] public bool Indexed { get; set; } @@ -140,7 +141,7 @@ public Cache.ClearMode ClearMode (true, false, false) => Cache.ClearMode.ERASE, (false, true, false) => Cache.ClearMode.INDEXED, (false, false, true) => Cache.ClearMode.DIRECTORIES, - _ => throw new ArgumentException(), + _ => throw new ClearModeException(this) }; } } @@ -169,3 +170,4 @@ public class Refresh } } } + diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/CSharp/Exceptions/ParsingExceptions.cs index ace049d..09c7bf1 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/CSharp/Exceptions/ParsingExceptions.cs @@ -3,12 +3,36 @@ using Crimson.CSharp.Parsing.Statements; using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Crimson.CSharp.Exceptions { + internal class ClearModeException : CrimsonException + { + public CrimsonOptions.Clear Clear { get; private set; } + + public ClearModeException (CrimsonOptions.Clear clear) : base(Core.Crimson.PanicCode.COMPILE_PARSE_STATEMENT) + { + Clear = clear; + } + + public override IList GetDetailedMessage () + { + List strings = new List() + { + $"Illegal ClearMode comination (there can only be 1). ", + $"Found {(Clear.Erase ? "-e" : "")}" + + $" {(Clear.Directories ? "-d" : "")}" + + $" {(Clear.Indexed ? "-i" : "")}" + + }; + return strings; + } + } + internal class StatementParseException : CrimsonException { public string Message { get; private set; } From 852b3c46ea3c446ffe9262bda506c49d9bfdc476 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Wed, 12 Apr 2023 22:49:43 +0100 Subject: [PATCH 075/122] Caching things! Again! + Locks on cache + Cache.Clear > Tidied arguments in Crimson > Cache returns char[] not byte[] --- Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs | 3 +- Crimson/CSharp/Core/Cache.cs | 156 +++++++++++++------ Crimson/CSharp/Core/Crimson.cs | 45 ++++-- Crimson/CSharp/Core/CrimsonOptions.cs | 4 +- Crimson/CSharp/Core/Library.cs | 8 +- 5 files changed, 152 insertions(+), 64 deletions(-) diff --git a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs b/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs index d33831a..29855c5 100644 --- a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs +++ b/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Net; +using System.Reflection; using System.Text; using System.Threading.Tasks; @@ -39,7 +40,7 @@ public override Stream GetStream () } catch (Exception ex) { - Crimson.Panic($"{GetType().Name}: An error occurred while awaiting a read operation on {AbsolutePath}.", Crimson.PanicCode.CURI_STREAM, ex); + Crimson.Panic($"{GetType().Name}: An error occurred getting the contents of {AbsolutePath}.", Crimson.PanicCode.CURI_STREAM, ex); throw; } } diff --git a/Crimson/CSharp/Core/Cache.cs b/Crimson/CSharp/Core/Cache.cs index 99922fd..1692a86 100644 --- a/Crimson/CSharp/Core/Cache.cs +++ b/Crimson/CSharp/Core/Cache.cs @@ -15,7 +15,6 @@ namespace Crimson.CSharp.Core public class Cache { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - public static FileInfo CACHE_ROOT { get; private set; } = Crimson.GetRoamingFile("cache/"); public static FileInfo INDEX { get; private set; } = Crimson.GetRoamingFile("cache/index.json"); public static CacheIndex Index { get; private set; } @@ -81,44 +80,51 @@ private static void CreateIndexIfNotPresent () INDEX.Refresh(); } + private static readonly object _indexLock = new object(); private static CacheIndex? ReadIndex () { - CacheIndex? index; - try + lock (_indexLock) { - CreateIndexIfNotPresent(); - using (FileStream stream = INDEX.Open(FileMode.OpenOrCreate, FileAccess.ReadWrite)) + CacheIndex? index; + try { - index = JsonSerializer.Deserialize(stream); + CreateIndexIfNotPresent(); + using (FileStream stream = INDEX.Open(FileMode.OpenOrCreate, FileAccess.ReadWrite)) + { + index = JsonSerializer.Deserialize(stream); + } } + catch (Exception ex) + { + Crimson.Panic($"Unable to deserialise cache index {INDEX}", Crimson.PanicCode.CACHE_JSON, ex); + throw; + } + return index; } - catch (Exception ex) - { - Crimson.Panic($"Unable to deserialise cache index {INDEX}", Crimson.PanicCode.CACHE_JSON, ex); - throw; - } - return index; } private static void WriteIndex () { - try - { - LOGGER.Debug($"Writing to index {INDEX}"); - CreateIndexIfNotPresent(); - string data = JsonSerializer.Serialize(Index, new JsonSerializerOptions { WriteIndented = true }); - File.WriteAllText(INDEX.FullName, data); - return; - } - catch (Exception ex) + lock (_indexLock) { - Crimson.Panic($"Unable to write to cache index {INDEX}", Crimson.PanicCode.CACHE_JSON, ex); - throw; + try + { + LOGGER.Debug($"Writing to index {INDEX}"); + CreateIndexIfNotPresent(); + string data = JsonSerializer.Serialize(Index, new JsonSerializerOptions { WriteIndented = true }); + File.WriteAllText(INDEX.FullName, data); + return; + } + catch (Exception ex) + { + Crimson.Panic($"Unable to write to cache index {INDEX}", Crimson.PanicCode.CACHE_JSON, ex); + throw; + } } } private static readonly object _ioLock = new object(); - private static byte[] ReadCached (CacheKey key) + private static char[] ReadCached (CacheKey key) { lock (_ioLock) { @@ -127,16 +133,18 @@ private static byte[] ReadCached (CacheKey key) using (MemoryStream memoryStream = new MemoryStream()) { fileStream.CopyTo(memoryStream); - return memoryStream.ToArray(); + byte[] bytes = memoryStream.ToArray(); + char[] chars = Encoding.UTF8.GetString(bytes).ToCharArray(); + return chars; } } } - private static void WriteCached (CacheKey path, byte[] contents) + private static void WriteCached (CacheKey key, byte[] contents) { lock (_ioLock) { - FileInfo info = GetCachedFileInfo(path); + FileInfo info = GetCachedFileInfo(key); _ = Directory.CreateDirectory(Path.GetDirectoryName(info.FullName)!); File.WriteAllBytes(info.FullName, contents); } @@ -199,15 +207,58 @@ private static FileInfo GetCachedFileInfo (CacheKey key) return Crimson.GetRoamingFile($"cache/{key.LocalPath}"); } + // Clearing + + private static void Erase () + { + Crimson.GetRoamingDirectory("cache/").Delete(true); + } + + private static void ClearUnindexed () + { + + } + + private static void ClearIndexed () + { + foreach (var x in Index.Contents) + { + FileInfo info = GetCachedFileInfo(x.Key); + info.Delete(); + CutOffEmptyDirectories(info.Directory!); + } + } + + private static void CutOffEmptyDirectories (DirectoryInfo root) + { + if (root.GetFiles().Length == 0 && root.GetDirectories().Length == 0) + { + root.Delete(); + // CutOffEmptyDirectories(root.Parent); + } + } + + private static void RemoveEmptyDirectories (DirectoryInfo root) + { + foreach (DirectoryInfo directory in root.GetDirectories()) + { + RemoveEmptyDirectories(directory); + if (root.GetFiles().Length == 0 && root.GetDirectories().Length == 0) + { + directory.Delete(false); + } + } + } + // =========== API =========== public record GetCachedQueryResult { public readonly bool Exists = false; public readonly CacheKey? CacheKey; - public readonly string? Contents = ""; + public readonly char[]? Contents; - public GetCachedQueryResult (bool exists, CacheKey? localPath = null, string? contents = "") + public GetCachedQueryResult (bool exists, CacheKey? localPath = null, char[]? contents = null) { Exists = exists; CacheKey = localPath; @@ -217,19 +268,23 @@ public GetCachedQueryResult (bool exists, CacheKey? localPath = null, string? co public static GetCachedQueryResult Get (AbstractCURI curi) { + // + // + // TODO GET/REFRESHING NOTES + // + // ABSTRACT CURI ALWAYS REFRESH. + // File/absolute always true. + // Perhaps add to query? http://example.com/file.crm?volatile=true + // + // + CacheKey key = GetCacheKey(curi); if (!Index.Contents.ContainsKey(key)) return new GetCachedQueryResult(exists: false); - FileInfo info = GetCachedFileInfo(key); - - using (Stream stream = info.OpenRead()) - { - StreamReader reader = new StreamReader(stream); - string contents = reader.ReadToEnd(); - return new GetCachedQueryResult(exists: true, localPath: key, contents: contents); - } + char[] contents = ReadCached(key); + return new GetCachedQueryResult(exists: true, localPath: key, contents: contents); } public static GetCachedQueryResult GetOrInstall (AbstractCURI curi) @@ -243,7 +298,25 @@ public static GetCachedQueryResult GetOrInstall (AbstractCURI curi) public static void Clear (ClearMode clearMode) { - throw new NotImplementedException(); + switch (clearMode) + { + case ClearMode.ERASE: + Erase(); + break; + case ClearMode.INDEXED: + ClearIndexed(); + break; + case ClearMode.UNINDEXED: + ClearUnindexed(); + break; + } + } + + public enum ClearMode + { + ERASE, + INDEXED, + UNINDEXED } public static void Install (AbstractCURI sourceCURI, bool overwrite = false) @@ -301,12 +374,5 @@ public static void Refresh (AbstractCURI? sourceCURI, bool all = false) LOGGER.Error("'--all' is false and the source CURI is null. Refresh failed."); } } - - public enum ClearMode - { - ERASE, - INDEXED, - DIRECTORIES - } } } diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/CSharp/Core/Crimson.cs index b9041fb..76d92ed 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/CSharp/Core/Crimson.cs @@ -1,4 +1,7 @@ -using NLog; + +#define DEBUG + +using NLog; using Crimson.CSharp.Core; using Crimson.CSharp.Linking; using Crimson.CSharp.Specialising; @@ -14,8 +17,10 @@ namespace Crimson.CSharp.Core { + internal class Crimson { + private static Logger? LOGGER; public static readonly string VERSION = "v0.0"; @@ -30,8 +35,9 @@ public static int Main (string[] args) ShowCredits(); // Setup arguments - bool useAutowiredArgs = true; - args = useAutowiredArgs ? GetTestArguments() : args; +#if DEBUG + args = GetTestArguments() ?? args; +#endif Console.WriteLine(String.Join(' ', args)); // @@ -63,19 +69,19 @@ public static int Main (string[] args) // ================= STARTUP ================= - +#if DEBUG private static string[] GetTestArguments () { Console.WriteLine("OVERRIDING INPUT ARGUMENTS FOR TESTING"); - bool COMPILE = false; + bool COMPILE = true; if (COMPILE) { return new string[] { $"compile", - $"-s Resources/Test Compilations/main.crm", - $"-t Resources/Test Compilations/result/main", - $"-n Resources/Native Library/", + $"-s relative:///Resources/Test Compilations/main.crm", + $"-t relative:///Resources/Test Compilations/result/main", + $"-n relative:///Resources/Native Library/", $"-w 4" }; } @@ -90,12 +96,14 @@ private static string[] GetTestArguments () }; } - bool CLEAR = true; + bool CLEAR = false; if (CLEAR) { return new string[] { $"clear", - $"-e" + $"-e", + //$"-i" + //$"-u" }; } @@ -111,6 +119,7 @@ private static string[] GetTestArguments () return null!; } +#endif private static void ShowSplash () @@ -174,13 +183,25 @@ private static void ConfigureMultithreading () // - public static FileInfo GetRoamingFile (string path) + public static string GetRoamingPath (string path) { string roaming = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); string relative = $"Crimson/{path}"; string combined = Path.Combine(roaming, relative); string full = Path.GetFullPath(combined); - return new FileInfo(full); + return full; + } + + public static FileInfo GetRoamingFile (string path) + { + string betterPath = GetRoamingPath(path); + return new FileInfo(betterPath); + } + + public static DirectoryInfo GetRoamingDirectory (string path) + { + string betterPath = GetRoamingPath(path); + return new DirectoryInfo(betterPath); } diff --git a/Crimson/CSharp/Core/CrimsonOptions.cs b/Crimson/CSharp/Core/CrimsonOptions.cs index e46e32d..b3e2a02 100644 --- a/Crimson/CSharp/Core/CrimsonOptions.cs +++ b/Crimson/CSharp/Core/CrimsonOptions.cs @@ -121,7 +121,7 @@ public class Clear public bool Erase { get; set; } // - [Option(longName: "directories", shortName: 'd', + [Option(longName: "unindexed", shortName: 'u', Required = false, Group = "mode", HelpText = "Remove directories regardless of contents.")] @@ -140,7 +140,7 @@ public Cache.ClearMode ClearMode { (true, false, false) => Cache.ClearMode.ERASE, (false, true, false) => Cache.ClearMode.INDEXED, - (false, false, true) => Cache.ClearMode.DIRECTORIES, + (false, false, true) => Cache.ClearMode.UNINDEXED, _ => throw new ClearModeException(this) }; } diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/CSharp/Core/Library.cs index ab93d36..c924580 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/CSharp/Core/Library.cs @@ -106,7 +106,7 @@ public Scope LoadScope (AbstractCURI uri) { LOGGER.Info($"Loading scope from {uri}"); - Cache.GetCachedQueryResult result = Cache.Get(uri); + Cache.GetCachedQueryResult result = Cache.GetOrInstall(uri); if (!result.Exists) throw new NullReferenceException($"Library was unable to get cached or fetch new contents of {uri}."); Scope scope = ParseScopeText(uri, result.Contents!); @@ -253,15 +253,15 @@ private void LoadScopeDependencies (Scope root) } } - private Scope ParseScopeText (AbstractCURI source, string textIn) + private Scope ParseScopeText (AbstractCURI source, char[] data) { try { - LOGGER.Debug($"Parsing {textIn.Length} characters from {source} with ANTLR..."); + LOGGER.Debug($"Parsing {data.Length} characters from {source} with ANTLR..."); string sourceName = $"{source}"; // Get Antlr context - AntlrInputStream a4is = new AntlrInputStream(textIn); + AntlrInputStream a4is = new AntlrInputStream(data, data.Length); CrimsonLexer lexer = new CrimsonLexer(a4is); lexer.AddErrorListener(new LexerErrorListener(sourceName)); From e420fe08ad5d5b23c2510a3eb122f116c7526d7b Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Thu, 13 Apr 2023 11:18:42 +0100 Subject: [PATCH 076/122] How do I manage relative imports from remote imports? + Parameter 'anchor' for ICURIFactory.Make() + Documentation for ICURIFactory.Make() regarding management of remote imports' imports. + RelativeCURI will reject anchors which are relative:// + RelativeCURI will now take an anchor + Renamed parameter 'uri' of AbstractCURI.Create() to relativeOrAbsoluteUri + Added parameter anchor to AbstractCURI.Create(rOAUri, anchor) --- Crimson/CSharp/Core/CURI/AbstractCURI.cs | 18 +++---- Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs | 10 +++- Crimson/CSharp/Core/CURI/HttpCURI.cs | 2 +- Crimson/CSharp/Core/CURI/ICURIFactory.cs | 53 +++++++++++++++++++- Crimson/CSharp/Core/CURI/RelativeCURI.cs | 26 ++++++---- 5 files changed, 86 insertions(+), 23 deletions(-) diff --git a/Crimson/CSharp/Core/CURI/AbstractCURI.cs b/Crimson/CSharp/Core/CURI/AbstractCURI.cs index c5db1fd..5d9c803 100644 --- a/Crimson/CSharp/Core/CURI/AbstractCURI.cs +++ b/Crimson/CSharp/Core/CURI/AbstractCURI.cs @@ -94,27 +94,27 @@ public override string ToString () { RelativeCURI.SCHEME, new RelativeCURI.Factory() } }; - public static AbstractCURI? Create (string uriText) + public static AbstractCURI? Create (string relativeOrAbsoluteUri, AbstractCURI? anchor) { - if (String.IsNullOrWhiteSpace(uriText)) + if (String.IsNullOrWhiteSpace(relativeOrAbsoluteUri)) return null; - string trimmedText = uriText.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); + string trimmedText = relativeOrAbsoluteUri.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); if (Uri.TryCreate(trimmedText, new UriCreationOptions { DangerousDisablePathAndQueryCanonicalization = false }, out Uri? uri)) - return Create(uri); + return Create(uri, anchor); - throw new UriFormatException($"Unable to parse illegal URI string '{trimmedText}' ({uriText})"); + throw new UriFormatException($"Unable to parse illegal URI string '{trimmedText}' ({relativeOrAbsoluteUri})"); } - public static AbstractCURI Create (Uri uri) + public static AbstractCURI Create (Uri relativeOrAbsoluteUri, AbstractCURI? anchor) { - if (Factories.TryGetValue(uri.Scheme, out ICURIFactory? factory)) + if (Factories.TryGetValue(relativeOrAbsoluteUri.Scheme, out ICURIFactory? factory)) { - return factory!.Make(uri); + return factory!.Make(relativeOrAbsoluteUri, anchor); } - throw new UriFormatException($"No CURI factory is registered for URIs with scheme {uri.Host}: {uri}"); + throw new UriFormatException($"No CURI factory is registered for URIs with scheme {relativeOrAbsoluteUri.Host}: {relativeOrAbsoluteUri}"); } } } diff --git a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs b/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs index 29855c5..252ab4d 100644 --- a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs +++ b/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs @@ -47,9 +47,15 @@ public override Stream GetStream () public class Factory : ICURIFactory { - public AbstractCURI Make (Uri uri) + /// + /// Implementation of which ignores the . + /// + /// + /// + /// A of the . + public AbstractCURI Make (Uri absoluteOrRelativeUri, AbstractCURI? anchor) { - return new FileAbsoluteCURI(uri); + return new FileAbsoluteCURI(absoluteOrRelativeUri); } } } diff --git a/Crimson/CSharp/Core/CURI/HttpCURI.cs b/Crimson/CSharp/Core/CURI/HttpCURI.cs index 9827e68..3b00741 100644 --- a/Crimson/CSharp/Core/CURI/HttpCURI.cs +++ b/Crimson/CSharp/Core/CURI/HttpCURI.cs @@ -40,7 +40,7 @@ public override Stream GetStream () public class Factory : ICURIFactory { - public AbstractCURI Make (Uri uri) + public AbstractCURI Make (Uri relativeOrAbsoluteUri, AbstractCURI? anchor) { return new HttpCURI(uri); } diff --git a/Crimson/CSharp/Core/CURI/ICURIFactory.cs b/Crimson/CSharp/Core/CURI/ICURIFactory.cs index 1480bc8..fc6f599 100644 --- a/Crimson/CSharp/Core/CURI/ICURIFactory.cs +++ b/Crimson/CSharp/Core/CURI/ICURIFactory.cs @@ -8,6 +8,57 @@ namespace Crimson.CSharp.Core.CURI { public interface ICURIFactory { - AbstractCURI Make (Uri uri); + /// + /// + /// For example: Given the URI http://example.com/program.crm had an import which used the + /// relative CURI relative://utilities.crm, to load the import, one should + /// + /// + /// + /// A note on relativity: Consider a Crimson project which contains the files: + /// + /// // Local files + /// C:/ + /// | Programming/ + /// | | program.crm + /// + /// // Remote files + /// example.com/ + /// | Crimson/ + /// | | utilities.crm + /// | | maths.crm + /// + /// + /// These files contain the code: + /// + /// // C:/Programming/program.crm + /// // Pull in a remote file as an import + /// #using "http://example.com/Crimson/utilities.crm" as utilities + /// + /// // example.com/Crimson/utilities.crm + /// // The remote file declares its own dependencies + /// #using "relative://maths.crm" as maths + /// + /// // example.com/Crimson/maths.crm + /// // This file has no imports + /// + /// + /// + /// The remote file utilities.crm contains a relative import. + /// To generate a CURI for this file, one should give the relative address 'relative://maths.crm' as the + /// and the path of the calling file 'http://example.com/Crimson/utilities.crm' as the . + /// This would generate the CURI 'http://example.com/Crimson/maths.crm', or an equivalent, depending on the schemes of the URI/CURI and + /// the implementation of the . + /// + /// General rules (dependent on implementation): + /// + /// When the is absolute, the may be ignored. + /// + /// + /// + /// The URI to create a CURI from. For example http://example.com/file.txt + /// In case the URI path is relative, this is the anchor point which it should be relative to. + /// + AbstractCURI Make (Uri relativeOrAbsoluteUri, AbstractCURI? anchor); } } diff --git a/Crimson/CSharp/Core/CURI/RelativeCURI.cs b/Crimson/CSharp/Core/CURI/RelativeCURI.cs index b7628da..a3c4e8a 100644 --- a/Crimson/CSharp/Core/CURI/RelativeCURI.cs +++ b/Crimson/CSharp/Core/CURI/RelativeCURI.cs @@ -10,13 +10,7 @@ namespace Crimson.CSharp.Core.CURI { /// - /// - /// Crimson URI - /// - /// - /// A wrapper class for a Uri which conceals all of the strange things which Crimson - /// does in the background (i.e. custom "root.crimson" and "native.crimson" hosts). - /// + /// A CURI which inherits the scheme of its anchor and creates a new path by combining the paths of its anchor and its path. /// public class RelativeCURI : AbstractCURI { @@ -36,14 +30,26 @@ public string AbsolutePath } } + public AbstractCURI Anchor { get; private set; } + + public AbstractCURI Result + { + get + { + return null; + } + } + public override bool Equals (AbstractCURI? other) { return other?.Uri?.Equals(Uri) ?? false; } - public RelativeCURI (Uri uri) : base(uri) + public RelativeCURI (Uri relative, AbstractCURI anchor) : base(relative) { - if (!SCHEME.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {SCHEME}. Found '{uri.Scheme}'."); + Anchor = anchor; + if (SCHEME.Equals(Anchor.Uri.Scheme)) throw new UriFormatException($"The anchor {anchor} for the {GetType()} {relative} may not be relative."); + if (!SCHEME.Equals(relative.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {SCHEME}. Found '{relative.Scheme}'."); string abs = WebUtility.UrlDecode(Uri.AbsolutePath); if (Path.IsPathRooted(abs)) throw new UriFormatException($"The path of a {GetType()} may not be rooted."); @@ -53,7 +59,7 @@ public override Stream GetStream () { try { - return File.OpenRead(AbsolutePath); + return Result.GetStream(); } catch (Exception ex) { From 20087238427763dc85c93ebf279fef515157e4a0 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sun, 16 Apr 2023 14:48:07 +0100 Subject: [PATCH 077/122] WOAH BIG RENAMING Also created Berry project :) --- .vscode/launch.json | 26 -- .vscode/tasks.json | 41 --- Berry/API/IBerryClient.cs | 7 + Berry/Berry.cs | 32 ++ Berry/Berry.csproj | 9 + Berry/Properties/launchSettings.json | 28 ++ Berry/appsettings.Development.json | 9 + Berry/appsettings.json | 9 + .../CSharp/Exceptions/LexerErrorListener.cs | 21 -- .../CSharp/Exceptions/LinkingExceptions.cs | 22 -- .../CSharp/Exceptions/ParserErrorListener.cs | 21 -- Crimson/CSharp/Parsing/IHasScope.cs | 7 - .../Statements/AbstractCrimsonStatement.cs | 22 -- .../FunctionCallResolvableValueCToken.cs | 28 -- .../Tokens/Values/RawResolvableValueCToken.cs | 39 --- .../Tokens/Values/SimpleValueCToken.cs | 16 - .../AbstractSpecificAssemblyProgram.cs | 16 - .../{CSharp/Core => }/CURI/AbstractCURI.cs | 15 +- .../Core => }/CURI/FileAbsoluteCURI.cs | 10 +- Crimson/{CSharp/Core => }/CURI/HttpCURI.cs | 4 +- .../{CSharp/Core => }/CURI/ICURIFactory.cs | 4 +- Crimson/{CSharp/Core => }/CURI/NativeCURI.cs | 5 +- .../{CSharp/Core => }/CURI/RelativeCURI.cs | 5 +- .../Cache.cs => Core/CachedBerryClient.cs} | 29 +- Crimson/{CSharp => }/Core/Compilation.cs | 14 +- Crimson/{CSharp => }/Core/Compiler.cs | 16 +- Crimson/{CSharp => }/Core/CrimsonOptions.cs | 22 +- Crimson/{CSharp => }/Core/Library.cs | 28 +- Crimson/{CSharp/Core => }/Crimson.cs | 48 +-- Crimson/Crimson.csproj | 2 +- .../Exceptions/CrimsonException.cs | 6 +- .../Exceptions/GeneralisingExceptions.cs | 6 +- Crimson/Exceptions/LexerErrorListener.cs | 21 ++ Crimson/Exceptions/LinkingExceptions.cs | 22 ++ Crimson/Exceptions/ParserErrorListener.cs | 21 ++ .../Exceptions/ParsingExceptions.cs | 24 +- .../Generalising/GeneralAssemblyProgram.cs | 6 +- .../Generalising/GeneralisationContext.cs | 16 +- .../{CSharp => }/Generalising/Generaliser.cs | 23 +- .../Generalising/IGeneralAssemblyStructure.cs | 4 +- .../Structures/ArbitraryAssemblyStructure.cs | 8 +- .../Structures/CommentAssemblyStructure.cs | 11 +- .../Structures/ConstantAssemblyStructure.cs | 8 +- .../Structures/EmptyAssemblyStructure.cs | 8 +- .../Structures/IndentAssemblyStructure.cs | 10 +- .../Structures/JumpAssemblyStructure.cs | 8 +- .../Structures/LabelAssemblyStructure.cs | 8 +- .../Structures/ReturnAssemblyStructure.cs | 8 +- .../Structures/ScopeAssemblyStructure.cs | 12 +- .../Structures/SubroutineAssemblyStructure.cs | 7 +- Crimson/{CSharp => }/Linking/Linker.cs | 8 +- Crimson/{CSharp => }/Linking/LinkerHelper.cs | 16 +- .../{CSharp => }/Linking/LinkingContext.cs | 20 +- Crimson/Parsing/IHasScope.cs | 7 + Crimson/{CSharp => }/Parsing/Scope.cs | 18 +- Crimson/{CSharp => }/Parsing/ScopeVisitor.cs | 23 +- .../Statements/AbstractCrimsonStatement.cs | 22 ++ .../Statements/AssemblyCallCStatement.cs | 10 +- .../Parsing/Statements/BasicCallCStatement.cs | 14 +- .../Parsing/Statements/FunctionCStatement.cs | 16 +- .../Statements/FunctionCallCStatement.cs | 16 +- .../Statements/GlobalVariableCStatement.cs | 20 +- .../{CSharp => }/Parsing/Statements/INamed.cs | 6 +- .../Parsing/Statements/IfBlockCStatement.cs | 12 +- .../Parsing/Statements/ImportCStatement.cs | 10 +- .../Statements/OperationHandlerCStatement.cs | 14 +- .../Parsing/Statements/ReturnCStatement.cs | 10 +- .../Statements/ScopeVariableCStatement.cs | 20 +- .../Parsing/Statements/StructureCStatement.cs | 12 +- .../VariableAssignmentCStatement.cs | 16 +- .../Statements/WhileBlockCStatement.cs | 12 +- .../Parsing/Tokens/ComparatorCToken.cs | 8 +- .../Parsing/Tokens/ConditionCToken.cs | 14 +- .../Parsing/Tokens/ElifBlockCToken.cs | 8 +- .../Parsing/Tokens/ElseBlockCToken.cs | 6 +- .../Parsing/Tokens/FullNameCToken.cs | 6 +- .../Parsing/Tokens/FunctionArgumentCToken.cs | 2 +- .../Parsing/Tokens/ICrimsonToken.cs | 6 +- .../Parsing/Tokens/ParameterCToken.cs | 4 +- .../{CSharp => }/Parsing/Tokens/TypeCToken.cs | 2 +- .../Tokens/Values/ComplexValueCToken.cs | 6 +- .../FunctionCallResolvableValueCToken.cs | 28 ++ .../Values/IdentifierSimpleValueCToken.cs | 24 +- .../Values/OperationResolvableValueCToken.cs | 14 +- .../Tokens/Values/RawResolvableValueCToken.cs | 39 +++ .../Tokens/Values/SimpleValueCToken.cs | 16 + .../AbstractSpecificAssemblyProgram.cs | 16 + .../AbstractSpecificAssemblyStatement.cs | 2 +- Crimson/{CSharp => }/Specialising/Fragment.cs | 14 +- .../{CSharp => }/Specialising/ISpecialiser.cs | 6 +- .../Specialising/RFASM/RFASMComment.cs | 2 +- .../Specialising/RFASM/RFASMProgram.cs | 21 +- .../Specialising/RFASM/RFASMSpecialiser.cs | 7 +- .../Specialising/RFASM/RFASMStatement.cs | 3 +- CrimsonBasic/CSharp/Core/BasicProgram.cs | 31 -- CrimsonBasic/CSharp/Core/CrimsonBasic.cs | 12 - CrimsonBasic/CSharp/Core/Fragment.cs | 69 ---- .../CSharp/Exceptions/NamingException.cs | 14 - .../CSharp/Statements/ArbitraryBStatement.cs | 17 - .../CSharp/Statements/AssemblyBStatement.cs | 17 - .../CSharp/Statements/BasicStatement.cs | 8 - .../CSharp/Statements/CommentBStatement.cs | 25 -- .../CSharp/Statements/DecSpBStatement.cs | 23 -- .../CSharp/Statements/IncSpBStatement.cs | 23 -- .../CSharp/Statements/JumpBStatement.cs | 23 -- .../CSharp/Statements/JumpEqualBStatement.cs | 31 -- .../CSharp/Statements/JumpSubBStatement.cs | 23 -- .../CSharp/Statements/LabelBStatement.cs | 23 -- .../CSharp/Statements/PopSfBStatement.cs | 21 -- .../CSharp/Statements/PushSfBStatement.cs | 21 -- .../CSharp/Statements/RegSetBStatement.cs | 25 -- .../CSharp/Statements/ReturnBStatement.cs | 20 -- .../CSharp/Statements/SetBStatement.cs | 28 -- CrimsonBasic/CrimsonBasic.csproj | 15 - .../Resources/CrimsonBasicNotepad++.xml | 64 ---- .../Core => Antlr}/LexerErrorListener.cs | 8 +- .../Core => Antlr}/ParserErrorListener.cs | 9 +- RedFoxAssembly/Antlr/RFASMProgramVisitor.cs | 311 +++++++++++++++++ .../{ => generation}/Input/RedFoxAssembly.g4 | 0 .../Output/RedFoxAssembly.interp | 0 .../Output/RedFoxAssembly.tokens | 0 .../Output/RedFoxAssemblyBaseListener.cs | 0 .../Output/RedFoxAssemblyBaseVisitor.cs | 0 .../Output/RedFoxAssemblyLexer.cs | 0 .../Output/RedFoxAssemblyLexer.interp | 0 .../Output/RedFoxAssemblyLexer.tokens | 0 .../Output/RedFoxAssemblyListener.cs | 0 .../Output/RedFoxAssemblyParser.cs | 0 .../Output/RedFoxAssemblyVisitor.cs | 0 .../antlr-4.11.1-complete.jar | Bin .../Antlr/{ => generation}/build.bat | 0 .../CSharp/Core/ParsingException.cs | 14 - .../CSharp/Core/RFASMProgramVisitor.cs | 320 ------------------ .../{CSharp => }/Core/CompilerUtils.cs | 6 +- .../{CSharp => }/Core/ProgramMetadata.cs | 40 +-- .../{CSharp => }/Core/RFASMCompiler.cs | 20 +- .../{CSharp => }/Core/RFASMOptions.cs | 12 +- .../CompilationException.cs | 2 +- RedFoxAssembly/Exceptions/ParsingException.cs | 14 + .../PreCompilationException.cs | 4 +- .../{CSharp/Core => }/RedFoxAssembly.cs | 19 +- RedFoxAssembly/RedFoxAssembly.csproj | 26 +- .../Statements/ConfigurationType.cs | 2 +- .../{CSharp => }/Statements/ICommand.cs | 4 +- .../{CSharp => }/Statements/IConfiguration.cs | 4 +- .../{CSharp => }/Statements/IData.cs | 9 +- .../Statements/InstructionCommand.cs | 8 +- .../Statements/InstructionType.cs | 2 +- .../{CSharp => }/Statements/LabelCommand.cs | 13 +- .../{CSharp => }/Statements/RByte.cs | 25 +- .../{CSharp => }/Statements/RFASMProgram.cs | 6 +- .../{CSharp => }/Statements/RepeatCommand.cs | 13 +- .../Statements/ValueConfiguration.cs | 15 +- .../Statements/WidthConfiguration.cs | 4 +- .../{CSharp => }/Statements/Word.cs | 33 +- RedFoxVM.sln | 9 + 156 files changed, 1122 insertions(+), 1711 deletions(-) delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/tasks.json create mode 100644 Berry/API/IBerryClient.cs create mode 100644 Berry/Berry.cs create mode 100644 Berry/Berry.csproj create mode 100644 Berry/Properties/launchSettings.json create mode 100644 Berry/appsettings.Development.json create mode 100644 Berry/appsettings.json delete mode 100644 Crimson/CSharp/Exceptions/LexerErrorListener.cs delete mode 100644 Crimson/CSharp/Exceptions/LinkingExceptions.cs delete mode 100644 Crimson/CSharp/Exceptions/ParserErrorListener.cs delete mode 100644 Crimson/CSharp/Parsing/IHasScope.cs delete mode 100644 Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs delete mode 100644 Crimson/CSharp/Parsing/Tokens/Values/FunctionCallResolvableValueCToken.cs delete mode 100644 Crimson/CSharp/Parsing/Tokens/Values/RawResolvableValueCToken.cs delete mode 100644 Crimson/CSharp/Parsing/Tokens/Values/SimpleValueCToken.cs delete mode 100644 Crimson/CSharp/Specialising/AbstractSpecificAssemblyProgram.cs rename Crimson/{CSharp/Core => }/CURI/AbstractCURI.cs (93%) rename Crimson/{CSharp/Core => }/CURI/FileAbsoluteCURI.cs (85%) rename Crimson/{CSharp/Core => }/CURI/HttpCURI.cs (95%) rename Crimson/{CSharp/Core => }/CURI/ICURIFactory.cs (96%) rename Crimson/{CSharp/Core => }/CURI/NativeCURI.cs (96%) rename Crimson/{CSharp/Core => }/CURI/RelativeCURI.cs (97%) rename Crimson/{CSharp/Core/Cache.cs => Core/CachedBerryClient.cs} (95%) rename Crimson/{CSharp => }/Core/Compilation.cs (90%) rename Crimson/{CSharp => }/Core/Compiler.cs (94%) rename Crimson/{CSharp => }/Core/CrimsonOptions.cs (92%) rename Crimson/{CSharp => }/Core/Library.cs (93%) rename Crimson/{CSharp/Core => }/Crimson.cs (91%) rename Crimson/{CSharp => }/Exceptions/CrimsonException.cs (77%) rename Crimson/{CSharp => }/Exceptions/GeneralisingExceptions.cs (54%) create mode 100644 Crimson/Exceptions/LexerErrorListener.cs create mode 100644 Crimson/Exceptions/LinkingExceptions.cs create mode 100644 Crimson/Exceptions/ParserErrorListener.cs rename Crimson/{CSharp => }/Exceptions/ParsingExceptions.cs (74%) rename Crimson/{CSharp => }/Generalising/GeneralAssemblyProgram.cs (72%) rename Crimson/{CSharp => }/Generalising/GeneralisationContext.cs (86%) rename Crimson/{CSharp => }/Generalising/Generaliser.cs (91%) rename Crimson/{CSharp => }/Generalising/IGeneralAssemblyStructure.cs (83%) rename Crimson/{CSharp => }/Generalising/Structures/ArbitraryAssemblyStructure.cs (70%) rename Crimson/{CSharp => }/Generalising/Structures/CommentAssemblyStructure.cs (73%) rename Crimson/{CSharp => }/Generalising/Structures/ConstantAssemblyStructure.cs (86%) rename Crimson/{CSharp => }/Generalising/Structures/EmptyAssemblyStructure.cs (67%) rename Crimson/{CSharp => }/Generalising/Structures/IndentAssemblyStructure.cs (72%) rename Crimson/{CSharp => }/Generalising/Structures/JumpAssemblyStructure.cs (71%) rename Crimson/{CSharp => }/Generalising/Structures/LabelAssemblyStructure.cs (71%) rename Crimson/{CSharp => }/Generalising/Structures/ReturnAssemblyStructure.cs (67%) rename Crimson/{CSharp => }/Generalising/Structures/ScopeAssemblyStructure.cs (61%) rename Crimson/{CSharp => }/Generalising/Structures/SubroutineAssemblyStructure.cs (89%) rename Crimson/{CSharp => }/Linking/Linker.cs (90%) rename Crimson/{CSharp => }/Linking/LinkerHelper.cs (87%) rename Crimson/{CSharp => }/Linking/LinkingContext.cs (91%) create mode 100644 Crimson/Parsing/IHasScope.cs rename Crimson/{CSharp => }/Parsing/Scope.cs (96%) rename Crimson/{CSharp => }/Parsing/ScopeVisitor.cs (96%) create mode 100644 Crimson/Parsing/Statements/AbstractCrimsonStatement.cs rename Crimson/{CSharp => }/Parsing/Statements/AssemblyCallCStatement.cs (78%) rename Crimson/{CSharp => }/Parsing/Statements/BasicCallCStatement.cs (52%) rename Crimson/{CSharp => }/Parsing/Statements/FunctionCStatement.cs (90%) rename Crimson/{CSharp => }/Parsing/Statements/FunctionCallCStatement.cs (86%) rename Crimson/{CSharp => }/Parsing/Statements/GlobalVariableCStatement.cs (82%) rename Crimson/{CSharp => }/Parsing/Statements/INamed.cs (70%) rename Crimson/{CSharp => }/Parsing/Statements/IfBlockCStatement.cs (91%) rename Crimson/{CSharp => }/Parsing/Statements/ImportCStatement.cs (84%) rename Crimson/{CSharp => }/Parsing/Statements/OperationHandlerCStatement.cs (78%) rename Crimson/{CSharp => }/Parsing/Statements/ReturnCStatement.cs (71%) rename Crimson/{CSharp => }/Parsing/Statements/ScopeVariableCStatement.cs (77%) rename Crimson/{CSharp => }/Parsing/Statements/StructureCStatement.cs (80%) rename Crimson/{CSharp => }/Parsing/Statements/VariableAssignmentCStatement.cs (86%) rename Crimson/{CSharp => }/Parsing/Statements/WhileBlockCStatement.cs (86%) rename Crimson/{CSharp => }/Parsing/Tokens/ComparatorCToken.cs (83%) rename Crimson/{CSharp => }/Parsing/Tokens/ConditionCToken.cs (80%) rename Crimson/{CSharp => }/Parsing/Tokens/ElifBlockCToken.cs (77%) rename Crimson/{CSharp => }/Parsing/Tokens/ElseBlockCToken.cs (77%) rename Crimson/{CSharp => }/Parsing/Tokens/FullNameCToken.cs (94%) rename Crimson/{CSharp => }/Parsing/Tokens/FunctionArgumentCToken.cs (56%) rename Crimson/{CSharp => }/Parsing/Tokens/ICrimsonToken.cs (61%) rename Crimson/{CSharp => }/Parsing/Tokens/ParameterCToken.cs (70%) rename Crimson/{CSharp => }/Parsing/Tokens/TypeCToken.cs (80%) rename Crimson/{CSharp => }/Parsing/Tokens/Values/ComplexValueCToken.cs (62%) create mode 100644 Crimson/Parsing/Tokens/Values/FunctionCallResolvableValueCToken.cs rename Crimson/{CSharp => }/Parsing/Tokens/Values/IdentifierSimpleValueCToken.cs (67%) rename Crimson/{CSharp => }/Parsing/Tokens/Values/OperationResolvableValueCToken.cs (80%) create mode 100644 Crimson/Parsing/Tokens/Values/RawResolvableValueCToken.cs create mode 100644 Crimson/Parsing/Tokens/Values/SimpleValueCToken.cs create mode 100644 Crimson/Specialising/AbstractSpecificAssemblyProgram.cs rename Crimson/{CSharp => }/Specialising/AbstractSpecificAssemblyStatement.cs (64%) rename Crimson/{CSharp => }/Specialising/Fragment.cs (79%) rename Crimson/{CSharp => }/Specialising/ISpecialiser.cs (89%) rename Crimson/{CSharp => }/Specialising/RFASM/RFASMComment.cs (91%) rename Crimson/{CSharp => }/Specialising/RFASM/RFASMProgram.cs (69%) rename Crimson/{CSharp => }/Specialising/RFASM/RFASMSpecialiser.cs (81%) rename Crimson/{CSharp => }/Specialising/RFASM/RFASMStatement.cs (72%) delete mode 100644 CrimsonBasic/CSharp/Core/BasicProgram.cs delete mode 100644 CrimsonBasic/CSharp/Core/CrimsonBasic.cs delete mode 100644 CrimsonBasic/CSharp/Core/Fragment.cs delete mode 100644 CrimsonBasic/CSharp/Exceptions/NamingException.cs delete mode 100644 CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/AssemblyBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/BasicStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/CommentBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/DecSpBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/IncSpBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/JumpBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/JumpEqualBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/JumpSubBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/LabelBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/PopSfBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/PushSfBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/RegSetBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/ReturnBStatement.cs delete mode 100644 CrimsonBasic/CSharp/Statements/SetBStatement.cs delete mode 100644 CrimsonBasic/CrimsonBasic.csproj delete mode 100644 CrimsonBasic/Resources/CrimsonBasicNotepad++.xml rename RedFoxAssembly/{CSharp/Core => Antlr}/LexerErrorListener.cs (66%) rename RedFoxAssembly/{CSharp/Core => Antlr}/ParserErrorListener.cs (67%) create mode 100644 RedFoxAssembly/Antlr/RFASMProgramVisitor.cs rename RedFoxAssembly/Antlr/{ => generation}/Input/RedFoxAssembly.g4 (100%) rename RedFoxAssembly/Antlr/{ => generation}/Output/RedFoxAssembly.interp (100%) rename RedFoxAssembly/Antlr/{ => generation}/Output/RedFoxAssembly.tokens (100%) rename RedFoxAssembly/Antlr/{ => generation}/Output/RedFoxAssemblyBaseListener.cs (100%) rename RedFoxAssembly/Antlr/{ => generation}/Output/RedFoxAssemblyBaseVisitor.cs (100%) rename RedFoxAssembly/Antlr/{ => generation}/Output/RedFoxAssemblyLexer.cs (100%) rename RedFoxAssembly/Antlr/{ => generation}/Output/RedFoxAssemblyLexer.interp (100%) rename RedFoxAssembly/Antlr/{ => generation}/Output/RedFoxAssemblyLexer.tokens (100%) rename RedFoxAssembly/Antlr/{ => generation}/Output/RedFoxAssemblyListener.cs (100%) rename RedFoxAssembly/Antlr/{ => generation}/Output/RedFoxAssemblyParser.cs (100%) rename RedFoxAssembly/Antlr/{ => generation}/Output/RedFoxAssemblyVisitor.cs (100%) rename RedFoxAssembly/Antlr/{ => generation}/antlr-4.11.1-complete.jar (100%) rename RedFoxAssembly/Antlr/{ => generation}/build.bat (100%) delete mode 100644 RedFoxAssembly/CSharp/Core/ParsingException.cs delete mode 100644 RedFoxAssembly/CSharp/Core/RFASMProgramVisitor.cs rename RedFoxAssembly/{CSharp => }/Core/CompilerUtils.cs (93%) rename RedFoxAssembly/{CSharp => }/Core/ProgramMetadata.cs (79%) rename RedFoxAssembly/{CSharp => }/Core/RFASMCompiler.cs (91%) rename RedFoxAssembly/{CSharp => }/Core/RFASMOptions.cs (71%) rename RedFoxAssembly/{CSharp/Core => Exceptions}/CompilationException.cs (91%) create mode 100644 RedFoxAssembly/Exceptions/ParsingException.cs rename RedFoxAssembly/{CSharp/Core => Exceptions}/PreCompilationException.cs (63%) rename RedFoxAssembly/{CSharp/Core => }/RedFoxAssembly.cs (96%) rename RedFoxAssembly/{CSharp => }/Statements/ConfigurationType.cs (91%) rename RedFoxAssembly/{CSharp => }/Statements/ICommand.cs (77%) rename RedFoxAssembly/{CSharp => }/Statements/IConfiguration.cs (73%) rename RedFoxAssembly/{CSharp => }/Statements/IData.cs (89%) rename RedFoxAssembly/{CSharp => }/Statements/InstructionCommand.cs (90%) rename RedFoxAssembly/{CSharp => }/Statements/InstructionType.cs (95%) rename RedFoxAssembly/{CSharp => }/Statements/LabelCommand.cs (80%) rename RedFoxAssembly/{CSharp => }/Statements/RByte.cs (72%) rename RedFoxAssembly/{CSharp => }/Statements/RFASMProgram.cs (91%) rename RedFoxAssembly/{CSharp => }/Statements/RepeatCommand.cs (73%) rename RedFoxAssembly/{CSharp => }/Statements/ValueConfiguration.cs (76%) rename RedFoxAssembly/{CSharp => }/Statements/WidthConfiguration.cs (84%) rename RedFoxAssembly/{CSharp => }/Statements/Word.cs (78%) diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index ed38ef6..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md - "name": ".NET Core Launch (console)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/Crimson/bin/Debug/net6.0/Crimson.dll", - "args": [], - "cwd": "${workspaceFolder}/Crimson", - // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console - "console": "internalConsole", - "stopAtEntry": false - }, - { - "name": ".NET Core Attach", - "type": "coreclr", - "request": "attach" - } - ] -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 7e2a385..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "command": "dotnet", - "type": "process", - "args": [ - "build", - "${workspaceFolder}/Crimson/Crimson.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" - ], - "problemMatcher": "$msCompile" - }, - { - "label": "publish", - "command": "dotnet", - "type": "process", - "args": [ - "publish", - "${workspaceFolder}/Crimson/Crimson.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" - ], - "problemMatcher": "$msCompile" - }, - { - "label": "watch", - "command": "dotnet", - "type": "process", - "args": [ - "watch", - "run", - "--project", - "${workspaceFolder}/Crimson/Crimson.csproj" - ], - "problemMatcher": "$msCompile" - } - ] -} \ No newline at end of file diff --git a/Berry/API/IBerryClient.cs b/Berry/API/IBerryClient.cs new file mode 100644 index 0000000..3d2ef80 --- /dev/null +++ b/Berry/API/IBerryClient.cs @@ -0,0 +1,7 @@ +namespace Berry.API +{ + public interface IBerryClient + { + + } +} \ No newline at end of file diff --git a/Berry/Berry.cs b/Berry/Berry.cs new file mode 100644 index 0000000..a5664f2 --- /dev/null +++ b/Berry/Berry.cs @@ -0,0 +1,32 @@ +namespace Berry +{ + public class Berry + { + public static int Main (string[] args) + { + var builder = WebApplication.CreateBuilder(args); + + // Add services to the container. + builder.Services.AddRazorPages(); + + var app = builder.Build(); + + // Configure the HTTP request pipeline. + if (!app.Environment.IsDevelopment()) + { + app.UseExceptionHandler("/Error"); + } + app.UseStaticFiles(); + + app.UseRouting(); + + app.UseAuthorization(); + + app.MapRazorPages(); + + app.Run(); + + return 0; + } + } +} diff --git a/Berry/Berry.csproj b/Berry/Berry.csproj new file mode 100644 index 0000000..75a0ec9 --- /dev/null +++ b/Berry/Berry.csproj @@ -0,0 +1,9 @@ + + + + net7.0 + enable + enable + + + diff --git a/Berry/Properties/launchSettings.json b/Berry/Properties/launchSettings.json new file mode 100644 index 0000000..5a10a59 --- /dev/null +++ b/Berry/Properties/launchSettings.json @@ -0,0 +1,28 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:60535", + "sslPort": 0 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:5096", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Berry/appsettings.Development.json b/Berry/appsettings.Development.json new file mode 100644 index 0000000..770d3e9 --- /dev/null +++ b/Berry/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Berry/appsettings.json b/Berry/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/Berry/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Crimson/CSharp/Exceptions/LexerErrorListener.cs b/Crimson/CSharp/Exceptions/LexerErrorListener.cs deleted file mode 100644 index 7dd6218..0000000 --- a/Crimson/CSharp/Exceptions/LexerErrorListener.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Antlr4.Runtime; -using NLog; - -namespace Crimson.CSharp.Exceptions -{ - internal class LexerErrorListener : IAntlrErrorListener - { - public static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - - private string Name { get; set; } - public LexerErrorListener (string name) - { - Name = name; - } - - public void SyntaxError (TextWriter output, IRecognizer recognizer, int offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) - { - Core.Crimson.Panic($"A lexer error has occurred lexing {Name}", Core.Crimson.PanicCode.COMPILE_PARSE, null!); - } - } -} diff --git a/Crimson/CSharp/Exceptions/LinkingExceptions.cs b/Crimson/CSharp/Exceptions/LinkingExceptions.cs deleted file mode 100644 index 5428f66..0000000 --- a/Crimson/CSharp/Exceptions/LinkingExceptions.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Exceptions -{ - internal class LinkingException : ArgumentException - { - public LinkingException (string message) : base(message) { } - - public LinkingException (string message, Exception cause) : base(message, cause) { } - } - - internal class OtherLinkingException : ArgumentException - { - public OtherLinkingException (string message) : base(message) { } - - public OtherLinkingException (string message, Exception cause) : base(message, cause) { } - } -} diff --git a/Crimson/CSharp/Exceptions/ParserErrorListener.cs b/Crimson/CSharp/Exceptions/ParserErrorListener.cs deleted file mode 100644 index 41b8586..0000000 --- a/Crimson/CSharp/Exceptions/ParserErrorListener.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Antlr4.Runtime; -using NLog; - -namespace Crimson.CSharp.Exceptions -{ - internal class ParserErrorListener : IAntlrErrorListener - { - public static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); - - private string Name { get; set; } - public ParserErrorListener (string name) - { - Name = name; - } - - public void SyntaxError (TextWriter output, IRecognizer recognizer, IToken offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) - { - Core.Crimson.Panic($"A parser error has occurred parsing {Name}", Core.Crimson.PanicCode.COMPILE_PARSE, null!); - } - } -} diff --git a/Crimson/CSharp/Parsing/IHasScope.cs b/Crimson/CSharp/Parsing/IHasScope.cs deleted file mode 100644 index 7829460..0000000 --- a/Crimson/CSharp/Parsing/IHasScope.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Crimson.CSharp.Parsing -{ - internal interface IHasScope - { - Scope GetScope (); - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs b/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs deleted file mode 100644 index 9321ec3..0000000 --- a/Crimson/CSharp/Parsing/Statements/AbstractCrimsonStatement.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Linking; - -namespace Crimson.CSharp.Parsing.Statements -{ - /// - /// A collection of ICrimsonTokens which make a coherent "phrase". - /// - public abstract class AbstractCrimsonStatement - { - public bool Linked { get; set; } - - public abstract void Link (LinkingContext context); - - public abstract IGeneralAssemblyStructure Generalise (GeneralisationContext context); - - public override string ToString () - { - return GetType().Name; - } - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/Values/FunctionCallResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/Values/FunctionCallResolvableValueCToken.cs deleted file mode 100644 index 2d14cee..0000000 --- a/Crimson/CSharp/Parsing/Tokens/Values/FunctionCallResolvableValueCToken.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Statements; -using Crimson.CSharp.Specialising; - -namespace Crimson.CSharp.Parsing.Tokens.Values -{ - public class FunctionCallResolvableValueCToken : ComplexValueCToken - { - public FunctionCallCStatement FunctionCall { get; } - - public FunctionCallResolvableValueCToken(FunctionCallCStatement functionCall) - { - FunctionCall = functionCall; - } - - public override void Link(LinkingContext ctx) - { - FunctionCall.Link(ctx); - } - - public override string ToString() - { - return "Call: " + FunctionCall.Identifier.ToString() + "()"; - } - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/Values/RawResolvableValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/Values/RawResolvableValueCToken.cs deleted file mode 100644 index 596a981..0000000 --- a/Crimson/CSharp/Parsing/Tokens/Values/RawResolvableValueCToken.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Linking; - -namespace Crimson.CSharp.Parsing.Tokens.Values -{ - public class RawResolvableValueCToken : SimpleValueCToken - { - public string Content { get; } - - public RawResolvableValueCToken (string s) - { - Content = s; - } - - public override void Link (LinkingContext ctx) - { - } - - public override string ToString () - { - return GetText(); - } - - public override string GetText () - { - return Content; - } - - public override object Evaluate (GeneralisationContext context) - { - return Content; - } - - public override bool CanEvaluate () - { - return true; - } - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/Values/SimpleValueCToken.cs b/Crimson/CSharp/Parsing/Tokens/Values/SimpleValueCToken.cs deleted file mode 100644 index 9d2c519..0000000 --- a/Crimson/CSharp/Parsing/Tokens/Values/SimpleValueCToken.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Linking; - -namespace Crimson.CSharp.Parsing.Tokens.Values -{ - public abstract class SimpleValueCToken : ICrimsonToken - { - public SimpleValueCToken () - { - } - public abstract void Link (LinkingContext ctx); - public abstract string GetText (); - public abstract bool CanEvaluate (); - public abstract object Evaluate (GeneralisationContext context); - } -} \ No newline at end of file diff --git a/Crimson/CSharp/Specialising/AbstractSpecificAssemblyProgram.cs b/Crimson/CSharp/Specialising/AbstractSpecificAssemblyProgram.cs deleted file mode 100644 index e61a088..0000000 --- a/Crimson/CSharp/Specialising/AbstractSpecificAssemblyProgram.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Crimson.CSharp.Specialising -{ - public abstract class AbstractSpecificAssemblyProgram - { - - public abstract IEnumerable GetFragments (); - public abstract string GetExtension (); - public abstract void Write (string path); - } -} diff --git a/Crimson/CSharp/Core/CURI/AbstractCURI.cs b/Crimson/CURI/AbstractCURI.cs similarity index 93% rename from Crimson/CSharp/Core/CURI/AbstractCURI.cs rename to Crimson/CURI/AbstractCURI.cs index 5d9c803..be94a79 100644 --- a/Crimson/CSharp/Core/CURI/AbstractCURI.cs +++ b/Crimson/CURI/AbstractCURI.cs @@ -1,4 +1,5 @@ -using Crimson.CSharp.Exceptions; +using Crimson.Core; +using Crimson.Exceptions; using NLog; using System; using System.Collections.Generic; @@ -7,7 +8,7 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Core.CURI +namespace Crimson.CURI { /// /// @@ -28,7 +29,7 @@ public abstract class AbstractCURI : IEquatable /// /// /// Directly get the remote of the resource described by this . - /// Typically it is preferable to use as that will return a cached + /// Typically it is preferable to use as that will return a cached /// version if it exists which may reduce latency due to, for example, internet speeds. /// /// @@ -59,9 +60,7 @@ public string ToShortString () List parts = new List(); if (Uri.Segments.Length <= 5) - { parts.AddRange(Uri.Segments); - } else { parts.AddRange(Uri.Segments.Take(3)); @@ -69,7 +68,7 @@ public string ToShortString () parts.AddRange(Uri.Segments.TakeLast(2)); } - return $"{Uri.Scheme}://{Uri.UserInfo}@{Uri.Host}:{Uri.Port}{String.Join("", parts)}"; + return $"{Uri.Scheme}://{Uri.UserInfo}@{Uri.Host}:{Uri.Port}{string.Join("", parts)}"; } public override string ToString () @@ -96,7 +95,7 @@ public override string ToString () public static AbstractCURI? Create (string relativeOrAbsoluteUri, AbstractCURI? anchor) { - if (String.IsNullOrWhiteSpace(relativeOrAbsoluteUri)) + if (string.IsNullOrWhiteSpace(relativeOrAbsoluteUri)) return null; string trimmedText = relativeOrAbsoluteUri.Trim(' ', '\t', '\n', '\v', '\f', '\r', '"'); @@ -110,9 +109,7 @@ public override string ToString () public static AbstractCURI Create (Uri relativeOrAbsoluteUri, AbstractCURI? anchor) { if (Factories.TryGetValue(relativeOrAbsoluteUri.Scheme, out ICURIFactory? factory)) - { return factory!.Make(relativeOrAbsoluteUri, anchor); - } throw new UriFormatException($"No CURI factory is registered for URIs with scheme {relativeOrAbsoluteUri.Host}: {relativeOrAbsoluteUri}"); } diff --git a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs b/Crimson/CURI/FileAbsoluteCURI.cs similarity index 85% rename from Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs rename to Crimson/CURI/FileAbsoluteCURI.cs index 252ab4d..47a9fe8 100644 --- a/Crimson/CSharp/Core/CURI/FileAbsoluteCURI.cs +++ b/Crimson/CURI/FileAbsoluteCURI.cs @@ -7,7 +7,7 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Core.CURI +namespace Crimson.CURI { internal class FileAbsoluteCURI : AbstractCURI { @@ -22,17 +22,17 @@ public string AbsolutePath } } - public FileAbsoluteCURI (Uri uri) : base(uri) + public FileAbsoluteCURI(Uri uri) : base(uri) { if (!Uri.UriSchemeFile.Equals(uri.Scheme)) throw new UriFormatException($"{GetType()} may only take URIs of scheme {Uri.UriSchemeFile}. Found '{uri.Scheme}'."); } - public override bool Equals (AbstractCURI? other) + public override bool Equals(AbstractCURI? other) { return other?.Uri?.Equals(Uri) ?? false; } - public override Stream GetStream () + public override Stream GetStream() { try { @@ -53,7 +53,7 @@ public class Factory : ICURIFactory /// /// /// A of the . - public AbstractCURI Make (Uri absoluteOrRelativeUri, AbstractCURI? anchor) + public AbstractCURI Make(Uri absoluteOrRelativeUri, AbstractCURI? anchor) { return new FileAbsoluteCURI(absoluteOrRelativeUri); } diff --git a/Crimson/CSharp/Core/CURI/HttpCURI.cs b/Crimson/CURI/HttpCURI.cs similarity index 95% rename from Crimson/CSharp/Core/CURI/HttpCURI.cs rename to Crimson/CURI/HttpCURI.cs index 3b00741..95a7c03 100644 --- a/Crimson/CSharp/Core/CURI/HttpCURI.cs +++ b/Crimson/CURI/HttpCURI.cs @@ -1,11 +1,11 @@ -using Crimson.CSharp.Exceptions; +using Crimson.Exceptions; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Core.CURI +namespace Crimson.CURI { internal class HttpCURI : AbstractCURI { diff --git a/Crimson/CSharp/Core/CURI/ICURIFactory.cs b/Crimson/CURI/ICURIFactory.cs similarity index 96% rename from Crimson/CSharp/Core/CURI/ICURIFactory.cs rename to Crimson/CURI/ICURIFactory.cs index fc6f599..7fb0747 100644 --- a/Crimson/CSharp/Core/CURI/ICURIFactory.cs +++ b/Crimson/CURI/ICURIFactory.cs @@ -4,7 +4,7 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Core.CURI +namespace Crimson.CURI { public interface ICURIFactory { @@ -59,6 +59,6 @@ public interface ICURIFactory /// The URI to create a CURI from. For example http://example.com/file.txt /// In case the URI path is relative, this is the anchor point which it should be relative to. /// - AbstractCURI Make (Uri relativeOrAbsoluteUri, AbstractCURI? anchor); + AbstractCURI Make(Uri relativeOrAbsoluteUri, AbstractCURI? anchor); } } diff --git a/Crimson/CSharp/Core/CURI/NativeCURI.cs b/Crimson/CURI/NativeCURI.cs similarity index 96% rename from Crimson/CSharp/Core/CURI/NativeCURI.cs rename to Crimson/CURI/NativeCURI.cs index e6c2475..a720c6e 100644 --- a/Crimson/CSharp/Core/CURI/NativeCURI.cs +++ b/Crimson/CURI/NativeCURI.cs @@ -1,4 +1,5 @@ -using Crimson.CSharp.Exceptions; +using Crimson.Core; +using Crimson.Exceptions; using NLog; using System; using System.Collections.Generic; @@ -7,7 +8,7 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Core.CURI +namespace Crimson.CURI { /// /// diff --git a/Crimson/CSharp/Core/CURI/RelativeCURI.cs b/Crimson/CURI/RelativeCURI.cs similarity index 97% rename from Crimson/CSharp/Core/CURI/RelativeCURI.cs rename to Crimson/CURI/RelativeCURI.cs index a3c4e8a..3516b70 100644 --- a/Crimson/CSharp/Core/CURI/RelativeCURI.cs +++ b/Crimson/CURI/RelativeCURI.cs @@ -1,4 +1,5 @@ -using Crimson.CSharp.Exceptions; +using Crimson.Core; +using Crimson.Exceptions; using NLog; using System; using System.Collections.Generic; @@ -7,7 +8,7 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Core.CURI +namespace Crimson.CURI { /// /// A CURI which inherits the scheme of its anchor and creates a new path by combining the paths of its anchor and its path. diff --git a/Crimson/CSharp/Core/Cache.cs b/Crimson/Core/CachedBerryClient.cs similarity index 95% rename from Crimson/CSharp/Core/Cache.cs rename to Crimson/Core/CachedBerryClient.cs index 1692a86..3c0dd2c 100644 --- a/Crimson/CSharp/Core/Cache.cs +++ b/Crimson/Core/CachedBerryClient.cs @@ -1,4 +1,4 @@ -using Crimson.CSharp.Core.CURI; +using Crimson.CURI; using NLog; using System; using System.Collections.Generic; @@ -10,9 +10,9 @@ using System.Text.Json.Serialization; using System.Threading.Tasks; -namespace Crimson.CSharp.Core +namespace Crimson.Core { - public class Cache + public class CachedBerryClient { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); public static FileInfo INDEX { get; private set; } = Crimson.GetRoamingFile("cache/index.json"); @@ -30,7 +30,7 @@ public record IndexEntry public DateTime ModifiedTime { get; set; } } - static Cache () + static CachedBerryClient () { try { @@ -64,8 +64,7 @@ private static void CreateIndexIfNotPresent () contents = reader.ReadToEnd(); } - if (String.IsNullOrWhiteSpace(contents)) - { + if (string.IsNullOrWhiteSpace(contents)) using (FileStream writeStream = INDEX.Open(FileMode.OpenOrCreate, FileAccess.Write)) { Index = new CacheIndex @@ -75,7 +74,6 @@ private static void CreateIndexIfNotPresent () }; JsonSerializer.Serialize(writeStream, Index); } - } INDEX.Refresh(); } @@ -90,9 +88,7 @@ private static void CreateIndexIfNotPresent () { CreateIndexIfNotPresent(); using (FileStream stream = INDEX.Open(FileMode.OpenOrCreate, FileAccess.ReadWrite)) - { index = JsonSerializer.Deserialize(stream); - } } catch (Exception ex) { @@ -106,7 +102,6 @@ private static void CreateIndexIfNotPresent () private static void WriteIndex () { lock (_indexLock) - { try { LOGGER.Debug($"Writing to index {INDEX}"); @@ -120,7 +115,6 @@ private static void WriteIndex () Crimson.Panic($"Unable to write to cache index {INDEX}", Crimson.PanicCode.CACHE_JSON, ex); throw; } - } } private static readonly object _ioLock = new object(); @@ -183,21 +177,21 @@ public override CacheKey ReadAsPropertyName (ref Utf8JsonReader reader, Type typ public override void WriteAsPropertyName (Utf8JsonWriter writer, CacheKey value, JsonSerializerOptions options) { string? str = value.LocalPath; - if (String.IsNullOrWhiteSpace(str)) throw new JsonException("Cannot write NullOrWhiteSpace CacheKey."); + if (string.IsNullOrWhiteSpace(str)) throw new JsonException("Cannot write NullOrWhiteSpace CacheKey."); writer.WritePropertyName(str); } public override CacheKey? Read (ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { string? str = reader.GetString(); - if (String.IsNullOrWhiteSpace(str)) throw new JsonException("Cannot read NullOrWhiteSpace CacheKey."); + if (string.IsNullOrWhiteSpace(str)) throw new JsonException("Cannot read NullOrWhiteSpace CacheKey."); return new CacheKey(str!); } public override void Write (Utf8JsonWriter writer, CacheKey value, JsonSerializerOptions options) { string? str = value.LocalPath; - if (String.IsNullOrWhiteSpace(str)) throw new JsonException("Cannot write NullOrWhiteSpace CacheKey."); + if (string.IsNullOrWhiteSpace(str)) throw new JsonException("Cannot write NullOrWhiteSpace CacheKey."); writer.WriteStringValue(str); } } @@ -232,10 +226,7 @@ private static void ClearIndexed () private static void CutOffEmptyDirectories (DirectoryInfo root) { if (root.GetFiles().Length == 0 && root.GetDirectories().Length == 0) - { root.Delete(); - // CutOffEmptyDirectories(root.Parent); - } } private static void RemoveEmptyDirectories (DirectoryInfo root) @@ -244,9 +235,7 @@ private static void RemoveEmptyDirectories (DirectoryInfo root) { RemoveEmptyDirectories(directory); if (root.GetFiles().Length == 0 && root.GetDirectories().Length == 0) - { directory.Delete(false); - } } } @@ -370,9 +359,7 @@ public static void Refresh (AbstractCURI? sourceCURI, bool all = false) LOGGER.Info($"Done!"); } else - { LOGGER.Error("'--all' is false and the source CURI is null. Refresh failed."); - } } } } diff --git a/Crimson/CSharp/Core/Compilation.cs b/Crimson/Core/Compilation.cs similarity index 90% rename from Crimson/CSharp/Core/Compilation.cs rename to Crimson/Core/Compilation.cs index 9149ccd..d83b163 100644 --- a/Crimson/CSharp/Core/Compilation.cs +++ b/Crimson/Core/Compilation.cs @@ -1,10 +1,10 @@ -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Parsing; -using Crimson.CSharp.Parsing.Statements; +using Crimson.Exceptions; +using Crimson.Parsing; +using Crimson.Parsing.Statements; using NLog; using System.Text.RegularExpressions; -namespace Crimson.CSharp.Core +namespace Crimson.Core { /// /// A collection of CompilationUnit keyed with their absolute path within the file system. @@ -42,22 +42,16 @@ public FunctionCStatement GetEntryFunction () IList funcs = rootUnit.Functions.Values.Where(func => regex.IsMatch(func.Name.ToString())).ToList(); if (funcs.Count == 0) - { throw new GeneralisingException($"No valid entry function found. Invalid contenders were: [{string.Join(',', rootUnit.Functions.Values.Select(f => f.Name))}]. Searched for Crimson name '{Compiler.Options.EntryFunctionName}' using Regex: '{pattern}'."); - } else if (funcs.Count == 1) { FunctionCStatement entry = funcs.Single(); return entry; } else if (funcs.Count > 1) - { throw new GeneralisingException($"Cannot determine correct entry function. Found {funcs.Count} valid contenders: [{string.Join(',', funcs.Select(f => f.Name))}]."); - } else - { throw new GeneralisingException($"Congratulations, you've managed to find a very strange number of entry functions: {funcs.Count}"); - } } } } \ No newline at end of file diff --git a/Crimson/CSharp/Core/Compiler.cs b/Crimson/Core/Compiler.cs similarity index 94% rename from Crimson/CSharp/Core/Compiler.cs rename to Crimson/Core/Compiler.cs index 0c8c605..88d8a27 100644 --- a/Crimson/CSharp/Core/Compiler.cs +++ b/Crimson/Core/Compiler.cs @@ -1,11 +1,11 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing; -using Crimson.CSharp.Specialising; +using Crimson.Generalising; +using Crimson.Linking; +using Crimson.Parsing; +using Crimson.Specialising; using NLog; using System.Net; -namespace Crimson.CSharp.Core +namespace Crimson.Core { /// /// The root of all compilation. Initiates and delegates tasks for the compilation process. @@ -98,9 +98,7 @@ private static void DumpSpecialisedProgram (AbstractSpecificAssemblyProgram spec specialisedProgram.Write(basicTarget); } else - { LOGGER.Info("Skipping specialised program dump..."); - } } private static void DumpGeneralisedProgram (GeneralAssemblyProgram generalProgram) @@ -113,18 +111,14 @@ private static void DumpGeneralisedProgram (GeneralAssemblyProgram generalProgra List lines = new List(); foreach (var s in generalProgram.Structures) - { lines.Add(s.ToString() ?? "(null)"); - } _ = Directory.CreateDirectory(Path.GetDirectoryName(target)!); File.WriteAllLines(basicTarget, lines.ToArray()); LOGGER.Info("Written!"); } else - { LOGGER.Info("Skipping generalised program dump..."); - } } } } diff --git a/Crimson/CSharp/Core/CrimsonOptions.cs b/Crimson/Core/CrimsonOptions.cs similarity index 92% rename from Crimson/CSharp/Core/CrimsonOptions.cs rename to Crimson/Core/CrimsonOptions.cs index b3e2a02..a59a1ab 100644 --- a/Crimson/CSharp/Core/CrimsonOptions.cs +++ b/Crimson/Core/CrimsonOptions.cs @@ -1,15 +1,9 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; + using CommandLine; -using Crimson.CSharp.Core.CURI; -using Crimson.CSharp.Exceptions; -using NLog.Targets; +using Crimson.Exceptions; +using Crimson.CURI; -namespace Crimson.CSharp.Core +namespace Crimson.Core { public class CrimsonOptions { @@ -134,13 +128,13 @@ public class Clear HelpText = "Clean only files listed in the cache index.")] public bool Indexed { get; set; } - public Cache.ClearMode ClearMode + public CachedBerryClient.ClearMode ClearMode { get => (Erase, Indexed, Directories) switch { - (true, false, false) => Cache.ClearMode.ERASE, - (false, true, false) => Cache.ClearMode.INDEXED, - (false, false, true) => Cache.ClearMode.UNINDEXED, + (true, false, false) => CachedBerryClient.ClearMode.ERASE, + (false, true, false) => CachedBerryClient.ClearMode.INDEXED, + (false, false, true) => CachedBerryClient.ClearMode.UNINDEXED, _ => throw new ClearModeException(this) }; } diff --git a/Crimson/CSharp/Core/Library.cs b/Crimson/Core/Library.cs similarity index 93% rename from Crimson/CSharp/Core/Library.cs rename to Crimson/Core/Library.cs index c924580..363fd64 100644 --- a/Crimson/CSharp/Core/Library.cs +++ b/Crimson/Core/Library.cs @@ -5,12 +5,12 @@ using System.Threading.Tasks; using Antlr4.Runtime; using Crimson.AntlrBuild; -using Crimson.CSharp.Core.CURI; -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Parsing; +using Crimson.Exceptions; +using Crimson.CURI; +using Crimson.Parsing; using NLog; -namespace Crimson.CSharp.Core +namespace Crimson.Core { /// /// Generates CompilationUnits from input text with the power of ANTLR. @@ -26,17 +26,13 @@ public static int LoaderId get { lock (_loaderLock) - { return _loaderIdCounter; - } } set { lock (_loaderLock) - { _loaderIdCounter = value; - } } } @@ -106,7 +102,7 @@ public Scope LoadScope (AbstractCURI uri) { LOGGER.Info($"Loading scope from {uri}"); - Cache.GetCachedQueryResult result = Cache.GetOrInstall(uri); + CachedBerryClient.GetCachedQueryResult result = CachedBerryClient.GetOrInstall(uri); if (!result.Exists) throw new NullReferenceException($"Library was unable to get cached or fetch new contents of {uri}."); Scope scope = ParseScopeText(uri, result.Contents!); @@ -124,21 +120,17 @@ public Scope LoadScope (AbstractCURI uri) { List waitingList = new List(); foreach (var pair in Scopes) - { if (pair.Value == null) waitingList.Add(pair.Key.ToString()); - } waiting = waitingList.Count > 0; if (waiting) { - LOGGER.Info($"Waiting for: {String.Join(',', waitingList)}"); + LOGGER.Info($"Waiting for: {string.Join(',', waitingList)}"); Thread.Sleep(1000); } else - { LOGGER.Info($"Finished loading root scope!"); - } } while (waiting); } @@ -186,7 +178,7 @@ private Task GetScopeLoadingTask (AbstractCURI uri) public override string ToString () { - return $"Library(Units:[{String.Join(',', Scopes.Select(u => u.Key))}])"; + return $"Library(Units:[{string.Join(',', Scopes.Select(u => u.Key))}])"; } @@ -222,7 +214,7 @@ private void LoadScopeDependencies (Scope root) // Load each imported scope // Queue loading of its dependencies (once it's loaded) - LOGGER.Debug($"Dependencies for {root} are {String.Join(", ", root.Imports.Values.Select((i) => $"'{i.CURI}'"))}"); + LOGGER.Debug($"Dependencies for {root} are {string.Join(", ", root.Imports.Values.Select((i) => $"'{i.CURI}'"))}"); foreach (var i in root.Imports) { if (Scopes.ContainsKey(i.Value.CURI)) @@ -239,12 +231,8 @@ private void LoadScopeDependencies (Scope root) // Check for imports in nested scopes foreach (var del in root.Delegates) - { if (del.Invoke() is IHasScope hasScope) - { LoadScopeDependencies(hasScope.GetScope()); - } - } } catch (Exception ex) { diff --git a/Crimson/CSharp/Core/Crimson.cs b/Crimson/Crimson.cs similarity index 91% rename from Crimson/CSharp/Core/Crimson.cs rename to Crimson/Crimson.cs index 76d92ed..aea9dcd 100644 --- a/Crimson/CSharp/Core/Crimson.cs +++ b/Crimson/Crimson.cs @@ -2,20 +2,20 @@ #define DEBUG using NLog; -using Crimson.CSharp.Core; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Specialising; -using Crimson.CSharp.Specialising.RFASM; -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Exceptions; +using Crimson.Specialising.RFASM; using System.Globalization; using CommandLine; using System.Reflection; using System.Runtime.Intrinsics.X86; using Antlr4.Runtime.Misc; using System.Text.Json; +using Crimson.Exceptions; +using Crimson.Generalising; +using Crimson.Linking; +using Crimson.Specialising; +using Crimson.Core; -namespace Crimson.CSharp.Core +namespace Crimson { internal class Crimson @@ -38,7 +38,7 @@ public static int Main (string[] args) #if DEBUG args = GetTestArguments() ?? args; #endif - Console.WriteLine(String.Join(' ', args)); + Console.WriteLine(string.Join(' ', args)); // ConfigureNLog(); @@ -61,7 +61,7 @@ public static int Main (string[] args) } catch (Exception ex) { - Crimson.Panic("An uncaught error occurred during program execution.", PanicCode.ARGUMENTS, ex); + Panic("An uncaught error occurred during program execution.", PanicCode.ARGUMENTS, ex); throw; } return 0; @@ -76,7 +76,6 @@ private static string[] GetTestArguments () bool COMPILE = true; if (COMPILE) - { return new string[] { $"compile", $"-s relative:///Resources/Test Compilations/main.crm", @@ -84,38 +83,31 @@ private static string[] GetTestArguments () $"-n relative:///Resources/Native Library/", $"-w 4" }; - } bool INSTALL = false; if (INSTALL) - { return new string[] { $"install", $"-s http://raw.githubusercontent.com/GenElectrovise/RF_ASM/master/Crimson/Resources/Native%20Library/heap.crm", //$"-o" }; - } bool CLEAR = false; if (CLEAR) - { return new string[] { $"clear", $"-e", //$"-i" //$"-u" }; - } bool REFRESH = false; if (REFRESH) - { return new string[] { $"refresh", $"-s http://raw.githubusercontent.com/GenElectrovise/RF_ASM/master/Crimson/Resources/Native%20Library/heap.crm", //$"-a" }; - } return null!; } @@ -228,7 +220,7 @@ private static void Compile (CrimsonOptions.Compile options) } catch (Exception ex) { - Crimson.Panic("Error executing verb 'compile'.", PanicCode.COMPILE, ex); + Panic("Error executing verb 'compile'.", PanicCode.COMPILE, ex); throw; } } @@ -238,11 +230,11 @@ private static void Install (CrimsonOptions.Install options) LOGGER!.Info($"Installing with: {options}"); try { - Cache.Install(options.SourceCURI, options.Overwrite); + CachedBerryClient.Install(options.SourceCURI, options.Overwrite); } catch (Exception ex) { - Crimson.Panic("Error executing verb 'install'.", PanicCode.CACHE_INSTALL, ex); + Panic("Error executing verb 'install'.", PanicCode.CACHE_INSTALL, ex); throw; } } @@ -252,11 +244,11 @@ private static void Clear (CrimsonOptions.Clear options) LOGGER!.Info($"Clearing with: {options}"); try { - Cache.Clear(options.ClearMode); + CachedBerryClient.Clear(options.ClearMode); } catch (Exception ex) { - Crimson.Panic("Error executing verb 'clear'.", PanicCode.CACHE_CLEAR, ex); + Panic("Error executing verb 'clear'.", PanicCode.CACHE_CLEAR, ex); throw; } } @@ -266,11 +258,11 @@ private static void Refresh (CrimsonOptions.Refresh options) LOGGER!.Info($"Refreshing with: {options}"); try { - Cache.Refresh(options.SourceCURI, options.All); + CachedBerryClient.Refresh(options.SourceCURI, options.All); } catch (Exception ex) { - Crimson.Panic("Error executing verb 'clear'.", PanicCode.CACHE_CLEAR, ex); + Panic("Error executing verb 'clear'.", PanicCode.CACHE_CLEAR, ex); throw; } } @@ -294,24 +286,18 @@ public static void Panic (string message, PanicCode code, Exception e) $"", $" >> {message}", $"", - $"{(e != null ? e.GetType().Name : "")} {(e is CrimsonException ? ($"({typeof(CrimsonException).Name})") : "")}", + $"{(e != null ? e.GetType().Name : "")} {(e is CrimsonException ? $"({typeof(CrimsonException).Name})" : "")}", }; if (e != null) - { if (e is CrimsonException ce) { lines.AddRange(ce.GetDetailedMessage()); lines.Add($"Inner panic code: {(int) ce.Code} ({Enum.GetName(ce.Code)})"); } else - { lines.AddRange(e.ToString().Split(Environment.NewLine)); - } - } else - { lines.Add("Causing exception is null. No further exception information available."); - } lines.Add($"Outer panic code: {(int) code} ({Enum.GetName(code)})"); lines.ForEach(line => LOGGER!.Error($" ### {line}")); diff --git a/Crimson/Crimson.csproj b/Crimson/Crimson.csproj index 1261e3a..328ba34 100644 --- a/Crimson/Crimson.csproj +++ b/Crimson/Crimson.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 enable enable Crimson.CSharp.Core.Crimson diff --git a/Crimson/CSharp/Exceptions/CrimsonException.cs b/Crimson/Exceptions/CrimsonException.cs similarity index 77% rename from Crimson/CSharp/Exceptions/CrimsonException.cs rename to Crimson/Exceptions/CrimsonException.cs index 02578c6..0b8c539 100644 --- a/Crimson/CSharp/Exceptions/CrimsonException.cs +++ b/Crimson/Exceptions/CrimsonException.cs @@ -4,16 +4,16 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Exceptions +namespace Crimson.Exceptions { internal abstract class CrimsonException : Exception { - public CrimsonException (Core.Crimson.PanicCode code) + public CrimsonException (Crimson.PanicCode code) { Code = code; } - public Core.Crimson.PanicCode Code { get; private set; } + public Crimson.PanicCode Code { get; private set; } public virtual IList GetDetailedMessage () { diff --git a/Crimson/CSharp/Exceptions/GeneralisingExceptions.cs b/Crimson/Exceptions/GeneralisingExceptions.cs similarity index 54% rename from Crimson/CSharp/Exceptions/GeneralisingExceptions.cs rename to Crimson/Exceptions/GeneralisingExceptions.cs index 008f1c9..dceb437 100644 --- a/Crimson/CSharp/Exceptions/GeneralisingExceptions.cs +++ b/Crimson/Exceptions/GeneralisingExceptions.cs @@ -4,16 +4,16 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Exceptions +namespace Crimson.Exceptions { internal class GeneralisingException : ArgumentException { - public GeneralisingException (string message) : base(message) + public GeneralisingException(string message) : base(message) { } - public GeneralisingException (string message, Exception cause) : base(message, cause) + public GeneralisingException(string message, Exception cause) : base(message, cause) { } diff --git a/Crimson/Exceptions/LexerErrorListener.cs b/Crimson/Exceptions/LexerErrorListener.cs new file mode 100644 index 0000000..9f9e9fa --- /dev/null +++ b/Crimson/Exceptions/LexerErrorListener.cs @@ -0,0 +1,21 @@ +using Antlr4.Runtime; +using NLog; + +namespace Crimson.Exceptions +{ + internal class LexerErrorListener : IAntlrErrorListener + { + public static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); + + private string Name { get; set; } + public LexerErrorListener(string name) + { + Name = name; + } + + public void SyntaxError(TextWriter output, IRecognizer recognizer, int offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) + { + Crimson.Crimson.Panic($"A lexer error has occurred lexing {Name}", Crimson.Crimson.PanicCode.COMPILE_PARSE, null!); + } + } +} diff --git a/Crimson/Exceptions/LinkingExceptions.cs b/Crimson/Exceptions/LinkingExceptions.cs new file mode 100644 index 0000000..915dcb4 --- /dev/null +++ b/Crimson/Exceptions/LinkingExceptions.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.Exceptions +{ + internal class LinkingException : ArgumentException + { + public LinkingException(string message) : base(message) { } + + public LinkingException(string message, Exception cause) : base(message, cause) { } + } + + internal class OtherLinkingException : ArgumentException + { + public OtherLinkingException(string message) : base(message) { } + + public OtherLinkingException(string message, Exception cause) : base(message, cause) { } + } +} diff --git a/Crimson/Exceptions/ParserErrorListener.cs b/Crimson/Exceptions/ParserErrorListener.cs new file mode 100644 index 0000000..4d1eafa --- /dev/null +++ b/Crimson/Exceptions/ParserErrorListener.cs @@ -0,0 +1,21 @@ +using Antlr4.Runtime; +using NLog; + +namespace Crimson.Exceptions +{ + internal class ParserErrorListener : IAntlrErrorListener + { + public static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); + + private string Name { get; set; } + public ParserErrorListener(string name) + { + Name = name; + } + + public void SyntaxError(TextWriter output, IRecognizer recognizer, IToken offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) + { + Crimson.Crimson.Panic($"A parser error has occurred parsing {Name}", Crimson.Crimson.PanicCode.COMPILE_PARSE, null!); + } + } +} diff --git a/Crimson/CSharp/Exceptions/ParsingExceptions.cs b/Crimson/Exceptions/ParsingExceptions.cs similarity index 74% rename from Crimson/CSharp/Exceptions/ParsingExceptions.cs rename to Crimson/Exceptions/ParsingExceptions.cs index 09c7bf1..c6d4c57 100644 --- a/Crimson/CSharp/Exceptions/ParsingExceptions.cs +++ b/Crimson/Exceptions/ParsingExceptions.cs @@ -1,6 +1,6 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Core.CURI; -using Crimson.CSharp.Parsing.Statements; +using Crimson.Core; +using Crimson.CURI; +using Crimson.Parsing.Statements; using System; using System.Collections.Generic; using System.Diagnostics; @@ -8,18 +8,18 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Exceptions +namespace Crimson.Exceptions { internal class ClearModeException : CrimsonException { public CrimsonOptions.Clear Clear { get; private set; } - public ClearModeException (CrimsonOptions.Clear clear) : base(Core.Crimson.PanicCode.COMPILE_PARSE_STATEMENT) + public ClearModeException(CrimsonOptions.Clear clear) : base(Crimson.Crimson.PanicCode.COMPILE_PARSE_STATEMENT) { Clear = clear; } - public override IList GetDetailedMessage () + public override IList GetDetailedMessage() { List strings = new List() { @@ -39,14 +39,14 @@ internal class StatementParseException : CrimsonException public AbstractCrimsonStatement? Statement { get; private set; } public Exception? Cause { get; private set; } - public StatementParseException (string message, AbstractCrimsonStatement? statement, Exception? cause) : base(Core.Crimson.PanicCode.COMPILE_PARSE_STATEMENT) + public StatementParseException(string message, AbstractCrimsonStatement? statement, Exception? cause) : base(Crimson.Crimson.PanicCode.COMPILE_PARSE_STATEMENT) { Message = message; Statement = statement; Cause = cause; } - public override IList GetDetailedMessage () + public override IList GetDetailedMessage() { List strings = new List() { @@ -65,14 +65,14 @@ internal class CURIException : CrimsonException public AbstractCURI CURI { get; private set; } public CURIExceptionReason Reason { get; private set; } - public CURIException (string message, AbstractCURI uri, CURIExceptionReason reason) : base(Core.Crimson.PanicCode.CURI) + public CURIException(string message, AbstractCURI uri, CURIExceptionReason reason) : base(Crimson.Crimson.PanicCode.CURI) { Message = message; CURI = uri; Reason = reason; } - public override IList GetDetailedMessage () + public override IList GetDetailedMessage() { List strings = new List { @@ -100,14 +100,14 @@ public enum CURIExceptionReason internal class CrimsonParserException : CrimsonException { - public CrimsonParserException (string message) : base(Core.Crimson.PanicCode.COMPILE_PARSE_STATEMENT) + public CrimsonParserException(string message) : base(Crimson.Crimson.PanicCode.COMPILE_PARSE_STATEMENT) { } } internal class ScopeGenerationException : CrimsonException { - public ScopeGenerationException () : base(Core.Crimson.PanicCode.COMPILE_PARSE_SCOPE) + public ScopeGenerationException() : base(Crimson.Crimson.PanicCode.COMPILE_PARSE_SCOPE) { } diff --git a/Crimson/CSharp/Generalising/GeneralAssemblyProgram.cs b/Crimson/Generalising/GeneralAssemblyProgram.cs similarity index 72% rename from Crimson/CSharp/Generalising/GeneralAssemblyProgram.cs rename to Crimson/Generalising/GeneralAssemblyProgram.cs index 412112f..5d0a88a 100644 --- a/Crimson/CSharp/Generalising/GeneralAssemblyProgram.cs +++ b/Crimson/Generalising/GeneralAssemblyProgram.cs @@ -4,19 +4,19 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Generalising +namespace Crimson.Generalising { public class GeneralAssemblyProgram { public List Structures { get; private set; } - public GeneralAssemblyProgram () + public GeneralAssemblyProgram() { Structures = new List(); } - public void AddStructure (IGeneralAssemblyStructure structure) + public void AddStructure(IGeneralAssemblyStructure structure) { Structures.Add(structure); } diff --git a/Crimson/CSharp/Generalising/GeneralisationContext.cs b/Crimson/Generalising/GeneralisationContext.cs similarity index 86% rename from Crimson/CSharp/Generalising/GeneralisationContext.cs rename to Crimson/Generalising/GeneralisationContext.cs index 33819d2..d1e9abd 100644 --- a/Crimson/CSharp/Generalising/GeneralisationContext.cs +++ b/Crimson/Generalising/GeneralisationContext.cs @@ -1,6 +1,6 @@ -using Crimson.CSharp.Parsing.Statements; +using Crimson.Parsing.Statements; -namespace Crimson.CSharp.Generalising +namespace Crimson.Generalising { public class GeneralisationContext { @@ -8,7 +8,7 @@ public class GeneralisationContext public Dictionary Functions { get; } public Dictionary Structures { get; } - public GeneralisationContext (Dictionary functions, Dictionary structures, Dictionary globals) + public GeneralisationContext(Dictionary functions, Dictionary structures, Dictionary globals) { StackPointerStack = new Stack(); Functions = functions; @@ -24,7 +24,7 @@ public GeneralisationContext (Dictionary functions, /// Starts a new stack frame to be used by the scope allocation head. /// Pushes the old offset onto the C# stack pointer stack to save it for later. /// - public void EnterScope () + public void EnterScope() { StackPointerStack.Push(_virtualStackPointer); _virtualStackPointer = 0; @@ -34,7 +34,7 @@ public void EnterScope () /// Called when leaving a scope. /// Resets the virtual stack pointer's position to its value before the exiting scope was entered. /// - public void LeaveScope () + public void LeaveScope() { _virtualStackPointer = StackPointerStack.Pop(); } @@ -57,7 +57,7 @@ public void LeaveScope () /// /// The amount of memory to reserve, in bytes. /// The starting address at which the block was allocated. - public int AllocStack (int size) + public int AllocStack(int size) { int addr = _globalAllocationHead; _globalAllocationHead += size; @@ -79,7 +79,7 @@ public int AllocStack (int size) /// /// The amount of memory to reserve, in bytes. /// The starting address at which the block was allocated. - public int AllocGlobal (int size) + public int AllocGlobal(int size) { int addr = _globalAllocationHead; _globalAllocationHead += size; @@ -92,7 +92,7 @@ public int AllocGlobal (int size) public class DuplicateNameException : Exception { - public DuplicateNameException (string msg) : base(msg) + public DuplicateNameException(string msg) : base(msg) { } } diff --git a/Crimson/CSharp/Generalising/Generaliser.cs b/Crimson/Generalising/Generaliser.cs similarity index 91% rename from Crimson/CSharp/Generalising/Generaliser.cs rename to Crimson/Generalising/Generaliser.cs index a39b3ca..1becd4e 100644 --- a/Crimson/CSharp/Generalising/Generaliser.cs +++ b/Crimson/Generalising/Generaliser.cs @@ -1,14 +1,13 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Parsing; -using Crimson.CSharp.Parsing.Statements; -using Crimson.CSharp.Parsing.Tokens; +using Crimson.Core; +using Crimson.Exceptions; +using Crimson.Generalising.Structures; +using Crimson.Parsing.Tokens; +using Crimson.Parsing; +using Crimson.Parsing.Statements; using NLog; using System.Text.RegularExpressions; -namespace Crimson.CSharp.Generalising +namespace Crimson.Generalising { internal class Generaliser { @@ -30,17 +29,11 @@ public async Task Generalise (Compilation compilation) foreach (Scope scope in await compilation.Library.GetScopes()) { foreach (var f in scope.Functions) - { functions.Add(f.Value.Name.ToString(), f.Value); - } foreach (var s in scope.Structures) - { structures.Add(s.Value.Name.ToString(), s.Value); - } foreach (var g in scope.GlobalVariables) - { globals.Add(g.Value.GetName().ToString(), g.Value); - } } GeneralisationContext context = new GeneralisationContext(functions, structures, globals); @@ -48,7 +41,7 @@ public async Task Generalise (Compilation compilation) // Add versioning and credits program.AddStructure(new CommentAssemblyStructure("This CrimsonBasic program was automatically generated by the Crimson compiler.")); program.AddStructure(new CommentAssemblyStructure("Copyright (c) 2022-2023 GenElectrovise https://github.com/GenElectrovise and GamesMaster3000X https://github.com/gamesmaster3000x")); - program.AddStructure(new CommentAssemblyStructure("Crimson version " + Core.Crimson.VERSION)); + program.AddStructure(new CommentAssemblyStructure("Crimson version " + Crimson.Crimson.VERSION)); program.AddStructure(new CommentAssemblyStructure("Crimson and RedFoxAssembly (RFASM) are parts of GamesMaster3000X's RedFoxVirtualMachine.")); program.AddStructure(new CommentAssemblyStructure("The main repository for this project can be found at: https://github.com/gamesmaster3000x/RF_ASM")); program.AddStructure(new CommentAssemblyStructure("Crimson and RFASM were implemented by me, GenElectrovise.")); diff --git a/Crimson/CSharp/Generalising/IGeneralAssemblyStructure.cs b/Crimson/Generalising/IGeneralAssemblyStructure.cs similarity index 83% rename from Crimson/CSharp/Generalising/IGeneralAssemblyStructure.cs rename to Crimson/Generalising/IGeneralAssemblyStructure.cs index 4c5b020..610e34e 100644 --- a/Crimson/CSharp/Generalising/IGeneralAssemblyStructure.cs +++ b/Crimson/Generalising/IGeneralAssemblyStructure.cs @@ -4,10 +4,10 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Generalising +namespace Crimson.Generalising { public interface IGeneralAssemblyStructure { - public IEnumerable GetSubStructures (); + public IEnumerable GetSubStructures(); } } diff --git a/Crimson/CSharp/Generalising/Structures/ArbitraryAssemblyStructure.cs b/Crimson/Generalising/Structures/ArbitraryAssemblyStructure.cs similarity index 70% rename from Crimson/CSharp/Generalising/Structures/ArbitraryAssemblyStructure.cs rename to Crimson/Generalising/Structures/ArbitraryAssemblyStructure.cs index e4f3ce3..936997d 100644 --- a/Crimson/CSharp/Generalising/Structures/ArbitraryAssemblyStructure.cs +++ b/Crimson/Generalising/Structures/ArbitraryAssemblyStructure.cs @@ -1,20 +1,20 @@ -namespace Crimson.CSharp.Generalising.Structures +namespace Crimson.Generalising.Structures { public class ArbitraryAssemblyStructure : IGeneralAssemblyStructure { public string Text { get; protected set; } - public ArbitraryAssemblyStructure (string text) + public ArbitraryAssemblyStructure(string text) { Text = text; } - public override string ToString () + public override string ToString() { return "ARB: " + Text; } - public IEnumerable GetSubStructures () + public IEnumerable GetSubStructures() { return Enumerable.Empty(); } diff --git a/Crimson/CSharp/Generalising/Structures/CommentAssemblyStructure.cs b/Crimson/Generalising/Structures/CommentAssemblyStructure.cs similarity index 73% rename from Crimson/CSharp/Generalising/Structures/CommentAssemblyStructure.cs rename to Crimson/Generalising/Structures/CommentAssemblyStructure.cs index bcf0ba3..0a02901 100644 --- a/Crimson/CSharp/Generalising/Structures/CommentAssemblyStructure.cs +++ b/Crimson/Generalising/Structures/CommentAssemblyStructure.cs @@ -1,28 +1,27 @@ -using Crimson.CSharp.Generalising; -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; -namespace Crimson.CSharp.Generalising.Structures +namespace Crimson.Generalising.Structures { public class CommentAssemblyStructure : IGeneralAssemblyStructure { private string _text; - public CommentAssemblyStructure (string text) + public CommentAssemblyStructure(string text) { _text = text; } - public IEnumerable GetSubStructures () + public IEnumerable GetSubStructures() { return Enumerable.Empty(); } - public override string ToString () + public override string ToString() { if (_text.Equals("") || _text.StartsWith("//")) return _text; return "// " + _text; diff --git a/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs b/Crimson/Generalising/Structures/ConstantAssemblyStructure.cs similarity index 86% rename from Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs rename to Crimson/Generalising/Structures/ConstantAssemblyStructure.cs index 8b5aef1..8f1555d 100644 --- a/Crimson/CSharp/Generalising/Structures/ConstantAssemblyStructure.cs +++ b/Crimson/Generalising/Structures/ConstantAssemblyStructure.cs @@ -1,8 +1,8 @@ -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Parsing.Statements; -using Crimson.CSharp.Specialising; +using Crimson.Exceptions; +using Crimson.Parsing.Statements; +using Crimson.Specialising; -namespace Crimson.CSharp.Generalising.Structures +namespace Crimson.Generalising.Structures { /// /// A constant value in the assembly, for example: diff --git a/Crimson/CSharp/Generalising/Structures/EmptyAssemblyStructure.cs b/Crimson/Generalising/Structures/EmptyAssemblyStructure.cs similarity index 67% rename from Crimson/CSharp/Generalising/Structures/EmptyAssemblyStructure.cs rename to Crimson/Generalising/Structures/EmptyAssemblyStructure.cs index 01c28aa..125e505 100644 --- a/Crimson/CSharp/Generalising/Structures/EmptyAssemblyStructure.cs +++ b/Crimson/Generalising/Structures/EmptyAssemblyStructure.cs @@ -1,17 +1,17 @@ -namespace Crimson.CSharp.Generalising.Structures +namespace Crimson.Generalising.Structures { public class EmptyAssemblyStructure : IGeneralAssemblyStructure { - public EmptyAssemblyStructure () + public EmptyAssemblyStructure() { } - public IEnumerable GetSubStructures () + public IEnumerable GetSubStructures() { return Enumerable.Empty(); } - public override string ToString () + public override string ToString() { return ""; } diff --git a/Crimson/CSharp/Generalising/Structures/IndentAssemblyStructure.cs b/Crimson/Generalising/Structures/IndentAssemblyStructure.cs similarity index 72% rename from Crimson/CSharp/Generalising/Structures/IndentAssemblyStructure.cs rename to Crimson/Generalising/Structures/IndentAssemblyStructure.cs index 1cf0440..7b5c798 100644 --- a/Crimson/CSharp/Generalising/Structures/IndentAssemblyStructure.cs +++ b/Crimson/Generalising/Structures/IndentAssemblyStructure.cs @@ -1,25 +1,25 @@ -namespace Crimson.CSharp.Generalising.Structures +namespace Crimson.Generalising.Structures { public class IndentAssemblyStructure : IGeneralAssemblyStructure { public int Indent { get; set; } - public IndentAssemblyStructure (int indent) + public IndentAssemblyStructure(int indent) { Indent = indent; } - public List? GetSubStructures () + public List? GetSubStructures() { return null; } - public override string ToString () + public override string ToString() { return ""; } - IEnumerable IGeneralAssemblyStructure.GetSubStructures () + IEnumerable IGeneralAssemblyStructure.GetSubStructures() { return Enumerable.Empty(); } diff --git a/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs b/Crimson/Generalising/Structures/JumpAssemblyStructure.cs similarity index 71% rename from Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs rename to Crimson/Generalising/Structures/JumpAssemblyStructure.cs index a8a7014..a7e8de8 100644 --- a/Crimson/CSharp/Generalising/Structures/JumpAssemblyStructure.cs +++ b/Crimson/Generalising/Structures/JumpAssemblyStructure.cs @@ -1,20 +1,20 @@ -namespace Crimson.CSharp.Generalising.Structures +namespace Crimson.Generalising.Structures { public class JumpAssemblyStructure : IGeneralAssemblyStructure { public string Target { get; protected set; } - public JumpAssemblyStructure (string target) + public JumpAssemblyStructure(string target) { Target = target; } - public override string ToString () + public override string ToString() { return "JMP: " + Target; } - public IEnumerable GetSubStructures () + public IEnumerable GetSubStructures() { return Enumerable.Empty(); } diff --git a/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs b/Crimson/Generalising/Structures/LabelAssemblyStructure.cs similarity index 71% rename from Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs rename to Crimson/Generalising/Structures/LabelAssemblyStructure.cs index 5ff9bac..a630e00 100644 --- a/Crimson/CSharp/Generalising/Structures/LabelAssemblyStructure.cs +++ b/Crimson/Generalising/Structures/LabelAssemblyStructure.cs @@ -1,20 +1,20 @@ -namespace Crimson.CSharp.Generalising.Structures +namespace Crimson.Generalising.Structures { public class LabelAssemblyStructure : IGeneralAssemblyStructure { public string Text { get; protected set; } - public LabelAssemblyStructure (string name) + public LabelAssemblyStructure(string name) { Text = name; } - public override string ToString () + public override string ToString() { return "LAB: " + Text; } - public IEnumerable GetSubStructures () + public IEnumerable GetSubStructures() { return Enumerable.Empty(); } diff --git a/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs b/Crimson/Generalising/Structures/ReturnAssemblyStructure.cs similarity index 67% rename from Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs rename to Crimson/Generalising/Structures/ReturnAssemblyStructure.cs index 19026c3..5183db7 100644 --- a/Crimson/CSharp/Generalising/Structures/ReturnAssemblyStructure.cs +++ b/Crimson/Generalising/Structures/ReturnAssemblyStructure.cs @@ -1,17 +1,17 @@ -namespace Crimson.CSharp.Generalising.Structures +namespace Crimson.Generalising.Structures { public class ReturnAssemblyStructure : IGeneralAssemblyStructure { - public ReturnAssemblyStructure () + public ReturnAssemblyStructure() { } - public IEnumerable GetSubStructures () + public IEnumerable GetSubStructures() { return Enumerable.Empty(); } - public override string ToString () + public override string ToString() { return "RET"; } diff --git a/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs b/Crimson/Generalising/Structures/ScopeAssemblyStructure.cs similarity index 61% rename from Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs rename to Crimson/Generalising/Structures/ScopeAssemblyStructure.cs index cb29f85..2071753 100644 --- a/Crimson/CSharp/Generalising/Structures/ScopeAssemblyStructure.cs +++ b/Crimson/Generalising/Structures/ScopeAssemblyStructure.cs @@ -1,28 +1,28 @@ -namespace Crimson.CSharp.Generalising.Structures +namespace Crimson.Generalising.Structures { internal class ScopeAssemblyStructure : IGeneralAssemblyStructure { public List Structures { get; private set; } - public ScopeAssemblyStructure () + public ScopeAssemblyStructure() { Structures = new List(); } - internal void AddSubStructure (IGeneralAssemblyStructure labelAssemblyStructure) + internal void AddSubStructure(IGeneralAssemblyStructure labelAssemblyStructure) { Structures.Add(labelAssemblyStructure); } - IEnumerable IGeneralAssemblyStructure.GetSubStructures () + IEnumerable IGeneralAssemblyStructure.GetSubStructures() { return Structures; } - public override string ToString () + public override string ToString() { return $"SCP: " + - $"\n {String.Join("\n ", Structures)}"; + $"\n {string.Join("\n ", Structures)}"; } } } \ No newline at end of file diff --git a/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs b/Crimson/Generalising/Structures/SubroutineAssemblyStructure.cs similarity index 89% rename from Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs rename to Crimson/Generalising/Structures/SubroutineAssemblyStructure.cs index 95249a5..272fa4f 100644 --- a/Crimson/CSharp/Generalising/Structures/SubroutineAssemblyStructure.cs +++ b/Crimson/Generalising/Structures/SubroutineAssemblyStructure.cs @@ -1,6 +1,7 @@ -using System.Xml.Linq; +using Crimson.Generalising.Structures; +using System.Xml.Linq; -namespace Crimson.CSharp.Generalising.Structures +namespace Crimson.Generalising.Structures { internal class SubroutineAssemblyStructure : IGeneralAssemblyStructure { @@ -28,7 +29,7 @@ public void AddSubStructure (IGeneralAssemblyStructure labelAssemblyStructure) public override string ToString () { return $"SUB:\n" + - $"{String.Join("\n ", Structures)}"; + $"{string.Join("\n ", Structures)}"; } IEnumerable IGeneralAssemblyStructure.GetSubStructures () diff --git a/Crimson/CSharp/Linking/Linker.cs b/Crimson/Linking/Linker.cs similarity index 90% rename from Crimson/CSharp/Linking/Linker.cs rename to Crimson/Linking/Linker.cs index 0d0f2ea..a309c85 100644 --- a/Crimson/CSharp/Linking/Linker.cs +++ b/Crimson/Linking/Linker.cs @@ -1,9 +1,9 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Parsing; -using Crimson.CSharp.Parsing.Statements; +using Crimson.Core; +using Crimson.Parsing.Statements; +using Crimson.Parsing; using NLog; -namespace Crimson.CSharp.Linking +namespace Crimson.Linking { /// /// Converts a CompilationUnit to a LinkedUnit. diff --git a/Crimson/CSharp/Linking/LinkerHelper.cs b/Crimson/Linking/LinkerHelper.cs similarity index 87% rename from Crimson/CSharp/Linking/LinkerHelper.cs rename to Crimson/Linking/LinkerHelper.cs index d69ddac..87fd18e 100644 --- a/Crimson/CSharp/Linking/LinkerHelper.cs +++ b/Crimson/Linking/LinkerHelper.cs @@ -1,9 +1,9 @@ -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Parsing; -using Crimson.CSharp.Parsing.Statements; -using Crimson.CSharp.Parsing.Tokens; +using Crimson.Exceptions; +using Crimson.Parsing; +using Crimson.Parsing.Statements; +using Crimson.Parsing.Tokens; -namespace Crimson.CSharp.Linking +namespace Crimson.Linking { internal class LinkerHelper { @@ -15,7 +15,7 @@ internal class LinkerHelper /// /// /// - internal static FunctionCStatement LinkFunctionCall (FullNameCToken identifier, LinkingContext ctx) + internal static FunctionCStatement LinkFunctionCall(FullNameCToken identifier, LinkingContext ctx) { if (identifier == null) throw new LinkingException("Cannot link a null identifer"); @@ -57,7 +57,7 @@ internal static FunctionCStatement LinkFunctionCall (FullNameCToken identifier, throw new LinkingException($"The idenifier {identifier} with no member name somehow got through the parsing process?"); } - internal static FullNameCToken LinkIdentifier (FullNameCToken identifier, LinkingContext ctx) + internal static FullNameCToken LinkIdentifier(FullNameCToken identifier, LinkingContext ctx) { if (identifier == null) throw new LinkingException("Cannot link a null identifer"); @@ -82,9 +82,7 @@ internal static FullNameCToken LinkIdentifier (FullNameCToken identifier, Linkin // Is a short local name with no library, so no linking needed if (identifier.HasMember()) - { return new FullNameCToken(null, identifier.MemberName); - } // Somehow only has a library name? throw new LinkingException($"The idenifier {identifier} with no member name somehow got through the parsing process?"); diff --git a/Crimson/CSharp/Linking/LinkingContext.cs b/Crimson/Linking/LinkingContext.cs similarity index 91% rename from Crimson/CSharp/Linking/LinkingContext.cs rename to Crimson/Linking/LinkingContext.cs index 36cd700..5686731 100644 --- a/Crimson/CSharp/Linking/LinkingContext.cs +++ b/Crimson/Linking/LinkingContext.cs @@ -1,10 +1,10 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Parsing; -using Crimson.CSharp.Parsing.Statements; -using Crimson.CSharp.Parsing.Tokens; +using Crimson.Core; +using Crimson.Exceptions; +using Crimson.Parsing; +using Crimson.Parsing.Statements; +using Crimson.Parsing.Tokens; -namespace Crimson.CSharp.Linking +namespace Crimson.Linking { public class LinkingContext { @@ -39,9 +39,7 @@ public LinkingContext (Scope currentScope, LinkingContext ctx) Links = new Dictionary(); foreach (var link in ctx.Links) - { Links.Add(link.Key, link.Value); - } } public bool HasScope (string alias) @@ -52,9 +50,7 @@ public bool HasScope (string alias) internal Scope GetScope (string alias) { if (HasScope(alias)) - { return Links[alias]; - } throw new LinkingException("No alias '" + alias + "' in " + ToString()); } @@ -108,10 +104,10 @@ public override string ToString () return $"LinkingContext (scope:{CurrentScope}; links:[{string.Join(",", Links)}])"; } - internal GlobalVariableCStatement? GetGlobalVariable(string memberName) + internal GlobalVariableCStatement? GetGlobalVariable (string memberName) { // TODO Check LinkingContext.GetGlobalVariable() works - + throw new NotImplementedException(); } } diff --git a/Crimson/Parsing/IHasScope.cs b/Crimson/Parsing/IHasScope.cs new file mode 100644 index 0000000..ba809e7 --- /dev/null +++ b/Crimson/Parsing/IHasScope.cs @@ -0,0 +1,7 @@ +namespace Crimson.Parsing +{ + internal interface IHasScope + { + Scope GetScope(); + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Scope.cs b/Crimson/Parsing/Scope.cs similarity index 96% rename from Crimson/CSharp/Parsing/Scope.cs rename to Crimson/Parsing/Scope.cs index 9fed792..b4bd1f9 100644 --- a/Crimson/CSharp/Parsing/Scope.cs +++ b/Crimson/Parsing/Scope.cs @@ -1,13 +1,13 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Core.CURI; -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Statements; +using Crimson.Core; +using Crimson.Exceptions; +using Crimson.CURI; +using Crimson.Generalising; +using Crimson.Generalising.Structures; +using Crimson.Linking; +using Crimson.Parsing.Statements; using NLog; -namespace Crimson.CSharp.Parsing +namespace Crimson.Parsing { /// /// An unlinked collection of statements which is the direct result of the parsing of a Crimson source file. A Linker may be used to convert this into a LinkedUnit. @@ -237,9 +237,7 @@ public override string ToString () Scope parent = this; ScopeVariableCStatement? var = null; if (!ScopeVariables.TryGetValue(name, out var) && HasParent()) - { return GetParent().FindScopeVariable(name); - } return var; } } diff --git a/Crimson/CSharp/Parsing/ScopeVisitor.cs b/Crimson/Parsing/ScopeVisitor.cs similarity index 96% rename from Crimson/CSharp/Parsing/ScopeVisitor.cs rename to Crimson/Parsing/ScopeVisitor.cs index b1b8c49..5b52e1e 100644 --- a/Crimson/CSharp/Parsing/ScopeVisitor.cs +++ b/Crimson/Parsing/ScopeVisitor.cs @@ -1,14 +1,14 @@ using Antlr4.Runtime.Misc; using Crimson.AntlrBuild; -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Parsing.Statements; -using Crimson.CSharp.Parsing.Tokens; -using Crimson.CSharp.Parsing.Tokens.Values; +using Crimson.Exceptions; +using Crimson.Parsing.Tokens.Values; +using Crimson.Parsing.Statements; +using Crimson.Parsing.Tokens; using NLog; using System.Text.RegularExpressions; -using static Crimson.CSharp.Parsing.Tokens.Comparator; +using static Crimson.Parsing.Tokens.Comparator; -namespace Crimson.CSharp.Parsing +namespace Crimson.Parsing { internal class ScopeVisitor : CrimsonBaseVisitor { @@ -41,7 +41,6 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) foreach (CrimsonParser.OperationHandlerContext unitStatementCtx in operationHandlersCtxs) { OperationHandlerCStatement unitStatement = VisitOperationHandler(unitStatementCtx); - //TODO compilation.AddOpHandler(unitStatement); } // Visit Compilation-Unit statements @@ -58,7 +57,7 @@ public override Scope VisitScope ([NotNull] CrimsonParser.ScopeContext context) } catch (Exception ex) { - Core.Crimson.Panic($"{GetType()} was unable to parse the given {(context == null ? "NULL" : context.GetType())}", Core.Crimson.PanicCode.COMPILE_PARSE_SCOPE, ex); + Crimson.Panic($"{GetType()} was unable to parse the given {(context == null ? "NULL" : context.GetType())}", Crimson.PanicCode.COMPILE_PARSE_SCOPE, ex); throw; } } @@ -122,9 +121,7 @@ private AbstractCrimsonStatement ParseStatement (CrimsonParser.StatementContext return VisitAssemblyCall(acCtx); } else - { throw new StatementParseException("The given CrimsonParser.FunctionStatementContext " + stCtx + " is not of a permissable type", null, null); - } } // ---------------------------------------------------- @@ -213,17 +210,11 @@ public VariableAssignmentCStatement ParseAssignVariable ([NotNull] CrimsonParser { if (context == null) throw new StatementParseException("Illegal null CrimsonParser.AssignVariableContext", null, null); if (context is CrimsonParser.AssignVariableDirectContext avdc) - { return VisitAssignVariableDirect(avdc); - } else if (context is CrimsonParser.AssignVariableAtPointerContext avapc) - { return VisitAssignVariableAtPointer(avapc); - } else - { throw new StatementParseException("The given CrimsonParser.AssignVariableContext (" + context + ") is not of a permissable type", null, null); - } } public override List VisitParameterList ([NotNull] CrimsonParser.ParameterListContext context) diff --git a/Crimson/Parsing/Statements/AbstractCrimsonStatement.cs b/Crimson/Parsing/Statements/AbstractCrimsonStatement.cs new file mode 100644 index 0000000..4f66901 --- /dev/null +++ b/Crimson/Parsing/Statements/AbstractCrimsonStatement.cs @@ -0,0 +1,22 @@ +using Crimson.Generalising; +using Crimson.Linking; + +namespace Crimson.Parsing.Statements +{ + /// + /// A collection of ICrimsonTokens which make a coherent "phrase". + /// + public abstract class AbstractCrimsonStatement + { + public bool Linked { get; set; } + + public abstract void Link(LinkingContext context); + + public abstract IGeneralAssemblyStructure Generalise(GeneralisationContext context); + + public override string ToString() + { + return GetType().Name; + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs b/Crimson/Parsing/Statements/AssemblyCallCStatement.cs similarity index 78% rename from Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs rename to Crimson/Parsing/Statements/AssemblyCallCStatement.cs index d9a0b61..f308464 100644 --- a/Crimson/CSharp/Parsing/Statements/AssemblyCallCStatement.cs +++ b/Crimson/Parsing/Statements/AssemblyCallCStatement.cs @@ -1,9 +1,9 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Specialising; +using Crimson.Specialising; +using Crimson.Generalising; +using Crimson.Generalising.Structures; +using Crimson.Linking; -namespace Crimson.CSharp.Parsing.Statements +namespace Crimson.Parsing.Statements { internal class AssemblyCallCStatement : AbstractCrimsonStatement { diff --git a/Crimson/CSharp/Parsing/Statements/BasicCallCStatement.cs b/Crimson/Parsing/Statements/BasicCallCStatement.cs similarity index 52% rename from Crimson/CSharp/Parsing/Statements/BasicCallCStatement.cs rename to Crimson/Parsing/Statements/BasicCallCStatement.cs index dc5ca1f..69a6fc8 100644 --- a/Crimson/CSharp/Parsing/Statements/BasicCallCStatement.cs +++ b/Crimson/Parsing/Statements/BasicCallCStatement.cs @@ -1,23 +1,23 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; +using Crimson.Generalising; +using Crimson.Generalising.Structures; +using Crimson.Linking; -namespace Crimson.CSharp.Parsing.Statements +namespace Crimson.Parsing.Statements { internal class BasicCallCStatement : AbstractCrimsonStatement { public string AssemblyText { get; protected set; } - public BasicCallCStatement (string assemblyText) + public BasicCallCStatement(string assemblyText) { AssemblyText = assemblyText; } - public override void Link (LinkingContext ctx) + public override void Link(LinkingContext ctx) { Linked = true; } - public override IGeneralAssemblyStructure Generalise (GeneralisationContext context) + public override IGeneralAssemblyStructure Generalise(GeneralisationContext context) { ArbitraryAssemblyStructure structure = new ArbitraryAssemblyStructure(AssemblyText); return structure; diff --git a/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs b/Crimson/Parsing/Statements/FunctionCStatement.cs similarity index 90% rename from Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs rename to Crimson/Parsing/Statements/FunctionCStatement.cs index 29dd8ec..f122cb6 100644 --- a/Crimson/CSharp/Parsing/Statements/FunctionCStatement.cs +++ b/Crimson/Parsing/Statements/FunctionCStatement.cs @@ -1,11 +1,11 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Tokens; -using Crimson.CSharp.Parsing.Tokens.Values; -using Crimson.CSharp.Specialising; - -namespace Crimson.CSharp.Parsing.Statements +using Crimson.Specialising; +using Crimson.Generalising; +using Crimson.Generalising.Structures; +using Crimson.Linking; +using Crimson.Parsing.Tokens; +using Crimson.Parsing.Tokens.Values; + +namespace Crimson.Parsing.Statements { /// /// A function, defined with the function keyword. Is a member of a package. diff --git a/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs b/Crimson/Parsing/Statements/FunctionCallCStatement.cs similarity index 86% rename from Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs rename to Crimson/Parsing/Statements/FunctionCallCStatement.cs index e473a8a..fe5b693 100644 --- a/Crimson/CSharp/Parsing/Statements/FunctionCallCStatement.cs +++ b/Crimson/Parsing/Statements/FunctionCallCStatement.cs @@ -1,11 +1,11 @@ -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Tokens; -using Crimson.CSharp.Parsing.Tokens.Values; +using Crimson.Exceptions; +using Crimson.Generalising; +using Crimson.Generalising.Structures; +using Crimson.Linking; +using Crimson.Parsing.Tokens; +using Crimson.Parsing.Tokens.Values; -namespace Crimson.CSharp.Parsing.Statements +namespace Crimson.Parsing.Statements { public class FunctionCallCStatement : AbstractCrimsonStatement { @@ -19,7 +19,7 @@ public FunctionCallCStatement (FullNameCToken identifier, IList /// A uhm... global variable... Is a member of a package, rather than a function. @@ -42,12 +42,8 @@ public override IGeneralAssemblyStructure Generalise (GeneralisationContext cont if (eval == null) throw new NullReferenceException($"Compile-time evaluation of a the global variable {GetName()}'s size may not return null."); if (eval is not int size) - { - if (!Int32.TryParse(eval.ToString(), out size)) - { + if (!int.TryParse(eval.ToString(), out size)) throw new InvalidCastException($"The size '{eval}' of a of the global variable {GetName()} could not be parsed to an integer: found type {eval.GetType()}."); - } - } int addrOffset = context.AllocGlobal(size); return new CommentAssemblyStructure($"GVAR: {GetName()}, addrOffset={addrOffset}"); @@ -55,9 +51,7 @@ public override IGeneralAssemblyStructure Generalise (GeneralisationContext cont // Cannot evaluate size at compile time else - { return new CommentAssemblyStructure($"GVAR: {GetName()}=?"); - } } } } diff --git a/Crimson/CSharp/Parsing/Statements/INamed.cs b/Crimson/Parsing/Statements/INamed.cs similarity index 70% rename from Crimson/CSharp/Parsing/Statements/INamed.cs rename to Crimson/Parsing/Statements/INamed.cs index 9051e37..5940b4a 100644 --- a/Crimson/CSharp/Parsing/Statements/INamed.cs +++ b/Crimson/Parsing/Statements/INamed.cs @@ -1,7 +1,7 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Parsing.Tokens; +using Crimson.Core; +using Crimson.Parsing.Tokens; -namespace Crimson.CSharp.Parsing.Statements +namespace Crimson.Parsing.Statements { /// /// A collection of ICrimsonTokens which make a coherent "phrase". diff --git a/Crimson/CSharp/Parsing/Statements/IfBlockCStatement.cs b/Crimson/Parsing/Statements/IfBlockCStatement.cs similarity index 91% rename from Crimson/CSharp/Parsing/Statements/IfBlockCStatement.cs rename to Crimson/Parsing/Statements/IfBlockCStatement.cs index d16192b..4118fa3 100644 --- a/Crimson/CSharp/Parsing/Statements/IfBlockCStatement.cs +++ b/Crimson/Parsing/Statements/IfBlockCStatement.cs @@ -1,10 +1,10 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Tokens; -using Crimson.CSharp.Specialising; +using Crimson.Specialising; +using Crimson.Generalising; +using Crimson.Generalising.Structures; +using Crimson.Linking; +using Crimson.Parsing.Tokens; -namespace Crimson.CSharp.Parsing.Statements +namespace Crimson.Parsing.Statements { internal class IfBlockCStatement : AbstractCrimsonStatement, IHasScope { diff --git a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs b/Crimson/Parsing/Statements/ImportCStatement.cs similarity index 84% rename from Crimson/CSharp/Parsing/Statements/ImportCStatement.cs rename to Crimson/Parsing/Statements/ImportCStatement.cs index bd04193..03115a3 100644 --- a/Crimson/CSharp/Parsing/Statements/ImportCStatement.cs +++ b/Crimson/Parsing/Statements/ImportCStatement.cs @@ -1,12 +1,12 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Core.CURI; -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Parsing.Tokens; +using Crimson.Core; +using Crimson.Exceptions; +using Crimson.CURI; +using Crimson.Parsing.Tokens; using NLog; using System; using static System.Formats.Asn1.AsnWriter; -namespace Crimson.CSharp.Parsing.Statements +namespace Crimson.Parsing.Statements { public class ImportCStatement { diff --git a/Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs b/Crimson/Parsing/Statements/OperationHandlerCStatement.cs similarity index 78% rename from Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs rename to Crimson/Parsing/Statements/OperationHandlerCStatement.cs index bfa7bab..dd2c697 100644 --- a/Crimson/CSharp/Parsing/Statements/OperationHandlerCStatement.cs +++ b/Crimson/Parsing/Statements/OperationHandlerCStatement.cs @@ -1,11 +1,11 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Tokens; -using Crimson.CSharp.Parsing.Tokens.Values; -using Crimson.CSharp.Specialising; +using Crimson.Generalising.Structures; +using Crimson.Specialising; +using Crimson.Generalising; +using Crimson.Linking; +using Crimson.Parsing.Tokens; +using Crimson.Parsing.Tokens.Values; -namespace Crimson.CSharp.Parsing.Statements +namespace Crimson.Parsing.Statements { public class OperationHandlerCStatement : AbstractCrimsonStatement { diff --git a/Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs b/Crimson/Parsing/Statements/ReturnCStatement.cs similarity index 71% rename from Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs rename to Crimson/Parsing/Statements/ReturnCStatement.cs index bc9a571..5869ae6 100644 --- a/Crimson/CSharp/Parsing/Statements/ReturnCStatement.cs +++ b/Crimson/Parsing/Statements/ReturnCStatement.cs @@ -1,9 +1,9 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Tokens.Values; +using Crimson.Generalising.Structures; +using Crimson.Generalising; +using Crimson.Linking; +using Crimson.Parsing.Tokens.Values; -namespace Crimson.CSharp.Parsing.Statements +namespace Crimson.Parsing.Statements { internal class ReturnCStatement : AbstractCrimsonStatement { diff --git a/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs b/Crimson/Parsing/Statements/ScopeVariableCStatement.cs similarity index 77% rename from Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs rename to Crimson/Parsing/Statements/ScopeVariableCStatement.cs index fc77b07..9cb4e05 100644 --- a/Crimson/CSharp/Parsing/Statements/ScopeVariableCStatement.cs +++ b/Crimson/Parsing/Statements/ScopeVariableCStatement.cs @@ -1,12 +1,12 @@ -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Tokens; -using Crimson.CSharp.Parsing.Tokens.Values; -using Crimson.CSharp.Specialising; +using Crimson.Exceptions; +using Crimson.Generalising.Structures; +using Crimson.Specialising; +using Crimson.Generalising; +using Crimson.Linking; +using Crimson.Parsing.Tokens; +using Crimson.Parsing.Tokens.Values; -namespace Crimson.CSharp.Parsing.Statements +namespace Crimson.Parsing.Statements { public class ScopeVariableCStatement : AbstractCrimsonStatement, INamed { @@ -37,12 +37,12 @@ public override IGeneralAssemblyStructure Generalise (GeneralisationContext cont return new ArbitraryAssemblyStructure(ToString()!); } - public FullNameCToken GetName() + public FullNameCToken GetName () { return Identifier; } - public void SetName(FullNameCToken name) + public void SetName (FullNameCToken name) { Identifier = name; } diff --git a/Crimson/CSharp/Parsing/Statements/StructureCStatement.cs b/Crimson/Parsing/Statements/StructureCStatement.cs similarity index 80% rename from Crimson/CSharp/Parsing/Statements/StructureCStatement.cs rename to Crimson/Parsing/Statements/StructureCStatement.cs index 40133cb..7347e50 100644 --- a/Crimson/CSharp/Parsing/Statements/StructureCStatement.cs +++ b/Crimson/Parsing/Statements/StructureCStatement.cs @@ -1,10 +1,10 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Tokens; -using Crimson.CSharp.Specialising; +using Crimson.Generalising.Structures; +using Crimson.Specialising; +using Crimson.Generalising; +using Crimson.Linking; +using Crimson.Parsing.Tokens; -namespace Crimson.CSharp.Parsing.Statements +namespace Crimson.Parsing.Statements { public class StructureCStatement : AbstractCrimsonStatement, INamed { diff --git a/Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs b/Crimson/Parsing/Statements/VariableAssignmentCStatement.cs similarity index 86% rename from Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs rename to Crimson/Parsing/Statements/VariableAssignmentCStatement.cs index da1cc7d..8d10dae 100644 --- a/Crimson/CSharp/Parsing/Statements/VariableAssignmentCStatement.cs +++ b/Crimson/Parsing/Statements/VariableAssignmentCStatement.cs @@ -1,13 +1,13 @@ -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Tokens; -using Crimson.CSharp.Parsing.Tokens.Values; -using Crimson.CSharp.Specialising; +using Crimson.Exceptions; +using Crimson.Specialising; +using Crimson.Generalising; +using Crimson.Generalising.Structures; +using Crimson.Linking; +using Crimson.Parsing.Tokens; +using Crimson.Parsing.Tokens.Values; using System; -namespace Crimson.CSharp.Parsing.Statements +namespace Crimson.Parsing.Statements { public class VariableAssignmentCStatement : AbstractCrimsonStatement { diff --git a/Crimson/CSharp/Parsing/Statements/WhileBlockCStatement.cs b/Crimson/Parsing/Statements/WhileBlockCStatement.cs similarity index 86% rename from Crimson/CSharp/Parsing/Statements/WhileBlockCStatement.cs rename to Crimson/Parsing/Statements/WhileBlockCStatement.cs index 21f8854..f6fb5c5 100644 --- a/Crimson/CSharp/Parsing/Statements/WhileBlockCStatement.cs +++ b/Crimson/Parsing/Statements/WhileBlockCStatement.cs @@ -1,10 +1,10 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Generalising.Structures; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Tokens; -using Crimson.CSharp.Specialising; +using Crimson.Specialising; +using Crimson.Generalising; +using Crimson.Generalising.Structures; +using Crimson.Linking; +using Crimson.Parsing.Tokens; -namespace Crimson.CSharp.Parsing.Statements +namespace Crimson.Parsing.Statements { internal class WhileBlockCStatement : AbstractCrimsonStatement, IHasScope { diff --git a/Crimson/CSharp/Parsing/Tokens/ComparatorCToken.cs b/Crimson/Parsing/Tokens/ComparatorCToken.cs similarity index 83% rename from Crimson/CSharp/Parsing/Tokens/ComparatorCToken.cs rename to Crimson/Parsing/Tokens/ComparatorCToken.cs index 89f6afd..7be18fe 100644 --- a/Crimson/CSharp/Parsing/Tokens/ComparatorCToken.cs +++ b/Crimson/Parsing/Tokens/ComparatorCToken.cs @@ -1,6 +1,6 @@ -using static Crimson.CSharp.Parsing.Tokens.Comparator; +using static Crimson.Parsing.Tokens.Comparator; -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.Parsing.Tokens { public class Comparator { @@ -13,7 +13,7 @@ public enum Values EQUAL_TO } - public static Values Get (string value) + public static Values Get(string value) { switch (value) { @@ -27,7 +27,7 @@ public static Values Get (string value) throw new ArgumentException($"{value} cannot be parsed to a Comparator"); } - public static string ToString (Values comparator) + public static string ToString(Values comparator) { switch (comparator) { diff --git a/Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs b/Crimson/Parsing/Tokens/ConditionCToken.cs similarity index 80% rename from Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs rename to Crimson/Parsing/Tokens/ConditionCToken.cs index 365fbf0..813c79a 100644 --- a/Crimson/CSharp/Parsing/Tokens/ConditionCToken.cs +++ b/Crimson/Parsing/Tokens/ConditionCToken.cs @@ -1,20 +1,20 @@ -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Tokens.Values; -using Crimson.CSharp.Specialising; +using Crimson.Linking; +using Crimson.Parsing.Tokens.Values; +using Crimson.Specialising; -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.Parsing.Tokens { internal class ConditionCToken : ICrimsonToken { public OperationResolvableValueCToken Operation { get; } - public ConditionCToken (OperationResolvableValueCToken operation) + public ConditionCToken(OperationResolvableValueCToken operation) { Operation = operation; } - public Fragment GetCrimsonBasic () + public Fragment GetCrimsonBasic() { /* @@ -43,7 +43,7 @@ public Fragment GetCrimsonBasic () return combined; } - public void Link (LinkingContext ctx) + public void Link(LinkingContext ctx) { Operation.Link(ctx); } diff --git a/Crimson/CSharp/Parsing/Tokens/ElifBlockCToken.cs b/Crimson/Parsing/Tokens/ElifBlockCToken.cs similarity index 77% rename from Crimson/CSharp/Parsing/Tokens/ElifBlockCToken.cs rename to Crimson/Parsing/Tokens/ElifBlockCToken.cs index e453908..6b06d13 100644 --- a/Crimson/CSharp/Parsing/Tokens/ElifBlockCToken.cs +++ b/Crimson/Parsing/Tokens/ElifBlockCToken.cs @@ -1,8 +1,8 @@ -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Statements; -using Crimson.CSharp.Specialising; +using Crimson.Specialising; +using Crimson.Linking; +using Crimson.Parsing.Statements; -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.Parsing.Tokens { internal class ElseIfBlockCToken : ICrimsonToken { diff --git a/Crimson/CSharp/Parsing/Tokens/ElseBlockCToken.cs b/Crimson/Parsing/Tokens/ElseBlockCToken.cs similarity index 77% rename from Crimson/CSharp/Parsing/Tokens/ElseBlockCToken.cs rename to Crimson/Parsing/Tokens/ElseBlockCToken.cs index 5e56305..15dc2b2 100644 --- a/Crimson/CSharp/Parsing/Tokens/ElseBlockCToken.cs +++ b/Crimson/Parsing/Tokens/ElseBlockCToken.cs @@ -1,7 +1,7 @@ -using Crimson.CSharp.Linking; -using Crimson.CSharp.Specialising; +using Crimson.Specialising; +using Crimson.Linking; -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.Parsing.Tokens { internal class ElseBlockCToken : ICrimsonToken, IHasScope { diff --git a/Crimson/CSharp/Parsing/Tokens/FullNameCToken.cs b/Crimson/Parsing/Tokens/FullNameCToken.cs similarity index 94% rename from Crimson/CSharp/Parsing/Tokens/FullNameCToken.cs rename to Crimson/Parsing/Tokens/FullNameCToken.cs index 1331140..5faec9c 100644 --- a/Crimson/CSharp/Parsing/Tokens/FullNameCToken.cs +++ b/Crimson/Parsing/Tokens/FullNameCToken.cs @@ -1,8 +1,8 @@ using Antlr4.Runtime; -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Linking; +using Crimson.Exceptions; +using Crimson.Linking; -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.Parsing.Tokens { public class FullNameCToken : ICrimsonToken { diff --git a/Crimson/CSharp/Parsing/Tokens/FunctionArgumentCToken.cs b/Crimson/Parsing/Tokens/FunctionArgumentCToken.cs similarity index 56% rename from Crimson/CSharp/Parsing/Tokens/FunctionArgumentCToken.cs rename to Crimson/Parsing/Tokens/FunctionArgumentCToken.cs index 6361ebe..8a2bd5d 100644 --- a/Crimson/CSharp/Parsing/Tokens/FunctionArgumentCToken.cs +++ b/Crimson/Parsing/Tokens/FunctionArgumentCToken.cs @@ -1,4 +1,4 @@ -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.Parsing.Tokens { public class FunctionArgumentCToken { diff --git a/Crimson/CSharp/Parsing/Tokens/ICrimsonToken.cs b/Crimson/Parsing/Tokens/ICrimsonToken.cs similarity index 61% rename from Crimson/CSharp/Parsing/Tokens/ICrimsonToken.cs rename to Crimson/Parsing/Tokens/ICrimsonToken.cs index a157e73..efd84b3 100644 --- a/Crimson/CSharp/Parsing/Tokens/ICrimsonToken.cs +++ b/Crimson/Parsing/Tokens/ICrimsonToken.cs @@ -1,12 +1,12 @@ -using Crimson.CSharp.Linking; +using Crimson.Linking; -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.Parsing.Tokens { /// /// ICrimsonStatements are made up of ICrimsonTokens. An ICrimsonToken cannot stand on its own. /// public interface ICrimsonToken { - public void Link (LinkingContext ctx); + public void Link(LinkingContext ctx); } } \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/ParameterCToken.cs b/Crimson/Parsing/Tokens/ParameterCToken.cs similarity index 70% rename from Crimson/CSharp/Parsing/Tokens/ParameterCToken.cs rename to Crimson/Parsing/Tokens/ParameterCToken.cs index 1c98d8b..bbd6337 100644 --- a/Crimson/CSharp/Parsing/Tokens/ParameterCToken.cs +++ b/Crimson/Parsing/Tokens/ParameterCToken.cs @@ -1,8 +1,8 @@ -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.Parsing.Tokens { internal class ParameterCToken { - public ParameterCToken (string identifier) + public ParameterCToken(string identifier) { Identifier = identifier; } diff --git a/Crimson/CSharp/Parsing/Tokens/TypeCToken.cs b/Crimson/Parsing/Tokens/TypeCToken.cs similarity index 80% rename from Crimson/CSharp/Parsing/Tokens/TypeCToken.cs rename to Crimson/Parsing/Tokens/TypeCToken.cs index abd41f2..a4d1f29 100644 --- a/Crimson/CSharp/Parsing/Tokens/TypeCToken.cs +++ b/Crimson/Parsing/Tokens/TypeCToken.cs @@ -4,7 +4,7 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Parsing.Tokens +namespace Crimson.Parsing.Tokens { internal class TypeCToken { diff --git a/Crimson/CSharp/Parsing/Tokens/Values/ComplexValueCToken.cs b/Crimson/Parsing/Tokens/Values/ComplexValueCToken.cs similarity index 62% rename from Crimson/CSharp/Parsing/Tokens/Values/ComplexValueCToken.cs rename to Crimson/Parsing/Tokens/Values/ComplexValueCToken.cs index fb7e398..d9e4968 100644 --- a/Crimson/CSharp/Parsing/Tokens/Values/ComplexValueCToken.cs +++ b/Crimson/Parsing/Tokens/Values/ComplexValueCToken.cs @@ -1,7 +1,7 @@ -using Crimson.CSharp.Linking; -using Crimson.CSharp.Specialising; +using Crimson.Specialising; +using Crimson.Linking; -namespace Crimson.CSharp.Parsing.Tokens.Values +namespace Crimson.Parsing.Tokens.Values { public abstract class ComplexValueCToken : ICrimsonToken { diff --git a/Crimson/Parsing/Tokens/Values/FunctionCallResolvableValueCToken.cs b/Crimson/Parsing/Tokens/Values/FunctionCallResolvableValueCToken.cs new file mode 100644 index 0000000..52103fa --- /dev/null +++ b/Crimson/Parsing/Tokens/Values/FunctionCallResolvableValueCToken.cs @@ -0,0 +1,28 @@ +using Crimson.Exceptions; +using Crimson.Generalising.Structures; +using Crimson.Specialising; +using Crimson.Linking; +using Crimson.Parsing.Statements; + +namespace Crimson.Parsing.Tokens.Values +{ + public class FunctionCallResolvableValueCToken : ComplexValueCToken + { + public FunctionCallCStatement FunctionCall { get; } + + public FunctionCallResolvableValueCToken (FunctionCallCStatement functionCall) + { + FunctionCall = functionCall; + } + + public override void Link (LinkingContext ctx) + { + FunctionCall.Link(ctx); + } + + public override string ToString () + { + return "Call: " + FunctionCall.Identifier.ToString() + "()"; + } + } +} \ No newline at end of file diff --git a/Crimson/CSharp/Parsing/Tokens/Values/IdentifierSimpleValueCToken.cs b/Crimson/Parsing/Tokens/Values/IdentifierSimpleValueCToken.cs similarity index 67% rename from Crimson/CSharp/Parsing/Tokens/Values/IdentifierSimpleValueCToken.cs rename to Crimson/Parsing/Tokens/Values/IdentifierSimpleValueCToken.cs index f7b10ca..028bdd5 100644 --- a/Crimson/CSharp/Parsing/Tokens/Values/IdentifierSimpleValueCToken.cs +++ b/Crimson/Parsing/Tokens/Values/IdentifierSimpleValueCToken.cs @@ -1,10 +1,10 @@ -using Crimson.CSharp.Generalising; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Parsing.Statements; -using static System.Formats.Asn1.AsnWriter; +using static System.Formats.Asn1.AsnWriter; using System.Numerics; +using Crimson.Generalising; +using Crimson.Linking; +using Crimson.Parsing.Statements; -namespace Crimson.CSharp.Parsing.Tokens.Values +namespace Crimson.Parsing.Tokens.Values { public class IdentifierSimpleValueCToken : SimpleValueCToken { @@ -12,39 +12,37 @@ public class IdentifierSimpleValueCToken : SimpleValueCToken public ScopeVariableCStatement? ScopeVariable { get; private set; } public GlobalVariableCStatement? GlobalVariable { get; private set; } - public IdentifierSimpleValueCToken (FullNameCToken identifier) + public IdentifierSimpleValueCToken(FullNameCToken identifier) { Identifier = identifier; } - public override void Link (LinkingContext ctx) + public override void Link(LinkingContext ctx) { // TODO Scope.FindScopeVariable(MemberName); ScopeVariable = ctx.CurrentScope.FindScopeVariable(Identifier.MemberName!); // TODO LinkingContext.GetGlobalVariable(MemberName); if (ScopeVariable == null) - { GlobalVariable = ctx.GetGlobalVariable(Identifier.MemberName); - } } - public override string ToString () + public override string ToString() { return GetText(); } - public override string GetText () + public override string GetText() { return Identifier.ToString(); } - public override bool CanEvaluate () + public override bool CanEvaluate() { return true; } - public override object Evaluate (GeneralisationContext context) + public override object Evaluate(GeneralisationContext context) { if (context.Globals.TryGetValue(Identifier.ToString(), out GlobalVariableCStatement global)) { diff --git a/Crimson/CSharp/Parsing/Tokens/Values/OperationResolvableValueCToken.cs b/Crimson/Parsing/Tokens/Values/OperationResolvableValueCToken.cs similarity index 80% rename from Crimson/CSharp/Parsing/Tokens/Values/OperationResolvableValueCToken.cs rename to Crimson/Parsing/Tokens/Values/OperationResolvableValueCToken.cs index 6fc6e39..bf3f1c3 100644 --- a/Crimson/CSharp/Parsing/Tokens/Values/OperationResolvableValueCToken.cs +++ b/Crimson/Parsing/Tokens/Values/OperationResolvableValueCToken.cs @@ -1,9 +1,9 @@ -using Crimson.CSharp.Exceptions; -using Crimson.CSharp.Linking; -using Crimson.CSharp.Specialising; +using Crimson.Exceptions; +using Crimson.Specialising; +using Crimson.Linking; using System.Net.Http; -namespace Crimson.CSharp.Parsing.Tokens.Values +namespace Crimson.Parsing.Tokens.Values { public class OperationResolvableValueCToken : ComplexValueCToken { @@ -12,20 +12,20 @@ public class OperationResolvableValueCToken : ComplexValueCToken public SimpleValueCToken LeftToken { get; } public SimpleValueCToken RightToken { get; } - public OperationResolvableValueCToken(SimpleValueCToken leftToken, OperationType opType, SimpleValueCToken rightToken) + public OperationResolvableValueCToken (SimpleValueCToken leftToken, OperationType opType, SimpleValueCToken rightToken) { LeftToken = leftToken; OpType = opType; RightToken = rightToken; } - public override void Link(LinkingContext ctx) + public override void Link (LinkingContext ctx) { LeftToken.Link(ctx); RightToken.Link(ctx); } - public static OperationType ParseOpType(string s) + public static OperationType ParseOpType (string s) { s = s.Trim(); return s switch diff --git a/Crimson/Parsing/Tokens/Values/RawResolvableValueCToken.cs b/Crimson/Parsing/Tokens/Values/RawResolvableValueCToken.cs new file mode 100644 index 0000000..43bf75f --- /dev/null +++ b/Crimson/Parsing/Tokens/Values/RawResolvableValueCToken.cs @@ -0,0 +1,39 @@ +using Crimson.Generalising; +using Crimson.Linking; + +namespace Crimson.Parsing.Tokens.Values +{ + public class RawResolvableValueCToken : SimpleValueCToken + { + public string Content { get; } + + public RawResolvableValueCToken(string s) + { + Content = s; + } + + public override void Link(LinkingContext ctx) + { + } + + public override string ToString() + { + return GetText(); + } + + public override string GetText() + { + return Content; + } + + public override object Evaluate(GeneralisationContext context) + { + return Content; + } + + public override bool CanEvaluate() + { + return true; + } + } +} \ No newline at end of file diff --git a/Crimson/Parsing/Tokens/Values/SimpleValueCToken.cs b/Crimson/Parsing/Tokens/Values/SimpleValueCToken.cs new file mode 100644 index 0000000..bd6ab4f --- /dev/null +++ b/Crimson/Parsing/Tokens/Values/SimpleValueCToken.cs @@ -0,0 +1,16 @@ +using Crimson.Generalising; +using Crimson.Linking; + +namespace Crimson.Parsing.Tokens.Values +{ + public abstract class SimpleValueCToken : ICrimsonToken + { + public SimpleValueCToken() + { + } + public abstract void Link(LinkingContext ctx); + public abstract string GetText(); + public abstract bool CanEvaluate(); + public abstract object Evaluate(GeneralisationContext context); + } +} \ No newline at end of file diff --git a/Crimson/Specialising/AbstractSpecificAssemblyProgram.cs b/Crimson/Specialising/AbstractSpecificAssemblyProgram.cs new file mode 100644 index 0000000..e14119d --- /dev/null +++ b/Crimson/Specialising/AbstractSpecificAssemblyProgram.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Crimson.Specialising +{ + public abstract class AbstractSpecificAssemblyProgram + { + + public abstract IEnumerable GetFragments(); + public abstract string GetExtension(); + public abstract void Write(string path); + } +} diff --git a/Crimson/CSharp/Specialising/AbstractSpecificAssemblyStatement.cs b/Crimson/Specialising/AbstractSpecificAssemblyStatement.cs similarity index 64% rename from Crimson/CSharp/Specialising/AbstractSpecificAssemblyStatement.cs rename to Crimson/Specialising/AbstractSpecificAssemblyStatement.cs index 66c734d..3adec90 100644 --- a/Crimson/CSharp/Specialising/AbstractSpecificAssemblyStatement.cs +++ b/Crimson/Specialising/AbstractSpecificAssemblyStatement.cs @@ -1,4 +1,4 @@ -namespace Crimson.CSharp.Specialising +namespace Crimson.Specialising { public abstract class AbstractSpecificAssemblyStatement { diff --git a/Crimson/CSharp/Specialising/Fragment.cs b/Crimson/Specialising/Fragment.cs similarity index 79% rename from Crimson/CSharp/Specialising/Fragment.cs rename to Crimson/Specialising/Fragment.cs index 36628b7..58a007c 100644 --- a/Crimson/CSharp/Specialising/Fragment.cs +++ b/Crimson/Specialising/Fragment.cs @@ -1,4 +1,4 @@ -namespace Crimson.CSharp.Specialising +namespace Crimson.Specialising { public class Fragment { @@ -7,7 +7,7 @@ public class Fragment private int _indentation; public string? ResultHolder { get; set; } - public Fragment (int indentation) + public Fragment(int indentation) { _statements = new List(); _indents = new List(); @@ -15,20 +15,20 @@ public Fragment (int indentation) } - public void Add (AbstractSpecificAssemblyStatement statement) + public void Add(AbstractSpecificAssemblyStatement statement) { if (statement == null) throw new ArgumentNullException("Cannot add a null BasicStatement to a Fragment"); _statements.Add(statement); _indents.Add(_indentation); } - public void Add (IList statements) + public void Add(IList statements) { foreach (var s in statements) Add(s); } - public void Add (Fragment fragment) + public void Add(Fragment fragment) { for (int i = 0; i < fragment._statements.Count; i++) { @@ -37,7 +37,7 @@ public void Add (Fragment fragment) } } - public List GetLines () + public List GetLines() { List lines = new List(); for (int i = 0; i < _statements.Count; i++) @@ -50,7 +50,7 @@ public List GetLines () return lines; } - public Fragment WithIndentation (int indentation) + public Fragment WithIndentation(int indentation) { _indentation = indentation; return this; diff --git a/Crimson/CSharp/Specialising/ISpecialiser.cs b/Crimson/Specialising/ISpecialiser.cs similarity index 89% rename from Crimson/CSharp/Specialising/ISpecialiser.cs rename to Crimson/Specialising/ISpecialiser.cs index c68716a..764a750 100644 --- a/Crimson/CSharp/Specialising/ISpecialiser.cs +++ b/Crimson/Specialising/ISpecialiser.cs @@ -1,7 +1,7 @@ -using Crimson.CSharp.Core; -using Crimson.CSharp.Generalising; +using Crimson.Core; +using Crimson.Generalising; -namespace Crimson.CSharp.Specialising +namespace Crimson.Specialising { /// /// diff --git a/Crimson/CSharp/Specialising/RFASM/RFASMComment.cs b/Crimson/Specialising/RFASM/RFASMComment.cs similarity index 91% rename from Crimson/CSharp/Specialising/RFASM/RFASMComment.cs rename to Crimson/Specialising/RFASM/RFASMComment.cs index 35a0e7d..1697e04 100644 --- a/Crimson/CSharp/Specialising/RFASM/RFASMComment.cs +++ b/Crimson/Specialising/RFASM/RFASMComment.cs @@ -4,7 +4,7 @@ using System.Text; using System.Threading.Tasks; -namespace Crimson.CSharp.Specialising.RFASM +namespace Crimson.Specialising.RFASM { internal class RFASMComment : RFASMStatement { diff --git a/Crimson/CSharp/Specialising/RFASM/RFASMProgram.cs b/Crimson/Specialising/RFASM/RFASMProgram.cs similarity index 69% rename from Crimson/CSharp/Specialising/RFASM/RFASMProgram.cs rename to Crimson/Specialising/RFASM/RFASMProgram.cs index 9de0e3a..d521ca0 100644 --- a/Crimson/CSharp/Specialising/RFASM/RFASMProgram.cs +++ b/Crimson/Specialising/RFASM/RFASMProgram.cs @@ -1,7 +1,6 @@ -using Crimson.CSharp.Specialising; -using NLog; +using NLog; -namespace Crimson.CSharp.Specialising.RFASM +namespace Crimson.Specialising.RFASM { internal class RFASMProgram : AbstractSpecificAssemblyProgram { @@ -9,49 +8,47 @@ internal class RFASMProgram : AbstractSpecificAssemblyProgram public List Fragments { get; } - public RFASMProgram () + public RFASMProgram() { Fragments = new List(); } - public void Add (Fragment f) + public void Add(Fragment f) { Fragments.Add(f); } - public void Add (params RFASMStatement[] statements) + public void Add(params RFASMStatement[] statements) { Fragment f = new Fragment(0); f.Add(statements); Add(f); } - public void Add (RFASMStatement statement) + public void Add(RFASMStatement statement) { Fragment f = new Fragment(0); f.Add(statement); Fragments.Add(f); } - public override IEnumerable GetFragments () + public override IEnumerable GetFragments() { return Fragments; } - public override string GetExtension () + public override string GetExtension() { return ".rfp"; } - public override void Write (string path) + public override void Write(string path) { LOGGER.Info("Writing RFASMProgram to " + path); List lines = new List(); foreach (var f in GetFragments()) - { lines.AddRange(f.GetLines()); - } _ = Directory.CreateDirectory(Path.GetDirectoryName(path)); File.WriteAllLines(path, lines.ToArray()); diff --git a/Crimson/CSharp/Specialising/RFASM/RFASMSpecialiser.cs b/Crimson/Specialising/RFASM/RFASMSpecialiser.cs similarity index 81% rename from Crimson/CSharp/Specialising/RFASM/RFASMSpecialiser.cs rename to Crimson/Specialising/RFASM/RFASMSpecialiser.cs index 6fdccc4..cc75858 100644 --- a/Crimson/CSharp/Specialising/RFASM/RFASMSpecialiser.cs +++ b/Crimson/Specialising/RFASM/RFASMSpecialiser.cs @@ -1,7 +1,8 @@ -using Crimson.CSharp.Generalising; +using Crimson.Specialising.RFASM; +using Crimson.Generalising; using NLog; -namespace Crimson.CSharp.Specialising.RFASM +namespace Crimson.Specialising.RFASM { internal class RFASMSpecialiser : ISpecialiser { @@ -12,9 +13,7 @@ public AbstractSpecificAssemblyProgram Specialise (GeneralAssemblyProgram genera RFASMProgram program = new RFASMProgram(); foreach (var s in general.Structures) - { program.Add(new RFASMComment(s.ToString())); - } return program; } diff --git a/Crimson/CSharp/Specialising/RFASM/RFASMStatement.cs b/Crimson/Specialising/RFASM/RFASMStatement.cs similarity index 72% rename from Crimson/CSharp/Specialising/RFASM/RFASMStatement.cs rename to Crimson/Specialising/RFASM/RFASMStatement.cs index 2c31895..e276a46 100644 --- a/Crimson/CSharp/Specialising/RFASM/RFASMStatement.cs +++ b/Crimson/Specialising/RFASM/RFASMStatement.cs @@ -3,9 +3,8 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using Crimson.CSharp.Specialising; -namespace Crimson.CSharp.Specialising.RFASM +namespace Crimson.Specialising.RFASM { public class RFASMStatement : AbstractSpecificAssemblyStatement { diff --git a/CrimsonBasic/CSharp/Core/BasicProgram.cs b/CrimsonBasic/CSharp/Core/BasicProgram.cs deleted file mode 100644 index 146ae46..0000000 --- a/CrimsonBasic/CSharp/Core/BasicProgram.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CrimsonBasic.CSharp.Statements; - -namespace CrimsonBasic.CSharp.Core -{ - public class BasicProgram - { - public List Fragments { get; } - - public BasicProgram() - { - Fragments = new List(); - } - - public void Add(Fragment f) - { - Fragments.Add(f); - } - - public void Add(BasicStatement s) - { - Fragment f = new Fragment(0); - f.Add(s); - Fragments.Add(f); - } - } -} diff --git a/CrimsonBasic/CSharp/Core/CrimsonBasic.cs b/CrimsonBasic/CSharp/Core/CrimsonBasic.cs deleted file mode 100644 index 808da08..0000000 --- a/CrimsonBasic/CSharp/Core/CrimsonBasic.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace CrimsonBasic.CSharp.Core -{ - public class CrimsonBasic - { - public static readonly string VERSION = "v0.0"; - - static void Main(string[] args) - { - Console.WriteLine("Hello, World!"); - } - } -} \ No newline at end of file diff --git a/CrimsonBasic/CSharp/Core/Fragment.cs b/CrimsonBasic/CSharp/Core/Fragment.cs deleted file mode 100644 index 87a5393..0000000 --- a/CrimsonBasic/CSharp/Core/Fragment.cs +++ /dev/null @@ -1,69 +0,0 @@ -using CrimsonBasic.CSharp.Statements; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CrimsonBasic.CSharp.Core -{ - public class Fragment - { - private List _statements; - private List _indents; - private int _indentation; - public string? ResultHolder { get; set; } - - public Fragment(int indentation) - { - _statements = new List(); - _indents = new List(); - _indentation = indentation; - } - - - public void Add(BasicStatement statement) - { - if (statement == null) throw new ArgumentNullException("Cannot add a null BasicStatement to a Fragment"); - _statements.Add(statement); - _indents.Add(_indentation); - } - - public void Add(IList statements) - { - foreach (var s in statements) - { - Add(s); - } - } - - public void Add(Fragment fragment) - { - for (int i = 0; i < fragment._statements.Count; i++) - { - _statements.Add(fragment._statements[i]); - _indents.Add(_indentation + fragment._indentation + fragment._indents[i]); - } - } - - public List GetLines() - { - List lines = new List(); - for (int i = 0; i < _statements.Count; i++) - { - int j = _indents[i]; - var s = _statements[i]; - string indent = String.Concat(Enumerable.Repeat(" ", j)); - lines.Add(indent + s); - } - return lines; - } - - public Fragment WithIndentation(int indentation) - { - _indentation = indentation; - return this; - } - - } -} diff --git a/CrimsonBasic/CSharp/Exceptions/NamingException.cs b/CrimsonBasic/CSharp/Exceptions/NamingException.cs deleted file mode 100644 index c2fc388..0000000 --- a/CrimsonBasic/CSharp/Exceptions/NamingException.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CrimsonBasic.CSharp.Exceptions -{ - internal class NamingException: Exception - { - public NamingException(string message): base (message) { } - public NamingException(string message, Exception innerException) : base(message, innerException) { } - } -} diff --git a/CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs b/CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs deleted file mode 100644 index 6c0a0ea..0000000 --- a/CrimsonBasic/CSharp/Statements/ArbitraryBStatement.cs +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index b2c280b..0000000 --- a/CrimsonBasic/CSharp/Statements/AssemblyBStatement.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace CrimsonBasic.CSharp.Statements -{ - public class AssemblyBStatement : BasicStatement - { - public string Text { get; protected set; } - - public AssemblyBStatement (string text) - { - Text = text; - } - - public override string ToString () - { - return $"A~ \"{Text}\""; - } - } -} \ No newline at end of file diff --git a/CrimsonBasic/CSharp/Statements/BasicStatement.cs b/CrimsonBasic/CSharp/Statements/BasicStatement.cs deleted file mode 100644 index 1a1e92c..0000000 --- a/CrimsonBasic/CSharp/Statements/BasicStatement.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace CrimsonBasic.CSharp.Statements -{ - public abstract class BasicStatement - { - - public abstract override string ToString(); - } -} \ No newline at end of file diff --git a/CrimsonBasic/CSharp/Statements/CommentBStatement.cs b/CrimsonBasic/CSharp/Statements/CommentBStatement.cs deleted file mode 100644 index 526d352..0000000 --- a/CrimsonBasic/CSharp/Statements/CommentBStatement.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; - -namespace CrimsonBasic.CSharp.Statements -{ - public class CommentBStatement : BasicStatement - { - private string _text; - - public CommentBStatement(string text) - { - _text = text; - } - - public override string ToString() - { - if (_text.Equals("") || _text.StartsWith("//")) return _text; - return "// " + _text; - } - } -} diff --git a/CrimsonBasic/CSharp/Statements/DecSpBStatement.cs b/CrimsonBasic/CSharp/Statements/DecSpBStatement.cs deleted file mode 100644 index d00718b..0000000 --- a/CrimsonBasic/CSharp/Statements/DecSpBStatement.cs +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index f2c2aa7..0000000 --- a/CrimsonBasic/CSharp/Statements/IncSpBStatement.cs +++ /dev/null @@ -1,23 +0,0 @@ -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/JumpBStatement.cs b/CrimsonBasic/CSharp/Statements/JumpBStatement.cs deleted file mode 100644 index 045a70d..0000000 --- a/CrimsonBasic/CSharp/Statements/JumpBStatement.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CrimsonBasic.CSharp.Statements -{ - public class JumpBStatement : BasicStatement - { - private string _label; - - public JumpBStatement(string _label) - { - this._label = _label; - } - - public override string ToString() - { - return $"jump {_label}"; - } - } -} diff --git a/CrimsonBasic/CSharp/Statements/JumpEqualBStatement.cs b/CrimsonBasic/CSharp/Statements/JumpEqualBStatement.cs deleted file mode 100644 index 670041b..0000000 --- a/CrimsonBasic/CSharp/Statements/JumpEqualBStatement.cs +++ /dev/null @@ -1,31 +0,0 @@ -using CrimsonBasic.CSharp.Exceptions; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CrimsonBasic.CSharp.Statements -{ - public class JumpEqualBStatement : BasicStatement - { - private string _value1; - private string _value2; - private string _label; - - public JumpEqualBStatement(string _value1, string _value2, string _label) - { - 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; - } - - public override string ToString() - { - return $"jeq {_value1} {_value2} {_label}"; - } - } -} diff --git a/CrimsonBasic/CSharp/Statements/JumpSubBStatement.cs b/CrimsonBasic/CSharp/Statements/JumpSubBStatement.cs deleted file mode 100644 index 685f812..0000000 --- a/CrimsonBasic/CSharp/Statements/JumpSubBStatement.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CrimsonBasic.CSharp.Statements -{ - public class JumpSubBStatement : BasicStatement - { - private string _label; - - public JumpSubBStatement (string _label) - { - this._label = _label; - } - - public override string ToString () - { - return $"jump {_label}"; - } - } -} diff --git a/CrimsonBasic/CSharp/Statements/LabelBStatement.cs b/CrimsonBasic/CSharp/Statements/LabelBStatement.cs deleted file mode 100644 index 7a3a3b8..0000000 --- a/CrimsonBasic/CSharp/Statements/LabelBStatement.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CrimsonBasic.CSharp.Statements -{ - public class LabelBStatement : BasicStatement - { - private string _name; - - public LabelBStatement(string label) - { - _name = label; - } - - public override string ToString() - { - return (_name.StartsWith(":") ? _name : ":" + _name) + (_name.EndsWith(":") ? "" : ":"); - } - } -} diff --git a/CrimsonBasic/CSharp/Statements/PopSfBStatement.cs b/CrimsonBasic/CSharp/Statements/PopSfBStatement.cs deleted file mode 100644 index 0d84f63..0000000 --- a/CrimsonBasic/CSharp/Statements/PopSfBStatement.cs +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index d34af9f..0000000 --- a/CrimsonBasic/CSharp/Statements/PushSfBStatement.cs +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 4e5853c..0000000 --- a/CrimsonBasic/CSharp/Statements/RegSetBStatement.cs +++ /dev/null @@ -1,25 +0,0 @@ -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/ReturnBStatement.cs b/CrimsonBasic/CSharp/Statements/ReturnBStatement.cs deleted file mode 100644 index 50bdc37..0000000 --- a/CrimsonBasic/CSharp/Statements/ReturnBStatement.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CrimsonBasic.CSharp.Statements -{ - public class ReturnBStatement : BasicStatement - { - public ReturnBStatement() - { - } - - public override string ToString() - { - return "return;"; - } - } -} diff --git a/CrimsonBasic/CSharp/Statements/SetBStatement.cs b/CrimsonBasic/CSharp/Statements/SetBStatement.cs deleted file mode 100644 index f2e6d0f..0000000 --- a/CrimsonBasic/CSharp/Statements/SetBStatement.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CrimsonBasic.CSharp.Statements -{ - public class SetBStatement : BasicStatement - { - - public string Value { get; protected set; } - public int Size { get; protected set; } - public string Name { get; protected set; } - - public SetBStatement(string name, int size, string value) - { - Name = name; - Size = size; - Value = value; - } - - public override string ToString() - { - return $"var_set {Name}, {Size}, {Value};"; - } - } -} diff --git a/CrimsonBasic/CrimsonBasic.csproj b/CrimsonBasic/CrimsonBasic.csproj deleted file mode 100644 index 537c02e..0000000 --- a/CrimsonBasic/CrimsonBasic.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - Exe - net6.0 - enable - enable - CrimsonBasic.CSharp.Core.CrimsonBasic - - - - - - - diff --git a/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml b/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml deleted file mode 100644 index ee89cce..0000000 --- a/CrimsonBasic/Resources/CrimsonBasicNotepad++.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - 00// 01 02 03 04 - - - - - - - - ; - - - - - - - - - - - return jeq - inc_sp dec_sp - push_sf pop_sf - jump - var_set reg_set - 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/RedFoxAssembly/CSharp/Core/LexerErrorListener.cs b/RedFoxAssembly/Antlr/LexerErrorListener.cs similarity index 66% rename from RedFoxAssembly/CSharp/Core/LexerErrorListener.cs rename to RedFoxAssembly/Antlr/LexerErrorListener.cs index 8f80bb6..765e1ca 100644 --- a/RedFoxAssembly/CSharp/Core/LexerErrorListener.cs +++ b/RedFoxAssembly/Antlr/LexerErrorListener.cs @@ -1,24 +1,26 @@ using Antlr4.Runtime; using NLog; +using RedFoxAssembly.Core; +using RedFoxAssembly.Exceptions; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Core +namespace RedFoxAssembly.Antlr { internal class LexerErrorListener : IAntlrErrorListener { public static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); private string Path { get; set; } - public LexerErrorListener(string path) + public LexerErrorListener (string path) { Path = path; } - void IAntlrErrorListener.SyntaxError(TextWriter output, IRecognizer recognizer, int offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) + void IAntlrErrorListener.SyntaxError (TextWriter output, IRecognizer recognizer, int offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) { string message = $"Lexer error lexing {Path} @ line:{line} char:{charPositionInLine} msg:{msg}"; LOGGER.Error(message); diff --git a/RedFoxAssembly/CSharp/Core/ParserErrorListener.cs b/RedFoxAssembly/Antlr/ParserErrorListener.cs similarity index 67% rename from RedFoxAssembly/CSharp/Core/ParserErrorListener.cs rename to RedFoxAssembly/Antlr/ParserErrorListener.cs index cf9266d..d5f67a7 100644 --- a/RedFoxAssembly/CSharp/Core/ParserErrorListener.cs +++ b/RedFoxAssembly/Antlr/ParserErrorListener.cs @@ -1,19 +1,22 @@ using Antlr4.Runtime; using NLog; +using RedFoxAssembly.Core; +using RedFoxAssembly.Core; +using RedFoxAssembly.Exceptions; -namespace RedFoxAssembly.CSharp.Core +namespace RedFoxAssembly.Antlr { internal class ParserErrorListener : BaseErrorListener { private static readonly Logger LOGGER = LogManager.GetCurrentClassLogger(); private string Path { get; set; } - public ParserErrorListener(string path) + public ParserErrorListener (string path) { Path = path; } - public override void SyntaxError(TextWriter output, IRecognizer recognizer, IToken offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) + public override void SyntaxError (TextWriter output, IRecognizer recognizer, IToken offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) { string formattedMessage = msg[0].ToString().ToUpper() + msg.Substring(1); // Capitalise first letter diff --git a/RedFoxAssembly/Antlr/RFASMProgramVisitor.cs b/RedFoxAssembly/Antlr/RFASMProgramVisitor.cs new file mode 100644 index 0000000..71e4ccc --- /dev/null +++ b/RedFoxAssembly/Antlr/RFASMProgramVisitor.cs @@ -0,0 +1,311 @@ +using Antlr4.Runtime; +using Antlr4.Runtime.Misc; +using NLog.Targets; +using RedFoxAssembly.AntlrBuild; +using RedFoxAssembly.Statements; +using RedFoxAssembly.Exceptions; +using System.Text; + +namespace RedFoxAssembly.Antlr +{ + internal class RFASMProgramVisitor : RedFoxAssemblyBaseVisitor + { + public override RFASMProgram VisitProgram ([NotNull] RedFoxAssemblyParser.ProgramContext context) + { + RFASMProgram program = new RFASMProgram(null, new List(), new List()); + + foreach (var c in context._configurations) + program.AddConfiguration(ParseConfiguration(c)); + + foreach (var s in context._commands) + program.AddCommand(ParseCommand(s)); + + return program; + } + + public IConfiguration ParseConfiguration ([NotNull] RedFoxAssemblyParser.ConfigurationContext context) + { + if (context == null) throw new ParsingException("ConfigurationContext cannot be null"); + if (context is RedFoxAssemblyParser.WidthConfigurationContext) return VisitWidthConfiguration((RedFoxAssemblyParser.WidthConfigurationContext) context); + if (context is RedFoxAssemblyParser.ValueConfigurationContext) return VisitValueConfiguration((RedFoxAssemblyParser.ValueConfigurationContext) context); + throw new ParsingException("Cannot parse ConfigurationContext of type " + context.GetText()); + } + + public override WidthConfiguration VisitWidthConfiguration ([NotNull] RedFoxAssemblyParser.WidthConfigurationContext context) { return VisitWidth(context.width()); } + public override WidthConfiguration VisitWidth ([NotNull] RedFoxAssemblyParser.WidthContext context) { return new WidthConfiguration(int.Parse(context.val.Text)); } + + public override ValueConfiguration VisitValueConfiguration ([NotNull] RedFoxAssemblyParser.ValueConfigurationContext context) { return VisitValue(context.value()); } + public override ValueConfiguration VisitValue ([NotNull] RedFoxAssemblyParser.ValueContext context) + { + string id = context.id.Text; + + try + { + if (context.byteValue != null) + { + RByte b = VisitByte(context.byteValue); + return new ValueConfiguration(context.id.Text, b); + } + if (context.wordValue != null) + { + Word w = VisitWord(context.wordValue); + return new ValueConfiguration(context.id.Text, VisitWord(context.wordValue)); + } + } + catch (Exception e) + { + throw new ParsingException($"Error parsing byte value '{context.byteValue?.GetText()}' or word value '{context.wordValue?.GetText()}' for {id}", e); + } + + throw new ParsingException($"Value {id} must be assigned either a word or byte value."); + } + + public override Word VisitWord ([NotNull] RedFoxAssemblyParser.WordContext context) + { + if (string.IsNullOrWhiteSpace(context.GetText())) + throw new ParsingException("Word cannot be null or whitespace"); + + // Process as raw hex + string? isHex = context.isHex?.Text; + if (!string.IsNullOrWhiteSpace(isHex)) + if (context._hexData != null) + { + List data = new List(); + foreach (var b in context._hexData) + { + string d = b.GetText(); + if (string.IsNullOrWhiteSpace(d)) throw new ParsingException("Cannot parse null or whitespace byte data"); + byte[] bs = Convert.FromHexString(d); + data.AddRange(bs); + } + if (data.Count < 1) throw new ParsingException("Word " + context.GetText() + " must contain at least 1 hex byte"); + return new Word(false, data.ToArray()); + } + + // Process as register reference + string? registerTarget = context.registerTarget?.Text; + if (!string.IsNullOrWhiteSpace(registerTarget)) + { + if (registerTarget.Length != 2) throw new ParsingException("Register prefix '" + registerTarget + "' is not of length 2"); + IData.RegisterTarget target = IData.ParseRegisterTarget(registerTarget[0]); + + string registerData = VisitBytedata(context.registerData); + byte[] rd = Convert.FromHexString(registerData); + if (rd.Length != 1) throw new ParsingException("Cannot parse register data of > 1 bytes"); + rd[0] = (byte) (rd[0] + IData.GetRegisterOffset(target)); + + return new Word(true, rd); + } + + // Process as value/identifer + string? valText = context.val?.Text; + if (!string.IsNullOrWhiteSpace(valText)) + return new Word(false, valText); + + throw new ParsingException("Failed to visit word with no bytedata or value-mapping"); + } + + public override RByte VisitByte ([NotNull] RedFoxAssemblyParser.ByteContext context) + { + if (string.IsNullOrWhiteSpace(context.GetText())) throw new ParsingException("Word cannot be null or whitespace"); + + // Process as raw hex + if (context.isHex != null && !string.IsNullOrWhiteSpace(context.isHex.Text)) + { + string d = context.hexData.GetText(); + if (string.IsNullOrWhiteSpace(d)) throw new ParsingException("Cannot parse null or whitespace byte data"); + byte[] bs = Convert.FromHexString(d); + return new RByte(false, bs[0]); + } + + // Process as register reference + string? registerTarget = context.registerTarget?.Text; + if (!string.IsNullOrWhiteSpace(registerTarget)) + { + if (registerTarget.Length != 2) throw new ParsingException("Register prefix '" + registerTarget + "' is not of length 2"); + IData.RegisterTarget target = IData.ParseRegisterTarget(registerTarget[0]); + + string registerData = VisitBytedata(context.registerData); + byte[] rd = Convert.FromHexString(registerData); + if (rd.Length != 1) throw new ParsingException("Cannot parse register data of > 1 bytes"); + byte r = rd[0]; + r = (byte) (r + IData.GetRegisterOffset(target)); + + return new RByte(true, r); + } + + // Process as value/identifer + string? valText = context.val?.Text; + if (!string.IsNullOrWhiteSpace(valText)) + return new RByte(false, context.val!.Text); + + throw new ParsingException("Failed to visit byte with no bytedata or value-mapping"); + } + + public override string VisitBytedata ([NotNull] RedFoxAssemblyParser.BytedataContext context) + { + return context.GetText(); + } + + public ICommand ParseCommand ([NotNull] RedFoxAssemblyParser.CommandContext context) + { + if (context == null) throw new ParsingException("RedFoxAssemblyParser.CommandContext cannot be null"); + if (context is RedFoxAssemblyParser.LabelCommandContext) return VisitLabelCommand((RedFoxAssemblyParser.LabelCommandContext) context); + if (context is RedFoxAssemblyParser.InstructionCommandContext) return VisitInstructionCommand((RedFoxAssemblyParser.InstructionCommandContext) context); + if (context is RedFoxAssemblyParser.RepeatCommandContext) return VisitRepeatCommand((RedFoxAssemblyParser.RepeatCommandContext) context); + throw new ParsingException("Cannot parse RedFoxAssemblyParser.CommandContext of type " + context.GetType()); + } + + public override LabelCommand VisitLabelCommand ([NotNull] RedFoxAssemblyParser.LabelCommandContext context) { return VisitLabel(context.label()); } + public override LabelCommand VisitLabel ([NotNull] RedFoxAssemblyParser.LabelContext context) { return new LabelCommand(context.id.Text); } + + public override RepeatCommand VisitRepeatCommand ([NotNull] RedFoxAssemblyParser.RepeatCommandContext context) { return VisitRepeat(context.repeat()); } + public override RepeatCommand VisitRepeat ([NotNull] RedFoxAssemblyParser.RepeatContext context) + { + StringBuilder builder = new StringBuilder(); + foreach (IToken t in context._times) builder.Append(t.Text); + int times = int.Parse(builder.ToString()); + + byte[] bytes = new byte[context._bytes.Count]; + for (int i = 0; i < bytes.Length; i++) + bytes[i] = (byte) VisitByte(context._bytes[i]).Data; + + return new RepeatCommand(times, bytes); + } + + public override InstructionCommand VisitInstructionCommand ([NotNull] RedFoxAssemblyParser.InstructionCommandContext context) { return ParseInstruction(context.instruction()); } + public InstructionCommand ParseInstruction (RedFoxAssemblyParser.InstructionContext context) + { + if (context == null) throw new ParsingException("Cannot parse null InstructionContext"); + if (context is RedFoxAssemblyParser.HLTInstructionContext) return VisitHLTInstruction((RedFoxAssemblyParser.HLTInstructionContext) context); + if (context is RedFoxAssemblyParser.NOPInstructionContext) return VisitNOPInstruction((RedFoxAssemblyParser.NOPInstructionContext) context); + if (context is RedFoxAssemblyParser.ADDInstructionContext) return VisitADDInstruction((RedFoxAssemblyParser.ADDInstructionContext) context); + if (context is RedFoxAssemblyParser.SUBInstructionContext) return VisitSUBInstruction((RedFoxAssemblyParser.SUBInstructionContext) context); + if (context is RedFoxAssemblyParser.LSLInstructionContext) return VisitLSLInstruction((RedFoxAssemblyParser.LSLInstructionContext) context); + if (context is RedFoxAssemblyParser.LSRInstructionContext) return VisitLSRInstruction((RedFoxAssemblyParser.LSRInstructionContext) context); + if (context is RedFoxAssemblyParser.NEGInstructionContext) return VisitNEGInstruction((RedFoxAssemblyParser.NEGInstructionContext) context); + if (context is RedFoxAssemblyParser.NOTInstructionContext) return VisitNOTInstruction((RedFoxAssemblyParser.NOTInstructionContext) context); + if (context is RedFoxAssemblyParser.CMPInstructionContext) return VisitCMPInstruction((RedFoxAssemblyParser.CMPInstructionContext) context); + if (context is RedFoxAssemblyParser.JMPInstructionContext) return VisitJMPInstruction((RedFoxAssemblyParser.JMPInstructionContext) context); + if (context is RedFoxAssemblyParser.BFGInstructionContext) return VisitBFGInstruction((RedFoxAssemblyParser.BFGInstructionContext) context); + //if (context is RedFoxAssemblyParser.HLTInstructionContext) return VisitHLTInstruction((RedFoxAssemblyParser.HLTInstructionContext)context); + //if (context is RedFoxAssemblyParser.HLTInstructionContext) return VisitHLTInstruction((RedFoxAssemblyParser.HLTInstructionContext)context); + //if (context is RedFoxAssemblyParser.HLTInstructionContext) return VisitHLTInstruction((RedFoxAssemblyParser.HLTInstructionContext)context); + if (context is RedFoxAssemblyParser.BSRInstructionContext) return VisitBSRInstruction((RedFoxAssemblyParser.BSRInstructionContext) context); + if (context is RedFoxAssemblyParser.RTNInstructionContext) return VisitRTNInstruction((RedFoxAssemblyParser.RTNInstructionContext) context); + if (context is RedFoxAssemblyParser.RRBInstructionContext) return VisitRRBInstruction((RedFoxAssemblyParser.RRBInstructionContext) context); + if (context is RedFoxAssemblyParser.RRWInstructionContext) return VisitRRWInstruction((RedFoxAssemblyParser.RRWInstructionContext) context); + if (context is RedFoxAssemblyParser.RMBInstructionContext) return VisitRMBInstruction((RedFoxAssemblyParser.RMBInstructionContext) context); + if (context is RedFoxAssemblyParser.RMWInstructionContext) return VisitRMWInstruction((RedFoxAssemblyParser.RMWInstructionContext) context); + if (context is RedFoxAssemblyParser.WRBInstructionContext) return VisitWRBInstruction((RedFoxAssemblyParser.WRBInstructionContext) context); + if (context is RedFoxAssemblyParser.WRWInstructionContext) return VisitWRWInstruction((RedFoxAssemblyParser.WRWInstructionContext) context); + if (context is RedFoxAssemblyParser.WMBInstructionContext) return VisitWMBInstruction((RedFoxAssemblyParser.WMBInstructionContext) context); + if (context is RedFoxAssemblyParser.WMWInstructionContext) return VisitWMWInstruction((RedFoxAssemblyParser.WMWInstructionContext) context); + if (context is RedFoxAssemblyParser.RVBInstructionContext) return VisitRVBInstruction((RedFoxAssemblyParser.RVBInstructionContext) context); + if (context is RedFoxAssemblyParser.RVWInstructionContext) return VisitRVWInstruction((RedFoxAssemblyParser.RVWInstructionContext) context); + if (context is RedFoxAssemblyParser.SINInstructionContext) return VisitSINInstruction((RedFoxAssemblyParser.SINInstructionContext) context); + if (context is RedFoxAssemblyParser.INTInstructionContext) return VisitINTInstruction((RedFoxAssemblyParser.INTInstructionContext) context); + if (context is RedFoxAssemblyParser.SFGInstructionContext) return VisitSFGInstruction((RedFoxAssemblyParser.SFGInstructionContext) context); + if (context is RedFoxAssemblyParser.ANDInstructionContext) return VisitANDInstruction((RedFoxAssemblyParser.ANDInstructionContext) context); + if (context is RedFoxAssemblyParser.LORInstructionContext) return VisitLORInstruction((RedFoxAssemblyParser.LORInstructionContext) context); + if (context is RedFoxAssemblyParser.XORInstructionContext) return VisitXORInstruction((RedFoxAssemblyParser.XORInstructionContext) context); + else throw new ParsingException("Unable to ParseInstruction of type " + context.GetType()); + } + + public override InstructionCommand VisitHLTInstruction ([NotNull] RedFoxAssemblyParser.HLTInstructionContext context) { return VisitHlt(context.hlt()); } + public override InstructionCommand VisitHlt ([NotNull] RedFoxAssemblyParser.HltContext context) { return new InstructionCommand(InstructionType.HLT, null, null); } + + public override InstructionCommand VisitNOPInstruction ([NotNull] RedFoxAssemblyParser.NOPInstructionContext context) { return VisitNop(context.nop()); } + public override InstructionCommand VisitNop ([NotNull] RedFoxAssemblyParser.NopContext context) { return new InstructionCommand(InstructionType.NOP, null, null); } + + public override InstructionCommand VisitADDInstruction ([NotNull] RedFoxAssemblyParser.ADDInstructionContext context) { return VisitAdd(context.add()); } + public override InstructionCommand VisitAdd ([NotNull] RedFoxAssemblyParser.AddContext context) { return new InstructionCommand(InstructionType.ADD, null, null); } + + public override InstructionCommand VisitSUBInstruction ([NotNull] RedFoxAssemblyParser.SUBInstructionContext context) { return VisitSub(context.sub()); } + public override InstructionCommand VisitSub ([NotNull] RedFoxAssemblyParser.SubContext context) { return new InstructionCommand(InstructionType.SUB, null, null); } + + public override InstructionCommand VisitLSLInstruction ([NotNull] RedFoxAssemblyParser.LSLInstructionContext context) { return VisitLsl(context.lsl()); } + public override InstructionCommand VisitLsl ([NotNull] RedFoxAssemblyParser.LslContext context) { return new InstructionCommand(InstructionType.LSL, null, null); } + + public override InstructionCommand VisitLSRInstruction ([NotNull] RedFoxAssemblyParser.LSRInstructionContext context) { return VisitLsr(context.lsr()); } + public override InstructionCommand VisitLsr ([NotNull] RedFoxAssemblyParser.LsrContext context) { return new InstructionCommand(InstructionType.LSR, null, null); } + + public override InstructionCommand VisitNEGInstruction ([NotNull] RedFoxAssemblyParser.NEGInstructionContext context) { return VisitNeg(context.neg()); } + public override InstructionCommand VisitNeg ([NotNull] RedFoxAssemblyParser.NegContext context) { return new InstructionCommand(InstructionType.NEG, null, null); } + + public override InstructionCommand VisitNOTInstruction ([NotNull] RedFoxAssemblyParser.NOTInstructionContext context) { return VisitNot(context.not()); } + public override InstructionCommand VisitNot ([NotNull] RedFoxAssemblyParser.NotContext context) { return new InstructionCommand(InstructionType.NOT, null, null); } + + public override InstructionCommand VisitCMPInstruction ([NotNull] RedFoxAssemblyParser.CMPInstructionContext context) { return VisitCmp(context.cmp()); } + public override InstructionCommand VisitCmp ([NotNull] RedFoxAssemblyParser.CmpContext context) { return new InstructionCommand(InstructionType.CMP, null, null); } + + public override InstructionCommand VisitJMPInstruction ([NotNull] RedFoxAssemblyParser.JMPInstructionContext context) { return VisitJmp(context.jmp()); } + public override InstructionCommand VisitJmp ([NotNull] RedFoxAssemblyParser.JmpContext context) { return new InstructionCommand(InstructionType.JMP, VisitWord(context.arg1w), null); } + + public override InstructionCommand VisitBFGInstruction ([NotNull] RedFoxAssemblyParser.BFGInstructionContext context) { return VisitBfg(context.bfg()); } + public override InstructionCommand VisitBfg ([NotNull] RedFoxAssemblyParser.BfgContext context) { return new InstructionCommand(InstructionType.BFG, VisitWord(context.arg1w), VisitByte(context.arg2b)); } + + //public override Instruction VisitBFGInstruction([NotNull] RedFoxAssemblyParser.BFGInstructionContext context) { return VisitBfg(context.bfg()); } + //public override Instruction VisitBfg([NotNull] RedFoxAssemblyParser.BfgContext context) { return new Instruction(InstructionType.BFG, null, null); } + + //public override Instruction VisitBFGInstruction([NotNull] RedFoxAssemblyParser.BFGInstructionContext context) { return VisitBfg(context.bfg()); } + //public override Instruction VisitBfg([NotNull] RedFoxAssemblyParser.BfgContext context) { return new Instruction(InstructionType.BFG, null, null); } + + //public override Instruction VisitBFGInstruction([NotNull] RedFoxAssemblyParser.BFGInstructionContext context) { return VisitBfg(context.bfg()); } + //public override Instruction VisitBfg([NotNull] RedFoxAssemblyParser.BfgContext context) { return new Instruction(InstructionType.BFG, null, null); } + + public override InstructionCommand VisitBSRInstruction ([NotNull] RedFoxAssemblyParser.BSRInstructionContext context) { return VisitBsr(context.bsr()); } + public override InstructionCommand VisitBsr ([NotNull] RedFoxAssemblyParser.BsrContext context) { return new InstructionCommand(InstructionType.BSR, VisitWord(context.arg1w), null); } + + public override InstructionCommand VisitRTNInstruction ([NotNull] RedFoxAssemblyParser.RTNInstructionContext context) { return VisitRtn(context.rtn()); } + public override InstructionCommand VisitRtn ([NotNull] RedFoxAssemblyParser.RtnContext context) { return new InstructionCommand(InstructionType.RTN, null, null); } + + public override InstructionCommand VisitRRBInstruction ([NotNull] RedFoxAssemblyParser.RRBInstructionContext context) { return VisitRrb(context.rrb()); } + public override InstructionCommand VisitRrb ([NotNull] RedFoxAssemblyParser.RrbContext context) { return new InstructionCommand(InstructionType.RRB, VisitByte(context.arg1b), VisitByte(context.arg2b)); } + + public override InstructionCommand VisitRRWInstruction ([NotNull] RedFoxAssemblyParser.RRWInstructionContext context) { return VisitRrw(context.rrw()); } + public override InstructionCommand VisitRrw ([NotNull] RedFoxAssemblyParser.RrwContext context) { return new InstructionCommand(InstructionType.RRW, VisitByte(context.arg1b), null); } + + public override InstructionCommand VisitRMBInstruction ([NotNull] RedFoxAssemblyParser.RMBInstructionContext context) { return VisitRmb(context.rmb()); } + public override InstructionCommand VisitRmb ([NotNull] RedFoxAssemblyParser.RmbContext context) { return new InstructionCommand(InstructionType.RMB, VisitWord(context.arg1w), null); } + + public override InstructionCommand VisitRMWInstruction ([NotNull] RedFoxAssemblyParser.RMWInstructionContext context) { return VisitRmw(context.rmw()); } + public override InstructionCommand VisitRmw ([NotNull] RedFoxAssemblyParser.RmwContext context) { return new InstructionCommand(InstructionType.RMW, VisitWord(context.arg1w), null); } + + public override InstructionCommand VisitWRBInstruction ([NotNull] RedFoxAssemblyParser.WRBInstructionContext context) { return VisitWrb(context.wrb()); } + public override InstructionCommand VisitWrb ([NotNull] RedFoxAssemblyParser.WrbContext context) { return new InstructionCommand(InstructionType.WRB, VisitByte(context.arg1b), VisitByte(context.arg2b)); } + + public override InstructionCommand VisitWRWInstruction ([NotNull] RedFoxAssemblyParser.WRWInstructionContext context) { return VisitWrw(context.wrw()); } + public override InstructionCommand VisitWrw ([NotNull] RedFoxAssemblyParser.WrwContext context) { return new InstructionCommand(InstructionType.WRW, VisitByte(context.arg1b), null); } + + public override InstructionCommand VisitWMBInstruction ([NotNull] RedFoxAssemblyParser.WMBInstructionContext context) { return VisitWmb(context.wmb()); } + public override InstructionCommand VisitWmb ([NotNull] RedFoxAssemblyParser.WmbContext context) { return new InstructionCommand(InstructionType.WMB, VisitWord(context.arg1w), null); } + + public override InstructionCommand VisitWMWInstruction ([NotNull] RedFoxAssemblyParser.WMWInstructionContext context) { return VisitWmw(context.wmw()); } + public override InstructionCommand VisitWmw ([NotNull] RedFoxAssemblyParser.WmwContext context) { return new InstructionCommand(InstructionType.WMW, VisitWord(context.arg1w), null); } + + public override InstructionCommand VisitRVBInstruction ([NotNull] RedFoxAssemblyParser.RVBInstructionContext context) { return VisitRvb(context.rvb()); } + public override InstructionCommand VisitRvb ([NotNull] RedFoxAssemblyParser.RvbContext context) { return new InstructionCommand(InstructionType.RVB, VisitByte(context.arg1b), null); } + + public override InstructionCommand VisitRVWInstruction ([NotNull] RedFoxAssemblyParser.RVWInstructionContext context) { return VisitRvw(context.rvw()); } + public override InstructionCommand VisitRvw ([NotNull] RedFoxAssemblyParser.RvwContext context) { return new InstructionCommand(InstructionType.RVW, VisitWord(context.arg1w), null); } + + public override InstructionCommand VisitSINInstruction ([NotNull] RedFoxAssemblyParser.SINInstructionContext context) { return VisitSin(context.sin()); } + public override InstructionCommand VisitSin ([NotNull] RedFoxAssemblyParser.SinContext context) { return new InstructionCommand(InstructionType.SIN, VisitWord(context.arg1w), VisitByte(context.arg2b)); } + + public override InstructionCommand VisitINTInstruction ([NotNull] RedFoxAssemblyParser.INTInstructionContext context) { return VisitInt(context.@int()); } + public override InstructionCommand VisitInt ([NotNull] RedFoxAssemblyParser.IntContext context) { return new InstructionCommand(InstructionType.INT, VisitByte(context.arg1b), null); } + + public override InstructionCommand VisitSFGInstruction ([NotNull] RedFoxAssemblyParser.SFGInstructionContext context) { return VisitSfg(context.sfg()); } + public override InstructionCommand VisitSfg ([NotNull] RedFoxAssemblyParser.SfgContext context) { return new InstructionCommand(InstructionType.SFG, VisitByte(context.arg1b), VisitByte(context.arg2b)); } + + public override InstructionCommand VisitANDInstruction ([NotNull] RedFoxAssemblyParser.ANDInstructionContext context) { return VisitAnd(context.and()); } + public override InstructionCommand VisitAnd ([NotNull] RedFoxAssemblyParser.AndContext context) { return new InstructionCommand(InstructionType.AND, null, null); } + + public override InstructionCommand VisitLORInstruction ([NotNull] RedFoxAssemblyParser.LORInstructionContext context) { return VisitLor(context.lor()); } + public override InstructionCommand VisitLor ([NotNull] RedFoxAssemblyParser.LorContext context) { return new InstructionCommand(InstructionType.LOR, null, null); } + + public override InstructionCommand VisitXORInstruction ([NotNull] RedFoxAssemblyParser.XORInstructionContext context) { return VisitXor(context.xor()); } + public override InstructionCommand VisitXor ([NotNull] RedFoxAssemblyParser.XorContext context) { return new InstructionCommand(InstructionType.XOR, null, null); } + } +} diff --git a/RedFoxAssembly/Antlr/Input/RedFoxAssembly.g4 b/RedFoxAssembly/Antlr/generation/Input/RedFoxAssembly.g4 similarity index 100% rename from RedFoxAssembly/Antlr/Input/RedFoxAssembly.g4 rename to RedFoxAssembly/Antlr/generation/Input/RedFoxAssembly.g4 diff --git a/RedFoxAssembly/Antlr/Output/RedFoxAssembly.interp b/RedFoxAssembly/Antlr/generation/Output/RedFoxAssembly.interp similarity index 100% rename from RedFoxAssembly/Antlr/Output/RedFoxAssembly.interp rename to RedFoxAssembly/Antlr/generation/Output/RedFoxAssembly.interp diff --git a/RedFoxAssembly/Antlr/Output/RedFoxAssembly.tokens b/RedFoxAssembly/Antlr/generation/Output/RedFoxAssembly.tokens similarity index 100% rename from RedFoxAssembly/Antlr/Output/RedFoxAssembly.tokens rename to RedFoxAssembly/Antlr/generation/Output/RedFoxAssembly.tokens diff --git a/RedFoxAssembly/Antlr/Output/RedFoxAssemblyBaseListener.cs b/RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyBaseListener.cs similarity index 100% rename from RedFoxAssembly/Antlr/Output/RedFoxAssemblyBaseListener.cs rename to RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyBaseListener.cs diff --git a/RedFoxAssembly/Antlr/Output/RedFoxAssemblyBaseVisitor.cs b/RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyBaseVisitor.cs similarity index 100% rename from RedFoxAssembly/Antlr/Output/RedFoxAssemblyBaseVisitor.cs rename to RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyBaseVisitor.cs diff --git a/RedFoxAssembly/Antlr/Output/RedFoxAssemblyLexer.cs b/RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyLexer.cs similarity index 100% rename from RedFoxAssembly/Antlr/Output/RedFoxAssemblyLexer.cs rename to RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyLexer.cs diff --git a/RedFoxAssembly/Antlr/Output/RedFoxAssemblyLexer.interp b/RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyLexer.interp similarity index 100% rename from RedFoxAssembly/Antlr/Output/RedFoxAssemblyLexer.interp rename to RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyLexer.interp diff --git a/RedFoxAssembly/Antlr/Output/RedFoxAssemblyLexer.tokens b/RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyLexer.tokens similarity index 100% rename from RedFoxAssembly/Antlr/Output/RedFoxAssemblyLexer.tokens rename to RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyLexer.tokens diff --git a/RedFoxAssembly/Antlr/Output/RedFoxAssemblyListener.cs b/RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyListener.cs similarity index 100% rename from RedFoxAssembly/Antlr/Output/RedFoxAssemblyListener.cs rename to RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyListener.cs diff --git a/RedFoxAssembly/Antlr/Output/RedFoxAssemblyParser.cs b/RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyParser.cs similarity index 100% rename from RedFoxAssembly/Antlr/Output/RedFoxAssemblyParser.cs rename to RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyParser.cs diff --git a/RedFoxAssembly/Antlr/Output/RedFoxAssemblyVisitor.cs b/RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyVisitor.cs similarity index 100% rename from RedFoxAssembly/Antlr/Output/RedFoxAssemblyVisitor.cs rename to RedFoxAssembly/Antlr/generation/Output/RedFoxAssemblyVisitor.cs diff --git a/RedFoxAssembly/Antlr/antlr-4.11.1-complete.jar b/RedFoxAssembly/Antlr/generation/antlr-4.11.1-complete.jar similarity index 100% rename from RedFoxAssembly/Antlr/antlr-4.11.1-complete.jar rename to RedFoxAssembly/Antlr/generation/antlr-4.11.1-complete.jar diff --git a/RedFoxAssembly/Antlr/build.bat b/RedFoxAssembly/Antlr/generation/build.bat similarity index 100% rename from RedFoxAssembly/Antlr/build.bat rename to RedFoxAssembly/Antlr/generation/build.bat diff --git a/RedFoxAssembly/CSharp/Core/ParsingException.cs b/RedFoxAssembly/CSharp/Core/ParsingException.cs deleted file mode 100644 index 958c9db..0000000 --- a/RedFoxAssembly/CSharp/Core/ParsingException.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace RedFoxAssembly.CSharp.Core -{ - internal class ParsingException : Exception - { - public ParsingException(string error) : base(error) { } - public ParsingException(string error, Exception cause) : base(error, cause) { } - } -} diff --git a/RedFoxAssembly/CSharp/Core/RFASMProgramVisitor.cs b/RedFoxAssembly/CSharp/Core/RFASMProgramVisitor.cs deleted file mode 100644 index 1798094..0000000 --- a/RedFoxAssembly/CSharp/Core/RFASMProgramVisitor.cs +++ /dev/null @@ -1,320 +0,0 @@ -using Antlr4.Runtime; -using Antlr4.Runtime.Misc; -using NLog.Targets; -using RedFoxAssembly.AntlrBuild; -using RedFoxAssembly.CSharp.Statements; -using System.Text; - -namespace RedFoxAssembly.CSharp.Core -{ - internal class RFASMProgramVisitor : RedFoxAssemblyBaseVisitor - { - public override RFASMProgram VisitProgram([NotNull] RedFoxAssemblyParser.ProgramContext context) - { - RFASMProgram program = new RFASMProgram(null, new List(), new List()); - - foreach (var c in context._configurations) - { - program.AddConfiguration(ParseConfiguration(c)); - } - - foreach (var s in context._commands) - { - program.AddCommand(ParseCommand(s)); - } - - return program; - } - - public IConfiguration ParseConfiguration([NotNull] RedFoxAssemblyParser.ConfigurationContext context) - { - if (context == null) throw new ParsingException("ConfigurationContext cannot be null"); - if (context is RedFoxAssemblyParser.WidthConfigurationContext) return VisitWidthConfiguration((RedFoxAssemblyParser.WidthConfigurationContext)context); - if (context is RedFoxAssemblyParser.ValueConfigurationContext) return VisitValueConfiguration((RedFoxAssemblyParser.ValueConfigurationContext)context); - throw new ParsingException("Cannot parse ConfigurationContext of type " + context.GetText()); - } - - public override WidthConfiguration VisitWidthConfiguration([NotNull] RedFoxAssemblyParser.WidthConfigurationContext context) { return VisitWidth(context.width()); } - public override WidthConfiguration VisitWidth([NotNull] RedFoxAssemblyParser.WidthContext context) { return new WidthConfiguration(int.Parse(context.val.Text)); } - - public override ValueConfiguration VisitValueConfiguration([NotNull] RedFoxAssemblyParser.ValueConfigurationContext context) { return VisitValue(context.value()); } - public override ValueConfiguration VisitValue([NotNull] RedFoxAssemblyParser.ValueContext context) - { - string id = context.id.Text; - - try - { - if (context.byteValue != null) - { - RByte b = VisitByte(context.byteValue); - return new ValueConfiguration(context.id.Text, b); - } - if (context.wordValue != null) - { - Word w = VisitWord(context.wordValue); - return new ValueConfiguration(context.id.Text, VisitWord(context.wordValue)); - } - } - catch (Exception e) - { - throw new ParsingException($"Error parsing byte value '{context.byteValue?.GetText()}' or word value '{context.wordValue?.GetText()}' for {id}", e); - } - - throw new ParsingException($"Value {id} must be assigned either a word or byte value."); - } - - public override Word VisitWord([NotNull] RedFoxAssemblyParser.WordContext context) - { - if (string.IsNullOrWhiteSpace(context.GetText())) - throw new ParsingException("Word cannot be null or whitespace"); - - // Process as raw hex - string? isHex = context.isHex?.Text; - if (!String.IsNullOrWhiteSpace(isHex)) - { - if (context._hexData != null) - { - List data = new List(); - foreach (var b in context._hexData) - { - string d = b.GetText(); - if (String.IsNullOrWhiteSpace(d)) throw new ParsingException("Cannot parse null or whitespace byte data"); - byte[] bs = Convert.FromHexString(d); - data.AddRange(bs); - } - if (data.Count < 1) throw new ParsingException("Word " + context.GetText() + " must contain at least 1 hex byte"); - return new Word(false, data.ToArray()); - } - } - - // Process as register reference - string? registerTarget = context.registerTarget?.Text; - if (!String.IsNullOrWhiteSpace(registerTarget)) - { - if (registerTarget.Length != 2) throw new ParsingException("Register prefix '" + registerTarget + "' is not of length 2"); - IData.RegisterTarget target = IData.ParseRegisterTarget(registerTarget[0]); - - string registerData = VisitBytedata(context.registerData); - byte[] rd = Convert.FromHexString(registerData); - if (rd.Length != 1) throw new ParsingException("Cannot parse register data of > 1 bytes"); - rd[0] = (byte)(rd[0] + IData.GetRegisterOffset(target)); - - return new Word(true, rd); - } - - // Process as value/identifer - string? valText = context.val?.Text; - if (!String.IsNullOrWhiteSpace(valText)) - { - return new Word(false, valText); - } - - throw new ParsingException("Failed to visit word with no bytedata or value-mapping"); - } - - public override RByte VisitByte([NotNull] RedFoxAssemblyParser.ByteContext context) - { - if (string.IsNullOrWhiteSpace(context.GetText())) throw new ParsingException("Word cannot be null or whitespace"); - - // Process as raw hex - if (context.isHex != null && !String.IsNullOrWhiteSpace(context.isHex.Text)) - { - string d = context.hexData.GetText(); - if (String.IsNullOrWhiteSpace(d)) throw new ParsingException("Cannot parse null or whitespace byte data"); - byte[] bs = Convert.FromHexString(d); - return new RByte(false, bs[0]); - } - - // Process as register reference - string? registerTarget = context.registerTarget?.Text; - if (!String.IsNullOrWhiteSpace(registerTarget)) - { - if (registerTarget.Length != 2) throw new ParsingException("Register prefix '" + registerTarget + "' is not of length 2"); - IData.RegisterTarget target = IData.ParseRegisterTarget(registerTarget[0]); - - string registerData = VisitBytedata(context.registerData); - byte[] rd = Convert.FromHexString(registerData); - if (rd.Length != 1) throw new ParsingException("Cannot parse register data of > 1 bytes"); - byte r = rd[0]; - r = (byte)(r + IData.GetRegisterOffset(target)); - - return new RByte(true, r); - } - - // Process as value/identifer - string? valText = context.val?.Text; - if (!String.IsNullOrWhiteSpace(valText)) - { - return new RByte(false, context.val!.Text); - } - - throw new ParsingException("Failed to visit byte with no bytedata or value-mapping"); - } - - public override string VisitBytedata([NotNull] RedFoxAssemblyParser.BytedataContext context) - { - return context.GetText(); - } - - public ICommand ParseCommand([NotNull] RedFoxAssemblyParser.CommandContext context) - { - if (context == null) throw new ParsingException("RedFoxAssemblyParser.CommandContext cannot be null"); - if (context is RedFoxAssemblyParser.LabelCommandContext) return VisitLabelCommand((RedFoxAssemblyParser.LabelCommandContext)context); - if (context is RedFoxAssemblyParser.InstructionCommandContext) return VisitInstructionCommand((RedFoxAssemblyParser.InstructionCommandContext)context); - if (context is RedFoxAssemblyParser.RepeatCommandContext) return VisitRepeatCommand((RedFoxAssemblyParser.RepeatCommandContext) context); - throw new ParsingException("Cannot parse RedFoxAssemblyParser.CommandContext of type " + context.GetType()); - } - - public override LabelCommand VisitLabelCommand([NotNull] RedFoxAssemblyParser.LabelCommandContext context) { return VisitLabel(context.label()); } - public override LabelCommand VisitLabel([NotNull] RedFoxAssemblyParser.LabelContext context) { return new LabelCommand(context.id.Text); } - - public override RepeatCommand VisitRepeatCommand ([NotNull] RedFoxAssemblyParser.RepeatCommandContext context) { return VisitRepeat(context.repeat()); } - public override RepeatCommand VisitRepeat ([NotNull] RedFoxAssemblyParser.RepeatContext context) - { - StringBuilder builder = new StringBuilder(); - foreach(IToken t in context._times) builder.Append(t.Text); - int times = Int32.Parse(builder.ToString()); - - byte[] bytes = new byte[context._bytes.Count]; - for(int i = 0; i < bytes.Length; i++) - bytes[i] = (byte) VisitByte(context._bytes[i]).Data; - - return new RepeatCommand(times, bytes); - } - - public override InstructionCommand VisitInstructionCommand([NotNull] RedFoxAssemblyParser.InstructionCommandContext context) { return ParseInstruction(context.instruction()); } - public InstructionCommand ParseInstruction(RedFoxAssemblyParser.InstructionContext context) - { - if (context == null) throw new ParsingException("Cannot parse null InstructionContext"); - if (context is RedFoxAssemblyParser.HLTInstructionContext) return VisitHLTInstruction((RedFoxAssemblyParser.HLTInstructionContext)context); - if (context is RedFoxAssemblyParser.NOPInstructionContext) return VisitNOPInstruction((RedFoxAssemblyParser.NOPInstructionContext)context); - if (context is RedFoxAssemblyParser.ADDInstructionContext) return VisitADDInstruction((RedFoxAssemblyParser.ADDInstructionContext)context); - if (context is RedFoxAssemblyParser.SUBInstructionContext) return VisitSUBInstruction((RedFoxAssemblyParser.SUBInstructionContext)context); - if (context is RedFoxAssemblyParser.LSLInstructionContext) return VisitLSLInstruction((RedFoxAssemblyParser.LSLInstructionContext)context); - if (context is RedFoxAssemblyParser.LSRInstructionContext) return VisitLSRInstruction((RedFoxAssemblyParser.LSRInstructionContext)context); - if (context is RedFoxAssemblyParser.NEGInstructionContext) return VisitNEGInstruction((RedFoxAssemblyParser.NEGInstructionContext)context); - if (context is RedFoxAssemblyParser.NOTInstructionContext) return VisitNOTInstruction((RedFoxAssemblyParser.NOTInstructionContext)context); - if (context is RedFoxAssemblyParser.CMPInstructionContext) return VisitCMPInstruction((RedFoxAssemblyParser.CMPInstructionContext)context); - if (context is RedFoxAssemblyParser.JMPInstructionContext) return VisitJMPInstruction((RedFoxAssemblyParser.JMPInstructionContext)context); - if (context is RedFoxAssemblyParser.BFGInstructionContext) return VisitBFGInstruction((RedFoxAssemblyParser.BFGInstructionContext)context); - //if (context is RedFoxAssemblyParser.HLTInstructionContext) return VisitHLTInstruction((RedFoxAssemblyParser.HLTInstructionContext)context); - //if (context is RedFoxAssemblyParser.HLTInstructionContext) return VisitHLTInstruction((RedFoxAssemblyParser.HLTInstructionContext)context); - //if (context is RedFoxAssemblyParser.HLTInstructionContext) return VisitHLTInstruction((RedFoxAssemblyParser.HLTInstructionContext)context); - if (context is RedFoxAssemblyParser.BSRInstructionContext) return VisitBSRInstruction((RedFoxAssemblyParser.BSRInstructionContext)context); - if (context is RedFoxAssemblyParser.RTNInstructionContext) return VisitRTNInstruction((RedFoxAssemblyParser.RTNInstructionContext)context); - if (context is RedFoxAssemblyParser.RRBInstructionContext) return VisitRRBInstruction((RedFoxAssemblyParser.RRBInstructionContext)context); - if (context is RedFoxAssemblyParser.RRWInstructionContext) return VisitRRWInstruction((RedFoxAssemblyParser.RRWInstructionContext)context); - if (context is RedFoxAssemblyParser.RMBInstructionContext) return VisitRMBInstruction((RedFoxAssemblyParser.RMBInstructionContext)context); - if (context is RedFoxAssemblyParser.RMWInstructionContext) return VisitRMWInstruction((RedFoxAssemblyParser.RMWInstructionContext)context); - if (context is RedFoxAssemblyParser.WRBInstructionContext) return VisitWRBInstruction((RedFoxAssemblyParser.WRBInstructionContext)context); - if (context is RedFoxAssemblyParser.WRWInstructionContext) return VisitWRWInstruction((RedFoxAssemblyParser.WRWInstructionContext)context); - if (context is RedFoxAssemblyParser.WMBInstructionContext) return VisitWMBInstruction((RedFoxAssemblyParser.WMBInstructionContext)context); - if (context is RedFoxAssemblyParser.WMWInstructionContext) return VisitWMWInstruction((RedFoxAssemblyParser.WMWInstructionContext)context); - if (context is RedFoxAssemblyParser.RVBInstructionContext) return VisitRVBInstruction((RedFoxAssemblyParser.RVBInstructionContext)context); - if (context is RedFoxAssemblyParser.RVWInstructionContext) return VisitRVWInstruction((RedFoxAssemblyParser.RVWInstructionContext)context); - if (context is RedFoxAssemblyParser.SINInstructionContext) return VisitSINInstruction((RedFoxAssemblyParser.SINInstructionContext)context); - if (context is RedFoxAssemblyParser.INTInstructionContext) return VisitINTInstruction((RedFoxAssemblyParser.INTInstructionContext)context); - if (context is RedFoxAssemblyParser.SFGInstructionContext) return VisitSFGInstruction((RedFoxAssemblyParser.SFGInstructionContext)context); - if (context is RedFoxAssemblyParser.ANDInstructionContext) return VisitANDInstruction((RedFoxAssemblyParser.ANDInstructionContext)context); - if (context is RedFoxAssemblyParser.LORInstructionContext) return VisitLORInstruction((RedFoxAssemblyParser.LORInstructionContext)context); - if (context is RedFoxAssemblyParser.XORInstructionContext) return VisitXORInstruction((RedFoxAssemblyParser.XORInstructionContext)context); - else throw new ParsingException("Unable to ParseInstruction of type " + context.GetType()); - } - - public override InstructionCommand VisitHLTInstruction([NotNull] RedFoxAssemblyParser.HLTInstructionContext context) { return VisitHlt(context.hlt()); } - public override InstructionCommand VisitHlt([NotNull] RedFoxAssemblyParser.HltContext context) { return new InstructionCommand(InstructionType.HLT, null, null); } - - public override InstructionCommand VisitNOPInstruction([NotNull] RedFoxAssemblyParser.NOPInstructionContext context) { return VisitNop(context.nop()); } - public override InstructionCommand VisitNop([NotNull] RedFoxAssemblyParser.NopContext context) { return new InstructionCommand(InstructionType.NOP, null, null); } - - public override InstructionCommand VisitADDInstruction([NotNull] RedFoxAssemblyParser.ADDInstructionContext context) { return VisitAdd(context.add()); } - public override InstructionCommand VisitAdd([NotNull] RedFoxAssemblyParser.AddContext context) { return new InstructionCommand(InstructionType.ADD, null, null); } - - public override InstructionCommand VisitSUBInstruction([NotNull] RedFoxAssemblyParser.SUBInstructionContext context) { return VisitSub(context.sub()); } - public override InstructionCommand VisitSub([NotNull] RedFoxAssemblyParser.SubContext context) { return new InstructionCommand(InstructionType.SUB, null, null); } - - public override InstructionCommand VisitLSLInstruction([NotNull] RedFoxAssemblyParser.LSLInstructionContext context) { return VisitLsl(context.lsl()); } - public override InstructionCommand VisitLsl([NotNull] RedFoxAssemblyParser.LslContext context) { return new InstructionCommand(InstructionType.LSL, null, null); } - - public override InstructionCommand VisitLSRInstruction([NotNull] RedFoxAssemblyParser.LSRInstructionContext context) { return VisitLsr(context.lsr()); } - public override InstructionCommand VisitLsr([NotNull] RedFoxAssemblyParser.LsrContext context) { return new InstructionCommand(InstructionType.LSR, null, null); } - - public override InstructionCommand VisitNEGInstruction([NotNull] RedFoxAssemblyParser.NEGInstructionContext context) { return VisitNeg(context.neg()); } - public override InstructionCommand VisitNeg([NotNull] RedFoxAssemblyParser.NegContext context) { return new InstructionCommand(InstructionType.NEG, null, null); } - - public override InstructionCommand VisitNOTInstruction([NotNull] RedFoxAssemblyParser.NOTInstructionContext context) { return VisitNot(context.not()); } - public override InstructionCommand VisitNot([NotNull] RedFoxAssemblyParser.NotContext context) { return new InstructionCommand(InstructionType.NOT, null, null); } - - public override InstructionCommand VisitCMPInstruction([NotNull] RedFoxAssemblyParser.CMPInstructionContext context) { return VisitCmp(context.cmp()); } - public override InstructionCommand VisitCmp([NotNull] RedFoxAssemblyParser.CmpContext context) { return new InstructionCommand(InstructionType.CMP, null, null); } - - public override InstructionCommand VisitJMPInstruction([NotNull] RedFoxAssemblyParser.JMPInstructionContext context) { return VisitJmp(context.jmp()); } - public override InstructionCommand VisitJmp([NotNull] RedFoxAssemblyParser.JmpContext context) { return new InstructionCommand(InstructionType.JMP, VisitWord(context.arg1w), null); } - - public override InstructionCommand VisitBFGInstruction([NotNull] RedFoxAssemblyParser.BFGInstructionContext context) { return VisitBfg(context.bfg()); } - public override InstructionCommand VisitBfg([NotNull] RedFoxAssemblyParser.BfgContext context) { return new InstructionCommand(InstructionType.BFG, VisitWord(context.arg1w), VisitByte(context.arg2b)); } - - //public override Instruction VisitBFGInstruction([NotNull] RedFoxAssemblyParser.BFGInstructionContext context) { return VisitBfg(context.bfg()); } - //public override Instruction VisitBfg([NotNull] RedFoxAssemblyParser.BfgContext context) { return new Instruction(InstructionType.BFG, null, null); } - - //public override Instruction VisitBFGInstruction([NotNull] RedFoxAssemblyParser.BFGInstructionContext context) { return VisitBfg(context.bfg()); } - //public override Instruction VisitBfg([NotNull] RedFoxAssemblyParser.BfgContext context) { return new Instruction(InstructionType.BFG, null, null); } - - //public override Instruction VisitBFGInstruction([NotNull] RedFoxAssemblyParser.BFGInstructionContext context) { return VisitBfg(context.bfg()); } - //public override Instruction VisitBfg([NotNull] RedFoxAssemblyParser.BfgContext context) { return new Instruction(InstructionType.BFG, null, null); } - - public override InstructionCommand VisitBSRInstruction([NotNull] RedFoxAssemblyParser.BSRInstructionContext context) { return VisitBsr(context.bsr()); } - public override InstructionCommand VisitBsr([NotNull] RedFoxAssemblyParser.BsrContext context) { return new InstructionCommand(InstructionType.BSR, VisitWord(context.arg1w), null); } - - public override InstructionCommand VisitRTNInstruction([NotNull] RedFoxAssemblyParser.RTNInstructionContext context) { return VisitRtn(context.rtn()); } - public override InstructionCommand VisitRtn([NotNull] RedFoxAssemblyParser.RtnContext context) { return new InstructionCommand(InstructionType.RTN, null, null); } - - public override InstructionCommand VisitRRBInstruction([NotNull] RedFoxAssemblyParser.RRBInstructionContext context) { return VisitRrb(context.rrb()); } - public override InstructionCommand VisitRrb([NotNull] RedFoxAssemblyParser.RrbContext context) { return new InstructionCommand(InstructionType.RRB, VisitByte(context.arg1b), VisitByte(context.arg2b)); } - - public override InstructionCommand VisitRRWInstruction([NotNull] RedFoxAssemblyParser.RRWInstructionContext context) { return VisitRrw(context.rrw()); } - public override InstructionCommand VisitRrw([NotNull] RedFoxAssemblyParser.RrwContext context) { return new InstructionCommand(InstructionType.RRW, VisitByte(context.arg1b), null); } - - public override InstructionCommand VisitRMBInstruction([NotNull] RedFoxAssemblyParser.RMBInstructionContext context) { return VisitRmb(context.rmb()); } - public override InstructionCommand VisitRmb([NotNull] RedFoxAssemblyParser.RmbContext context) { return new InstructionCommand(InstructionType.RMB, VisitWord(context.arg1w), null); } - - public override InstructionCommand VisitRMWInstruction([NotNull] RedFoxAssemblyParser.RMWInstructionContext context) { return VisitRmw(context.rmw()); } - public override InstructionCommand VisitRmw([NotNull] RedFoxAssemblyParser.RmwContext context) { return new InstructionCommand(InstructionType.RMW, VisitWord(context.arg1w), null); } - - public override InstructionCommand VisitWRBInstruction([NotNull] RedFoxAssemblyParser.WRBInstructionContext context) { return VisitWrb(context.wrb()); } - public override InstructionCommand VisitWrb([NotNull] RedFoxAssemblyParser.WrbContext context) { return new InstructionCommand(InstructionType.WRB, VisitByte(context.arg1b), VisitByte(context.arg2b)); } - - public override InstructionCommand VisitWRWInstruction([NotNull] RedFoxAssemblyParser.WRWInstructionContext context) { return VisitWrw(context.wrw()); } - public override InstructionCommand VisitWrw([NotNull] RedFoxAssemblyParser.WrwContext context) { return new InstructionCommand(InstructionType.WRW, VisitByte(context.arg1b), null); } - - public override InstructionCommand VisitWMBInstruction([NotNull] RedFoxAssemblyParser.WMBInstructionContext context) { return VisitWmb(context.wmb()); } - public override InstructionCommand VisitWmb([NotNull] RedFoxAssemblyParser.WmbContext context) { return new InstructionCommand(InstructionType.WMB, VisitWord(context.arg1w), null); } - - public override InstructionCommand VisitWMWInstruction([NotNull] RedFoxAssemblyParser.WMWInstructionContext context) { return VisitWmw(context.wmw()); } - public override InstructionCommand VisitWmw([NotNull] RedFoxAssemblyParser.WmwContext context) { return new InstructionCommand(InstructionType.WMW, VisitWord(context.arg1w), null); } - - public override InstructionCommand VisitRVBInstruction([NotNull] RedFoxAssemblyParser.RVBInstructionContext context) { return VisitRvb(context.rvb()); } - public override InstructionCommand VisitRvb([NotNull] RedFoxAssemblyParser.RvbContext context) { return new InstructionCommand(InstructionType.RVB, VisitByte(context.arg1b), null); } - - public override InstructionCommand VisitRVWInstruction([NotNull] RedFoxAssemblyParser.RVWInstructionContext context) { return VisitRvw(context.rvw()); } - public override InstructionCommand VisitRvw([NotNull] RedFoxAssemblyParser.RvwContext context) { return new InstructionCommand(InstructionType.RVW, VisitWord(context.arg1w), null); } - - public override InstructionCommand VisitSINInstruction([NotNull] RedFoxAssemblyParser.SINInstructionContext context) { return VisitSin(context.sin()); } - public override InstructionCommand VisitSin([NotNull] RedFoxAssemblyParser.SinContext context) { return new InstructionCommand(InstructionType.SIN, VisitWord(context.arg1w), VisitByte(context.arg2b)); } - - public override InstructionCommand VisitINTInstruction([NotNull] RedFoxAssemblyParser.INTInstructionContext context) { return VisitInt(context.@int()); } - public override InstructionCommand VisitInt([NotNull] RedFoxAssemblyParser.IntContext context) { return new InstructionCommand(InstructionType.INT, VisitByte(context.arg1b), null); } - - public override InstructionCommand VisitSFGInstruction([NotNull] RedFoxAssemblyParser.SFGInstructionContext context) { return VisitSfg(context.sfg()); } - public override InstructionCommand VisitSfg([NotNull] RedFoxAssemblyParser.SfgContext context) { return new InstructionCommand(InstructionType.SFG, VisitByte(context.arg1b), VisitByte(context.arg2b)); } - - public override InstructionCommand VisitANDInstruction([NotNull] RedFoxAssemblyParser.ANDInstructionContext context) { return VisitAnd(context.and()); } - public override InstructionCommand VisitAnd([NotNull] RedFoxAssemblyParser.AndContext context) { return new InstructionCommand(InstructionType.AND, null, null); } - - public override InstructionCommand VisitLORInstruction([NotNull] RedFoxAssemblyParser.LORInstructionContext context) { return VisitLor(context.lor()); } - public override InstructionCommand VisitLor([NotNull] RedFoxAssemblyParser.LorContext context) { return new InstructionCommand(InstructionType.LOR, null, null); } - - public override InstructionCommand VisitXORInstruction([NotNull] RedFoxAssemblyParser.XORInstructionContext context) { return VisitXor(context.xor()); } - public override InstructionCommand VisitXor([NotNull] RedFoxAssemblyParser.XorContext context) { return new InstructionCommand(InstructionType.XOR, null, null); } - } -} diff --git a/RedFoxAssembly/CSharp/Core/CompilerUtils.cs b/RedFoxAssembly/Core/CompilerUtils.cs similarity index 93% rename from RedFoxAssembly/CSharp/Core/CompilerUtils.cs rename to RedFoxAssembly/Core/CompilerUtils.cs index 6d677e7..f4f26ac 100644 --- a/RedFoxAssembly/CSharp/Core/CompilerUtils.cs +++ b/RedFoxAssembly/Core/CompilerUtils.cs @@ -1,6 +1,6 @@ using System.Collections; -namespace RedFoxAssembly.CSharp.Core +namespace RedFoxAssembly.Core { /// /// Static utility methods for RF_ASM @@ -69,10 +69,10 @@ public static byte[] FixArrayWidthPreservingBack(int desiredLength, byte[] ba) return ba; } - public static byte[] IntToBytesAtWidth (int width, int value) + public static byte[] IntToBytesAtWidth(int width, int value) { byte[] b = BitConverter.GetBytes(value).Reverse().ToArray(); - byte[] c = CompilerUtils.FixArrayWidthPreservingBack(width, b); + byte[] c = FixArrayWidthPreservingBack(width, b); return c; } diff --git a/RedFoxAssembly/CSharp/Core/ProgramMetadata.cs b/RedFoxAssembly/Core/ProgramMetadata.cs similarity index 79% rename from RedFoxAssembly/CSharp/Core/ProgramMetadata.cs rename to RedFoxAssembly/Core/ProgramMetadata.cs index 3255429..85fc370 100644 --- a/RedFoxAssembly/CSharp/Core/ProgramMetadata.cs +++ b/RedFoxAssembly/Core/ProgramMetadata.cs @@ -1,14 +1,14 @@ -using RedFoxAssembly.CSharp.Statements; +using RedFoxAssembly.Statements; using System.Runtime.InteropServices; using System.Text; using System.Text.Json; using System.Text.Json.Serialization; -namespace RedFoxAssembly.CSharp.Core +namespace RedFoxAssembly.Core { - internal class ProgramMetadata: ICommand + internal class ProgramMetadata : ICommand { - public static readonly string DATE_FORMAT = "dd/MM/yyyy,HH:mm:ss"; + public static readonly string DATE_FORMAT = "dd/MM/yyyy,HH:mm:ss"; public static readonly string WATERMARK = "RFASM Compiler by GenElectrovise"; public static readonly string AUTHORS = "Authors:"; public static readonly string DATE_TIME = "DateTime:"; @@ -19,9 +19,9 @@ internal class ProgramMetadata: ICommand public List Authors { get; set; } - public ProgramMetadata () : this(new List(), new Dictionary(), new Dictionary()) {} + public ProgramMetadata() : this(new List(), new Dictionary(), new Dictionary()) { } - public ProgramMetadata (List authors, Dictionary labels, Dictionary constants) + public ProgramMetadata(List authors, Dictionary labels, Dictionary constants) { Authors = authors; } @@ -31,10 +31,10 @@ public ProgramMetadata (List authors, Dictionary labels, Di public bool AddConstants { get; set; } = true; public bool AddLabels { get; set; } = true; - public override string ToString () + public override string ToString() { return $"{{" + - $"Authors:{{{String.Join(',', Authors)}}}, " + + $"Authors:{{{string.Join(',', Authors)}}}, " + $"Labels:{UNRESOLVED}, " + $"Constants:{UNRESOLVED}, " + $"AddAuthors:{AddAuthors}, " + @@ -44,19 +44,19 @@ public override string ToString () $"}}"; } - public int GetPredictedLength (RFASMCompiler compiler) + public int GetPredictedLength(RFASMCompiler compiler) { return GetBytes(compiler).Length; } - private List GetWatermarkBytes (int wORD) + private List GetWatermarkBytes(int wORD) { return Encoding.ASCII.GetBytes(WATERMARK).ToList(); } - private List GetAuthorBytes (int dataWidth) + private List GetAuthorBytes(int dataWidth) { - List bytes = new List(); + List bytes = new List(); if (AddAuthors) { @@ -64,7 +64,7 @@ private List GetAuthorBytes (int dataWidth) // Word describing how long the authors list is // Authors list - string sAuthors = String.Join(',', Authors); + string sAuthors = string.Join(',', Authors); bytes.AddRange(Encoding.ASCII.GetBytes(sAuthors)); } bytes.InsertRange(0, CompilerUtils.IntToBytesAtWidth(dataWidth, bytes.Count)); @@ -72,7 +72,7 @@ private List GetAuthorBytes (int dataWidth) return bytes; } - private List GetDateTimeBytes (int dataWidth) + private List GetDateTimeBytes(int dataWidth) { List bytes = new List(); @@ -88,7 +88,7 @@ private List GetDateTimeBytes (int dataWidth) return bytes; } - private List GetConstants (RFASMCompiler compiler, int dataWidth) + private List GetConstants(RFASMCompiler compiler, int dataWidth) { List bytes = new List(); @@ -103,7 +103,7 @@ private List GetConstants (RFASMCompiler compiler, int dataWidth) byte[] keyBytes = Encoding.ASCII.GetBytes(pair.Key); byte[] valBytes = pair.Value.GetBytes(compiler); - byte lengthByte = (byte) keyBytes.Length; + byte lengthByte = (byte)keyBytes.Length; if (pair.Value is Word) lengthByte |= 0b10000000; bytes.Add(lengthByte); @@ -116,7 +116,7 @@ private List GetConstants (RFASMCompiler compiler, int dataWidth) return bytes; } - private List GetLabels (RFASMCompiler compiler, int dataWidth) + private List GetLabels(RFASMCompiler compiler, int dataWidth) { List bytes = new List(); @@ -131,7 +131,7 @@ private List GetLabels (RFASMCompiler compiler, int dataWidth) byte[] keyBytes = Encoding.ASCII.GetBytes(pair.Key); byte[] valBytes = pair.Value.GetBytes(compiler); - byte lengthByte = (byte) keyBytes.Length; + byte lengthByte = (byte)keyBytes.Length; bytes.Add(lengthByte); bytes.AddRange(keyBytes); @@ -143,7 +143,7 @@ private List GetLabels (RFASMCompiler compiler, int dataWidth) return bytes; } - private byte GetFlagByte () + private byte GetFlagByte() { byte b = 0b00000000; if (AddAuthors) b |= 0b10000000; @@ -153,7 +153,7 @@ private byte GetFlagByte () return b; } - public byte[] GetBytes (RFASMCompiler compiler) + public byte[] GetBytes(RFASMCompiler compiler) { int WORD = compiler.Options!.DataWidth; diff --git a/RedFoxAssembly/CSharp/Core/RFASMCompiler.cs b/RedFoxAssembly/Core/RFASMCompiler.cs similarity index 91% rename from RedFoxAssembly/CSharp/Core/RFASMCompiler.cs rename to RedFoxAssembly/Core/RFASMCompiler.cs index d133db8..a54d6b9 100644 --- a/RedFoxAssembly/CSharp/Core/RFASMCompiler.cs +++ b/RedFoxAssembly/Core/RFASMCompiler.cs @@ -4,9 +4,9 @@ using CommandLine; using NLog; using RedFoxAssembly.AntlrBuild; -using RedFoxAssembly.CSharp.Statements; +using RedFoxAssembly.Statements; -namespace RedFoxAssembly.CSharp.Core +namespace RedFoxAssembly.Core { /// /// Compiler for converting a list of RF ASM instructions into binary for interpretation. @@ -21,19 +21,19 @@ class RFASMCompiler public RFASMOptions Options { get; set; } - public RFASMCompiler(RFASMOptions options) + public RFASMCompiler (RFASMOptions options) { Options = options; Labels = new Dictionary(); Constants = new Dictionary(); } - public int Compile(RFASMProgram program) + public int Compile (RFASMProgram program) { if (!File.Exists(Options.MetadataPath)) throw new FileNotFoundException("Could not file metadata file: " + Options.MetadataPath); LOGGER.Info("Reading metadata file: " + Options.MetadataPath); string metadataJson = File.ReadAllText(Options.MetadataPath); - if (String.IsNullOrWhiteSpace(metadataJson)) throw new JsonException("Found null-or-whitespace JSON in metadata file"); + if (string.IsNullOrWhiteSpace(metadataJson)) throw new JsonException("Found null-or-whitespace JSON in metadata file"); program.ReloadSerialMetadata(metadataJson); // <==> Compiling @@ -62,7 +62,7 @@ public int Compile(RFASMProgram program) return 0; } - private void PreCompilationPass(RFASMProgram program) + private void PreCompilationPass (RFASMProgram program) { // Resolve configuration (i.e. data widths and values) foreach (var c in program.Configuations) @@ -97,7 +97,7 @@ private void PreCompilationPass(RFASMProgram program) } } - private List CompileTokens(RFASMProgram program) + private List CompileTokens (RFASMProgram program) { List compiledBytes = new List(); @@ -114,7 +114,7 @@ private List CompileTokens(RFASMProgram program) return compiledBytes; } - private void WriteCompilation(string inputPath, byte[] bytes) + private void WriteCompilation (string inputPath, byte[] bytes) { string outputPath = GetOutputFileName(inputPath); FileInfo outputFileInfo = new FileInfo(outputPath); @@ -126,7 +126,7 @@ private void WriteCompilation(string inputPath, byte[] bytes) writer.Close(); } - private string GetInputFilePath() + private string GetInputFilePath () { Console.Write("Enter the name of the file to be compiled (including the file extension): "); string inputPath = Console.ReadLine(); @@ -144,7 +144,7 @@ private string GetInputFilePath() /// /// /// - public string GetOutputFileName(string inputFileName) + public string GetOutputFileName (string inputFileName) { // The input file extension and output file extension string RF_BIN_FileEnding = "rfb"; diff --git a/RedFoxAssembly/CSharp/Core/RFASMOptions.cs b/RedFoxAssembly/Core/RFASMOptions.cs similarity index 71% rename from RedFoxAssembly/CSharp/Core/RFASMOptions.cs rename to RedFoxAssembly/Core/RFASMOptions.cs index 2f2863b..47d011f 100644 --- a/RedFoxAssembly/CSharp/Core/RFASMOptions.cs +++ b/RedFoxAssembly/Core/RFASMOptions.cs @@ -1,6 +1,6 @@ using CommandLine; -namespace RedFoxAssembly.CSharp.Core +namespace RedFoxAssembly.Core { public class RFASMOptions { @@ -14,11 +14,11 @@ public int DataWidth } private string _sourcePath; - [Option(longName: "source", shortName:'s', Required = true, HelpText = "Path to the desired source location or input file.")] - public string SourcePath - { - get { return _sourcePath; } - set { _sourcePath = Path.GetFullPath(value); } + [Option(longName: "source", shortName: 's', Required = true, HelpText = "Path to the desired source location or input file.")] + public string SourcePath + { + get { return _sourcePath; } + set { _sourcePath = Path.GetFullPath(value); } } private string _metadataPath; diff --git a/RedFoxAssembly/CSharp/Core/CompilationException.cs b/RedFoxAssembly/Exceptions/CompilationException.cs similarity index 91% rename from RedFoxAssembly/CSharp/Core/CompilationException.cs rename to RedFoxAssembly/Exceptions/CompilationException.cs index 70f9e93..a3d421e 100644 --- a/RedFoxAssembly/CSharp/Core/CompilationException.cs +++ b/RedFoxAssembly/Exceptions/CompilationException.cs @@ -4,7 +4,7 @@ using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Core +namespace RedFoxAssembly.Exceptions { internal class CompilationException : Exception { diff --git a/RedFoxAssembly/Exceptions/ParsingException.cs b/RedFoxAssembly/Exceptions/ParsingException.cs new file mode 100644 index 0000000..9f0ca2e --- /dev/null +++ b/RedFoxAssembly/Exceptions/ParsingException.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RedFoxAssembly.Exceptions +{ + internal class ParsingException : Exception + { + public ParsingException (string error) : base(error) { } + public ParsingException (string error, Exception cause) : base(error, cause) { } + } +} diff --git a/RedFoxAssembly/CSharp/Core/PreCompilationException.cs b/RedFoxAssembly/Exceptions/PreCompilationException.cs similarity index 63% rename from RedFoxAssembly/CSharp/Core/PreCompilationException.cs rename to RedFoxAssembly/Exceptions/PreCompilationException.cs index 0de7647..f61d4f3 100644 --- a/RedFoxAssembly/CSharp/Core/PreCompilationException.cs +++ b/RedFoxAssembly/Exceptions/PreCompilationException.cs @@ -4,10 +4,10 @@ using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Core +namespace RedFoxAssembly.Exceptions { internal class PreCompilationException : Exception { - public PreCompilationException(string error) : base(error) { } + public PreCompilationException (string error) : base(error) { } } } diff --git a/RedFoxAssembly/CSharp/Core/RedFoxAssembly.cs b/RedFoxAssembly/RedFoxAssembly.cs similarity index 96% rename from RedFoxAssembly/CSharp/Core/RedFoxAssembly.cs rename to RedFoxAssembly/RedFoxAssembly.cs index 8d116a3..6bb13fc 100644 --- a/RedFoxAssembly/CSharp/Core/RedFoxAssembly.cs +++ b/RedFoxAssembly/RedFoxAssembly.cs @@ -2,11 +2,12 @@ using NLog; using Antlr4.Runtime; using System.IO.Abstractions; -using RedFoxAssembly.CSharp.Core; using RedFoxAssembly.AntlrBuild; -using RedFoxAssembly.CSharp.Statements; +using RedFoxAssembly.Statements; +using RedFoxAssembly.Core; +using RedFoxAssembly.Antlr; -namespace RedFoxAssembly.CSharp.Core +namespace RedFoxAssembly { internal class RedFoxAssembly { @@ -17,7 +18,7 @@ internal class RedFoxAssembly public static readonly bool USE_AUTOWIRED_ARGUMENTS = true; public static readonly string TEST_PROGRAMS_PATH = "../../../Documentation/TestPrograms/"; // Escape bin, Debug, and net6.0 - static Task Main(string[] args) + static Task Main (string[] args) { if (USE_AUTOWIRED_ARGUMENTS) { @@ -25,7 +26,7 @@ static Task Main(string[] args) args = new string[] { "-s", TEST_PROGRAMS_PATH + "TestAll.txt", "-w", "2", - "-m", TEST_PROGRAMS_PATH + "TestAllMetadata.json" + "-m", TEST_PROGRAMS_PATH + "TestAllMetadata.json" }; } @@ -87,7 +88,7 @@ private static int StartFromOptions (RFASMOptions options) if (program == null) throw new NullReferenceException("Why is the program null :("); LOGGER!.Info("We have a program!"); - + LOGGER!.Info("Creating compiler using input options (they haven't changed)"); RFASMCompiler compiler = new RFASMCompiler(options); @@ -95,7 +96,7 @@ private static int StartFromOptions (RFASMOptions options) return compiler.Compile(program); } - private static void ShowSplash() + private static void ShowSplash () { Console.WriteLine(""); Console.WriteLine("RFASM Compiler, by GenElectrovise, for GamesMaster3000X"); @@ -116,7 +117,7 @@ private static void ShowSplash() Console.WriteLine(""); } - private static void ShowCredits() + private static void ShowCredits () { Console.WriteLine(""); Console.WriteLine(" -> C R E D I T S <- "); @@ -129,7 +130,7 @@ private static void ShowCredits() Console.WriteLine(""); } - private static void ConfigureNLog() + private static void ConfigureNLog () { Console.WriteLine("Configuring NLog..."); NLog.Config.LoggingConfiguration config = new NLog.Config.LoggingConfiguration(); diff --git a/RedFoxAssembly/RedFoxAssembly.csproj b/RedFoxAssembly/RedFoxAssembly.csproj index c9da866..1fc2895 100644 --- a/RedFoxAssembly/RedFoxAssembly.csproj +++ b/RedFoxAssembly/RedFoxAssembly.csproj @@ -1,18 +1,18 @@  - - Exe - net6.0 - enable - enable - RedFoxAssembly.CSharp.Core.RedFoxAssembly - + + Exe + net7.0 + enable + enable + RedFoxAssembly.RedFoxAssembly + - - - - - - + + + + + + diff --git a/RedFoxAssembly/CSharp/Statements/ConfigurationType.cs b/RedFoxAssembly/Statements/ConfigurationType.cs similarity index 91% rename from RedFoxAssembly/CSharp/Statements/ConfigurationType.cs rename to RedFoxAssembly/Statements/ConfigurationType.cs index 813ac5f..c529c9c 100644 --- a/RedFoxAssembly/CSharp/Statements/ConfigurationType.cs +++ b/RedFoxAssembly/Statements/ConfigurationType.cs @@ -8,7 +8,7 @@ using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { /// /// diff --git a/RedFoxAssembly/CSharp/Statements/ICommand.cs b/RedFoxAssembly/Statements/ICommand.cs similarity index 77% rename from RedFoxAssembly/CSharp/Statements/ICommand.cs rename to RedFoxAssembly/Statements/ICommand.cs index 328858a..9348756 100644 --- a/RedFoxAssembly/CSharp/Statements/ICommand.cs +++ b/RedFoxAssembly/Statements/ICommand.cs @@ -1,11 +1,11 @@ -using RedFoxAssembly.CSharp.Core; +using RedFoxAssembly.Core; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { internal interface ICommand { diff --git a/RedFoxAssembly/CSharp/Statements/IConfiguration.cs b/RedFoxAssembly/Statements/IConfiguration.cs similarity index 73% rename from RedFoxAssembly/CSharp/Statements/IConfiguration.cs rename to RedFoxAssembly/Statements/IConfiguration.cs index 66c0aa7..e59836b 100644 --- a/RedFoxAssembly/CSharp/Statements/IConfiguration.cs +++ b/RedFoxAssembly/Statements/IConfiguration.cs @@ -1,11 +1,11 @@ -using RedFoxAssembly.CSharp.Core; +using RedFoxAssembly.Core; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { internal interface IConfiguration { diff --git a/RedFoxAssembly/CSharp/Statements/IData.cs b/RedFoxAssembly/Statements/IData.cs similarity index 89% rename from RedFoxAssembly/CSharp/Statements/IData.cs rename to RedFoxAssembly/Statements/IData.cs index 7af761d..4ecd246 100644 --- a/RedFoxAssembly/CSharp/Statements/IData.cs +++ b/RedFoxAssembly/Statements/IData.cs @@ -1,13 +1,14 @@ -using RedFoxAssembly.CSharp.Core; +using RedFoxAssembly.Core; +using RedFoxAssembly.Exceptions; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; -using static RedFoxAssembly.CSharp.Statements.IData; +using static RedFoxAssembly.Statements.IData; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { internal interface IData { @@ -21,7 +22,7 @@ internal interface IData public static RegisterTarget ParseRegisterTarget (char c) { - char u = Char.ToUpper(c); + char u = char.ToUpper(c); switch (u) { case 'R': return RegisterTarget.REGISTER; diff --git a/RedFoxAssembly/CSharp/Statements/InstructionCommand.cs b/RedFoxAssembly/Statements/InstructionCommand.cs similarity index 90% rename from RedFoxAssembly/CSharp/Statements/InstructionCommand.cs rename to RedFoxAssembly/Statements/InstructionCommand.cs index fefd44d..9172e17 100644 --- a/RedFoxAssembly/CSharp/Statements/InstructionCommand.cs +++ b/RedFoxAssembly/Statements/InstructionCommand.cs @@ -1,11 +1,11 @@ -using RedFoxAssembly.CSharp.Core; +using RedFoxAssembly.Core; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { internal class InstructionCommand : ICommand { @@ -50,8 +50,8 @@ public byte[] GetBytes(RFASMCompiler compiler) } else { - arg1value = (_arg1 != null) ? (_arg1.GetBytes(compiler)) : (new byte[0]); - arg2value = (_arg2 != null) ? (_arg2.GetBytes(compiler)) : (new byte[0]); + arg1value = _arg1 != null ? _arg1.GetBytes(compiler) : (new byte[0]); + arg2value = _arg2 != null ? _arg2.GetBytes(compiler) : (new byte[0]); } // Set addressing modes diff --git a/RedFoxAssembly/CSharp/Statements/InstructionType.cs b/RedFoxAssembly/Statements/InstructionType.cs similarity index 95% rename from RedFoxAssembly/CSharp/Statements/InstructionType.cs rename to RedFoxAssembly/Statements/InstructionType.cs index fa4c5e0..7c2cb96 100644 --- a/RedFoxAssembly/CSharp/Statements/InstructionType.cs +++ b/RedFoxAssembly/Statements/InstructionType.cs @@ -8,7 +8,7 @@ using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { /// /// diff --git a/RedFoxAssembly/CSharp/Statements/LabelCommand.cs b/RedFoxAssembly/Statements/LabelCommand.cs similarity index 80% rename from RedFoxAssembly/CSharp/Statements/LabelCommand.cs rename to RedFoxAssembly/Statements/LabelCommand.cs index afb0c29..ba95143 100644 --- a/RedFoxAssembly/CSharp/Statements/LabelCommand.cs +++ b/RedFoxAssembly/Statements/LabelCommand.cs @@ -1,5 +1,6 @@ using NLog; -using RedFoxAssembly.CSharp.Core; +using RedFoxAssembly.Core; +using RedFoxAssembly.Exceptions; using System; using System.Collections; using System.Collections.Generic; @@ -7,7 +8,7 @@ using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { internal class LabelCommand : ICommand { @@ -16,12 +17,12 @@ internal class LabelCommand : ICommand public string ID { get; protected set; } public int Position { get; set; } - public LabelCommand(string id) + public LabelCommand (string id) { ID = id; } - public byte[] GetBytes(RFASMCompiler compiler) + public byte[] GetBytes (RFASMCompiler compiler) { int targetWidth = compiler.Options!.DataWidth; byte[] positionBytes = BitConverter.GetBytes(Position).Reverse().ToArray(); @@ -33,12 +34,12 @@ public byte[] GetBytes(RFASMCompiler compiler) return result; } - public int GetPredictedLength(RFASMCompiler compiler) + public int GetPredictedLength (RFASMCompiler compiler) { return 0; } - internal void DeclareLabel(RFASMCompiler compiler, int position) + internal void DeclareLabel (RFASMCompiler compiler, int position) { if (compiler.Labels.ContainsKey(ID)) throw new PreCompilationException($"Illegal duplicate declaration of label {ID}"); Position = position; diff --git a/RedFoxAssembly/CSharp/Statements/RByte.cs b/RedFoxAssembly/Statements/RByte.cs similarity index 72% rename from RedFoxAssembly/CSharp/Statements/RByte.cs rename to RedFoxAssembly/Statements/RByte.cs index c10b062..e141bcb 100644 --- a/RedFoxAssembly/CSharp/Statements/RByte.cs +++ b/RedFoxAssembly/Statements/RByte.cs @@ -1,11 +1,12 @@ -using RedFoxAssembly.CSharp.Core; +using RedFoxAssembly.Core; +using RedFoxAssembly.Exceptions; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { internal class RByte : IData { @@ -13,19 +14,19 @@ internal class RByte : IData public byte? Data { get; protected set; } public string? Identifier { get; protected set; } - public RByte(bool isTargetingRegister, byte data) + public RByte (bool isTargetingRegister, byte data) { TargetingRegister = isTargetingRegister; Data = data; } - public RByte(bool isTargetingRegister, string identifier) + public RByte (bool isTargetingRegister, string identifier) { TargetingRegister = isTargetingRegister; Identifier = identifier; } - public byte[] GetBytes(RFASMCompiler compiler) + public byte[] GetBytes (RFASMCompiler compiler) { // Return the value of the named constant if (Identifier != null) @@ -34,7 +35,7 @@ public byte[] GetBytes(RFASMCompiler compiler) { byte[] v = val.GetBytes(compiler); if (v.Length != 1) - throw new CompilationException($"Cannot assign value [{String.Join(',', v)}] of constant {Identifier} to a byte (incorrect width {v.Length}."); + throw new CompilationException($"Cannot assign value [{string.Join(',', v)}] of constant {Identifier} to a byte (incorrect width {v.Length}."); return v; } else @@ -46,25 +47,25 @@ public byte[] GetBytes(RFASMCompiler compiler) // Return _data if (Data != null) { - return new byte[] { (byte)Data }; + return new byte[] { (byte) Data }; } throw new CompilationException("Byte's data is null."); } - public override string ToString() + public override string ToString () { - if (!String.IsNullOrWhiteSpace(Identifier)) return Identifier; - else if (Data != null) return String.Join("", Data!); + if (!string.IsNullOrWhiteSpace(Identifier)) return Identifier; + else if (Data != null) return string.Join("", Data!); else return "Word(Empty)"; } - public bool IsTargetingRegister() + public bool IsTargetingRegister () { return TargetingRegister; } - public int GetWidth(RFASMCompiler compiler) + public int GetWidth (RFASMCompiler compiler) { return 1; } diff --git a/RedFoxAssembly/CSharp/Statements/RFASMProgram.cs b/RedFoxAssembly/Statements/RFASMProgram.cs similarity index 91% rename from RedFoxAssembly/CSharp/Statements/RFASMProgram.cs rename to RedFoxAssembly/Statements/RFASMProgram.cs index 405e4a3..8408038 100644 --- a/RedFoxAssembly/CSharp/Statements/RFASMProgram.cs +++ b/RedFoxAssembly/Statements/RFASMProgram.cs @@ -1,5 +1,5 @@ using NLog; -using RedFoxAssembly.CSharp.Core; +using RedFoxAssembly.Core; using System; using System.Collections.Generic; using System.Linq; @@ -7,7 +7,7 @@ using System.Text.Json; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { internal class RFASMProgram { @@ -34,7 +34,7 @@ internal void AddConfiguration(IConfiguration c) Configuations.Add(c); } - internal void ReloadSerialMetadata (string metadataJson) + internal void ReloadSerialMetadata(string metadataJson) { LOGGER.Info("Reloading RFASM program metadata..."); diff --git a/RedFoxAssembly/CSharp/Statements/RepeatCommand.cs b/RedFoxAssembly/Statements/RepeatCommand.cs similarity index 73% rename from RedFoxAssembly/CSharp/Statements/RepeatCommand.cs rename to RedFoxAssembly/Statements/RepeatCommand.cs index 43f165d..d8bd589 100644 --- a/RedFoxAssembly/CSharp/Statements/RepeatCommand.cs +++ b/RedFoxAssembly/Statements/RepeatCommand.cs @@ -1,5 +1,6 @@ using NLog; -using RedFoxAssembly.CSharp.Core; +using RedFoxAssembly.Core; +using RedFoxAssembly.Exceptions; using System; using System.Collections; using System.Collections.Generic; @@ -7,7 +8,7 @@ using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { internal class RepeatCommand : ICommand { @@ -16,9 +17,9 @@ internal class RepeatCommand : ICommand public int Times { get; protected set; } public byte[] Contents { get; protected set; } - public RepeatCommand (int times, List rBytes): this(times, RByte.MakeByteArr(rBytes)) {} + public RepeatCommand (int times, List rBytes) : this(times, RByte.MakeByteArr(rBytes)) { } - public RepeatCommand (int times, List words): this(times, Word.MakeByteArr(words)) {} + public RepeatCommand (int times, List words) : this(times, Word.MakeByteArr(words)) { } public RepeatCommand (int times, byte[] contents) { @@ -30,7 +31,7 @@ public RepeatCommand (int times, byte[] contents) Contents = contents; } - public byte[] GetBytes(RFASMCompiler compiler) + public byte[] GetBytes (RFASMCompiler compiler) { byte[] result = new byte[GetPredictedLength(compiler)]; @@ -40,7 +41,7 @@ public byte[] GetBytes(RFASMCompiler compiler) return result; } - public int GetPredictedLength(RFASMCompiler compiler) + public int GetPredictedLength (RFASMCompiler compiler) { return Contents.Length * Times; } diff --git a/RedFoxAssembly/CSharp/Statements/ValueConfiguration.cs b/RedFoxAssembly/Statements/ValueConfiguration.cs similarity index 76% rename from RedFoxAssembly/CSharp/Statements/ValueConfiguration.cs rename to RedFoxAssembly/Statements/ValueConfiguration.cs index 9bedb01..5af50f2 100644 --- a/RedFoxAssembly/CSharp/Statements/ValueConfiguration.cs +++ b/RedFoxAssembly/Statements/ValueConfiguration.cs @@ -1,11 +1,12 @@ -using RedFoxAssembly.CSharp.Core; +using RedFoxAssembly.Core; +using RedFoxAssembly.Exceptions; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { internal class ValueConfiguration : IConfiguration { @@ -13,25 +14,25 @@ internal class ValueConfiguration : IConfiguration private Word? _word; private RByte? _byte; - public ValueConfiguration(string id, Word word) + public ValueConfiguration (string id, Word word) { _id = id; _word = word; - if (String.IsNullOrWhiteSpace(_id)) throw new ParsingException($"Cannot create ValueConfiguration of word value '{_word}' with null or whitespace id '{id}'"); + if (string.IsNullOrWhiteSpace(_id)) throw new ParsingException($"Cannot create ValueConfiguration of word value '{_word}' with null or whitespace id '{id}'"); if (_word == null) throw new ParsingException($"Cannot create ValueConfiguration '{id}' with null word value '{_word}'"); } - public ValueConfiguration(string id, RByte @byte) + public ValueConfiguration (string id, RByte @byte) { _id = id; _byte = @byte; - if (String.IsNullOrWhiteSpace(_id)) throw new ParsingException($"Cannot create ValueConfiguration of byte value '{_byte}' with null or whitespace id '{id}'"); + if (string.IsNullOrWhiteSpace(_id)) throw new ParsingException($"Cannot create ValueConfiguration of byte value '{_byte}' with null or whitespace id '{id}'"); if (_byte == null) throw new ParsingException($"Cannot create ValueConfiguration '{id}' with null byte value '{_byte}'"); } - void IConfiguration.Resolve(RFASMCompiler compiler) + void IConfiguration.Resolve (RFASMCompiler compiler) { if (compiler.Constants.ContainsKey(_id)) throw new PreCompilationException($"Illegal duplicate declaration of constant value {_id}"); diff --git a/RedFoxAssembly/CSharp/Statements/WidthConfiguration.cs b/RedFoxAssembly/Statements/WidthConfiguration.cs similarity index 84% rename from RedFoxAssembly/CSharp/Statements/WidthConfiguration.cs rename to RedFoxAssembly/Statements/WidthConfiguration.cs index 277d158..85b86c4 100644 --- a/RedFoxAssembly/CSharp/Statements/WidthConfiguration.cs +++ b/RedFoxAssembly/Statements/WidthConfiguration.cs @@ -1,11 +1,11 @@ -using RedFoxAssembly.CSharp.Core; +using RedFoxAssembly.Core; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { internal class WidthConfiguration : IConfiguration { diff --git a/RedFoxAssembly/CSharp/Statements/Word.cs b/RedFoxAssembly/Statements/Word.cs similarity index 78% rename from RedFoxAssembly/CSharp/Statements/Word.cs rename to RedFoxAssembly/Statements/Word.cs index bf24f1d..243386d 100644 --- a/RedFoxAssembly/CSharp/Statements/Word.cs +++ b/RedFoxAssembly/Statements/Word.cs @@ -1,13 +1,14 @@ using NLog.Targets; -using RedFoxAssembly.CSharp.Core; +using RedFoxAssembly.Core; +using RedFoxAssembly.Exceptions; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using static RedFoxAssembly.CSharp.Statements.IData; +using static RedFoxAssembly.Statements.IData; -namespace RedFoxAssembly.CSharp.Statements +namespace RedFoxAssembly.Statements { internal class Word : IData { @@ -16,7 +17,7 @@ internal class Word : IData public byte[]? Data { get; protected set; } public string? Identifier { get; protected set; } - public Word(bool isTargetingRegister, byte[] data) + public Word (bool isTargetingRegister, byte[] data) { TargetingRegister = isTargetingRegister; @@ -24,15 +25,15 @@ public Word(bool isTargetingRegister, byte[] data) Data = data; } - public Word(bool isTargetingRegister, string identifier) + public Word (bool isTargetingRegister, string identifier) { TargetingRegister = isTargetingRegister; - if (String.IsNullOrWhiteSpace(identifier)) throw new ParsingException("Cannot assign a null or whitespace value-mapping to a word"); + if (string.IsNullOrWhiteSpace(identifier)) throw new ParsingException("Cannot assign a null or whitespace value-mapping to a word"); Identifier = identifier; } - public byte[] GetBytes(RFASMCompiler compiler) + public byte[] GetBytes (RFASMCompiler compiler) { // Return the value of the named constant if (Identifier != null) @@ -41,7 +42,7 @@ public byte[] GetBytes(RFASMCompiler compiler) { byte[] v = val.GetBytes(compiler); if (v.Length != compiler.Options!.DataWidth) - throw new CompilationException($"Constant {Identifier} with value [{String.Join(',', v)}] is not of correct width {compiler.Options.DataWidth} for word."); + throw new CompilationException($"Constant {Identifier} with value [{string.Join(',', v)}] is not of correct width {compiler.Options.DataWidth} for word."); return v; } else @@ -58,7 +59,7 @@ public byte[] GetBytes(RFASMCompiler compiler) if (IsTargetingRegister()) { if (Data.Length != 1) - throw new CompilationException($"Word [{String.Join(',', Data)}] targetting register is length {Data.Length}, but it should have length 1."); + throw new CompilationException($"Word [{string.Join(',', Data)}] targetting register is length {Data.Length}, but it should have length 1."); else return Data; } @@ -69,12 +70,12 @@ public byte[] GetBytes(RFASMCompiler compiler) // Illegal data width if (Data.Length != compiler.Options!.DataWidth) { - throw new CompilationException($"Width {Data.Length} of word [{String.Join(',', Data)}] does not match defined data width {compiler.Options.DataWidth}."); + throw new CompilationException($"Width {Data.Length} of word [{string.Join(',', Data)}] does not match defined data width {compiler.Options.DataWidth}."); } // If contains no data else if (Data.Length < 1) { - throw new CompilationException($"Word [{String.Join(',', Data)}] width {Data.Length} shorter than 1 byte."); + throw new CompilationException($"Word [{string.Join(',', Data)}] width {Data.Length} shorter than 1 byte."); } return Data; @@ -84,19 +85,19 @@ public byte[] GetBytes(RFASMCompiler compiler) throw new CompilationException("(Word) Unable to get bytes of word with null constant-value and null byte-value"); } - public override string ToString() + public override string ToString () { - if (!String.IsNullOrWhiteSpace(Identifier)) return Identifier; - else if (Data != null) return String.Join("", Data!); + if (!string.IsNullOrWhiteSpace(Identifier)) return Identifier; + else if (Data != null) return string.Join("", Data!); else return "Word(Empty)"; } - public bool IsTargetingRegister() + public bool IsTargetingRegister () { return TargetingRegister; } - public int GetWidth(RFASMCompiler compiler) + public int GetWidth (RFASMCompiler compiler) { return compiler.Options!.DataWidth; } diff --git a/RedFoxVM.sln b/RedFoxVM.sln index 6dfa8e6..5addcdb 100644 --- a/RedFoxVM.sln +++ b/RedFoxVM.sln @@ -8,6 +8,11 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RedFoxAssembly", "RedFoxAssembly\RedFoxAssembly.csproj", "{9C2593E0-C1DD-4F85-B328-1FE10475BBC7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crimson", "Crimson\Crimson.csproj", "{47108A9A-41EF-46E8-87D8-FE55E3869286}" + ProjectSection(ProjectDependencies) = postProject + {3CFD1EAE-9D7B-4508-BE8C-7B7949F5D3A0} = {3CFD1EAE-9D7B-4508-BE8C-7B7949F5D3A0} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Berry", "Berry\Berry.csproj", "{3CFD1EAE-9D7B-4508-BE8C-7B7949F5D3A0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -27,6 +32,10 @@ Global {47108A9A-41EF-46E8-87D8-FE55E3869286}.Debug|Any CPU.Build.0 = Debug|Any CPU {47108A9A-41EF-46E8-87D8-FE55E3869286}.Release|Any CPU.ActiveCfg = Release|Any CPU {47108A9A-41EF-46E8-87D8-FE55E3869286}.Release|Any CPU.Build.0 = Release|Any CPU + {3CFD1EAE-9D7B-4508-BE8C-7B7949F5D3A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3CFD1EAE-9D7B-4508-BE8C-7B7949F5D3A0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3CFD1EAE-9D7B-4508-BE8C-7B7949F5D3A0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3CFD1EAE-9D7B-4508-BE8C-7B7949F5D3A0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 832ca30afb675993d3b826a03822dfc48f038dbe Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sun, 16 Apr 2023 15:04:52 +0100 Subject: [PATCH 078/122] Berry README --- Berry/README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Berry/README.md diff --git a/Berry/README.md b/Berry/README.md new file mode 100644 index 0000000..315604c --- /dev/null +++ b/Berry/README.md @@ -0,0 +1,6 @@ +# Berry +>***Crimson's package manager.*** +## What does Berry do? +Berry is a web server which can install and dispense Crimson source code files. Instances of Berry can join a Berry 'Bush' to share source files from peer-to-peer in order to help teams collaborate. +## How can I use Berry? +Berry is packaged with the Crimson compiler, and will be run automatically to manage dependencies for the compilation process. Berry can also be run alone. \ No newline at end of file From dd7b1482f4a5d5be730914617b6c11fa1f842702 Mon Sep 17 00:00:00 2001 From: GenElectrovise <46679475+GenElectrovise@users.noreply.github.com> Date: Sun, 16 Apr 2023 21:51:59 +0100 Subject: [PATCH 079/122] Can now deploy/publish Berry locally Just to check it's working --- Berry/.config/dotnet-tools.json | 12 + Berry/Berry.cs | 41 +- Berry/Berry.csproj | 2 + Berry/Pages/Error.cshtml | 26 + Berry/Pages/Error.cshtml.cs | 27 + Berry/Pages/Index.cshtml | 10 + Berry/Pages/Index.cshtml.cs | 19 + Berry/Pages/Privacy.cshtml | 8 + Berry/Pages/Privacy.cshtml.cs | 19 + Berry/Pages/Shared/_Layout.cshtml | 51 + Berry/Pages/Shared/_Layout.cshtml.css | 48 + .../Shared/_ValidationScriptsPartial.cshtml | 2 + Berry/Pages/_ViewImports.cshtml | 3 + Berry/Pages/_ViewStart.cshtml | 3 + Berry/files.txt | 12 + Berry/wwwroot/css/site.css | 22 + Berry/wwwroot/favicon.ico | Bin 0 -> 5430 bytes Berry/wwwroot/js/site.js | 4 + Berry/wwwroot/lib/bootstrap/LICENSE | 22 + .../lib/bootstrap/dist/css/bootstrap-grid.css | 4997 +++++++ .../bootstrap/dist/css/bootstrap-grid.css.map | 1 + .../bootstrap/dist/css/bootstrap-grid.min.css | 7 + .../dist/css/bootstrap-grid.min.css.map | 1 + .../bootstrap/dist/css/bootstrap-grid.rtl.css | 4996 +++++++ .../dist/css/bootstrap-grid.rtl.css.map | 1 + .../dist/css/bootstrap-grid.rtl.min.css | 7 + .../dist/css/bootstrap-grid.rtl.min.css.map | 1 + .../bootstrap/dist/css/bootstrap-reboot.css | 427 + .../dist/css/bootstrap-reboot.css.map | 1 + .../dist/css/bootstrap-reboot.min.css | 8 + .../dist/css/bootstrap-reboot.min.css.map | 1 + .../dist/css/bootstrap-reboot.rtl.css | 424 + .../dist/css/bootstrap-reboot.rtl.css.map | 1 + .../dist/css/bootstrap-reboot.rtl.min.css | 8 + .../dist/css/bootstrap-reboot.rtl.min.css.map | 1 + .../dist/css/bootstrap-utilities.css | 4866 +++++++ .../dist/css/bootstrap-utilities.css.map | 1 + .../dist/css/bootstrap-utilities.min.css | 7 + .../dist/css/bootstrap-utilities.min.css.map | 1 + .../dist/css/bootstrap-utilities.rtl.css | 4857 +++++++ .../dist/css/bootstrap-utilities.rtl.css.map | 1 + .../dist/css/bootstrap-utilities.rtl.min.css | 7 + .../css/bootstrap-utilities.rtl.min.css.map | 1 + .../lib/bootstrap/dist/css/bootstrap.css | 11221 ++++++++++++++++ .../lib/bootstrap/dist/css/bootstrap.css.map | 1 + .../lib/bootstrap/dist/css/bootstrap.min.css | 7 + .../bootstrap/dist/css/bootstrap.min.css.map | 1 + .../lib/bootstrap/dist/css/bootstrap.rtl.css | 11197 +++++++++++++++ .../bootstrap/dist/css/bootstrap.rtl.css.map | 1 + .../bootstrap/dist/css/bootstrap.rtl.min.css | 7 + .../dist/css/bootstrap.rtl.min.css.map | 1 + .../lib/bootstrap/dist/js/bootstrap.bundle.js | 6780 ++++++++++ .../bootstrap/dist/js/bootstrap.bundle.js.map | 1 + .../bootstrap/dist/js/bootstrap.bundle.min.js | 7 + .../dist/js/bootstrap.bundle.min.js.map | 1 + .../lib/bootstrap/dist/js/bootstrap.esm.js | 4977 +++++++ .../bootstrap/dist/js/bootstrap.esm.js.map | 1 + .../bootstrap/dist/js/bootstrap.esm.min.js | 7 + .../dist/js/bootstrap.esm.min.js.map | 1 + .../lib/bootstrap/dist/js/bootstrap.js | 5026 +++++++ .../lib/bootstrap/dist/js/bootstrap.js.map | 1 + .../lib/bootstrap/dist/js/bootstrap.min.js | 7 + .../bootstrap/dist/js/bootstrap.min.js.map | 1 + .../jquery-validation-unobtrusive/LICENSE.txt | 23 + .../jquery.validate.unobtrusive.js | 435 + .../jquery.validate.unobtrusive.min.js | 8 + .../wwwroot/lib/jquery-validation/LICENSE.md | 22 + .../dist/additional-methods.js | 1158 ++ .../dist/additional-methods.min.js | 4 + .../jquery-validation/dist/jquery.validate.js | 1601 +++ .../dist/jquery.validate.min.js | 4 + Berry/wwwroot/lib/jquery/LICENSE.txt | 21 + Berry/wwwroot/lib/jquery/dist/jquery.js | 10881 +++++++++++++++ Berry/wwwroot/lib/jquery/dist/jquery.min.js | 2 + Berry/wwwroot/lib/jquery/dist/jquery.min.map | 1 + Berry/wwwroot/test.txt | 1 + 76 files changed, 74353 insertions(+), 8 deletions(-) create mode 100644 Berry/.config/dotnet-tools.json create mode 100644 Berry/Pages/Error.cshtml create mode 100644 Berry/Pages/Error.cshtml.cs create mode 100644 Berry/Pages/Index.cshtml create mode 100644 Berry/Pages/Index.cshtml.cs create mode 100644 Berry/Pages/Privacy.cshtml create mode 100644 Berry/Pages/Privacy.cshtml.cs create mode 100644 Berry/Pages/Shared/_Layout.cshtml create mode 100644 Berry/Pages/Shared/_Layout.cshtml.css create mode 100644 Berry/Pages/Shared/_ValidationScriptsPartial.cshtml create mode 100644 Berry/Pages/_ViewImports.cshtml create mode 100644 Berry/Pages/_ViewStart.cshtml create mode 100644 Berry/files.txt create mode 100644 Berry/wwwroot/css/site.css create mode 100644 Berry/wwwroot/favicon.ico create mode 100644 Berry/wwwroot/js/site.js create mode 100644 Berry/wwwroot/lib/bootstrap/LICENSE create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css create mode 100644 Berry/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js create mode 100644 Berry/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js create mode 100644 Berry/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js create mode 100644 Berry/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js create mode 100644 Berry/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/js/bootstrap.js create mode 100644 Berry/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map create mode 100644 Berry/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js create mode 100644 Berry/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map create mode 100644 Berry/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt create mode 100644 Berry/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js create mode 100644 Berry/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js create mode 100644 Berry/wwwroot/lib/jquery-validation/LICENSE.md create mode 100644 Berry/wwwroot/lib/jquery-validation/dist/additional-methods.js create mode 100644 Berry/wwwroot/lib/jquery-validation/dist/additional-methods.min.js create mode 100644 Berry/wwwroot/lib/jquery-validation/dist/jquery.validate.js create mode 100644 Berry/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js create mode 100644 Berry/wwwroot/lib/jquery/LICENSE.txt create mode 100644 Berry/wwwroot/lib/jquery/dist/jquery.js create mode 100644 Berry/wwwroot/lib/jquery/dist/jquery.min.js create mode 100644 Berry/wwwroot/lib/jquery/dist/jquery.min.map create mode 100644 Berry/wwwroot/test.txt diff --git a/Berry/.config/dotnet-tools.json b/Berry/.config/dotnet-tools.json new file mode 100644 index 0000000..34c3e19 --- /dev/null +++ b/Berry/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "7.0.5", + "commands": [ + "dotnet-ef" + ] + } + } +} \ No newline at end of file diff --git a/Berry/Berry.cs b/Berry/Berry.cs index a5664f2..35ab87e 100644 --- a/Berry/Berry.cs +++ b/Berry/Berry.cs @@ -4,29 +4,54 @@ public class Berry { public static int Main (string[] args) { - var builder = WebApplication.CreateBuilder(args); + Run(); + return 0; + } + + public static void Run () + { + WebApplicationBuilder builder = WebApplication.CreateBuilder(); + + _ = builder.WebHost.ConfigureKestrel(serverOptions => + { + serverOptions.ConfigureEndpointDefaults(listenOptions => + { + + }); + + serverOptions.ConfigureHttpsDefaults(listenOptions => { }); + }); + + // Add services to the container. - builder.Services.AddRazorPages(); + _ = builder.Services.AddRazorPages(); var app = builder.Build(); + string expression = @".+exp.+"; + _ = app.MapGet("/get/{id:required:regex(" + expression + ")}", (string id) => Get(id)); + + // Configure the HTTP request pipeline. if (!app.Environment.IsDevelopment()) { - app.UseExceptionHandler("/Error"); + _ = app.UseExceptionHandler("/Error"); } - app.UseStaticFiles(); + _ = app.UseStaticFiles(); - app.UseRouting(); + _ = app.UseRouting(); - app.UseAuthorization(); + _ = app.UseAuthorization(); - app.MapRazorPages(); + _ = app.MapRazorPages(); app.Run(); + } - return 0; + public static string Get (string id) + { + return $"Hello, World! {id}"; } } } diff --git a/Berry/Berry.csproj b/Berry/Berry.csproj index 75a0ec9..594cb4b 100644 --- a/Berry/Berry.csproj +++ b/Berry/Berry.csproj @@ -4,6 +4,8 @@ net7.0 enable enable + true + diff --git a/Berry/Pages/Error.cshtml b/Berry/Pages/Error.cshtml new file mode 100644 index 0000000..6f92b95 --- /dev/null +++ b/Berry/Pages/Error.cshtml @@ -0,0 +1,26 @@ +@page +@model ErrorModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to the Development environment displays detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/Berry/Pages/Error.cshtml.cs b/Berry/Pages/Error.cshtml.cs new file mode 100644 index 0000000..977a13b --- /dev/null +++ b/Berry/Pages/Error.cshtml.cs @@ -0,0 +1,27 @@ +using System.Diagnostics; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace New_folder.Pages; + +[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] +[IgnoreAntiforgeryToken] +public class ErrorModel : PageModel +{ + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + private readonly ILogger _logger; + + public ErrorModel(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; + } +} + diff --git a/Berry/Pages/Index.cshtml b/Berry/Pages/Index.cshtml new file mode 100644 index 0000000..f679528 --- /dev/null +++ b/Berry/Pages/Index.cshtml @@ -0,0 +1,10 @@ +@page +@model IndexModel +@{ + ViewData["Title"] = "Home page"; +} + +
+

Welcome to Berry

+

Crimson's peer-to-peer package manager

+
diff --git a/Berry/Pages/Index.cshtml.cs b/Berry/Pages/Index.cshtml.cs new file mode 100644 index 0000000..4bdded5 --- /dev/null +++ b/Berry/Pages/Index.cshtml.cs @@ -0,0 +1,19 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace New_folder.Pages; + +public class IndexModel : PageModel +{ + private readonly ILogger _logger; + + public IndexModel(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + + } +} diff --git a/Berry/Pages/Privacy.cshtml b/Berry/Pages/Privacy.cshtml new file mode 100644 index 0000000..46ba966 --- /dev/null +++ b/Berry/Pages/Privacy.cshtml @@ -0,0 +1,8 @@ +@page +@model PrivacyModel +@{ + ViewData["Title"] = "Privacy Policy"; +} +

@ViewData["Title"]

+ +

Use this page to detail your site's privacy policy.

diff --git a/Berry/Pages/Privacy.cshtml.cs b/Berry/Pages/Privacy.cshtml.cs new file mode 100644 index 0000000..49d74f0 --- /dev/null +++ b/Berry/Pages/Privacy.cshtml.cs @@ -0,0 +1,19 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace New_folder.Pages; + +public class PrivacyModel : PageModel +{ + private readonly ILogger _logger; + + public PrivacyModel(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + } +} + diff --git a/Berry/Pages/Shared/_Layout.cshtml b/Berry/Pages/Shared/_Layout.cshtml new file mode 100644 index 0000000..55e6ff5 --- /dev/null +++ b/Berry/Pages/Shared/_Layout.cshtml @@ -0,0 +1,51 @@ + + + + + + @ViewData["Title"] - New_folder + + + + + +
+ +
+
+
+ @RenderBody() +
+
+ +
+
+ © 2023 - New_folder - Privacy +
+
+ + + + + + @await RenderSectionAsync("Scripts", required: false) + + \ No newline at end of file diff --git a/Berry/Pages/Shared/_Layout.cshtml.css b/Berry/Pages/Shared/_Layout.cshtml.css new file mode 100644 index 0000000..a72cbea --- /dev/null +++ b/Berry/Pages/Shared/_Layout.cshtml.css @@ -0,0 +1,48 @@ +/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification +for details on configuring this project to bundle and minify static web assets. */ + +a.navbar-brand { + white-space: normal; + text-align: center; + word-break: break-all; +} + +a { + color: #0077cc; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.nav-pills .nav-link.active, .nav-pills .show > .nav-link { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.border-top { + border-top: 1px solid #e5e5e5; +} +.border-bottom { + border-bottom: 1px solid #e5e5e5; +} + +.box-shadow { + box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); +} + +button.accept-policy { + font-size: 1rem; + line-height: inherit; +} + +.footer { + position: absolute; + bottom: 0; + width: 100%; + white-space: nowrap; + line-height: 60px; +} diff --git a/Berry/Pages/Shared/_ValidationScriptsPartial.cshtml b/Berry/Pages/Shared/_ValidationScriptsPartial.cshtml new file mode 100644 index 0000000..5a16d80 --- /dev/null +++ b/Berry/Pages/Shared/_ValidationScriptsPartial.cshtml @@ -0,0 +1,2 @@ + + diff --git a/Berry/Pages/_ViewImports.cshtml b/Berry/Pages/_ViewImports.cshtml new file mode 100644 index 0000000..03fd94e --- /dev/null +++ b/Berry/Pages/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using New_folder +@namespace New_folder.Pages +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/Berry/Pages/_ViewStart.cshtml b/Berry/Pages/_ViewStart.cshtml new file mode 100644 index 0000000..a5f1004 --- /dev/null +++ b/Berry/Pages/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} diff --git a/Berry/files.txt b/Berry/files.txt new file mode 100644 index 0000000..93ecd24 --- /dev/null +++ b/Berry/files.txt @@ -0,0 +1,12 @@ +I'm creating a Kestrel server in C# which will dispense files to the user. I would like to deploy the application both containerised with Docker and as a standalone console application. How can I manage the file system so that it works in both cases? +When deploying a Kestrel server in C# that serves files to users, there are a few considerations to keep in mind to ensure it works seamlessly in both Docker and standalone console application modes. + +Use relative file paths: When serving files in Kestrel, it's important to use relative file paths instead of absolute file paths. This allows your application to be location-independent and work correctly regardless of where it is deployed. For example, you can use Path.Combine to create relative file paths based on the current directory or the AppContext.BaseDirectory property to get the base directory of the application. + +Use environment variables or configuration files: Another approach is to use environment variables or configuration files to store file paths that can be easily updated depending on the deployment environment. You can read these values at runtime using Environment.GetEnvironmentVariable or a configuration library such as Microsoft.Extensions.Configuration in C#. This allows you to configure the file paths dynamically during deployment, making it easier to switch between Docker and standalone modes. + +Consider volume mounting in Docker: In Docker, you can use volume mounting to map a directory on the host system to a directory in the container. This allows you to share files between the host and the container. You can specify the volume mount path as an environment variable or in a configuration file, and then use it in your code to access the files. This way, you can keep the file system outside of the Docker container and manage it separately, which can be useful in scenarios where you want to persist data or share files between containers. + +Handle file system permissions: When running in Docker, be mindful of file system permissions. Docker containers run with their own user and group IDs, which may not match the user and group IDs of the host system. This can cause permission issues when reading or writing files. Make sure to set appropriate permissions on files and directories in your Docker image or when volume mounting to ensure that the application can access the files correctly. + +By following these best practices, you can create a Kestrel server in C# that can be deployed both as a standalone console application and as a containerized Docker application, while effectively managing the file system in both scenarios. \ No newline at end of file diff --git a/Berry/wwwroot/css/site.css b/Berry/wwwroot/css/site.css new file mode 100644 index 0000000..f8d98fc --- /dev/null +++ b/Berry/wwwroot/css/site.css @@ -0,0 +1,22 @@ +html { + font-size: 14px; +} + +@media (min-width: 768px) { + html { + font-size: 16px; + } +} + +.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus { + box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb; +} + +html { + position: relative; + min-height: 100%; +} + +body { + margin-bottom: 60px; +} \ No newline at end of file diff --git a/Berry/wwwroot/favicon.ico b/Berry/wwwroot/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..63e859b476eff5055e0e557aaa151ca8223fbeef GIT binary patch literal 5430 zcmc&&Yj2xp8Fqnv;>&(QB_ve7>^E#o2mu=cO~A%R>DU-_hfbSRv1t;m7zJ_AMrntN zy0+^f&8be>q&YYzH%(88lQ?#KwiCzaCO*ZEo%j&v;<}&Lj_stKTKK>#U3nin@AF>w zb3ONSAFR{u(S1d?cdw53y}Gt1b-Hirbh;;bm(Rcbnoc*%@jiaXM|4jU^1WO~`TYZ~ zC-~jh9~b-f?fX`DmwvcguQzn*uV}c^Vd&~?H|RUs4Epv~gTAfR(B0lT&?RWQOtduM z^1vUD9{HQsW!{a9|0crA34m7Z6lpG^}f6f?={zD+ zXAzk^i^aKN_}s2$eX81wjSMONE#WVdzf|MT)Ap*}Vsn!XbvsI#6o&ij{87^d%$|A{ z=F{KB%)g%@z76yBzbb7seW**Ju8r4e*Z3PWNX3_tTDgzZatz7)Q6ytwB%@&@A|XT; zecM`Snxx5po$C)%yCP!KEtos~eOS)@2=kX-RIm)4glMCoagTEFxrBeSX%Euz734Fk z%7)x(k~T!@Hbg_37NSQL!vlTBXoURSzt~I**Zw`&F24fH*&kx=%nvZv|49SC*daD( zIw<~%#=lk8{2-l(BcIjy^Q$Q&m#KlWL9?UG{b8@qhlD z;umc+6p%|NsAT~0@DgV4-NKgQuWPWrmPIK&&XhV&n%`{l zOl^bbWYjQNuVXTXESO)@|iUKVmErPUDfz2Wh`4dF@OFiaCW|d`3paV^@|r^8T_ZxM)Z+$p5qx# z#K=z@%;aBPO=C4JNNGqVv6@UGolIz;KZsAro``Rz8X%vq_gpi^qEV&evgHb_=Y9-l z`)imdx0UC>GWZYj)3+3aKh?zVb}=@%oNzg7a8%kfVl)SV-Amp1Okw&+hEZ3|v(k8vRjXW9?ih`&FFM zV$~{j3IzhtcXk?Mu_!12;=+I7XK-IR2>Yd%VB^?oI9c^E&Chb&&je$NV0P-R;ujkP z;cbLCCPEF6|22NDj=S`F^2e~XwT1ZnRX8ra0#DaFa9-X|8(xNW_+JhD75WnSd7cxo z2>I_J5{c|WPfrgl7E2R)^c}F7ry()Z>$Jhk9CzZxiPKL#_0%`&{MX>P_%b~Dx0D^S z7xP1(DQ!d_Icpk!RN3I1w@~|O1ru#CO==h#9M~S4Chx*@?=EKUPGBv$tmU+7Zs_al z`!jR?6T&Z7(%uVq>#yLu`abWk!FBlnY{RFNHlj~6zh*;@u}+}viRKsD`IIxN#R-X3 z@vxu#EA_m}I503U(8Qmx^}u;)KfGP`O9E1H1Q|xeeksX8jC%@!{YT1)!lWgO=+Y3*jr=iSxvOW1}^HSy=y){tOMQJ@an>sOl4FYniE z;GOxd7AqxZNbYFNqobpv&HVO$c-w!Y*6r;$2oJ~h(a#(Bp<-)dg*mNigX~9rPqcHv z^;c*|Md?tD)$y?6FO$DWl$jUGV`F1G_^E&E>sY*YnA~ruv3=z9F8&&~Xpm<<75?N3 z>x~`I&M9q)O1=zWZHN9hZWx>RQ}zLP+iL57Q)%&_^$Sme^^G7;e-P~CR?kqU#Io#( z(nH1Wn*Ig)|M>WLGrxoU?FZrS`4GO&w;+39A3f8w{{Q7eg|$+dIlNFPAe+tN=FOYU z{A&Fg|H73+w1IK(W=j*L>JQgz$g0 z7JpKXLHIh}#$wm|N`s}o-@|L_`>*(gTQ~)wr3Eap7g%PVNisKw82im;Gdv#85x#s+ zoqqtnwu4ycd>cOQgRh-=aEJbnvVK`}ja%+FZx}&ehtX)n(9nVfe4{mn0bgijUbNr7Tf5X^$*{qh2%`?--%+sbSrjE^;1e3>% zqa%jdY16{Y)a1hSy*mr0JGU05Z%=qlx5vGvTjSpTt6k%nR06q}1DU`SQh_ZAeJ}A@`hL~xvv05U?0%=spP`R>dk?cOWM9^KNb7B?xjex>OZo%JMQQ1Q zB|q@}8RiP@DWn-(fB;phPaIOP2Yp)XN3-Fsn)S3w($4&+p8f5W_f%gac}QvmkHfCj$2=!t`boCvQ zCW;&Dto=f8v##}dy^wg3VNaBy&kCe3N;1|@n@pUaMPT?(aJ9b*(gJ28$}(2qFt$H~u5z94xcIQkcOI++)*exzbrk?WOOOf*|%k5#KV zL=&ky3)Eirv$wbRJ2F2s_ILQY--D~~7>^f}W|Aw^e7inXr#WLI{@h`0|jHud2Y~cI~Yn{r_kU^Vo{1gja * { + box-sizing: border-box; + flex-shrink: 0; + width: 100%; + max-width: 100%; + padding-right: calc(var(--bs-gutter-x) * .5); + padding-left: calc(var(--bs-gutter-x) * .5); + margin-top: var(--bs-gutter-y); +} + +.col { + flex: 1 0 0%; +} + +.row-cols-auto > * { + flex: 0 0 auto; + width: auto; +} + +.row-cols-1 > * { + flex: 0 0 auto; + width: 100%; +} + +.row-cols-2 > * { + flex: 0 0 auto; + width: 50%; +} + +.row-cols-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; +} + +.row-cols-4 > * { + flex: 0 0 auto; + width: 25%; +} + +.row-cols-5 > * { + flex: 0 0 auto; + width: 20%; +} + +.row-cols-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; +} + +.col-auto { + flex: 0 0 auto; + width: auto; +} + +.col-1 { + flex: 0 0 auto; + width: 8.33333333%; +} + +.col-2 { + flex: 0 0 auto; + width: 16.66666667%; +} + +.col-3 { + flex: 0 0 auto; + width: 25%; +} + +.col-4 { + flex: 0 0 auto; + width: 33.33333333%; +} + +.col-5 { + flex: 0 0 auto; + width: 41.66666667%; +} + +.col-6 { + flex: 0 0 auto; + width: 50%; +} + +.col-7 { + flex: 0 0 auto; + width: 58.33333333%; +} + +.col-8 { + flex: 0 0 auto; + width: 66.66666667%; +} + +.col-9 { + flex: 0 0 auto; + width: 75%; +} + +.col-10 { + flex: 0 0 auto; + width: 83.33333333%; +} + +.col-11 { + flex: 0 0 auto; + width: 91.66666667%; +} + +.col-12 { + flex: 0 0 auto; + width: 100%; +} + +.offset-1 { + margin-left: 8.33333333%; +} + +.offset-2 { + margin-left: 16.66666667%; +} + +.offset-3 { + margin-left: 25%; +} + +.offset-4 { + margin-left: 33.33333333%; +} + +.offset-5 { + margin-left: 41.66666667%; +} + +.offset-6 { + margin-left: 50%; +} + +.offset-7 { + margin-left: 58.33333333%; +} + +.offset-8 { + margin-left: 66.66666667%; +} + +.offset-9 { + margin-left: 75%; +} + +.offset-10 { + margin-left: 83.33333333%; +} + +.offset-11 { + margin-left: 91.66666667%; +} + +.g-0, +.gx-0 { + --bs-gutter-x: 0; +} + +.g-0, +.gy-0 { + --bs-gutter-y: 0; +} + +.g-1, +.gx-1 { + --bs-gutter-x: 0.25rem; +} + +.g-1, +.gy-1 { + --bs-gutter-y: 0.25rem; +} + +.g-2, +.gx-2 { + --bs-gutter-x: 0.5rem; +} + +.g-2, +.gy-2 { + --bs-gutter-y: 0.5rem; +} + +.g-3, +.gx-3 { + --bs-gutter-x: 1rem; +} + +.g-3, +.gy-3 { + --bs-gutter-y: 1rem; +} + +.g-4, +.gx-4 { + --bs-gutter-x: 1.5rem; +} + +.g-4, +.gy-4 { + --bs-gutter-y: 1.5rem; +} + +.g-5, +.gx-5 { + --bs-gutter-x: 3rem; +} + +.g-5, +.gy-5 { + --bs-gutter-y: 3rem; +} + +@media (min-width: 576px) { + .col-sm { + flex: 1 0 0%; + } + + .row-cols-sm-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-sm-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-sm-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-sm-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-sm-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-sm-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-sm-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-sm-auto { + flex: 0 0 auto; + width: auto; + } + + .col-sm-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-sm-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-sm-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-sm-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-sm-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-sm-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-sm-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-sm-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-sm-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-sm-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-sm-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-sm-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-sm-0 { + margin-left: 0; + } + + .offset-sm-1 { + margin-left: 8.33333333%; + } + + .offset-sm-2 { + margin-left: 16.66666667%; + } + + .offset-sm-3 { + margin-left: 25%; + } + + .offset-sm-4 { + margin-left: 33.33333333%; + } + + .offset-sm-5 { + margin-left: 41.66666667%; + } + + .offset-sm-6 { + margin-left: 50%; + } + + .offset-sm-7 { + margin-left: 58.33333333%; + } + + .offset-sm-8 { + margin-left: 66.66666667%; + } + + .offset-sm-9 { + margin-left: 75%; + } + + .offset-sm-10 { + margin-left: 83.33333333%; + } + + .offset-sm-11 { + margin-left: 91.66666667%; + } + + .g-sm-0, +.gx-sm-0 { + --bs-gutter-x: 0; + } + + .g-sm-0, +.gy-sm-0 { + --bs-gutter-y: 0; + } + + .g-sm-1, +.gx-sm-1 { + --bs-gutter-x: 0.25rem; + } + + .g-sm-1, +.gy-sm-1 { + --bs-gutter-y: 0.25rem; + } + + .g-sm-2, +.gx-sm-2 { + --bs-gutter-x: 0.5rem; + } + + .g-sm-2, +.gy-sm-2 { + --bs-gutter-y: 0.5rem; + } + + .g-sm-3, +.gx-sm-3 { + --bs-gutter-x: 1rem; + } + + .g-sm-3, +.gy-sm-3 { + --bs-gutter-y: 1rem; + } + + .g-sm-4, +.gx-sm-4 { + --bs-gutter-x: 1.5rem; + } + + .g-sm-4, +.gy-sm-4 { + --bs-gutter-y: 1.5rem; + } + + .g-sm-5, +.gx-sm-5 { + --bs-gutter-x: 3rem; + } + + .g-sm-5, +.gy-sm-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 768px) { + .col-md { + flex: 1 0 0%; + } + + .row-cols-md-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-md-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-md-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-md-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-md-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-md-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-md-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-md-auto { + flex: 0 0 auto; + width: auto; + } + + .col-md-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-md-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-md-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-md-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-md-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-md-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-md-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-md-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-md-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-md-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-md-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-md-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-md-0 { + margin-left: 0; + } + + .offset-md-1 { + margin-left: 8.33333333%; + } + + .offset-md-2 { + margin-left: 16.66666667%; + } + + .offset-md-3 { + margin-left: 25%; + } + + .offset-md-4 { + margin-left: 33.33333333%; + } + + .offset-md-5 { + margin-left: 41.66666667%; + } + + .offset-md-6 { + margin-left: 50%; + } + + .offset-md-7 { + margin-left: 58.33333333%; + } + + .offset-md-8 { + margin-left: 66.66666667%; + } + + .offset-md-9 { + margin-left: 75%; + } + + .offset-md-10 { + margin-left: 83.33333333%; + } + + .offset-md-11 { + margin-left: 91.66666667%; + } + + .g-md-0, +.gx-md-0 { + --bs-gutter-x: 0; + } + + .g-md-0, +.gy-md-0 { + --bs-gutter-y: 0; + } + + .g-md-1, +.gx-md-1 { + --bs-gutter-x: 0.25rem; + } + + .g-md-1, +.gy-md-1 { + --bs-gutter-y: 0.25rem; + } + + .g-md-2, +.gx-md-2 { + --bs-gutter-x: 0.5rem; + } + + .g-md-2, +.gy-md-2 { + --bs-gutter-y: 0.5rem; + } + + .g-md-3, +.gx-md-3 { + --bs-gutter-x: 1rem; + } + + .g-md-3, +.gy-md-3 { + --bs-gutter-y: 1rem; + } + + .g-md-4, +.gx-md-4 { + --bs-gutter-x: 1.5rem; + } + + .g-md-4, +.gy-md-4 { + --bs-gutter-y: 1.5rem; + } + + .g-md-5, +.gx-md-5 { + --bs-gutter-x: 3rem; + } + + .g-md-5, +.gy-md-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 992px) { + .col-lg { + flex: 1 0 0%; + } + + .row-cols-lg-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-lg-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-lg-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-lg-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-lg-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-lg-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-lg-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-lg-auto { + flex: 0 0 auto; + width: auto; + } + + .col-lg-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-lg-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-lg-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-lg-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-lg-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-lg-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-lg-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-lg-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-lg-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-lg-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-lg-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-lg-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-lg-0 { + margin-left: 0; + } + + .offset-lg-1 { + margin-left: 8.33333333%; + } + + .offset-lg-2 { + margin-left: 16.66666667%; + } + + .offset-lg-3 { + margin-left: 25%; + } + + .offset-lg-4 { + margin-left: 33.33333333%; + } + + .offset-lg-5 { + margin-left: 41.66666667%; + } + + .offset-lg-6 { + margin-left: 50%; + } + + .offset-lg-7 { + margin-left: 58.33333333%; + } + + .offset-lg-8 { + margin-left: 66.66666667%; + } + + .offset-lg-9 { + margin-left: 75%; + } + + .offset-lg-10 { + margin-left: 83.33333333%; + } + + .offset-lg-11 { + margin-left: 91.66666667%; + } + + .g-lg-0, +.gx-lg-0 { + --bs-gutter-x: 0; + } + + .g-lg-0, +.gy-lg-0 { + --bs-gutter-y: 0; + } + + .g-lg-1, +.gx-lg-1 { + --bs-gutter-x: 0.25rem; + } + + .g-lg-1, +.gy-lg-1 { + --bs-gutter-y: 0.25rem; + } + + .g-lg-2, +.gx-lg-2 { + --bs-gutter-x: 0.5rem; + } + + .g-lg-2, +.gy-lg-2 { + --bs-gutter-y: 0.5rem; + } + + .g-lg-3, +.gx-lg-3 { + --bs-gutter-x: 1rem; + } + + .g-lg-3, +.gy-lg-3 { + --bs-gutter-y: 1rem; + } + + .g-lg-4, +.gx-lg-4 { + --bs-gutter-x: 1.5rem; + } + + .g-lg-4, +.gy-lg-4 { + --bs-gutter-y: 1.5rem; + } + + .g-lg-5, +.gx-lg-5 { + --bs-gutter-x: 3rem; + } + + .g-lg-5, +.gy-lg-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1200px) { + .col-xl { + flex: 1 0 0%; + } + + .row-cols-xl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-xl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-xl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-xl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-xl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-xl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-xl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-xl-auto { + flex: 0 0 auto; + width: auto; + } + + .col-xl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-xl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-xl-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-xl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-xl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-xl-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-xl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-xl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-xl-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-xl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-xl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-xl-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-xl-0 { + margin-left: 0; + } + + .offset-xl-1 { + margin-left: 8.33333333%; + } + + .offset-xl-2 { + margin-left: 16.66666667%; + } + + .offset-xl-3 { + margin-left: 25%; + } + + .offset-xl-4 { + margin-left: 33.33333333%; + } + + .offset-xl-5 { + margin-left: 41.66666667%; + } + + .offset-xl-6 { + margin-left: 50%; + } + + .offset-xl-7 { + margin-left: 58.33333333%; + } + + .offset-xl-8 { + margin-left: 66.66666667%; + } + + .offset-xl-9 { + margin-left: 75%; + } + + .offset-xl-10 { + margin-left: 83.33333333%; + } + + .offset-xl-11 { + margin-left: 91.66666667%; + } + + .g-xl-0, +.gx-xl-0 { + --bs-gutter-x: 0; + } + + .g-xl-0, +.gy-xl-0 { + --bs-gutter-y: 0; + } + + .g-xl-1, +.gx-xl-1 { + --bs-gutter-x: 0.25rem; + } + + .g-xl-1, +.gy-xl-1 { + --bs-gutter-y: 0.25rem; + } + + .g-xl-2, +.gx-xl-2 { + --bs-gutter-x: 0.5rem; + } + + .g-xl-2, +.gy-xl-2 { + --bs-gutter-y: 0.5rem; + } + + .g-xl-3, +.gx-xl-3 { + --bs-gutter-x: 1rem; + } + + .g-xl-3, +.gy-xl-3 { + --bs-gutter-y: 1rem; + } + + .g-xl-4, +.gx-xl-4 { + --bs-gutter-x: 1.5rem; + } + + .g-xl-4, +.gy-xl-4 { + --bs-gutter-y: 1.5rem; + } + + .g-xl-5, +.gx-xl-5 { + --bs-gutter-x: 3rem; + } + + .g-xl-5, +.gy-xl-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1400px) { + .col-xxl { + flex: 1 0 0%; + } + + .row-cols-xxl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-xxl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-xxl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-xxl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-xxl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-xxl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-xxl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-xxl-auto { + flex: 0 0 auto; + width: auto; + } + + .col-xxl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-xxl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-xxl-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-xxl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-xxl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-xxl-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-xxl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-xxl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-xxl-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-xxl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-xxl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-xxl-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-xxl-0 { + margin-left: 0; + } + + .offset-xxl-1 { + margin-left: 8.33333333%; + } + + .offset-xxl-2 { + margin-left: 16.66666667%; + } + + .offset-xxl-3 { + margin-left: 25%; + } + + .offset-xxl-4 { + margin-left: 33.33333333%; + } + + .offset-xxl-5 { + margin-left: 41.66666667%; + } + + .offset-xxl-6 { + margin-left: 50%; + } + + .offset-xxl-7 { + margin-left: 58.33333333%; + } + + .offset-xxl-8 { + margin-left: 66.66666667%; + } + + .offset-xxl-9 { + margin-left: 75%; + } + + .offset-xxl-10 { + margin-left: 83.33333333%; + } + + .offset-xxl-11 { + margin-left: 91.66666667%; + } + + .g-xxl-0, +.gx-xxl-0 { + --bs-gutter-x: 0; + } + + .g-xxl-0, +.gy-xxl-0 { + --bs-gutter-y: 0; + } + + .g-xxl-1, +.gx-xxl-1 { + --bs-gutter-x: 0.25rem; + } + + .g-xxl-1, +.gy-xxl-1 { + --bs-gutter-y: 0.25rem; + } + + .g-xxl-2, +.gx-xxl-2 { + --bs-gutter-x: 0.5rem; + } + + .g-xxl-2, +.gy-xxl-2 { + --bs-gutter-y: 0.5rem; + } + + .g-xxl-3, +.gx-xxl-3 { + --bs-gutter-x: 1rem; + } + + .g-xxl-3, +.gy-xxl-3 { + --bs-gutter-y: 1rem; + } + + .g-xxl-4, +.gx-xxl-4 { + --bs-gutter-x: 1.5rem; + } + + .g-xxl-4, +.gy-xxl-4 { + --bs-gutter-y: 1.5rem; + } + + .g-xxl-5, +.gx-xxl-5 { + --bs-gutter-x: 3rem; + } + + .g-xxl-5, +.gy-xxl-5 { + --bs-gutter-y: 3rem; + } +} +.d-inline { + display: inline !important; +} + +.d-inline-block { + display: inline-block !important; +} + +.d-block { + display: block !important; +} + +.d-grid { + display: grid !important; +} + +.d-table { + display: table !important; +} + +.d-table-row { + display: table-row !important; +} + +.d-table-cell { + display: table-cell !important; +} + +.d-flex { + display: flex !important; +} + +.d-inline-flex { + display: inline-flex !important; +} + +.d-none { + display: none !important; +} + +.flex-fill { + flex: 1 1 auto !important; +} + +.flex-row { + flex-direction: row !important; +} + +.flex-column { + flex-direction: column !important; +} + +.flex-row-reverse { + flex-direction: row-reverse !important; +} + +.flex-column-reverse { + flex-direction: column-reverse !important; +} + +.flex-grow-0 { + flex-grow: 0 !important; +} + +.flex-grow-1 { + flex-grow: 1 !important; +} + +.flex-shrink-0 { + flex-shrink: 0 !important; +} + +.flex-shrink-1 { + flex-shrink: 1 !important; +} + +.flex-wrap { + flex-wrap: wrap !important; +} + +.flex-nowrap { + flex-wrap: nowrap !important; +} + +.flex-wrap-reverse { + flex-wrap: wrap-reverse !important; +} + +.justify-content-start { + justify-content: flex-start !important; +} + +.justify-content-end { + justify-content: flex-end !important; +} + +.justify-content-center { + justify-content: center !important; +} + +.justify-content-between { + justify-content: space-between !important; +} + +.justify-content-around { + justify-content: space-around !important; +} + +.justify-content-evenly { + justify-content: space-evenly !important; +} + +.align-items-start { + align-items: flex-start !important; +} + +.align-items-end { + align-items: flex-end !important; +} + +.align-items-center { + align-items: center !important; +} + +.align-items-baseline { + align-items: baseline !important; +} + +.align-items-stretch { + align-items: stretch !important; +} + +.align-content-start { + align-content: flex-start !important; +} + +.align-content-end { + align-content: flex-end !important; +} + +.align-content-center { + align-content: center !important; +} + +.align-content-between { + align-content: space-between !important; +} + +.align-content-around { + align-content: space-around !important; +} + +.align-content-stretch { + align-content: stretch !important; +} + +.align-self-auto { + align-self: auto !important; +} + +.align-self-start { + align-self: flex-start !important; +} + +.align-self-end { + align-self: flex-end !important; +} + +.align-self-center { + align-self: center !important; +} + +.align-self-baseline { + align-self: baseline !important; +} + +.align-self-stretch { + align-self: stretch !important; +} + +.order-first { + order: -1 !important; +} + +.order-0 { + order: 0 !important; +} + +.order-1 { + order: 1 !important; +} + +.order-2 { + order: 2 !important; +} + +.order-3 { + order: 3 !important; +} + +.order-4 { + order: 4 !important; +} + +.order-5 { + order: 5 !important; +} + +.order-last { + order: 6 !important; +} + +.m-0 { + margin: 0 !important; +} + +.m-1 { + margin: 0.25rem !important; +} + +.m-2 { + margin: 0.5rem !important; +} + +.m-3 { + margin: 1rem !important; +} + +.m-4 { + margin: 1.5rem !important; +} + +.m-5 { + margin: 3rem !important; +} + +.m-auto { + margin: auto !important; +} + +.mx-0 { + margin-right: 0 !important; + margin-left: 0 !important; +} + +.mx-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; +} + +.mx-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; +} + +.mx-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; +} + +.mx-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; +} + +.mx-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; +} + +.mx-auto { + margin-right: auto !important; + margin-left: auto !important; +} + +.my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} + +.my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; +} + +.my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; +} + +.my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; +} + +.my-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; +} + +.my-auto { + margin-top: auto !important; + margin-bottom: auto !important; +} + +.mt-0 { + margin-top: 0 !important; +} + +.mt-1 { + margin-top: 0.25rem !important; +} + +.mt-2 { + margin-top: 0.5rem !important; +} + +.mt-3 { + margin-top: 1rem !important; +} + +.mt-4 { + margin-top: 1.5rem !important; +} + +.mt-5 { + margin-top: 3rem !important; +} + +.mt-auto { + margin-top: auto !important; +} + +.me-0 { + margin-right: 0 !important; +} + +.me-1 { + margin-right: 0.25rem !important; +} + +.me-2 { + margin-right: 0.5rem !important; +} + +.me-3 { + margin-right: 1rem !important; +} + +.me-4 { + margin-right: 1.5rem !important; +} + +.me-5 { + margin-right: 3rem !important; +} + +.me-auto { + margin-right: auto !important; +} + +.mb-0 { + margin-bottom: 0 !important; +} + +.mb-1 { + margin-bottom: 0.25rem !important; +} + +.mb-2 { + margin-bottom: 0.5rem !important; +} + +.mb-3 { + margin-bottom: 1rem !important; +} + +.mb-4 { + margin-bottom: 1.5rem !important; +} + +.mb-5 { + margin-bottom: 3rem !important; +} + +.mb-auto { + margin-bottom: auto !important; +} + +.ms-0 { + margin-left: 0 !important; +} + +.ms-1 { + margin-left: 0.25rem !important; +} + +.ms-2 { + margin-left: 0.5rem !important; +} + +.ms-3 { + margin-left: 1rem !important; +} + +.ms-4 { + margin-left: 1.5rem !important; +} + +.ms-5 { + margin-left: 3rem !important; +} + +.ms-auto { + margin-left: auto !important; +} + +.p-0 { + padding: 0 !important; +} + +.p-1 { + padding: 0.25rem !important; +} + +.p-2 { + padding: 0.5rem !important; +} + +.p-3 { + padding: 1rem !important; +} + +.p-4 { + padding: 1.5rem !important; +} + +.p-5 { + padding: 3rem !important; +} + +.px-0 { + padding-right: 0 !important; + padding-left: 0 !important; +} + +.px-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; +} + +.px-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; +} + +.px-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; +} + +.px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} + +.px-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; +} + +.py-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +.py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} + +.py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} + +.py-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; +} + +.py-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} + +.py-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; +} + +.pt-0 { + padding-top: 0 !important; +} + +.pt-1 { + padding-top: 0.25rem !important; +} + +.pt-2 { + padding-top: 0.5rem !important; +} + +.pt-3 { + padding-top: 1rem !important; +} + +.pt-4 { + padding-top: 1.5rem !important; +} + +.pt-5 { + padding-top: 3rem !important; +} + +.pe-0 { + padding-right: 0 !important; +} + +.pe-1 { + padding-right: 0.25rem !important; +} + +.pe-2 { + padding-right: 0.5rem !important; +} + +.pe-3 { + padding-right: 1rem !important; +} + +.pe-4 { + padding-right: 1.5rem !important; +} + +.pe-5 { + padding-right: 3rem !important; +} + +.pb-0 { + padding-bottom: 0 !important; +} + +.pb-1 { + padding-bottom: 0.25rem !important; +} + +.pb-2 { + padding-bottom: 0.5rem !important; +} + +.pb-3 { + padding-bottom: 1rem !important; +} + +.pb-4 { + padding-bottom: 1.5rem !important; +} + +.pb-5 { + padding-bottom: 3rem !important; +} + +.ps-0 { + padding-left: 0 !important; +} + +.ps-1 { + padding-left: 0.25rem !important; +} + +.ps-2 { + padding-left: 0.5rem !important; +} + +.ps-3 { + padding-left: 1rem !important; +} + +.ps-4 { + padding-left: 1.5rem !important; +} + +.ps-5 { + padding-left: 3rem !important; +} + +@media (min-width: 576px) { + .d-sm-inline { + display: inline !important; + } + + .d-sm-inline-block { + display: inline-block !important; + } + + .d-sm-block { + display: block !important; + } + + .d-sm-grid { + display: grid !important; + } + + .d-sm-table { + display: table !important; + } + + .d-sm-table-row { + display: table-row !important; + } + + .d-sm-table-cell { + display: table-cell !important; + } + + .d-sm-flex { + display: flex !important; + } + + .d-sm-inline-flex { + display: inline-flex !important; + } + + .d-sm-none { + display: none !important; + } + + .flex-sm-fill { + flex: 1 1 auto !important; + } + + .flex-sm-row { + flex-direction: row !important; + } + + .flex-sm-column { + flex-direction: column !important; + } + + .flex-sm-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-sm-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-sm-grow-0 { + flex-grow: 0 !important; + } + + .flex-sm-grow-1 { + flex-grow: 1 !important; + } + + .flex-sm-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-sm-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-sm-wrap { + flex-wrap: wrap !important; + } + + .flex-sm-nowrap { + flex-wrap: nowrap !important; + } + + .flex-sm-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-sm-start { + justify-content: flex-start !important; + } + + .justify-content-sm-end { + justify-content: flex-end !important; + } + + .justify-content-sm-center { + justify-content: center !important; + } + + .justify-content-sm-between { + justify-content: space-between !important; + } + + .justify-content-sm-around { + justify-content: space-around !important; + } + + .justify-content-sm-evenly { + justify-content: space-evenly !important; + } + + .align-items-sm-start { + align-items: flex-start !important; + } + + .align-items-sm-end { + align-items: flex-end !important; + } + + .align-items-sm-center { + align-items: center !important; + } + + .align-items-sm-baseline { + align-items: baseline !important; + } + + .align-items-sm-stretch { + align-items: stretch !important; + } + + .align-content-sm-start { + align-content: flex-start !important; + } + + .align-content-sm-end { + align-content: flex-end !important; + } + + .align-content-sm-center { + align-content: center !important; + } + + .align-content-sm-between { + align-content: space-between !important; + } + + .align-content-sm-around { + align-content: space-around !important; + } + + .align-content-sm-stretch { + align-content: stretch !important; + } + + .align-self-sm-auto { + align-self: auto !important; + } + + .align-self-sm-start { + align-self: flex-start !important; + } + + .align-self-sm-end { + align-self: flex-end !important; + } + + .align-self-sm-center { + align-self: center !important; + } + + .align-self-sm-baseline { + align-self: baseline !important; + } + + .align-self-sm-stretch { + align-self: stretch !important; + } + + .order-sm-first { + order: -1 !important; + } + + .order-sm-0 { + order: 0 !important; + } + + .order-sm-1 { + order: 1 !important; + } + + .order-sm-2 { + order: 2 !important; + } + + .order-sm-3 { + order: 3 !important; + } + + .order-sm-4 { + order: 4 !important; + } + + .order-sm-5 { + order: 5 !important; + } + + .order-sm-last { + order: 6 !important; + } + + .m-sm-0 { + margin: 0 !important; + } + + .m-sm-1 { + margin: 0.25rem !important; + } + + .m-sm-2 { + margin: 0.5rem !important; + } + + .m-sm-3 { + margin: 1rem !important; + } + + .m-sm-4 { + margin: 1.5rem !important; + } + + .m-sm-5 { + margin: 3rem !important; + } + + .m-sm-auto { + margin: auto !important; + } + + .mx-sm-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .mx-sm-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .mx-sm-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .mx-sm-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .mx-sm-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .mx-sm-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .mx-sm-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .my-sm-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-sm-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-sm-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-sm-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-sm-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-sm-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-sm-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-sm-0 { + margin-top: 0 !important; + } + + .mt-sm-1 { + margin-top: 0.25rem !important; + } + + .mt-sm-2 { + margin-top: 0.5rem !important; + } + + .mt-sm-3 { + margin-top: 1rem !important; + } + + .mt-sm-4 { + margin-top: 1.5rem !important; + } + + .mt-sm-5 { + margin-top: 3rem !important; + } + + .mt-sm-auto { + margin-top: auto !important; + } + + .me-sm-0 { + margin-right: 0 !important; + } + + .me-sm-1 { + margin-right: 0.25rem !important; + } + + .me-sm-2 { + margin-right: 0.5rem !important; + } + + .me-sm-3 { + margin-right: 1rem !important; + } + + .me-sm-4 { + margin-right: 1.5rem !important; + } + + .me-sm-5 { + margin-right: 3rem !important; + } + + .me-sm-auto { + margin-right: auto !important; + } + + .mb-sm-0 { + margin-bottom: 0 !important; + } + + .mb-sm-1 { + margin-bottom: 0.25rem !important; + } + + .mb-sm-2 { + margin-bottom: 0.5rem !important; + } + + .mb-sm-3 { + margin-bottom: 1rem !important; + } + + .mb-sm-4 { + margin-bottom: 1.5rem !important; + } + + .mb-sm-5 { + margin-bottom: 3rem !important; + } + + .mb-sm-auto { + margin-bottom: auto !important; + } + + .ms-sm-0 { + margin-left: 0 !important; + } + + .ms-sm-1 { + margin-left: 0.25rem !important; + } + + .ms-sm-2 { + margin-left: 0.5rem !important; + } + + .ms-sm-3 { + margin-left: 1rem !important; + } + + .ms-sm-4 { + margin-left: 1.5rem !important; + } + + .ms-sm-5 { + margin-left: 3rem !important; + } + + .ms-sm-auto { + margin-left: auto !important; + } + + .p-sm-0 { + padding: 0 !important; + } + + .p-sm-1 { + padding: 0.25rem !important; + } + + .p-sm-2 { + padding: 0.5rem !important; + } + + .p-sm-3 { + padding: 1rem !important; + } + + .p-sm-4 { + padding: 1.5rem !important; + } + + .p-sm-5 { + padding: 3rem !important; + } + + .px-sm-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .px-sm-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .px-sm-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .px-sm-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .px-sm-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .px-sm-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .py-sm-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-sm-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-sm-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-sm-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-sm-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-sm-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-sm-0 { + padding-top: 0 !important; + } + + .pt-sm-1 { + padding-top: 0.25rem !important; + } + + .pt-sm-2 { + padding-top: 0.5rem !important; + } + + .pt-sm-3 { + padding-top: 1rem !important; + } + + .pt-sm-4 { + padding-top: 1.5rem !important; + } + + .pt-sm-5 { + padding-top: 3rem !important; + } + + .pe-sm-0 { + padding-right: 0 !important; + } + + .pe-sm-1 { + padding-right: 0.25rem !important; + } + + .pe-sm-2 { + padding-right: 0.5rem !important; + } + + .pe-sm-3 { + padding-right: 1rem !important; + } + + .pe-sm-4 { + padding-right: 1.5rem !important; + } + + .pe-sm-5 { + padding-right: 3rem !important; + } + + .pb-sm-0 { + padding-bottom: 0 !important; + } + + .pb-sm-1 { + padding-bottom: 0.25rem !important; + } + + .pb-sm-2 { + padding-bottom: 0.5rem !important; + } + + .pb-sm-3 { + padding-bottom: 1rem !important; + } + + .pb-sm-4 { + padding-bottom: 1.5rem !important; + } + + .pb-sm-5 { + padding-bottom: 3rem !important; + } + + .ps-sm-0 { + padding-left: 0 !important; + } + + .ps-sm-1 { + padding-left: 0.25rem !important; + } + + .ps-sm-2 { + padding-left: 0.5rem !important; + } + + .ps-sm-3 { + padding-left: 1rem !important; + } + + .ps-sm-4 { + padding-left: 1.5rem !important; + } + + .ps-sm-5 { + padding-left: 3rem !important; + } +} +@media (min-width: 768px) { + .d-md-inline { + display: inline !important; + } + + .d-md-inline-block { + display: inline-block !important; + } + + .d-md-block { + display: block !important; + } + + .d-md-grid { + display: grid !important; + } + + .d-md-table { + display: table !important; + } + + .d-md-table-row { + display: table-row !important; + } + + .d-md-table-cell { + display: table-cell !important; + } + + .d-md-flex { + display: flex !important; + } + + .d-md-inline-flex { + display: inline-flex !important; + } + + .d-md-none { + display: none !important; + } + + .flex-md-fill { + flex: 1 1 auto !important; + } + + .flex-md-row { + flex-direction: row !important; + } + + .flex-md-column { + flex-direction: column !important; + } + + .flex-md-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-md-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-md-grow-0 { + flex-grow: 0 !important; + } + + .flex-md-grow-1 { + flex-grow: 1 !important; + } + + .flex-md-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-md-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-md-wrap { + flex-wrap: wrap !important; + } + + .flex-md-nowrap { + flex-wrap: nowrap !important; + } + + .flex-md-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-md-start { + justify-content: flex-start !important; + } + + .justify-content-md-end { + justify-content: flex-end !important; + } + + .justify-content-md-center { + justify-content: center !important; + } + + .justify-content-md-between { + justify-content: space-between !important; + } + + .justify-content-md-around { + justify-content: space-around !important; + } + + .justify-content-md-evenly { + justify-content: space-evenly !important; + } + + .align-items-md-start { + align-items: flex-start !important; + } + + .align-items-md-end { + align-items: flex-end !important; + } + + .align-items-md-center { + align-items: center !important; + } + + .align-items-md-baseline { + align-items: baseline !important; + } + + .align-items-md-stretch { + align-items: stretch !important; + } + + .align-content-md-start { + align-content: flex-start !important; + } + + .align-content-md-end { + align-content: flex-end !important; + } + + .align-content-md-center { + align-content: center !important; + } + + .align-content-md-between { + align-content: space-between !important; + } + + .align-content-md-around { + align-content: space-around !important; + } + + .align-content-md-stretch { + align-content: stretch !important; + } + + .align-self-md-auto { + align-self: auto !important; + } + + .align-self-md-start { + align-self: flex-start !important; + } + + .align-self-md-end { + align-self: flex-end !important; + } + + .align-self-md-center { + align-self: center !important; + } + + .align-self-md-baseline { + align-self: baseline !important; + } + + .align-self-md-stretch { + align-self: stretch !important; + } + + .order-md-first { + order: -1 !important; + } + + .order-md-0 { + order: 0 !important; + } + + .order-md-1 { + order: 1 !important; + } + + .order-md-2 { + order: 2 !important; + } + + .order-md-3 { + order: 3 !important; + } + + .order-md-4 { + order: 4 !important; + } + + .order-md-5 { + order: 5 !important; + } + + .order-md-last { + order: 6 !important; + } + + .m-md-0 { + margin: 0 !important; + } + + .m-md-1 { + margin: 0.25rem !important; + } + + .m-md-2 { + margin: 0.5rem !important; + } + + .m-md-3 { + margin: 1rem !important; + } + + .m-md-4 { + margin: 1.5rem !important; + } + + .m-md-5 { + margin: 3rem !important; + } + + .m-md-auto { + margin: auto !important; + } + + .mx-md-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .mx-md-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .mx-md-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .mx-md-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .mx-md-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .mx-md-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .mx-md-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .my-md-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-md-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-md-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-md-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-md-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-md-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-md-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-md-0 { + margin-top: 0 !important; + } + + .mt-md-1 { + margin-top: 0.25rem !important; + } + + .mt-md-2 { + margin-top: 0.5rem !important; + } + + .mt-md-3 { + margin-top: 1rem !important; + } + + .mt-md-4 { + margin-top: 1.5rem !important; + } + + .mt-md-5 { + margin-top: 3rem !important; + } + + .mt-md-auto { + margin-top: auto !important; + } + + .me-md-0 { + margin-right: 0 !important; + } + + .me-md-1 { + margin-right: 0.25rem !important; + } + + .me-md-2 { + margin-right: 0.5rem !important; + } + + .me-md-3 { + margin-right: 1rem !important; + } + + .me-md-4 { + margin-right: 1.5rem !important; + } + + .me-md-5 { + margin-right: 3rem !important; + } + + .me-md-auto { + margin-right: auto !important; + } + + .mb-md-0 { + margin-bottom: 0 !important; + } + + .mb-md-1 { + margin-bottom: 0.25rem !important; + } + + .mb-md-2 { + margin-bottom: 0.5rem !important; + } + + .mb-md-3 { + margin-bottom: 1rem !important; + } + + .mb-md-4 { + margin-bottom: 1.5rem !important; + } + + .mb-md-5 { + margin-bottom: 3rem !important; + } + + .mb-md-auto { + margin-bottom: auto !important; + } + + .ms-md-0 { + margin-left: 0 !important; + } + + .ms-md-1 { + margin-left: 0.25rem !important; + } + + .ms-md-2 { + margin-left: 0.5rem !important; + } + + .ms-md-3 { + margin-left: 1rem !important; + } + + .ms-md-4 { + margin-left: 1.5rem !important; + } + + .ms-md-5 { + margin-left: 3rem !important; + } + + .ms-md-auto { + margin-left: auto !important; + } + + .p-md-0 { + padding: 0 !important; + } + + .p-md-1 { + padding: 0.25rem !important; + } + + .p-md-2 { + padding: 0.5rem !important; + } + + .p-md-3 { + padding: 1rem !important; + } + + .p-md-4 { + padding: 1.5rem !important; + } + + .p-md-5 { + padding: 3rem !important; + } + + .px-md-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .px-md-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .px-md-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .px-md-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .px-md-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .px-md-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .py-md-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-md-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-md-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-md-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-md-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-md-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-md-0 { + padding-top: 0 !important; + } + + .pt-md-1 { + padding-top: 0.25rem !important; + } + + .pt-md-2 { + padding-top: 0.5rem !important; + } + + .pt-md-3 { + padding-top: 1rem !important; + } + + .pt-md-4 { + padding-top: 1.5rem !important; + } + + .pt-md-5 { + padding-top: 3rem !important; + } + + .pe-md-0 { + padding-right: 0 !important; + } + + .pe-md-1 { + padding-right: 0.25rem !important; + } + + .pe-md-2 { + padding-right: 0.5rem !important; + } + + .pe-md-3 { + padding-right: 1rem !important; + } + + .pe-md-4 { + padding-right: 1.5rem !important; + } + + .pe-md-5 { + padding-right: 3rem !important; + } + + .pb-md-0 { + padding-bottom: 0 !important; + } + + .pb-md-1 { + padding-bottom: 0.25rem !important; + } + + .pb-md-2 { + padding-bottom: 0.5rem !important; + } + + .pb-md-3 { + padding-bottom: 1rem !important; + } + + .pb-md-4 { + padding-bottom: 1.5rem !important; + } + + .pb-md-5 { + padding-bottom: 3rem !important; + } + + .ps-md-0 { + padding-left: 0 !important; + } + + .ps-md-1 { + padding-left: 0.25rem !important; + } + + .ps-md-2 { + padding-left: 0.5rem !important; + } + + .ps-md-3 { + padding-left: 1rem !important; + } + + .ps-md-4 { + padding-left: 1.5rem !important; + } + + .ps-md-5 { + padding-left: 3rem !important; + } +} +@media (min-width: 992px) { + .d-lg-inline { + display: inline !important; + } + + .d-lg-inline-block { + display: inline-block !important; + } + + .d-lg-block { + display: block !important; + } + + .d-lg-grid { + display: grid !important; + } + + .d-lg-table { + display: table !important; + } + + .d-lg-table-row { + display: table-row !important; + } + + .d-lg-table-cell { + display: table-cell !important; + } + + .d-lg-flex { + display: flex !important; + } + + .d-lg-inline-flex { + display: inline-flex !important; + } + + .d-lg-none { + display: none !important; + } + + .flex-lg-fill { + flex: 1 1 auto !important; + } + + .flex-lg-row { + flex-direction: row !important; + } + + .flex-lg-column { + flex-direction: column !important; + } + + .flex-lg-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-lg-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-lg-grow-0 { + flex-grow: 0 !important; + } + + .flex-lg-grow-1 { + flex-grow: 1 !important; + } + + .flex-lg-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-lg-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-lg-wrap { + flex-wrap: wrap !important; + } + + .flex-lg-nowrap { + flex-wrap: nowrap !important; + } + + .flex-lg-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-lg-start { + justify-content: flex-start !important; + } + + .justify-content-lg-end { + justify-content: flex-end !important; + } + + .justify-content-lg-center { + justify-content: center !important; + } + + .justify-content-lg-between { + justify-content: space-between !important; + } + + .justify-content-lg-around { + justify-content: space-around !important; + } + + .justify-content-lg-evenly { + justify-content: space-evenly !important; + } + + .align-items-lg-start { + align-items: flex-start !important; + } + + .align-items-lg-end { + align-items: flex-end !important; + } + + .align-items-lg-center { + align-items: center !important; + } + + .align-items-lg-baseline { + align-items: baseline !important; + } + + .align-items-lg-stretch { + align-items: stretch !important; + } + + .align-content-lg-start { + align-content: flex-start !important; + } + + .align-content-lg-end { + align-content: flex-end !important; + } + + .align-content-lg-center { + align-content: center !important; + } + + .align-content-lg-between { + align-content: space-between !important; + } + + .align-content-lg-around { + align-content: space-around !important; + } + + .align-content-lg-stretch { + align-content: stretch !important; + } + + .align-self-lg-auto { + align-self: auto !important; + } + + .align-self-lg-start { + align-self: flex-start !important; + } + + .align-self-lg-end { + align-self: flex-end !important; + } + + .align-self-lg-center { + align-self: center !important; + } + + .align-self-lg-baseline { + align-self: baseline !important; + } + + .align-self-lg-stretch { + align-self: stretch !important; + } + + .order-lg-first { + order: -1 !important; + } + + .order-lg-0 { + order: 0 !important; + } + + .order-lg-1 { + order: 1 !important; + } + + .order-lg-2 { + order: 2 !important; + } + + .order-lg-3 { + order: 3 !important; + } + + .order-lg-4 { + order: 4 !important; + } + + .order-lg-5 { + order: 5 !important; + } + + .order-lg-last { + order: 6 !important; + } + + .m-lg-0 { + margin: 0 !important; + } + + .m-lg-1 { + margin: 0.25rem !important; + } + + .m-lg-2 { + margin: 0.5rem !important; + } + + .m-lg-3 { + margin: 1rem !important; + } + + .m-lg-4 { + margin: 1.5rem !important; + } + + .m-lg-5 { + margin: 3rem !important; + } + + .m-lg-auto { + margin: auto !important; + } + + .mx-lg-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .mx-lg-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .mx-lg-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .mx-lg-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .mx-lg-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .mx-lg-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .mx-lg-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .my-lg-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-lg-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-lg-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-lg-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-lg-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-lg-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-lg-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-lg-0 { + margin-top: 0 !important; + } + + .mt-lg-1 { + margin-top: 0.25rem !important; + } + + .mt-lg-2 { + margin-top: 0.5rem !important; + } + + .mt-lg-3 { + margin-top: 1rem !important; + } + + .mt-lg-4 { + margin-top: 1.5rem !important; + } + + .mt-lg-5 { + margin-top: 3rem !important; + } + + .mt-lg-auto { + margin-top: auto !important; + } + + .me-lg-0 { + margin-right: 0 !important; + } + + .me-lg-1 { + margin-right: 0.25rem !important; + } + + .me-lg-2 { + margin-right: 0.5rem !important; + } + + .me-lg-3 { + margin-right: 1rem !important; + } + + .me-lg-4 { + margin-right: 1.5rem !important; + } + + .me-lg-5 { + margin-right: 3rem !important; + } + + .me-lg-auto { + margin-right: auto !important; + } + + .mb-lg-0 { + margin-bottom: 0 !important; + } + + .mb-lg-1 { + margin-bottom: 0.25rem !important; + } + + .mb-lg-2 { + margin-bottom: 0.5rem !important; + } + + .mb-lg-3 { + margin-bottom: 1rem !important; + } + + .mb-lg-4 { + margin-bottom: 1.5rem !important; + } + + .mb-lg-5 { + margin-bottom: 3rem !important; + } + + .mb-lg-auto { + margin-bottom: auto !important; + } + + .ms-lg-0 { + margin-left: 0 !important; + } + + .ms-lg-1 { + margin-left: 0.25rem !important; + } + + .ms-lg-2 { + margin-left: 0.5rem !important; + } + + .ms-lg-3 { + margin-left: 1rem !important; + } + + .ms-lg-4 { + margin-left: 1.5rem !important; + } + + .ms-lg-5 { + margin-left: 3rem !important; + } + + .ms-lg-auto { + margin-left: auto !important; + } + + .p-lg-0 { + padding: 0 !important; + } + + .p-lg-1 { + padding: 0.25rem !important; + } + + .p-lg-2 { + padding: 0.5rem !important; + } + + .p-lg-3 { + padding: 1rem !important; + } + + .p-lg-4 { + padding: 1.5rem !important; + } + + .p-lg-5 { + padding: 3rem !important; + } + + .px-lg-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .px-lg-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .px-lg-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .px-lg-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .px-lg-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .px-lg-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .py-lg-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-lg-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-lg-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-lg-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-lg-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-lg-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-lg-0 { + padding-top: 0 !important; + } + + .pt-lg-1 { + padding-top: 0.25rem !important; + } + + .pt-lg-2 { + padding-top: 0.5rem !important; + } + + .pt-lg-3 { + padding-top: 1rem !important; + } + + .pt-lg-4 { + padding-top: 1.5rem !important; + } + + .pt-lg-5 { + padding-top: 3rem !important; + } + + .pe-lg-0 { + padding-right: 0 !important; + } + + .pe-lg-1 { + padding-right: 0.25rem !important; + } + + .pe-lg-2 { + padding-right: 0.5rem !important; + } + + .pe-lg-3 { + padding-right: 1rem !important; + } + + .pe-lg-4 { + padding-right: 1.5rem !important; + } + + .pe-lg-5 { + padding-right: 3rem !important; + } + + .pb-lg-0 { + padding-bottom: 0 !important; + } + + .pb-lg-1 { + padding-bottom: 0.25rem !important; + } + + .pb-lg-2 { + padding-bottom: 0.5rem !important; + } + + .pb-lg-3 { + padding-bottom: 1rem !important; + } + + .pb-lg-4 { + padding-bottom: 1.5rem !important; + } + + .pb-lg-5 { + padding-bottom: 3rem !important; + } + + .ps-lg-0 { + padding-left: 0 !important; + } + + .ps-lg-1 { + padding-left: 0.25rem !important; + } + + .ps-lg-2 { + padding-left: 0.5rem !important; + } + + .ps-lg-3 { + padding-left: 1rem !important; + } + + .ps-lg-4 { + padding-left: 1.5rem !important; + } + + .ps-lg-5 { + padding-left: 3rem !important; + } +} +@media (min-width: 1200px) { + .d-xl-inline { + display: inline !important; + } + + .d-xl-inline-block { + display: inline-block !important; + } + + .d-xl-block { + display: block !important; + } + + .d-xl-grid { + display: grid !important; + } + + .d-xl-table { + display: table !important; + } + + .d-xl-table-row { + display: table-row !important; + } + + .d-xl-table-cell { + display: table-cell !important; + } + + .d-xl-flex { + display: flex !important; + } + + .d-xl-inline-flex { + display: inline-flex !important; + } + + .d-xl-none { + display: none !important; + } + + .flex-xl-fill { + flex: 1 1 auto !important; + } + + .flex-xl-row { + flex-direction: row !important; + } + + .flex-xl-column { + flex-direction: column !important; + } + + .flex-xl-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-xl-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-xl-grow-0 { + flex-grow: 0 !important; + } + + .flex-xl-grow-1 { + flex-grow: 1 !important; + } + + .flex-xl-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-xl-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-xl-wrap { + flex-wrap: wrap !important; + } + + .flex-xl-nowrap { + flex-wrap: nowrap !important; + } + + .flex-xl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-xl-start { + justify-content: flex-start !important; + } + + .justify-content-xl-end { + justify-content: flex-end !important; + } + + .justify-content-xl-center { + justify-content: center !important; + } + + .justify-content-xl-between { + justify-content: space-between !important; + } + + .justify-content-xl-around { + justify-content: space-around !important; + } + + .justify-content-xl-evenly { + justify-content: space-evenly !important; + } + + .align-items-xl-start { + align-items: flex-start !important; + } + + .align-items-xl-end { + align-items: flex-end !important; + } + + .align-items-xl-center { + align-items: center !important; + } + + .align-items-xl-baseline { + align-items: baseline !important; + } + + .align-items-xl-stretch { + align-items: stretch !important; + } + + .align-content-xl-start { + align-content: flex-start !important; + } + + .align-content-xl-end { + align-content: flex-end !important; + } + + .align-content-xl-center { + align-content: center !important; + } + + .align-content-xl-between { + align-content: space-between !important; + } + + .align-content-xl-around { + align-content: space-around !important; + } + + .align-content-xl-stretch { + align-content: stretch !important; + } + + .align-self-xl-auto { + align-self: auto !important; + } + + .align-self-xl-start { + align-self: flex-start !important; + } + + .align-self-xl-end { + align-self: flex-end !important; + } + + .align-self-xl-center { + align-self: center !important; + } + + .align-self-xl-baseline { + align-self: baseline !important; + } + + .align-self-xl-stretch { + align-self: stretch !important; + } + + .order-xl-first { + order: -1 !important; + } + + .order-xl-0 { + order: 0 !important; + } + + .order-xl-1 { + order: 1 !important; + } + + .order-xl-2 { + order: 2 !important; + } + + .order-xl-3 { + order: 3 !important; + } + + .order-xl-4 { + order: 4 !important; + } + + .order-xl-5 { + order: 5 !important; + } + + .order-xl-last { + order: 6 !important; + } + + .m-xl-0 { + margin: 0 !important; + } + + .m-xl-1 { + margin: 0.25rem !important; + } + + .m-xl-2 { + margin: 0.5rem !important; + } + + .m-xl-3 { + margin: 1rem !important; + } + + .m-xl-4 { + margin: 1.5rem !important; + } + + .m-xl-5 { + margin: 3rem !important; + } + + .m-xl-auto { + margin: auto !important; + } + + .mx-xl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .mx-xl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .mx-xl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .mx-xl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .mx-xl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .mx-xl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .mx-xl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .my-xl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-xl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-xl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-xl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-xl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-xl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-xl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-xl-0 { + margin-top: 0 !important; + } + + .mt-xl-1 { + margin-top: 0.25rem !important; + } + + .mt-xl-2 { + margin-top: 0.5rem !important; + } + + .mt-xl-3 { + margin-top: 1rem !important; + } + + .mt-xl-4 { + margin-top: 1.5rem !important; + } + + .mt-xl-5 { + margin-top: 3rem !important; + } + + .mt-xl-auto { + margin-top: auto !important; + } + + .me-xl-0 { + margin-right: 0 !important; + } + + .me-xl-1 { + margin-right: 0.25rem !important; + } + + .me-xl-2 { + margin-right: 0.5rem !important; + } + + .me-xl-3 { + margin-right: 1rem !important; + } + + .me-xl-4 { + margin-right: 1.5rem !important; + } + + .me-xl-5 { + margin-right: 3rem !important; + } + + .me-xl-auto { + margin-right: auto !important; + } + + .mb-xl-0 { + margin-bottom: 0 !important; + } + + .mb-xl-1 { + margin-bottom: 0.25rem !important; + } + + .mb-xl-2 { + margin-bottom: 0.5rem !important; + } + + .mb-xl-3 { + margin-bottom: 1rem !important; + } + + .mb-xl-4 { + margin-bottom: 1.5rem !important; + } + + .mb-xl-5 { + margin-bottom: 3rem !important; + } + + .mb-xl-auto { + margin-bottom: auto !important; + } + + .ms-xl-0 { + margin-left: 0 !important; + } + + .ms-xl-1 { + margin-left: 0.25rem !important; + } + + .ms-xl-2 { + margin-left: 0.5rem !important; + } + + .ms-xl-3 { + margin-left: 1rem !important; + } + + .ms-xl-4 { + margin-left: 1.5rem !important; + } + + .ms-xl-5 { + margin-left: 3rem !important; + } + + .ms-xl-auto { + margin-left: auto !important; + } + + .p-xl-0 { + padding: 0 !important; + } + + .p-xl-1 { + padding: 0.25rem !important; + } + + .p-xl-2 { + padding: 0.5rem !important; + } + + .p-xl-3 { + padding: 1rem !important; + } + + .p-xl-4 { + padding: 1.5rem !important; + } + + .p-xl-5 { + padding: 3rem !important; + } + + .px-xl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .px-xl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .px-xl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .px-xl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .px-xl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .px-xl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .py-xl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-xl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-xl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-xl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-xl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-xl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-xl-0 { + padding-top: 0 !important; + } + + .pt-xl-1 { + padding-top: 0.25rem !important; + } + + .pt-xl-2 { + padding-top: 0.5rem !important; + } + + .pt-xl-3 { + padding-top: 1rem !important; + } + + .pt-xl-4 { + padding-top: 1.5rem !important; + } + + .pt-xl-5 { + padding-top: 3rem !important; + } + + .pe-xl-0 { + padding-right: 0 !important; + } + + .pe-xl-1 { + padding-right: 0.25rem !important; + } + + .pe-xl-2 { + padding-right: 0.5rem !important; + } + + .pe-xl-3 { + padding-right: 1rem !important; + } + + .pe-xl-4 { + padding-right: 1.5rem !important; + } + + .pe-xl-5 { + padding-right: 3rem !important; + } + + .pb-xl-0 { + padding-bottom: 0 !important; + } + + .pb-xl-1 { + padding-bottom: 0.25rem !important; + } + + .pb-xl-2 { + padding-bottom: 0.5rem !important; + } + + .pb-xl-3 { + padding-bottom: 1rem !important; + } + + .pb-xl-4 { + padding-bottom: 1.5rem !important; + } + + .pb-xl-5 { + padding-bottom: 3rem !important; + } + + .ps-xl-0 { + padding-left: 0 !important; + } + + .ps-xl-1 { + padding-left: 0.25rem !important; + } + + .ps-xl-2 { + padding-left: 0.5rem !important; + } + + .ps-xl-3 { + padding-left: 1rem !important; + } + + .ps-xl-4 { + padding-left: 1.5rem !important; + } + + .ps-xl-5 { + padding-left: 3rem !important; + } +} +@media (min-width: 1400px) { + .d-xxl-inline { + display: inline !important; + } + + .d-xxl-inline-block { + display: inline-block !important; + } + + .d-xxl-block { + display: block !important; + } + + .d-xxl-grid { + display: grid !important; + } + + .d-xxl-table { + display: table !important; + } + + .d-xxl-table-row { + display: table-row !important; + } + + .d-xxl-table-cell { + display: table-cell !important; + } + + .d-xxl-flex { + display: flex !important; + } + + .d-xxl-inline-flex { + display: inline-flex !important; + } + + .d-xxl-none { + display: none !important; + } + + .flex-xxl-fill { + flex: 1 1 auto !important; + } + + .flex-xxl-row { + flex-direction: row !important; + } + + .flex-xxl-column { + flex-direction: column !important; + } + + .flex-xxl-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-xxl-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-xxl-grow-0 { + flex-grow: 0 !important; + } + + .flex-xxl-grow-1 { + flex-grow: 1 !important; + } + + .flex-xxl-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-xxl-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-xxl-wrap { + flex-wrap: wrap !important; + } + + .flex-xxl-nowrap { + flex-wrap: nowrap !important; + } + + .flex-xxl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-xxl-start { + justify-content: flex-start !important; + } + + .justify-content-xxl-end { + justify-content: flex-end !important; + } + + .justify-content-xxl-center { + justify-content: center !important; + } + + .justify-content-xxl-between { + justify-content: space-between !important; + } + + .justify-content-xxl-around { + justify-content: space-around !important; + } + + .justify-content-xxl-evenly { + justify-content: space-evenly !important; + } + + .align-items-xxl-start { + align-items: flex-start !important; + } + + .align-items-xxl-end { + align-items: flex-end !important; + } + + .align-items-xxl-center { + align-items: center !important; + } + + .align-items-xxl-baseline { + align-items: baseline !important; + } + + .align-items-xxl-stretch { + align-items: stretch !important; + } + + .align-content-xxl-start { + align-content: flex-start !important; + } + + .align-content-xxl-end { + align-content: flex-end !important; + } + + .align-content-xxl-center { + align-content: center !important; + } + + .align-content-xxl-between { + align-content: space-between !important; + } + + .align-content-xxl-around { + align-content: space-around !important; + } + + .align-content-xxl-stretch { + align-content: stretch !important; + } + + .align-self-xxl-auto { + align-self: auto !important; + } + + .align-self-xxl-start { + align-self: flex-start !important; + } + + .align-self-xxl-end { + align-self: flex-end !important; + } + + .align-self-xxl-center { + align-self: center !important; + } + + .align-self-xxl-baseline { + align-self: baseline !important; + } + + .align-self-xxl-stretch { + align-self: stretch !important; + } + + .order-xxl-first { + order: -1 !important; + } + + .order-xxl-0 { + order: 0 !important; + } + + .order-xxl-1 { + order: 1 !important; + } + + .order-xxl-2 { + order: 2 !important; + } + + .order-xxl-3 { + order: 3 !important; + } + + .order-xxl-4 { + order: 4 !important; + } + + .order-xxl-5 { + order: 5 !important; + } + + .order-xxl-last { + order: 6 !important; + } + + .m-xxl-0 { + margin: 0 !important; + } + + .m-xxl-1 { + margin: 0.25rem !important; + } + + .m-xxl-2 { + margin: 0.5rem !important; + } + + .m-xxl-3 { + margin: 1rem !important; + } + + .m-xxl-4 { + margin: 1.5rem !important; + } + + .m-xxl-5 { + margin: 3rem !important; + } + + .m-xxl-auto { + margin: auto !important; + } + + .mx-xxl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .mx-xxl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .mx-xxl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .mx-xxl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .mx-xxl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .mx-xxl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .mx-xxl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .my-xxl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-xxl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-xxl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-xxl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-xxl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-xxl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-xxl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-xxl-0 { + margin-top: 0 !important; + } + + .mt-xxl-1 { + margin-top: 0.25rem !important; + } + + .mt-xxl-2 { + margin-top: 0.5rem !important; + } + + .mt-xxl-3 { + margin-top: 1rem !important; + } + + .mt-xxl-4 { + margin-top: 1.5rem !important; + } + + .mt-xxl-5 { + margin-top: 3rem !important; + } + + .mt-xxl-auto { + margin-top: auto !important; + } + + .me-xxl-0 { + margin-right: 0 !important; + } + + .me-xxl-1 { + margin-right: 0.25rem !important; + } + + .me-xxl-2 { + margin-right: 0.5rem !important; + } + + .me-xxl-3 { + margin-right: 1rem !important; + } + + .me-xxl-4 { + margin-right: 1.5rem !important; + } + + .me-xxl-5 { + margin-right: 3rem !important; + } + + .me-xxl-auto { + margin-right: auto !important; + } + + .mb-xxl-0 { + margin-bottom: 0 !important; + } + + .mb-xxl-1 { + margin-bottom: 0.25rem !important; + } + + .mb-xxl-2 { + margin-bottom: 0.5rem !important; + } + + .mb-xxl-3 { + margin-bottom: 1rem !important; + } + + .mb-xxl-4 { + margin-bottom: 1.5rem !important; + } + + .mb-xxl-5 { + margin-bottom: 3rem !important; + } + + .mb-xxl-auto { + margin-bottom: auto !important; + } + + .ms-xxl-0 { + margin-left: 0 !important; + } + + .ms-xxl-1 { + margin-left: 0.25rem !important; + } + + .ms-xxl-2 { + margin-left: 0.5rem !important; + } + + .ms-xxl-3 { + margin-left: 1rem !important; + } + + .ms-xxl-4 { + margin-left: 1.5rem !important; + } + + .ms-xxl-5 { + margin-left: 3rem !important; + } + + .ms-xxl-auto { + margin-left: auto !important; + } + + .p-xxl-0 { + padding: 0 !important; + } + + .p-xxl-1 { + padding: 0.25rem !important; + } + + .p-xxl-2 { + padding: 0.5rem !important; + } + + .p-xxl-3 { + padding: 1rem !important; + } + + .p-xxl-4 { + padding: 1.5rem !important; + } + + .p-xxl-5 { + padding: 3rem !important; + } + + .px-xxl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .px-xxl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .px-xxl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .px-xxl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .px-xxl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .px-xxl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .py-xxl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-xxl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-xxl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-xxl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-xxl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-xxl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-xxl-0 { + padding-top: 0 !important; + } + + .pt-xxl-1 { + padding-top: 0.25rem !important; + } + + .pt-xxl-2 { + padding-top: 0.5rem !important; + } + + .pt-xxl-3 { + padding-top: 1rem !important; + } + + .pt-xxl-4 { + padding-top: 1.5rem !important; + } + + .pt-xxl-5 { + padding-top: 3rem !important; + } + + .pe-xxl-0 { + padding-right: 0 !important; + } + + .pe-xxl-1 { + padding-right: 0.25rem !important; + } + + .pe-xxl-2 { + padding-right: 0.5rem !important; + } + + .pe-xxl-3 { + padding-right: 1rem !important; + } + + .pe-xxl-4 { + padding-right: 1.5rem !important; + } + + .pe-xxl-5 { + padding-right: 3rem !important; + } + + .pb-xxl-0 { + padding-bottom: 0 !important; + } + + .pb-xxl-1 { + padding-bottom: 0.25rem !important; + } + + .pb-xxl-2 { + padding-bottom: 0.5rem !important; + } + + .pb-xxl-3 { + padding-bottom: 1rem !important; + } + + .pb-xxl-4 { + padding-bottom: 1.5rem !important; + } + + .pb-xxl-5 { + padding-bottom: 3rem !important; + } + + .ps-xxl-0 { + padding-left: 0 !important; + } + + .ps-xxl-1 { + padding-left: 0.25rem !important; + } + + .ps-xxl-2 { + padding-left: 0.5rem !important; + } + + .ps-xxl-3 { + padding-left: 1rem !important; + } + + .ps-xxl-4 { + padding-left: 1.5rem !important; + } + + .ps-xxl-5 { + padding-left: 3rem !important; + } +} +@media print { + .d-print-inline { + display: inline !important; + } + + .d-print-inline-block { + display: inline-block !important; + } + + .d-print-block { + display: block !important; + } + + .d-print-grid { + display: grid !important; + } + + .d-print-table { + display: table !important; + } + + .d-print-table-row { + display: table-row !important; + } + + .d-print-table-cell { + display: table-cell !important; + } + + .d-print-flex { + display: flex !important; + } + + .d-print-inline-flex { + display: inline-flex !important; + } + + .d-print-none { + display: none !important; + } +} + +/*# sourceMappingURL=bootstrap-grid.css.map */ \ No newline at end of file diff --git a/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map new file mode 100644 index 0000000..c006d39 --- /dev/null +++ b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/bootstrap-grid.scss","../../scss/_containers.scss","../../scss/mixins/_container.scss","bootstrap-grid.css","../../scss/mixins/_breakpoints.scss","../../scss/_variables.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AAAA;;;;;EAAA;ACME;;;;;;;ECHA,WAAA;EACA,0CAAA;EACA,yCAAA;EACA,kBAAA;EACA,iBAAA;ACWF;;AC6CI;EH5CE;IACE,gBIuce;EFpcrB;AACF;ACuCI;EH5CE;IACE,gBIuce;EF/brB;AACF;ACkCI;EH5CE;IACE,gBIuce;EF1brB;AACF;AC6BI;EH5CE;IACE,iBIuce;EFrbrB;AACF;ACwBI;EH5CE;IACE,iBIuce;EFhbrB;AACF;AGvCE;ECAA,qBAAA;EACA,gBAAA;EACA,aAAA;EACA,eAAA;EACA,yCAAA;EACA,4CAAA;EACA,2CAAA;AJ0CF;AG7CI;ECQF,sBAAA;EAIA,cAAA;EACA,WAAA;EACA,eAAA;EACA,4CAAA;EACA,2CAAA;EACA,8BAAA;AJqCF;;AIUM;EACE,YAAA;AJPR;;AIUM;EApCJ,cAAA;EACA,WAAA;AJ8BF;;AIhBE;EACE,cAAA;EACA,WAAA;AJmBJ;;AIrBE;EACE,cAAA;EACA,UAAA;AJwBJ;;AI1BE;EACE,cAAA;EACA,qBAAA;AJ6BJ;;AI/BE;EACE,cAAA;EACA,UAAA;AJkCJ;;AIpCE;EACE,cAAA;EACA,UAAA;AJuCJ;;AIzCE;EACE,cAAA;EACA,qBAAA;AJ4CJ;;AIbM;EAhDJ,cAAA;EACA,WAAA;AJiEF;;AIZU;EAhEN,cAAA;EACA,kBAAA;AJgFJ;;AIjBU;EAhEN,cAAA;EACA,mBAAA;AJqFJ;;AItBU;EAhEN,cAAA;EACA,UAAA;AJ0FJ;;AI3BU;EAhEN,cAAA;EACA,mBAAA;AJ+FJ;;AIhCU;EAhEN,cAAA;EACA,mBAAA;AJoGJ;;AIrCU;EAhEN,cAAA;EACA,UAAA;AJyGJ;;AI1CU;EAhEN,cAAA;EACA,mBAAA;AJ8GJ;;AI/CU;EAhEN,cAAA;EACA,mBAAA;AJmHJ;;AIpDU;EAhEN,cAAA;EACA,UAAA;AJwHJ;;AIzDU;EAhEN,cAAA;EACA,mBAAA;AJ6HJ;;AI9DU;EAhEN,cAAA;EACA,mBAAA;AJkIJ;;AInEU;EAhEN,cAAA;EACA,WAAA;AJuIJ;;AIhEY;EAxDV,wBAAA;AJ4HF;;AIpEY;EAxDV,yBAAA;AJgIF;;AIxEY;EAxDV,gBAAA;AJoIF;;AI5EY;EAxDV,yBAAA;AJwIF;;AIhFY;EAxDV,yBAAA;AJ4IF;;AIpFY;EAxDV,gBAAA;AJgJF;;AIxFY;EAxDV,yBAAA;AJoJF;;AI5FY;EAxDV,yBAAA;AJwJF;;AIhGY;EAxDV,gBAAA;AJ4JF;;AIpGY;EAxDV,yBAAA;AJgKF;;AIxGY;EAxDV,yBAAA;AJoKF;;AIjGQ;;EAEE,gBAAA;AJoGV;;AIjGQ;;EAEE,gBAAA;AJoGV;;AI3GQ;;EAEE,sBAAA;AJ8GV;;AI3GQ;;EAEE,sBAAA;AJ8GV;;AIrHQ;;EAEE,qBAAA;AJwHV;;AIrHQ;;EAEE,qBAAA;AJwHV;;AI/HQ;;EAEE,mBAAA;AJkIV;;AI/HQ;;EAEE,mBAAA;AJkIV;;AIzIQ;;EAEE,qBAAA;AJ4IV;;AIzIQ;;EAEE,qBAAA;AJ4IV;;AInJQ;;EAEE,mBAAA;AJsJV;;AInJQ;;EAEE,mBAAA;AJsJV;;AC/MI;EGSE;IACE,YAAA;EJ0MN;;EIvMI;IApCJ,cAAA;IACA,WAAA;EJ+OA;;EIjOA;IACE,cAAA;IACA,WAAA;EJoOF;;EItOA;IACE,cAAA;IACA,UAAA;EJyOF;;EI3OA;IACE,cAAA;IACA,qBAAA;EJ8OF;;EIhPA;IACE,cAAA;IACA,UAAA;EJmPF;;EIrPA;IACE,cAAA;IACA,UAAA;EJwPF;;EI1PA;IACE,cAAA;IACA,qBAAA;EJ6PF;;EI9NI;IAhDJ,cAAA;IACA,WAAA;EJkRA;;EI7NQ;IAhEN,cAAA;IACA,kBAAA;EJiSF;;EIlOQ;IAhEN,cAAA;IACA,mBAAA;EJsSF;;EIvOQ;IAhEN,cAAA;IACA,UAAA;EJ2SF;;EI5OQ;IAhEN,cAAA;IACA,mBAAA;EJgTF;;EIjPQ;IAhEN,cAAA;IACA,mBAAA;EJqTF;;EItPQ;IAhEN,cAAA;IACA,UAAA;EJ0TF;;EI3PQ;IAhEN,cAAA;IACA,mBAAA;EJ+TF;;EIhQQ;IAhEN,cAAA;IACA,mBAAA;EJoUF;;EIrQQ;IAhEN,cAAA;IACA,UAAA;EJyUF;;EI1QQ;IAhEN,cAAA;IACA,mBAAA;EJ8UF;;EI/QQ;IAhEN,cAAA;IACA,mBAAA;EJmVF;;EIpRQ;IAhEN,cAAA;IACA,WAAA;EJwVF;;EIjRU;IAxDV,cAAA;EJ6UA;;EIrRU;IAxDV,wBAAA;EJiVA;;EIzRU;IAxDV,yBAAA;EJqVA;;EI7RU;IAxDV,gBAAA;EJyVA;;EIjSU;IAxDV,yBAAA;EJ6VA;;EIrSU;IAxDV,yBAAA;EJiWA;;EIzSU;IAxDV,gBAAA;EJqWA;;EI7SU;IAxDV,yBAAA;EJyWA;;EIjTU;IAxDV,yBAAA;EJ6WA;;EIrTU;IAxDV,gBAAA;EJiXA;;EIzTU;IAxDV,yBAAA;EJqXA;;EI7TU;IAxDV,yBAAA;EJyXA;;EItTM;;IAEE,gBAAA;EJyTR;;EItTM;;IAEE,gBAAA;EJyTR;;EIhUM;;IAEE,sBAAA;EJmUR;;EIhUM;;IAEE,sBAAA;EJmUR;;EI1UM;;IAEE,qBAAA;EJ6UR;;EI1UM;;IAEE,qBAAA;EJ6UR;;EIpVM;;IAEE,mBAAA;EJuVR;;EIpVM;;IAEE,mBAAA;EJuVR;;EI9VM;;IAEE,qBAAA;EJiWR;;EI9VM;;IAEE,qBAAA;EJiWR;;EIxWM;;IAEE,mBAAA;EJ2WR;;EIxWM;;IAEE,mBAAA;EJ2WR;AACF;ACraI;EGSE;IACE,YAAA;EJ+ZN;;EI5ZI;IApCJ,cAAA;IACA,WAAA;EJocA;;EItbA;IACE,cAAA;IACA,WAAA;EJybF;;EI3bA;IACE,cAAA;IACA,UAAA;EJ8bF;;EIhcA;IACE,cAAA;IACA,qBAAA;EJmcF;;EIrcA;IACE,cAAA;IACA,UAAA;EJwcF;;EI1cA;IACE,cAAA;IACA,UAAA;EJ6cF;;EI/cA;IACE,cAAA;IACA,qBAAA;EJkdF;;EInbI;IAhDJ,cAAA;IACA,WAAA;EJueA;;EIlbQ;IAhEN,cAAA;IACA,kBAAA;EJsfF;;EIvbQ;IAhEN,cAAA;IACA,mBAAA;EJ2fF;;EI5bQ;IAhEN,cAAA;IACA,UAAA;EJggBF;;EIjcQ;IAhEN,cAAA;IACA,mBAAA;EJqgBF;;EItcQ;IAhEN,cAAA;IACA,mBAAA;EJ0gBF;;EI3cQ;IAhEN,cAAA;IACA,UAAA;EJ+gBF;;EIhdQ;IAhEN,cAAA;IACA,mBAAA;EJohBF;;EIrdQ;IAhEN,cAAA;IACA,mBAAA;EJyhBF;;EI1dQ;IAhEN,cAAA;IACA,UAAA;EJ8hBF;;EI/dQ;IAhEN,cAAA;IACA,mBAAA;EJmiBF;;EIpeQ;IAhEN,cAAA;IACA,mBAAA;EJwiBF;;EIzeQ;IAhEN,cAAA;IACA,WAAA;EJ6iBF;;EIteU;IAxDV,cAAA;EJkiBA;;EI1eU;IAxDV,wBAAA;EJsiBA;;EI9eU;IAxDV,yBAAA;EJ0iBA;;EIlfU;IAxDV,gBAAA;EJ8iBA;;EItfU;IAxDV,yBAAA;EJkjBA;;EI1fU;IAxDV,yBAAA;EJsjBA;;EI9fU;IAxDV,gBAAA;EJ0jBA;;EIlgBU;IAxDV,yBAAA;EJ8jBA;;EItgBU;IAxDV,yBAAA;EJkkBA;;EI1gBU;IAxDV,gBAAA;EJskBA;;EI9gBU;IAxDV,yBAAA;EJ0kBA;;EIlhBU;IAxDV,yBAAA;EJ8kBA;;EI3gBM;;IAEE,gBAAA;EJ8gBR;;EI3gBM;;IAEE,gBAAA;EJ8gBR;;EIrhBM;;IAEE,sBAAA;EJwhBR;;EIrhBM;;IAEE,sBAAA;EJwhBR;;EI/hBM;;IAEE,qBAAA;EJkiBR;;EI/hBM;;IAEE,qBAAA;EJkiBR;;EIziBM;;IAEE,mBAAA;EJ4iBR;;EIziBM;;IAEE,mBAAA;EJ4iBR;;EInjBM;;IAEE,qBAAA;EJsjBR;;EInjBM;;IAEE,qBAAA;EJsjBR;;EI7jBM;;IAEE,mBAAA;EJgkBR;;EI7jBM;;IAEE,mBAAA;EJgkBR;AACF;AC1nBI;EGSE;IACE,YAAA;EJonBN;;EIjnBI;IApCJ,cAAA;IACA,WAAA;EJypBA;;EI3oBA;IACE,cAAA;IACA,WAAA;EJ8oBF;;EIhpBA;IACE,cAAA;IACA,UAAA;EJmpBF;;EIrpBA;IACE,cAAA;IACA,qBAAA;EJwpBF;;EI1pBA;IACE,cAAA;IACA,UAAA;EJ6pBF;;EI/pBA;IACE,cAAA;IACA,UAAA;EJkqBF;;EIpqBA;IACE,cAAA;IACA,qBAAA;EJuqBF;;EIxoBI;IAhDJ,cAAA;IACA,WAAA;EJ4rBA;;EIvoBQ;IAhEN,cAAA;IACA,kBAAA;EJ2sBF;;EI5oBQ;IAhEN,cAAA;IACA,mBAAA;EJgtBF;;EIjpBQ;IAhEN,cAAA;IACA,UAAA;EJqtBF;;EItpBQ;IAhEN,cAAA;IACA,mBAAA;EJ0tBF;;EI3pBQ;IAhEN,cAAA;IACA,mBAAA;EJ+tBF;;EIhqBQ;IAhEN,cAAA;IACA,UAAA;EJouBF;;EIrqBQ;IAhEN,cAAA;IACA,mBAAA;EJyuBF;;EI1qBQ;IAhEN,cAAA;IACA,mBAAA;EJ8uBF;;EI/qBQ;IAhEN,cAAA;IACA,UAAA;EJmvBF;;EIprBQ;IAhEN,cAAA;IACA,mBAAA;EJwvBF;;EIzrBQ;IAhEN,cAAA;IACA,mBAAA;EJ6vBF;;EI9rBQ;IAhEN,cAAA;IACA,WAAA;EJkwBF;;EI3rBU;IAxDV,cAAA;EJuvBA;;EI/rBU;IAxDV,wBAAA;EJ2vBA;;EInsBU;IAxDV,yBAAA;EJ+vBA;;EIvsBU;IAxDV,gBAAA;EJmwBA;;EI3sBU;IAxDV,yBAAA;EJuwBA;;EI/sBU;IAxDV,yBAAA;EJ2wBA;;EIntBU;IAxDV,gBAAA;EJ+wBA;;EIvtBU;IAxDV,yBAAA;EJmxBA;;EI3tBU;IAxDV,yBAAA;EJuxBA;;EI/tBU;IAxDV,gBAAA;EJ2xBA;;EInuBU;IAxDV,yBAAA;EJ+xBA;;EIvuBU;IAxDV,yBAAA;EJmyBA;;EIhuBM;;IAEE,gBAAA;EJmuBR;;EIhuBM;;IAEE,gBAAA;EJmuBR;;EI1uBM;;IAEE,sBAAA;EJ6uBR;;EI1uBM;;IAEE,sBAAA;EJ6uBR;;EIpvBM;;IAEE,qBAAA;EJuvBR;;EIpvBM;;IAEE,qBAAA;EJuvBR;;EI9vBM;;IAEE,mBAAA;EJiwBR;;EI9vBM;;IAEE,mBAAA;EJiwBR;;EIxwBM;;IAEE,qBAAA;EJ2wBR;;EIxwBM;;IAEE,qBAAA;EJ2wBR;;EIlxBM;;IAEE,mBAAA;EJqxBR;;EIlxBM;;IAEE,mBAAA;EJqxBR;AACF;AC/0BI;EGSE;IACE,YAAA;EJy0BN;;EIt0BI;IApCJ,cAAA;IACA,WAAA;EJ82BA;;EIh2BA;IACE,cAAA;IACA,WAAA;EJm2BF;;EIr2BA;IACE,cAAA;IACA,UAAA;EJw2BF;;EI12BA;IACE,cAAA;IACA,qBAAA;EJ62BF;;EI/2BA;IACE,cAAA;IACA,UAAA;EJk3BF;;EIp3BA;IACE,cAAA;IACA,UAAA;EJu3BF;;EIz3BA;IACE,cAAA;IACA,qBAAA;EJ43BF;;EI71BI;IAhDJ,cAAA;IACA,WAAA;EJi5BA;;EI51BQ;IAhEN,cAAA;IACA,kBAAA;EJg6BF;;EIj2BQ;IAhEN,cAAA;IACA,mBAAA;EJq6BF;;EIt2BQ;IAhEN,cAAA;IACA,UAAA;EJ06BF;;EI32BQ;IAhEN,cAAA;IACA,mBAAA;EJ+6BF;;EIh3BQ;IAhEN,cAAA;IACA,mBAAA;EJo7BF;;EIr3BQ;IAhEN,cAAA;IACA,UAAA;EJy7BF;;EI13BQ;IAhEN,cAAA;IACA,mBAAA;EJ87BF;;EI/3BQ;IAhEN,cAAA;IACA,mBAAA;EJm8BF;;EIp4BQ;IAhEN,cAAA;IACA,UAAA;EJw8BF;;EIz4BQ;IAhEN,cAAA;IACA,mBAAA;EJ68BF;;EI94BQ;IAhEN,cAAA;IACA,mBAAA;EJk9BF;;EIn5BQ;IAhEN,cAAA;IACA,WAAA;EJu9BF;;EIh5BU;IAxDV,cAAA;EJ48BA;;EIp5BU;IAxDV,wBAAA;EJg9BA;;EIx5BU;IAxDV,yBAAA;EJo9BA;;EI55BU;IAxDV,gBAAA;EJw9BA;;EIh6BU;IAxDV,yBAAA;EJ49BA;;EIp6BU;IAxDV,yBAAA;EJg+BA;;EIx6BU;IAxDV,gBAAA;EJo+BA;;EI56BU;IAxDV,yBAAA;EJw+BA;;EIh7BU;IAxDV,yBAAA;EJ4+BA;;EIp7BU;IAxDV,gBAAA;EJg/BA;;EIx7BU;IAxDV,yBAAA;EJo/BA;;EI57BU;IAxDV,yBAAA;EJw/BA;;EIr7BM;;IAEE,gBAAA;EJw7BR;;EIr7BM;;IAEE,gBAAA;EJw7BR;;EI/7BM;;IAEE,sBAAA;EJk8BR;;EI/7BM;;IAEE,sBAAA;EJk8BR;;EIz8BM;;IAEE,qBAAA;EJ48BR;;EIz8BM;;IAEE,qBAAA;EJ48BR;;EIn9BM;;IAEE,mBAAA;EJs9BR;;EIn9BM;;IAEE,mBAAA;EJs9BR;;EI79BM;;IAEE,qBAAA;EJg+BR;;EI79BM;;IAEE,qBAAA;EJg+BR;;EIv+BM;;IAEE,mBAAA;EJ0+BR;;EIv+BM;;IAEE,mBAAA;EJ0+BR;AACF;ACpiCI;EGSE;IACE,YAAA;EJ8hCN;;EI3hCI;IApCJ,cAAA;IACA,WAAA;EJmkCA;;EIrjCA;IACE,cAAA;IACA,WAAA;EJwjCF;;EI1jCA;IACE,cAAA;IACA,UAAA;EJ6jCF;;EI/jCA;IACE,cAAA;IACA,qBAAA;EJkkCF;;EIpkCA;IACE,cAAA;IACA,UAAA;EJukCF;;EIzkCA;IACE,cAAA;IACA,UAAA;EJ4kCF;;EI9kCA;IACE,cAAA;IACA,qBAAA;EJilCF;;EIljCI;IAhDJ,cAAA;IACA,WAAA;EJsmCA;;EIjjCQ;IAhEN,cAAA;IACA,kBAAA;EJqnCF;;EItjCQ;IAhEN,cAAA;IACA,mBAAA;EJ0nCF;;EI3jCQ;IAhEN,cAAA;IACA,UAAA;EJ+nCF;;EIhkCQ;IAhEN,cAAA;IACA,mBAAA;EJooCF;;EIrkCQ;IAhEN,cAAA;IACA,mBAAA;EJyoCF;;EI1kCQ;IAhEN,cAAA;IACA,UAAA;EJ8oCF;;EI/kCQ;IAhEN,cAAA;IACA,mBAAA;EJmpCF;;EIplCQ;IAhEN,cAAA;IACA,mBAAA;EJwpCF;;EIzlCQ;IAhEN,cAAA;IACA,UAAA;EJ6pCF;;EI9lCQ;IAhEN,cAAA;IACA,mBAAA;EJkqCF;;EInmCQ;IAhEN,cAAA;IACA,mBAAA;EJuqCF;;EIxmCQ;IAhEN,cAAA;IACA,WAAA;EJ4qCF;;EIrmCU;IAxDV,cAAA;EJiqCA;;EIzmCU;IAxDV,wBAAA;EJqqCA;;EI7mCU;IAxDV,yBAAA;EJyqCA;;EIjnCU;IAxDV,gBAAA;EJ6qCA;;EIrnCU;IAxDV,yBAAA;EJirCA;;EIznCU;IAxDV,yBAAA;EJqrCA;;EI7nCU;IAxDV,gBAAA;EJyrCA;;EIjoCU;IAxDV,yBAAA;EJ6rCA;;EIroCU;IAxDV,yBAAA;EJisCA;;EIzoCU;IAxDV,gBAAA;EJqsCA;;EI7oCU;IAxDV,yBAAA;EJysCA;;EIjpCU;IAxDV,yBAAA;EJ6sCA;;EI1oCM;;IAEE,gBAAA;EJ6oCR;;EI1oCM;;IAEE,gBAAA;EJ6oCR;;EIppCM;;IAEE,sBAAA;EJupCR;;EIppCM;;IAEE,sBAAA;EJupCR;;EI9pCM;;IAEE,qBAAA;EJiqCR;;EI9pCM;;IAEE,qBAAA;EJiqCR;;EIxqCM;;IAEE,mBAAA;EJ2qCR;;EIxqCM;;IAEE,mBAAA;EJ2qCR;;EIlrCM;;IAEE,qBAAA;EJqrCR;;EIlrCM;;IAEE,qBAAA;EJqrCR;;EI5rCM;;IAEE,mBAAA;EJ+rCR;;EI5rCM;;IAEE,mBAAA;EJ+rCR;AACF;AKzvCQ;EAOI,0BAAA;ALqvCZ;;AK5vCQ;EAOI,gCAAA;ALyvCZ;;AKhwCQ;EAOI,yBAAA;AL6vCZ;;AKpwCQ;EAOI,wBAAA;ALiwCZ;;AKxwCQ;EAOI,yBAAA;ALqwCZ;;AK5wCQ;EAOI,6BAAA;ALywCZ;;AKhxCQ;EAOI,8BAAA;AL6wCZ;;AKpxCQ;EAOI,wBAAA;ALixCZ;;AKxxCQ;EAOI,+BAAA;ALqxCZ;;AK5xCQ;EAOI,wBAAA;ALyxCZ;;AKhyCQ;EAOI,yBAAA;AL6xCZ;;AKpyCQ;EAOI,8BAAA;ALiyCZ;;AKxyCQ;EAOI,iCAAA;ALqyCZ;;AK5yCQ;EAOI,sCAAA;ALyyCZ;;AKhzCQ;EAOI,yCAAA;AL6yCZ;;AKpzCQ;EAOI,uBAAA;ALizCZ;;AKxzCQ;EAOI,uBAAA;ALqzCZ;;AK5zCQ;EAOI,yBAAA;ALyzCZ;;AKh0CQ;EAOI,yBAAA;AL6zCZ;;AKp0CQ;EAOI,0BAAA;ALi0CZ;;AKx0CQ;EAOI,4BAAA;ALq0CZ;;AK50CQ;EAOI,kCAAA;ALy0CZ;;AKh1CQ;EAOI,sCAAA;AL60CZ;;AKp1CQ;EAOI,oCAAA;ALi1CZ;;AKx1CQ;EAOI,kCAAA;ALq1CZ;;AK51CQ;EAOI,yCAAA;ALy1CZ;;AKh2CQ;EAOI,wCAAA;AL61CZ;;AKp2CQ;EAOI,wCAAA;ALi2CZ;;AKx2CQ;EAOI,kCAAA;ALq2CZ;;AK52CQ;EAOI,gCAAA;ALy2CZ;;AKh3CQ;EAOI,8BAAA;AL62CZ;;AKp3CQ;EAOI,gCAAA;ALi3CZ;;AKx3CQ;EAOI,+BAAA;ALq3CZ;;AK53CQ;EAOI,oCAAA;ALy3CZ;;AKh4CQ;EAOI,kCAAA;AL63CZ;;AKp4CQ;EAOI,gCAAA;ALi4CZ;;AKx4CQ;EAOI,uCAAA;ALq4CZ;;AK54CQ;EAOI,sCAAA;ALy4CZ;;AKh5CQ;EAOI,iCAAA;AL64CZ;;AKp5CQ;EAOI,2BAAA;ALi5CZ;;AKx5CQ;EAOI,iCAAA;ALq5CZ;;AK55CQ;EAOI,+BAAA;ALy5CZ;;AKh6CQ;EAOI,6BAAA;AL65CZ;;AKp6CQ;EAOI,+BAAA;ALi6CZ;;AKx6CQ;EAOI,8BAAA;ALq6CZ;;AK56CQ;EAOI,oBAAA;ALy6CZ;;AKh7CQ;EAOI,mBAAA;AL66CZ;;AKp7CQ;EAOI,mBAAA;ALi7CZ;;AKx7CQ;EAOI,mBAAA;ALq7CZ;;AK57CQ;EAOI,mBAAA;ALy7CZ;;AKh8CQ;EAOI,mBAAA;AL67CZ;;AKp8CQ;EAOI,mBAAA;ALi8CZ;;AKx8CQ;EAOI,mBAAA;ALq8CZ;;AK58CQ;EAOI,oBAAA;ALy8CZ;;AKh9CQ;EAOI,0BAAA;AL68CZ;;AKp9CQ;EAOI,yBAAA;ALi9CZ;;AKx9CQ;EAOI,uBAAA;ALq9CZ;;AK59CQ;EAOI,yBAAA;ALy9CZ;;AKh+CQ;EAOI,uBAAA;AL69CZ;;AKp+CQ;EAOI,uBAAA;ALi+CZ;;AKx+CQ;EAOI,0BAAA;EAAA,yBAAA;ALs+CZ;;AK7+CQ;EAOI,gCAAA;EAAA,+BAAA;AL2+CZ;;AKl/CQ;EAOI,+BAAA;EAAA,8BAAA;ALg/CZ;;AKv/CQ;EAOI,6BAAA;EAAA,4BAAA;ALq/CZ;;AK5/CQ;EAOI,+BAAA;EAAA,8BAAA;AL0/CZ;;AKjgDQ;EAOI,6BAAA;EAAA,4BAAA;AL+/CZ;;AKtgDQ;EAOI,6BAAA;EAAA,4BAAA;ALogDZ;;AK3gDQ;EAOI,wBAAA;EAAA,2BAAA;ALygDZ;;AKhhDQ;EAOI,8BAAA;EAAA,iCAAA;AL8gDZ;;AKrhDQ;EAOI,6BAAA;EAAA,gCAAA;ALmhDZ;;AK1hDQ;EAOI,2BAAA;EAAA,8BAAA;ALwhDZ;;AK/hDQ;EAOI,6BAAA;EAAA,gCAAA;AL6hDZ;;AKpiDQ;EAOI,2BAAA;EAAA,8BAAA;ALkiDZ;;AKziDQ;EAOI,2BAAA;EAAA,8BAAA;ALuiDZ;;AK9iDQ;EAOI,wBAAA;AL2iDZ;;AKljDQ;EAOI,8BAAA;AL+iDZ;;AKtjDQ;EAOI,6BAAA;ALmjDZ;;AK1jDQ;EAOI,2BAAA;ALujDZ;;AK9jDQ;EAOI,6BAAA;AL2jDZ;;AKlkDQ;EAOI,2BAAA;AL+jDZ;;AKtkDQ;EAOI,2BAAA;ALmkDZ;;AK1kDQ;EAOI,0BAAA;ALukDZ;;AK9kDQ;EAOI,gCAAA;AL2kDZ;;AKllDQ;EAOI,+BAAA;AL+kDZ;;AKtlDQ;EAOI,6BAAA;ALmlDZ;;AK1lDQ;EAOI,+BAAA;ALulDZ;;AK9lDQ;EAOI,6BAAA;AL2lDZ;;AKlmDQ;EAOI,6BAAA;AL+lDZ;;AKtmDQ;EAOI,2BAAA;ALmmDZ;;AK1mDQ;EAOI,iCAAA;ALumDZ;;AK9mDQ;EAOI,gCAAA;AL2mDZ;;AKlnDQ;EAOI,8BAAA;AL+mDZ;;AKtnDQ;EAOI,gCAAA;ALmnDZ;;AK1nDQ;EAOI,8BAAA;ALunDZ;;AK9nDQ;EAOI,8BAAA;AL2nDZ;;AKloDQ;EAOI,yBAAA;AL+nDZ;;AKtoDQ;EAOI,+BAAA;ALmoDZ;;AK1oDQ;EAOI,8BAAA;ALuoDZ;;AK9oDQ;EAOI,4BAAA;AL2oDZ;;AKlpDQ;EAOI,8BAAA;AL+oDZ;;AKtpDQ;EAOI,4BAAA;ALmpDZ;;AK1pDQ;EAOI,4BAAA;ALupDZ;;AK9pDQ;EAOI,qBAAA;AL2pDZ;;AKlqDQ;EAOI,2BAAA;AL+pDZ;;AKtqDQ;EAOI,0BAAA;ALmqDZ;;AK1qDQ;EAOI,wBAAA;ALuqDZ;;AK9qDQ;EAOI,0BAAA;AL2qDZ;;AKlrDQ;EAOI,wBAAA;AL+qDZ;;AKtrDQ;EAOI,2BAAA;EAAA,0BAAA;ALorDZ;;AK3rDQ;EAOI,iCAAA;EAAA,gCAAA;ALyrDZ;;AKhsDQ;EAOI,gCAAA;EAAA,+BAAA;AL8rDZ;;AKrsDQ;EAOI,8BAAA;EAAA,6BAAA;ALmsDZ;;AK1sDQ;EAOI,gCAAA;EAAA,+BAAA;ALwsDZ;;AK/sDQ;EAOI,8BAAA;EAAA,6BAAA;AL6sDZ;;AKptDQ;EAOI,yBAAA;EAAA,4BAAA;ALktDZ;;AKztDQ;EAOI,+BAAA;EAAA,kCAAA;ALutDZ;;AK9tDQ;EAOI,8BAAA;EAAA,iCAAA;AL4tDZ;;AKnuDQ;EAOI,4BAAA;EAAA,+BAAA;ALiuDZ;;AKxuDQ;EAOI,8BAAA;EAAA,iCAAA;ALsuDZ;;AK7uDQ;EAOI,4BAAA;EAAA,+BAAA;AL2uDZ;;AKlvDQ;EAOI,yBAAA;AL+uDZ;;AKtvDQ;EAOI,+BAAA;ALmvDZ;;AK1vDQ;EAOI,8BAAA;ALuvDZ;;AK9vDQ;EAOI,4BAAA;AL2vDZ;;AKlwDQ;EAOI,8BAAA;AL+vDZ;;AKtwDQ;EAOI,4BAAA;ALmwDZ;;AK1wDQ;EAOI,2BAAA;ALuwDZ;;AK9wDQ;EAOI,iCAAA;AL2wDZ;;AKlxDQ;EAOI,gCAAA;AL+wDZ;;AKtxDQ;EAOI,8BAAA;ALmxDZ;;AK1xDQ;EAOI,gCAAA;ALuxDZ;;AK9xDQ;EAOI,8BAAA;AL2xDZ;;AKlyDQ;EAOI,4BAAA;AL+xDZ;;AKtyDQ;EAOI,kCAAA;ALmyDZ;;AK1yDQ;EAOI,iCAAA;ALuyDZ;;AK9yDQ;EAOI,+BAAA;AL2yDZ;;AKlzDQ;EAOI,iCAAA;AL+yDZ;;AKtzDQ;EAOI,+BAAA;ALmzDZ;;AK1zDQ;EAOI,0BAAA;ALuzDZ;;AK9zDQ;EAOI,gCAAA;AL2zDZ;;AKl0DQ;EAOI,+BAAA;AL+zDZ;;AKt0DQ;EAOI,6BAAA;ALm0DZ;;AK10DQ;EAOI,+BAAA;ALu0DZ;;AK90DQ;EAOI,6BAAA;AL20DZ;;ACl1DI;EIAI;IAOI,0BAAA;ELg1DV;;EKv1DM;IAOI,gCAAA;ELo1DV;;EK31DM;IAOI,yBAAA;ELw1DV;;EK/1DM;IAOI,wBAAA;EL41DV;;EKn2DM;IAOI,yBAAA;ELg2DV;;EKv2DM;IAOI,6BAAA;ELo2DV;;EK32DM;IAOI,8BAAA;ELw2DV;;EK/2DM;IAOI,wBAAA;EL42DV;;EKn3DM;IAOI,+BAAA;ELg3DV;;EKv3DM;IAOI,wBAAA;ELo3DV;;EK33DM;IAOI,yBAAA;ELw3DV;;EK/3DM;IAOI,8BAAA;EL43DV;;EKn4DM;IAOI,iCAAA;ELg4DV;;EKv4DM;IAOI,sCAAA;ELo4DV;;EK34DM;IAOI,yCAAA;ELw4DV;;EK/4DM;IAOI,uBAAA;EL44DV;;EKn5DM;IAOI,uBAAA;ELg5DV;;EKv5DM;IAOI,yBAAA;ELo5DV;;EK35DM;IAOI,yBAAA;ELw5DV;;EK/5DM;IAOI,0BAAA;EL45DV;;EKn6DM;IAOI,4BAAA;ELg6DV;;EKv6DM;IAOI,kCAAA;ELo6DV;;EK36DM;IAOI,sCAAA;ELw6DV;;EK/6DM;IAOI,oCAAA;EL46DV;;EKn7DM;IAOI,kCAAA;ELg7DV;;EKv7DM;IAOI,yCAAA;ELo7DV;;EK37DM;IAOI,wCAAA;ELw7DV;;EK/7DM;IAOI,wCAAA;EL47DV;;EKn8DM;IAOI,kCAAA;ELg8DV;;EKv8DM;IAOI,gCAAA;ELo8DV;;EK38DM;IAOI,8BAAA;ELw8DV;;EK/8DM;IAOI,gCAAA;EL48DV;;EKn9DM;IAOI,+BAAA;ELg9DV;;EKv9DM;IAOI,oCAAA;ELo9DV;;EK39DM;IAOI,kCAAA;ELw9DV;;EK/9DM;IAOI,gCAAA;EL49DV;;EKn+DM;IAOI,uCAAA;ELg+DV;;EKv+DM;IAOI,sCAAA;ELo+DV;;EK3+DM;IAOI,iCAAA;ELw+DV;;EK/+DM;IAOI,2BAAA;EL4+DV;;EKn/DM;IAOI,iCAAA;ELg/DV;;EKv/DM;IAOI,+BAAA;ELo/DV;;EK3/DM;IAOI,6BAAA;ELw/DV;;EK//DM;IAOI,+BAAA;EL4/DV;;EKngEM;IAOI,8BAAA;ELggEV;;EKvgEM;IAOI,oBAAA;ELogEV;;EK3gEM;IAOI,mBAAA;ELwgEV;;EK/gEM;IAOI,mBAAA;EL4gEV;;EKnhEM;IAOI,mBAAA;ELghEV;;EKvhEM;IAOI,mBAAA;ELohEV;;EK3hEM;IAOI,mBAAA;ELwhEV;;EK/hEM;IAOI,mBAAA;EL4hEV;;EKniEM;IAOI,mBAAA;ELgiEV;;EKviEM;IAOI,oBAAA;ELoiEV;;EK3iEM;IAOI,0BAAA;ELwiEV;;EK/iEM;IAOI,yBAAA;EL4iEV;;EKnjEM;IAOI,uBAAA;ELgjEV;;EKvjEM;IAOI,yBAAA;ELojEV;;EK3jEM;IAOI,uBAAA;ELwjEV;;EK/jEM;IAOI,uBAAA;EL4jEV;;EKnkEM;IAOI,0BAAA;IAAA,yBAAA;ELikEV;;EKxkEM;IAOI,gCAAA;IAAA,+BAAA;ELskEV;;EK7kEM;IAOI,+BAAA;IAAA,8BAAA;EL2kEV;;EKllEM;IAOI,6BAAA;IAAA,4BAAA;ELglEV;;EKvlEM;IAOI,+BAAA;IAAA,8BAAA;ELqlEV;;EK5lEM;IAOI,6BAAA;IAAA,4BAAA;EL0lEV;;EKjmEM;IAOI,6BAAA;IAAA,4BAAA;EL+lEV;;EKtmEM;IAOI,wBAAA;IAAA,2BAAA;ELomEV;;EK3mEM;IAOI,8BAAA;IAAA,iCAAA;ELymEV;;EKhnEM;IAOI,6BAAA;IAAA,gCAAA;EL8mEV;;EKrnEM;IAOI,2BAAA;IAAA,8BAAA;ELmnEV;;EK1nEM;IAOI,6BAAA;IAAA,gCAAA;ELwnEV;;EK/nEM;IAOI,2BAAA;IAAA,8BAAA;EL6nEV;;EKpoEM;IAOI,2BAAA;IAAA,8BAAA;ELkoEV;;EKzoEM;IAOI,wBAAA;ELsoEV;;EK7oEM;IAOI,8BAAA;EL0oEV;;EKjpEM;IAOI,6BAAA;EL8oEV;;EKrpEM;IAOI,2BAAA;ELkpEV;;EKzpEM;IAOI,6BAAA;ELspEV;;EK7pEM;IAOI,2BAAA;EL0pEV;;EKjqEM;IAOI,2BAAA;EL8pEV;;EKrqEM;IAOI,0BAAA;ELkqEV;;EKzqEM;IAOI,gCAAA;ELsqEV;;EK7qEM;IAOI,+BAAA;EL0qEV;;EKjrEM;IAOI,6BAAA;EL8qEV;;EKrrEM;IAOI,+BAAA;ELkrEV;;EKzrEM;IAOI,6BAAA;ELsrEV;;EK7rEM;IAOI,6BAAA;EL0rEV;;EKjsEM;IAOI,2BAAA;EL8rEV;;EKrsEM;IAOI,iCAAA;ELksEV;;EKzsEM;IAOI,gCAAA;ELssEV;;EK7sEM;IAOI,8BAAA;EL0sEV;;EKjtEM;IAOI,gCAAA;EL8sEV;;EKrtEM;IAOI,8BAAA;ELktEV;;EKztEM;IAOI,8BAAA;ELstEV;;EK7tEM;IAOI,yBAAA;EL0tEV;;EKjuEM;IAOI,+BAAA;EL8tEV;;EKruEM;IAOI,8BAAA;ELkuEV;;EKzuEM;IAOI,4BAAA;ELsuEV;;EK7uEM;IAOI,8BAAA;EL0uEV;;EKjvEM;IAOI,4BAAA;EL8uEV;;EKrvEM;IAOI,4BAAA;ELkvEV;;EKzvEM;IAOI,qBAAA;ELsvEV;;EK7vEM;IAOI,2BAAA;EL0vEV;;EKjwEM;IAOI,0BAAA;EL8vEV;;EKrwEM;IAOI,wBAAA;ELkwEV;;EKzwEM;IAOI,0BAAA;ELswEV;;EK7wEM;IAOI,wBAAA;EL0wEV;;EKjxEM;IAOI,2BAAA;IAAA,0BAAA;EL+wEV;;EKtxEM;IAOI,iCAAA;IAAA,gCAAA;ELoxEV;;EK3xEM;IAOI,gCAAA;IAAA,+BAAA;ELyxEV;;EKhyEM;IAOI,8BAAA;IAAA,6BAAA;EL8xEV;;EKryEM;IAOI,gCAAA;IAAA,+BAAA;ELmyEV;;EK1yEM;IAOI,8BAAA;IAAA,6BAAA;ELwyEV;;EK/yEM;IAOI,yBAAA;IAAA,4BAAA;EL6yEV;;EKpzEM;IAOI,+BAAA;IAAA,kCAAA;ELkzEV;;EKzzEM;IAOI,8BAAA;IAAA,iCAAA;ELuzEV;;EK9zEM;IAOI,4BAAA;IAAA,+BAAA;EL4zEV;;EKn0EM;IAOI,8BAAA;IAAA,iCAAA;ELi0EV;;EKx0EM;IAOI,4BAAA;IAAA,+BAAA;ELs0EV;;EK70EM;IAOI,yBAAA;EL00EV;;EKj1EM;IAOI,+BAAA;EL80EV;;EKr1EM;IAOI,8BAAA;ELk1EV;;EKz1EM;IAOI,4BAAA;ELs1EV;;EK71EM;IAOI,8BAAA;EL01EV;;EKj2EM;IAOI,4BAAA;EL81EV;;EKr2EM;IAOI,2BAAA;ELk2EV;;EKz2EM;IAOI,iCAAA;ELs2EV;;EK72EM;IAOI,gCAAA;EL02EV;;EKj3EM;IAOI,8BAAA;EL82EV;;EKr3EM;IAOI,gCAAA;ELk3EV;;EKz3EM;IAOI,8BAAA;ELs3EV;;EK73EM;IAOI,4BAAA;EL03EV;;EKj4EM;IAOI,kCAAA;EL83EV;;EKr4EM;IAOI,iCAAA;ELk4EV;;EKz4EM;IAOI,+BAAA;ELs4EV;;EK74EM;IAOI,iCAAA;EL04EV;;EKj5EM;IAOI,+BAAA;EL84EV;;EKr5EM;IAOI,0BAAA;ELk5EV;;EKz5EM;IAOI,gCAAA;ELs5EV;;EK75EM;IAOI,+BAAA;EL05EV;;EKj6EM;IAOI,6BAAA;EL85EV;;EKr6EM;IAOI,+BAAA;ELk6EV;;EKz6EM;IAOI,6BAAA;ELs6EV;AACF;AC96EI;EIAI;IAOI,0BAAA;EL26EV;;EKl7EM;IAOI,gCAAA;EL+6EV;;EKt7EM;IAOI,yBAAA;ELm7EV;;EK17EM;IAOI,wBAAA;ELu7EV;;EK97EM;IAOI,yBAAA;EL27EV;;EKl8EM;IAOI,6BAAA;EL+7EV;;EKt8EM;IAOI,8BAAA;ELm8EV;;EK18EM;IAOI,wBAAA;ELu8EV;;EK98EM;IAOI,+BAAA;EL28EV;;EKl9EM;IAOI,wBAAA;EL+8EV;;EKt9EM;IAOI,yBAAA;ELm9EV;;EK19EM;IAOI,8BAAA;ELu9EV;;EK99EM;IAOI,iCAAA;EL29EV;;EKl+EM;IAOI,sCAAA;EL+9EV;;EKt+EM;IAOI,yCAAA;ELm+EV;;EK1+EM;IAOI,uBAAA;ELu+EV;;EK9+EM;IAOI,uBAAA;EL2+EV;;EKl/EM;IAOI,yBAAA;EL++EV;;EKt/EM;IAOI,yBAAA;ELm/EV;;EK1/EM;IAOI,0BAAA;ELu/EV;;EK9/EM;IAOI,4BAAA;EL2/EV;;EKlgFM;IAOI,kCAAA;EL+/EV;;EKtgFM;IAOI,sCAAA;ELmgFV;;EK1gFM;IAOI,oCAAA;ELugFV;;EK9gFM;IAOI,kCAAA;EL2gFV;;EKlhFM;IAOI,yCAAA;EL+gFV;;EKthFM;IAOI,wCAAA;ELmhFV;;EK1hFM;IAOI,wCAAA;ELuhFV;;EK9hFM;IAOI,kCAAA;EL2hFV;;EKliFM;IAOI,gCAAA;EL+hFV;;EKtiFM;IAOI,8BAAA;ELmiFV;;EK1iFM;IAOI,gCAAA;ELuiFV;;EK9iFM;IAOI,+BAAA;EL2iFV;;EKljFM;IAOI,oCAAA;EL+iFV;;EKtjFM;IAOI,kCAAA;ELmjFV;;EK1jFM;IAOI,gCAAA;ELujFV;;EK9jFM;IAOI,uCAAA;EL2jFV;;EKlkFM;IAOI,sCAAA;EL+jFV;;EKtkFM;IAOI,iCAAA;ELmkFV;;EK1kFM;IAOI,2BAAA;ELukFV;;EK9kFM;IAOI,iCAAA;EL2kFV;;EKllFM;IAOI,+BAAA;EL+kFV;;EKtlFM;IAOI,6BAAA;ELmlFV;;EK1lFM;IAOI,+BAAA;ELulFV;;EK9lFM;IAOI,8BAAA;EL2lFV;;EKlmFM;IAOI,oBAAA;EL+lFV;;EKtmFM;IAOI,mBAAA;ELmmFV;;EK1mFM;IAOI,mBAAA;ELumFV;;EK9mFM;IAOI,mBAAA;EL2mFV;;EKlnFM;IAOI,mBAAA;EL+mFV;;EKtnFM;IAOI,mBAAA;ELmnFV;;EK1nFM;IAOI,mBAAA;ELunFV;;EK9nFM;IAOI,mBAAA;EL2nFV;;EKloFM;IAOI,oBAAA;EL+nFV;;EKtoFM;IAOI,0BAAA;ELmoFV;;EK1oFM;IAOI,yBAAA;ELuoFV;;EK9oFM;IAOI,uBAAA;EL2oFV;;EKlpFM;IAOI,yBAAA;EL+oFV;;EKtpFM;IAOI,uBAAA;ELmpFV;;EK1pFM;IAOI,uBAAA;ELupFV;;EK9pFM;IAOI,0BAAA;IAAA,yBAAA;EL4pFV;;EKnqFM;IAOI,gCAAA;IAAA,+BAAA;ELiqFV;;EKxqFM;IAOI,+BAAA;IAAA,8BAAA;ELsqFV;;EK7qFM;IAOI,6BAAA;IAAA,4BAAA;EL2qFV;;EKlrFM;IAOI,+BAAA;IAAA,8BAAA;ELgrFV;;EKvrFM;IAOI,6BAAA;IAAA,4BAAA;ELqrFV;;EK5rFM;IAOI,6BAAA;IAAA,4BAAA;EL0rFV;;EKjsFM;IAOI,wBAAA;IAAA,2BAAA;EL+rFV;;EKtsFM;IAOI,8BAAA;IAAA,iCAAA;ELosFV;;EK3sFM;IAOI,6BAAA;IAAA,gCAAA;ELysFV;;EKhtFM;IAOI,2BAAA;IAAA,8BAAA;EL8sFV;;EKrtFM;IAOI,6BAAA;IAAA,gCAAA;ELmtFV;;EK1tFM;IAOI,2BAAA;IAAA,8BAAA;ELwtFV;;EK/tFM;IAOI,2BAAA;IAAA,8BAAA;EL6tFV;;EKpuFM;IAOI,wBAAA;ELiuFV;;EKxuFM;IAOI,8BAAA;ELquFV;;EK5uFM;IAOI,6BAAA;ELyuFV;;EKhvFM;IAOI,2BAAA;EL6uFV;;EKpvFM;IAOI,6BAAA;ELivFV;;EKxvFM;IAOI,2BAAA;ELqvFV;;EK5vFM;IAOI,2BAAA;ELyvFV;;EKhwFM;IAOI,0BAAA;EL6vFV;;EKpwFM;IAOI,gCAAA;ELiwFV;;EKxwFM;IAOI,+BAAA;ELqwFV;;EK5wFM;IAOI,6BAAA;ELywFV;;EKhxFM;IAOI,+BAAA;EL6wFV;;EKpxFM;IAOI,6BAAA;ELixFV;;EKxxFM;IAOI,6BAAA;ELqxFV;;EK5xFM;IAOI,2BAAA;ELyxFV;;EKhyFM;IAOI,iCAAA;EL6xFV;;EKpyFM;IAOI,gCAAA;ELiyFV;;EKxyFM;IAOI,8BAAA;ELqyFV;;EK5yFM;IAOI,gCAAA;ELyyFV;;EKhzFM;IAOI,8BAAA;EL6yFV;;EKpzFM;IAOI,8BAAA;ELizFV;;EKxzFM;IAOI,yBAAA;ELqzFV;;EK5zFM;IAOI,+BAAA;ELyzFV;;EKh0FM;IAOI,8BAAA;EL6zFV;;EKp0FM;IAOI,4BAAA;ELi0FV;;EKx0FM;IAOI,8BAAA;ELq0FV;;EK50FM;IAOI,4BAAA;ELy0FV;;EKh1FM;IAOI,4BAAA;EL60FV;;EKp1FM;IAOI,qBAAA;ELi1FV;;EKx1FM;IAOI,2BAAA;ELq1FV;;EK51FM;IAOI,0BAAA;ELy1FV;;EKh2FM;IAOI,wBAAA;EL61FV;;EKp2FM;IAOI,0BAAA;ELi2FV;;EKx2FM;IAOI,wBAAA;ELq2FV;;EK52FM;IAOI,2BAAA;IAAA,0BAAA;EL02FV;;EKj3FM;IAOI,iCAAA;IAAA,gCAAA;EL+2FV;;EKt3FM;IAOI,gCAAA;IAAA,+BAAA;ELo3FV;;EK33FM;IAOI,8BAAA;IAAA,6BAAA;ELy3FV;;EKh4FM;IAOI,gCAAA;IAAA,+BAAA;EL83FV;;EKr4FM;IAOI,8BAAA;IAAA,6BAAA;ELm4FV;;EK14FM;IAOI,yBAAA;IAAA,4BAAA;ELw4FV;;EK/4FM;IAOI,+BAAA;IAAA,kCAAA;EL64FV;;EKp5FM;IAOI,8BAAA;IAAA,iCAAA;ELk5FV;;EKz5FM;IAOI,4BAAA;IAAA,+BAAA;ELu5FV;;EK95FM;IAOI,8BAAA;IAAA,iCAAA;EL45FV;;EKn6FM;IAOI,4BAAA;IAAA,+BAAA;ELi6FV;;EKx6FM;IAOI,yBAAA;ELq6FV;;EK56FM;IAOI,+BAAA;ELy6FV;;EKh7FM;IAOI,8BAAA;EL66FV;;EKp7FM;IAOI,4BAAA;ELi7FV;;EKx7FM;IAOI,8BAAA;ELq7FV;;EK57FM;IAOI,4BAAA;ELy7FV;;EKh8FM;IAOI,2BAAA;EL67FV;;EKp8FM;IAOI,iCAAA;ELi8FV;;EKx8FM;IAOI,gCAAA;ELq8FV;;EK58FM;IAOI,8BAAA;ELy8FV;;EKh9FM;IAOI,gCAAA;EL68FV;;EKp9FM;IAOI,8BAAA;ELi9FV;;EKx9FM;IAOI,4BAAA;ELq9FV;;EK59FM;IAOI,kCAAA;ELy9FV;;EKh+FM;IAOI,iCAAA;EL69FV;;EKp+FM;IAOI,+BAAA;ELi+FV;;EKx+FM;IAOI,iCAAA;ELq+FV;;EK5+FM;IAOI,+BAAA;ELy+FV;;EKh/FM;IAOI,0BAAA;EL6+FV;;EKp/FM;IAOI,gCAAA;ELi/FV;;EKx/FM;IAOI,+BAAA;ELq/FV;;EK5/FM;IAOI,6BAAA;ELy/FV;;EKhgGM;IAOI,+BAAA;EL6/FV;;EKpgGM;IAOI,6BAAA;ELigGV;AACF;ACzgGI;EIAI;IAOI,0BAAA;ELsgGV;;EK7gGM;IAOI,gCAAA;EL0gGV;;EKjhGM;IAOI,yBAAA;EL8gGV;;EKrhGM;IAOI,wBAAA;ELkhGV;;EKzhGM;IAOI,yBAAA;ELshGV;;EK7hGM;IAOI,6BAAA;EL0hGV;;EKjiGM;IAOI,8BAAA;EL8hGV;;EKriGM;IAOI,wBAAA;ELkiGV;;EKziGM;IAOI,+BAAA;ELsiGV;;EK7iGM;IAOI,wBAAA;EL0iGV;;EKjjGM;IAOI,yBAAA;EL8iGV;;EKrjGM;IAOI,8BAAA;ELkjGV;;EKzjGM;IAOI,iCAAA;ELsjGV;;EK7jGM;IAOI,sCAAA;EL0jGV;;EKjkGM;IAOI,yCAAA;EL8jGV;;EKrkGM;IAOI,uBAAA;ELkkGV;;EKzkGM;IAOI,uBAAA;ELskGV;;EK7kGM;IAOI,yBAAA;EL0kGV;;EKjlGM;IAOI,yBAAA;EL8kGV;;EKrlGM;IAOI,0BAAA;ELklGV;;EKzlGM;IAOI,4BAAA;ELslGV;;EK7lGM;IAOI,kCAAA;EL0lGV;;EKjmGM;IAOI,sCAAA;EL8lGV;;EKrmGM;IAOI,oCAAA;ELkmGV;;EKzmGM;IAOI,kCAAA;ELsmGV;;EK7mGM;IAOI,yCAAA;EL0mGV;;EKjnGM;IAOI,wCAAA;EL8mGV;;EKrnGM;IAOI,wCAAA;ELknGV;;EKznGM;IAOI,kCAAA;ELsnGV;;EK7nGM;IAOI,gCAAA;EL0nGV;;EKjoGM;IAOI,8BAAA;EL8nGV;;EKroGM;IAOI,gCAAA;ELkoGV;;EKzoGM;IAOI,+BAAA;ELsoGV;;EK7oGM;IAOI,oCAAA;EL0oGV;;EKjpGM;IAOI,kCAAA;EL8oGV;;EKrpGM;IAOI,gCAAA;ELkpGV;;EKzpGM;IAOI,uCAAA;ELspGV;;EK7pGM;IAOI,sCAAA;EL0pGV;;EKjqGM;IAOI,iCAAA;EL8pGV;;EKrqGM;IAOI,2BAAA;ELkqGV;;EKzqGM;IAOI,iCAAA;ELsqGV;;EK7qGM;IAOI,+BAAA;EL0qGV;;EKjrGM;IAOI,6BAAA;EL8qGV;;EKrrGM;IAOI,+BAAA;ELkrGV;;EKzrGM;IAOI,8BAAA;ELsrGV;;EK7rGM;IAOI,oBAAA;EL0rGV;;EKjsGM;IAOI,mBAAA;EL8rGV;;EKrsGM;IAOI,mBAAA;ELksGV;;EKzsGM;IAOI,mBAAA;ELssGV;;EK7sGM;IAOI,mBAAA;EL0sGV;;EKjtGM;IAOI,mBAAA;EL8sGV;;EKrtGM;IAOI,mBAAA;ELktGV;;EKztGM;IAOI,mBAAA;ELstGV;;EK7tGM;IAOI,oBAAA;EL0tGV;;EKjuGM;IAOI,0BAAA;EL8tGV;;EKruGM;IAOI,yBAAA;ELkuGV;;EKzuGM;IAOI,uBAAA;ELsuGV;;EK7uGM;IAOI,yBAAA;EL0uGV;;EKjvGM;IAOI,uBAAA;EL8uGV;;EKrvGM;IAOI,uBAAA;ELkvGV;;EKzvGM;IAOI,0BAAA;IAAA,yBAAA;ELuvGV;;EK9vGM;IAOI,gCAAA;IAAA,+BAAA;EL4vGV;;EKnwGM;IAOI,+BAAA;IAAA,8BAAA;ELiwGV;;EKxwGM;IAOI,6BAAA;IAAA,4BAAA;ELswGV;;EK7wGM;IAOI,+BAAA;IAAA,8BAAA;EL2wGV;;EKlxGM;IAOI,6BAAA;IAAA,4BAAA;ELgxGV;;EKvxGM;IAOI,6BAAA;IAAA,4BAAA;ELqxGV;;EK5xGM;IAOI,wBAAA;IAAA,2BAAA;EL0xGV;;EKjyGM;IAOI,8BAAA;IAAA,iCAAA;EL+xGV;;EKtyGM;IAOI,6BAAA;IAAA,gCAAA;ELoyGV;;EK3yGM;IAOI,2BAAA;IAAA,8BAAA;ELyyGV;;EKhzGM;IAOI,6BAAA;IAAA,gCAAA;EL8yGV;;EKrzGM;IAOI,2BAAA;IAAA,8BAAA;ELmzGV;;EK1zGM;IAOI,2BAAA;IAAA,8BAAA;ELwzGV;;EK/zGM;IAOI,wBAAA;EL4zGV;;EKn0GM;IAOI,8BAAA;ELg0GV;;EKv0GM;IAOI,6BAAA;ELo0GV;;EK30GM;IAOI,2BAAA;ELw0GV;;EK/0GM;IAOI,6BAAA;EL40GV;;EKn1GM;IAOI,2BAAA;ELg1GV;;EKv1GM;IAOI,2BAAA;ELo1GV;;EK31GM;IAOI,0BAAA;ELw1GV;;EK/1GM;IAOI,gCAAA;EL41GV;;EKn2GM;IAOI,+BAAA;ELg2GV;;EKv2GM;IAOI,6BAAA;ELo2GV;;EK32GM;IAOI,+BAAA;ELw2GV;;EK/2GM;IAOI,6BAAA;EL42GV;;EKn3GM;IAOI,6BAAA;ELg3GV;;EKv3GM;IAOI,2BAAA;ELo3GV;;EK33GM;IAOI,iCAAA;ELw3GV;;EK/3GM;IAOI,gCAAA;EL43GV;;EKn4GM;IAOI,8BAAA;ELg4GV;;EKv4GM;IAOI,gCAAA;ELo4GV;;EK34GM;IAOI,8BAAA;ELw4GV;;EK/4GM;IAOI,8BAAA;EL44GV;;EKn5GM;IAOI,yBAAA;ELg5GV;;EKv5GM;IAOI,+BAAA;ELo5GV;;EK35GM;IAOI,8BAAA;ELw5GV;;EK/5GM;IAOI,4BAAA;EL45GV;;EKn6GM;IAOI,8BAAA;ELg6GV;;EKv6GM;IAOI,4BAAA;ELo6GV;;EK36GM;IAOI,4BAAA;ELw6GV;;EK/6GM;IAOI,qBAAA;EL46GV;;EKn7GM;IAOI,2BAAA;ELg7GV;;EKv7GM;IAOI,0BAAA;ELo7GV;;EK37GM;IAOI,wBAAA;ELw7GV;;EK/7GM;IAOI,0BAAA;EL47GV;;EKn8GM;IAOI,wBAAA;ELg8GV;;EKv8GM;IAOI,2BAAA;IAAA,0BAAA;ELq8GV;;EK58GM;IAOI,iCAAA;IAAA,gCAAA;EL08GV;;EKj9GM;IAOI,gCAAA;IAAA,+BAAA;EL+8GV;;EKt9GM;IAOI,8BAAA;IAAA,6BAAA;ELo9GV;;EK39GM;IAOI,gCAAA;IAAA,+BAAA;ELy9GV;;EKh+GM;IAOI,8BAAA;IAAA,6BAAA;EL89GV;;EKr+GM;IAOI,yBAAA;IAAA,4BAAA;ELm+GV;;EK1+GM;IAOI,+BAAA;IAAA,kCAAA;ELw+GV;;EK/+GM;IAOI,8BAAA;IAAA,iCAAA;EL6+GV;;EKp/GM;IAOI,4BAAA;IAAA,+BAAA;ELk/GV;;EKz/GM;IAOI,8BAAA;IAAA,iCAAA;ELu/GV;;EK9/GM;IAOI,4BAAA;IAAA,+BAAA;EL4/GV;;EKngHM;IAOI,yBAAA;ELggHV;;EKvgHM;IAOI,+BAAA;ELogHV;;EK3gHM;IAOI,8BAAA;ELwgHV;;EK/gHM;IAOI,4BAAA;EL4gHV;;EKnhHM;IAOI,8BAAA;ELghHV;;EKvhHM;IAOI,4BAAA;ELohHV;;EK3hHM;IAOI,2BAAA;ELwhHV;;EK/hHM;IAOI,iCAAA;EL4hHV;;EKniHM;IAOI,gCAAA;ELgiHV;;EKviHM;IAOI,8BAAA;ELoiHV;;EK3iHM;IAOI,gCAAA;ELwiHV;;EK/iHM;IAOI,8BAAA;EL4iHV;;EKnjHM;IAOI,4BAAA;ELgjHV;;EKvjHM;IAOI,kCAAA;ELojHV;;EK3jHM;IAOI,iCAAA;ELwjHV;;EK/jHM;IAOI,+BAAA;EL4jHV;;EKnkHM;IAOI,iCAAA;ELgkHV;;EKvkHM;IAOI,+BAAA;ELokHV;;EK3kHM;IAOI,0BAAA;ELwkHV;;EK/kHM;IAOI,gCAAA;EL4kHV;;EKnlHM;IAOI,+BAAA;ELglHV;;EKvlHM;IAOI,6BAAA;ELolHV;;EK3lHM;IAOI,+BAAA;ELwlHV;;EK/lHM;IAOI,6BAAA;EL4lHV;AACF;ACpmHI;EIAI;IAOI,0BAAA;ELimHV;;EKxmHM;IAOI,gCAAA;ELqmHV;;EK5mHM;IAOI,yBAAA;ELymHV;;EKhnHM;IAOI,wBAAA;EL6mHV;;EKpnHM;IAOI,yBAAA;ELinHV;;EKxnHM;IAOI,6BAAA;ELqnHV;;EK5nHM;IAOI,8BAAA;ELynHV;;EKhoHM;IAOI,wBAAA;EL6nHV;;EKpoHM;IAOI,+BAAA;ELioHV;;EKxoHM;IAOI,wBAAA;ELqoHV;;EK5oHM;IAOI,yBAAA;ELyoHV;;EKhpHM;IAOI,8BAAA;EL6oHV;;EKppHM;IAOI,iCAAA;ELipHV;;EKxpHM;IAOI,sCAAA;ELqpHV;;EK5pHM;IAOI,yCAAA;ELypHV;;EKhqHM;IAOI,uBAAA;EL6pHV;;EKpqHM;IAOI,uBAAA;ELiqHV;;EKxqHM;IAOI,yBAAA;ELqqHV;;EK5qHM;IAOI,yBAAA;ELyqHV;;EKhrHM;IAOI,0BAAA;EL6qHV;;EKprHM;IAOI,4BAAA;ELirHV;;EKxrHM;IAOI,kCAAA;ELqrHV;;EK5rHM;IAOI,sCAAA;ELyrHV;;EKhsHM;IAOI,oCAAA;EL6rHV;;EKpsHM;IAOI,kCAAA;ELisHV;;EKxsHM;IAOI,yCAAA;ELqsHV;;EK5sHM;IAOI,wCAAA;ELysHV;;EKhtHM;IAOI,wCAAA;EL6sHV;;EKptHM;IAOI,kCAAA;ELitHV;;EKxtHM;IAOI,gCAAA;ELqtHV;;EK5tHM;IAOI,8BAAA;ELytHV;;EKhuHM;IAOI,gCAAA;EL6tHV;;EKpuHM;IAOI,+BAAA;ELiuHV;;EKxuHM;IAOI,oCAAA;ELquHV;;EK5uHM;IAOI,kCAAA;ELyuHV;;EKhvHM;IAOI,gCAAA;EL6uHV;;EKpvHM;IAOI,uCAAA;ELivHV;;EKxvHM;IAOI,sCAAA;ELqvHV;;EK5vHM;IAOI,iCAAA;ELyvHV;;EKhwHM;IAOI,2BAAA;EL6vHV;;EKpwHM;IAOI,iCAAA;ELiwHV;;EKxwHM;IAOI,+BAAA;ELqwHV;;EK5wHM;IAOI,6BAAA;ELywHV;;EKhxHM;IAOI,+BAAA;EL6wHV;;EKpxHM;IAOI,8BAAA;ELixHV;;EKxxHM;IAOI,oBAAA;ELqxHV;;EK5xHM;IAOI,mBAAA;ELyxHV;;EKhyHM;IAOI,mBAAA;EL6xHV;;EKpyHM;IAOI,mBAAA;ELiyHV;;EKxyHM;IAOI,mBAAA;ELqyHV;;EK5yHM;IAOI,mBAAA;ELyyHV;;EKhzHM;IAOI,mBAAA;EL6yHV;;EKpzHM;IAOI,mBAAA;ELizHV;;EKxzHM;IAOI,oBAAA;ELqzHV;;EK5zHM;IAOI,0BAAA;ELyzHV;;EKh0HM;IAOI,yBAAA;EL6zHV;;EKp0HM;IAOI,uBAAA;ELi0HV;;EKx0HM;IAOI,yBAAA;ELq0HV;;EK50HM;IAOI,uBAAA;ELy0HV;;EKh1HM;IAOI,uBAAA;EL60HV;;EKp1HM;IAOI,0BAAA;IAAA,yBAAA;ELk1HV;;EKz1HM;IAOI,gCAAA;IAAA,+BAAA;ELu1HV;;EK91HM;IAOI,+BAAA;IAAA,8BAAA;EL41HV;;EKn2HM;IAOI,6BAAA;IAAA,4BAAA;ELi2HV;;EKx2HM;IAOI,+BAAA;IAAA,8BAAA;ELs2HV;;EK72HM;IAOI,6BAAA;IAAA,4BAAA;EL22HV;;EKl3HM;IAOI,6BAAA;IAAA,4BAAA;ELg3HV;;EKv3HM;IAOI,wBAAA;IAAA,2BAAA;ELq3HV;;EK53HM;IAOI,8BAAA;IAAA,iCAAA;EL03HV;;EKj4HM;IAOI,6BAAA;IAAA,gCAAA;EL+3HV;;EKt4HM;IAOI,2BAAA;IAAA,8BAAA;ELo4HV;;EK34HM;IAOI,6BAAA;IAAA,gCAAA;ELy4HV;;EKh5HM;IAOI,2BAAA;IAAA,8BAAA;EL84HV;;EKr5HM;IAOI,2BAAA;IAAA,8BAAA;ELm5HV;;EK15HM;IAOI,wBAAA;ELu5HV;;EK95HM;IAOI,8BAAA;EL25HV;;EKl6HM;IAOI,6BAAA;EL+5HV;;EKt6HM;IAOI,2BAAA;ELm6HV;;EK16HM;IAOI,6BAAA;ELu6HV;;EK96HM;IAOI,2BAAA;EL26HV;;EKl7HM;IAOI,2BAAA;EL+6HV;;EKt7HM;IAOI,0BAAA;ELm7HV;;EK17HM;IAOI,gCAAA;ELu7HV;;EK97HM;IAOI,+BAAA;EL27HV;;EKl8HM;IAOI,6BAAA;EL+7HV;;EKt8HM;IAOI,+BAAA;ELm8HV;;EK18HM;IAOI,6BAAA;ELu8HV;;EK98HM;IAOI,6BAAA;EL28HV;;EKl9HM;IAOI,2BAAA;EL+8HV;;EKt9HM;IAOI,iCAAA;ELm9HV;;EK19HM;IAOI,gCAAA;ELu9HV;;EK99HM;IAOI,8BAAA;EL29HV;;EKl+HM;IAOI,gCAAA;EL+9HV;;EKt+HM;IAOI,8BAAA;ELm+HV;;EK1+HM;IAOI,8BAAA;ELu+HV;;EK9+HM;IAOI,yBAAA;EL2+HV;;EKl/HM;IAOI,+BAAA;EL++HV;;EKt/HM;IAOI,8BAAA;ELm/HV;;EK1/HM;IAOI,4BAAA;ELu/HV;;EK9/HM;IAOI,8BAAA;EL2/HV;;EKlgIM;IAOI,4BAAA;EL+/HV;;EKtgIM;IAOI,4BAAA;ELmgIV;;EK1gIM;IAOI,qBAAA;ELugIV;;EK9gIM;IAOI,2BAAA;EL2gIV;;EKlhIM;IAOI,0BAAA;EL+gIV;;EKthIM;IAOI,wBAAA;ELmhIV;;EK1hIM;IAOI,0BAAA;ELuhIV;;EK9hIM;IAOI,wBAAA;EL2hIV;;EKliIM;IAOI,2BAAA;IAAA,0BAAA;ELgiIV;;EKviIM;IAOI,iCAAA;IAAA,gCAAA;ELqiIV;;EK5iIM;IAOI,gCAAA;IAAA,+BAAA;EL0iIV;;EKjjIM;IAOI,8BAAA;IAAA,6BAAA;EL+iIV;;EKtjIM;IAOI,gCAAA;IAAA,+BAAA;ELojIV;;EK3jIM;IAOI,8BAAA;IAAA,6BAAA;ELyjIV;;EKhkIM;IAOI,yBAAA;IAAA,4BAAA;EL8jIV;;EKrkIM;IAOI,+BAAA;IAAA,kCAAA;ELmkIV;;EK1kIM;IAOI,8BAAA;IAAA,iCAAA;ELwkIV;;EK/kIM;IAOI,4BAAA;IAAA,+BAAA;EL6kIV;;EKplIM;IAOI,8BAAA;IAAA,iCAAA;ELklIV;;EKzlIM;IAOI,4BAAA;IAAA,+BAAA;ELulIV;;EK9lIM;IAOI,yBAAA;EL2lIV;;EKlmIM;IAOI,+BAAA;EL+lIV;;EKtmIM;IAOI,8BAAA;ELmmIV;;EK1mIM;IAOI,4BAAA;ELumIV;;EK9mIM;IAOI,8BAAA;EL2mIV;;EKlnIM;IAOI,4BAAA;EL+mIV;;EKtnIM;IAOI,2BAAA;ELmnIV;;EK1nIM;IAOI,iCAAA;ELunIV;;EK9nIM;IAOI,gCAAA;EL2nIV;;EKloIM;IAOI,8BAAA;EL+nIV;;EKtoIM;IAOI,gCAAA;ELmoIV;;EK1oIM;IAOI,8BAAA;ELuoIV;;EK9oIM;IAOI,4BAAA;EL2oIV;;EKlpIM;IAOI,kCAAA;EL+oIV;;EKtpIM;IAOI,iCAAA;ELmpIV;;EK1pIM;IAOI,+BAAA;ELupIV;;EK9pIM;IAOI,iCAAA;EL2pIV;;EKlqIM;IAOI,+BAAA;EL+pIV;;EKtqIM;IAOI,0BAAA;ELmqIV;;EK1qIM;IAOI,gCAAA;ELuqIV;;EK9qIM;IAOI,+BAAA;EL2qIV;;EKlrIM;IAOI,6BAAA;EL+qIV;;EKtrIM;IAOI,+BAAA;ELmrIV;;EK1rIM;IAOI,6BAAA;ELurIV;AACF;AC/rII;EIAI;IAOI,0BAAA;EL4rIV;;EKnsIM;IAOI,gCAAA;ELgsIV;;EKvsIM;IAOI,yBAAA;ELosIV;;EK3sIM;IAOI,wBAAA;ELwsIV;;EK/sIM;IAOI,yBAAA;EL4sIV;;EKntIM;IAOI,6BAAA;ELgtIV;;EKvtIM;IAOI,8BAAA;ELotIV;;EK3tIM;IAOI,wBAAA;ELwtIV;;EK/tIM;IAOI,+BAAA;EL4tIV;;EKnuIM;IAOI,wBAAA;ELguIV;;EKvuIM;IAOI,yBAAA;ELouIV;;EK3uIM;IAOI,8BAAA;ELwuIV;;EK/uIM;IAOI,iCAAA;EL4uIV;;EKnvIM;IAOI,sCAAA;ELgvIV;;EKvvIM;IAOI,yCAAA;ELovIV;;EK3vIM;IAOI,uBAAA;ELwvIV;;EK/vIM;IAOI,uBAAA;EL4vIV;;EKnwIM;IAOI,yBAAA;ELgwIV;;EKvwIM;IAOI,yBAAA;ELowIV;;EK3wIM;IAOI,0BAAA;ELwwIV;;EK/wIM;IAOI,4BAAA;EL4wIV;;EKnxIM;IAOI,kCAAA;ELgxIV;;EKvxIM;IAOI,sCAAA;ELoxIV;;EK3xIM;IAOI,oCAAA;ELwxIV;;EK/xIM;IAOI,kCAAA;EL4xIV;;EKnyIM;IAOI,yCAAA;ELgyIV;;EKvyIM;IAOI,wCAAA;ELoyIV;;EK3yIM;IAOI,wCAAA;ELwyIV;;EK/yIM;IAOI,kCAAA;EL4yIV;;EKnzIM;IAOI,gCAAA;ELgzIV;;EKvzIM;IAOI,8BAAA;ELozIV;;EK3zIM;IAOI,gCAAA;ELwzIV;;EK/zIM;IAOI,+BAAA;EL4zIV;;EKn0IM;IAOI,oCAAA;ELg0IV;;EKv0IM;IAOI,kCAAA;ELo0IV;;EK30IM;IAOI,gCAAA;ELw0IV;;EK/0IM;IAOI,uCAAA;EL40IV;;EKn1IM;IAOI,sCAAA;ELg1IV;;EKv1IM;IAOI,iCAAA;ELo1IV;;EK31IM;IAOI,2BAAA;ELw1IV;;EK/1IM;IAOI,iCAAA;EL41IV;;EKn2IM;IAOI,+BAAA;ELg2IV;;EKv2IM;IAOI,6BAAA;ELo2IV;;EK32IM;IAOI,+BAAA;ELw2IV;;EK/2IM;IAOI,8BAAA;EL42IV;;EKn3IM;IAOI,oBAAA;ELg3IV;;EKv3IM;IAOI,mBAAA;ELo3IV;;EK33IM;IAOI,mBAAA;ELw3IV;;EK/3IM;IAOI,mBAAA;EL43IV;;EKn4IM;IAOI,mBAAA;ELg4IV;;EKv4IM;IAOI,mBAAA;ELo4IV;;EK34IM;IAOI,mBAAA;ELw4IV;;EK/4IM;IAOI,mBAAA;EL44IV;;EKn5IM;IAOI,oBAAA;ELg5IV;;EKv5IM;IAOI,0BAAA;ELo5IV;;EK35IM;IAOI,yBAAA;ELw5IV;;EK/5IM;IAOI,uBAAA;EL45IV;;EKn6IM;IAOI,yBAAA;ELg6IV;;EKv6IM;IAOI,uBAAA;ELo6IV;;EK36IM;IAOI,uBAAA;ELw6IV;;EK/6IM;IAOI,0BAAA;IAAA,yBAAA;EL66IV;;EKp7IM;IAOI,gCAAA;IAAA,+BAAA;ELk7IV;;EKz7IM;IAOI,+BAAA;IAAA,8BAAA;ELu7IV;;EK97IM;IAOI,6BAAA;IAAA,4BAAA;EL47IV;;EKn8IM;IAOI,+BAAA;IAAA,8BAAA;ELi8IV;;EKx8IM;IAOI,6BAAA;IAAA,4BAAA;ELs8IV;;EK78IM;IAOI,6BAAA;IAAA,4BAAA;EL28IV;;EKl9IM;IAOI,wBAAA;IAAA,2BAAA;ELg9IV;;EKv9IM;IAOI,8BAAA;IAAA,iCAAA;ELq9IV;;EK59IM;IAOI,6BAAA;IAAA,gCAAA;EL09IV;;EKj+IM;IAOI,2BAAA;IAAA,8BAAA;EL+9IV;;EKt+IM;IAOI,6BAAA;IAAA,gCAAA;ELo+IV;;EK3+IM;IAOI,2BAAA;IAAA,8BAAA;ELy+IV;;EKh/IM;IAOI,2BAAA;IAAA,8BAAA;EL8+IV;;EKr/IM;IAOI,wBAAA;ELk/IV;;EKz/IM;IAOI,8BAAA;ELs/IV;;EK7/IM;IAOI,6BAAA;EL0/IV;;EKjgJM;IAOI,2BAAA;EL8/IV;;EKrgJM;IAOI,6BAAA;ELkgJV;;EKzgJM;IAOI,2BAAA;ELsgJV;;EK7gJM;IAOI,2BAAA;EL0gJV;;EKjhJM;IAOI,0BAAA;EL8gJV;;EKrhJM;IAOI,gCAAA;ELkhJV;;EKzhJM;IAOI,+BAAA;ELshJV;;EK7hJM;IAOI,6BAAA;EL0hJV;;EKjiJM;IAOI,+BAAA;EL8hJV;;EKriJM;IAOI,6BAAA;ELkiJV;;EKziJM;IAOI,6BAAA;ELsiJV;;EK7iJM;IAOI,2BAAA;EL0iJV;;EKjjJM;IAOI,iCAAA;EL8iJV;;EKrjJM;IAOI,gCAAA;ELkjJV;;EKzjJM;IAOI,8BAAA;ELsjJV;;EK7jJM;IAOI,gCAAA;EL0jJV;;EKjkJM;IAOI,8BAAA;EL8jJV;;EKrkJM;IAOI,8BAAA;ELkkJV;;EKzkJM;IAOI,yBAAA;ELskJV;;EK7kJM;IAOI,+BAAA;EL0kJV;;EKjlJM;IAOI,8BAAA;EL8kJV;;EKrlJM;IAOI,4BAAA;ELklJV;;EKzlJM;IAOI,8BAAA;ELslJV;;EK7lJM;IAOI,4BAAA;EL0lJV;;EKjmJM;IAOI,4BAAA;EL8lJV;;EKrmJM;IAOI,qBAAA;ELkmJV;;EKzmJM;IAOI,2BAAA;ELsmJV;;EK7mJM;IAOI,0BAAA;EL0mJV;;EKjnJM;IAOI,wBAAA;EL8mJV;;EKrnJM;IAOI,0BAAA;ELknJV;;EKznJM;IAOI,wBAAA;ELsnJV;;EK7nJM;IAOI,2BAAA;IAAA,0BAAA;EL2nJV;;EKloJM;IAOI,iCAAA;IAAA,gCAAA;ELgoJV;;EKvoJM;IAOI,gCAAA;IAAA,+BAAA;ELqoJV;;EK5oJM;IAOI,8BAAA;IAAA,6BAAA;EL0oJV;;EKjpJM;IAOI,gCAAA;IAAA,+BAAA;EL+oJV;;EKtpJM;IAOI,8BAAA;IAAA,6BAAA;ELopJV;;EK3pJM;IAOI,yBAAA;IAAA,4BAAA;ELypJV;;EKhqJM;IAOI,+BAAA;IAAA,kCAAA;EL8pJV;;EKrqJM;IAOI,8BAAA;IAAA,iCAAA;ELmqJV;;EK1qJM;IAOI,4BAAA;IAAA,+BAAA;ELwqJV;;EK/qJM;IAOI,8BAAA;IAAA,iCAAA;EL6qJV;;EKprJM;IAOI,4BAAA;IAAA,+BAAA;ELkrJV;;EKzrJM;IAOI,yBAAA;ELsrJV;;EK7rJM;IAOI,+BAAA;EL0rJV;;EKjsJM;IAOI,8BAAA;EL8rJV;;EKrsJM;IAOI,4BAAA;ELksJV;;EKzsJM;IAOI,8BAAA;ELssJV;;EK7sJM;IAOI,4BAAA;EL0sJV;;EKjtJM;IAOI,2BAAA;EL8sJV;;EKrtJM;IAOI,iCAAA;ELktJV;;EKztJM;IAOI,gCAAA;ELstJV;;EK7tJM;IAOI,8BAAA;EL0tJV;;EKjuJM;IAOI,gCAAA;EL8tJV;;EKruJM;IAOI,8BAAA;ELkuJV;;EKzuJM;IAOI,4BAAA;ELsuJV;;EK7uJM;IAOI,kCAAA;EL0uJV;;EKjvJM;IAOI,iCAAA;EL8uJV;;EKrvJM;IAOI,+BAAA;ELkvJV;;EKzvJM;IAOI,iCAAA;ELsvJV;;EK7vJM;IAOI,+BAAA;EL0vJV;;EKjwJM;IAOI,0BAAA;EL8vJV;;EKrwJM;IAOI,gCAAA;ELkwJV;;EKzwJM;IAOI,+BAAA;ELswJV;;EK7wJM;IAOI,6BAAA;EL0wJV;;EKjxJM;IAOI,+BAAA;EL8wJV;;EKrxJM;IAOI,6BAAA;ELkxJV;AACF;AMnzJA;EDyBQ;IAOI,0BAAA;ELuxJV;;EK9xJM;IAOI,gCAAA;EL2xJV;;EKlyJM;IAOI,yBAAA;EL+xJV;;EKtyJM;IAOI,wBAAA;ELmyJV;;EK1yJM;IAOI,yBAAA;ELuyJV;;EK9yJM;IAOI,6BAAA;EL2yJV;;EKlzJM;IAOI,8BAAA;EL+yJV;;EKtzJM;IAOI,wBAAA;ELmzJV;;EK1zJM;IAOI,+BAAA;ELuzJV;;EK9zJM;IAOI,wBAAA;EL2zJV;AACF","file":"bootstrap-grid.css","sourcesContent":["/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n\n$include-column-box-sizing: true !default;\n\n@import \"functions\";\n@import \"variables\";\n\n@import \"mixins/lists\";\n@import \"mixins/breakpoints\";\n@import \"mixins/container\";\n@import \"mixins/grid\";\n@import \"mixins/utilities\";\n\n@import \"vendor/rfs\";\n\n@import \"containers\";\n@import \"grid\";\n\n@import \"utilities\";\n// Only use the utilities we need\n// stylelint-disable-next-line scss/dollar-variable-default\n$utilities: map-get-multiple(\n $utilities,\n (\n \"display\",\n \"order\",\n \"flex\",\n \"flex-direction\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"justify-content\",\n \"align-items\",\n \"align-content\",\n \"align-self\",\n \"margin\",\n \"margin-x\",\n \"margin-y\",\n \"margin-top\",\n \"margin-end\",\n \"margin-bottom\",\n \"margin-start\",\n \"negative-margin\",\n \"negative-margin-x\",\n \"negative-margin-y\",\n \"negative-margin-top\",\n \"negative-margin-end\",\n \"negative-margin-bottom\",\n \"negative-margin-start\",\n \"padding\",\n \"padding-x\",\n \"padding-y\",\n \"padding-top\",\n \"padding-end\",\n \"padding-bottom\",\n \"padding-start\",\n )\n);\n\n@import \"utilities/api\";\n","// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n@if $enable-grid-classes {\n // Single container class with breakpoint max-widths\n .container,\n // 100% wide container at all breakpoints\n .container-fluid {\n @include make-container();\n }\n\n // Responsive containers that are 100% wide until a breakpoint\n @each $breakpoint, $container-max-width in $container-max-widths {\n .container-#{$breakpoint} {\n @extend .container-fluid;\n }\n\n @include media-breakpoint-up($breakpoint, $grid-breakpoints) {\n %responsive-container-#{$breakpoint} {\n max-width: $container-max-width;\n }\n\n // Extend each breakpoint which is smaller or equal to the current breakpoint\n $extend-breakpoint: true;\n\n @each $name, $width in $grid-breakpoints {\n @if ($extend-breakpoint) {\n .container#{breakpoint-infix($name, $grid-breakpoints)} {\n @extend %responsive-container-#{$breakpoint};\n }\n\n // Once the current breakpoint is reached, stop extending\n @if ($breakpoint == $name) {\n $extend-breakpoint: false;\n }\n }\n }\n }\n }\n}\n","// Container mixins\n\n@mixin make-container($gutter: $container-padding-x) {\n width: 100%;\n padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter});\n padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter});\n margin-right: auto;\n margin-left: auto;\n}\n","/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n.container,\n.container-fluid,\n.container-xxl,\n.container-xl,\n.container-lg,\n.container-md,\n.container-sm {\n width: 100%;\n padding-right: var(--bs-gutter-x, 0.75rem);\n padding-left: var(--bs-gutter-x, 0.75rem);\n margin-right: auto;\n margin-left: auto;\n}\n\n@media (min-width: 576px) {\n .container-sm, .container {\n max-width: 540px;\n }\n}\n@media (min-width: 768px) {\n .container-md, .container-sm, .container {\n max-width: 720px;\n }\n}\n@media (min-width: 992px) {\n .container-lg, .container-md, .container-sm, .container {\n max-width: 960px;\n }\n}\n@media (min-width: 1200px) {\n .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1140px;\n }\n}\n@media (min-width: 1400px) {\n .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1320px;\n }\n}\n.row {\n --bs-gutter-x: 1.5rem;\n --bs-gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--bs-gutter-y) * -1);\n margin-right: calc(var(--bs-gutter-x) * -.5);\n margin-left: calc(var(--bs-gutter-x) * -.5);\n}\n.row > * {\n box-sizing: border-box;\n flex-shrink: 0;\n width: 100%;\n max-width: 100%;\n padding-right: calc(var(--bs-gutter-x) * .5);\n padding-left: calc(var(--bs-gutter-x) * .5);\n margin-top: var(--bs-gutter-y);\n}\n\n.col {\n flex: 1 0 0%;\n}\n\n.row-cols-auto > * {\n flex: 0 0 auto;\n width: auto;\n}\n\n.row-cols-1 > * {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.row-cols-2 > * {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.row-cols-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n}\n\n.row-cols-4 > * {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.row-cols-5 > * {\n flex: 0 0 auto;\n width: 20%;\n}\n\n.row-cols-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n}\n\n.col-auto {\n flex: 0 0 auto;\n width: auto;\n}\n\n.col-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n}\n\n.col-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n}\n\n.col-3 {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.col-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n}\n\n.col-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n}\n\n.col-6 {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.col-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n}\n\n.col-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n}\n\n.col-9 {\n flex: 0 0 auto;\n width: 75%;\n}\n\n.col-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n}\n\n.col-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n}\n\n.col-12 {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.offset-1 {\n margin-left: 8.33333333%;\n}\n\n.offset-2 {\n margin-left: 16.66666667%;\n}\n\n.offset-3 {\n margin-left: 25%;\n}\n\n.offset-4 {\n margin-left: 33.33333333%;\n}\n\n.offset-5 {\n margin-left: 41.66666667%;\n}\n\n.offset-6 {\n margin-left: 50%;\n}\n\n.offset-7 {\n margin-left: 58.33333333%;\n}\n\n.offset-8 {\n margin-left: 66.66666667%;\n}\n\n.offset-9 {\n margin-left: 75%;\n}\n\n.offset-10 {\n margin-left: 83.33333333%;\n}\n\n.offset-11 {\n margin-left: 91.66666667%;\n}\n\n.g-0,\n.gx-0 {\n --bs-gutter-x: 0;\n}\n\n.g-0,\n.gy-0 {\n --bs-gutter-y: 0;\n}\n\n.g-1,\n.gx-1 {\n --bs-gutter-x: 0.25rem;\n}\n\n.g-1,\n.gy-1 {\n --bs-gutter-y: 0.25rem;\n}\n\n.g-2,\n.gx-2 {\n --bs-gutter-x: 0.5rem;\n}\n\n.g-2,\n.gy-2 {\n --bs-gutter-y: 0.5rem;\n}\n\n.g-3,\n.gx-3 {\n --bs-gutter-x: 1rem;\n}\n\n.g-3,\n.gy-3 {\n --bs-gutter-y: 1rem;\n}\n\n.g-4,\n.gx-4 {\n --bs-gutter-x: 1.5rem;\n}\n\n.g-4,\n.gy-4 {\n --bs-gutter-y: 1.5rem;\n}\n\n.g-5,\n.gx-5 {\n --bs-gutter-x: 3rem;\n}\n\n.g-5,\n.gy-5 {\n --bs-gutter-y: 3rem;\n}\n\n@media (min-width: 576px) {\n .col-sm {\n flex: 1 0 0%;\n }\n\n .row-cols-sm-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-sm-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-sm-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-sm-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-sm-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-sm-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-sm-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-sm-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-sm-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-sm-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-sm-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-sm-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-sm-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-sm-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-sm-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-sm-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-sm-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-sm-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-sm-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-sm-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-sm-0 {\n margin-left: 0;\n }\n\n .offset-sm-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-sm-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-sm-3 {\n margin-left: 25%;\n }\n\n .offset-sm-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-sm-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-sm-6 {\n margin-left: 50%;\n }\n\n .offset-sm-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-sm-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-sm-9 {\n margin-left: 75%;\n }\n\n .offset-sm-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-sm-11 {\n margin-left: 91.66666667%;\n }\n\n .g-sm-0,\n.gx-sm-0 {\n --bs-gutter-x: 0;\n }\n\n .g-sm-0,\n.gy-sm-0 {\n --bs-gutter-y: 0;\n }\n\n .g-sm-1,\n.gx-sm-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-sm-1,\n.gy-sm-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-sm-2,\n.gx-sm-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-sm-2,\n.gy-sm-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-sm-3,\n.gx-sm-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-sm-3,\n.gy-sm-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-sm-4,\n.gx-sm-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-sm-4,\n.gy-sm-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-sm-5,\n.gx-sm-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-sm-5,\n.gy-sm-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 768px) {\n .col-md {\n flex: 1 0 0%;\n }\n\n .row-cols-md-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-md-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-md-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-md-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-md-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-md-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-md-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-md-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-md-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-md-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-md-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-md-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-md-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-md-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-md-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-md-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-md-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-md-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-md-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-md-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-md-0 {\n margin-left: 0;\n }\n\n .offset-md-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-md-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-md-3 {\n margin-left: 25%;\n }\n\n .offset-md-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-md-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-md-6 {\n margin-left: 50%;\n }\n\n .offset-md-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-md-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-md-9 {\n margin-left: 75%;\n }\n\n .offset-md-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-md-11 {\n margin-left: 91.66666667%;\n }\n\n .g-md-0,\n.gx-md-0 {\n --bs-gutter-x: 0;\n }\n\n .g-md-0,\n.gy-md-0 {\n --bs-gutter-y: 0;\n }\n\n .g-md-1,\n.gx-md-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-md-1,\n.gy-md-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-md-2,\n.gx-md-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-md-2,\n.gy-md-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-md-3,\n.gx-md-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-md-3,\n.gy-md-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-md-4,\n.gx-md-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-md-4,\n.gy-md-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-md-5,\n.gx-md-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-md-5,\n.gy-md-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 992px) {\n .col-lg {\n flex: 1 0 0%;\n }\n\n .row-cols-lg-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-lg-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-lg-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-lg-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-lg-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-lg-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-lg-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-lg-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-lg-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-lg-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-lg-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-lg-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-lg-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-lg-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-lg-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-lg-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-lg-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-lg-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-lg-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-lg-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-lg-0 {\n margin-left: 0;\n }\n\n .offset-lg-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-lg-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-lg-3 {\n margin-left: 25%;\n }\n\n .offset-lg-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-lg-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-lg-6 {\n margin-left: 50%;\n }\n\n .offset-lg-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-lg-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-lg-9 {\n margin-left: 75%;\n }\n\n .offset-lg-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-lg-11 {\n margin-left: 91.66666667%;\n }\n\n .g-lg-0,\n.gx-lg-0 {\n --bs-gutter-x: 0;\n }\n\n .g-lg-0,\n.gy-lg-0 {\n --bs-gutter-y: 0;\n }\n\n .g-lg-1,\n.gx-lg-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-lg-1,\n.gy-lg-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-lg-2,\n.gx-lg-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-lg-2,\n.gy-lg-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-lg-3,\n.gx-lg-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-lg-3,\n.gy-lg-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-lg-4,\n.gx-lg-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-lg-4,\n.gy-lg-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-lg-5,\n.gx-lg-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-lg-5,\n.gy-lg-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1200px) {\n .col-xl {\n flex: 1 0 0%;\n }\n\n .row-cols-xl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xl-0 {\n margin-left: 0;\n }\n\n .offset-xl-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-xl-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-xl-3 {\n margin-left: 25%;\n }\n\n .offset-xl-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-xl-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-xl-6 {\n margin-left: 50%;\n }\n\n .offset-xl-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-xl-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-xl-9 {\n margin-left: 75%;\n }\n\n .offset-xl-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-xl-11 {\n margin-left: 91.66666667%;\n }\n\n .g-xl-0,\n.gx-xl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xl-0,\n.gy-xl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xl-1,\n.gx-xl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xl-1,\n.gy-xl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xl-2,\n.gx-xl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xl-2,\n.gy-xl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xl-3,\n.gx-xl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xl-3,\n.gy-xl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xl-4,\n.gx-xl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xl-4,\n.gy-xl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xl-5,\n.gx-xl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xl-5,\n.gy-xl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1400px) {\n .col-xxl {\n flex: 1 0 0%;\n }\n\n .row-cols-xxl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xxl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xxl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xxl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xxl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xxl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xxl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xxl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xxl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xxl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xxl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xxl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xxl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xxl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xxl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xxl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xxl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xxl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xxl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xxl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xxl-0 {\n margin-left: 0;\n }\n\n .offset-xxl-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-xxl-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-xxl-3 {\n margin-left: 25%;\n }\n\n .offset-xxl-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-xxl-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-xxl-6 {\n margin-left: 50%;\n }\n\n .offset-xxl-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-xxl-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-xxl-9 {\n margin-left: 75%;\n }\n\n .offset-xxl-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-xxl-11 {\n margin-left: 91.66666667%;\n }\n\n .g-xxl-0,\n.gx-xxl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xxl-0,\n.gy-xxl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xxl-1,\n.gx-xxl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xxl-1,\n.gy-xxl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xxl-2,\n.gx-xxl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xxl-2,\n.gy-xxl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xxl-3,\n.gx-xxl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xxl-3,\n.gy-xxl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xxl-4,\n.gx-xxl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xxl-4,\n.gy-xxl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xxl-5,\n.gx-xxl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xxl-5,\n.gy-xxl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n.d-inline {\n display: inline !important;\n}\n\n.d-inline-block {\n display: inline-block !important;\n}\n\n.d-block {\n display: block !important;\n}\n\n.d-grid {\n display: grid !important;\n}\n\n.d-table {\n display: table !important;\n}\n\n.d-table-row {\n display: table-row !important;\n}\n\n.d-table-cell {\n display: table-cell !important;\n}\n\n.d-flex {\n display: flex !important;\n}\n\n.d-inline-flex {\n display: inline-flex !important;\n}\n\n.d-none {\n display: none !important;\n}\n\n.flex-fill {\n flex: 1 1 auto !important;\n}\n\n.flex-row {\n flex-direction: row !important;\n}\n\n.flex-column {\n flex-direction: column !important;\n}\n\n.flex-row-reverse {\n flex-direction: row-reverse !important;\n}\n\n.flex-column-reverse {\n flex-direction: column-reverse !important;\n}\n\n.flex-grow-0 {\n flex-grow: 0 !important;\n}\n\n.flex-grow-1 {\n flex-grow: 1 !important;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0 !important;\n}\n\n.flex-shrink-1 {\n flex-shrink: 1 !important;\n}\n\n.flex-wrap {\n flex-wrap: wrap !important;\n}\n\n.flex-nowrap {\n flex-wrap: nowrap !important;\n}\n\n.flex-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n}\n\n.justify-content-start {\n justify-content: flex-start !important;\n}\n\n.justify-content-end {\n justify-content: flex-end !important;\n}\n\n.justify-content-center {\n justify-content: center !important;\n}\n\n.justify-content-between {\n justify-content: space-between !important;\n}\n\n.justify-content-around {\n justify-content: space-around !important;\n}\n\n.justify-content-evenly {\n justify-content: space-evenly !important;\n}\n\n.align-items-start {\n align-items: flex-start !important;\n}\n\n.align-items-end {\n align-items: flex-end !important;\n}\n\n.align-items-center {\n align-items: center !important;\n}\n\n.align-items-baseline {\n align-items: baseline !important;\n}\n\n.align-items-stretch {\n align-items: stretch !important;\n}\n\n.align-content-start {\n align-content: flex-start !important;\n}\n\n.align-content-end {\n align-content: flex-end !important;\n}\n\n.align-content-center {\n align-content: center !important;\n}\n\n.align-content-between {\n align-content: space-between !important;\n}\n\n.align-content-around {\n align-content: space-around !important;\n}\n\n.align-content-stretch {\n align-content: stretch !important;\n}\n\n.align-self-auto {\n align-self: auto !important;\n}\n\n.align-self-start {\n align-self: flex-start !important;\n}\n\n.align-self-end {\n align-self: flex-end !important;\n}\n\n.align-self-center {\n align-self: center !important;\n}\n\n.align-self-baseline {\n align-self: baseline !important;\n}\n\n.align-self-stretch {\n align-self: stretch !important;\n}\n\n.order-first {\n order: -1 !important;\n}\n\n.order-0 {\n order: 0 !important;\n}\n\n.order-1 {\n order: 1 !important;\n}\n\n.order-2 {\n order: 2 !important;\n}\n\n.order-3 {\n order: 3 !important;\n}\n\n.order-4 {\n order: 4 !important;\n}\n\n.order-5 {\n order: 5 !important;\n}\n\n.order-last {\n order: 6 !important;\n}\n\n.m-0 {\n margin: 0 !important;\n}\n\n.m-1 {\n margin: 0.25rem !important;\n}\n\n.m-2 {\n margin: 0.5rem !important;\n}\n\n.m-3 {\n margin: 1rem !important;\n}\n\n.m-4 {\n margin: 1.5rem !important;\n}\n\n.m-5 {\n margin: 3rem !important;\n}\n\n.m-auto {\n margin: auto !important;\n}\n\n.mx-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n}\n\n.mx-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n}\n\n.mx-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n}\n\n.mx-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n}\n\n.mx-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n}\n\n.mx-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n}\n\n.mx-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n}\n\n.my-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n}\n\n.my-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n}\n\n.my-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n}\n\n.my-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n}\n\n.my-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n}\n\n.my-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n}\n\n.my-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n}\n\n.mt-0 {\n margin-top: 0 !important;\n}\n\n.mt-1 {\n margin-top: 0.25rem !important;\n}\n\n.mt-2 {\n margin-top: 0.5rem !important;\n}\n\n.mt-3 {\n margin-top: 1rem !important;\n}\n\n.mt-4 {\n margin-top: 1.5rem !important;\n}\n\n.mt-5 {\n margin-top: 3rem !important;\n}\n\n.mt-auto {\n margin-top: auto !important;\n}\n\n.me-0 {\n margin-right: 0 !important;\n}\n\n.me-1 {\n margin-right: 0.25rem !important;\n}\n\n.me-2 {\n margin-right: 0.5rem !important;\n}\n\n.me-3 {\n margin-right: 1rem !important;\n}\n\n.me-4 {\n margin-right: 1.5rem !important;\n}\n\n.me-5 {\n margin-right: 3rem !important;\n}\n\n.me-auto {\n margin-right: auto !important;\n}\n\n.mb-0 {\n margin-bottom: 0 !important;\n}\n\n.mb-1 {\n margin-bottom: 0.25rem !important;\n}\n\n.mb-2 {\n margin-bottom: 0.5rem !important;\n}\n\n.mb-3 {\n margin-bottom: 1rem !important;\n}\n\n.mb-4 {\n margin-bottom: 1.5rem !important;\n}\n\n.mb-5 {\n margin-bottom: 3rem !important;\n}\n\n.mb-auto {\n margin-bottom: auto !important;\n}\n\n.ms-0 {\n margin-left: 0 !important;\n}\n\n.ms-1 {\n margin-left: 0.25rem !important;\n}\n\n.ms-2 {\n margin-left: 0.5rem !important;\n}\n\n.ms-3 {\n margin-left: 1rem !important;\n}\n\n.ms-4 {\n margin-left: 1.5rem !important;\n}\n\n.ms-5 {\n margin-left: 3rem !important;\n}\n\n.ms-auto {\n margin-left: auto !important;\n}\n\n.p-0 {\n padding: 0 !important;\n}\n\n.p-1 {\n padding: 0.25rem !important;\n}\n\n.p-2 {\n padding: 0.5rem !important;\n}\n\n.p-3 {\n padding: 1rem !important;\n}\n\n.p-4 {\n padding: 1.5rem !important;\n}\n\n.p-5 {\n padding: 3rem !important;\n}\n\n.px-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n}\n\n.px-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n}\n\n.px-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n}\n\n.px-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n}\n\n.px-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n}\n\n.px-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n}\n\n.py-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n\n.py-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n}\n\n.py-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n}\n\n.py-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n}\n\n.py-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n}\n\n.py-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n}\n\n.pt-0 {\n padding-top: 0 !important;\n}\n\n.pt-1 {\n padding-top: 0.25rem !important;\n}\n\n.pt-2 {\n padding-top: 0.5rem !important;\n}\n\n.pt-3 {\n padding-top: 1rem !important;\n}\n\n.pt-4 {\n padding-top: 1.5rem !important;\n}\n\n.pt-5 {\n padding-top: 3rem !important;\n}\n\n.pe-0 {\n padding-right: 0 !important;\n}\n\n.pe-1 {\n padding-right: 0.25rem !important;\n}\n\n.pe-2 {\n padding-right: 0.5rem !important;\n}\n\n.pe-3 {\n padding-right: 1rem !important;\n}\n\n.pe-4 {\n padding-right: 1.5rem !important;\n}\n\n.pe-5 {\n padding-right: 3rem !important;\n}\n\n.pb-0 {\n padding-bottom: 0 !important;\n}\n\n.pb-1 {\n padding-bottom: 0.25rem !important;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem !important;\n}\n\n.pb-3 {\n padding-bottom: 1rem !important;\n}\n\n.pb-4 {\n padding-bottom: 1.5rem !important;\n}\n\n.pb-5 {\n padding-bottom: 3rem !important;\n}\n\n.ps-0 {\n padding-left: 0 !important;\n}\n\n.ps-1 {\n padding-left: 0.25rem !important;\n}\n\n.ps-2 {\n padding-left: 0.5rem !important;\n}\n\n.ps-3 {\n padding-left: 1rem !important;\n}\n\n.ps-4 {\n padding-left: 1.5rem !important;\n}\n\n.ps-5 {\n padding-left: 3rem !important;\n}\n\n@media (min-width: 576px) {\n .d-sm-inline {\n display: inline !important;\n }\n\n .d-sm-inline-block {\n display: inline-block !important;\n }\n\n .d-sm-block {\n display: block !important;\n }\n\n .d-sm-grid {\n display: grid !important;\n }\n\n .d-sm-table {\n display: table !important;\n }\n\n .d-sm-table-row {\n display: table-row !important;\n }\n\n .d-sm-table-cell {\n display: table-cell !important;\n }\n\n .d-sm-flex {\n display: flex !important;\n }\n\n .d-sm-inline-flex {\n display: inline-flex !important;\n }\n\n .d-sm-none {\n display: none !important;\n }\n\n .flex-sm-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-sm-row {\n flex-direction: row !important;\n }\n\n .flex-sm-column {\n flex-direction: column !important;\n }\n\n .flex-sm-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-sm-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-sm-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-sm-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-sm-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-sm-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-sm-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-sm-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-sm-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-sm-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-sm-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-sm-center {\n justify-content: center !important;\n }\n\n .justify-content-sm-between {\n justify-content: space-between !important;\n }\n\n .justify-content-sm-around {\n justify-content: space-around !important;\n }\n\n .justify-content-sm-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-sm-start {\n align-items: flex-start !important;\n }\n\n .align-items-sm-end {\n align-items: flex-end !important;\n }\n\n .align-items-sm-center {\n align-items: center !important;\n }\n\n .align-items-sm-baseline {\n align-items: baseline !important;\n }\n\n .align-items-sm-stretch {\n align-items: stretch !important;\n }\n\n .align-content-sm-start {\n align-content: flex-start !important;\n }\n\n .align-content-sm-end {\n align-content: flex-end !important;\n }\n\n .align-content-sm-center {\n align-content: center !important;\n }\n\n .align-content-sm-between {\n align-content: space-between !important;\n }\n\n .align-content-sm-around {\n align-content: space-around !important;\n }\n\n .align-content-sm-stretch {\n align-content: stretch !important;\n }\n\n .align-self-sm-auto {\n align-self: auto !important;\n }\n\n .align-self-sm-start {\n align-self: flex-start !important;\n }\n\n .align-self-sm-end {\n align-self: flex-end !important;\n }\n\n .align-self-sm-center {\n align-self: center !important;\n }\n\n .align-self-sm-baseline {\n align-self: baseline !important;\n }\n\n .align-self-sm-stretch {\n align-self: stretch !important;\n }\n\n .order-sm-first {\n order: -1 !important;\n }\n\n .order-sm-0 {\n order: 0 !important;\n }\n\n .order-sm-1 {\n order: 1 !important;\n }\n\n .order-sm-2 {\n order: 2 !important;\n }\n\n .order-sm-3 {\n order: 3 !important;\n }\n\n .order-sm-4 {\n order: 4 !important;\n }\n\n .order-sm-5 {\n order: 5 !important;\n }\n\n .order-sm-last {\n order: 6 !important;\n }\n\n .m-sm-0 {\n margin: 0 !important;\n }\n\n .m-sm-1 {\n margin: 0.25rem !important;\n }\n\n .m-sm-2 {\n margin: 0.5rem !important;\n }\n\n .m-sm-3 {\n margin: 1rem !important;\n }\n\n .m-sm-4 {\n margin: 1.5rem !important;\n }\n\n .m-sm-5 {\n margin: 3rem !important;\n }\n\n .m-sm-auto {\n margin: auto !important;\n }\n\n .mx-sm-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-sm-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-sm-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-sm-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-sm-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-sm-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-sm-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-sm-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-sm-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-sm-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-sm-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-sm-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-sm-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-sm-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-sm-0 {\n margin-top: 0 !important;\n }\n\n .mt-sm-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-sm-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-sm-3 {\n margin-top: 1rem !important;\n }\n\n .mt-sm-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-sm-5 {\n margin-top: 3rem !important;\n }\n\n .mt-sm-auto {\n margin-top: auto !important;\n }\n\n .me-sm-0 {\n margin-right: 0 !important;\n }\n\n .me-sm-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-sm-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-sm-3 {\n margin-right: 1rem !important;\n }\n\n .me-sm-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-sm-5 {\n margin-right: 3rem !important;\n }\n\n .me-sm-auto {\n margin-right: auto !important;\n }\n\n .mb-sm-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-sm-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-sm-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-sm-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-sm-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-sm-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-sm-auto {\n margin-bottom: auto !important;\n }\n\n .ms-sm-0 {\n margin-left: 0 !important;\n }\n\n .ms-sm-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-sm-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-sm-3 {\n margin-left: 1rem !important;\n }\n\n .ms-sm-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-sm-5 {\n margin-left: 3rem !important;\n }\n\n .ms-sm-auto {\n margin-left: auto !important;\n }\n\n .p-sm-0 {\n padding: 0 !important;\n }\n\n .p-sm-1 {\n padding: 0.25rem !important;\n }\n\n .p-sm-2 {\n padding: 0.5rem !important;\n }\n\n .p-sm-3 {\n padding: 1rem !important;\n }\n\n .p-sm-4 {\n padding: 1.5rem !important;\n }\n\n .p-sm-5 {\n padding: 3rem !important;\n }\n\n .px-sm-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-sm-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-sm-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-sm-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-sm-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-sm-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-sm-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-sm-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-sm-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-sm-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-sm-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-sm-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-sm-0 {\n padding-top: 0 !important;\n }\n\n .pt-sm-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-sm-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-sm-3 {\n padding-top: 1rem !important;\n }\n\n .pt-sm-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-sm-5 {\n padding-top: 3rem !important;\n }\n\n .pe-sm-0 {\n padding-right: 0 !important;\n }\n\n .pe-sm-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-sm-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-sm-3 {\n padding-right: 1rem !important;\n }\n\n .pe-sm-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-sm-5 {\n padding-right: 3rem !important;\n }\n\n .pb-sm-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-sm-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-sm-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-sm-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-sm-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-sm-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-sm-0 {\n padding-left: 0 !important;\n }\n\n .ps-sm-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-sm-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-sm-3 {\n padding-left: 1rem !important;\n }\n\n .ps-sm-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-sm-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 768px) {\n .d-md-inline {\n display: inline !important;\n }\n\n .d-md-inline-block {\n display: inline-block !important;\n }\n\n .d-md-block {\n display: block !important;\n }\n\n .d-md-grid {\n display: grid !important;\n }\n\n .d-md-table {\n display: table !important;\n }\n\n .d-md-table-row {\n display: table-row !important;\n }\n\n .d-md-table-cell {\n display: table-cell !important;\n }\n\n .d-md-flex {\n display: flex !important;\n }\n\n .d-md-inline-flex {\n display: inline-flex !important;\n }\n\n .d-md-none {\n display: none !important;\n }\n\n .flex-md-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-md-row {\n flex-direction: row !important;\n }\n\n .flex-md-column {\n flex-direction: column !important;\n }\n\n .flex-md-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-md-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-md-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-md-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-md-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-md-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-md-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-md-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-md-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-md-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-md-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-md-center {\n justify-content: center !important;\n }\n\n .justify-content-md-between {\n justify-content: space-between !important;\n }\n\n .justify-content-md-around {\n justify-content: space-around !important;\n }\n\n .justify-content-md-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-md-start {\n align-items: flex-start !important;\n }\n\n .align-items-md-end {\n align-items: flex-end !important;\n }\n\n .align-items-md-center {\n align-items: center !important;\n }\n\n .align-items-md-baseline {\n align-items: baseline !important;\n }\n\n .align-items-md-stretch {\n align-items: stretch !important;\n }\n\n .align-content-md-start {\n align-content: flex-start !important;\n }\n\n .align-content-md-end {\n align-content: flex-end !important;\n }\n\n .align-content-md-center {\n align-content: center !important;\n }\n\n .align-content-md-between {\n align-content: space-between !important;\n }\n\n .align-content-md-around {\n align-content: space-around !important;\n }\n\n .align-content-md-stretch {\n align-content: stretch !important;\n }\n\n .align-self-md-auto {\n align-self: auto !important;\n }\n\n .align-self-md-start {\n align-self: flex-start !important;\n }\n\n .align-self-md-end {\n align-self: flex-end !important;\n }\n\n .align-self-md-center {\n align-self: center !important;\n }\n\n .align-self-md-baseline {\n align-self: baseline !important;\n }\n\n .align-self-md-stretch {\n align-self: stretch !important;\n }\n\n .order-md-first {\n order: -1 !important;\n }\n\n .order-md-0 {\n order: 0 !important;\n }\n\n .order-md-1 {\n order: 1 !important;\n }\n\n .order-md-2 {\n order: 2 !important;\n }\n\n .order-md-3 {\n order: 3 !important;\n }\n\n .order-md-4 {\n order: 4 !important;\n }\n\n .order-md-5 {\n order: 5 !important;\n }\n\n .order-md-last {\n order: 6 !important;\n }\n\n .m-md-0 {\n margin: 0 !important;\n }\n\n .m-md-1 {\n margin: 0.25rem !important;\n }\n\n .m-md-2 {\n margin: 0.5rem !important;\n }\n\n .m-md-3 {\n margin: 1rem !important;\n }\n\n .m-md-4 {\n margin: 1.5rem !important;\n }\n\n .m-md-5 {\n margin: 3rem !important;\n }\n\n .m-md-auto {\n margin: auto !important;\n }\n\n .mx-md-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-md-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-md-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-md-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-md-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-md-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-md-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-md-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-md-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-md-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-md-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-md-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-md-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-md-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-md-0 {\n margin-top: 0 !important;\n }\n\n .mt-md-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-md-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-md-3 {\n margin-top: 1rem !important;\n }\n\n .mt-md-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-md-5 {\n margin-top: 3rem !important;\n }\n\n .mt-md-auto {\n margin-top: auto !important;\n }\n\n .me-md-0 {\n margin-right: 0 !important;\n }\n\n .me-md-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-md-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-md-3 {\n margin-right: 1rem !important;\n }\n\n .me-md-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-md-5 {\n margin-right: 3rem !important;\n }\n\n .me-md-auto {\n margin-right: auto !important;\n }\n\n .mb-md-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-md-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-md-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-md-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-md-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-md-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-md-auto {\n margin-bottom: auto !important;\n }\n\n .ms-md-0 {\n margin-left: 0 !important;\n }\n\n .ms-md-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-md-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-md-3 {\n margin-left: 1rem !important;\n }\n\n .ms-md-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-md-5 {\n margin-left: 3rem !important;\n }\n\n .ms-md-auto {\n margin-left: auto !important;\n }\n\n .p-md-0 {\n padding: 0 !important;\n }\n\n .p-md-1 {\n padding: 0.25rem !important;\n }\n\n .p-md-2 {\n padding: 0.5rem !important;\n }\n\n .p-md-3 {\n padding: 1rem !important;\n }\n\n .p-md-4 {\n padding: 1.5rem !important;\n }\n\n .p-md-5 {\n padding: 3rem !important;\n }\n\n .px-md-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-md-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-md-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-md-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-md-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-md-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-md-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-md-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-md-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-md-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-md-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-md-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-md-0 {\n padding-top: 0 !important;\n }\n\n .pt-md-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-md-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-md-3 {\n padding-top: 1rem !important;\n }\n\n .pt-md-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-md-5 {\n padding-top: 3rem !important;\n }\n\n .pe-md-0 {\n padding-right: 0 !important;\n }\n\n .pe-md-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-md-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-md-3 {\n padding-right: 1rem !important;\n }\n\n .pe-md-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-md-5 {\n padding-right: 3rem !important;\n }\n\n .pb-md-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-md-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-md-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-md-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-md-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-md-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-md-0 {\n padding-left: 0 !important;\n }\n\n .ps-md-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-md-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-md-3 {\n padding-left: 1rem !important;\n }\n\n .ps-md-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-md-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 992px) {\n .d-lg-inline {\n display: inline !important;\n }\n\n .d-lg-inline-block {\n display: inline-block !important;\n }\n\n .d-lg-block {\n display: block !important;\n }\n\n .d-lg-grid {\n display: grid !important;\n }\n\n .d-lg-table {\n display: table !important;\n }\n\n .d-lg-table-row {\n display: table-row !important;\n }\n\n .d-lg-table-cell {\n display: table-cell !important;\n }\n\n .d-lg-flex {\n display: flex !important;\n }\n\n .d-lg-inline-flex {\n display: inline-flex !important;\n }\n\n .d-lg-none {\n display: none !important;\n }\n\n .flex-lg-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-lg-row {\n flex-direction: row !important;\n }\n\n .flex-lg-column {\n flex-direction: column !important;\n }\n\n .flex-lg-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-lg-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-lg-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-lg-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-lg-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-lg-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-lg-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-lg-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-lg-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-lg-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-lg-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-lg-center {\n justify-content: center !important;\n }\n\n .justify-content-lg-between {\n justify-content: space-between !important;\n }\n\n .justify-content-lg-around {\n justify-content: space-around !important;\n }\n\n .justify-content-lg-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-lg-start {\n align-items: flex-start !important;\n }\n\n .align-items-lg-end {\n align-items: flex-end !important;\n }\n\n .align-items-lg-center {\n align-items: center !important;\n }\n\n .align-items-lg-baseline {\n align-items: baseline !important;\n }\n\n .align-items-lg-stretch {\n align-items: stretch !important;\n }\n\n .align-content-lg-start {\n align-content: flex-start !important;\n }\n\n .align-content-lg-end {\n align-content: flex-end !important;\n }\n\n .align-content-lg-center {\n align-content: center !important;\n }\n\n .align-content-lg-between {\n align-content: space-between !important;\n }\n\n .align-content-lg-around {\n align-content: space-around !important;\n }\n\n .align-content-lg-stretch {\n align-content: stretch !important;\n }\n\n .align-self-lg-auto {\n align-self: auto !important;\n }\n\n .align-self-lg-start {\n align-self: flex-start !important;\n }\n\n .align-self-lg-end {\n align-self: flex-end !important;\n }\n\n .align-self-lg-center {\n align-self: center !important;\n }\n\n .align-self-lg-baseline {\n align-self: baseline !important;\n }\n\n .align-self-lg-stretch {\n align-self: stretch !important;\n }\n\n .order-lg-first {\n order: -1 !important;\n }\n\n .order-lg-0 {\n order: 0 !important;\n }\n\n .order-lg-1 {\n order: 1 !important;\n }\n\n .order-lg-2 {\n order: 2 !important;\n }\n\n .order-lg-3 {\n order: 3 !important;\n }\n\n .order-lg-4 {\n order: 4 !important;\n }\n\n .order-lg-5 {\n order: 5 !important;\n }\n\n .order-lg-last {\n order: 6 !important;\n }\n\n .m-lg-0 {\n margin: 0 !important;\n }\n\n .m-lg-1 {\n margin: 0.25rem !important;\n }\n\n .m-lg-2 {\n margin: 0.5rem !important;\n }\n\n .m-lg-3 {\n margin: 1rem !important;\n }\n\n .m-lg-4 {\n margin: 1.5rem !important;\n }\n\n .m-lg-5 {\n margin: 3rem !important;\n }\n\n .m-lg-auto {\n margin: auto !important;\n }\n\n .mx-lg-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-lg-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-lg-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-lg-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-lg-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-lg-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-lg-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-lg-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-lg-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-lg-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-lg-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-lg-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-lg-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-lg-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-lg-0 {\n margin-top: 0 !important;\n }\n\n .mt-lg-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-lg-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-lg-3 {\n margin-top: 1rem !important;\n }\n\n .mt-lg-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-lg-5 {\n margin-top: 3rem !important;\n }\n\n .mt-lg-auto {\n margin-top: auto !important;\n }\n\n .me-lg-0 {\n margin-right: 0 !important;\n }\n\n .me-lg-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-lg-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-lg-3 {\n margin-right: 1rem !important;\n }\n\n .me-lg-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-lg-5 {\n margin-right: 3rem !important;\n }\n\n .me-lg-auto {\n margin-right: auto !important;\n }\n\n .mb-lg-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-lg-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-lg-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-lg-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-lg-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-lg-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-lg-auto {\n margin-bottom: auto !important;\n }\n\n .ms-lg-0 {\n margin-left: 0 !important;\n }\n\n .ms-lg-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-lg-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-lg-3 {\n margin-left: 1rem !important;\n }\n\n .ms-lg-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-lg-5 {\n margin-left: 3rem !important;\n }\n\n .ms-lg-auto {\n margin-left: auto !important;\n }\n\n .p-lg-0 {\n padding: 0 !important;\n }\n\n .p-lg-1 {\n padding: 0.25rem !important;\n }\n\n .p-lg-2 {\n padding: 0.5rem !important;\n }\n\n .p-lg-3 {\n padding: 1rem !important;\n }\n\n .p-lg-4 {\n padding: 1.5rem !important;\n }\n\n .p-lg-5 {\n padding: 3rem !important;\n }\n\n .px-lg-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-lg-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-lg-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-lg-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-lg-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-lg-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-lg-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-lg-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-lg-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-lg-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-lg-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-lg-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-lg-0 {\n padding-top: 0 !important;\n }\n\n .pt-lg-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-lg-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-lg-3 {\n padding-top: 1rem !important;\n }\n\n .pt-lg-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-lg-5 {\n padding-top: 3rem !important;\n }\n\n .pe-lg-0 {\n padding-right: 0 !important;\n }\n\n .pe-lg-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-lg-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-lg-3 {\n padding-right: 1rem !important;\n }\n\n .pe-lg-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-lg-5 {\n padding-right: 3rem !important;\n }\n\n .pb-lg-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-lg-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-lg-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-lg-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-lg-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-lg-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-lg-0 {\n padding-left: 0 !important;\n }\n\n .ps-lg-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-lg-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-lg-3 {\n padding-left: 1rem !important;\n }\n\n .ps-lg-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-lg-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1200px) {\n .d-xl-inline {\n display: inline !important;\n }\n\n .d-xl-inline-block {\n display: inline-block !important;\n }\n\n .d-xl-block {\n display: block !important;\n }\n\n .d-xl-grid {\n display: grid !important;\n }\n\n .d-xl-table {\n display: table !important;\n }\n\n .d-xl-table-row {\n display: table-row !important;\n }\n\n .d-xl-table-cell {\n display: table-cell !important;\n }\n\n .d-xl-flex {\n display: flex !important;\n }\n\n .d-xl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xl-none {\n display: none !important;\n }\n\n .flex-xl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xl-row {\n flex-direction: row !important;\n }\n\n .flex-xl-column {\n flex-direction: column !important;\n }\n\n .flex-xl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xl-center {\n justify-content: center !important;\n }\n\n .justify-content-xl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xl-center {\n align-items: center !important;\n }\n\n .align-items-xl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xl-center {\n align-content: center !important;\n }\n\n .align-content-xl-between {\n align-content: space-between !important;\n }\n\n .align-content-xl-around {\n align-content: space-around !important;\n }\n\n .align-content-xl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xl-auto {\n align-self: auto !important;\n }\n\n .align-self-xl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xl-center {\n align-self: center !important;\n }\n\n .align-self-xl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xl-stretch {\n align-self: stretch !important;\n }\n\n .order-xl-first {\n order: -1 !important;\n }\n\n .order-xl-0 {\n order: 0 !important;\n }\n\n .order-xl-1 {\n order: 1 !important;\n }\n\n .order-xl-2 {\n order: 2 !important;\n }\n\n .order-xl-3 {\n order: 3 !important;\n }\n\n .order-xl-4 {\n order: 4 !important;\n }\n\n .order-xl-5 {\n order: 5 !important;\n }\n\n .order-xl-last {\n order: 6 !important;\n }\n\n .m-xl-0 {\n margin: 0 !important;\n }\n\n .m-xl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xl-3 {\n margin: 1rem !important;\n }\n\n .m-xl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xl-5 {\n margin: 3rem !important;\n }\n\n .m-xl-auto {\n margin: auto !important;\n }\n\n .mx-xl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-xl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-xl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-xl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-xl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-xl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-xl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-xl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xl-auto {\n margin-top: auto !important;\n }\n\n .me-xl-0 {\n margin-right: 0 !important;\n }\n\n .me-xl-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-xl-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-xl-3 {\n margin-right: 1rem !important;\n }\n\n .me-xl-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-xl-5 {\n margin-right: 3rem !important;\n }\n\n .me-xl-auto {\n margin-right: auto !important;\n }\n\n .mb-xl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xl-0 {\n margin-left: 0 !important;\n }\n\n .ms-xl-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-xl-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-xl-3 {\n margin-left: 1rem !important;\n }\n\n .ms-xl-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-xl-5 {\n margin-left: 3rem !important;\n }\n\n .ms-xl-auto {\n margin-left: auto !important;\n }\n\n .p-xl-0 {\n padding: 0 !important;\n }\n\n .p-xl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xl-3 {\n padding: 1rem !important;\n }\n\n .p-xl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xl-5 {\n padding: 3rem !important;\n }\n\n .px-xl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-xl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-xl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-xl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-xl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-xl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-xl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xl-0 {\n padding-right: 0 !important;\n }\n\n .pe-xl-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-xl-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-xl-3 {\n padding-right: 1rem !important;\n }\n\n .pe-xl-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-xl-5 {\n padding-right: 3rem !important;\n }\n\n .pb-xl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xl-0 {\n padding-left: 0 !important;\n }\n\n .ps-xl-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-xl-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-xl-3 {\n padding-left: 1rem !important;\n }\n\n .ps-xl-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-xl-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1400px) {\n .d-xxl-inline {\n display: inline !important;\n }\n\n .d-xxl-inline-block {\n display: inline-block !important;\n }\n\n .d-xxl-block {\n display: block !important;\n }\n\n .d-xxl-grid {\n display: grid !important;\n }\n\n .d-xxl-table {\n display: table !important;\n }\n\n .d-xxl-table-row {\n display: table-row !important;\n }\n\n .d-xxl-table-cell {\n display: table-cell !important;\n }\n\n .d-xxl-flex {\n display: flex !important;\n }\n\n .d-xxl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xxl-none {\n display: none !important;\n }\n\n .flex-xxl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xxl-row {\n flex-direction: row !important;\n }\n\n .flex-xxl-column {\n flex-direction: column !important;\n }\n\n .flex-xxl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xxl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xxl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xxl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xxl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xxl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xxl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xxl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xxl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xxl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xxl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xxl-center {\n justify-content: center !important;\n }\n\n .justify-content-xxl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xxl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xxl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xxl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xxl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xxl-center {\n align-items: center !important;\n }\n\n .align-items-xxl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xxl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xxl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xxl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xxl-center {\n align-content: center !important;\n }\n\n .align-content-xxl-between {\n align-content: space-between !important;\n }\n\n .align-content-xxl-around {\n align-content: space-around !important;\n }\n\n .align-content-xxl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xxl-auto {\n align-self: auto !important;\n }\n\n .align-self-xxl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xxl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xxl-center {\n align-self: center !important;\n }\n\n .align-self-xxl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xxl-stretch {\n align-self: stretch !important;\n }\n\n .order-xxl-first {\n order: -1 !important;\n }\n\n .order-xxl-0 {\n order: 0 !important;\n }\n\n .order-xxl-1 {\n order: 1 !important;\n }\n\n .order-xxl-2 {\n order: 2 !important;\n }\n\n .order-xxl-3 {\n order: 3 !important;\n }\n\n .order-xxl-4 {\n order: 4 !important;\n }\n\n .order-xxl-5 {\n order: 5 !important;\n }\n\n .order-xxl-last {\n order: 6 !important;\n }\n\n .m-xxl-0 {\n margin: 0 !important;\n }\n\n .m-xxl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xxl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xxl-3 {\n margin: 1rem !important;\n }\n\n .m-xxl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xxl-5 {\n margin: 3rem !important;\n }\n\n .m-xxl-auto {\n margin: auto !important;\n }\n\n .mx-xxl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-xxl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-xxl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-xxl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-xxl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-xxl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-xxl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-xxl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xxl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xxl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xxl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xxl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xxl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xxl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xxl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xxl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xxl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xxl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xxl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xxl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xxl-auto {\n margin-top: auto !important;\n }\n\n .me-xxl-0 {\n margin-right: 0 !important;\n }\n\n .me-xxl-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-xxl-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-xxl-3 {\n margin-right: 1rem !important;\n }\n\n .me-xxl-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-xxl-5 {\n margin-right: 3rem !important;\n }\n\n .me-xxl-auto {\n margin-right: auto !important;\n }\n\n .mb-xxl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xxl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xxl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xxl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xxl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xxl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xxl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xxl-0 {\n margin-left: 0 !important;\n }\n\n .ms-xxl-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-xxl-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-xxl-3 {\n margin-left: 1rem !important;\n }\n\n .ms-xxl-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-xxl-5 {\n margin-left: 3rem !important;\n }\n\n .ms-xxl-auto {\n margin-left: auto !important;\n }\n\n .p-xxl-0 {\n padding: 0 !important;\n }\n\n .p-xxl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xxl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xxl-3 {\n padding: 1rem !important;\n }\n\n .p-xxl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xxl-5 {\n padding: 3rem !important;\n }\n\n .px-xxl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-xxl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-xxl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-xxl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-xxl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-xxl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-xxl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xxl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xxl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xxl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xxl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xxl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xxl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xxl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xxl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xxl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xxl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xxl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xxl-0 {\n padding-right: 0 !important;\n }\n\n .pe-xxl-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-xxl-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-xxl-3 {\n padding-right: 1rem !important;\n }\n\n .pe-xxl-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-xxl-5 {\n padding-right: 3rem !important;\n }\n\n .pb-xxl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xxl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xxl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xxl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xxl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xxl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xxl-0 {\n padding-left: 0 !important;\n }\n\n .ps-xxl-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-xxl-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-xxl-3 {\n padding-left: 1rem !important;\n }\n\n .ps-xxl-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-xxl-5 {\n padding-left: 3rem !important;\n }\n}\n@media print {\n .d-print-inline {\n display: inline !important;\n }\n\n .d-print-inline-block {\n display: inline-block !important;\n }\n\n .d-print-block {\n display: block !important;\n }\n\n .d-print-grid {\n display: grid !important;\n }\n\n .d-print-table {\n display: table !important;\n }\n\n .d-print-table-row {\n display: table-row !important;\n }\n\n .d-print-table-cell {\n display: table-cell !important;\n }\n\n .d-print-flex {\n display: flex !important;\n }\n\n .d-print-inline-flex {\n display: inline-flex !important;\n }\n\n .d-print-none {\n display: none !important;\n }\n}\n\n/*# sourceMappingURL=bootstrap-grid.css.map */\n","// Breakpoint viewport sizes and media queries.\n//\n// Breakpoints are defined as a map of (name: minimum width), order from small to large:\n//\n// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n//\n// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n\n// Name of the next breakpoint, or null for the last breakpoint.\n//\n// >> breakpoint-next(sm)\n// md\n// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// md\n// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n// md\n@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {\n $n: index($breakpoint-names, $name);\n @if not $n {\n @error \"breakpoint `#{$name}` not found in `#{$breakpoints}`\";\n }\n @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);\n}\n\n// Minimum breakpoint width. Null for the smallest (first) breakpoint.\n//\n// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 576px\n@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {\n $min: map-get($breakpoints, $name);\n @return if($min != 0, $min, null);\n}\n\n// Maximum breakpoint width.\n// The maximum value is reduced by 0.02px to work around the limitations of\n// `min-` and `max-` prefixes and viewports with fractional widths.\n// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n// See https://bugs.webkit.org/show_bug.cgi?id=178261\n//\n// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 767.98px\n@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {\n $max: map-get($breakpoints, $name);\n @return if($max and $max > 0, $max - .02, null);\n}\n\n// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n// Useful for making responsive utilities.\n//\n// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"\" (Returns a blank string)\n// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"-sm\"\n@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {\n @return if(breakpoint-min($name, $breakpoints) == null, \"\", \"-#{$name}\");\n}\n\n// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n// Makes the @content apply to the given breakpoint and wider.\n@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n @if $min {\n @media (min-width: $min) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n// Makes the @content apply to the given breakpoint and narrower.\n@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {\n $max: breakpoint-max($name, $breakpoints);\n @if $max {\n @media (max-width: $max) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media that spans multiple breakpoint widths.\n// Makes the @content apply between the min and max breakpoints\n@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($lower, $breakpoints);\n $max: breakpoint-max($upper, $breakpoints);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($lower, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($upper, $breakpoints) {\n @content;\n }\n }\n}\n\n// Media between the breakpoint's minimum and maximum widths.\n// No minimum for the smallest breakpoint, and no maximum for the largest one.\n// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n $next: breakpoint-next($name, $breakpoints);\n $max: breakpoint-max($next);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($name, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($next, $breakpoints) {\n @content;\n }\n }\n}\n","// Variables\n//\n// Variables should follow the `$component-state-property-size` formula for\n// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.\n\n// Color system\n\n// scss-docs-start gray-color-variables\n$white: #fff !default;\n$gray-100: #f8f9fa !default;\n$gray-200: #e9ecef !default;\n$gray-300: #dee2e6 !default;\n$gray-400: #ced4da !default;\n$gray-500: #adb5bd !default;\n$gray-600: #6c757d !default;\n$gray-700: #495057 !default;\n$gray-800: #343a40 !default;\n$gray-900: #212529 !default;\n$black: #000 !default;\n// scss-docs-end gray-color-variables\n\n// fusv-disable\n// scss-docs-start gray-colors-map\n$grays: (\n \"100\": $gray-100,\n \"200\": $gray-200,\n \"300\": $gray-300,\n \"400\": $gray-400,\n \"500\": $gray-500,\n \"600\": $gray-600,\n \"700\": $gray-700,\n \"800\": $gray-800,\n \"900\": $gray-900\n) !default;\n// scss-docs-end gray-colors-map\n// fusv-enable\n\n// scss-docs-start color-variables\n$blue: #0d6efd !default;\n$indigo: #6610f2 !default;\n$purple: #6f42c1 !default;\n$pink: #d63384 !default;\n$red: #dc3545 !default;\n$orange: #fd7e14 !default;\n$yellow: #ffc107 !default;\n$green: #198754 !default;\n$teal: #20c997 !default;\n$cyan: #0dcaf0 !default;\n// scss-docs-end color-variables\n\n// scss-docs-start colors-map\n$colors: (\n \"blue\": $blue,\n \"indigo\": $indigo,\n \"purple\": $purple,\n \"pink\": $pink,\n \"red\": $red,\n \"orange\": $orange,\n \"yellow\": $yellow,\n \"green\": $green,\n \"teal\": $teal,\n \"cyan\": $cyan,\n \"white\": $white,\n \"gray\": $gray-600,\n \"gray-dark\": $gray-800\n) !default;\n// scss-docs-end colors-map\n\n// scss-docs-start theme-color-variables\n$primary: $blue !default;\n$secondary: $gray-600 !default;\n$success: $green !default;\n$info: $cyan !default;\n$warning: $yellow !default;\n$danger: $red !default;\n$light: $gray-100 !default;\n$dark: $gray-900 !default;\n// scss-docs-end theme-color-variables\n\n// scss-docs-start theme-colors-map\n$theme-colors: (\n \"primary\": $primary,\n \"secondary\": $secondary,\n \"success\": $success,\n \"info\": $info,\n \"warning\": $warning,\n \"danger\": $danger,\n \"light\": $light,\n \"dark\": $dark\n) !default;\n// scss-docs-end theme-colors-map\n\n// scss-docs-start theme-colors-rgb\n$theme-colors-rgb: map-loop($theme-colors, to-rgb, \"$value\") !default;\n// scss-docs-end theme-colors-rgb\n\n// The contrast ratio to reach against white, to determine if color changes from \"light\" to \"dark\". Acceptable values for WCAG 2.0 are 3, 4.5 and 7.\n// See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast\n$min-contrast-ratio: 4.5 !default;\n\n// Customize the light and dark text colors for use in our color contrast function.\n$color-contrast-dark: $black !default;\n$color-contrast-light: $white !default;\n\n// fusv-disable\n$blue-100: tint-color($blue, 80%) !default;\n$blue-200: tint-color($blue, 60%) !default;\n$blue-300: tint-color($blue, 40%) !default;\n$blue-400: tint-color($blue, 20%) !default;\n$blue-500: $blue !default;\n$blue-600: shade-color($blue, 20%) !default;\n$blue-700: shade-color($blue, 40%) !default;\n$blue-800: shade-color($blue, 60%) !default;\n$blue-900: shade-color($blue, 80%) !default;\n\n$indigo-100: tint-color($indigo, 80%) !default;\n$indigo-200: tint-color($indigo, 60%) !default;\n$indigo-300: tint-color($indigo, 40%) !default;\n$indigo-400: tint-color($indigo, 20%) !default;\n$indigo-500: $indigo !default;\n$indigo-600: shade-color($indigo, 20%) !default;\n$indigo-700: shade-color($indigo, 40%) !default;\n$indigo-800: shade-color($indigo, 60%) !default;\n$indigo-900: shade-color($indigo, 80%) !default;\n\n$purple-100: tint-color($purple, 80%) !default;\n$purple-200: tint-color($purple, 60%) !default;\n$purple-300: tint-color($purple, 40%) !default;\n$purple-400: tint-color($purple, 20%) !default;\n$purple-500: $purple !default;\n$purple-600: shade-color($purple, 20%) !default;\n$purple-700: shade-color($purple, 40%) !default;\n$purple-800: shade-color($purple, 60%) !default;\n$purple-900: shade-color($purple, 80%) !default;\n\n$pink-100: tint-color($pink, 80%) !default;\n$pink-200: tint-color($pink, 60%) !default;\n$pink-300: tint-color($pink, 40%) !default;\n$pink-400: tint-color($pink, 20%) !default;\n$pink-500: $pink !default;\n$pink-600: shade-color($pink, 20%) !default;\n$pink-700: shade-color($pink, 40%) !default;\n$pink-800: shade-color($pink, 60%) !default;\n$pink-900: shade-color($pink, 80%) !default;\n\n$red-100: tint-color($red, 80%) !default;\n$red-200: tint-color($red, 60%) !default;\n$red-300: tint-color($red, 40%) !default;\n$red-400: tint-color($red, 20%) !default;\n$red-500: $red !default;\n$red-600: shade-color($red, 20%) !default;\n$red-700: shade-color($red, 40%) !default;\n$red-800: shade-color($red, 60%) !default;\n$red-900: shade-color($red, 80%) !default;\n\n$orange-100: tint-color($orange, 80%) !default;\n$orange-200: tint-color($orange, 60%) !default;\n$orange-300: tint-color($orange, 40%) !default;\n$orange-400: tint-color($orange, 20%) !default;\n$orange-500: $orange !default;\n$orange-600: shade-color($orange, 20%) !default;\n$orange-700: shade-color($orange, 40%) !default;\n$orange-800: shade-color($orange, 60%) !default;\n$orange-900: shade-color($orange, 80%) !default;\n\n$yellow-100: tint-color($yellow, 80%) !default;\n$yellow-200: tint-color($yellow, 60%) !default;\n$yellow-300: tint-color($yellow, 40%) !default;\n$yellow-400: tint-color($yellow, 20%) !default;\n$yellow-500: $yellow !default;\n$yellow-600: shade-color($yellow, 20%) !default;\n$yellow-700: shade-color($yellow, 40%) !default;\n$yellow-800: shade-color($yellow, 60%) !default;\n$yellow-900: shade-color($yellow, 80%) !default;\n\n$green-100: tint-color($green, 80%) !default;\n$green-200: tint-color($green, 60%) !default;\n$green-300: tint-color($green, 40%) !default;\n$green-400: tint-color($green, 20%) !default;\n$green-500: $green !default;\n$green-600: shade-color($green, 20%) !default;\n$green-700: shade-color($green, 40%) !default;\n$green-800: shade-color($green, 60%) !default;\n$green-900: shade-color($green, 80%) !default;\n\n$teal-100: tint-color($teal, 80%) !default;\n$teal-200: tint-color($teal, 60%) !default;\n$teal-300: tint-color($teal, 40%) !default;\n$teal-400: tint-color($teal, 20%) !default;\n$teal-500: $teal !default;\n$teal-600: shade-color($teal, 20%) !default;\n$teal-700: shade-color($teal, 40%) !default;\n$teal-800: shade-color($teal, 60%) !default;\n$teal-900: shade-color($teal, 80%) !default;\n\n$cyan-100: tint-color($cyan, 80%) !default;\n$cyan-200: tint-color($cyan, 60%) !default;\n$cyan-300: tint-color($cyan, 40%) !default;\n$cyan-400: tint-color($cyan, 20%) !default;\n$cyan-500: $cyan !default;\n$cyan-600: shade-color($cyan, 20%) !default;\n$cyan-700: shade-color($cyan, 40%) !default;\n$cyan-800: shade-color($cyan, 60%) !default;\n$cyan-900: shade-color($cyan, 80%) !default;\n\n$blues: (\n \"blue-100\": $blue-100,\n \"blue-200\": $blue-200,\n \"blue-300\": $blue-300,\n \"blue-400\": $blue-400,\n \"blue-500\": $blue-500,\n \"blue-600\": $blue-600,\n \"blue-700\": $blue-700,\n \"blue-800\": $blue-800,\n \"blue-900\": $blue-900\n) !default;\n\n$indigos: (\n \"indigo-100\": $indigo-100,\n \"indigo-200\": $indigo-200,\n \"indigo-300\": $indigo-300,\n \"indigo-400\": $indigo-400,\n \"indigo-500\": $indigo-500,\n \"indigo-600\": $indigo-600,\n \"indigo-700\": $indigo-700,\n \"indigo-800\": $indigo-800,\n \"indigo-900\": $indigo-900\n) !default;\n\n$purples: (\n \"purple-100\": $purple-200,\n \"purple-200\": $purple-100,\n \"purple-300\": $purple-300,\n \"purple-400\": $purple-400,\n \"purple-500\": $purple-500,\n \"purple-600\": $purple-600,\n \"purple-700\": $purple-700,\n \"purple-800\": $purple-800,\n \"purple-900\": $purple-900\n) !default;\n\n$pinks: (\n \"pink-100\": $pink-100,\n \"pink-200\": $pink-200,\n \"pink-300\": $pink-300,\n \"pink-400\": $pink-400,\n \"pink-500\": $pink-500,\n \"pink-600\": $pink-600,\n \"pink-700\": $pink-700,\n \"pink-800\": $pink-800,\n \"pink-900\": $pink-900\n) !default;\n\n$reds: (\n \"red-100\": $red-100,\n \"red-200\": $red-200,\n \"red-300\": $red-300,\n \"red-400\": $red-400,\n \"red-500\": $red-500,\n \"red-600\": $red-600,\n \"red-700\": $red-700,\n \"red-800\": $red-800,\n \"red-900\": $red-900\n) !default;\n\n$oranges: (\n \"orange-100\": $orange-100,\n \"orange-200\": $orange-200,\n \"orange-300\": $orange-300,\n \"orange-400\": $orange-400,\n \"orange-500\": $orange-500,\n \"orange-600\": $orange-600,\n \"orange-700\": $orange-700,\n \"orange-800\": $orange-800,\n \"orange-900\": $orange-900\n) !default;\n\n$yellows: (\n \"yellow-100\": $yellow-100,\n \"yellow-200\": $yellow-200,\n \"yellow-300\": $yellow-300,\n \"yellow-400\": $yellow-400,\n \"yellow-500\": $yellow-500,\n \"yellow-600\": $yellow-600,\n \"yellow-700\": $yellow-700,\n \"yellow-800\": $yellow-800,\n \"yellow-900\": $yellow-900\n) !default;\n\n$greens: (\n \"green-100\": $green-100,\n \"green-200\": $green-200,\n \"green-300\": $green-300,\n \"green-400\": $green-400,\n \"green-500\": $green-500,\n \"green-600\": $green-600,\n \"green-700\": $green-700,\n \"green-800\": $green-800,\n \"green-900\": $green-900\n) !default;\n\n$teals: (\n \"teal-100\": $teal-100,\n \"teal-200\": $teal-200,\n \"teal-300\": $teal-300,\n \"teal-400\": $teal-400,\n \"teal-500\": $teal-500,\n \"teal-600\": $teal-600,\n \"teal-700\": $teal-700,\n \"teal-800\": $teal-800,\n \"teal-900\": $teal-900\n) !default;\n\n$cyans: (\n \"cyan-100\": $cyan-100,\n \"cyan-200\": $cyan-200,\n \"cyan-300\": $cyan-300,\n \"cyan-400\": $cyan-400,\n \"cyan-500\": $cyan-500,\n \"cyan-600\": $cyan-600,\n \"cyan-700\": $cyan-700,\n \"cyan-800\": $cyan-800,\n \"cyan-900\": $cyan-900\n) !default;\n// fusv-enable\n\n// Characters which are escaped by the escape-svg function\n$escaped-characters: (\n (\"<\", \"%3c\"),\n (\">\", \"%3e\"),\n (\"#\", \"%23\"),\n (\"(\", \"%28\"),\n (\")\", \"%29\"),\n) !default;\n\n// Options\n//\n// Quickly modify global styling by enabling or disabling optional features.\n\n$enable-caret: true !default;\n$enable-rounded: true !default;\n$enable-shadows: false !default;\n$enable-gradients: false !default;\n$enable-transitions: true !default;\n$enable-reduced-motion: true !default;\n$enable-smooth-scroll: true !default;\n$enable-grid-classes: true !default;\n$enable-cssgrid: false !default;\n$enable-button-pointers: true !default;\n$enable-rfs: true !default;\n$enable-validation-icons: true !default;\n$enable-negative-margins: false !default;\n$enable-deprecation-messages: true !default;\n$enable-important-utilities: true !default;\n\n// Prefix for :root CSS variables\n\n$variable-prefix: bs- !default;\n\n// Gradient\n//\n// The gradient which is added to components if `$enable-gradients` is `true`\n// This gradient is also added to elements with `.bg-gradient`\n// scss-docs-start variable-gradient\n$gradient: linear-gradient(180deg, rgba($white, .15), rgba($white, 0)) !default;\n// scss-docs-end variable-gradient\n\n// Spacing\n//\n// Control the default styling of most Bootstrap elements by modifying these\n// variables. Mostly focused on spacing.\n// You can add more entries to the $spacers map, should you need more variation.\n\n// scss-docs-start spacer-variables-maps\n$spacer: 1rem !default;\n$spacers: (\n 0: 0,\n 1: $spacer * .25,\n 2: $spacer * .5,\n 3: $spacer,\n 4: $spacer * 1.5,\n 5: $spacer * 3,\n) !default;\n\n$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;\n// scss-docs-end spacer-variables-maps\n\n// Position\n//\n// Define the edge positioning anchors of the position utilities.\n\n// scss-docs-start position-map\n$position-values: (\n 0: 0,\n 50: 50%,\n 100: 100%\n) !default;\n// scss-docs-end position-map\n\n// Body\n//\n// Settings for the `` element.\n\n$body-bg: $white !default;\n$body-color: $gray-900 !default;\n$body-text-align: null !default;\n\n// Utilities maps\n//\n// Extends the default `$theme-colors` maps to help create our utilities.\n\n// scss-docs-start utilities-colors\n$utilities-colors: map-merge(\n $theme-colors-rgb,\n (\n \"black\": to-rgb($black),\n \"white\": to-rgb($white),\n \"body\": to-rgb($body-color)\n )\n) !default;\n// scss-docs-end utilities-colors\n\n// scss-docs-start utilities-text-colors\n$utilities-text-colors: map-loop($utilities-colors, rgba-css-var, \"$key\", \"text\") !default;\n// scss-docs-end utilities-text-colors\n\n// scss-docs-start utilities-bg-colors\n$utilities-bg-colors: map-loop($utilities-colors, rgba-css-var, \"$key\", \"bg\") !default;\n// scss-docs-end utilities-bg-colors\n\n// Links\n//\n// Style anchor elements.\n\n$link-color: $primary !default;\n$link-decoration: underline !default;\n$link-shade-percentage: 20% !default;\n$link-hover-color: shift-color($link-color, $link-shade-percentage) !default;\n$link-hover-decoration: null !default;\n\n$stretched-link-pseudo-element: after !default;\n$stretched-link-z-index: 1 !default;\n\n// Paragraphs\n//\n// Style p element.\n\n$paragraph-margin-bottom: 1rem !default;\n\n\n// Grid breakpoints\n//\n// Define the minimum dimensions at which your layout will change,\n// adapting to different screen sizes, for use in media queries.\n\n// scss-docs-start grid-breakpoints\n$grid-breakpoints: (\n xs: 0,\n sm: 576px,\n md: 768px,\n lg: 992px,\n xl: 1200px,\n xxl: 1400px\n) !default;\n// scss-docs-end grid-breakpoints\n\n@include _assert-ascending($grid-breakpoints, \"$grid-breakpoints\");\n@include _assert-starts-at-zero($grid-breakpoints, \"$grid-breakpoints\");\n\n\n// Grid containers\n//\n// Define the maximum width of `.container` for different screen sizes.\n\n// scss-docs-start container-max-widths\n$container-max-widths: (\n sm: 540px,\n md: 720px,\n lg: 960px,\n xl: 1140px,\n xxl: 1320px\n) !default;\n// scss-docs-end container-max-widths\n\n@include _assert-ascending($container-max-widths, \"$container-max-widths\");\n\n\n// Grid columns\n//\n// Set the number of columns and specify the width of the gutters.\n\n$grid-columns: 12 !default;\n$grid-gutter-width: 1.5rem !default;\n$grid-row-columns: 6 !default;\n\n$gutters: $spacers !default;\n\n// Container padding\n\n$container-padding-x: $grid-gutter-width * .5 !default;\n\n\n// Components\n//\n// Define common padding and border radius sizes and more.\n\n// scss-docs-start border-variables\n$border-width: 1px !default;\n$border-widths: (\n 1: 1px,\n 2: 2px,\n 3: 3px,\n 4: 4px,\n 5: 5px\n) !default;\n\n$border-color: $gray-300 !default;\n// scss-docs-end border-variables\n\n// scss-docs-start border-radius-variables\n$border-radius: .25rem !default;\n$border-radius-sm: .2rem !default;\n$border-radius-lg: .3rem !default;\n$border-radius-pill: 50rem !default;\n// scss-docs-end border-radius-variables\n\n// scss-docs-start box-shadow-variables\n$box-shadow: 0 .5rem 1rem rgba($black, .15) !default;\n$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default;\n$box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default;\n$box-shadow-inset: inset 0 1px 2px rgba($black, .075) !default;\n// scss-docs-end box-shadow-variables\n\n$component-active-color: $white !default;\n$component-active-bg: $primary !default;\n\n// scss-docs-start caret-variables\n$caret-width: .3em !default;\n$caret-vertical-align: $caret-width * .85 !default;\n$caret-spacing: $caret-width * .85 !default;\n// scss-docs-end caret-variables\n\n$transition-base: all .2s ease-in-out !default;\n$transition-fade: opacity .15s linear !default;\n// scss-docs-start collapse-transition\n$transition-collapse: height .35s ease !default;\n$transition-collapse-width: width .35s ease !default;\n// scss-docs-end collapse-transition\n\n// stylelint-disable function-disallowed-list\n// scss-docs-start aspect-ratios\n$aspect-ratios: (\n \"1x1\": 100%,\n \"4x3\": calc(3 / 4 * 100%),\n \"16x9\": calc(9 / 16 * 100%),\n \"21x9\": calc(9 / 21 * 100%)\n) !default;\n// scss-docs-end aspect-ratios\n// stylelint-enable function-disallowed-list\n\n// Typography\n//\n// Font, line-height, and color for body text, headings, and more.\n\n// scss-docs-start font-variables\n// stylelint-disable value-keyword-case\n$font-family-sans-serif: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", \"Liberation Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\" !default;\n$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace !default;\n// stylelint-enable value-keyword-case\n$font-family-base: var(--#{$variable-prefix}font-sans-serif) !default;\n$font-family-code: var(--#{$variable-prefix}font-monospace) !default;\n\n// $font-size-root affects the value of `rem`, which is used for as well font sizes, paddings, and margins\n// $font-size-base affects the font size of the body text\n$font-size-root: null !default;\n$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`\n$font-size-sm: $font-size-base * .875 !default;\n$font-size-lg: $font-size-base * 1.25 !default;\n\n$font-weight-lighter: lighter !default;\n$font-weight-light: 300 !default;\n$font-weight-normal: 400 !default;\n$font-weight-bold: 700 !default;\n$font-weight-bolder: bolder !default;\n\n$font-weight-base: $font-weight-normal !default;\n\n$line-height-base: 1.5 !default;\n$line-height-sm: 1.25 !default;\n$line-height-lg: 2 !default;\n\n$h1-font-size: $font-size-base * 2.5 !default;\n$h2-font-size: $font-size-base * 2 !default;\n$h3-font-size: $font-size-base * 1.75 !default;\n$h4-font-size: $font-size-base * 1.5 !default;\n$h5-font-size: $font-size-base * 1.25 !default;\n$h6-font-size: $font-size-base !default;\n// scss-docs-end font-variables\n\n// scss-docs-start font-sizes\n$font-sizes: (\n 1: $h1-font-size,\n 2: $h2-font-size,\n 3: $h3-font-size,\n 4: $h4-font-size,\n 5: $h5-font-size,\n 6: $h6-font-size\n) !default;\n// scss-docs-end font-sizes\n\n// scss-docs-start headings-variables\n$headings-margin-bottom: $spacer * .5 !default;\n$headings-font-family: null !default;\n$headings-font-style: null !default;\n$headings-font-weight: 500 !default;\n$headings-line-height: 1.2 !default;\n$headings-color: null !default;\n// scss-docs-end headings-variables\n\n// scss-docs-start display-headings\n$display-font-sizes: (\n 1: 5rem,\n 2: 4.5rem,\n 3: 4rem,\n 4: 3.5rem,\n 5: 3rem,\n 6: 2.5rem\n) !default;\n\n$display-font-weight: 300 !default;\n$display-line-height: $headings-line-height !default;\n// scss-docs-end display-headings\n\n// scss-docs-start type-variables\n$lead-font-size: $font-size-base * 1.25 !default;\n$lead-font-weight: 300 !default;\n\n$small-font-size: .875em !default;\n\n$sub-sup-font-size: .75em !default;\n\n$text-muted: $gray-600 !default;\n\n$initialism-font-size: $small-font-size !default;\n\n$blockquote-margin-y: $spacer !default;\n$blockquote-font-size: $font-size-base * 1.25 !default;\n$blockquote-footer-color: $gray-600 !default;\n$blockquote-footer-font-size: $small-font-size !default;\n\n$hr-margin-y: $spacer !default;\n$hr-color: inherit !default;\n$hr-height: $border-width !default;\n$hr-opacity: .25 !default;\n\n$legend-margin-bottom: .5rem !default;\n$legend-font-size: 1.5rem !default;\n$legend-font-weight: null !default;\n\n$mark-padding: .2em !default;\n\n$dt-font-weight: $font-weight-bold !default;\n\n$nested-kbd-font-weight: $font-weight-bold !default;\n\n$list-inline-padding: .5rem !default;\n\n$mark-bg: #fcf8e3 !default;\n// scss-docs-end type-variables\n\n\n// Tables\n//\n// Customizes the `.table` component with basic values, each used across all table variations.\n\n// scss-docs-start table-variables\n$table-cell-padding-y: .5rem !default;\n$table-cell-padding-x: .5rem !default;\n$table-cell-padding-y-sm: .25rem !default;\n$table-cell-padding-x-sm: .25rem !default;\n\n$table-cell-vertical-align: top !default;\n\n$table-color: $body-color !default;\n$table-bg: transparent !default;\n$table-accent-bg: transparent !default;\n\n$table-th-font-weight: null !default;\n\n$table-striped-color: $table-color !default;\n$table-striped-bg-factor: .05 !default;\n$table-striped-bg: rgba($black, $table-striped-bg-factor) !default;\n\n$table-active-color: $table-color !default;\n$table-active-bg-factor: .1 !default;\n$table-active-bg: rgba($black, $table-active-bg-factor) !default;\n\n$table-hover-color: $table-color !default;\n$table-hover-bg-factor: .075 !default;\n$table-hover-bg: rgba($black, $table-hover-bg-factor) !default;\n\n$table-border-factor: .1 !default;\n$table-border-width: $border-width !default;\n$table-border-color: $border-color !default;\n\n$table-striped-order: odd !default;\n\n$table-group-separator-color: currentColor !default;\n\n$table-caption-color: $text-muted !default;\n\n$table-bg-scale: -80% !default;\n// scss-docs-end table-variables\n\n// scss-docs-start table-loop\n$table-variants: (\n \"primary\": shift-color($primary, $table-bg-scale),\n \"secondary\": shift-color($secondary, $table-bg-scale),\n \"success\": shift-color($success, $table-bg-scale),\n \"info\": shift-color($info, $table-bg-scale),\n \"warning\": shift-color($warning, $table-bg-scale),\n \"danger\": shift-color($danger, $table-bg-scale),\n \"light\": $light,\n \"dark\": $dark,\n) !default;\n// scss-docs-end table-loop\n\n\n// Buttons + Forms\n//\n// Shared variables that are reassigned to `$input-` and `$btn-` specific variables.\n\n// scss-docs-start input-btn-variables\n$input-btn-padding-y: .375rem !default;\n$input-btn-padding-x: .75rem !default;\n$input-btn-font-family: null !default;\n$input-btn-font-size: $font-size-base !default;\n$input-btn-line-height: $line-height-base !default;\n\n$input-btn-focus-width: .25rem !default;\n$input-btn-focus-color-opacity: .25 !default;\n$input-btn-focus-color: rgba($component-active-bg, $input-btn-focus-color-opacity) !default;\n$input-btn-focus-blur: 0 !default;\n$input-btn-focus-box-shadow: 0 0 $input-btn-focus-blur $input-btn-focus-width $input-btn-focus-color !default;\n\n$input-btn-padding-y-sm: .25rem !default;\n$input-btn-padding-x-sm: .5rem !default;\n$input-btn-font-size-sm: $font-size-sm !default;\n\n$input-btn-padding-y-lg: .5rem !default;\n$input-btn-padding-x-lg: 1rem !default;\n$input-btn-font-size-lg: $font-size-lg !default;\n\n$input-btn-border-width: $border-width !default;\n// scss-docs-end input-btn-variables\n\n\n// Buttons\n//\n// For each of Bootstrap's buttons, define text, background, and border color.\n\n// scss-docs-start btn-variables\n$btn-padding-y: $input-btn-padding-y !default;\n$btn-padding-x: $input-btn-padding-x !default;\n$btn-font-family: $input-btn-font-family !default;\n$btn-font-size: $input-btn-font-size !default;\n$btn-line-height: $input-btn-line-height !default;\n$btn-white-space: null !default; // Set to `nowrap` to prevent text wrapping\n\n$btn-padding-y-sm: $input-btn-padding-y-sm !default;\n$btn-padding-x-sm: $input-btn-padding-x-sm !default;\n$btn-font-size-sm: $input-btn-font-size-sm !default;\n\n$btn-padding-y-lg: $input-btn-padding-y-lg !default;\n$btn-padding-x-lg: $input-btn-padding-x-lg !default;\n$btn-font-size-lg: $input-btn-font-size-lg !default;\n\n$btn-border-width: $input-btn-border-width !default;\n\n$btn-font-weight: $font-weight-normal !default;\n$btn-box-shadow: inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default;\n$btn-focus-width: $input-btn-focus-width !default;\n$btn-focus-box-shadow: $input-btn-focus-box-shadow !default;\n$btn-disabled-opacity: .65 !default;\n$btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default;\n\n$btn-link-color: $link-color !default;\n$btn-link-hover-color: $link-hover-color !default;\n$btn-link-disabled-color: $gray-600 !default;\n\n// Allows for customizing button radius independently from global border radius\n$btn-border-radius: $border-radius !default;\n$btn-border-radius-sm: $border-radius-sm !default;\n$btn-border-radius-lg: $border-radius-lg !default;\n\n$btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$btn-hover-bg-shade-amount: 15% !default;\n$btn-hover-bg-tint-amount: 15% !default;\n$btn-hover-border-shade-amount: 20% !default;\n$btn-hover-border-tint-amount: 10% !default;\n$btn-active-bg-shade-amount: 20% !default;\n$btn-active-bg-tint-amount: 20% !default;\n$btn-active-border-shade-amount: 25% !default;\n$btn-active-border-tint-amount: 10% !default;\n// scss-docs-end btn-variables\n\n\n// Forms\n\n// scss-docs-start form-text-variables\n$form-text-margin-top: .25rem !default;\n$form-text-font-size: $small-font-size !default;\n$form-text-font-style: null !default;\n$form-text-font-weight: null !default;\n$form-text-color: $text-muted !default;\n// scss-docs-end form-text-variables\n\n// scss-docs-start form-label-variables\n$form-label-margin-bottom: .5rem !default;\n$form-label-font-size: null !default;\n$form-label-font-style: null !default;\n$form-label-font-weight: null !default;\n$form-label-color: null !default;\n// scss-docs-end form-label-variables\n\n// scss-docs-start form-input-variables\n$input-padding-y: $input-btn-padding-y !default;\n$input-padding-x: $input-btn-padding-x !default;\n$input-font-family: $input-btn-font-family !default;\n$input-font-size: $input-btn-font-size !default;\n$input-font-weight: $font-weight-base !default;\n$input-line-height: $input-btn-line-height !default;\n\n$input-padding-y-sm: $input-btn-padding-y-sm !default;\n$input-padding-x-sm: $input-btn-padding-x-sm !default;\n$input-font-size-sm: $input-btn-font-size-sm !default;\n\n$input-padding-y-lg: $input-btn-padding-y-lg !default;\n$input-padding-x-lg: $input-btn-padding-x-lg !default;\n$input-font-size-lg: $input-btn-font-size-lg !default;\n\n$input-bg: $body-bg !default;\n$input-disabled-bg: $gray-200 !default;\n$input-disabled-border-color: null !default;\n\n$input-color: $body-color !default;\n$input-border-color: $gray-400 !default;\n$input-border-width: $input-btn-border-width !default;\n$input-box-shadow: $box-shadow-inset !default;\n\n$input-border-radius: $border-radius !default;\n$input-border-radius-sm: $border-radius-sm !default;\n$input-border-radius-lg: $border-radius-lg !default;\n\n$input-focus-bg: $input-bg !default;\n$input-focus-border-color: tint-color($component-active-bg, 50%) !default;\n$input-focus-color: $input-color !default;\n$input-focus-width: $input-btn-focus-width !default;\n$input-focus-box-shadow: $input-btn-focus-box-shadow !default;\n\n$input-placeholder-color: $gray-600 !default;\n$input-plaintext-color: $body-color !default;\n\n$input-height-border: $input-border-width * 2 !default;\n\n$input-height-inner: add($input-line-height * 1em, $input-padding-y * 2) !default;\n$input-height-inner-half: add($input-line-height * .5em, $input-padding-y) !default;\n$input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y * .5) !default;\n\n$input-height: add($input-line-height * 1em, add($input-padding-y * 2, $input-height-border, false)) !default;\n$input-height-sm: add($input-line-height * 1em, add($input-padding-y-sm * 2, $input-height-border, false)) !default;\n$input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default;\n\n$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$form-color-width: 3rem !default;\n// scss-docs-end form-input-variables\n\n// scss-docs-start form-check-variables\n$form-check-input-width: 1em !default;\n$form-check-min-height: $font-size-base * $line-height-base !default;\n$form-check-padding-start: $form-check-input-width + .5em !default;\n$form-check-margin-bottom: .125rem !default;\n$form-check-label-color: null !default;\n$form-check-label-cursor: null !default;\n$form-check-transition: null !default;\n\n$form-check-input-active-filter: brightness(90%) !default;\n\n$form-check-input-bg: $input-bg !default;\n$form-check-input-border: 1px solid rgba($black, .25) !default;\n$form-check-input-border-radius: .25em !default;\n$form-check-radio-border-radius: 50% !default;\n$form-check-input-focus-border: $input-focus-border-color !default;\n$form-check-input-focus-box-shadow: $input-btn-focus-box-shadow !default;\n\n$form-check-input-checked-color: $component-active-color !default;\n$form-check-input-checked-bg-color: $component-active-bg !default;\n$form-check-input-checked-border-color: $form-check-input-checked-bg-color !default;\n$form-check-input-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-check-radio-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-check-input-indeterminate-color: $component-active-color !default;\n$form-check-input-indeterminate-bg-color: $component-active-bg !default;\n$form-check-input-indeterminate-border-color: $form-check-input-indeterminate-bg-color !default;\n$form-check-input-indeterminate-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-check-input-disabled-opacity: .5 !default;\n$form-check-label-disabled-opacity: $form-check-input-disabled-opacity !default;\n$form-check-btn-check-disabled-opacity: $btn-disabled-opacity !default;\n\n$form-check-inline-margin-end: 1rem !default;\n// scss-docs-end form-check-variables\n\n// scss-docs-start form-switch-variables\n$form-switch-color: rgba(0, 0, 0, .25) !default;\n$form-switch-width: 2em !default;\n$form-switch-padding-start: $form-switch-width + .5em !default;\n$form-switch-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-switch-border-radius: $form-switch-width !default;\n$form-switch-transition: background-position .15s ease-in-out !default;\n\n$form-switch-focus-color: $input-focus-border-color !default;\n$form-switch-focus-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-switch-checked-color: $component-active-color !default;\n$form-switch-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-switch-checked-bg-position: right center !default;\n// scss-docs-end form-switch-variables\n\n// scss-docs-start input-group-variables\n$input-group-addon-padding-y: $input-padding-y !default;\n$input-group-addon-padding-x: $input-padding-x !default;\n$input-group-addon-font-weight: $input-font-weight !default;\n$input-group-addon-color: $input-color !default;\n$input-group-addon-bg: $gray-200 !default;\n$input-group-addon-border-color: $input-border-color !default;\n// scss-docs-end input-group-variables\n\n// scss-docs-start form-select-variables\n$form-select-padding-y: $input-padding-y !default;\n$form-select-padding-x: $input-padding-x !default;\n$form-select-font-family: $input-font-family !default;\n$form-select-font-size: $input-font-size !default;\n$form-select-indicator-padding: $form-select-padding-x * 3 !default; // Extra padding for background-image\n$form-select-font-weight: $input-font-weight !default;\n$form-select-line-height: $input-line-height !default;\n$form-select-color: $input-color !default;\n$form-select-bg: $input-bg !default;\n$form-select-disabled-color: null !default;\n$form-select-disabled-bg: $gray-200 !default;\n$form-select-disabled-border-color: $input-disabled-border-color !default;\n$form-select-bg-position: right $form-select-padding-x center !default;\n$form-select-bg-size: 16px 12px !default; // In pixels because image dimensions\n$form-select-indicator-color: $gray-800 !default;\n$form-select-indicator: url(\"data:image/svg+xml,\") !default;\n\n$form-select-feedback-icon-padding-end: $form-select-padding-x * 2.5 + $form-select-indicator-padding !default;\n$form-select-feedback-icon-position: center right $form-select-indicator-padding !default;\n$form-select-feedback-icon-size: $input-height-inner-half $input-height-inner-half !default;\n\n$form-select-border-width: $input-border-width !default;\n$form-select-border-color: $input-border-color !default;\n$form-select-border-radius: $border-radius !default;\n$form-select-box-shadow: $box-shadow-inset !default;\n\n$form-select-focus-border-color: $input-focus-border-color !default;\n$form-select-focus-width: $input-focus-width !default;\n$form-select-focus-box-shadow: 0 0 0 $form-select-focus-width $input-btn-focus-color !default;\n\n$form-select-padding-y-sm: $input-padding-y-sm !default;\n$form-select-padding-x-sm: $input-padding-x-sm !default;\n$form-select-font-size-sm: $input-font-size-sm !default;\n\n$form-select-padding-y-lg: $input-padding-y-lg !default;\n$form-select-padding-x-lg: $input-padding-x-lg !default;\n$form-select-font-size-lg: $input-font-size-lg !default;\n\n$form-select-transition: $input-transition !default;\n// scss-docs-end form-select-variables\n\n// scss-docs-start form-range-variables\n$form-range-track-width: 100% !default;\n$form-range-track-height: .5rem !default;\n$form-range-track-cursor: pointer !default;\n$form-range-track-bg: $gray-300 !default;\n$form-range-track-border-radius: 1rem !default;\n$form-range-track-box-shadow: $box-shadow-inset !default;\n\n$form-range-thumb-width: 1rem !default;\n$form-range-thumb-height: $form-range-thumb-width !default;\n$form-range-thumb-bg: $component-active-bg !default;\n$form-range-thumb-border: 0 !default;\n$form-range-thumb-border-radius: 1rem !default;\n$form-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1) !default;\n$form-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-focus-box-shadow !default;\n$form-range-thumb-focus-box-shadow-width: $input-focus-width !default; // For focus box shadow issue in Edge\n$form-range-thumb-active-bg: tint-color($component-active-bg, 70%) !default;\n$form-range-thumb-disabled-bg: $gray-500 !default;\n$form-range-thumb-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n// scss-docs-end form-range-variables\n\n// scss-docs-start form-file-variables\n$form-file-button-color: $input-color !default;\n$form-file-button-bg: $input-group-addon-bg !default;\n$form-file-button-hover-bg: shade-color($form-file-button-bg, 5%) !default;\n// scss-docs-end form-file-variables\n\n// scss-docs-start form-floating-variables\n$form-floating-height: add(3.5rem, $input-height-border) !default;\n$form-floating-line-height: 1.25 !default;\n$form-floating-padding-x: $input-padding-x !default;\n$form-floating-padding-y: 1rem !default;\n$form-floating-input-padding-t: 1.625rem !default;\n$form-floating-input-padding-b: .625rem !default;\n$form-floating-label-opacity: .65 !default;\n$form-floating-label-transform: scale(.85) translateY(-.5rem) translateX(.15rem) !default;\n$form-floating-transition: opacity .1s ease-in-out, transform .1s ease-in-out !default;\n// scss-docs-end form-floating-variables\n\n// Form validation\n\n// scss-docs-start form-feedback-variables\n$form-feedback-margin-top: $form-text-margin-top !default;\n$form-feedback-font-size: $form-text-font-size !default;\n$form-feedback-font-style: $form-text-font-style !default;\n$form-feedback-valid-color: $success !default;\n$form-feedback-invalid-color: $danger !default;\n\n$form-feedback-icon-valid-color: $form-feedback-valid-color !default;\n$form-feedback-icon-valid: url(\"data:image/svg+xml,\") !default;\n$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default;\n$form-feedback-icon-invalid: url(\"data:image/svg+xml,\") !default;\n// scss-docs-end form-feedback-variables\n\n// scss-docs-start form-validation-states\n$form-validation-states: (\n \"valid\": (\n \"color\": $form-feedback-valid-color,\n \"icon\": $form-feedback-icon-valid\n ),\n \"invalid\": (\n \"color\": $form-feedback-invalid-color,\n \"icon\": $form-feedback-icon-invalid\n )\n) !default;\n// scss-docs-end form-validation-states\n\n// Z-index master list\n//\n// Warning: Avoid customizing these values. They're used for a bird's eye view\n// of components dependent on the z-axis and are designed to all work together.\n\n// scss-docs-start zindex-stack\n$zindex-dropdown: 1000 !default;\n$zindex-sticky: 1020 !default;\n$zindex-fixed: 1030 !default;\n$zindex-offcanvas-backdrop: 1040 !default;\n$zindex-offcanvas: 1045 !default;\n$zindex-modal-backdrop: 1050 !default;\n$zindex-modal: 1055 !default;\n$zindex-popover: 1070 !default;\n$zindex-tooltip: 1080 !default;\n// scss-docs-end zindex-stack\n\n\n// Navs\n\n// scss-docs-start nav-variables\n$nav-link-padding-y: .5rem !default;\n$nav-link-padding-x: 1rem !default;\n$nav-link-font-size: null !default;\n$nav-link-font-weight: null !default;\n$nav-link-color: $link-color !default;\n$nav-link-hover-color: $link-hover-color !default;\n$nav-link-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out !default;\n$nav-link-disabled-color: $gray-600 !default;\n\n$nav-tabs-border-color: $gray-300 !default;\n$nav-tabs-border-width: $border-width !default;\n$nav-tabs-border-radius: $border-radius !default;\n$nav-tabs-link-hover-border-color: $gray-200 $gray-200 $nav-tabs-border-color !default;\n$nav-tabs-link-active-color: $gray-700 !default;\n$nav-tabs-link-active-bg: $body-bg !default;\n$nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg !default;\n\n$nav-pills-border-radius: $border-radius !default;\n$nav-pills-link-active-color: $component-active-color !default;\n$nav-pills-link-active-bg: $component-active-bg !default;\n// scss-docs-end nav-variables\n\n\n// Navbar\n\n// scss-docs-start navbar-variables\n$navbar-padding-y: $spacer * .5 !default;\n$navbar-padding-x: null !default;\n\n$navbar-nav-link-padding-x: .5rem !default;\n\n$navbar-brand-font-size: $font-size-lg !default;\n// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link\n$nav-link-height: $font-size-base * $line-height-base + $nav-link-padding-y * 2 !default;\n$navbar-brand-height: $navbar-brand-font-size * $line-height-base !default;\n$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) * .5 !default;\n$navbar-brand-margin-end: 1rem !default;\n\n$navbar-toggler-padding-y: .25rem !default;\n$navbar-toggler-padding-x: .75rem !default;\n$navbar-toggler-font-size: $font-size-lg !default;\n$navbar-toggler-border-radius: $btn-border-radius !default;\n$navbar-toggler-focus-width: $btn-focus-width !default;\n$navbar-toggler-transition: box-shadow .15s ease-in-out !default;\n// scss-docs-end navbar-variables\n\n// scss-docs-start navbar-theme-variables\n$navbar-dark-color: rgba($white, .55) !default;\n$navbar-dark-hover-color: rgba($white, .75) !default;\n$navbar-dark-active-color: $white !default;\n$navbar-dark-disabled-color: rgba($white, .25) !default;\n$navbar-dark-toggler-icon-bg: url(\"data:image/svg+xml,\") !default;\n$navbar-dark-toggler-border-color: rgba($white, .1) !default;\n\n$navbar-light-color: rgba($black, .55) !default;\n$navbar-light-hover-color: rgba($black, .7) !default;\n$navbar-light-active-color: rgba($black, .9) !default;\n$navbar-light-disabled-color: rgba($black, .3) !default;\n$navbar-light-toggler-icon-bg: url(\"data:image/svg+xml,\") !default;\n$navbar-light-toggler-border-color: rgba($black, .1) !default;\n\n$navbar-light-brand-color: $navbar-light-active-color !default;\n$navbar-light-brand-hover-color: $navbar-light-active-color !default;\n$navbar-dark-brand-color: $navbar-dark-active-color !default;\n$navbar-dark-brand-hover-color: $navbar-dark-active-color !default;\n// scss-docs-end navbar-theme-variables\n\n\n// Dropdowns\n//\n// Dropdown menu container and contents.\n\n// scss-docs-start dropdown-variables\n$dropdown-min-width: 10rem !default;\n$dropdown-padding-x: 0 !default;\n$dropdown-padding-y: .5rem !default;\n$dropdown-spacer: .125rem !default;\n$dropdown-font-size: $font-size-base !default;\n$dropdown-color: $body-color !default;\n$dropdown-bg: $white !default;\n$dropdown-border-color: rgba($black, .15) !default;\n$dropdown-border-radius: $border-radius !default;\n$dropdown-border-width: $border-width !default;\n$dropdown-inner-border-radius: subtract($dropdown-border-radius, $dropdown-border-width) !default;\n$dropdown-divider-bg: $dropdown-border-color !default;\n$dropdown-divider-margin-y: $spacer * .5 !default;\n$dropdown-box-shadow: $box-shadow !default;\n\n$dropdown-link-color: $gray-900 !default;\n$dropdown-link-hover-color: shade-color($gray-900, 10%) !default;\n$dropdown-link-hover-bg: $gray-200 !default;\n\n$dropdown-link-active-color: $component-active-color !default;\n$dropdown-link-active-bg: $component-active-bg !default;\n\n$dropdown-link-disabled-color: $gray-500 !default;\n\n$dropdown-item-padding-y: $spacer * .25 !default;\n$dropdown-item-padding-x: $spacer !default;\n\n$dropdown-header-color: $gray-600 !default;\n$dropdown-header-padding: $dropdown-padding-y $dropdown-item-padding-x !default;\n// scss-docs-end dropdown-variables\n\n// scss-docs-start dropdown-dark-variables\n$dropdown-dark-color: $gray-300 !default;\n$dropdown-dark-bg: $gray-800 !default;\n$dropdown-dark-border-color: $dropdown-border-color !default;\n$dropdown-dark-divider-bg: $dropdown-divider-bg !default;\n$dropdown-dark-box-shadow: null !default;\n$dropdown-dark-link-color: $dropdown-dark-color !default;\n$dropdown-dark-link-hover-color: $white !default;\n$dropdown-dark-link-hover-bg: rgba($white, .15) !default;\n$dropdown-dark-link-active-color: $dropdown-link-active-color !default;\n$dropdown-dark-link-active-bg: $dropdown-link-active-bg !default;\n$dropdown-dark-link-disabled-color: $gray-500 !default;\n$dropdown-dark-header-color: $gray-500 !default;\n// scss-docs-end dropdown-dark-variables\n\n\n// Pagination\n\n// scss-docs-start pagination-variables\n$pagination-padding-y: .375rem !default;\n$pagination-padding-x: .75rem !default;\n$pagination-padding-y-sm: .25rem !default;\n$pagination-padding-x-sm: .5rem !default;\n$pagination-padding-y-lg: .75rem !default;\n$pagination-padding-x-lg: 1.5rem !default;\n\n$pagination-color: $link-color !default;\n$pagination-bg: $white !default;\n$pagination-border-width: $border-width !default;\n$pagination-border-radius: $border-radius !default;\n$pagination-margin-start: -$pagination-border-width !default;\n$pagination-border-color: $gray-300 !default;\n\n$pagination-focus-color: $link-hover-color !default;\n$pagination-focus-bg: $gray-200 !default;\n$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default;\n$pagination-focus-outline: 0 !default;\n\n$pagination-hover-color: $link-hover-color !default;\n$pagination-hover-bg: $gray-200 !default;\n$pagination-hover-border-color: $gray-300 !default;\n\n$pagination-active-color: $component-active-color !default;\n$pagination-active-bg: $component-active-bg !default;\n$pagination-active-border-color: $pagination-active-bg !default;\n\n$pagination-disabled-color: $gray-600 !default;\n$pagination-disabled-bg: $white !default;\n$pagination-disabled-border-color: $gray-300 !default;\n\n$pagination-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$pagination-border-radius-sm: $border-radius-sm !default;\n$pagination-border-radius-lg: $border-radius-lg !default;\n// scss-docs-end pagination-variables\n\n\n// Placeholders\n\n// scss-docs-start placeholders\n$placeholder-opacity-max: .5 !default;\n$placeholder-opacity-min: .2 !default;\n// scss-docs-end placeholders\n\n// Cards\n\n// scss-docs-start card-variables\n$card-spacer-y: $spacer !default;\n$card-spacer-x: $spacer !default;\n$card-title-spacer-y: $spacer * .5 !default;\n$card-border-width: $border-width !default;\n$card-border-color: rgba($black, .125) !default;\n$card-border-radius: $border-radius !default;\n$card-box-shadow: null !default;\n$card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default;\n$card-cap-padding-y: $card-spacer-y * .5 !default;\n$card-cap-padding-x: $card-spacer-x !default;\n$card-cap-bg: rgba($black, .03) !default;\n$card-cap-color: null !default;\n$card-height: null !default;\n$card-color: null !default;\n$card-bg: $white !default;\n$card-img-overlay-padding: $spacer !default;\n$card-group-margin: $grid-gutter-width * .5 !default;\n// scss-docs-end card-variables\n\n// Accordion\n\n// scss-docs-start accordion-variables\n$accordion-padding-y: 1rem !default;\n$accordion-padding-x: 1.25rem !default;\n$accordion-color: $body-color !default;\n$accordion-bg: $body-bg !default;\n$accordion-border-width: $border-width !default;\n$accordion-border-color: rgba($black, .125) !default;\n$accordion-border-radius: $border-radius !default;\n$accordion-inner-border-radius: subtract($accordion-border-radius, $accordion-border-width) !default;\n\n$accordion-body-padding-y: $accordion-padding-y !default;\n$accordion-body-padding-x: $accordion-padding-x !default;\n\n$accordion-button-padding-y: $accordion-padding-y !default;\n$accordion-button-padding-x: $accordion-padding-x !default;\n$accordion-button-color: $accordion-color !default;\n$accordion-button-bg: $accordion-bg !default;\n$accordion-transition: $btn-transition, border-radius .15s ease !default;\n$accordion-button-active-bg: tint-color($component-active-bg, 90%) !default;\n$accordion-button-active-color: shade-color($primary, 10%) !default;\n\n$accordion-button-focus-border-color: $input-focus-border-color !default;\n$accordion-button-focus-box-shadow: $btn-focus-box-shadow !default;\n\n$accordion-icon-width: 1.25rem !default;\n$accordion-icon-color: $accordion-button-color !default;\n$accordion-icon-active-color: $accordion-button-active-color !default;\n$accordion-icon-transition: transform .2s ease-in-out !default;\n$accordion-icon-transform: rotate(-180deg) !default;\n\n$accordion-button-icon: url(\"data:image/svg+xml,\") !default;\n$accordion-button-active-icon: url(\"data:image/svg+xml,\") !default;\n// scss-docs-end accordion-variables\n\n// Tooltips\n\n// scss-docs-start tooltip-variables\n$tooltip-font-size: $font-size-sm !default;\n$tooltip-max-width: 200px !default;\n$tooltip-color: $white !default;\n$tooltip-bg: $black !default;\n$tooltip-border-radius: $border-radius !default;\n$tooltip-opacity: .9 !default;\n$tooltip-padding-y: $spacer * .25 !default;\n$tooltip-padding-x: $spacer * .5 !default;\n$tooltip-margin: 0 !default;\n\n$tooltip-arrow-width: .8rem !default;\n$tooltip-arrow-height: .4rem !default;\n$tooltip-arrow-color: $tooltip-bg !default;\n// scss-docs-end tooltip-variables\n\n// Form tooltips must come after regular tooltips\n// scss-docs-start tooltip-feedback-variables\n$form-feedback-tooltip-padding-y: $tooltip-padding-y !default;\n$form-feedback-tooltip-padding-x: $tooltip-padding-x !default;\n$form-feedback-tooltip-font-size: $tooltip-font-size !default;\n$form-feedback-tooltip-line-height: null !default;\n$form-feedback-tooltip-opacity: $tooltip-opacity !default;\n$form-feedback-tooltip-border-radius: $tooltip-border-radius !default;\n// scss-docs-end tooltip-feedback-variables\n\n\n// Popovers\n\n// scss-docs-start popover-variables\n$popover-font-size: $font-size-sm !default;\n$popover-bg: $white !default;\n$popover-max-width: 276px !default;\n$popover-border-width: $border-width !default;\n$popover-border-color: rgba($black, .2) !default;\n$popover-border-radius: $border-radius-lg !default;\n$popover-inner-border-radius: subtract($popover-border-radius, $popover-border-width) !default;\n$popover-box-shadow: $box-shadow !default;\n\n$popover-header-bg: shade-color($popover-bg, 6%) !default;\n$popover-header-color: $headings-color !default;\n$popover-header-padding-y: .5rem !default;\n$popover-header-padding-x: $spacer !default;\n\n$popover-body-color: $body-color !default;\n$popover-body-padding-y: $spacer !default;\n$popover-body-padding-x: $spacer !default;\n\n$popover-arrow-width: 1rem !default;\n$popover-arrow-height: .5rem !default;\n$popover-arrow-color: $popover-bg !default;\n\n$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default;\n// scss-docs-end popover-variables\n\n\n// Toasts\n\n// scss-docs-start toast-variables\n$toast-max-width: 350px !default;\n$toast-padding-x: .75rem !default;\n$toast-padding-y: .5rem !default;\n$toast-font-size: .875rem !default;\n$toast-color: null !default;\n$toast-background-color: rgba($white, .85) !default;\n$toast-border-width: 1px !default;\n$toast-border-color: rgba(0, 0, 0, .1) !default;\n$toast-border-radius: $border-radius !default;\n$toast-box-shadow: $box-shadow !default;\n$toast-spacing: $container-padding-x !default;\n\n$toast-header-color: $gray-600 !default;\n$toast-header-background-color: rgba($white, .85) !default;\n$toast-header-border-color: rgba(0, 0, 0, .05) !default;\n// scss-docs-end toast-variables\n\n\n// Badges\n\n// scss-docs-start badge-variables\n$badge-font-size: .75em !default;\n$badge-font-weight: $font-weight-bold !default;\n$badge-color: $white !default;\n$badge-padding-y: .35em !default;\n$badge-padding-x: .65em !default;\n$badge-border-radius: $border-radius !default;\n// scss-docs-end badge-variables\n\n\n// Modals\n\n// scss-docs-start modal-variables\n$modal-inner-padding: $spacer !default;\n\n$modal-footer-margin-between: .5rem !default;\n\n$modal-dialog-margin: .5rem !default;\n$modal-dialog-margin-y-sm-up: 1.75rem !default;\n\n$modal-title-line-height: $line-height-base !default;\n\n$modal-content-color: null !default;\n$modal-content-bg: $white !default;\n$modal-content-border-color: rgba($black, .2) !default;\n$modal-content-border-width: $border-width !default;\n$modal-content-border-radius: $border-radius-lg !default;\n$modal-content-inner-border-radius: subtract($modal-content-border-radius, $modal-content-border-width) !default;\n$modal-content-box-shadow-xs: $box-shadow-sm !default;\n$modal-content-box-shadow-sm-up: $box-shadow !default;\n\n$modal-backdrop-bg: $black !default;\n$modal-backdrop-opacity: .5 !default;\n$modal-header-border-color: $border-color !default;\n$modal-footer-border-color: $modal-header-border-color !default;\n$modal-header-border-width: $modal-content-border-width !default;\n$modal-footer-border-width: $modal-header-border-width !default;\n$modal-header-padding-y: $modal-inner-padding !default;\n$modal-header-padding-x: $modal-inner-padding !default;\n$modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility\n\n$modal-sm: 300px !default;\n$modal-md: 500px !default;\n$modal-lg: 800px !default;\n$modal-xl: 1140px !default;\n\n$modal-fade-transform: translate(0, -50px) !default;\n$modal-show-transform: none !default;\n$modal-transition: transform .3s ease-out !default;\n$modal-scale-transform: scale(1.02) !default;\n// scss-docs-end modal-variables\n\n\n// Alerts\n//\n// Define alert colors, border radius, and padding.\n\n// scss-docs-start alert-variables\n$alert-padding-y: $spacer !default;\n$alert-padding-x: $spacer !default;\n$alert-margin-bottom: 1rem !default;\n$alert-border-radius: $border-radius !default;\n$alert-link-font-weight: $font-weight-bold !default;\n$alert-border-width: $border-width !default;\n$alert-bg-scale: -80% !default;\n$alert-border-scale: -70% !default;\n$alert-color-scale: 40% !default;\n$alert-dismissible-padding-r: $alert-padding-x * 3 !default; // 3x covers width of x plus default padding on either side\n// scss-docs-end alert-variables\n\n\n// Progress bars\n\n// scss-docs-start progress-variables\n$progress-height: 1rem !default;\n$progress-font-size: $font-size-base * .75 !default;\n$progress-bg: $gray-200 !default;\n$progress-border-radius: $border-radius !default;\n$progress-box-shadow: $box-shadow-inset !default;\n$progress-bar-color: $white !default;\n$progress-bar-bg: $primary !default;\n$progress-bar-animation-timing: 1s linear infinite !default;\n$progress-bar-transition: width .6s ease !default;\n// scss-docs-end progress-variables\n\n\n// List group\n\n// scss-docs-start list-group-variables\n$list-group-color: $gray-900 !default;\n$list-group-bg: $white !default;\n$list-group-border-color: rgba($black, .125) !default;\n$list-group-border-width: $border-width !default;\n$list-group-border-radius: $border-radius !default;\n\n$list-group-item-padding-y: $spacer * .5 !default;\n$list-group-item-padding-x: $spacer !default;\n$list-group-item-bg-scale: -80% !default;\n$list-group-item-color-scale: 40% !default;\n\n$list-group-hover-bg: $gray-100 !default;\n$list-group-active-color: $component-active-color !default;\n$list-group-active-bg: $component-active-bg !default;\n$list-group-active-border-color: $list-group-active-bg !default;\n\n$list-group-disabled-color: $gray-600 !default;\n$list-group-disabled-bg: $list-group-bg !default;\n\n$list-group-action-color: $gray-700 !default;\n$list-group-action-hover-color: $list-group-action-color !default;\n\n$list-group-action-active-color: $body-color !default;\n$list-group-action-active-bg: $gray-200 !default;\n// scss-docs-end list-group-variables\n\n\n// Image thumbnails\n\n// scss-docs-start thumbnail-variables\n$thumbnail-padding: .25rem !default;\n$thumbnail-bg: $body-bg !default;\n$thumbnail-border-width: $border-width !default;\n$thumbnail-border-color: $gray-300 !default;\n$thumbnail-border-radius: $border-radius !default;\n$thumbnail-box-shadow: $box-shadow-sm !default;\n// scss-docs-end thumbnail-variables\n\n\n// Figures\n\n// scss-docs-start figure-variables\n$figure-caption-font-size: $small-font-size !default;\n$figure-caption-color: $gray-600 !default;\n// scss-docs-end figure-variables\n\n\n// Breadcrumbs\n\n// scss-docs-start breadcrumb-variables\n$breadcrumb-font-size: null !default;\n$breadcrumb-padding-y: 0 !default;\n$breadcrumb-padding-x: 0 !default;\n$breadcrumb-item-padding-x: .5rem !default;\n$breadcrumb-margin-bottom: 1rem !default;\n$breadcrumb-bg: null !default;\n$breadcrumb-divider-color: $gray-600 !default;\n$breadcrumb-active-color: $gray-600 !default;\n$breadcrumb-divider: quote(\"/\") !default;\n$breadcrumb-divider-flipped: $breadcrumb-divider !default;\n$breadcrumb-border-radius: null !default;\n// scss-docs-end breadcrumb-variables\n\n// Carousel\n\n// scss-docs-start carousel-variables\n$carousel-control-color: $white !default;\n$carousel-control-width: 15% !default;\n$carousel-control-opacity: .5 !default;\n$carousel-control-hover-opacity: .9 !default;\n$carousel-control-transition: opacity .15s ease !default;\n\n$carousel-indicator-width: 30px !default;\n$carousel-indicator-height: 3px !default;\n$carousel-indicator-hit-area-height: 10px !default;\n$carousel-indicator-spacer: 3px !default;\n$carousel-indicator-opacity: .5 !default;\n$carousel-indicator-active-bg: $white !default;\n$carousel-indicator-active-opacity: 1 !default;\n$carousel-indicator-transition: opacity .6s ease !default;\n\n$carousel-caption-width: 70% !default;\n$carousel-caption-color: $white !default;\n$carousel-caption-padding-y: 1.25rem !default;\n$carousel-caption-spacer: 1.25rem !default;\n\n$carousel-control-icon-width: 2rem !default;\n\n$carousel-control-prev-icon-bg: url(\"data:image/svg+xml,\") !default;\n$carousel-control-next-icon-bg: url(\"data:image/svg+xml,\") !default;\n\n$carousel-transition-duration: .6s !default;\n$carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)\n\n$carousel-dark-indicator-active-bg: $black !default;\n$carousel-dark-caption-color: $black !default;\n$carousel-dark-control-icon-filter: invert(1) grayscale(100) !default;\n// scss-docs-end carousel-variables\n\n\n// Spinners\n\n// scss-docs-start spinner-variables\n$spinner-width: 2rem !default;\n$spinner-height: $spinner-width !default;\n$spinner-vertical-align: -.125em !default;\n$spinner-border-width: .25em !default;\n$spinner-animation-speed: .75s !default;\n\n$spinner-width-sm: 1rem !default;\n$spinner-height-sm: $spinner-width-sm !default;\n$spinner-border-width-sm: .2em !default;\n// scss-docs-end spinner-variables\n\n\n// Close\n\n// scss-docs-start close-variables\n$btn-close-width: 1em !default;\n$btn-close-height: $btn-close-width !default;\n$btn-close-padding-x: .25em !default;\n$btn-close-padding-y: $btn-close-padding-x !default;\n$btn-close-color: $black !default;\n$btn-close-bg: url(\"data:image/svg+xml,\") !default;\n$btn-close-focus-shadow: $input-btn-focus-box-shadow !default;\n$btn-close-opacity: .5 !default;\n$btn-close-hover-opacity: .75 !default;\n$btn-close-focus-opacity: 1 !default;\n$btn-close-disabled-opacity: .25 !default;\n$btn-close-white-filter: invert(1) grayscale(100%) brightness(200%) !default;\n// scss-docs-end close-variables\n\n\n// Offcanvas\n\n// scss-docs-start offcanvas-variables\n$offcanvas-padding-y: $modal-inner-padding !default;\n$offcanvas-padding-x: $modal-inner-padding !default;\n$offcanvas-horizontal-width: 400px !default;\n$offcanvas-vertical-height: 30vh !default;\n$offcanvas-transition-duration: .3s !default;\n$offcanvas-border-color: $modal-content-border-color !default;\n$offcanvas-border-width: $modal-content-border-width !default;\n$offcanvas-title-line-height: $modal-title-line-height !default;\n$offcanvas-bg-color: $modal-content-bg !default;\n$offcanvas-color: $modal-content-color !default;\n$offcanvas-box-shadow: $modal-content-box-shadow-xs !default;\n$offcanvas-backdrop-bg: $modal-backdrop-bg !default;\n$offcanvas-backdrop-opacity: $modal-backdrop-opacity !default;\n// scss-docs-end offcanvas-variables\n\n// Code\n\n$code-font-size: $small-font-size !default;\n$code-color: $pink !default;\n\n$kbd-padding-y: .2rem !default;\n$kbd-padding-x: .4rem !default;\n$kbd-font-size: $code-font-size !default;\n$kbd-color: $white !default;\n$kbd-bg: $gray-900 !default;\n\n$pre-color: null !default;\n","// Row\n//\n// Rows contain your columns.\n\n@if $enable-grid-classes {\n .row {\n @include make-row();\n\n > * {\n @include make-col-ready();\n }\n }\n}\n\n@if $enable-cssgrid {\n .grid {\n display: grid;\n grid-template-rows: repeat(var(--#{$variable-prefix}rows, 1), 1fr);\n grid-template-columns: repeat(var(--#{$variable-prefix}columns, #{$grid-columns}), 1fr);\n gap: var(--#{$variable-prefix}gap, #{$grid-gutter-width});\n\n @include make-cssgrid();\n }\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n@if $enable-grid-classes {\n @include make-grid-columns();\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n@mixin make-row($gutter: $grid-gutter-width) {\n --#{$variable-prefix}gutter-x: #{$gutter};\n --#{$variable-prefix}gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list\n margin-right: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n margin-left: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n}\n\n@mixin make-col-ready($gutter: $grid-gutter-width) {\n // Add box sizing if only the grid is loaded\n box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);\n // Prevent columns from becoming too narrow when at smaller grid tiers by\n // always setting `width: 100%;`. This works because we set the width\n // later on to override this initial width.\n flex-shrink: 0;\n width: 100%;\n max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid\n padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n padding-left: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n margin-top: var(--#{$variable-prefix}gutter-y);\n}\n\n@mixin make-col($size: false, $columns: $grid-columns) {\n @if $size {\n flex: 0 0 auto;\n width: percentage(divide($size, $columns));\n\n } @else {\n flex: 1 1 0;\n max-width: 100%;\n }\n}\n\n@mixin make-col-auto() {\n flex: 0 0 auto;\n width: auto;\n}\n\n@mixin make-col-offset($size, $columns: $grid-columns) {\n $num: divide($size, $columns);\n margin-left: if($num == 0, 0, percentage($num));\n}\n\n// Row columns\n//\n// Specify on a parent element(e.g., .row) to force immediate children into NN\n// numberof columns. Supports wrapping to new lines, but does not do a Masonry\n// style grid.\n@mixin row-cols($count) {\n > * {\n flex: 0 0 auto;\n width: divide(100%, $count);\n }\n}\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `$grid-columns`.\n\n@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n // Provide basic `.col-{bp}` classes for equal-width flexbox columns\n .col#{$infix} {\n flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4\n }\n\n .row-cols#{$infix}-auto > * {\n @include make-col-auto();\n }\n\n @if $grid-row-columns > 0 {\n @for $i from 1 through $grid-row-columns {\n .row-cols#{$infix}-#{$i} {\n @include row-cols($i);\n }\n }\n }\n\n .col#{$infix}-auto {\n @include make-col-auto();\n }\n\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .col#{$infix}-#{$i} {\n @include make-col($i, $columns);\n }\n }\n\n // `$columns - 1` because offsetting by the width of an entire row isn't possible\n @for $i from 0 through ($columns - 1) {\n @if not ($infix == \"\" and $i == 0) { // Avoid emitting useless .offset-0\n .offset#{$infix}-#{$i} {\n @include make-col-offset($i, $columns);\n }\n }\n }\n }\n\n // Gutters\n //\n // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.\n @each $key, $value in $gutters {\n .g#{$infix}-#{$key},\n .gx#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-x: #{$value};\n }\n\n .g#{$infix}-#{$key},\n .gy#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-y: #{$value};\n }\n }\n }\n }\n}\n\n@mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .g-col#{$infix}-#{$i} {\n grid-column: auto / span $i;\n }\n }\n\n // Start with `1` because `0` is and invalid value.\n // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.\n @for $i from 1 through ($columns - 1) {\n .g-start#{$infix}-#{$i} {\n grid-column-start: $i;\n }\n }\n }\n }\n }\n}\n","// Utility generator\n// Used to generate utilities & print utilities\n@mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {\n $values: map-get($utility, values);\n\n // If the values are a list or string, convert it into a map\n @if type-of($values) == \"string\" or type-of(nth($values, 1)) != \"list\" {\n $values: zip($values, $values);\n }\n\n @each $key, $value in $values {\n $properties: map-get($utility, property);\n\n // Multiple properties are possible, for example with vertical or horizontal margins or paddings\n @if type-of($properties) == \"string\" {\n $properties: append((), $properties);\n }\n\n // Use custom class if present\n $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));\n $property-class: if($property-class == null, \"\", $property-class);\n\n // State params to generate pseudo-classes\n $state: if(map-has-key($utility, state), map-get($utility, state), ());\n\n $infix: if($property-class == \"\" and str-slice($infix, 1, 1) == \"-\", str-slice($infix, 2), $infix);\n\n // Don't prefix if value key is null (eg. with shadow class)\n $property-class-modifier: if($key, if($property-class == \"\" and $infix == \"\", \"\", \"-\") + $key, \"\");\n\n @if map-get($utility, rfs) {\n // Inside the media query\n @if $is-rfs-media-query {\n $val: rfs-value($value);\n\n // Do not render anything if fluid and non fluid values are the same\n $value: if($val == rfs-fluid-value($value), null, $val);\n }\n @else {\n $value: rfs-fluid-value($value);\n }\n }\n\n $is-css-var: map-get($utility, css-var);\n $is-local-vars: map-get($utility, local-vars);\n $is-rtl: map-get($utility, rtl);\n\n @if $value != null {\n @if $is-rtl == false {\n /* rtl:begin:remove */\n }\n\n @if $is-css-var {\n .#{$property-class + $infix + $property-class-modifier} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n }\n } @else {\n .#{$property-class + $infix + $property-class-modifier} {\n @each $property in $properties {\n @if $is-local-vars {\n @each $local-var, $value in $is-local-vars {\n --#{$variable-prefix}#{$local-var}: #{$value};\n }\n }\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n @each $property in $properties {\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n }\n }\n\n @if $is-rtl == false {\n /* rtl:end:remove */\n }\n }\n }\n}\n","// Loop over each breakpoint\n@each $breakpoint in map-keys($grid-breakpoints) {\n\n // Generate media query if needed\n @include media-breakpoint-up($breakpoint) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix);\n }\n }\n }\n}\n\n// RFS rescaling\n@media (min-width: $rfs-mq-value) {\n @each $breakpoint in map-keys($grid-breakpoints) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n @if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix, true);\n }\n }\n }\n }\n}\n\n\n// Print utilities\n@media print {\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Then check if the utility needs print styles\n @if type-of($utility) == \"map\" and map-get($utility, print) == true {\n @include generate-utility($utility, \"-print\");\n }\n }\n}\n"]} \ No newline at end of file diff --git a/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css new file mode 100644 index 0000000..3160359 --- /dev/null +++ b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap Grid v5.1.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{width:100%;padding-right:var(--bs-gutter-x,.75rem);padding-left:var(--bs-gutter-x,.75rem);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(var(--bs-gutter-y) * -1);margin-right:calc(var(--bs-gutter-x) * -.5);margin-left:calc(var(--bs-gutter-x) * -.5)}.row>*{box-sizing:border-box;flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}@media (min-width:576px){.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}}@media (min-width:768px){.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}}@media (min-width:992px){.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}}@media (min-width:1200px){.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}}@media (min-width:1400px){.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}} +/*# sourceMappingURL=bootstrap-grid.min.css.map */ \ No newline at end of file diff --git a/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map new file mode 100644 index 0000000..4f745de --- /dev/null +++ b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/bootstrap-grid.scss","../../scss/_containers.scss","dist/css/bootstrap-grid.css","../../scss/mixins/_container.scss","../../scss/mixins/_breakpoints.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AAAA;;;;;ACME,WCCF,iBAGA,cACA,cACA,cAHA,cADA,eCLE,MAAA,KACA,cAAA,0BACA,aAAA,0BACA,aAAA,KACA,YAAA,KCwDE,yBH5CE,WAAA,cACE,UAAA,OG2CJ,yBH5CE,WAAA,cAAA,cACE,UAAA,OG2CJ,yBH5CE,WAAA,cAAA,cAAA,cACE,UAAA,OG2CJ,0BH5CE,WAAA,cAAA,cAAA,cAAA,cACE,UAAA,QG2CJ,0BH5CE,WAAA,cAAA,cAAA,cAAA,cAAA,eACE,UAAA,QIfN,KCAA,cAAA,OACA,cAAA,EACA,QAAA,KACA,UAAA,KACA,WAAA,8BACA,aAAA,+BACA,YAAA,+BDHE,OCQF,WAAA,WAIA,YAAA,EACA,MAAA,KACA,UAAA,KACA,cAAA,8BACA,aAAA,8BACA,WAAA,mBA+CI,KACE,KAAA,EAAA,EAAA,GAGF,iBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,cACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,UAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,UAxDV,YAAA,YAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,IAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,IAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,IAwDU,WAxDV,YAAA,aAwDU,WAxDV,YAAA,aAmEM,KJoGR,MIlGU,cAAA,EAGF,KJoGR,MIlGU,cAAA,EAPF,KJ8GR,MI5GU,cAAA,QAGF,KJ8GR,MI5GU,cAAA,QAPF,KJwHR,MItHU,cAAA,OAGF,KJwHR,MItHU,cAAA,OAPF,KJkIR,MIhIU,cAAA,KAGF,KJkIR,MIhIU,cAAA,KAPF,KJ4IR,MI1IU,cAAA,OAGF,KJ4IR,MI1IU,cAAA,OAPF,KJsJR,MIpJU,cAAA,KAGF,KJsJR,MIpJU,cAAA,KFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,YAAA,EAwDU,aAxDV,YAAA,YAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAmEM,QJyTR,SIvTU,cAAA,EAGF,QJyTR,SIvTU,cAAA,EAPF,QJmUR,SIjUU,cAAA,QAGF,QJmUR,SIjUU,cAAA,QAPF,QJ6UR,SI3UU,cAAA,OAGF,QJ6UR,SI3UU,cAAA,OAPF,QJuVR,SIrVU,cAAA,KAGF,QJuVR,SIrVU,cAAA,KAPF,QJiWR,SI/VU,cAAA,OAGF,QJiWR,SI/VU,cAAA,OAPF,QJ2WR,SIzWU,cAAA,KAGF,QJ2WR,SIzWU,cAAA,MFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,YAAA,EAwDU,aAxDV,YAAA,YAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAmEM,QJ8gBR,SI5gBU,cAAA,EAGF,QJ8gBR,SI5gBU,cAAA,EAPF,QJwhBR,SIthBU,cAAA,QAGF,QJwhBR,SIthBU,cAAA,QAPF,QJkiBR,SIhiBU,cAAA,OAGF,QJkiBR,SIhiBU,cAAA,OAPF,QJ4iBR,SI1iBU,cAAA,KAGF,QJ4iBR,SI1iBU,cAAA,KAPF,QJsjBR,SIpjBU,cAAA,OAGF,QJsjBR,SIpjBU,cAAA,OAPF,QJgkBR,SI9jBU,cAAA,KAGF,QJgkBR,SI9jBU,cAAA,MFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,YAAA,EAwDU,aAxDV,YAAA,YAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAmEM,QJmuBR,SIjuBU,cAAA,EAGF,QJmuBR,SIjuBU,cAAA,EAPF,QJ6uBR,SI3uBU,cAAA,QAGF,QJ6uBR,SI3uBU,cAAA,QAPF,QJuvBR,SIrvBU,cAAA,OAGF,QJuvBR,SIrvBU,cAAA,OAPF,QJiwBR,SI/vBU,cAAA,KAGF,QJiwBR,SI/vBU,cAAA,KAPF,QJ2wBR,SIzwBU,cAAA,OAGF,QJ2wBR,SIzwBU,cAAA,OAPF,QJqxBR,SInxBU,cAAA,KAGF,QJqxBR,SInxBU,cAAA,MFzDN,0BESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,YAAA,EAwDU,aAxDV,YAAA,YAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAmEM,QJw7BR,SIt7BU,cAAA,EAGF,QJw7BR,SIt7BU,cAAA,EAPF,QJk8BR,SIh8BU,cAAA,QAGF,QJk8BR,SIh8BU,cAAA,QAPF,QJ48BR,SI18BU,cAAA,OAGF,QJ48BR,SI18BU,cAAA,OAPF,QJs9BR,SIp9BU,cAAA,KAGF,QJs9BR,SIp9BU,cAAA,KAPF,QJg+BR,SI99BU,cAAA,OAGF,QJg+BR,SI99BU,cAAA,OAPF,QJ0+BR,SIx+BU,cAAA,KAGF,QJ0+BR,SIx+BU,cAAA,MFzDN,0BESE,SACE,KAAA,EAAA,EAAA,GAGF,qBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,cAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,cAxDV,YAAA,EAwDU,cAxDV,YAAA,YAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,IAwDU,eAxDV,YAAA,aAwDU,eAxDV,YAAA,aAmEM,SJ6oCR,UI3oCU,cAAA,EAGF,SJ6oCR,UI3oCU,cAAA,EAPF,SJupCR,UIrpCU,cAAA,QAGF,SJupCR,UIrpCU,cAAA,QAPF,SJiqCR,UI/pCU,cAAA,OAGF,SJiqCR,UI/pCU,cAAA,OAPF,SJ2qCR,UIzqCU,cAAA,KAGF,SJ2qCR,UIzqCU,cAAA,KAPF,SJqrCR,UInrCU,cAAA,OAGF,SJqrCR,UInrCU,cAAA,OAPF,SJ+rCR,UI7rCU,cAAA,KAGF,SJ+rCR,UI7rCU,cAAA,MCzDF,UAOI,QAAA,iBAPJ,gBAOI,QAAA,uBAPJ,SAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,SAOI,QAAA,gBAPJ,aAOI,QAAA,oBAPJ,cAOI,QAAA,qBAPJ,QAOI,QAAA,eAPJ,eAOI,QAAA,sBAPJ,QAOI,QAAA,eAPJ,WAOI,KAAA,EAAA,EAAA,eAPJ,UAOI,eAAA,cAPJ,aAOI,eAAA,iBAPJ,kBAOI,eAAA,sBAPJ,qBAOI,eAAA,yBAPJ,aAOI,UAAA,YAPJ,aAOI,UAAA,YAPJ,eAOI,YAAA,YAPJ,eAOI,YAAA,YAPJ,WAOI,UAAA,eAPJ,aAOI,UAAA,iBAPJ,mBAOI,UAAA,uBAPJ,uBAOI,gBAAA,qBAPJ,qBAOI,gBAAA,mBAPJ,wBAOI,gBAAA,iBAPJ,yBAOI,gBAAA,wBAPJ,wBAOI,gBAAA,uBAPJ,wBAOI,gBAAA,uBAPJ,mBAOI,YAAA,qBAPJ,iBAOI,YAAA,mBAPJ,oBAOI,YAAA,iBAPJ,sBAOI,YAAA,mBAPJ,qBAOI,YAAA,kBAPJ,qBAOI,cAAA,qBAPJ,mBAOI,cAAA,mBAPJ,sBAOI,cAAA,iBAPJ,uBAOI,cAAA,wBAPJ,sBAOI,cAAA,uBAPJ,uBAOI,cAAA,kBAPJ,iBAOI,WAAA,eAPJ,kBAOI,WAAA,qBAPJ,gBAOI,WAAA,mBAPJ,mBAOI,WAAA,iBAPJ,qBAOI,WAAA,mBAPJ,oBAOI,WAAA,kBAPJ,aAOI,MAAA,aAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,KAOI,OAAA,YAPJ,KAOI,OAAA,iBAPJ,KAOI,OAAA,gBAPJ,KAOI,OAAA,eAPJ,KAOI,OAAA,iBAPJ,KAOI,OAAA,eAPJ,QAOI,OAAA,eAPJ,MAOI,aAAA,YAAA,YAAA,YAPJ,MAOI,aAAA,iBAAA,YAAA,iBAPJ,MAOI,aAAA,gBAAA,YAAA,gBAPJ,MAOI,aAAA,eAAA,YAAA,eAPJ,MAOI,aAAA,iBAAA,YAAA,iBAPJ,MAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,MAOI,WAAA,YAAA,cAAA,YAPJ,MAOI,WAAA,iBAAA,cAAA,iBAPJ,MAOI,WAAA,gBAAA,cAAA,gBAPJ,MAOI,WAAA,eAAA,cAAA,eAPJ,MAOI,WAAA,iBAAA,cAAA,iBAPJ,MAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,MAOI,WAAA,YAPJ,MAOI,WAAA,iBAPJ,MAOI,WAAA,gBAPJ,MAOI,WAAA,eAPJ,MAOI,WAAA,iBAPJ,MAOI,WAAA,eAPJ,SAOI,WAAA,eAPJ,MAOI,aAAA,YAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,gBAPJ,MAOI,aAAA,eAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,eAPJ,SAOI,aAAA,eAPJ,MAOI,cAAA,YAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,gBAPJ,MAOI,cAAA,eAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,eAPJ,SAOI,cAAA,eAPJ,MAOI,YAAA,YAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,gBAPJ,MAOI,YAAA,eAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,eAPJ,SAOI,YAAA,eAPJ,KAOI,QAAA,YAPJ,KAOI,QAAA,iBAPJ,KAOI,QAAA,gBAPJ,KAOI,QAAA,eAPJ,KAOI,QAAA,iBAPJ,KAOI,QAAA,eAPJ,MAOI,cAAA,YAAA,aAAA,YAPJ,MAOI,cAAA,iBAAA,aAAA,iBAPJ,MAOI,cAAA,gBAAA,aAAA,gBAPJ,MAOI,cAAA,eAAA,aAAA,eAPJ,MAOI,cAAA,iBAAA,aAAA,iBAPJ,MAOI,cAAA,eAAA,aAAA,eAPJ,MAOI,YAAA,YAAA,eAAA,YAPJ,MAOI,YAAA,iBAAA,eAAA,iBAPJ,MAOI,YAAA,gBAAA,eAAA,gBAPJ,MAOI,YAAA,eAAA,eAAA,eAPJ,MAOI,YAAA,iBAAA,eAAA,iBAPJ,MAOI,YAAA,eAAA,eAAA,eAPJ,MAOI,YAAA,YAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,gBAPJ,MAOI,YAAA,eAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,eAPJ,MAOI,cAAA,YAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,gBAPJ,MAOI,cAAA,eAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,eAPJ,MAOI,eAAA,YAPJ,MAOI,eAAA,iBAPJ,MAOI,eAAA,gBAPJ,MAOI,eAAA,eAPJ,MAOI,eAAA,iBAPJ,MAOI,eAAA,eAPJ,MAOI,aAAA,YAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,gBAPJ,MAOI,aAAA,eAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,eHPR,yBGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,aAAA,YAAA,YAAA,YAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,gBAAA,YAAA,gBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,YAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,cAAA,YAAA,aAAA,YAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,gBAAA,aAAA,gBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBHPR,yBGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,aAAA,YAAA,YAAA,YAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,gBAAA,YAAA,gBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,YAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,cAAA,YAAA,aAAA,YAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,gBAAA,aAAA,gBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBHPR,yBGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,aAAA,YAAA,YAAA,YAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,gBAAA,YAAA,gBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,YAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,cAAA,YAAA,aAAA,YAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,gBAAA,aAAA,gBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBHPR,0BGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,aAAA,YAAA,YAAA,YAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,gBAAA,YAAA,gBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,YAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,cAAA,YAAA,aAAA,YAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,gBAAA,aAAA,gBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBHPR,0BGAI,cAOI,QAAA,iBAPJ,oBAOI,QAAA,uBAPJ,aAOI,QAAA,gBAPJ,YAOI,QAAA,eAPJ,aAOI,QAAA,gBAPJ,iBAOI,QAAA,oBAPJ,kBAOI,QAAA,qBAPJ,YAOI,QAAA,eAPJ,mBAOI,QAAA,sBAPJ,YAOI,QAAA,eAPJ,eAOI,KAAA,EAAA,EAAA,eAPJ,cAOI,eAAA,cAPJ,iBAOI,eAAA,iBAPJ,sBAOI,eAAA,sBAPJ,yBAOI,eAAA,yBAPJ,iBAOI,UAAA,YAPJ,iBAOI,UAAA,YAPJ,mBAOI,YAAA,YAPJ,mBAOI,YAAA,YAPJ,eAOI,UAAA,eAPJ,iBAOI,UAAA,iBAPJ,uBAOI,UAAA,uBAPJ,2BAOI,gBAAA,qBAPJ,yBAOI,gBAAA,mBAPJ,4BAOI,gBAAA,iBAPJ,6BAOI,gBAAA,wBAPJ,4BAOI,gBAAA,uBAPJ,4BAOI,gBAAA,uBAPJ,uBAOI,YAAA,qBAPJ,qBAOI,YAAA,mBAPJ,wBAOI,YAAA,iBAPJ,0BAOI,YAAA,mBAPJ,yBAOI,YAAA,kBAPJ,yBAOI,cAAA,qBAPJ,uBAOI,cAAA,mBAPJ,0BAOI,cAAA,iBAPJ,2BAOI,cAAA,wBAPJ,0BAOI,cAAA,uBAPJ,2BAOI,cAAA,kBAPJ,qBAOI,WAAA,eAPJ,sBAOI,WAAA,qBAPJ,oBAOI,WAAA,mBAPJ,uBAOI,WAAA,iBAPJ,yBAOI,WAAA,mBAPJ,wBAOI,WAAA,kBAPJ,iBAOI,MAAA,aAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,gBAOI,MAAA,YAPJ,SAOI,OAAA,YAPJ,SAOI,OAAA,iBAPJ,SAOI,OAAA,gBAPJ,SAOI,OAAA,eAPJ,SAOI,OAAA,iBAPJ,SAOI,OAAA,eAPJ,YAOI,OAAA,eAPJ,UAOI,aAAA,YAAA,YAAA,YAPJ,UAOI,aAAA,iBAAA,YAAA,iBAPJ,UAOI,aAAA,gBAAA,YAAA,gBAPJ,UAOI,aAAA,eAAA,YAAA,eAPJ,UAOI,aAAA,iBAAA,YAAA,iBAPJ,UAOI,aAAA,eAAA,YAAA,eAPJ,aAOI,aAAA,eAAA,YAAA,eAPJ,UAOI,WAAA,YAAA,cAAA,YAPJ,UAOI,WAAA,iBAAA,cAAA,iBAPJ,UAOI,WAAA,gBAAA,cAAA,gBAPJ,UAOI,WAAA,eAAA,cAAA,eAPJ,UAOI,WAAA,iBAAA,cAAA,iBAPJ,UAOI,WAAA,eAAA,cAAA,eAPJ,aAOI,WAAA,eAAA,cAAA,eAPJ,UAOI,WAAA,YAPJ,UAOI,WAAA,iBAPJ,UAOI,WAAA,gBAPJ,UAOI,WAAA,eAPJ,UAOI,WAAA,iBAPJ,UAOI,WAAA,eAPJ,aAOI,WAAA,eAPJ,UAOI,aAAA,YAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBAPJ,UAOI,aAAA,eAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,eAPJ,aAOI,aAAA,eAPJ,UAOI,cAAA,YAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBAPJ,UAOI,cAAA,eAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,eAPJ,aAOI,cAAA,eAPJ,UAOI,YAAA,YAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,gBAPJ,UAOI,YAAA,eAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,eAPJ,aAOI,YAAA,eAPJ,SAOI,QAAA,YAPJ,SAOI,QAAA,iBAPJ,SAOI,QAAA,gBAPJ,SAOI,QAAA,eAPJ,SAOI,QAAA,iBAPJ,SAOI,QAAA,eAPJ,UAOI,cAAA,YAAA,aAAA,YAPJ,UAOI,cAAA,iBAAA,aAAA,iBAPJ,UAOI,cAAA,gBAAA,aAAA,gBAPJ,UAOI,cAAA,eAAA,aAAA,eAPJ,UAOI,cAAA,iBAAA,aAAA,iBAPJ,UAOI,cAAA,eAAA,aAAA,eAPJ,UAOI,YAAA,YAAA,eAAA,YAPJ,UAOI,YAAA,iBAAA,eAAA,iBAPJ,UAOI,YAAA,gBAAA,eAAA,gBAPJ,UAOI,YAAA,eAAA,eAAA,eAPJ,UAOI,YAAA,iBAAA,eAAA,iBAPJ,UAOI,YAAA,eAAA,eAAA,eAPJ,UAOI,YAAA,YAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,gBAPJ,UAOI,YAAA,eAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,eAPJ,UAOI,cAAA,YAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBAPJ,UAOI,cAAA,eAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,eAPJ,UAOI,eAAA,YAPJ,UAOI,eAAA,iBAPJ,UAOI,eAAA,gBAPJ,UAOI,eAAA,eAPJ,UAOI,eAAA,iBAPJ,UAOI,eAAA,eAPJ,UAOI,aAAA,YAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBAPJ,UAOI,aAAA,eAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBChCZ,aDyBQ,gBAOI,QAAA,iBAPJ,sBAOI,QAAA,uBAPJ,eAOI,QAAA,gBAPJ,cAOI,QAAA,eAPJ,eAOI,QAAA,gBAPJ,mBAOI,QAAA,oBAPJ,oBAOI,QAAA,qBAPJ,cAOI,QAAA,eAPJ,qBAOI,QAAA,sBAPJ,cAOI,QAAA","sourcesContent":["/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n\n$include-column-box-sizing: true !default;\n\n@import \"functions\";\n@import \"variables\";\n\n@import \"mixins/lists\";\n@import \"mixins/breakpoints\";\n@import \"mixins/container\";\n@import \"mixins/grid\";\n@import \"mixins/utilities\";\n\n@import \"vendor/rfs\";\n\n@import \"containers\";\n@import \"grid\";\n\n@import \"utilities\";\n// Only use the utilities we need\n// stylelint-disable-next-line scss/dollar-variable-default\n$utilities: map-get-multiple(\n $utilities,\n (\n \"display\",\n \"order\",\n \"flex\",\n \"flex-direction\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"justify-content\",\n \"align-items\",\n \"align-content\",\n \"align-self\",\n \"margin\",\n \"margin-x\",\n \"margin-y\",\n \"margin-top\",\n \"margin-end\",\n \"margin-bottom\",\n \"margin-start\",\n \"negative-margin\",\n \"negative-margin-x\",\n \"negative-margin-y\",\n \"negative-margin-top\",\n \"negative-margin-end\",\n \"negative-margin-bottom\",\n \"negative-margin-start\",\n \"padding\",\n \"padding-x\",\n \"padding-y\",\n \"padding-top\",\n \"padding-end\",\n \"padding-bottom\",\n \"padding-start\",\n )\n);\n\n@import \"utilities/api\";\n","// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n@if $enable-grid-classes {\n // Single container class with breakpoint max-widths\n .container,\n // 100% wide container at all breakpoints\n .container-fluid {\n @include make-container();\n }\n\n // Responsive containers that are 100% wide until a breakpoint\n @each $breakpoint, $container-max-width in $container-max-widths {\n .container-#{$breakpoint} {\n @extend .container-fluid;\n }\n\n @include media-breakpoint-up($breakpoint, $grid-breakpoints) {\n %responsive-container-#{$breakpoint} {\n max-width: $container-max-width;\n }\n\n // Extend each breakpoint which is smaller or equal to the current breakpoint\n $extend-breakpoint: true;\n\n @each $name, $width in $grid-breakpoints {\n @if ($extend-breakpoint) {\n .container#{breakpoint-infix($name, $grid-breakpoints)} {\n @extend %responsive-container-#{$breakpoint};\n }\n\n // Once the current breakpoint is reached, stop extending\n @if ($breakpoint == $name) {\n $extend-breakpoint: false;\n }\n }\n }\n }\n }\n}\n","/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n.container,\n.container-fluid,\n.container-xxl,\n.container-xl,\n.container-lg,\n.container-md,\n.container-sm {\n width: 100%;\n padding-right: var(--bs-gutter-x, 0.75rem);\n padding-left: var(--bs-gutter-x, 0.75rem);\n margin-right: auto;\n margin-left: auto;\n}\n\n@media (min-width: 576px) {\n .container-sm, .container {\n max-width: 540px;\n }\n}\n@media (min-width: 768px) {\n .container-md, .container-sm, .container {\n max-width: 720px;\n }\n}\n@media (min-width: 992px) {\n .container-lg, .container-md, .container-sm, .container {\n max-width: 960px;\n }\n}\n@media (min-width: 1200px) {\n .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1140px;\n }\n}\n@media (min-width: 1400px) {\n .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1320px;\n }\n}\n.row {\n --bs-gutter-x: 1.5rem;\n --bs-gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--bs-gutter-y) * -1);\n margin-right: calc(var(--bs-gutter-x) * -.5);\n margin-left: calc(var(--bs-gutter-x) * -.5);\n}\n.row > * {\n box-sizing: border-box;\n flex-shrink: 0;\n width: 100%;\n max-width: 100%;\n padding-right: calc(var(--bs-gutter-x) * .5);\n padding-left: calc(var(--bs-gutter-x) * .5);\n margin-top: var(--bs-gutter-y);\n}\n\n.col {\n flex: 1 0 0%;\n}\n\n.row-cols-auto > * {\n flex: 0 0 auto;\n width: auto;\n}\n\n.row-cols-1 > * {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.row-cols-2 > * {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.row-cols-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n}\n\n.row-cols-4 > * {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.row-cols-5 > * {\n flex: 0 0 auto;\n width: 20%;\n}\n\n.row-cols-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n}\n\n.col-auto {\n flex: 0 0 auto;\n width: auto;\n}\n\n.col-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n}\n\n.col-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n}\n\n.col-3 {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.col-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n}\n\n.col-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n}\n\n.col-6 {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.col-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n}\n\n.col-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n}\n\n.col-9 {\n flex: 0 0 auto;\n width: 75%;\n}\n\n.col-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n}\n\n.col-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n}\n\n.col-12 {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.offset-1 {\n margin-left: 8.33333333%;\n}\n\n.offset-2 {\n margin-left: 16.66666667%;\n}\n\n.offset-3 {\n margin-left: 25%;\n}\n\n.offset-4 {\n margin-left: 33.33333333%;\n}\n\n.offset-5 {\n margin-left: 41.66666667%;\n}\n\n.offset-6 {\n margin-left: 50%;\n}\n\n.offset-7 {\n margin-left: 58.33333333%;\n}\n\n.offset-8 {\n margin-left: 66.66666667%;\n}\n\n.offset-9 {\n margin-left: 75%;\n}\n\n.offset-10 {\n margin-left: 83.33333333%;\n}\n\n.offset-11 {\n margin-left: 91.66666667%;\n}\n\n.g-0,\n.gx-0 {\n --bs-gutter-x: 0;\n}\n\n.g-0,\n.gy-0 {\n --bs-gutter-y: 0;\n}\n\n.g-1,\n.gx-1 {\n --bs-gutter-x: 0.25rem;\n}\n\n.g-1,\n.gy-1 {\n --bs-gutter-y: 0.25rem;\n}\n\n.g-2,\n.gx-2 {\n --bs-gutter-x: 0.5rem;\n}\n\n.g-2,\n.gy-2 {\n --bs-gutter-y: 0.5rem;\n}\n\n.g-3,\n.gx-3 {\n --bs-gutter-x: 1rem;\n}\n\n.g-3,\n.gy-3 {\n --bs-gutter-y: 1rem;\n}\n\n.g-4,\n.gx-4 {\n --bs-gutter-x: 1.5rem;\n}\n\n.g-4,\n.gy-4 {\n --bs-gutter-y: 1.5rem;\n}\n\n.g-5,\n.gx-5 {\n --bs-gutter-x: 3rem;\n}\n\n.g-5,\n.gy-5 {\n --bs-gutter-y: 3rem;\n}\n\n@media (min-width: 576px) {\n .col-sm {\n flex: 1 0 0%;\n }\n\n .row-cols-sm-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-sm-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-sm-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-sm-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-sm-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-sm-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-sm-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-sm-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-sm-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-sm-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-sm-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-sm-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-sm-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-sm-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-sm-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-sm-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-sm-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-sm-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-sm-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-sm-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-sm-0 {\n margin-left: 0;\n }\n\n .offset-sm-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-sm-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-sm-3 {\n margin-left: 25%;\n }\n\n .offset-sm-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-sm-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-sm-6 {\n margin-left: 50%;\n }\n\n .offset-sm-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-sm-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-sm-9 {\n margin-left: 75%;\n }\n\n .offset-sm-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-sm-11 {\n margin-left: 91.66666667%;\n }\n\n .g-sm-0,\n.gx-sm-0 {\n --bs-gutter-x: 0;\n }\n\n .g-sm-0,\n.gy-sm-0 {\n --bs-gutter-y: 0;\n }\n\n .g-sm-1,\n.gx-sm-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-sm-1,\n.gy-sm-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-sm-2,\n.gx-sm-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-sm-2,\n.gy-sm-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-sm-3,\n.gx-sm-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-sm-3,\n.gy-sm-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-sm-4,\n.gx-sm-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-sm-4,\n.gy-sm-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-sm-5,\n.gx-sm-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-sm-5,\n.gy-sm-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 768px) {\n .col-md {\n flex: 1 0 0%;\n }\n\n .row-cols-md-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-md-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-md-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-md-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-md-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-md-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-md-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-md-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-md-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-md-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-md-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-md-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-md-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-md-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-md-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-md-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-md-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-md-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-md-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-md-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-md-0 {\n margin-left: 0;\n }\n\n .offset-md-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-md-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-md-3 {\n margin-left: 25%;\n }\n\n .offset-md-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-md-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-md-6 {\n margin-left: 50%;\n }\n\n .offset-md-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-md-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-md-9 {\n margin-left: 75%;\n }\n\n .offset-md-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-md-11 {\n margin-left: 91.66666667%;\n }\n\n .g-md-0,\n.gx-md-0 {\n --bs-gutter-x: 0;\n }\n\n .g-md-0,\n.gy-md-0 {\n --bs-gutter-y: 0;\n }\n\n .g-md-1,\n.gx-md-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-md-1,\n.gy-md-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-md-2,\n.gx-md-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-md-2,\n.gy-md-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-md-3,\n.gx-md-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-md-3,\n.gy-md-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-md-4,\n.gx-md-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-md-4,\n.gy-md-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-md-5,\n.gx-md-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-md-5,\n.gy-md-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 992px) {\n .col-lg {\n flex: 1 0 0%;\n }\n\n .row-cols-lg-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-lg-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-lg-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-lg-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-lg-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-lg-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-lg-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-lg-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-lg-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-lg-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-lg-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-lg-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-lg-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-lg-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-lg-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-lg-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-lg-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-lg-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-lg-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-lg-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-lg-0 {\n margin-left: 0;\n }\n\n .offset-lg-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-lg-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-lg-3 {\n margin-left: 25%;\n }\n\n .offset-lg-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-lg-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-lg-6 {\n margin-left: 50%;\n }\n\n .offset-lg-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-lg-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-lg-9 {\n margin-left: 75%;\n }\n\n .offset-lg-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-lg-11 {\n margin-left: 91.66666667%;\n }\n\n .g-lg-0,\n.gx-lg-0 {\n --bs-gutter-x: 0;\n }\n\n .g-lg-0,\n.gy-lg-0 {\n --bs-gutter-y: 0;\n }\n\n .g-lg-1,\n.gx-lg-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-lg-1,\n.gy-lg-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-lg-2,\n.gx-lg-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-lg-2,\n.gy-lg-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-lg-3,\n.gx-lg-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-lg-3,\n.gy-lg-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-lg-4,\n.gx-lg-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-lg-4,\n.gy-lg-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-lg-5,\n.gx-lg-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-lg-5,\n.gy-lg-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1200px) {\n .col-xl {\n flex: 1 0 0%;\n }\n\n .row-cols-xl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xl-0 {\n margin-left: 0;\n }\n\n .offset-xl-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-xl-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-xl-3 {\n margin-left: 25%;\n }\n\n .offset-xl-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-xl-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-xl-6 {\n margin-left: 50%;\n }\n\n .offset-xl-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-xl-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-xl-9 {\n margin-left: 75%;\n }\n\n .offset-xl-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-xl-11 {\n margin-left: 91.66666667%;\n }\n\n .g-xl-0,\n.gx-xl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xl-0,\n.gy-xl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xl-1,\n.gx-xl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xl-1,\n.gy-xl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xl-2,\n.gx-xl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xl-2,\n.gy-xl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xl-3,\n.gx-xl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xl-3,\n.gy-xl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xl-4,\n.gx-xl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xl-4,\n.gy-xl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xl-5,\n.gx-xl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xl-5,\n.gy-xl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1400px) {\n .col-xxl {\n flex: 1 0 0%;\n }\n\n .row-cols-xxl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xxl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xxl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xxl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xxl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xxl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xxl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xxl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xxl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xxl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xxl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xxl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xxl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xxl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xxl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xxl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xxl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xxl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xxl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xxl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xxl-0 {\n margin-left: 0;\n }\n\n .offset-xxl-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-xxl-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-xxl-3 {\n margin-left: 25%;\n }\n\n .offset-xxl-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-xxl-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-xxl-6 {\n margin-left: 50%;\n }\n\n .offset-xxl-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-xxl-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-xxl-9 {\n margin-left: 75%;\n }\n\n .offset-xxl-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-xxl-11 {\n margin-left: 91.66666667%;\n }\n\n .g-xxl-0,\n.gx-xxl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xxl-0,\n.gy-xxl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xxl-1,\n.gx-xxl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xxl-1,\n.gy-xxl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xxl-2,\n.gx-xxl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xxl-2,\n.gy-xxl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xxl-3,\n.gx-xxl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xxl-3,\n.gy-xxl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xxl-4,\n.gx-xxl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xxl-4,\n.gy-xxl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xxl-5,\n.gx-xxl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xxl-5,\n.gy-xxl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n.d-inline {\n display: inline !important;\n}\n\n.d-inline-block {\n display: inline-block !important;\n}\n\n.d-block {\n display: block !important;\n}\n\n.d-grid {\n display: grid !important;\n}\n\n.d-table {\n display: table !important;\n}\n\n.d-table-row {\n display: table-row !important;\n}\n\n.d-table-cell {\n display: table-cell !important;\n}\n\n.d-flex {\n display: flex !important;\n}\n\n.d-inline-flex {\n display: inline-flex !important;\n}\n\n.d-none {\n display: none !important;\n}\n\n.flex-fill {\n flex: 1 1 auto !important;\n}\n\n.flex-row {\n flex-direction: row !important;\n}\n\n.flex-column {\n flex-direction: column !important;\n}\n\n.flex-row-reverse {\n flex-direction: row-reverse !important;\n}\n\n.flex-column-reverse {\n flex-direction: column-reverse !important;\n}\n\n.flex-grow-0 {\n flex-grow: 0 !important;\n}\n\n.flex-grow-1 {\n flex-grow: 1 !important;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0 !important;\n}\n\n.flex-shrink-1 {\n flex-shrink: 1 !important;\n}\n\n.flex-wrap {\n flex-wrap: wrap !important;\n}\n\n.flex-nowrap {\n flex-wrap: nowrap !important;\n}\n\n.flex-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n}\n\n.justify-content-start {\n justify-content: flex-start !important;\n}\n\n.justify-content-end {\n justify-content: flex-end !important;\n}\n\n.justify-content-center {\n justify-content: center !important;\n}\n\n.justify-content-between {\n justify-content: space-between !important;\n}\n\n.justify-content-around {\n justify-content: space-around !important;\n}\n\n.justify-content-evenly {\n justify-content: space-evenly !important;\n}\n\n.align-items-start {\n align-items: flex-start !important;\n}\n\n.align-items-end {\n align-items: flex-end !important;\n}\n\n.align-items-center {\n align-items: center !important;\n}\n\n.align-items-baseline {\n align-items: baseline !important;\n}\n\n.align-items-stretch {\n align-items: stretch !important;\n}\n\n.align-content-start {\n align-content: flex-start !important;\n}\n\n.align-content-end {\n align-content: flex-end !important;\n}\n\n.align-content-center {\n align-content: center !important;\n}\n\n.align-content-between {\n align-content: space-between !important;\n}\n\n.align-content-around {\n align-content: space-around !important;\n}\n\n.align-content-stretch {\n align-content: stretch !important;\n}\n\n.align-self-auto {\n align-self: auto !important;\n}\n\n.align-self-start {\n align-self: flex-start !important;\n}\n\n.align-self-end {\n align-self: flex-end !important;\n}\n\n.align-self-center {\n align-self: center !important;\n}\n\n.align-self-baseline {\n align-self: baseline !important;\n}\n\n.align-self-stretch {\n align-self: stretch !important;\n}\n\n.order-first {\n order: -1 !important;\n}\n\n.order-0 {\n order: 0 !important;\n}\n\n.order-1 {\n order: 1 !important;\n}\n\n.order-2 {\n order: 2 !important;\n}\n\n.order-3 {\n order: 3 !important;\n}\n\n.order-4 {\n order: 4 !important;\n}\n\n.order-5 {\n order: 5 !important;\n}\n\n.order-last {\n order: 6 !important;\n}\n\n.m-0 {\n margin: 0 !important;\n}\n\n.m-1 {\n margin: 0.25rem !important;\n}\n\n.m-2 {\n margin: 0.5rem !important;\n}\n\n.m-3 {\n margin: 1rem !important;\n}\n\n.m-4 {\n margin: 1.5rem !important;\n}\n\n.m-5 {\n margin: 3rem !important;\n}\n\n.m-auto {\n margin: auto !important;\n}\n\n.mx-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n}\n\n.mx-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n}\n\n.mx-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n}\n\n.mx-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n}\n\n.mx-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n}\n\n.mx-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n}\n\n.mx-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n}\n\n.my-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n}\n\n.my-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n}\n\n.my-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n}\n\n.my-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n}\n\n.my-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n}\n\n.my-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n}\n\n.my-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n}\n\n.mt-0 {\n margin-top: 0 !important;\n}\n\n.mt-1 {\n margin-top: 0.25rem !important;\n}\n\n.mt-2 {\n margin-top: 0.5rem !important;\n}\n\n.mt-3 {\n margin-top: 1rem !important;\n}\n\n.mt-4 {\n margin-top: 1.5rem !important;\n}\n\n.mt-5 {\n margin-top: 3rem !important;\n}\n\n.mt-auto {\n margin-top: auto !important;\n}\n\n.me-0 {\n margin-right: 0 !important;\n}\n\n.me-1 {\n margin-right: 0.25rem !important;\n}\n\n.me-2 {\n margin-right: 0.5rem !important;\n}\n\n.me-3 {\n margin-right: 1rem !important;\n}\n\n.me-4 {\n margin-right: 1.5rem !important;\n}\n\n.me-5 {\n margin-right: 3rem !important;\n}\n\n.me-auto {\n margin-right: auto !important;\n}\n\n.mb-0 {\n margin-bottom: 0 !important;\n}\n\n.mb-1 {\n margin-bottom: 0.25rem !important;\n}\n\n.mb-2 {\n margin-bottom: 0.5rem !important;\n}\n\n.mb-3 {\n margin-bottom: 1rem !important;\n}\n\n.mb-4 {\n margin-bottom: 1.5rem !important;\n}\n\n.mb-5 {\n margin-bottom: 3rem !important;\n}\n\n.mb-auto {\n margin-bottom: auto !important;\n}\n\n.ms-0 {\n margin-left: 0 !important;\n}\n\n.ms-1 {\n margin-left: 0.25rem !important;\n}\n\n.ms-2 {\n margin-left: 0.5rem !important;\n}\n\n.ms-3 {\n margin-left: 1rem !important;\n}\n\n.ms-4 {\n margin-left: 1.5rem !important;\n}\n\n.ms-5 {\n margin-left: 3rem !important;\n}\n\n.ms-auto {\n margin-left: auto !important;\n}\n\n.p-0 {\n padding: 0 !important;\n}\n\n.p-1 {\n padding: 0.25rem !important;\n}\n\n.p-2 {\n padding: 0.5rem !important;\n}\n\n.p-3 {\n padding: 1rem !important;\n}\n\n.p-4 {\n padding: 1.5rem !important;\n}\n\n.p-5 {\n padding: 3rem !important;\n}\n\n.px-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n}\n\n.px-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n}\n\n.px-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n}\n\n.px-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n}\n\n.px-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n}\n\n.px-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n}\n\n.py-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n\n.py-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n}\n\n.py-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n}\n\n.py-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n}\n\n.py-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n}\n\n.py-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n}\n\n.pt-0 {\n padding-top: 0 !important;\n}\n\n.pt-1 {\n padding-top: 0.25rem !important;\n}\n\n.pt-2 {\n padding-top: 0.5rem !important;\n}\n\n.pt-3 {\n padding-top: 1rem !important;\n}\n\n.pt-4 {\n padding-top: 1.5rem !important;\n}\n\n.pt-5 {\n padding-top: 3rem !important;\n}\n\n.pe-0 {\n padding-right: 0 !important;\n}\n\n.pe-1 {\n padding-right: 0.25rem !important;\n}\n\n.pe-2 {\n padding-right: 0.5rem !important;\n}\n\n.pe-3 {\n padding-right: 1rem !important;\n}\n\n.pe-4 {\n padding-right: 1.5rem !important;\n}\n\n.pe-5 {\n padding-right: 3rem !important;\n}\n\n.pb-0 {\n padding-bottom: 0 !important;\n}\n\n.pb-1 {\n padding-bottom: 0.25rem !important;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem !important;\n}\n\n.pb-3 {\n padding-bottom: 1rem !important;\n}\n\n.pb-4 {\n padding-bottom: 1.5rem !important;\n}\n\n.pb-5 {\n padding-bottom: 3rem !important;\n}\n\n.ps-0 {\n padding-left: 0 !important;\n}\n\n.ps-1 {\n padding-left: 0.25rem !important;\n}\n\n.ps-2 {\n padding-left: 0.5rem !important;\n}\n\n.ps-3 {\n padding-left: 1rem !important;\n}\n\n.ps-4 {\n padding-left: 1.5rem !important;\n}\n\n.ps-5 {\n padding-left: 3rem !important;\n}\n\n@media (min-width: 576px) {\n .d-sm-inline {\n display: inline !important;\n }\n\n .d-sm-inline-block {\n display: inline-block !important;\n }\n\n .d-sm-block {\n display: block !important;\n }\n\n .d-sm-grid {\n display: grid !important;\n }\n\n .d-sm-table {\n display: table !important;\n }\n\n .d-sm-table-row {\n display: table-row !important;\n }\n\n .d-sm-table-cell {\n display: table-cell !important;\n }\n\n .d-sm-flex {\n display: flex !important;\n }\n\n .d-sm-inline-flex {\n display: inline-flex !important;\n }\n\n .d-sm-none {\n display: none !important;\n }\n\n .flex-sm-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-sm-row {\n flex-direction: row !important;\n }\n\n .flex-sm-column {\n flex-direction: column !important;\n }\n\n .flex-sm-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-sm-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-sm-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-sm-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-sm-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-sm-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-sm-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-sm-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-sm-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-sm-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-sm-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-sm-center {\n justify-content: center !important;\n }\n\n .justify-content-sm-between {\n justify-content: space-between !important;\n }\n\n .justify-content-sm-around {\n justify-content: space-around !important;\n }\n\n .justify-content-sm-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-sm-start {\n align-items: flex-start !important;\n }\n\n .align-items-sm-end {\n align-items: flex-end !important;\n }\n\n .align-items-sm-center {\n align-items: center !important;\n }\n\n .align-items-sm-baseline {\n align-items: baseline !important;\n }\n\n .align-items-sm-stretch {\n align-items: stretch !important;\n }\n\n .align-content-sm-start {\n align-content: flex-start !important;\n }\n\n .align-content-sm-end {\n align-content: flex-end !important;\n }\n\n .align-content-sm-center {\n align-content: center !important;\n }\n\n .align-content-sm-between {\n align-content: space-between !important;\n }\n\n .align-content-sm-around {\n align-content: space-around !important;\n }\n\n .align-content-sm-stretch {\n align-content: stretch !important;\n }\n\n .align-self-sm-auto {\n align-self: auto !important;\n }\n\n .align-self-sm-start {\n align-self: flex-start !important;\n }\n\n .align-self-sm-end {\n align-self: flex-end !important;\n }\n\n .align-self-sm-center {\n align-self: center !important;\n }\n\n .align-self-sm-baseline {\n align-self: baseline !important;\n }\n\n .align-self-sm-stretch {\n align-self: stretch !important;\n }\n\n .order-sm-first {\n order: -1 !important;\n }\n\n .order-sm-0 {\n order: 0 !important;\n }\n\n .order-sm-1 {\n order: 1 !important;\n }\n\n .order-sm-2 {\n order: 2 !important;\n }\n\n .order-sm-3 {\n order: 3 !important;\n }\n\n .order-sm-4 {\n order: 4 !important;\n }\n\n .order-sm-5 {\n order: 5 !important;\n }\n\n .order-sm-last {\n order: 6 !important;\n }\n\n .m-sm-0 {\n margin: 0 !important;\n }\n\n .m-sm-1 {\n margin: 0.25rem !important;\n }\n\n .m-sm-2 {\n margin: 0.5rem !important;\n }\n\n .m-sm-3 {\n margin: 1rem !important;\n }\n\n .m-sm-4 {\n margin: 1.5rem !important;\n }\n\n .m-sm-5 {\n margin: 3rem !important;\n }\n\n .m-sm-auto {\n margin: auto !important;\n }\n\n .mx-sm-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-sm-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-sm-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-sm-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-sm-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-sm-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-sm-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-sm-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-sm-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-sm-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-sm-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-sm-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-sm-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-sm-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-sm-0 {\n margin-top: 0 !important;\n }\n\n .mt-sm-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-sm-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-sm-3 {\n margin-top: 1rem !important;\n }\n\n .mt-sm-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-sm-5 {\n margin-top: 3rem !important;\n }\n\n .mt-sm-auto {\n margin-top: auto !important;\n }\n\n .me-sm-0 {\n margin-right: 0 !important;\n }\n\n .me-sm-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-sm-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-sm-3 {\n margin-right: 1rem !important;\n }\n\n .me-sm-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-sm-5 {\n margin-right: 3rem !important;\n }\n\n .me-sm-auto {\n margin-right: auto !important;\n }\n\n .mb-sm-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-sm-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-sm-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-sm-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-sm-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-sm-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-sm-auto {\n margin-bottom: auto !important;\n }\n\n .ms-sm-0 {\n margin-left: 0 !important;\n }\n\n .ms-sm-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-sm-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-sm-3 {\n margin-left: 1rem !important;\n }\n\n .ms-sm-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-sm-5 {\n margin-left: 3rem !important;\n }\n\n .ms-sm-auto {\n margin-left: auto !important;\n }\n\n .p-sm-0 {\n padding: 0 !important;\n }\n\n .p-sm-1 {\n padding: 0.25rem !important;\n }\n\n .p-sm-2 {\n padding: 0.5rem !important;\n }\n\n .p-sm-3 {\n padding: 1rem !important;\n }\n\n .p-sm-4 {\n padding: 1.5rem !important;\n }\n\n .p-sm-5 {\n padding: 3rem !important;\n }\n\n .px-sm-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-sm-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-sm-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-sm-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-sm-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-sm-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-sm-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-sm-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-sm-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-sm-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-sm-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-sm-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-sm-0 {\n padding-top: 0 !important;\n }\n\n .pt-sm-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-sm-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-sm-3 {\n padding-top: 1rem !important;\n }\n\n .pt-sm-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-sm-5 {\n padding-top: 3rem !important;\n }\n\n .pe-sm-0 {\n padding-right: 0 !important;\n }\n\n .pe-sm-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-sm-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-sm-3 {\n padding-right: 1rem !important;\n }\n\n .pe-sm-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-sm-5 {\n padding-right: 3rem !important;\n }\n\n .pb-sm-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-sm-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-sm-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-sm-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-sm-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-sm-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-sm-0 {\n padding-left: 0 !important;\n }\n\n .ps-sm-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-sm-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-sm-3 {\n padding-left: 1rem !important;\n }\n\n .ps-sm-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-sm-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 768px) {\n .d-md-inline {\n display: inline !important;\n }\n\n .d-md-inline-block {\n display: inline-block !important;\n }\n\n .d-md-block {\n display: block !important;\n }\n\n .d-md-grid {\n display: grid !important;\n }\n\n .d-md-table {\n display: table !important;\n }\n\n .d-md-table-row {\n display: table-row !important;\n }\n\n .d-md-table-cell {\n display: table-cell !important;\n }\n\n .d-md-flex {\n display: flex !important;\n }\n\n .d-md-inline-flex {\n display: inline-flex !important;\n }\n\n .d-md-none {\n display: none !important;\n }\n\n .flex-md-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-md-row {\n flex-direction: row !important;\n }\n\n .flex-md-column {\n flex-direction: column !important;\n }\n\n .flex-md-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-md-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-md-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-md-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-md-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-md-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-md-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-md-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-md-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-md-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-md-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-md-center {\n justify-content: center !important;\n }\n\n .justify-content-md-between {\n justify-content: space-between !important;\n }\n\n .justify-content-md-around {\n justify-content: space-around !important;\n }\n\n .justify-content-md-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-md-start {\n align-items: flex-start !important;\n }\n\n .align-items-md-end {\n align-items: flex-end !important;\n }\n\n .align-items-md-center {\n align-items: center !important;\n }\n\n .align-items-md-baseline {\n align-items: baseline !important;\n }\n\n .align-items-md-stretch {\n align-items: stretch !important;\n }\n\n .align-content-md-start {\n align-content: flex-start !important;\n }\n\n .align-content-md-end {\n align-content: flex-end !important;\n }\n\n .align-content-md-center {\n align-content: center !important;\n }\n\n .align-content-md-between {\n align-content: space-between !important;\n }\n\n .align-content-md-around {\n align-content: space-around !important;\n }\n\n .align-content-md-stretch {\n align-content: stretch !important;\n }\n\n .align-self-md-auto {\n align-self: auto !important;\n }\n\n .align-self-md-start {\n align-self: flex-start !important;\n }\n\n .align-self-md-end {\n align-self: flex-end !important;\n }\n\n .align-self-md-center {\n align-self: center !important;\n }\n\n .align-self-md-baseline {\n align-self: baseline !important;\n }\n\n .align-self-md-stretch {\n align-self: stretch !important;\n }\n\n .order-md-first {\n order: -1 !important;\n }\n\n .order-md-0 {\n order: 0 !important;\n }\n\n .order-md-1 {\n order: 1 !important;\n }\n\n .order-md-2 {\n order: 2 !important;\n }\n\n .order-md-3 {\n order: 3 !important;\n }\n\n .order-md-4 {\n order: 4 !important;\n }\n\n .order-md-5 {\n order: 5 !important;\n }\n\n .order-md-last {\n order: 6 !important;\n }\n\n .m-md-0 {\n margin: 0 !important;\n }\n\n .m-md-1 {\n margin: 0.25rem !important;\n }\n\n .m-md-2 {\n margin: 0.5rem !important;\n }\n\n .m-md-3 {\n margin: 1rem !important;\n }\n\n .m-md-4 {\n margin: 1.5rem !important;\n }\n\n .m-md-5 {\n margin: 3rem !important;\n }\n\n .m-md-auto {\n margin: auto !important;\n }\n\n .mx-md-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-md-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-md-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-md-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-md-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-md-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-md-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-md-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-md-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-md-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-md-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-md-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-md-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-md-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-md-0 {\n margin-top: 0 !important;\n }\n\n .mt-md-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-md-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-md-3 {\n margin-top: 1rem !important;\n }\n\n .mt-md-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-md-5 {\n margin-top: 3rem !important;\n }\n\n .mt-md-auto {\n margin-top: auto !important;\n }\n\n .me-md-0 {\n margin-right: 0 !important;\n }\n\n .me-md-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-md-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-md-3 {\n margin-right: 1rem !important;\n }\n\n .me-md-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-md-5 {\n margin-right: 3rem !important;\n }\n\n .me-md-auto {\n margin-right: auto !important;\n }\n\n .mb-md-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-md-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-md-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-md-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-md-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-md-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-md-auto {\n margin-bottom: auto !important;\n }\n\n .ms-md-0 {\n margin-left: 0 !important;\n }\n\n .ms-md-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-md-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-md-3 {\n margin-left: 1rem !important;\n }\n\n .ms-md-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-md-5 {\n margin-left: 3rem !important;\n }\n\n .ms-md-auto {\n margin-left: auto !important;\n }\n\n .p-md-0 {\n padding: 0 !important;\n }\n\n .p-md-1 {\n padding: 0.25rem !important;\n }\n\n .p-md-2 {\n padding: 0.5rem !important;\n }\n\n .p-md-3 {\n padding: 1rem !important;\n }\n\n .p-md-4 {\n padding: 1.5rem !important;\n }\n\n .p-md-5 {\n padding: 3rem !important;\n }\n\n .px-md-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-md-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-md-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-md-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-md-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-md-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-md-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-md-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-md-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-md-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-md-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-md-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-md-0 {\n padding-top: 0 !important;\n }\n\n .pt-md-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-md-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-md-3 {\n padding-top: 1rem !important;\n }\n\n .pt-md-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-md-5 {\n padding-top: 3rem !important;\n }\n\n .pe-md-0 {\n padding-right: 0 !important;\n }\n\n .pe-md-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-md-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-md-3 {\n padding-right: 1rem !important;\n }\n\n .pe-md-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-md-5 {\n padding-right: 3rem !important;\n }\n\n .pb-md-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-md-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-md-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-md-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-md-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-md-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-md-0 {\n padding-left: 0 !important;\n }\n\n .ps-md-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-md-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-md-3 {\n padding-left: 1rem !important;\n }\n\n .ps-md-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-md-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 992px) {\n .d-lg-inline {\n display: inline !important;\n }\n\n .d-lg-inline-block {\n display: inline-block !important;\n }\n\n .d-lg-block {\n display: block !important;\n }\n\n .d-lg-grid {\n display: grid !important;\n }\n\n .d-lg-table {\n display: table !important;\n }\n\n .d-lg-table-row {\n display: table-row !important;\n }\n\n .d-lg-table-cell {\n display: table-cell !important;\n }\n\n .d-lg-flex {\n display: flex !important;\n }\n\n .d-lg-inline-flex {\n display: inline-flex !important;\n }\n\n .d-lg-none {\n display: none !important;\n }\n\n .flex-lg-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-lg-row {\n flex-direction: row !important;\n }\n\n .flex-lg-column {\n flex-direction: column !important;\n }\n\n .flex-lg-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-lg-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-lg-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-lg-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-lg-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-lg-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-lg-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-lg-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-lg-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-lg-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-lg-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-lg-center {\n justify-content: center !important;\n }\n\n .justify-content-lg-between {\n justify-content: space-between !important;\n }\n\n .justify-content-lg-around {\n justify-content: space-around !important;\n }\n\n .justify-content-lg-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-lg-start {\n align-items: flex-start !important;\n }\n\n .align-items-lg-end {\n align-items: flex-end !important;\n }\n\n .align-items-lg-center {\n align-items: center !important;\n }\n\n .align-items-lg-baseline {\n align-items: baseline !important;\n }\n\n .align-items-lg-stretch {\n align-items: stretch !important;\n }\n\n .align-content-lg-start {\n align-content: flex-start !important;\n }\n\n .align-content-lg-end {\n align-content: flex-end !important;\n }\n\n .align-content-lg-center {\n align-content: center !important;\n }\n\n .align-content-lg-between {\n align-content: space-between !important;\n }\n\n .align-content-lg-around {\n align-content: space-around !important;\n }\n\n .align-content-lg-stretch {\n align-content: stretch !important;\n }\n\n .align-self-lg-auto {\n align-self: auto !important;\n }\n\n .align-self-lg-start {\n align-self: flex-start !important;\n }\n\n .align-self-lg-end {\n align-self: flex-end !important;\n }\n\n .align-self-lg-center {\n align-self: center !important;\n }\n\n .align-self-lg-baseline {\n align-self: baseline !important;\n }\n\n .align-self-lg-stretch {\n align-self: stretch !important;\n }\n\n .order-lg-first {\n order: -1 !important;\n }\n\n .order-lg-0 {\n order: 0 !important;\n }\n\n .order-lg-1 {\n order: 1 !important;\n }\n\n .order-lg-2 {\n order: 2 !important;\n }\n\n .order-lg-3 {\n order: 3 !important;\n }\n\n .order-lg-4 {\n order: 4 !important;\n }\n\n .order-lg-5 {\n order: 5 !important;\n }\n\n .order-lg-last {\n order: 6 !important;\n }\n\n .m-lg-0 {\n margin: 0 !important;\n }\n\n .m-lg-1 {\n margin: 0.25rem !important;\n }\n\n .m-lg-2 {\n margin: 0.5rem !important;\n }\n\n .m-lg-3 {\n margin: 1rem !important;\n }\n\n .m-lg-4 {\n margin: 1.5rem !important;\n }\n\n .m-lg-5 {\n margin: 3rem !important;\n }\n\n .m-lg-auto {\n margin: auto !important;\n }\n\n .mx-lg-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-lg-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-lg-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-lg-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-lg-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-lg-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-lg-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-lg-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-lg-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-lg-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-lg-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-lg-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-lg-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-lg-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-lg-0 {\n margin-top: 0 !important;\n }\n\n .mt-lg-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-lg-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-lg-3 {\n margin-top: 1rem !important;\n }\n\n .mt-lg-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-lg-5 {\n margin-top: 3rem !important;\n }\n\n .mt-lg-auto {\n margin-top: auto !important;\n }\n\n .me-lg-0 {\n margin-right: 0 !important;\n }\n\n .me-lg-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-lg-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-lg-3 {\n margin-right: 1rem !important;\n }\n\n .me-lg-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-lg-5 {\n margin-right: 3rem !important;\n }\n\n .me-lg-auto {\n margin-right: auto !important;\n }\n\n .mb-lg-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-lg-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-lg-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-lg-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-lg-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-lg-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-lg-auto {\n margin-bottom: auto !important;\n }\n\n .ms-lg-0 {\n margin-left: 0 !important;\n }\n\n .ms-lg-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-lg-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-lg-3 {\n margin-left: 1rem !important;\n }\n\n .ms-lg-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-lg-5 {\n margin-left: 3rem !important;\n }\n\n .ms-lg-auto {\n margin-left: auto !important;\n }\n\n .p-lg-0 {\n padding: 0 !important;\n }\n\n .p-lg-1 {\n padding: 0.25rem !important;\n }\n\n .p-lg-2 {\n padding: 0.5rem !important;\n }\n\n .p-lg-3 {\n padding: 1rem !important;\n }\n\n .p-lg-4 {\n padding: 1.5rem !important;\n }\n\n .p-lg-5 {\n padding: 3rem !important;\n }\n\n .px-lg-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-lg-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-lg-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-lg-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-lg-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-lg-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-lg-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-lg-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-lg-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-lg-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-lg-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-lg-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-lg-0 {\n padding-top: 0 !important;\n }\n\n .pt-lg-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-lg-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-lg-3 {\n padding-top: 1rem !important;\n }\n\n .pt-lg-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-lg-5 {\n padding-top: 3rem !important;\n }\n\n .pe-lg-0 {\n padding-right: 0 !important;\n }\n\n .pe-lg-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-lg-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-lg-3 {\n padding-right: 1rem !important;\n }\n\n .pe-lg-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-lg-5 {\n padding-right: 3rem !important;\n }\n\n .pb-lg-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-lg-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-lg-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-lg-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-lg-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-lg-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-lg-0 {\n padding-left: 0 !important;\n }\n\n .ps-lg-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-lg-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-lg-3 {\n padding-left: 1rem !important;\n }\n\n .ps-lg-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-lg-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1200px) {\n .d-xl-inline {\n display: inline !important;\n }\n\n .d-xl-inline-block {\n display: inline-block !important;\n }\n\n .d-xl-block {\n display: block !important;\n }\n\n .d-xl-grid {\n display: grid !important;\n }\n\n .d-xl-table {\n display: table !important;\n }\n\n .d-xl-table-row {\n display: table-row !important;\n }\n\n .d-xl-table-cell {\n display: table-cell !important;\n }\n\n .d-xl-flex {\n display: flex !important;\n }\n\n .d-xl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xl-none {\n display: none !important;\n }\n\n .flex-xl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xl-row {\n flex-direction: row !important;\n }\n\n .flex-xl-column {\n flex-direction: column !important;\n }\n\n .flex-xl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xl-center {\n justify-content: center !important;\n }\n\n .justify-content-xl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xl-center {\n align-items: center !important;\n }\n\n .align-items-xl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xl-center {\n align-content: center !important;\n }\n\n .align-content-xl-between {\n align-content: space-between !important;\n }\n\n .align-content-xl-around {\n align-content: space-around !important;\n }\n\n .align-content-xl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xl-auto {\n align-self: auto !important;\n }\n\n .align-self-xl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xl-center {\n align-self: center !important;\n }\n\n .align-self-xl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xl-stretch {\n align-self: stretch !important;\n }\n\n .order-xl-first {\n order: -1 !important;\n }\n\n .order-xl-0 {\n order: 0 !important;\n }\n\n .order-xl-1 {\n order: 1 !important;\n }\n\n .order-xl-2 {\n order: 2 !important;\n }\n\n .order-xl-3 {\n order: 3 !important;\n }\n\n .order-xl-4 {\n order: 4 !important;\n }\n\n .order-xl-5 {\n order: 5 !important;\n }\n\n .order-xl-last {\n order: 6 !important;\n }\n\n .m-xl-0 {\n margin: 0 !important;\n }\n\n .m-xl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xl-3 {\n margin: 1rem !important;\n }\n\n .m-xl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xl-5 {\n margin: 3rem !important;\n }\n\n .m-xl-auto {\n margin: auto !important;\n }\n\n .mx-xl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-xl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-xl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-xl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-xl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-xl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-xl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-xl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xl-auto {\n margin-top: auto !important;\n }\n\n .me-xl-0 {\n margin-right: 0 !important;\n }\n\n .me-xl-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-xl-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-xl-3 {\n margin-right: 1rem !important;\n }\n\n .me-xl-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-xl-5 {\n margin-right: 3rem !important;\n }\n\n .me-xl-auto {\n margin-right: auto !important;\n }\n\n .mb-xl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xl-0 {\n margin-left: 0 !important;\n }\n\n .ms-xl-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-xl-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-xl-3 {\n margin-left: 1rem !important;\n }\n\n .ms-xl-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-xl-5 {\n margin-left: 3rem !important;\n }\n\n .ms-xl-auto {\n margin-left: auto !important;\n }\n\n .p-xl-0 {\n padding: 0 !important;\n }\n\n .p-xl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xl-3 {\n padding: 1rem !important;\n }\n\n .p-xl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xl-5 {\n padding: 3rem !important;\n }\n\n .px-xl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-xl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-xl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-xl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-xl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-xl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-xl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xl-0 {\n padding-right: 0 !important;\n }\n\n .pe-xl-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-xl-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-xl-3 {\n padding-right: 1rem !important;\n }\n\n .pe-xl-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-xl-5 {\n padding-right: 3rem !important;\n }\n\n .pb-xl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xl-0 {\n padding-left: 0 !important;\n }\n\n .ps-xl-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-xl-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-xl-3 {\n padding-left: 1rem !important;\n }\n\n .ps-xl-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-xl-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1400px) {\n .d-xxl-inline {\n display: inline !important;\n }\n\n .d-xxl-inline-block {\n display: inline-block !important;\n }\n\n .d-xxl-block {\n display: block !important;\n }\n\n .d-xxl-grid {\n display: grid !important;\n }\n\n .d-xxl-table {\n display: table !important;\n }\n\n .d-xxl-table-row {\n display: table-row !important;\n }\n\n .d-xxl-table-cell {\n display: table-cell !important;\n }\n\n .d-xxl-flex {\n display: flex !important;\n }\n\n .d-xxl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xxl-none {\n display: none !important;\n }\n\n .flex-xxl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xxl-row {\n flex-direction: row !important;\n }\n\n .flex-xxl-column {\n flex-direction: column !important;\n }\n\n .flex-xxl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xxl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xxl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xxl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xxl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xxl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xxl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xxl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xxl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xxl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xxl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xxl-center {\n justify-content: center !important;\n }\n\n .justify-content-xxl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xxl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xxl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xxl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xxl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xxl-center {\n align-items: center !important;\n }\n\n .align-items-xxl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xxl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xxl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xxl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xxl-center {\n align-content: center !important;\n }\n\n .align-content-xxl-between {\n align-content: space-between !important;\n }\n\n .align-content-xxl-around {\n align-content: space-around !important;\n }\n\n .align-content-xxl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xxl-auto {\n align-self: auto !important;\n }\n\n .align-self-xxl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xxl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xxl-center {\n align-self: center !important;\n }\n\n .align-self-xxl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xxl-stretch {\n align-self: stretch !important;\n }\n\n .order-xxl-first {\n order: -1 !important;\n }\n\n .order-xxl-0 {\n order: 0 !important;\n }\n\n .order-xxl-1 {\n order: 1 !important;\n }\n\n .order-xxl-2 {\n order: 2 !important;\n }\n\n .order-xxl-3 {\n order: 3 !important;\n }\n\n .order-xxl-4 {\n order: 4 !important;\n }\n\n .order-xxl-5 {\n order: 5 !important;\n }\n\n .order-xxl-last {\n order: 6 !important;\n }\n\n .m-xxl-0 {\n margin: 0 !important;\n }\n\n .m-xxl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xxl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xxl-3 {\n margin: 1rem !important;\n }\n\n .m-xxl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xxl-5 {\n margin: 3rem !important;\n }\n\n .m-xxl-auto {\n margin: auto !important;\n }\n\n .mx-xxl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-xxl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-xxl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-xxl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-xxl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-xxl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-xxl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-xxl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xxl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xxl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xxl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xxl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xxl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xxl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xxl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xxl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xxl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xxl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xxl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xxl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xxl-auto {\n margin-top: auto !important;\n }\n\n .me-xxl-0 {\n margin-right: 0 !important;\n }\n\n .me-xxl-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-xxl-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-xxl-3 {\n margin-right: 1rem !important;\n }\n\n .me-xxl-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-xxl-5 {\n margin-right: 3rem !important;\n }\n\n .me-xxl-auto {\n margin-right: auto !important;\n }\n\n .mb-xxl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xxl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xxl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xxl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xxl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xxl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xxl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xxl-0 {\n margin-left: 0 !important;\n }\n\n .ms-xxl-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-xxl-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-xxl-3 {\n margin-left: 1rem !important;\n }\n\n .ms-xxl-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-xxl-5 {\n margin-left: 3rem !important;\n }\n\n .ms-xxl-auto {\n margin-left: auto !important;\n }\n\n .p-xxl-0 {\n padding: 0 !important;\n }\n\n .p-xxl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xxl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xxl-3 {\n padding: 1rem !important;\n }\n\n .p-xxl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xxl-5 {\n padding: 3rem !important;\n }\n\n .px-xxl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-xxl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-xxl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-xxl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-xxl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-xxl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-xxl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xxl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xxl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xxl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xxl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xxl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xxl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xxl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xxl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xxl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xxl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xxl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xxl-0 {\n padding-right: 0 !important;\n }\n\n .pe-xxl-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-xxl-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-xxl-3 {\n padding-right: 1rem !important;\n }\n\n .pe-xxl-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-xxl-5 {\n padding-right: 3rem !important;\n }\n\n .pb-xxl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xxl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xxl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xxl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xxl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xxl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xxl-0 {\n padding-left: 0 !important;\n }\n\n .ps-xxl-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-xxl-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-xxl-3 {\n padding-left: 1rem !important;\n }\n\n .ps-xxl-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-xxl-5 {\n padding-left: 3rem !important;\n }\n}\n@media print {\n .d-print-inline {\n display: inline !important;\n }\n\n .d-print-inline-block {\n display: inline-block !important;\n }\n\n .d-print-block {\n display: block !important;\n }\n\n .d-print-grid {\n display: grid !important;\n }\n\n .d-print-table {\n display: table !important;\n }\n\n .d-print-table-row {\n display: table-row !important;\n }\n\n .d-print-table-cell {\n display: table-cell !important;\n }\n\n .d-print-flex {\n display: flex !important;\n }\n\n .d-print-inline-flex {\n display: inline-flex !important;\n }\n\n .d-print-none {\n display: none !important;\n }\n}\n\n/*# sourceMappingURL=bootstrap-grid.css.map */","// Container mixins\n\n@mixin make-container($gutter: $container-padding-x) {\n width: 100%;\n padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter});\n padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter});\n margin-right: auto;\n margin-left: auto;\n}\n","// Breakpoint viewport sizes and media queries.\n//\n// Breakpoints are defined as a map of (name: minimum width), order from small to large:\n//\n// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n//\n// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n\n// Name of the next breakpoint, or null for the last breakpoint.\n//\n// >> breakpoint-next(sm)\n// md\n// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// md\n// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n// md\n@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {\n $n: index($breakpoint-names, $name);\n @if not $n {\n @error \"breakpoint `#{$name}` not found in `#{$breakpoints}`\";\n }\n @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);\n}\n\n// Minimum breakpoint width. Null for the smallest (first) breakpoint.\n//\n// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 576px\n@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {\n $min: map-get($breakpoints, $name);\n @return if($min != 0, $min, null);\n}\n\n// Maximum breakpoint width.\n// The maximum value is reduced by 0.02px to work around the limitations of\n// `min-` and `max-` prefixes and viewports with fractional widths.\n// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n// See https://bugs.webkit.org/show_bug.cgi?id=178261\n//\n// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 767.98px\n@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {\n $max: map-get($breakpoints, $name);\n @return if($max and $max > 0, $max - .02, null);\n}\n\n// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n// Useful for making responsive utilities.\n//\n// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"\" (Returns a blank string)\n// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"-sm\"\n@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {\n @return if(breakpoint-min($name, $breakpoints) == null, \"\", \"-#{$name}\");\n}\n\n// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n// Makes the @content apply to the given breakpoint and wider.\n@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n @if $min {\n @media (min-width: $min) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n// Makes the @content apply to the given breakpoint and narrower.\n@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {\n $max: breakpoint-max($name, $breakpoints);\n @if $max {\n @media (max-width: $max) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media that spans multiple breakpoint widths.\n// Makes the @content apply between the min and max breakpoints\n@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($lower, $breakpoints);\n $max: breakpoint-max($upper, $breakpoints);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($lower, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($upper, $breakpoints) {\n @content;\n }\n }\n}\n\n// Media between the breakpoint's minimum and maximum widths.\n// No minimum for the smallest breakpoint, and no maximum for the largest one.\n// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n $next: breakpoint-next($name, $breakpoints);\n $max: breakpoint-max($next);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($name, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($next, $breakpoints) {\n @content;\n }\n }\n}\n","// Row\n//\n// Rows contain your columns.\n\n@if $enable-grid-classes {\n .row {\n @include make-row();\n\n > * {\n @include make-col-ready();\n }\n }\n}\n\n@if $enable-cssgrid {\n .grid {\n display: grid;\n grid-template-rows: repeat(var(--#{$variable-prefix}rows, 1), 1fr);\n grid-template-columns: repeat(var(--#{$variable-prefix}columns, #{$grid-columns}), 1fr);\n gap: var(--#{$variable-prefix}gap, #{$grid-gutter-width});\n\n @include make-cssgrid();\n }\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n@if $enable-grid-classes {\n @include make-grid-columns();\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n@mixin make-row($gutter: $grid-gutter-width) {\n --#{$variable-prefix}gutter-x: #{$gutter};\n --#{$variable-prefix}gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list\n margin-right: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n margin-left: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n}\n\n@mixin make-col-ready($gutter: $grid-gutter-width) {\n // Add box sizing if only the grid is loaded\n box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);\n // Prevent columns from becoming too narrow when at smaller grid tiers by\n // always setting `width: 100%;`. This works because we set the width\n // later on to override this initial width.\n flex-shrink: 0;\n width: 100%;\n max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid\n padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n padding-left: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n margin-top: var(--#{$variable-prefix}gutter-y);\n}\n\n@mixin make-col($size: false, $columns: $grid-columns) {\n @if $size {\n flex: 0 0 auto;\n width: percentage(divide($size, $columns));\n\n } @else {\n flex: 1 1 0;\n max-width: 100%;\n }\n}\n\n@mixin make-col-auto() {\n flex: 0 0 auto;\n width: auto;\n}\n\n@mixin make-col-offset($size, $columns: $grid-columns) {\n $num: divide($size, $columns);\n margin-left: if($num == 0, 0, percentage($num));\n}\n\n// Row columns\n//\n// Specify on a parent element(e.g., .row) to force immediate children into NN\n// numberof columns. Supports wrapping to new lines, but does not do a Masonry\n// style grid.\n@mixin row-cols($count) {\n > * {\n flex: 0 0 auto;\n width: divide(100%, $count);\n }\n}\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `$grid-columns`.\n\n@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n // Provide basic `.col-{bp}` classes for equal-width flexbox columns\n .col#{$infix} {\n flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4\n }\n\n .row-cols#{$infix}-auto > * {\n @include make-col-auto();\n }\n\n @if $grid-row-columns > 0 {\n @for $i from 1 through $grid-row-columns {\n .row-cols#{$infix}-#{$i} {\n @include row-cols($i);\n }\n }\n }\n\n .col#{$infix}-auto {\n @include make-col-auto();\n }\n\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .col#{$infix}-#{$i} {\n @include make-col($i, $columns);\n }\n }\n\n // `$columns - 1` because offsetting by the width of an entire row isn't possible\n @for $i from 0 through ($columns - 1) {\n @if not ($infix == \"\" and $i == 0) { // Avoid emitting useless .offset-0\n .offset#{$infix}-#{$i} {\n @include make-col-offset($i, $columns);\n }\n }\n }\n }\n\n // Gutters\n //\n // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.\n @each $key, $value in $gutters {\n .g#{$infix}-#{$key},\n .gx#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-x: #{$value};\n }\n\n .g#{$infix}-#{$key},\n .gy#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-y: #{$value};\n }\n }\n }\n }\n}\n\n@mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .g-col#{$infix}-#{$i} {\n grid-column: auto / span $i;\n }\n }\n\n // Start with `1` because `0` is and invalid value.\n // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.\n @for $i from 1 through ($columns - 1) {\n .g-start#{$infix}-#{$i} {\n grid-column-start: $i;\n }\n }\n }\n }\n }\n}\n","// Utility generator\n// Used to generate utilities & print utilities\n@mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {\n $values: map-get($utility, values);\n\n // If the values are a list or string, convert it into a map\n @if type-of($values) == \"string\" or type-of(nth($values, 1)) != \"list\" {\n $values: zip($values, $values);\n }\n\n @each $key, $value in $values {\n $properties: map-get($utility, property);\n\n // Multiple properties are possible, for example with vertical or horizontal margins or paddings\n @if type-of($properties) == \"string\" {\n $properties: append((), $properties);\n }\n\n // Use custom class if present\n $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));\n $property-class: if($property-class == null, \"\", $property-class);\n\n // State params to generate pseudo-classes\n $state: if(map-has-key($utility, state), map-get($utility, state), ());\n\n $infix: if($property-class == \"\" and str-slice($infix, 1, 1) == \"-\", str-slice($infix, 2), $infix);\n\n // Don't prefix if value key is null (eg. with shadow class)\n $property-class-modifier: if($key, if($property-class == \"\" and $infix == \"\", \"\", \"-\") + $key, \"\");\n\n @if map-get($utility, rfs) {\n // Inside the media query\n @if $is-rfs-media-query {\n $val: rfs-value($value);\n\n // Do not render anything if fluid and non fluid values are the same\n $value: if($val == rfs-fluid-value($value), null, $val);\n }\n @else {\n $value: rfs-fluid-value($value);\n }\n }\n\n $is-css-var: map-get($utility, css-var);\n $is-local-vars: map-get($utility, local-vars);\n $is-rtl: map-get($utility, rtl);\n\n @if $value != null {\n @if $is-rtl == false {\n /* rtl:begin:remove */\n }\n\n @if $is-css-var {\n .#{$property-class + $infix + $property-class-modifier} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n }\n } @else {\n .#{$property-class + $infix + $property-class-modifier} {\n @each $property in $properties {\n @if $is-local-vars {\n @each $local-var, $value in $is-local-vars {\n --#{$variable-prefix}#{$local-var}: #{$value};\n }\n }\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n @each $property in $properties {\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n }\n }\n\n @if $is-rtl == false {\n /* rtl:end:remove */\n }\n }\n }\n}\n","// Loop over each breakpoint\n@each $breakpoint in map-keys($grid-breakpoints) {\n\n // Generate media query if needed\n @include media-breakpoint-up($breakpoint) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix);\n }\n }\n }\n}\n\n// RFS rescaling\n@media (min-width: $rfs-mq-value) {\n @each $breakpoint in map-keys($grid-breakpoints) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n @if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix, true);\n }\n }\n }\n }\n}\n\n\n// Print utilities\n@media print {\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Then check if the utility needs print styles\n @if type-of($utility) == \"map\" and map-get($utility, print) == true {\n @include generate-utility($utility, \"-print\");\n }\n }\n}\n"]} \ No newline at end of file diff --git a/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css new file mode 100644 index 0000000..3c339b5 --- /dev/null +++ b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css @@ -0,0 +1,4996 @@ +/*! + * Bootstrap Grid v5.1.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +.container, +.container-fluid, +.container-xxl, +.container-xl, +.container-lg, +.container-md, +.container-sm { + width: 100%; + padding-left: var(--bs-gutter-x, 0.75rem); + padding-right: var(--bs-gutter-x, 0.75rem); + margin-left: auto; + margin-right: auto; +} + +@media (min-width: 576px) { + .container-sm, .container { + max-width: 540px; + } +} +@media (min-width: 768px) { + .container-md, .container-sm, .container { + max-width: 720px; + } +} +@media (min-width: 992px) { + .container-lg, .container-md, .container-sm, .container { + max-width: 960px; + } +} +@media (min-width: 1200px) { + .container-xl, .container-lg, .container-md, .container-sm, .container { + max-width: 1140px; + } +} +@media (min-width: 1400px) { + .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container { + max-width: 1320px; + } +} +.row { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + display: flex; + flex-wrap: wrap; + margin-top: calc(var(--bs-gutter-y) * -1); + margin-left: calc(var(--bs-gutter-x) * -.5); + margin-right: calc(var(--bs-gutter-x) * -.5); +} +.row > * { + box-sizing: border-box; + flex-shrink: 0; + width: 100%; + max-width: 100%; + padding-left: calc(var(--bs-gutter-x) * .5); + padding-right: calc(var(--bs-gutter-x) * .5); + margin-top: var(--bs-gutter-y); +} + +.col { + flex: 1 0 0%; +} + +.row-cols-auto > * { + flex: 0 0 auto; + width: auto; +} + +.row-cols-1 > * { + flex: 0 0 auto; + width: 100%; +} + +.row-cols-2 > * { + flex: 0 0 auto; + width: 50%; +} + +.row-cols-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; +} + +.row-cols-4 > * { + flex: 0 0 auto; + width: 25%; +} + +.row-cols-5 > * { + flex: 0 0 auto; + width: 20%; +} + +.row-cols-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; +} + +.col-auto { + flex: 0 0 auto; + width: auto; +} + +.col-1 { + flex: 0 0 auto; + width: 8.33333333%; +} + +.col-2 { + flex: 0 0 auto; + width: 16.66666667%; +} + +.col-3 { + flex: 0 0 auto; + width: 25%; +} + +.col-4 { + flex: 0 0 auto; + width: 33.33333333%; +} + +.col-5 { + flex: 0 0 auto; + width: 41.66666667%; +} + +.col-6 { + flex: 0 0 auto; + width: 50%; +} + +.col-7 { + flex: 0 0 auto; + width: 58.33333333%; +} + +.col-8 { + flex: 0 0 auto; + width: 66.66666667%; +} + +.col-9 { + flex: 0 0 auto; + width: 75%; +} + +.col-10 { + flex: 0 0 auto; + width: 83.33333333%; +} + +.col-11 { + flex: 0 0 auto; + width: 91.66666667%; +} + +.col-12 { + flex: 0 0 auto; + width: 100%; +} + +.offset-1 { + margin-right: 8.33333333%; +} + +.offset-2 { + margin-right: 16.66666667%; +} + +.offset-3 { + margin-right: 25%; +} + +.offset-4 { + margin-right: 33.33333333%; +} + +.offset-5 { + margin-right: 41.66666667%; +} + +.offset-6 { + margin-right: 50%; +} + +.offset-7 { + margin-right: 58.33333333%; +} + +.offset-8 { + margin-right: 66.66666667%; +} + +.offset-9 { + margin-right: 75%; +} + +.offset-10 { + margin-right: 83.33333333%; +} + +.offset-11 { + margin-right: 91.66666667%; +} + +.g-0, +.gx-0 { + --bs-gutter-x: 0; +} + +.g-0, +.gy-0 { + --bs-gutter-y: 0; +} + +.g-1, +.gx-1 { + --bs-gutter-x: 0.25rem; +} + +.g-1, +.gy-1 { + --bs-gutter-y: 0.25rem; +} + +.g-2, +.gx-2 { + --bs-gutter-x: 0.5rem; +} + +.g-2, +.gy-2 { + --bs-gutter-y: 0.5rem; +} + +.g-3, +.gx-3 { + --bs-gutter-x: 1rem; +} + +.g-3, +.gy-3 { + --bs-gutter-y: 1rem; +} + +.g-4, +.gx-4 { + --bs-gutter-x: 1.5rem; +} + +.g-4, +.gy-4 { + --bs-gutter-y: 1.5rem; +} + +.g-5, +.gx-5 { + --bs-gutter-x: 3rem; +} + +.g-5, +.gy-5 { + --bs-gutter-y: 3rem; +} + +@media (min-width: 576px) { + .col-sm { + flex: 1 0 0%; + } + + .row-cols-sm-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-sm-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-sm-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-sm-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-sm-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-sm-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-sm-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-sm-auto { + flex: 0 0 auto; + width: auto; + } + + .col-sm-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-sm-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-sm-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-sm-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-sm-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-sm-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-sm-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-sm-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-sm-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-sm-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-sm-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-sm-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-sm-0 { + margin-right: 0; + } + + .offset-sm-1 { + margin-right: 8.33333333%; + } + + .offset-sm-2 { + margin-right: 16.66666667%; + } + + .offset-sm-3 { + margin-right: 25%; + } + + .offset-sm-4 { + margin-right: 33.33333333%; + } + + .offset-sm-5 { + margin-right: 41.66666667%; + } + + .offset-sm-6 { + margin-right: 50%; + } + + .offset-sm-7 { + margin-right: 58.33333333%; + } + + .offset-sm-8 { + margin-right: 66.66666667%; + } + + .offset-sm-9 { + margin-right: 75%; + } + + .offset-sm-10 { + margin-right: 83.33333333%; + } + + .offset-sm-11 { + margin-right: 91.66666667%; + } + + .g-sm-0, +.gx-sm-0 { + --bs-gutter-x: 0; + } + + .g-sm-0, +.gy-sm-0 { + --bs-gutter-y: 0; + } + + .g-sm-1, +.gx-sm-1 { + --bs-gutter-x: 0.25rem; + } + + .g-sm-1, +.gy-sm-1 { + --bs-gutter-y: 0.25rem; + } + + .g-sm-2, +.gx-sm-2 { + --bs-gutter-x: 0.5rem; + } + + .g-sm-2, +.gy-sm-2 { + --bs-gutter-y: 0.5rem; + } + + .g-sm-3, +.gx-sm-3 { + --bs-gutter-x: 1rem; + } + + .g-sm-3, +.gy-sm-3 { + --bs-gutter-y: 1rem; + } + + .g-sm-4, +.gx-sm-4 { + --bs-gutter-x: 1.5rem; + } + + .g-sm-4, +.gy-sm-4 { + --bs-gutter-y: 1.5rem; + } + + .g-sm-5, +.gx-sm-5 { + --bs-gutter-x: 3rem; + } + + .g-sm-5, +.gy-sm-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 768px) { + .col-md { + flex: 1 0 0%; + } + + .row-cols-md-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-md-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-md-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-md-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-md-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-md-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-md-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-md-auto { + flex: 0 0 auto; + width: auto; + } + + .col-md-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-md-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-md-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-md-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-md-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-md-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-md-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-md-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-md-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-md-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-md-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-md-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-md-0 { + margin-right: 0; + } + + .offset-md-1 { + margin-right: 8.33333333%; + } + + .offset-md-2 { + margin-right: 16.66666667%; + } + + .offset-md-3 { + margin-right: 25%; + } + + .offset-md-4 { + margin-right: 33.33333333%; + } + + .offset-md-5 { + margin-right: 41.66666667%; + } + + .offset-md-6 { + margin-right: 50%; + } + + .offset-md-7 { + margin-right: 58.33333333%; + } + + .offset-md-8 { + margin-right: 66.66666667%; + } + + .offset-md-9 { + margin-right: 75%; + } + + .offset-md-10 { + margin-right: 83.33333333%; + } + + .offset-md-11 { + margin-right: 91.66666667%; + } + + .g-md-0, +.gx-md-0 { + --bs-gutter-x: 0; + } + + .g-md-0, +.gy-md-0 { + --bs-gutter-y: 0; + } + + .g-md-1, +.gx-md-1 { + --bs-gutter-x: 0.25rem; + } + + .g-md-1, +.gy-md-1 { + --bs-gutter-y: 0.25rem; + } + + .g-md-2, +.gx-md-2 { + --bs-gutter-x: 0.5rem; + } + + .g-md-2, +.gy-md-2 { + --bs-gutter-y: 0.5rem; + } + + .g-md-3, +.gx-md-3 { + --bs-gutter-x: 1rem; + } + + .g-md-3, +.gy-md-3 { + --bs-gutter-y: 1rem; + } + + .g-md-4, +.gx-md-4 { + --bs-gutter-x: 1.5rem; + } + + .g-md-4, +.gy-md-4 { + --bs-gutter-y: 1.5rem; + } + + .g-md-5, +.gx-md-5 { + --bs-gutter-x: 3rem; + } + + .g-md-5, +.gy-md-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 992px) { + .col-lg { + flex: 1 0 0%; + } + + .row-cols-lg-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-lg-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-lg-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-lg-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-lg-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-lg-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-lg-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-lg-auto { + flex: 0 0 auto; + width: auto; + } + + .col-lg-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-lg-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-lg-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-lg-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-lg-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-lg-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-lg-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-lg-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-lg-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-lg-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-lg-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-lg-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-lg-0 { + margin-right: 0; + } + + .offset-lg-1 { + margin-right: 8.33333333%; + } + + .offset-lg-2 { + margin-right: 16.66666667%; + } + + .offset-lg-3 { + margin-right: 25%; + } + + .offset-lg-4 { + margin-right: 33.33333333%; + } + + .offset-lg-5 { + margin-right: 41.66666667%; + } + + .offset-lg-6 { + margin-right: 50%; + } + + .offset-lg-7 { + margin-right: 58.33333333%; + } + + .offset-lg-8 { + margin-right: 66.66666667%; + } + + .offset-lg-9 { + margin-right: 75%; + } + + .offset-lg-10 { + margin-right: 83.33333333%; + } + + .offset-lg-11 { + margin-right: 91.66666667%; + } + + .g-lg-0, +.gx-lg-0 { + --bs-gutter-x: 0; + } + + .g-lg-0, +.gy-lg-0 { + --bs-gutter-y: 0; + } + + .g-lg-1, +.gx-lg-1 { + --bs-gutter-x: 0.25rem; + } + + .g-lg-1, +.gy-lg-1 { + --bs-gutter-y: 0.25rem; + } + + .g-lg-2, +.gx-lg-2 { + --bs-gutter-x: 0.5rem; + } + + .g-lg-2, +.gy-lg-2 { + --bs-gutter-y: 0.5rem; + } + + .g-lg-3, +.gx-lg-3 { + --bs-gutter-x: 1rem; + } + + .g-lg-3, +.gy-lg-3 { + --bs-gutter-y: 1rem; + } + + .g-lg-4, +.gx-lg-4 { + --bs-gutter-x: 1.5rem; + } + + .g-lg-4, +.gy-lg-4 { + --bs-gutter-y: 1.5rem; + } + + .g-lg-5, +.gx-lg-5 { + --bs-gutter-x: 3rem; + } + + .g-lg-5, +.gy-lg-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1200px) { + .col-xl { + flex: 1 0 0%; + } + + .row-cols-xl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-xl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-xl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-xl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-xl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-xl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-xl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-xl-auto { + flex: 0 0 auto; + width: auto; + } + + .col-xl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-xl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-xl-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-xl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-xl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-xl-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-xl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-xl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-xl-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-xl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-xl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-xl-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-xl-0 { + margin-right: 0; + } + + .offset-xl-1 { + margin-right: 8.33333333%; + } + + .offset-xl-2 { + margin-right: 16.66666667%; + } + + .offset-xl-3 { + margin-right: 25%; + } + + .offset-xl-4 { + margin-right: 33.33333333%; + } + + .offset-xl-5 { + margin-right: 41.66666667%; + } + + .offset-xl-6 { + margin-right: 50%; + } + + .offset-xl-7 { + margin-right: 58.33333333%; + } + + .offset-xl-8 { + margin-right: 66.66666667%; + } + + .offset-xl-9 { + margin-right: 75%; + } + + .offset-xl-10 { + margin-right: 83.33333333%; + } + + .offset-xl-11 { + margin-right: 91.66666667%; + } + + .g-xl-0, +.gx-xl-0 { + --bs-gutter-x: 0; + } + + .g-xl-0, +.gy-xl-0 { + --bs-gutter-y: 0; + } + + .g-xl-1, +.gx-xl-1 { + --bs-gutter-x: 0.25rem; + } + + .g-xl-1, +.gy-xl-1 { + --bs-gutter-y: 0.25rem; + } + + .g-xl-2, +.gx-xl-2 { + --bs-gutter-x: 0.5rem; + } + + .g-xl-2, +.gy-xl-2 { + --bs-gutter-y: 0.5rem; + } + + .g-xl-3, +.gx-xl-3 { + --bs-gutter-x: 1rem; + } + + .g-xl-3, +.gy-xl-3 { + --bs-gutter-y: 1rem; + } + + .g-xl-4, +.gx-xl-4 { + --bs-gutter-x: 1.5rem; + } + + .g-xl-4, +.gy-xl-4 { + --bs-gutter-y: 1.5rem; + } + + .g-xl-5, +.gx-xl-5 { + --bs-gutter-x: 3rem; + } + + .g-xl-5, +.gy-xl-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1400px) { + .col-xxl { + flex: 1 0 0%; + } + + .row-cols-xxl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-xxl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-xxl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-xxl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-xxl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-xxl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-xxl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-xxl-auto { + flex: 0 0 auto; + width: auto; + } + + .col-xxl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-xxl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-xxl-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-xxl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-xxl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-xxl-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-xxl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-xxl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-xxl-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-xxl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-xxl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-xxl-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-xxl-0 { + margin-right: 0; + } + + .offset-xxl-1 { + margin-right: 8.33333333%; + } + + .offset-xxl-2 { + margin-right: 16.66666667%; + } + + .offset-xxl-3 { + margin-right: 25%; + } + + .offset-xxl-4 { + margin-right: 33.33333333%; + } + + .offset-xxl-5 { + margin-right: 41.66666667%; + } + + .offset-xxl-6 { + margin-right: 50%; + } + + .offset-xxl-7 { + margin-right: 58.33333333%; + } + + .offset-xxl-8 { + margin-right: 66.66666667%; + } + + .offset-xxl-9 { + margin-right: 75%; + } + + .offset-xxl-10 { + margin-right: 83.33333333%; + } + + .offset-xxl-11 { + margin-right: 91.66666667%; + } + + .g-xxl-0, +.gx-xxl-0 { + --bs-gutter-x: 0; + } + + .g-xxl-0, +.gy-xxl-0 { + --bs-gutter-y: 0; + } + + .g-xxl-1, +.gx-xxl-1 { + --bs-gutter-x: 0.25rem; + } + + .g-xxl-1, +.gy-xxl-1 { + --bs-gutter-y: 0.25rem; + } + + .g-xxl-2, +.gx-xxl-2 { + --bs-gutter-x: 0.5rem; + } + + .g-xxl-2, +.gy-xxl-2 { + --bs-gutter-y: 0.5rem; + } + + .g-xxl-3, +.gx-xxl-3 { + --bs-gutter-x: 1rem; + } + + .g-xxl-3, +.gy-xxl-3 { + --bs-gutter-y: 1rem; + } + + .g-xxl-4, +.gx-xxl-4 { + --bs-gutter-x: 1.5rem; + } + + .g-xxl-4, +.gy-xxl-4 { + --bs-gutter-y: 1.5rem; + } + + .g-xxl-5, +.gx-xxl-5 { + --bs-gutter-x: 3rem; + } + + .g-xxl-5, +.gy-xxl-5 { + --bs-gutter-y: 3rem; + } +} +.d-inline { + display: inline !important; +} + +.d-inline-block { + display: inline-block !important; +} + +.d-block { + display: block !important; +} + +.d-grid { + display: grid !important; +} + +.d-table { + display: table !important; +} + +.d-table-row { + display: table-row !important; +} + +.d-table-cell { + display: table-cell !important; +} + +.d-flex { + display: flex !important; +} + +.d-inline-flex { + display: inline-flex !important; +} + +.d-none { + display: none !important; +} + +.flex-fill { + flex: 1 1 auto !important; +} + +.flex-row { + flex-direction: row !important; +} + +.flex-column { + flex-direction: column !important; +} + +.flex-row-reverse { + flex-direction: row-reverse !important; +} + +.flex-column-reverse { + flex-direction: column-reverse !important; +} + +.flex-grow-0 { + flex-grow: 0 !important; +} + +.flex-grow-1 { + flex-grow: 1 !important; +} + +.flex-shrink-0 { + flex-shrink: 0 !important; +} + +.flex-shrink-1 { + flex-shrink: 1 !important; +} + +.flex-wrap { + flex-wrap: wrap !important; +} + +.flex-nowrap { + flex-wrap: nowrap !important; +} + +.flex-wrap-reverse { + flex-wrap: wrap-reverse !important; +} + +.justify-content-start { + justify-content: flex-start !important; +} + +.justify-content-end { + justify-content: flex-end !important; +} + +.justify-content-center { + justify-content: center !important; +} + +.justify-content-between { + justify-content: space-between !important; +} + +.justify-content-around { + justify-content: space-around !important; +} + +.justify-content-evenly { + justify-content: space-evenly !important; +} + +.align-items-start { + align-items: flex-start !important; +} + +.align-items-end { + align-items: flex-end !important; +} + +.align-items-center { + align-items: center !important; +} + +.align-items-baseline { + align-items: baseline !important; +} + +.align-items-stretch { + align-items: stretch !important; +} + +.align-content-start { + align-content: flex-start !important; +} + +.align-content-end { + align-content: flex-end !important; +} + +.align-content-center { + align-content: center !important; +} + +.align-content-between { + align-content: space-between !important; +} + +.align-content-around { + align-content: space-around !important; +} + +.align-content-stretch { + align-content: stretch !important; +} + +.align-self-auto { + align-self: auto !important; +} + +.align-self-start { + align-self: flex-start !important; +} + +.align-self-end { + align-self: flex-end !important; +} + +.align-self-center { + align-self: center !important; +} + +.align-self-baseline { + align-self: baseline !important; +} + +.align-self-stretch { + align-self: stretch !important; +} + +.order-first { + order: -1 !important; +} + +.order-0 { + order: 0 !important; +} + +.order-1 { + order: 1 !important; +} + +.order-2 { + order: 2 !important; +} + +.order-3 { + order: 3 !important; +} + +.order-4 { + order: 4 !important; +} + +.order-5 { + order: 5 !important; +} + +.order-last { + order: 6 !important; +} + +.m-0 { + margin: 0 !important; +} + +.m-1 { + margin: 0.25rem !important; +} + +.m-2 { + margin: 0.5rem !important; +} + +.m-3 { + margin: 1rem !important; +} + +.m-4 { + margin: 1.5rem !important; +} + +.m-5 { + margin: 3rem !important; +} + +.m-auto { + margin: auto !important; +} + +.mx-0 { + margin-left: 0 !important; + margin-right: 0 !important; +} + +.mx-1 { + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; +} + +.mx-2 { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; +} + +.mx-3 { + margin-left: 1rem !important; + margin-right: 1rem !important; +} + +.mx-4 { + margin-left: 1.5rem !important; + margin-right: 1.5rem !important; +} + +.mx-5 { + margin-left: 3rem !important; + margin-right: 3rem !important; +} + +.mx-auto { + margin-left: auto !important; + margin-right: auto !important; +} + +.my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} + +.my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; +} + +.my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; +} + +.my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; +} + +.my-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; +} + +.my-auto { + margin-top: auto !important; + margin-bottom: auto !important; +} + +.mt-0 { + margin-top: 0 !important; +} + +.mt-1 { + margin-top: 0.25rem !important; +} + +.mt-2 { + margin-top: 0.5rem !important; +} + +.mt-3 { + margin-top: 1rem !important; +} + +.mt-4 { + margin-top: 1.5rem !important; +} + +.mt-5 { + margin-top: 3rem !important; +} + +.mt-auto { + margin-top: auto !important; +} + +.me-0 { + margin-left: 0 !important; +} + +.me-1 { + margin-left: 0.25rem !important; +} + +.me-2 { + margin-left: 0.5rem !important; +} + +.me-3 { + margin-left: 1rem !important; +} + +.me-4 { + margin-left: 1.5rem !important; +} + +.me-5 { + margin-left: 3rem !important; +} + +.me-auto { + margin-left: auto !important; +} + +.mb-0 { + margin-bottom: 0 !important; +} + +.mb-1 { + margin-bottom: 0.25rem !important; +} + +.mb-2 { + margin-bottom: 0.5rem !important; +} + +.mb-3 { + margin-bottom: 1rem !important; +} + +.mb-4 { + margin-bottom: 1.5rem !important; +} + +.mb-5 { + margin-bottom: 3rem !important; +} + +.mb-auto { + margin-bottom: auto !important; +} + +.ms-0 { + margin-right: 0 !important; +} + +.ms-1 { + margin-right: 0.25rem !important; +} + +.ms-2 { + margin-right: 0.5rem !important; +} + +.ms-3 { + margin-right: 1rem !important; +} + +.ms-4 { + margin-right: 1.5rem !important; +} + +.ms-5 { + margin-right: 3rem !important; +} + +.ms-auto { + margin-right: auto !important; +} + +.p-0 { + padding: 0 !important; +} + +.p-1 { + padding: 0.25rem !important; +} + +.p-2 { + padding: 0.5rem !important; +} + +.p-3 { + padding: 1rem !important; +} + +.p-4 { + padding: 1.5rem !important; +} + +.p-5 { + padding: 3rem !important; +} + +.px-0 { + padding-left: 0 !important; + padding-right: 0 !important; +} + +.px-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; +} + +.px-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; +} + +.px-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; +} + +.px-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; +} + +.px-5 { + padding-left: 3rem !important; + padding-right: 3rem !important; +} + +.py-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +.py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} + +.py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} + +.py-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; +} + +.py-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} + +.py-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; +} + +.pt-0 { + padding-top: 0 !important; +} + +.pt-1 { + padding-top: 0.25rem !important; +} + +.pt-2 { + padding-top: 0.5rem !important; +} + +.pt-3 { + padding-top: 1rem !important; +} + +.pt-4 { + padding-top: 1.5rem !important; +} + +.pt-5 { + padding-top: 3rem !important; +} + +.pe-0 { + padding-left: 0 !important; +} + +.pe-1 { + padding-left: 0.25rem !important; +} + +.pe-2 { + padding-left: 0.5rem !important; +} + +.pe-3 { + padding-left: 1rem !important; +} + +.pe-4 { + padding-left: 1.5rem !important; +} + +.pe-5 { + padding-left: 3rem !important; +} + +.pb-0 { + padding-bottom: 0 !important; +} + +.pb-1 { + padding-bottom: 0.25rem !important; +} + +.pb-2 { + padding-bottom: 0.5rem !important; +} + +.pb-3 { + padding-bottom: 1rem !important; +} + +.pb-4 { + padding-bottom: 1.5rem !important; +} + +.pb-5 { + padding-bottom: 3rem !important; +} + +.ps-0 { + padding-right: 0 !important; +} + +.ps-1 { + padding-right: 0.25rem !important; +} + +.ps-2 { + padding-right: 0.5rem !important; +} + +.ps-3 { + padding-right: 1rem !important; +} + +.ps-4 { + padding-right: 1.5rem !important; +} + +.ps-5 { + padding-right: 3rem !important; +} + +@media (min-width: 576px) { + .d-sm-inline { + display: inline !important; + } + + .d-sm-inline-block { + display: inline-block !important; + } + + .d-sm-block { + display: block !important; + } + + .d-sm-grid { + display: grid !important; + } + + .d-sm-table { + display: table !important; + } + + .d-sm-table-row { + display: table-row !important; + } + + .d-sm-table-cell { + display: table-cell !important; + } + + .d-sm-flex { + display: flex !important; + } + + .d-sm-inline-flex { + display: inline-flex !important; + } + + .d-sm-none { + display: none !important; + } + + .flex-sm-fill { + flex: 1 1 auto !important; + } + + .flex-sm-row { + flex-direction: row !important; + } + + .flex-sm-column { + flex-direction: column !important; + } + + .flex-sm-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-sm-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-sm-grow-0 { + flex-grow: 0 !important; + } + + .flex-sm-grow-1 { + flex-grow: 1 !important; + } + + .flex-sm-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-sm-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-sm-wrap { + flex-wrap: wrap !important; + } + + .flex-sm-nowrap { + flex-wrap: nowrap !important; + } + + .flex-sm-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-sm-start { + justify-content: flex-start !important; + } + + .justify-content-sm-end { + justify-content: flex-end !important; + } + + .justify-content-sm-center { + justify-content: center !important; + } + + .justify-content-sm-between { + justify-content: space-between !important; + } + + .justify-content-sm-around { + justify-content: space-around !important; + } + + .justify-content-sm-evenly { + justify-content: space-evenly !important; + } + + .align-items-sm-start { + align-items: flex-start !important; + } + + .align-items-sm-end { + align-items: flex-end !important; + } + + .align-items-sm-center { + align-items: center !important; + } + + .align-items-sm-baseline { + align-items: baseline !important; + } + + .align-items-sm-stretch { + align-items: stretch !important; + } + + .align-content-sm-start { + align-content: flex-start !important; + } + + .align-content-sm-end { + align-content: flex-end !important; + } + + .align-content-sm-center { + align-content: center !important; + } + + .align-content-sm-between { + align-content: space-between !important; + } + + .align-content-sm-around { + align-content: space-around !important; + } + + .align-content-sm-stretch { + align-content: stretch !important; + } + + .align-self-sm-auto { + align-self: auto !important; + } + + .align-self-sm-start { + align-self: flex-start !important; + } + + .align-self-sm-end { + align-self: flex-end !important; + } + + .align-self-sm-center { + align-self: center !important; + } + + .align-self-sm-baseline { + align-self: baseline !important; + } + + .align-self-sm-stretch { + align-self: stretch !important; + } + + .order-sm-first { + order: -1 !important; + } + + .order-sm-0 { + order: 0 !important; + } + + .order-sm-1 { + order: 1 !important; + } + + .order-sm-2 { + order: 2 !important; + } + + .order-sm-3 { + order: 3 !important; + } + + .order-sm-4 { + order: 4 !important; + } + + .order-sm-5 { + order: 5 !important; + } + + .order-sm-last { + order: 6 !important; + } + + .m-sm-0 { + margin: 0 !important; + } + + .m-sm-1 { + margin: 0.25rem !important; + } + + .m-sm-2 { + margin: 0.5rem !important; + } + + .m-sm-3 { + margin: 1rem !important; + } + + .m-sm-4 { + margin: 1.5rem !important; + } + + .m-sm-5 { + margin: 3rem !important; + } + + .m-sm-auto { + margin: auto !important; + } + + .mx-sm-0 { + margin-left: 0 !important; + margin-right: 0 !important; + } + + .mx-sm-1 { + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; + } + + .mx-sm-2 { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; + } + + .mx-sm-3 { + margin-left: 1rem !important; + margin-right: 1rem !important; + } + + .mx-sm-4 { + margin-left: 1.5rem !important; + margin-right: 1.5rem !important; + } + + .mx-sm-5 { + margin-left: 3rem !important; + margin-right: 3rem !important; + } + + .mx-sm-auto { + margin-left: auto !important; + margin-right: auto !important; + } + + .my-sm-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-sm-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-sm-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-sm-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-sm-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-sm-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-sm-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-sm-0 { + margin-top: 0 !important; + } + + .mt-sm-1 { + margin-top: 0.25rem !important; + } + + .mt-sm-2 { + margin-top: 0.5rem !important; + } + + .mt-sm-3 { + margin-top: 1rem !important; + } + + .mt-sm-4 { + margin-top: 1.5rem !important; + } + + .mt-sm-5 { + margin-top: 3rem !important; + } + + .mt-sm-auto { + margin-top: auto !important; + } + + .me-sm-0 { + margin-left: 0 !important; + } + + .me-sm-1 { + margin-left: 0.25rem !important; + } + + .me-sm-2 { + margin-left: 0.5rem !important; + } + + .me-sm-3 { + margin-left: 1rem !important; + } + + .me-sm-4 { + margin-left: 1.5rem !important; + } + + .me-sm-5 { + margin-left: 3rem !important; + } + + .me-sm-auto { + margin-left: auto !important; + } + + .mb-sm-0 { + margin-bottom: 0 !important; + } + + .mb-sm-1 { + margin-bottom: 0.25rem !important; + } + + .mb-sm-2 { + margin-bottom: 0.5rem !important; + } + + .mb-sm-3 { + margin-bottom: 1rem !important; + } + + .mb-sm-4 { + margin-bottom: 1.5rem !important; + } + + .mb-sm-5 { + margin-bottom: 3rem !important; + } + + .mb-sm-auto { + margin-bottom: auto !important; + } + + .ms-sm-0 { + margin-right: 0 !important; + } + + .ms-sm-1 { + margin-right: 0.25rem !important; + } + + .ms-sm-2 { + margin-right: 0.5rem !important; + } + + .ms-sm-3 { + margin-right: 1rem !important; + } + + .ms-sm-4 { + margin-right: 1.5rem !important; + } + + .ms-sm-5 { + margin-right: 3rem !important; + } + + .ms-sm-auto { + margin-right: auto !important; + } + + .p-sm-0 { + padding: 0 !important; + } + + .p-sm-1 { + padding: 0.25rem !important; + } + + .p-sm-2 { + padding: 0.5rem !important; + } + + .p-sm-3 { + padding: 1rem !important; + } + + .p-sm-4 { + padding: 1.5rem !important; + } + + .p-sm-5 { + padding: 3rem !important; + } + + .px-sm-0 { + padding-left: 0 !important; + padding-right: 0 !important; + } + + .px-sm-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; + } + + .px-sm-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } + + .px-sm-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; + } + + .px-sm-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; + } + + .px-sm-5 { + padding-left: 3rem !important; + padding-right: 3rem !important; + } + + .py-sm-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-sm-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-sm-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-sm-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-sm-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-sm-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-sm-0 { + padding-top: 0 !important; + } + + .pt-sm-1 { + padding-top: 0.25rem !important; + } + + .pt-sm-2 { + padding-top: 0.5rem !important; + } + + .pt-sm-3 { + padding-top: 1rem !important; + } + + .pt-sm-4 { + padding-top: 1.5rem !important; + } + + .pt-sm-5 { + padding-top: 3rem !important; + } + + .pe-sm-0 { + padding-left: 0 !important; + } + + .pe-sm-1 { + padding-left: 0.25rem !important; + } + + .pe-sm-2 { + padding-left: 0.5rem !important; + } + + .pe-sm-3 { + padding-left: 1rem !important; + } + + .pe-sm-4 { + padding-left: 1.5rem !important; + } + + .pe-sm-5 { + padding-left: 3rem !important; + } + + .pb-sm-0 { + padding-bottom: 0 !important; + } + + .pb-sm-1 { + padding-bottom: 0.25rem !important; + } + + .pb-sm-2 { + padding-bottom: 0.5rem !important; + } + + .pb-sm-3 { + padding-bottom: 1rem !important; + } + + .pb-sm-4 { + padding-bottom: 1.5rem !important; + } + + .pb-sm-5 { + padding-bottom: 3rem !important; + } + + .ps-sm-0 { + padding-right: 0 !important; + } + + .ps-sm-1 { + padding-right: 0.25rem !important; + } + + .ps-sm-2 { + padding-right: 0.5rem !important; + } + + .ps-sm-3 { + padding-right: 1rem !important; + } + + .ps-sm-4 { + padding-right: 1.5rem !important; + } + + .ps-sm-5 { + padding-right: 3rem !important; + } +} +@media (min-width: 768px) { + .d-md-inline { + display: inline !important; + } + + .d-md-inline-block { + display: inline-block !important; + } + + .d-md-block { + display: block !important; + } + + .d-md-grid { + display: grid !important; + } + + .d-md-table { + display: table !important; + } + + .d-md-table-row { + display: table-row !important; + } + + .d-md-table-cell { + display: table-cell !important; + } + + .d-md-flex { + display: flex !important; + } + + .d-md-inline-flex { + display: inline-flex !important; + } + + .d-md-none { + display: none !important; + } + + .flex-md-fill { + flex: 1 1 auto !important; + } + + .flex-md-row { + flex-direction: row !important; + } + + .flex-md-column { + flex-direction: column !important; + } + + .flex-md-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-md-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-md-grow-0 { + flex-grow: 0 !important; + } + + .flex-md-grow-1 { + flex-grow: 1 !important; + } + + .flex-md-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-md-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-md-wrap { + flex-wrap: wrap !important; + } + + .flex-md-nowrap { + flex-wrap: nowrap !important; + } + + .flex-md-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-md-start { + justify-content: flex-start !important; + } + + .justify-content-md-end { + justify-content: flex-end !important; + } + + .justify-content-md-center { + justify-content: center !important; + } + + .justify-content-md-between { + justify-content: space-between !important; + } + + .justify-content-md-around { + justify-content: space-around !important; + } + + .justify-content-md-evenly { + justify-content: space-evenly !important; + } + + .align-items-md-start { + align-items: flex-start !important; + } + + .align-items-md-end { + align-items: flex-end !important; + } + + .align-items-md-center { + align-items: center !important; + } + + .align-items-md-baseline { + align-items: baseline !important; + } + + .align-items-md-stretch { + align-items: stretch !important; + } + + .align-content-md-start { + align-content: flex-start !important; + } + + .align-content-md-end { + align-content: flex-end !important; + } + + .align-content-md-center { + align-content: center !important; + } + + .align-content-md-between { + align-content: space-between !important; + } + + .align-content-md-around { + align-content: space-around !important; + } + + .align-content-md-stretch { + align-content: stretch !important; + } + + .align-self-md-auto { + align-self: auto !important; + } + + .align-self-md-start { + align-self: flex-start !important; + } + + .align-self-md-end { + align-self: flex-end !important; + } + + .align-self-md-center { + align-self: center !important; + } + + .align-self-md-baseline { + align-self: baseline !important; + } + + .align-self-md-stretch { + align-self: stretch !important; + } + + .order-md-first { + order: -1 !important; + } + + .order-md-0 { + order: 0 !important; + } + + .order-md-1 { + order: 1 !important; + } + + .order-md-2 { + order: 2 !important; + } + + .order-md-3 { + order: 3 !important; + } + + .order-md-4 { + order: 4 !important; + } + + .order-md-5 { + order: 5 !important; + } + + .order-md-last { + order: 6 !important; + } + + .m-md-0 { + margin: 0 !important; + } + + .m-md-1 { + margin: 0.25rem !important; + } + + .m-md-2 { + margin: 0.5rem !important; + } + + .m-md-3 { + margin: 1rem !important; + } + + .m-md-4 { + margin: 1.5rem !important; + } + + .m-md-5 { + margin: 3rem !important; + } + + .m-md-auto { + margin: auto !important; + } + + .mx-md-0 { + margin-left: 0 !important; + margin-right: 0 !important; + } + + .mx-md-1 { + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; + } + + .mx-md-2 { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; + } + + .mx-md-3 { + margin-left: 1rem !important; + margin-right: 1rem !important; + } + + .mx-md-4 { + margin-left: 1.5rem !important; + margin-right: 1.5rem !important; + } + + .mx-md-5 { + margin-left: 3rem !important; + margin-right: 3rem !important; + } + + .mx-md-auto { + margin-left: auto !important; + margin-right: auto !important; + } + + .my-md-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-md-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-md-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-md-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-md-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-md-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-md-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-md-0 { + margin-top: 0 !important; + } + + .mt-md-1 { + margin-top: 0.25rem !important; + } + + .mt-md-2 { + margin-top: 0.5rem !important; + } + + .mt-md-3 { + margin-top: 1rem !important; + } + + .mt-md-4 { + margin-top: 1.5rem !important; + } + + .mt-md-5 { + margin-top: 3rem !important; + } + + .mt-md-auto { + margin-top: auto !important; + } + + .me-md-0 { + margin-left: 0 !important; + } + + .me-md-1 { + margin-left: 0.25rem !important; + } + + .me-md-2 { + margin-left: 0.5rem !important; + } + + .me-md-3 { + margin-left: 1rem !important; + } + + .me-md-4 { + margin-left: 1.5rem !important; + } + + .me-md-5 { + margin-left: 3rem !important; + } + + .me-md-auto { + margin-left: auto !important; + } + + .mb-md-0 { + margin-bottom: 0 !important; + } + + .mb-md-1 { + margin-bottom: 0.25rem !important; + } + + .mb-md-2 { + margin-bottom: 0.5rem !important; + } + + .mb-md-3 { + margin-bottom: 1rem !important; + } + + .mb-md-4 { + margin-bottom: 1.5rem !important; + } + + .mb-md-5 { + margin-bottom: 3rem !important; + } + + .mb-md-auto { + margin-bottom: auto !important; + } + + .ms-md-0 { + margin-right: 0 !important; + } + + .ms-md-1 { + margin-right: 0.25rem !important; + } + + .ms-md-2 { + margin-right: 0.5rem !important; + } + + .ms-md-3 { + margin-right: 1rem !important; + } + + .ms-md-4 { + margin-right: 1.5rem !important; + } + + .ms-md-5 { + margin-right: 3rem !important; + } + + .ms-md-auto { + margin-right: auto !important; + } + + .p-md-0 { + padding: 0 !important; + } + + .p-md-1 { + padding: 0.25rem !important; + } + + .p-md-2 { + padding: 0.5rem !important; + } + + .p-md-3 { + padding: 1rem !important; + } + + .p-md-4 { + padding: 1.5rem !important; + } + + .p-md-5 { + padding: 3rem !important; + } + + .px-md-0 { + padding-left: 0 !important; + padding-right: 0 !important; + } + + .px-md-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; + } + + .px-md-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } + + .px-md-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; + } + + .px-md-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; + } + + .px-md-5 { + padding-left: 3rem !important; + padding-right: 3rem !important; + } + + .py-md-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-md-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-md-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-md-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-md-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-md-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-md-0 { + padding-top: 0 !important; + } + + .pt-md-1 { + padding-top: 0.25rem !important; + } + + .pt-md-2 { + padding-top: 0.5rem !important; + } + + .pt-md-3 { + padding-top: 1rem !important; + } + + .pt-md-4 { + padding-top: 1.5rem !important; + } + + .pt-md-5 { + padding-top: 3rem !important; + } + + .pe-md-0 { + padding-left: 0 !important; + } + + .pe-md-1 { + padding-left: 0.25rem !important; + } + + .pe-md-2 { + padding-left: 0.5rem !important; + } + + .pe-md-3 { + padding-left: 1rem !important; + } + + .pe-md-4 { + padding-left: 1.5rem !important; + } + + .pe-md-5 { + padding-left: 3rem !important; + } + + .pb-md-0 { + padding-bottom: 0 !important; + } + + .pb-md-1 { + padding-bottom: 0.25rem !important; + } + + .pb-md-2 { + padding-bottom: 0.5rem !important; + } + + .pb-md-3 { + padding-bottom: 1rem !important; + } + + .pb-md-4 { + padding-bottom: 1.5rem !important; + } + + .pb-md-5 { + padding-bottom: 3rem !important; + } + + .ps-md-0 { + padding-right: 0 !important; + } + + .ps-md-1 { + padding-right: 0.25rem !important; + } + + .ps-md-2 { + padding-right: 0.5rem !important; + } + + .ps-md-3 { + padding-right: 1rem !important; + } + + .ps-md-4 { + padding-right: 1.5rem !important; + } + + .ps-md-5 { + padding-right: 3rem !important; + } +} +@media (min-width: 992px) { + .d-lg-inline { + display: inline !important; + } + + .d-lg-inline-block { + display: inline-block !important; + } + + .d-lg-block { + display: block !important; + } + + .d-lg-grid { + display: grid !important; + } + + .d-lg-table { + display: table !important; + } + + .d-lg-table-row { + display: table-row !important; + } + + .d-lg-table-cell { + display: table-cell !important; + } + + .d-lg-flex { + display: flex !important; + } + + .d-lg-inline-flex { + display: inline-flex !important; + } + + .d-lg-none { + display: none !important; + } + + .flex-lg-fill { + flex: 1 1 auto !important; + } + + .flex-lg-row { + flex-direction: row !important; + } + + .flex-lg-column { + flex-direction: column !important; + } + + .flex-lg-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-lg-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-lg-grow-0 { + flex-grow: 0 !important; + } + + .flex-lg-grow-1 { + flex-grow: 1 !important; + } + + .flex-lg-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-lg-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-lg-wrap { + flex-wrap: wrap !important; + } + + .flex-lg-nowrap { + flex-wrap: nowrap !important; + } + + .flex-lg-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-lg-start { + justify-content: flex-start !important; + } + + .justify-content-lg-end { + justify-content: flex-end !important; + } + + .justify-content-lg-center { + justify-content: center !important; + } + + .justify-content-lg-between { + justify-content: space-between !important; + } + + .justify-content-lg-around { + justify-content: space-around !important; + } + + .justify-content-lg-evenly { + justify-content: space-evenly !important; + } + + .align-items-lg-start { + align-items: flex-start !important; + } + + .align-items-lg-end { + align-items: flex-end !important; + } + + .align-items-lg-center { + align-items: center !important; + } + + .align-items-lg-baseline { + align-items: baseline !important; + } + + .align-items-lg-stretch { + align-items: stretch !important; + } + + .align-content-lg-start { + align-content: flex-start !important; + } + + .align-content-lg-end { + align-content: flex-end !important; + } + + .align-content-lg-center { + align-content: center !important; + } + + .align-content-lg-between { + align-content: space-between !important; + } + + .align-content-lg-around { + align-content: space-around !important; + } + + .align-content-lg-stretch { + align-content: stretch !important; + } + + .align-self-lg-auto { + align-self: auto !important; + } + + .align-self-lg-start { + align-self: flex-start !important; + } + + .align-self-lg-end { + align-self: flex-end !important; + } + + .align-self-lg-center { + align-self: center !important; + } + + .align-self-lg-baseline { + align-self: baseline !important; + } + + .align-self-lg-stretch { + align-self: stretch !important; + } + + .order-lg-first { + order: -1 !important; + } + + .order-lg-0 { + order: 0 !important; + } + + .order-lg-1 { + order: 1 !important; + } + + .order-lg-2 { + order: 2 !important; + } + + .order-lg-3 { + order: 3 !important; + } + + .order-lg-4 { + order: 4 !important; + } + + .order-lg-5 { + order: 5 !important; + } + + .order-lg-last { + order: 6 !important; + } + + .m-lg-0 { + margin: 0 !important; + } + + .m-lg-1 { + margin: 0.25rem !important; + } + + .m-lg-2 { + margin: 0.5rem !important; + } + + .m-lg-3 { + margin: 1rem !important; + } + + .m-lg-4 { + margin: 1.5rem !important; + } + + .m-lg-5 { + margin: 3rem !important; + } + + .m-lg-auto { + margin: auto !important; + } + + .mx-lg-0 { + margin-left: 0 !important; + margin-right: 0 !important; + } + + .mx-lg-1 { + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; + } + + .mx-lg-2 { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; + } + + .mx-lg-3 { + margin-left: 1rem !important; + margin-right: 1rem !important; + } + + .mx-lg-4 { + margin-left: 1.5rem !important; + margin-right: 1.5rem !important; + } + + .mx-lg-5 { + margin-left: 3rem !important; + margin-right: 3rem !important; + } + + .mx-lg-auto { + margin-left: auto !important; + margin-right: auto !important; + } + + .my-lg-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-lg-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-lg-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-lg-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-lg-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-lg-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-lg-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-lg-0 { + margin-top: 0 !important; + } + + .mt-lg-1 { + margin-top: 0.25rem !important; + } + + .mt-lg-2 { + margin-top: 0.5rem !important; + } + + .mt-lg-3 { + margin-top: 1rem !important; + } + + .mt-lg-4 { + margin-top: 1.5rem !important; + } + + .mt-lg-5 { + margin-top: 3rem !important; + } + + .mt-lg-auto { + margin-top: auto !important; + } + + .me-lg-0 { + margin-left: 0 !important; + } + + .me-lg-1 { + margin-left: 0.25rem !important; + } + + .me-lg-2 { + margin-left: 0.5rem !important; + } + + .me-lg-3 { + margin-left: 1rem !important; + } + + .me-lg-4 { + margin-left: 1.5rem !important; + } + + .me-lg-5 { + margin-left: 3rem !important; + } + + .me-lg-auto { + margin-left: auto !important; + } + + .mb-lg-0 { + margin-bottom: 0 !important; + } + + .mb-lg-1 { + margin-bottom: 0.25rem !important; + } + + .mb-lg-2 { + margin-bottom: 0.5rem !important; + } + + .mb-lg-3 { + margin-bottom: 1rem !important; + } + + .mb-lg-4 { + margin-bottom: 1.5rem !important; + } + + .mb-lg-5 { + margin-bottom: 3rem !important; + } + + .mb-lg-auto { + margin-bottom: auto !important; + } + + .ms-lg-0 { + margin-right: 0 !important; + } + + .ms-lg-1 { + margin-right: 0.25rem !important; + } + + .ms-lg-2 { + margin-right: 0.5rem !important; + } + + .ms-lg-3 { + margin-right: 1rem !important; + } + + .ms-lg-4 { + margin-right: 1.5rem !important; + } + + .ms-lg-5 { + margin-right: 3rem !important; + } + + .ms-lg-auto { + margin-right: auto !important; + } + + .p-lg-0 { + padding: 0 !important; + } + + .p-lg-1 { + padding: 0.25rem !important; + } + + .p-lg-2 { + padding: 0.5rem !important; + } + + .p-lg-3 { + padding: 1rem !important; + } + + .p-lg-4 { + padding: 1.5rem !important; + } + + .p-lg-5 { + padding: 3rem !important; + } + + .px-lg-0 { + padding-left: 0 !important; + padding-right: 0 !important; + } + + .px-lg-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; + } + + .px-lg-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } + + .px-lg-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; + } + + .px-lg-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; + } + + .px-lg-5 { + padding-left: 3rem !important; + padding-right: 3rem !important; + } + + .py-lg-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-lg-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-lg-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-lg-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-lg-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-lg-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-lg-0 { + padding-top: 0 !important; + } + + .pt-lg-1 { + padding-top: 0.25rem !important; + } + + .pt-lg-2 { + padding-top: 0.5rem !important; + } + + .pt-lg-3 { + padding-top: 1rem !important; + } + + .pt-lg-4 { + padding-top: 1.5rem !important; + } + + .pt-lg-5 { + padding-top: 3rem !important; + } + + .pe-lg-0 { + padding-left: 0 !important; + } + + .pe-lg-1 { + padding-left: 0.25rem !important; + } + + .pe-lg-2 { + padding-left: 0.5rem !important; + } + + .pe-lg-3 { + padding-left: 1rem !important; + } + + .pe-lg-4 { + padding-left: 1.5rem !important; + } + + .pe-lg-5 { + padding-left: 3rem !important; + } + + .pb-lg-0 { + padding-bottom: 0 !important; + } + + .pb-lg-1 { + padding-bottom: 0.25rem !important; + } + + .pb-lg-2 { + padding-bottom: 0.5rem !important; + } + + .pb-lg-3 { + padding-bottom: 1rem !important; + } + + .pb-lg-4 { + padding-bottom: 1.5rem !important; + } + + .pb-lg-5 { + padding-bottom: 3rem !important; + } + + .ps-lg-0 { + padding-right: 0 !important; + } + + .ps-lg-1 { + padding-right: 0.25rem !important; + } + + .ps-lg-2 { + padding-right: 0.5rem !important; + } + + .ps-lg-3 { + padding-right: 1rem !important; + } + + .ps-lg-4 { + padding-right: 1.5rem !important; + } + + .ps-lg-5 { + padding-right: 3rem !important; + } +} +@media (min-width: 1200px) { + .d-xl-inline { + display: inline !important; + } + + .d-xl-inline-block { + display: inline-block !important; + } + + .d-xl-block { + display: block !important; + } + + .d-xl-grid { + display: grid !important; + } + + .d-xl-table { + display: table !important; + } + + .d-xl-table-row { + display: table-row !important; + } + + .d-xl-table-cell { + display: table-cell !important; + } + + .d-xl-flex { + display: flex !important; + } + + .d-xl-inline-flex { + display: inline-flex !important; + } + + .d-xl-none { + display: none !important; + } + + .flex-xl-fill { + flex: 1 1 auto !important; + } + + .flex-xl-row { + flex-direction: row !important; + } + + .flex-xl-column { + flex-direction: column !important; + } + + .flex-xl-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-xl-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-xl-grow-0 { + flex-grow: 0 !important; + } + + .flex-xl-grow-1 { + flex-grow: 1 !important; + } + + .flex-xl-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-xl-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-xl-wrap { + flex-wrap: wrap !important; + } + + .flex-xl-nowrap { + flex-wrap: nowrap !important; + } + + .flex-xl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-xl-start { + justify-content: flex-start !important; + } + + .justify-content-xl-end { + justify-content: flex-end !important; + } + + .justify-content-xl-center { + justify-content: center !important; + } + + .justify-content-xl-between { + justify-content: space-between !important; + } + + .justify-content-xl-around { + justify-content: space-around !important; + } + + .justify-content-xl-evenly { + justify-content: space-evenly !important; + } + + .align-items-xl-start { + align-items: flex-start !important; + } + + .align-items-xl-end { + align-items: flex-end !important; + } + + .align-items-xl-center { + align-items: center !important; + } + + .align-items-xl-baseline { + align-items: baseline !important; + } + + .align-items-xl-stretch { + align-items: stretch !important; + } + + .align-content-xl-start { + align-content: flex-start !important; + } + + .align-content-xl-end { + align-content: flex-end !important; + } + + .align-content-xl-center { + align-content: center !important; + } + + .align-content-xl-between { + align-content: space-between !important; + } + + .align-content-xl-around { + align-content: space-around !important; + } + + .align-content-xl-stretch { + align-content: stretch !important; + } + + .align-self-xl-auto { + align-self: auto !important; + } + + .align-self-xl-start { + align-self: flex-start !important; + } + + .align-self-xl-end { + align-self: flex-end !important; + } + + .align-self-xl-center { + align-self: center !important; + } + + .align-self-xl-baseline { + align-self: baseline !important; + } + + .align-self-xl-stretch { + align-self: stretch !important; + } + + .order-xl-first { + order: -1 !important; + } + + .order-xl-0 { + order: 0 !important; + } + + .order-xl-1 { + order: 1 !important; + } + + .order-xl-2 { + order: 2 !important; + } + + .order-xl-3 { + order: 3 !important; + } + + .order-xl-4 { + order: 4 !important; + } + + .order-xl-5 { + order: 5 !important; + } + + .order-xl-last { + order: 6 !important; + } + + .m-xl-0 { + margin: 0 !important; + } + + .m-xl-1 { + margin: 0.25rem !important; + } + + .m-xl-2 { + margin: 0.5rem !important; + } + + .m-xl-3 { + margin: 1rem !important; + } + + .m-xl-4 { + margin: 1.5rem !important; + } + + .m-xl-5 { + margin: 3rem !important; + } + + .m-xl-auto { + margin: auto !important; + } + + .mx-xl-0 { + margin-left: 0 !important; + margin-right: 0 !important; + } + + .mx-xl-1 { + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; + } + + .mx-xl-2 { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; + } + + .mx-xl-3 { + margin-left: 1rem !important; + margin-right: 1rem !important; + } + + .mx-xl-4 { + margin-left: 1.5rem !important; + margin-right: 1.5rem !important; + } + + .mx-xl-5 { + margin-left: 3rem !important; + margin-right: 3rem !important; + } + + .mx-xl-auto { + margin-left: auto !important; + margin-right: auto !important; + } + + .my-xl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-xl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-xl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-xl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-xl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-xl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-xl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-xl-0 { + margin-top: 0 !important; + } + + .mt-xl-1 { + margin-top: 0.25rem !important; + } + + .mt-xl-2 { + margin-top: 0.5rem !important; + } + + .mt-xl-3 { + margin-top: 1rem !important; + } + + .mt-xl-4 { + margin-top: 1.5rem !important; + } + + .mt-xl-5 { + margin-top: 3rem !important; + } + + .mt-xl-auto { + margin-top: auto !important; + } + + .me-xl-0 { + margin-left: 0 !important; + } + + .me-xl-1 { + margin-left: 0.25rem !important; + } + + .me-xl-2 { + margin-left: 0.5rem !important; + } + + .me-xl-3 { + margin-left: 1rem !important; + } + + .me-xl-4 { + margin-left: 1.5rem !important; + } + + .me-xl-5 { + margin-left: 3rem !important; + } + + .me-xl-auto { + margin-left: auto !important; + } + + .mb-xl-0 { + margin-bottom: 0 !important; + } + + .mb-xl-1 { + margin-bottom: 0.25rem !important; + } + + .mb-xl-2 { + margin-bottom: 0.5rem !important; + } + + .mb-xl-3 { + margin-bottom: 1rem !important; + } + + .mb-xl-4 { + margin-bottom: 1.5rem !important; + } + + .mb-xl-5 { + margin-bottom: 3rem !important; + } + + .mb-xl-auto { + margin-bottom: auto !important; + } + + .ms-xl-0 { + margin-right: 0 !important; + } + + .ms-xl-1 { + margin-right: 0.25rem !important; + } + + .ms-xl-2 { + margin-right: 0.5rem !important; + } + + .ms-xl-3 { + margin-right: 1rem !important; + } + + .ms-xl-4 { + margin-right: 1.5rem !important; + } + + .ms-xl-5 { + margin-right: 3rem !important; + } + + .ms-xl-auto { + margin-right: auto !important; + } + + .p-xl-0 { + padding: 0 !important; + } + + .p-xl-1 { + padding: 0.25rem !important; + } + + .p-xl-2 { + padding: 0.5rem !important; + } + + .p-xl-3 { + padding: 1rem !important; + } + + .p-xl-4 { + padding: 1.5rem !important; + } + + .p-xl-5 { + padding: 3rem !important; + } + + .px-xl-0 { + padding-left: 0 !important; + padding-right: 0 !important; + } + + .px-xl-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; + } + + .px-xl-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } + + .px-xl-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; + } + + .px-xl-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; + } + + .px-xl-5 { + padding-left: 3rem !important; + padding-right: 3rem !important; + } + + .py-xl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-xl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-xl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-xl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-xl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-xl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-xl-0 { + padding-top: 0 !important; + } + + .pt-xl-1 { + padding-top: 0.25rem !important; + } + + .pt-xl-2 { + padding-top: 0.5rem !important; + } + + .pt-xl-3 { + padding-top: 1rem !important; + } + + .pt-xl-4 { + padding-top: 1.5rem !important; + } + + .pt-xl-5 { + padding-top: 3rem !important; + } + + .pe-xl-0 { + padding-left: 0 !important; + } + + .pe-xl-1 { + padding-left: 0.25rem !important; + } + + .pe-xl-2 { + padding-left: 0.5rem !important; + } + + .pe-xl-3 { + padding-left: 1rem !important; + } + + .pe-xl-4 { + padding-left: 1.5rem !important; + } + + .pe-xl-5 { + padding-left: 3rem !important; + } + + .pb-xl-0 { + padding-bottom: 0 !important; + } + + .pb-xl-1 { + padding-bottom: 0.25rem !important; + } + + .pb-xl-2 { + padding-bottom: 0.5rem !important; + } + + .pb-xl-3 { + padding-bottom: 1rem !important; + } + + .pb-xl-4 { + padding-bottom: 1.5rem !important; + } + + .pb-xl-5 { + padding-bottom: 3rem !important; + } + + .ps-xl-0 { + padding-right: 0 !important; + } + + .ps-xl-1 { + padding-right: 0.25rem !important; + } + + .ps-xl-2 { + padding-right: 0.5rem !important; + } + + .ps-xl-3 { + padding-right: 1rem !important; + } + + .ps-xl-4 { + padding-right: 1.5rem !important; + } + + .ps-xl-5 { + padding-right: 3rem !important; + } +} +@media (min-width: 1400px) { + .d-xxl-inline { + display: inline !important; + } + + .d-xxl-inline-block { + display: inline-block !important; + } + + .d-xxl-block { + display: block !important; + } + + .d-xxl-grid { + display: grid !important; + } + + .d-xxl-table { + display: table !important; + } + + .d-xxl-table-row { + display: table-row !important; + } + + .d-xxl-table-cell { + display: table-cell !important; + } + + .d-xxl-flex { + display: flex !important; + } + + .d-xxl-inline-flex { + display: inline-flex !important; + } + + .d-xxl-none { + display: none !important; + } + + .flex-xxl-fill { + flex: 1 1 auto !important; + } + + .flex-xxl-row { + flex-direction: row !important; + } + + .flex-xxl-column { + flex-direction: column !important; + } + + .flex-xxl-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-xxl-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-xxl-grow-0 { + flex-grow: 0 !important; + } + + .flex-xxl-grow-1 { + flex-grow: 1 !important; + } + + .flex-xxl-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-xxl-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-xxl-wrap { + flex-wrap: wrap !important; + } + + .flex-xxl-nowrap { + flex-wrap: nowrap !important; + } + + .flex-xxl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-xxl-start { + justify-content: flex-start !important; + } + + .justify-content-xxl-end { + justify-content: flex-end !important; + } + + .justify-content-xxl-center { + justify-content: center !important; + } + + .justify-content-xxl-between { + justify-content: space-between !important; + } + + .justify-content-xxl-around { + justify-content: space-around !important; + } + + .justify-content-xxl-evenly { + justify-content: space-evenly !important; + } + + .align-items-xxl-start { + align-items: flex-start !important; + } + + .align-items-xxl-end { + align-items: flex-end !important; + } + + .align-items-xxl-center { + align-items: center !important; + } + + .align-items-xxl-baseline { + align-items: baseline !important; + } + + .align-items-xxl-stretch { + align-items: stretch !important; + } + + .align-content-xxl-start { + align-content: flex-start !important; + } + + .align-content-xxl-end { + align-content: flex-end !important; + } + + .align-content-xxl-center { + align-content: center !important; + } + + .align-content-xxl-between { + align-content: space-between !important; + } + + .align-content-xxl-around { + align-content: space-around !important; + } + + .align-content-xxl-stretch { + align-content: stretch !important; + } + + .align-self-xxl-auto { + align-self: auto !important; + } + + .align-self-xxl-start { + align-self: flex-start !important; + } + + .align-self-xxl-end { + align-self: flex-end !important; + } + + .align-self-xxl-center { + align-self: center !important; + } + + .align-self-xxl-baseline { + align-self: baseline !important; + } + + .align-self-xxl-stretch { + align-self: stretch !important; + } + + .order-xxl-first { + order: -1 !important; + } + + .order-xxl-0 { + order: 0 !important; + } + + .order-xxl-1 { + order: 1 !important; + } + + .order-xxl-2 { + order: 2 !important; + } + + .order-xxl-3 { + order: 3 !important; + } + + .order-xxl-4 { + order: 4 !important; + } + + .order-xxl-5 { + order: 5 !important; + } + + .order-xxl-last { + order: 6 !important; + } + + .m-xxl-0 { + margin: 0 !important; + } + + .m-xxl-1 { + margin: 0.25rem !important; + } + + .m-xxl-2 { + margin: 0.5rem !important; + } + + .m-xxl-3 { + margin: 1rem !important; + } + + .m-xxl-4 { + margin: 1.5rem !important; + } + + .m-xxl-5 { + margin: 3rem !important; + } + + .m-xxl-auto { + margin: auto !important; + } + + .mx-xxl-0 { + margin-left: 0 !important; + margin-right: 0 !important; + } + + .mx-xxl-1 { + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; + } + + .mx-xxl-2 { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; + } + + .mx-xxl-3 { + margin-left: 1rem !important; + margin-right: 1rem !important; + } + + .mx-xxl-4 { + margin-left: 1.5rem !important; + margin-right: 1.5rem !important; + } + + .mx-xxl-5 { + margin-left: 3rem !important; + margin-right: 3rem !important; + } + + .mx-xxl-auto { + margin-left: auto !important; + margin-right: auto !important; + } + + .my-xxl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-xxl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-xxl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-xxl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-xxl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-xxl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-xxl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-xxl-0 { + margin-top: 0 !important; + } + + .mt-xxl-1 { + margin-top: 0.25rem !important; + } + + .mt-xxl-2 { + margin-top: 0.5rem !important; + } + + .mt-xxl-3 { + margin-top: 1rem !important; + } + + .mt-xxl-4 { + margin-top: 1.5rem !important; + } + + .mt-xxl-5 { + margin-top: 3rem !important; + } + + .mt-xxl-auto { + margin-top: auto !important; + } + + .me-xxl-0 { + margin-left: 0 !important; + } + + .me-xxl-1 { + margin-left: 0.25rem !important; + } + + .me-xxl-2 { + margin-left: 0.5rem !important; + } + + .me-xxl-3 { + margin-left: 1rem !important; + } + + .me-xxl-4 { + margin-left: 1.5rem !important; + } + + .me-xxl-5 { + margin-left: 3rem !important; + } + + .me-xxl-auto { + margin-left: auto !important; + } + + .mb-xxl-0 { + margin-bottom: 0 !important; + } + + .mb-xxl-1 { + margin-bottom: 0.25rem !important; + } + + .mb-xxl-2 { + margin-bottom: 0.5rem !important; + } + + .mb-xxl-3 { + margin-bottom: 1rem !important; + } + + .mb-xxl-4 { + margin-bottom: 1.5rem !important; + } + + .mb-xxl-5 { + margin-bottom: 3rem !important; + } + + .mb-xxl-auto { + margin-bottom: auto !important; + } + + .ms-xxl-0 { + margin-right: 0 !important; + } + + .ms-xxl-1 { + margin-right: 0.25rem !important; + } + + .ms-xxl-2 { + margin-right: 0.5rem !important; + } + + .ms-xxl-3 { + margin-right: 1rem !important; + } + + .ms-xxl-4 { + margin-right: 1.5rem !important; + } + + .ms-xxl-5 { + margin-right: 3rem !important; + } + + .ms-xxl-auto { + margin-right: auto !important; + } + + .p-xxl-0 { + padding: 0 !important; + } + + .p-xxl-1 { + padding: 0.25rem !important; + } + + .p-xxl-2 { + padding: 0.5rem !important; + } + + .p-xxl-3 { + padding: 1rem !important; + } + + .p-xxl-4 { + padding: 1.5rem !important; + } + + .p-xxl-5 { + padding: 3rem !important; + } + + .px-xxl-0 { + padding-left: 0 !important; + padding-right: 0 !important; + } + + .px-xxl-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; + } + + .px-xxl-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } + + .px-xxl-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; + } + + .px-xxl-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; + } + + .px-xxl-5 { + padding-left: 3rem !important; + padding-right: 3rem !important; + } + + .py-xxl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-xxl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-xxl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-xxl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-xxl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-xxl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-xxl-0 { + padding-top: 0 !important; + } + + .pt-xxl-1 { + padding-top: 0.25rem !important; + } + + .pt-xxl-2 { + padding-top: 0.5rem !important; + } + + .pt-xxl-3 { + padding-top: 1rem !important; + } + + .pt-xxl-4 { + padding-top: 1.5rem !important; + } + + .pt-xxl-5 { + padding-top: 3rem !important; + } + + .pe-xxl-0 { + padding-left: 0 !important; + } + + .pe-xxl-1 { + padding-left: 0.25rem !important; + } + + .pe-xxl-2 { + padding-left: 0.5rem !important; + } + + .pe-xxl-3 { + padding-left: 1rem !important; + } + + .pe-xxl-4 { + padding-left: 1.5rem !important; + } + + .pe-xxl-5 { + padding-left: 3rem !important; + } + + .pb-xxl-0 { + padding-bottom: 0 !important; + } + + .pb-xxl-1 { + padding-bottom: 0.25rem !important; + } + + .pb-xxl-2 { + padding-bottom: 0.5rem !important; + } + + .pb-xxl-3 { + padding-bottom: 1rem !important; + } + + .pb-xxl-4 { + padding-bottom: 1.5rem !important; + } + + .pb-xxl-5 { + padding-bottom: 3rem !important; + } + + .ps-xxl-0 { + padding-right: 0 !important; + } + + .ps-xxl-1 { + padding-right: 0.25rem !important; + } + + .ps-xxl-2 { + padding-right: 0.5rem !important; + } + + .ps-xxl-3 { + padding-right: 1rem !important; + } + + .ps-xxl-4 { + padding-right: 1.5rem !important; + } + + .ps-xxl-5 { + padding-right: 3rem !important; + } +} +@media print { + .d-print-inline { + display: inline !important; + } + + .d-print-inline-block { + display: inline-block !important; + } + + .d-print-block { + display: block !important; + } + + .d-print-grid { + display: grid !important; + } + + .d-print-table { + display: table !important; + } + + .d-print-table-row { + display: table-row !important; + } + + .d-print-table-cell { + display: table-cell !important; + } + + .d-print-flex { + display: flex !important; + } + + .d-print-inline-flex { + display: inline-flex !important; + } + + .d-print-none { + display: none !important; + } +} +/*# sourceMappingURL=bootstrap-grid.rtl.css.map */ \ No newline at end of file diff --git a/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map new file mode 100644 index 0000000..33f5c3b --- /dev/null +++ b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/bootstrap-grid.scss","../../scss/_containers.scss","../../scss/mixins/_container.scss","bootstrap-grid.css","../../scss/mixins/_breakpoints.scss","../../scss/_variables.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AAAA;;;;;EAAA;ACME;;;;;;;ECHA,WAAA;EACA,yCAAA;EACA,0CAAA;EACA,iBAAA;EACA,kBAAA;ACWF;;AC6CI;EH5CE;IACE,gBIuce;EFpcrB;AACF;ACuCI;EH5CE;IACE,gBIuce;EF/brB;AACF;ACkCI;EH5CE;IACE,gBIuce;EF1brB;AACF;AC6BI;EH5CE;IACE,iBIuce;EFrbrB;AACF;ACwBI;EH5CE;IACE,iBIuce;EFhbrB;AACF;AGvCE;ECAA,qBAAA;EACA,gBAAA;EACA,aAAA;EACA,eAAA;EACA,yCAAA;EACA,2CAAA;EACA,4CAAA;AJ0CF;AG7CI;ECQF,sBAAA;EAIA,cAAA;EACA,WAAA;EACA,eAAA;EACA,2CAAA;EACA,4CAAA;EACA,8BAAA;AJqCF;;AIUM;EACE,YAAA;AJPR;;AIUM;EApCJ,cAAA;EACA,WAAA;AJ8BF;;AIhBE;EACE,cAAA;EACA,WAAA;AJmBJ;;AIrBE;EACE,cAAA;EACA,UAAA;AJwBJ;;AI1BE;EACE,cAAA;EACA,qBAAA;AJ6BJ;;AI/BE;EACE,cAAA;EACA,UAAA;AJkCJ;;AIpCE;EACE,cAAA;EACA,UAAA;AJuCJ;;AIzCE;EACE,cAAA;EACA,qBAAA;AJ4CJ;;AIbM;EAhDJ,cAAA;EACA,WAAA;AJiEF;;AIZU;EAhEN,cAAA;EACA,kBAAA;AJgFJ;;AIjBU;EAhEN,cAAA;EACA,mBAAA;AJqFJ;;AItBU;EAhEN,cAAA;EACA,UAAA;AJ0FJ;;AI3BU;EAhEN,cAAA;EACA,mBAAA;AJ+FJ;;AIhCU;EAhEN,cAAA;EACA,mBAAA;AJoGJ;;AIrCU;EAhEN,cAAA;EACA,UAAA;AJyGJ;;AI1CU;EAhEN,cAAA;EACA,mBAAA;AJ8GJ;;AI/CU;EAhEN,cAAA;EACA,mBAAA;AJmHJ;;AIpDU;EAhEN,cAAA;EACA,UAAA;AJwHJ;;AIzDU;EAhEN,cAAA;EACA,mBAAA;AJ6HJ;;AI9DU;EAhEN,cAAA;EACA,mBAAA;AJkIJ;;AInEU;EAhEN,cAAA;EACA,WAAA;AJuIJ;;AIhEY;EAxDV,yBAAA;AJ4HF;;AIpEY;EAxDV,0BAAA;AJgIF;;AIxEY;EAxDV,iBAAA;AJoIF;;AI5EY;EAxDV,0BAAA;AJwIF;;AIhFY;EAxDV,0BAAA;AJ4IF;;AIpFY;EAxDV,iBAAA;AJgJF;;AIxFY;EAxDV,0BAAA;AJoJF;;AI5FY;EAxDV,0BAAA;AJwJF;;AIhGY;EAxDV,iBAAA;AJ4JF;;AIpGY;EAxDV,0BAAA;AJgKF;;AIxGY;EAxDV,0BAAA;AJoKF;;AIjGQ;;EAEE,gBAAA;AJoGV;;AIjGQ;;EAEE,gBAAA;AJoGV;;AI3GQ;;EAEE,sBAAA;AJ8GV;;AI3GQ;;EAEE,sBAAA;AJ8GV;;AIrHQ;;EAEE,qBAAA;AJwHV;;AIrHQ;;EAEE,qBAAA;AJwHV;;AI/HQ;;EAEE,mBAAA;AJkIV;;AI/HQ;;EAEE,mBAAA;AJkIV;;AIzIQ;;EAEE,qBAAA;AJ4IV;;AIzIQ;;EAEE,qBAAA;AJ4IV;;AInJQ;;EAEE,mBAAA;AJsJV;;AInJQ;;EAEE,mBAAA;AJsJV;;AC/MI;EGSE;IACE,YAAA;EJ0MN;;EIvMI;IApCJ,cAAA;IACA,WAAA;EJ+OA;;EIjOA;IACE,cAAA;IACA,WAAA;EJoOF;;EItOA;IACE,cAAA;IACA,UAAA;EJyOF;;EI3OA;IACE,cAAA;IACA,qBAAA;EJ8OF;;EIhPA;IACE,cAAA;IACA,UAAA;EJmPF;;EIrPA;IACE,cAAA;IACA,UAAA;EJwPF;;EI1PA;IACE,cAAA;IACA,qBAAA;EJ6PF;;EI9NI;IAhDJ,cAAA;IACA,WAAA;EJkRA;;EI7NQ;IAhEN,cAAA;IACA,kBAAA;EJiSF;;EIlOQ;IAhEN,cAAA;IACA,mBAAA;EJsSF;;EIvOQ;IAhEN,cAAA;IACA,UAAA;EJ2SF;;EI5OQ;IAhEN,cAAA;IACA,mBAAA;EJgTF;;EIjPQ;IAhEN,cAAA;IACA,mBAAA;EJqTF;;EItPQ;IAhEN,cAAA;IACA,UAAA;EJ0TF;;EI3PQ;IAhEN,cAAA;IACA,mBAAA;EJ+TF;;EIhQQ;IAhEN,cAAA;IACA,mBAAA;EJoUF;;EIrQQ;IAhEN,cAAA;IACA,UAAA;EJyUF;;EI1QQ;IAhEN,cAAA;IACA,mBAAA;EJ8UF;;EI/QQ;IAhEN,cAAA;IACA,mBAAA;EJmVF;;EIpRQ;IAhEN,cAAA;IACA,WAAA;EJwVF;;EIjRU;IAxDV,eAAA;EJ6UA;;EIrRU;IAxDV,yBAAA;EJiVA;;EIzRU;IAxDV,0BAAA;EJqVA;;EI7RU;IAxDV,iBAAA;EJyVA;;EIjSU;IAxDV,0BAAA;EJ6VA;;EIrSU;IAxDV,0BAAA;EJiWA;;EIzSU;IAxDV,iBAAA;EJqWA;;EI7SU;IAxDV,0BAAA;EJyWA;;EIjTU;IAxDV,0BAAA;EJ6WA;;EIrTU;IAxDV,iBAAA;EJiXA;;EIzTU;IAxDV,0BAAA;EJqXA;;EI7TU;IAxDV,0BAAA;EJyXA;;EItTM;;IAEE,gBAAA;EJyTR;;EItTM;;IAEE,gBAAA;EJyTR;;EIhUM;;IAEE,sBAAA;EJmUR;;EIhUM;;IAEE,sBAAA;EJmUR;;EI1UM;;IAEE,qBAAA;EJ6UR;;EI1UM;;IAEE,qBAAA;EJ6UR;;EIpVM;;IAEE,mBAAA;EJuVR;;EIpVM;;IAEE,mBAAA;EJuVR;;EI9VM;;IAEE,qBAAA;EJiWR;;EI9VM;;IAEE,qBAAA;EJiWR;;EIxWM;;IAEE,mBAAA;EJ2WR;;EIxWM;;IAEE,mBAAA;EJ2WR;AACF;ACraI;EGSE;IACE,YAAA;EJ+ZN;;EI5ZI;IApCJ,cAAA;IACA,WAAA;EJocA;;EItbA;IACE,cAAA;IACA,WAAA;EJybF;;EI3bA;IACE,cAAA;IACA,UAAA;EJ8bF;;EIhcA;IACE,cAAA;IACA,qBAAA;EJmcF;;EIrcA;IACE,cAAA;IACA,UAAA;EJwcF;;EI1cA;IACE,cAAA;IACA,UAAA;EJ6cF;;EI/cA;IACE,cAAA;IACA,qBAAA;EJkdF;;EInbI;IAhDJ,cAAA;IACA,WAAA;EJueA;;EIlbQ;IAhEN,cAAA;IACA,kBAAA;EJsfF;;EIvbQ;IAhEN,cAAA;IACA,mBAAA;EJ2fF;;EI5bQ;IAhEN,cAAA;IACA,UAAA;EJggBF;;EIjcQ;IAhEN,cAAA;IACA,mBAAA;EJqgBF;;EItcQ;IAhEN,cAAA;IACA,mBAAA;EJ0gBF;;EI3cQ;IAhEN,cAAA;IACA,UAAA;EJ+gBF;;EIhdQ;IAhEN,cAAA;IACA,mBAAA;EJohBF;;EIrdQ;IAhEN,cAAA;IACA,mBAAA;EJyhBF;;EI1dQ;IAhEN,cAAA;IACA,UAAA;EJ8hBF;;EI/dQ;IAhEN,cAAA;IACA,mBAAA;EJmiBF;;EIpeQ;IAhEN,cAAA;IACA,mBAAA;EJwiBF;;EIzeQ;IAhEN,cAAA;IACA,WAAA;EJ6iBF;;EIteU;IAxDV,eAAA;EJkiBA;;EI1eU;IAxDV,yBAAA;EJsiBA;;EI9eU;IAxDV,0BAAA;EJ0iBA;;EIlfU;IAxDV,iBAAA;EJ8iBA;;EItfU;IAxDV,0BAAA;EJkjBA;;EI1fU;IAxDV,0BAAA;EJsjBA;;EI9fU;IAxDV,iBAAA;EJ0jBA;;EIlgBU;IAxDV,0BAAA;EJ8jBA;;EItgBU;IAxDV,0BAAA;EJkkBA;;EI1gBU;IAxDV,iBAAA;EJskBA;;EI9gBU;IAxDV,0BAAA;EJ0kBA;;EIlhBU;IAxDV,0BAAA;EJ8kBA;;EI3gBM;;IAEE,gBAAA;EJ8gBR;;EI3gBM;;IAEE,gBAAA;EJ8gBR;;EIrhBM;;IAEE,sBAAA;EJwhBR;;EIrhBM;;IAEE,sBAAA;EJwhBR;;EI/hBM;;IAEE,qBAAA;EJkiBR;;EI/hBM;;IAEE,qBAAA;EJkiBR;;EIziBM;;IAEE,mBAAA;EJ4iBR;;EIziBM;;IAEE,mBAAA;EJ4iBR;;EInjBM;;IAEE,qBAAA;EJsjBR;;EInjBM;;IAEE,qBAAA;EJsjBR;;EI7jBM;;IAEE,mBAAA;EJgkBR;;EI7jBM;;IAEE,mBAAA;EJgkBR;AACF;AC1nBI;EGSE;IACE,YAAA;EJonBN;;EIjnBI;IApCJ,cAAA;IACA,WAAA;EJypBA;;EI3oBA;IACE,cAAA;IACA,WAAA;EJ8oBF;;EIhpBA;IACE,cAAA;IACA,UAAA;EJmpBF;;EIrpBA;IACE,cAAA;IACA,qBAAA;EJwpBF;;EI1pBA;IACE,cAAA;IACA,UAAA;EJ6pBF;;EI/pBA;IACE,cAAA;IACA,UAAA;EJkqBF;;EIpqBA;IACE,cAAA;IACA,qBAAA;EJuqBF;;EIxoBI;IAhDJ,cAAA;IACA,WAAA;EJ4rBA;;EIvoBQ;IAhEN,cAAA;IACA,kBAAA;EJ2sBF;;EI5oBQ;IAhEN,cAAA;IACA,mBAAA;EJgtBF;;EIjpBQ;IAhEN,cAAA;IACA,UAAA;EJqtBF;;EItpBQ;IAhEN,cAAA;IACA,mBAAA;EJ0tBF;;EI3pBQ;IAhEN,cAAA;IACA,mBAAA;EJ+tBF;;EIhqBQ;IAhEN,cAAA;IACA,UAAA;EJouBF;;EIrqBQ;IAhEN,cAAA;IACA,mBAAA;EJyuBF;;EI1qBQ;IAhEN,cAAA;IACA,mBAAA;EJ8uBF;;EI/qBQ;IAhEN,cAAA;IACA,UAAA;EJmvBF;;EIprBQ;IAhEN,cAAA;IACA,mBAAA;EJwvBF;;EIzrBQ;IAhEN,cAAA;IACA,mBAAA;EJ6vBF;;EI9rBQ;IAhEN,cAAA;IACA,WAAA;EJkwBF;;EI3rBU;IAxDV,eAAA;EJuvBA;;EI/rBU;IAxDV,yBAAA;EJ2vBA;;EInsBU;IAxDV,0BAAA;EJ+vBA;;EIvsBU;IAxDV,iBAAA;EJmwBA;;EI3sBU;IAxDV,0BAAA;EJuwBA;;EI/sBU;IAxDV,0BAAA;EJ2wBA;;EIntBU;IAxDV,iBAAA;EJ+wBA;;EIvtBU;IAxDV,0BAAA;EJmxBA;;EI3tBU;IAxDV,0BAAA;EJuxBA;;EI/tBU;IAxDV,iBAAA;EJ2xBA;;EInuBU;IAxDV,0BAAA;EJ+xBA;;EIvuBU;IAxDV,0BAAA;EJmyBA;;EIhuBM;;IAEE,gBAAA;EJmuBR;;EIhuBM;;IAEE,gBAAA;EJmuBR;;EI1uBM;;IAEE,sBAAA;EJ6uBR;;EI1uBM;;IAEE,sBAAA;EJ6uBR;;EIpvBM;;IAEE,qBAAA;EJuvBR;;EIpvBM;;IAEE,qBAAA;EJuvBR;;EI9vBM;;IAEE,mBAAA;EJiwBR;;EI9vBM;;IAEE,mBAAA;EJiwBR;;EIxwBM;;IAEE,qBAAA;EJ2wBR;;EIxwBM;;IAEE,qBAAA;EJ2wBR;;EIlxBM;;IAEE,mBAAA;EJqxBR;;EIlxBM;;IAEE,mBAAA;EJqxBR;AACF;AC/0BI;EGSE;IACE,YAAA;EJy0BN;;EIt0BI;IApCJ,cAAA;IACA,WAAA;EJ82BA;;EIh2BA;IACE,cAAA;IACA,WAAA;EJm2BF;;EIr2BA;IACE,cAAA;IACA,UAAA;EJw2BF;;EI12BA;IACE,cAAA;IACA,qBAAA;EJ62BF;;EI/2BA;IACE,cAAA;IACA,UAAA;EJk3BF;;EIp3BA;IACE,cAAA;IACA,UAAA;EJu3BF;;EIz3BA;IACE,cAAA;IACA,qBAAA;EJ43BF;;EI71BI;IAhDJ,cAAA;IACA,WAAA;EJi5BA;;EI51BQ;IAhEN,cAAA;IACA,kBAAA;EJg6BF;;EIj2BQ;IAhEN,cAAA;IACA,mBAAA;EJq6BF;;EIt2BQ;IAhEN,cAAA;IACA,UAAA;EJ06BF;;EI32BQ;IAhEN,cAAA;IACA,mBAAA;EJ+6BF;;EIh3BQ;IAhEN,cAAA;IACA,mBAAA;EJo7BF;;EIr3BQ;IAhEN,cAAA;IACA,UAAA;EJy7BF;;EI13BQ;IAhEN,cAAA;IACA,mBAAA;EJ87BF;;EI/3BQ;IAhEN,cAAA;IACA,mBAAA;EJm8BF;;EIp4BQ;IAhEN,cAAA;IACA,UAAA;EJw8BF;;EIz4BQ;IAhEN,cAAA;IACA,mBAAA;EJ68BF;;EI94BQ;IAhEN,cAAA;IACA,mBAAA;EJk9BF;;EIn5BQ;IAhEN,cAAA;IACA,WAAA;EJu9BF;;EIh5BU;IAxDV,eAAA;EJ48BA;;EIp5BU;IAxDV,yBAAA;EJg9BA;;EIx5BU;IAxDV,0BAAA;EJo9BA;;EI55BU;IAxDV,iBAAA;EJw9BA;;EIh6BU;IAxDV,0BAAA;EJ49BA;;EIp6BU;IAxDV,0BAAA;EJg+BA;;EIx6BU;IAxDV,iBAAA;EJo+BA;;EI56BU;IAxDV,0BAAA;EJw+BA;;EIh7BU;IAxDV,0BAAA;EJ4+BA;;EIp7BU;IAxDV,iBAAA;EJg/BA;;EIx7BU;IAxDV,0BAAA;EJo/BA;;EI57BU;IAxDV,0BAAA;EJw/BA;;EIr7BM;;IAEE,gBAAA;EJw7BR;;EIr7BM;;IAEE,gBAAA;EJw7BR;;EI/7BM;;IAEE,sBAAA;EJk8BR;;EI/7BM;;IAEE,sBAAA;EJk8BR;;EIz8BM;;IAEE,qBAAA;EJ48BR;;EIz8BM;;IAEE,qBAAA;EJ48BR;;EIn9BM;;IAEE,mBAAA;EJs9BR;;EIn9BM;;IAEE,mBAAA;EJs9BR;;EI79BM;;IAEE,qBAAA;EJg+BR;;EI79BM;;IAEE,qBAAA;EJg+BR;;EIv+BM;;IAEE,mBAAA;EJ0+BR;;EIv+BM;;IAEE,mBAAA;EJ0+BR;AACF;ACpiCI;EGSE;IACE,YAAA;EJ8hCN;;EI3hCI;IApCJ,cAAA;IACA,WAAA;EJmkCA;;EIrjCA;IACE,cAAA;IACA,WAAA;EJwjCF;;EI1jCA;IACE,cAAA;IACA,UAAA;EJ6jCF;;EI/jCA;IACE,cAAA;IACA,qBAAA;EJkkCF;;EIpkCA;IACE,cAAA;IACA,UAAA;EJukCF;;EIzkCA;IACE,cAAA;IACA,UAAA;EJ4kCF;;EI9kCA;IACE,cAAA;IACA,qBAAA;EJilCF;;EIljCI;IAhDJ,cAAA;IACA,WAAA;EJsmCA;;EIjjCQ;IAhEN,cAAA;IACA,kBAAA;EJqnCF;;EItjCQ;IAhEN,cAAA;IACA,mBAAA;EJ0nCF;;EI3jCQ;IAhEN,cAAA;IACA,UAAA;EJ+nCF;;EIhkCQ;IAhEN,cAAA;IACA,mBAAA;EJooCF;;EIrkCQ;IAhEN,cAAA;IACA,mBAAA;EJyoCF;;EI1kCQ;IAhEN,cAAA;IACA,UAAA;EJ8oCF;;EI/kCQ;IAhEN,cAAA;IACA,mBAAA;EJmpCF;;EIplCQ;IAhEN,cAAA;IACA,mBAAA;EJwpCF;;EIzlCQ;IAhEN,cAAA;IACA,UAAA;EJ6pCF;;EI9lCQ;IAhEN,cAAA;IACA,mBAAA;EJkqCF;;EInmCQ;IAhEN,cAAA;IACA,mBAAA;EJuqCF;;EIxmCQ;IAhEN,cAAA;IACA,WAAA;EJ4qCF;;EIrmCU;IAxDV,eAAA;EJiqCA;;EIzmCU;IAxDV,yBAAA;EJqqCA;;EI7mCU;IAxDV,0BAAA;EJyqCA;;EIjnCU;IAxDV,iBAAA;EJ6qCA;;EIrnCU;IAxDV,0BAAA;EJirCA;;EIznCU;IAxDV,0BAAA;EJqrCA;;EI7nCU;IAxDV,iBAAA;EJyrCA;;EIjoCU;IAxDV,0BAAA;EJ6rCA;;EIroCU;IAxDV,0BAAA;EJisCA;;EIzoCU;IAxDV,iBAAA;EJqsCA;;EI7oCU;IAxDV,0BAAA;EJysCA;;EIjpCU;IAxDV,0BAAA;EJ6sCA;;EI1oCM;;IAEE,gBAAA;EJ6oCR;;EI1oCM;;IAEE,gBAAA;EJ6oCR;;EIppCM;;IAEE,sBAAA;EJupCR;;EIppCM;;IAEE,sBAAA;EJupCR;;EI9pCM;;IAEE,qBAAA;EJiqCR;;EI9pCM;;IAEE,qBAAA;EJiqCR;;EIxqCM;;IAEE,mBAAA;EJ2qCR;;EIxqCM;;IAEE,mBAAA;EJ2qCR;;EIlrCM;;IAEE,qBAAA;EJqrCR;;EIlrCM;;IAEE,qBAAA;EJqrCR;;EI5rCM;;IAEE,mBAAA;EJ+rCR;;EI5rCM;;IAEE,mBAAA;EJ+rCR;AACF;AKzvCQ;EAOI,0BAAA;ALqvCZ;;AK5vCQ;EAOI,gCAAA;ALyvCZ;;AKhwCQ;EAOI,yBAAA;AL6vCZ;;AKpwCQ;EAOI,wBAAA;ALiwCZ;;AKxwCQ;EAOI,yBAAA;ALqwCZ;;AK5wCQ;EAOI,6BAAA;ALywCZ;;AKhxCQ;EAOI,8BAAA;AL6wCZ;;AKpxCQ;EAOI,wBAAA;ALixCZ;;AKxxCQ;EAOI,+BAAA;ALqxCZ;;AK5xCQ;EAOI,wBAAA;ALyxCZ;;AKhyCQ;EAOI,yBAAA;AL6xCZ;;AKpyCQ;EAOI,8BAAA;ALiyCZ;;AKxyCQ;EAOI,iCAAA;ALqyCZ;;AK5yCQ;EAOI,sCAAA;ALyyCZ;;AKhzCQ;EAOI,yCAAA;AL6yCZ;;AKpzCQ;EAOI,uBAAA;ALizCZ;;AKxzCQ;EAOI,uBAAA;ALqzCZ;;AK5zCQ;EAOI,yBAAA;ALyzCZ;;AKh0CQ;EAOI,yBAAA;AL6zCZ;;AKp0CQ;EAOI,0BAAA;ALi0CZ;;AKx0CQ;EAOI,4BAAA;ALq0CZ;;AK50CQ;EAOI,kCAAA;ALy0CZ;;AKh1CQ;EAOI,sCAAA;AL60CZ;;AKp1CQ;EAOI,oCAAA;ALi1CZ;;AKx1CQ;EAOI,kCAAA;ALq1CZ;;AK51CQ;EAOI,yCAAA;ALy1CZ;;AKh2CQ;EAOI,wCAAA;AL61CZ;;AKp2CQ;EAOI,wCAAA;ALi2CZ;;AKx2CQ;EAOI,kCAAA;ALq2CZ;;AK52CQ;EAOI,gCAAA;ALy2CZ;;AKh3CQ;EAOI,8BAAA;AL62CZ;;AKp3CQ;EAOI,gCAAA;ALi3CZ;;AKx3CQ;EAOI,+BAAA;ALq3CZ;;AK53CQ;EAOI,oCAAA;ALy3CZ;;AKh4CQ;EAOI,kCAAA;AL63CZ;;AKp4CQ;EAOI,gCAAA;ALi4CZ;;AKx4CQ;EAOI,uCAAA;ALq4CZ;;AK54CQ;EAOI,sCAAA;ALy4CZ;;AKh5CQ;EAOI,iCAAA;AL64CZ;;AKp5CQ;EAOI,2BAAA;ALi5CZ;;AKx5CQ;EAOI,iCAAA;ALq5CZ;;AK55CQ;EAOI,+BAAA;ALy5CZ;;AKh6CQ;EAOI,6BAAA;AL65CZ;;AKp6CQ;EAOI,+BAAA;ALi6CZ;;AKx6CQ;EAOI,8BAAA;ALq6CZ;;AK56CQ;EAOI,oBAAA;ALy6CZ;;AKh7CQ;EAOI,mBAAA;AL66CZ;;AKp7CQ;EAOI,mBAAA;ALi7CZ;;AKx7CQ;EAOI,mBAAA;ALq7CZ;;AK57CQ;EAOI,mBAAA;ALy7CZ;;AKh8CQ;EAOI,mBAAA;AL67CZ;;AKp8CQ;EAOI,mBAAA;ALi8CZ;;AKx8CQ;EAOI,mBAAA;ALq8CZ;;AK58CQ;EAOI,oBAAA;ALy8CZ;;AKh9CQ;EAOI,0BAAA;AL68CZ;;AKp9CQ;EAOI,yBAAA;ALi9CZ;;AKx9CQ;EAOI,uBAAA;ALq9CZ;;AK59CQ;EAOI,yBAAA;ALy9CZ;;AKh+CQ;EAOI,uBAAA;AL69CZ;;AKp+CQ;EAOI,uBAAA;ALi+CZ;;AKx+CQ;EAOI,yBAAA;EAAA,0BAAA;ALs+CZ;;AK7+CQ;EAOI,+BAAA;EAAA,gCAAA;AL2+CZ;;AKl/CQ;EAOI,8BAAA;EAAA,+BAAA;ALg/CZ;;AKv/CQ;EAOI,4BAAA;EAAA,6BAAA;ALq/CZ;;AK5/CQ;EAOI,8BAAA;EAAA,+BAAA;AL0/CZ;;AKjgDQ;EAOI,4BAAA;EAAA,6BAAA;AL+/CZ;;AKtgDQ;EAOI,4BAAA;EAAA,6BAAA;ALogDZ;;AK3gDQ;EAOI,wBAAA;EAAA,2BAAA;ALygDZ;;AKhhDQ;EAOI,8BAAA;EAAA,iCAAA;AL8gDZ;;AKrhDQ;EAOI,6BAAA;EAAA,gCAAA;ALmhDZ;;AK1hDQ;EAOI,2BAAA;EAAA,8BAAA;ALwhDZ;;AK/hDQ;EAOI,6BAAA;EAAA,gCAAA;AL6hDZ;;AKpiDQ;EAOI,2BAAA;EAAA,8BAAA;ALkiDZ;;AKziDQ;EAOI,2BAAA;EAAA,8BAAA;ALuiDZ;;AK9iDQ;EAOI,wBAAA;AL2iDZ;;AKljDQ;EAOI,8BAAA;AL+iDZ;;AKtjDQ;EAOI,6BAAA;ALmjDZ;;AK1jDQ;EAOI,2BAAA;ALujDZ;;AK9jDQ;EAOI,6BAAA;AL2jDZ;;AKlkDQ;EAOI,2BAAA;AL+jDZ;;AKtkDQ;EAOI,2BAAA;ALmkDZ;;AK1kDQ;EAOI,yBAAA;ALukDZ;;AK9kDQ;EAOI,+BAAA;AL2kDZ;;AKllDQ;EAOI,8BAAA;AL+kDZ;;AKtlDQ;EAOI,4BAAA;ALmlDZ;;AK1lDQ;EAOI,8BAAA;ALulDZ;;AK9lDQ;EAOI,4BAAA;AL2lDZ;;AKlmDQ;EAOI,4BAAA;AL+lDZ;;AKtmDQ;EAOI,2BAAA;ALmmDZ;;AK1mDQ;EAOI,iCAAA;ALumDZ;;AK9mDQ;EAOI,gCAAA;AL2mDZ;;AKlnDQ;EAOI,8BAAA;AL+mDZ;;AKtnDQ;EAOI,gCAAA;ALmnDZ;;AK1nDQ;EAOI,8BAAA;ALunDZ;;AK9nDQ;EAOI,8BAAA;AL2nDZ;;AKloDQ;EAOI,0BAAA;AL+nDZ;;AKtoDQ;EAOI,gCAAA;ALmoDZ;;AK1oDQ;EAOI,+BAAA;ALuoDZ;;AK9oDQ;EAOI,6BAAA;AL2oDZ;;AKlpDQ;EAOI,+BAAA;AL+oDZ;;AKtpDQ;EAOI,6BAAA;ALmpDZ;;AK1pDQ;EAOI,6BAAA;ALupDZ;;AK9pDQ;EAOI,qBAAA;AL2pDZ;;AKlqDQ;EAOI,2BAAA;AL+pDZ;;AKtqDQ;EAOI,0BAAA;ALmqDZ;;AK1qDQ;EAOI,wBAAA;ALuqDZ;;AK9qDQ;EAOI,0BAAA;AL2qDZ;;AKlrDQ;EAOI,wBAAA;AL+qDZ;;AKtrDQ;EAOI,0BAAA;EAAA,2BAAA;ALorDZ;;AK3rDQ;EAOI,gCAAA;EAAA,iCAAA;ALyrDZ;;AKhsDQ;EAOI,+BAAA;EAAA,gCAAA;AL8rDZ;;AKrsDQ;EAOI,6BAAA;EAAA,8BAAA;ALmsDZ;;AK1sDQ;EAOI,+BAAA;EAAA,gCAAA;ALwsDZ;;AK/sDQ;EAOI,6BAAA;EAAA,8BAAA;AL6sDZ;;AKptDQ;EAOI,yBAAA;EAAA,4BAAA;ALktDZ;;AKztDQ;EAOI,+BAAA;EAAA,kCAAA;ALutDZ;;AK9tDQ;EAOI,8BAAA;EAAA,iCAAA;AL4tDZ;;AKnuDQ;EAOI,4BAAA;EAAA,+BAAA;ALiuDZ;;AKxuDQ;EAOI,8BAAA;EAAA,iCAAA;ALsuDZ;;AK7uDQ;EAOI,4BAAA;EAAA,+BAAA;AL2uDZ;;AKlvDQ;EAOI,yBAAA;AL+uDZ;;AKtvDQ;EAOI,+BAAA;ALmvDZ;;AK1vDQ;EAOI,8BAAA;ALuvDZ;;AK9vDQ;EAOI,4BAAA;AL2vDZ;;AKlwDQ;EAOI,8BAAA;AL+vDZ;;AKtwDQ;EAOI,4BAAA;ALmwDZ;;AK1wDQ;EAOI,0BAAA;ALuwDZ;;AK9wDQ;EAOI,gCAAA;AL2wDZ;;AKlxDQ;EAOI,+BAAA;AL+wDZ;;AKtxDQ;EAOI,6BAAA;ALmxDZ;;AK1xDQ;EAOI,+BAAA;ALuxDZ;;AK9xDQ;EAOI,6BAAA;AL2xDZ;;AKlyDQ;EAOI,4BAAA;AL+xDZ;;AKtyDQ;EAOI,kCAAA;ALmyDZ;;AK1yDQ;EAOI,iCAAA;ALuyDZ;;AK9yDQ;EAOI,+BAAA;AL2yDZ;;AKlzDQ;EAOI,iCAAA;AL+yDZ;;AKtzDQ;EAOI,+BAAA;ALmzDZ;;AK1zDQ;EAOI,2BAAA;ALuzDZ;;AK9zDQ;EAOI,iCAAA;AL2zDZ;;AKl0DQ;EAOI,gCAAA;AL+zDZ;;AKt0DQ;EAOI,8BAAA;ALm0DZ;;AK10DQ;EAOI,gCAAA;ALu0DZ;;AK90DQ;EAOI,8BAAA;AL20DZ;;ACl1DI;EIAI;IAOI,0BAAA;ELg1DV;;EKv1DM;IAOI,gCAAA;ELo1DV;;EK31DM;IAOI,yBAAA;ELw1DV;;EK/1DM;IAOI,wBAAA;EL41DV;;EKn2DM;IAOI,yBAAA;ELg2DV;;EKv2DM;IAOI,6BAAA;ELo2DV;;EK32DM;IAOI,8BAAA;ELw2DV;;EK/2DM;IAOI,wBAAA;EL42DV;;EKn3DM;IAOI,+BAAA;ELg3DV;;EKv3DM;IAOI,wBAAA;ELo3DV;;EK33DM;IAOI,yBAAA;ELw3DV;;EK/3DM;IAOI,8BAAA;EL43DV;;EKn4DM;IAOI,iCAAA;ELg4DV;;EKv4DM;IAOI,sCAAA;ELo4DV;;EK34DM;IAOI,yCAAA;ELw4DV;;EK/4DM;IAOI,uBAAA;EL44DV;;EKn5DM;IAOI,uBAAA;ELg5DV;;EKv5DM;IAOI,yBAAA;ELo5DV;;EK35DM;IAOI,yBAAA;ELw5DV;;EK/5DM;IAOI,0BAAA;EL45DV;;EKn6DM;IAOI,4BAAA;ELg6DV;;EKv6DM;IAOI,kCAAA;ELo6DV;;EK36DM;IAOI,sCAAA;ELw6DV;;EK/6DM;IAOI,oCAAA;EL46DV;;EKn7DM;IAOI,kCAAA;ELg7DV;;EKv7DM;IAOI,yCAAA;ELo7DV;;EK37DM;IAOI,wCAAA;ELw7DV;;EK/7DM;IAOI,wCAAA;EL47DV;;EKn8DM;IAOI,kCAAA;ELg8DV;;EKv8DM;IAOI,gCAAA;ELo8DV;;EK38DM;IAOI,8BAAA;ELw8DV;;EK/8DM;IAOI,gCAAA;EL48DV;;EKn9DM;IAOI,+BAAA;ELg9DV;;EKv9DM;IAOI,oCAAA;ELo9DV;;EK39DM;IAOI,kCAAA;ELw9DV;;EK/9DM;IAOI,gCAAA;EL49DV;;EKn+DM;IAOI,uCAAA;ELg+DV;;EKv+DM;IAOI,sCAAA;ELo+DV;;EK3+DM;IAOI,iCAAA;ELw+DV;;EK/+DM;IAOI,2BAAA;EL4+DV;;EKn/DM;IAOI,iCAAA;ELg/DV;;EKv/DM;IAOI,+BAAA;ELo/DV;;EK3/DM;IAOI,6BAAA;ELw/DV;;EK//DM;IAOI,+BAAA;EL4/DV;;EKngEM;IAOI,8BAAA;ELggEV;;EKvgEM;IAOI,oBAAA;ELogEV;;EK3gEM;IAOI,mBAAA;ELwgEV;;EK/gEM;IAOI,mBAAA;EL4gEV;;EKnhEM;IAOI,mBAAA;ELghEV;;EKvhEM;IAOI,mBAAA;ELohEV;;EK3hEM;IAOI,mBAAA;ELwhEV;;EK/hEM;IAOI,mBAAA;EL4hEV;;EKniEM;IAOI,mBAAA;ELgiEV;;EKviEM;IAOI,oBAAA;ELoiEV;;EK3iEM;IAOI,0BAAA;ELwiEV;;EK/iEM;IAOI,yBAAA;EL4iEV;;EKnjEM;IAOI,uBAAA;ELgjEV;;EKvjEM;IAOI,yBAAA;ELojEV;;EK3jEM;IAOI,uBAAA;ELwjEV;;EK/jEM;IAOI,uBAAA;EL4jEV;;EKnkEM;IAOI,yBAAA;IAAA,0BAAA;ELikEV;;EKxkEM;IAOI,+BAAA;IAAA,gCAAA;ELskEV;;EK7kEM;IAOI,8BAAA;IAAA,+BAAA;EL2kEV;;EKllEM;IAOI,4BAAA;IAAA,6BAAA;ELglEV;;EKvlEM;IAOI,8BAAA;IAAA,+BAAA;ELqlEV;;EK5lEM;IAOI,4BAAA;IAAA,6BAAA;EL0lEV;;EKjmEM;IAOI,4BAAA;IAAA,6BAAA;EL+lEV;;EKtmEM;IAOI,wBAAA;IAAA,2BAAA;ELomEV;;EK3mEM;IAOI,8BAAA;IAAA,iCAAA;ELymEV;;EKhnEM;IAOI,6BAAA;IAAA,gCAAA;EL8mEV;;EKrnEM;IAOI,2BAAA;IAAA,8BAAA;ELmnEV;;EK1nEM;IAOI,6BAAA;IAAA,gCAAA;ELwnEV;;EK/nEM;IAOI,2BAAA;IAAA,8BAAA;EL6nEV;;EKpoEM;IAOI,2BAAA;IAAA,8BAAA;ELkoEV;;EKzoEM;IAOI,wBAAA;ELsoEV;;EK7oEM;IAOI,8BAAA;EL0oEV;;EKjpEM;IAOI,6BAAA;EL8oEV;;EKrpEM;IAOI,2BAAA;ELkpEV;;EKzpEM;IAOI,6BAAA;ELspEV;;EK7pEM;IAOI,2BAAA;EL0pEV;;EKjqEM;IAOI,2BAAA;EL8pEV;;EKrqEM;IAOI,yBAAA;ELkqEV;;EKzqEM;IAOI,+BAAA;ELsqEV;;EK7qEM;IAOI,8BAAA;EL0qEV;;EKjrEM;IAOI,4BAAA;EL8qEV;;EKrrEM;IAOI,8BAAA;ELkrEV;;EKzrEM;IAOI,4BAAA;ELsrEV;;EK7rEM;IAOI,4BAAA;EL0rEV;;EKjsEM;IAOI,2BAAA;EL8rEV;;EKrsEM;IAOI,iCAAA;ELksEV;;EKzsEM;IAOI,gCAAA;ELssEV;;EK7sEM;IAOI,8BAAA;EL0sEV;;EKjtEM;IAOI,gCAAA;EL8sEV;;EKrtEM;IAOI,8BAAA;ELktEV;;EKztEM;IAOI,8BAAA;ELstEV;;EK7tEM;IAOI,0BAAA;EL0tEV;;EKjuEM;IAOI,gCAAA;EL8tEV;;EKruEM;IAOI,+BAAA;ELkuEV;;EKzuEM;IAOI,6BAAA;ELsuEV;;EK7uEM;IAOI,+BAAA;EL0uEV;;EKjvEM;IAOI,6BAAA;EL8uEV;;EKrvEM;IAOI,6BAAA;ELkvEV;;EKzvEM;IAOI,qBAAA;ELsvEV;;EK7vEM;IAOI,2BAAA;EL0vEV;;EKjwEM;IAOI,0BAAA;EL8vEV;;EKrwEM;IAOI,wBAAA;ELkwEV;;EKzwEM;IAOI,0BAAA;ELswEV;;EK7wEM;IAOI,wBAAA;EL0wEV;;EKjxEM;IAOI,0BAAA;IAAA,2BAAA;EL+wEV;;EKtxEM;IAOI,gCAAA;IAAA,iCAAA;ELoxEV;;EK3xEM;IAOI,+BAAA;IAAA,gCAAA;ELyxEV;;EKhyEM;IAOI,6BAAA;IAAA,8BAAA;EL8xEV;;EKryEM;IAOI,+BAAA;IAAA,gCAAA;ELmyEV;;EK1yEM;IAOI,6BAAA;IAAA,8BAAA;ELwyEV;;EK/yEM;IAOI,yBAAA;IAAA,4BAAA;EL6yEV;;EKpzEM;IAOI,+BAAA;IAAA,kCAAA;ELkzEV;;EKzzEM;IAOI,8BAAA;IAAA,iCAAA;ELuzEV;;EK9zEM;IAOI,4BAAA;IAAA,+BAAA;EL4zEV;;EKn0EM;IAOI,8BAAA;IAAA,iCAAA;ELi0EV;;EKx0EM;IAOI,4BAAA;IAAA,+BAAA;ELs0EV;;EK70EM;IAOI,yBAAA;EL00EV;;EKj1EM;IAOI,+BAAA;EL80EV;;EKr1EM;IAOI,8BAAA;ELk1EV;;EKz1EM;IAOI,4BAAA;ELs1EV;;EK71EM;IAOI,8BAAA;EL01EV;;EKj2EM;IAOI,4BAAA;EL81EV;;EKr2EM;IAOI,0BAAA;ELk2EV;;EKz2EM;IAOI,gCAAA;ELs2EV;;EK72EM;IAOI,+BAAA;EL02EV;;EKj3EM;IAOI,6BAAA;EL82EV;;EKr3EM;IAOI,+BAAA;ELk3EV;;EKz3EM;IAOI,6BAAA;ELs3EV;;EK73EM;IAOI,4BAAA;EL03EV;;EKj4EM;IAOI,kCAAA;EL83EV;;EKr4EM;IAOI,iCAAA;ELk4EV;;EKz4EM;IAOI,+BAAA;ELs4EV;;EK74EM;IAOI,iCAAA;EL04EV;;EKj5EM;IAOI,+BAAA;EL84EV;;EKr5EM;IAOI,2BAAA;ELk5EV;;EKz5EM;IAOI,iCAAA;ELs5EV;;EK75EM;IAOI,gCAAA;EL05EV;;EKj6EM;IAOI,8BAAA;EL85EV;;EKr6EM;IAOI,gCAAA;ELk6EV;;EKz6EM;IAOI,8BAAA;ELs6EV;AACF;AC96EI;EIAI;IAOI,0BAAA;EL26EV;;EKl7EM;IAOI,gCAAA;EL+6EV;;EKt7EM;IAOI,yBAAA;ELm7EV;;EK17EM;IAOI,wBAAA;ELu7EV;;EK97EM;IAOI,yBAAA;EL27EV;;EKl8EM;IAOI,6BAAA;EL+7EV;;EKt8EM;IAOI,8BAAA;ELm8EV;;EK18EM;IAOI,wBAAA;ELu8EV;;EK98EM;IAOI,+BAAA;EL28EV;;EKl9EM;IAOI,wBAAA;EL+8EV;;EKt9EM;IAOI,yBAAA;ELm9EV;;EK19EM;IAOI,8BAAA;ELu9EV;;EK99EM;IAOI,iCAAA;EL29EV;;EKl+EM;IAOI,sCAAA;EL+9EV;;EKt+EM;IAOI,yCAAA;ELm+EV;;EK1+EM;IAOI,uBAAA;ELu+EV;;EK9+EM;IAOI,uBAAA;EL2+EV;;EKl/EM;IAOI,yBAAA;EL++EV;;EKt/EM;IAOI,yBAAA;ELm/EV;;EK1/EM;IAOI,0BAAA;ELu/EV;;EK9/EM;IAOI,4BAAA;EL2/EV;;EKlgFM;IAOI,kCAAA;EL+/EV;;EKtgFM;IAOI,sCAAA;ELmgFV;;EK1gFM;IAOI,oCAAA;ELugFV;;EK9gFM;IAOI,kCAAA;EL2gFV;;EKlhFM;IAOI,yCAAA;EL+gFV;;EKthFM;IAOI,wCAAA;ELmhFV;;EK1hFM;IAOI,wCAAA;ELuhFV;;EK9hFM;IAOI,kCAAA;EL2hFV;;EKliFM;IAOI,gCAAA;EL+hFV;;EKtiFM;IAOI,8BAAA;ELmiFV;;EK1iFM;IAOI,gCAAA;ELuiFV;;EK9iFM;IAOI,+BAAA;EL2iFV;;EKljFM;IAOI,oCAAA;EL+iFV;;EKtjFM;IAOI,kCAAA;ELmjFV;;EK1jFM;IAOI,gCAAA;ELujFV;;EK9jFM;IAOI,uCAAA;EL2jFV;;EKlkFM;IAOI,sCAAA;EL+jFV;;EKtkFM;IAOI,iCAAA;ELmkFV;;EK1kFM;IAOI,2BAAA;ELukFV;;EK9kFM;IAOI,iCAAA;EL2kFV;;EKllFM;IAOI,+BAAA;EL+kFV;;EKtlFM;IAOI,6BAAA;ELmlFV;;EK1lFM;IAOI,+BAAA;ELulFV;;EK9lFM;IAOI,8BAAA;EL2lFV;;EKlmFM;IAOI,oBAAA;EL+lFV;;EKtmFM;IAOI,mBAAA;ELmmFV;;EK1mFM;IAOI,mBAAA;ELumFV;;EK9mFM;IAOI,mBAAA;EL2mFV;;EKlnFM;IAOI,mBAAA;EL+mFV;;EKtnFM;IAOI,mBAAA;ELmnFV;;EK1nFM;IAOI,mBAAA;ELunFV;;EK9nFM;IAOI,mBAAA;EL2nFV;;EKloFM;IAOI,oBAAA;EL+nFV;;EKtoFM;IAOI,0BAAA;ELmoFV;;EK1oFM;IAOI,yBAAA;ELuoFV;;EK9oFM;IAOI,uBAAA;EL2oFV;;EKlpFM;IAOI,yBAAA;EL+oFV;;EKtpFM;IAOI,uBAAA;ELmpFV;;EK1pFM;IAOI,uBAAA;ELupFV;;EK9pFM;IAOI,yBAAA;IAAA,0BAAA;EL4pFV;;EKnqFM;IAOI,+BAAA;IAAA,gCAAA;ELiqFV;;EKxqFM;IAOI,8BAAA;IAAA,+BAAA;ELsqFV;;EK7qFM;IAOI,4BAAA;IAAA,6BAAA;EL2qFV;;EKlrFM;IAOI,8BAAA;IAAA,+BAAA;ELgrFV;;EKvrFM;IAOI,4BAAA;IAAA,6BAAA;ELqrFV;;EK5rFM;IAOI,4BAAA;IAAA,6BAAA;EL0rFV;;EKjsFM;IAOI,wBAAA;IAAA,2BAAA;EL+rFV;;EKtsFM;IAOI,8BAAA;IAAA,iCAAA;ELosFV;;EK3sFM;IAOI,6BAAA;IAAA,gCAAA;ELysFV;;EKhtFM;IAOI,2BAAA;IAAA,8BAAA;EL8sFV;;EKrtFM;IAOI,6BAAA;IAAA,gCAAA;ELmtFV;;EK1tFM;IAOI,2BAAA;IAAA,8BAAA;ELwtFV;;EK/tFM;IAOI,2BAAA;IAAA,8BAAA;EL6tFV;;EKpuFM;IAOI,wBAAA;ELiuFV;;EKxuFM;IAOI,8BAAA;ELquFV;;EK5uFM;IAOI,6BAAA;ELyuFV;;EKhvFM;IAOI,2BAAA;EL6uFV;;EKpvFM;IAOI,6BAAA;ELivFV;;EKxvFM;IAOI,2BAAA;ELqvFV;;EK5vFM;IAOI,2BAAA;ELyvFV;;EKhwFM;IAOI,yBAAA;EL6vFV;;EKpwFM;IAOI,+BAAA;ELiwFV;;EKxwFM;IAOI,8BAAA;ELqwFV;;EK5wFM;IAOI,4BAAA;ELywFV;;EKhxFM;IAOI,8BAAA;EL6wFV;;EKpxFM;IAOI,4BAAA;ELixFV;;EKxxFM;IAOI,4BAAA;ELqxFV;;EK5xFM;IAOI,2BAAA;ELyxFV;;EKhyFM;IAOI,iCAAA;EL6xFV;;EKpyFM;IAOI,gCAAA;ELiyFV;;EKxyFM;IAOI,8BAAA;ELqyFV;;EK5yFM;IAOI,gCAAA;ELyyFV;;EKhzFM;IAOI,8BAAA;EL6yFV;;EKpzFM;IAOI,8BAAA;ELizFV;;EKxzFM;IAOI,0BAAA;ELqzFV;;EK5zFM;IAOI,gCAAA;ELyzFV;;EKh0FM;IAOI,+BAAA;EL6zFV;;EKp0FM;IAOI,6BAAA;ELi0FV;;EKx0FM;IAOI,+BAAA;ELq0FV;;EK50FM;IAOI,6BAAA;ELy0FV;;EKh1FM;IAOI,6BAAA;EL60FV;;EKp1FM;IAOI,qBAAA;ELi1FV;;EKx1FM;IAOI,2BAAA;ELq1FV;;EK51FM;IAOI,0BAAA;ELy1FV;;EKh2FM;IAOI,wBAAA;EL61FV;;EKp2FM;IAOI,0BAAA;ELi2FV;;EKx2FM;IAOI,wBAAA;ELq2FV;;EK52FM;IAOI,0BAAA;IAAA,2BAAA;EL02FV;;EKj3FM;IAOI,gCAAA;IAAA,iCAAA;EL+2FV;;EKt3FM;IAOI,+BAAA;IAAA,gCAAA;ELo3FV;;EK33FM;IAOI,6BAAA;IAAA,8BAAA;ELy3FV;;EKh4FM;IAOI,+BAAA;IAAA,gCAAA;EL83FV;;EKr4FM;IAOI,6BAAA;IAAA,8BAAA;ELm4FV;;EK14FM;IAOI,yBAAA;IAAA,4BAAA;ELw4FV;;EK/4FM;IAOI,+BAAA;IAAA,kCAAA;EL64FV;;EKp5FM;IAOI,8BAAA;IAAA,iCAAA;ELk5FV;;EKz5FM;IAOI,4BAAA;IAAA,+BAAA;ELu5FV;;EK95FM;IAOI,8BAAA;IAAA,iCAAA;EL45FV;;EKn6FM;IAOI,4BAAA;IAAA,+BAAA;ELi6FV;;EKx6FM;IAOI,yBAAA;ELq6FV;;EK56FM;IAOI,+BAAA;ELy6FV;;EKh7FM;IAOI,8BAAA;EL66FV;;EKp7FM;IAOI,4BAAA;ELi7FV;;EKx7FM;IAOI,8BAAA;ELq7FV;;EK57FM;IAOI,4BAAA;ELy7FV;;EKh8FM;IAOI,0BAAA;EL67FV;;EKp8FM;IAOI,gCAAA;ELi8FV;;EKx8FM;IAOI,+BAAA;ELq8FV;;EK58FM;IAOI,6BAAA;ELy8FV;;EKh9FM;IAOI,+BAAA;EL68FV;;EKp9FM;IAOI,6BAAA;ELi9FV;;EKx9FM;IAOI,4BAAA;ELq9FV;;EK59FM;IAOI,kCAAA;ELy9FV;;EKh+FM;IAOI,iCAAA;EL69FV;;EKp+FM;IAOI,+BAAA;ELi+FV;;EKx+FM;IAOI,iCAAA;ELq+FV;;EK5+FM;IAOI,+BAAA;ELy+FV;;EKh/FM;IAOI,2BAAA;EL6+FV;;EKp/FM;IAOI,iCAAA;ELi/FV;;EKx/FM;IAOI,gCAAA;ELq/FV;;EK5/FM;IAOI,8BAAA;ELy/FV;;EKhgGM;IAOI,gCAAA;EL6/FV;;EKpgGM;IAOI,8BAAA;ELigGV;AACF;ACzgGI;EIAI;IAOI,0BAAA;ELsgGV;;EK7gGM;IAOI,gCAAA;EL0gGV;;EKjhGM;IAOI,yBAAA;EL8gGV;;EKrhGM;IAOI,wBAAA;ELkhGV;;EKzhGM;IAOI,yBAAA;ELshGV;;EK7hGM;IAOI,6BAAA;EL0hGV;;EKjiGM;IAOI,8BAAA;EL8hGV;;EKriGM;IAOI,wBAAA;ELkiGV;;EKziGM;IAOI,+BAAA;ELsiGV;;EK7iGM;IAOI,wBAAA;EL0iGV;;EKjjGM;IAOI,yBAAA;EL8iGV;;EKrjGM;IAOI,8BAAA;ELkjGV;;EKzjGM;IAOI,iCAAA;ELsjGV;;EK7jGM;IAOI,sCAAA;EL0jGV;;EKjkGM;IAOI,yCAAA;EL8jGV;;EKrkGM;IAOI,uBAAA;ELkkGV;;EKzkGM;IAOI,uBAAA;ELskGV;;EK7kGM;IAOI,yBAAA;EL0kGV;;EKjlGM;IAOI,yBAAA;EL8kGV;;EKrlGM;IAOI,0BAAA;ELklGV;;EKzlGM;IAOI,4BAAA;ELslGV;;EK7lGM;IAOI,kCAAA;EL0lGV;;EKjmGM;IAOI,sCAAA;EL8lGV;;EKrmGM;IAOI,oCAAA;ELkmGV;;EKzmGM;IAOI,kCAAA;ELsmGV;;EK7mGM;IAOI,yCAAA;EL0mGV;;EKjnGM;IAOI,wCAAA;EL8mGV;;EKrnGM;IAOI,wCAAA;ELknGV;;EKznGM;IAOI,kCAAA;ELsnGV;;EK7nGM;IAOI,gCAAA;EL0nGV;;EKjoGM;IAOI,8BAAA;EL8nGV;;EKroGM;IAOI,gCAAA;ELkoGV;;EKzoGM;IAOI,+BAAA;ELsoGV;;EK7oGM;IAOI,oCAAA;EL0oGV;;EKjpGM;IAOI,kCAAA;EL8oGV;;EKrpGM;IAOI,gCAAA;ELkpGV;;EKzpGM;IAOI,uCAAA;ELspGV;;EK7pGM;IAOI,sCAAA;EL0pGV;;EKjqGM;IAOI,iCAAA;EL8pGV;;EKrqGM;IAOI,2BAAA;ELkqGV;;EKzqGM;IAOI,iCAAA;ELsqGV;;EK7qGM;IAOI,+BAAA;EL0qGV;;EKjrGM;IAOI,6BAAA;EL8qGV;;EKrrGM;IAOI,+BAAA;ELkrGV;;EKzrGM;IAOI,8BAAA;ELsrGV;;EK7rGM;IAOI,oBAAA;EL0rGV;;EKjsGM;IAOI,mBAAA;EL8rGV;;EKrsGM;IAOI,mBAAA;ELksGV;;EKzsGM;IAOI,mBAAA;ELssGV;;EK7sGM;IAOI,mBAAA;EL0sGV;;EKjtGM;IAOI,mBAAA;EL8sGV;;EKrtGM;IAOI,mBAAA;ELktGV;;EKztGM;IAOI,mBAAA;ELstGV;;EK7tGM;IAOI,oBAAA;EL0tGV;;EKjuGM;IAOI,0BAAA;EL8tGV;;EKruGM;IAOI,yBAAA;ELkuGV;;EKzuGM;IAOI,uBAAA;ELsuGV;;EK7uGM;IAOI,yBAAA;EL0uGV;;EKjvGM;IAOI,uBAAA;EL8uGV;;EKrvGM;IAOI,uBAAA;ELkvGV;;EKzvGM;IAOI,yBAAA;IAAA,0BAAA;ELuvGV;;EK9vGM;IAOI,+BAAA;IAAA,gCAAA;EL4vGV;;EKnwGM;IAOI,8BAAA;IAAA,+BAAA;ELiwGV;;EKxwGM;IAOI,4BAAA;IAAA,6BAAA;ELswGV;;EK7wGM;IAOI,8BAAA;IAAA,+BAAA;EL2wGV;;EKlxGM;IAOI,4BAAA;IAAA,6BAAA;ELgxGV;;EKvxGM;IAOI,4BAAA;IAAA,6BAAA;ELqxGV;;EK5xGM;IAOI,wBAAA;IAAA,2BAAA;EL0xGV;;EKjyGM;IAOI,8BAAA;IAAA,iCAAA;EL+xGV;;EKtyGM;IAOI,6BAAA;IAAA,gCAAA;ELoyGV;;EK3yGM;IAOI,2BAAA;IAAA,8BAAA;ELyyGV;;EKhzGM;IAOI,6BAAA;IAAA,gCAAA;EL8yGV;;EKrzGM;IAOI,2BAAA;IAAA,8BAAA;ELmzGV;;EK1zGM;IAOI,2BAAA;IAAA,8BAAA;ELwzGV;;EK/zGM;IAOI,wBAAA;EL4zGV;;EKn0GM;IAOI,8BAAA;ELg0GV;;EKv0GM;IAOI,6BAAA;ELo0GV;;EK30GM;IAOI,2BAAA;ELw0GV;;EK/0GM;IAOI,6BAAA;EL40GV;;EKn1GM;IAOI,2BAAA;ELg1GV;;EKv1GM;IAOI,2BAAA;ELo1GV;;EK31GM;IAOI,yBAAA;ELw1GV;;EK/1GM;IAOI,+BAAA;EL41GV;;EKn2GM;IAOI,8BAAA;ELg2GV;;EKv2GM;IAOI,4BAAA;ELo2GV;;EK32GM;IAOI,8BAAA;ELw2GV;;EK/2GM;IAOI,4BAAA;EL42GV;;EKn3GM;IAOI,4BAAA;ELg3GV;;EKv3GM;IAOI,2BAAA;ELo3GV;;EK33GM;IAOI,iCAAA;ELw3GV;;EK/3GM;IAOI,gCAAA;EL43GV;;EKn4GM;IAOI,8BAAA;ELg4GV;;EKv4GM;IAOI,gCAAA;ELo4GV;;EK34GM;IAOI,8BAAA;ELw4GV;;EK/4GM;IAOI,8BAAA;EL44GV;;EKn5GM;IAOI,0BAAA;ELg5GV;;EKv5GM;IAOI,gCAAA;ELo5GV;;EK35GM;IAOI,+BAAA;ELw5GV;;EK/5GM;IAOI,6BAAA;EL45GV;;EKn6GM;IAOI,+BAAA;ELg6GV;;EKv6GM;IAOI,6BAAA;ELo6GV;;EK36GM;IAOI,6BAAA;ELw6GV;;EK/6GM;IAOI,qBAAA;EL46GV;;EKn7GM;IAOI,2BAAA;ELg7GV;;EKv7GM;IAOI,0BAAA;ELo7GV;;EK37GM;IAOI,wBAAA;ELw7GV;;EK/7GM;IAOI,0BAAA;EL47GV;;EKn8GM;IAOI,wBAAA;ELg8GV;;EKv8GM;IAOI,0BAAA;IAAA,2BAAA;ELq8GV;;EK58GM;IAOI,gCAAA;IAAA,iCAAA;EL08GV;;EKj9GM;IAOI,+BAAA;IAAA,gCAAA;EL+8GV;;EKt9GM;IAOI,6BAAA;IAAA,8BAAA;ELo9GV;;EK39GM;IAOI,+BAAA;IAAA,gCAAA;ELy9GV;;EKh+GM;IAOI,6BAAA;IAAA,8BAAA;EL89GV;;EKr+GM;IAOI,yBAAA;IAAA,4BAAA;ELm+GV;;EK1+GM;IAOI,+BAAA;IAAA,kCAAA;ELw+GV;;EK/+GM;IAOI,8BAAA;IAAA,iCAAA;EL6+GV;;EKp/GM;IAOI,4BAAA;IAAA,+BAAA;ELk/GV;;EKz/GM;IAOI,8BAAA;IAAA,iCAAA;ELu/GV;;EK9/GM;IAOI,4BAAA;IAAA,+BAAA;EL4/GV;;EKngHM;IAOI,yBAAA;ELggHV;;EKvgHM;IAOI,+BAAA;ELogHV;;EK3gHM;IAOI,8BAAA;ELwgHV;;EK/gHM;IAOI,4BAAA;EL4gHV;;EKnhHM;IAOI,8BAAA;ELghHV;;EKvhHM;IAOI,4BAAA;ELohHV;;EK3hHM;IAOI,0BAAA;ELwhHV;;EK/hHM;IAOI,gCAAA;EL4hHV;;EKniHM;IAOI,+BAAA;ELgiHV;;EKviHM;IAOI,6BAAA;ELoiHV;;EK3iHM;IAOI,+BAAA;ELwiHV;;EK/iHM;IAOI,6BAAA;EL4iHV;;EKnjHM;IAOI,4BAAA;ELgjHV;;EKvjHM;IAOI,kCAAA;ELojHV;;EK3jHM;IAOI,iCAAA;ELwjHV;;EK/jHM;IAOI,+BAAA;EL4jHV;;EKnkHM;IAOI,iCAAA;ELgkHV;;EKvkHM;IAOI,+BAAA;ELokHV;;EK3kHM;IAOI,2BAAA;ELwkHV;;EK/kHM;IAOI,iCAAA;EL4kHV;;EKnlHM;IAOI,gCAAA;ELglHV;;EKvlHM;IAOI,8BAAA;ELolHV;;EK3lHM;IAOI,gCAAA;ELwlHV;;EK/lHM;IAOI,8BAAA;EL4lHV;AACF;ACpmHI;EIAI;IAOI,0BAAA;ELimHV;;EKxmHM;IAOI,gCAAA;ELqmHV;;EK5mHM;IAOI,yBAAA;ELymHV;;EKhnHM;IAOI,wBAAA;EL6mHV;;EKpnHM;IAOI,yBAAA;ELinHV;;EKxnHM;IAOI,6BAAA;ELqnHV;;EK5nHM;IAOI,8BAAA;ELynHV;;EKhoHM;IAOI,wBAAA;EL6nHV;;EKpoHM;IAOI,+BAAA;ELioHV;;EKxoHM;IAOI,wBAAA;ELqoHV;;EK5oHM;IAOI,yBAAA;ELyoHV;;EKhpHM;IAOI,8BAAA;EL6oHV;;EKppHM;IAOI,iCAAA;ELipHV;;EKxpHM;IAOI,sCAAA;ELqpHV;;EK5pHM;IAOI,yCAAA;ELypHV;;EKhqHM;IAOI,uBAAA;EL6pHV;;EKpqHM;IAOI,uBAAA;ELiqHV;;EKxqHM;IAOI,yBAAA;ELqqHV;;EK5qHM;IAOI,yBAAA;ELyqHV;;EKhrHM;IAOI,0BAAA;EL6qHV;;EKprHM;IAOI,4BAAA;ELirHV;;EKxrHM;IAOI,kCAAA;ELqrHV;;EK5rHM;IAOI,sCAAA;ELyrHV;;EKhsHM;IAOI,oCAAA;EL6rHV;;EKpsHM;IAOI,kCAAA;ELisHV;;EKxsHM;IAOI,yCAAA;ELqsHV;;EK5sHM;IAOI,wCAAA;ELysHV;;EKhtHM;IAOI,wCAAA;EL6sHV;;EKptHM;IAOI,kCAAA;ELitHV;;EKxtHM;IAOI,gCAAA;ELqtHV;;EK5tHM;IAOI,8BAAA;ELytHV;;EKhuHM;IAOI,gCAAA;EL6tHV;;EKpuHM;IAOI,+BAAA;ELiuHV;;EKxuHM;IAOI,oCAAA;ELquHV;;EK5uHM;IAOI,kCAAA;ELyuHV;;EKhvHM;IAOI,gCAAA;EL6uHV;;EKpvHM;IAOI,uCAAA;ELivHV;;EKxvHM;IAOI,sCAAA;ELqvHV;;EK5vHM;IAOI,iCAAA;ELyvHV;;EKhwHM;IAOI,2BAAA;EL6vHV;;EKpwHM;IAOI,iCAAA;ELiwHV;;EKxwHM;IAOI,+BAAA;ELqwHV;;EK5wHM;IAOI,6BAAA;ELywHV;;EKhxHM;IAOI,+BAAA;EL6wHV;;EKpxHM;IAOI,8BAAA;ELixHV;;EKxxHM;IAOI,oBAAA;ELqxHV;;EK5xHM;IAOI,mBAAA;ELyxHV;;EKhyHM;IAOI,mBAAA;EL6xHV;;EKpyHM;IAOI,mBAAA;ELiyHV;;EKxyHM;IAOI,mBAAA;ELqyHV;;EK5yHM;IAOI,mBAAA;ELyyHV;;EKhzHM;IAOI,mBAAA;EL6yHV;;EKpzHM;IAOI,mBAAA;ELizHV;;EKxzHM;IAOI,oBAAA;ELqzHV;;EK5zHM;IAOI,0BAAA;ELyzHV;;EKh0HM;IAOI,yBAAA;EL6zHV;;EKp0HM;IAOI,uBAAA;ELi0HV;;EKx0HM;IAOI,yBAAA;ELq0HV;;EK50HM;IAOI,uBAAA;ELy0HV;;EKh1HM;IAOI,uBAAA;EL60HV;;EKp1HM;IAOI,yBAAA;IAAA,0BAAA;ELk1HV;;EKz1HM;IAOI,+BAAA;IAAA,gCAAA;ELu1HV;;EK91HM;IAOI,8BAAA;IAAA,+BAAA;EL41HV;;EKn2HM;IAOI,4BAAA;IAAA,6BAAA;ELi2HV;;EKx2HM;IAOI,8BAAA;IAAA,+BAAA;ELs2HV;;EK72HM;IAOI,4BAAA;IAAA,6BAAA;EL22HV;;EKl3HM;IAOI,4BAAA;IAAA,6BAAA;ELg3HV;;EKv3HM;IAOI,wBAAA;IAAA,2BAAA;ELq3HV;;EK53HM;IAOI,8BAAA;IAAA,iCAAA;EL03HV;;EKj4HM;IAOI,6BAAA;IAAA,gCAAA;EL+3HV;;EKt4HM;IAOI,2BAAA;IAAA,8BAAA;ELo4HV;;EK34HM;IAOI,6BAAA;IAAA,gCAAA;ELy4HV;;EKh5HM;IAOI,2BAAA;IAAA,8BAAA;EL84HV;;EKr5HM;IAOI,2BAAA;IAAA,8BAAA;ELm5HV;;EK15HM;IAOI,wBAAA;ELu5HV;;EK95HM;IAOI,8BAAA;EL25HV;;EKl6HM;IAOI,6BAAA;EL+5HV;;EKt6HM;IAOI,2BAAA;ELm6HV;;EK16HM;IAOI,6BAAA;ELu6HV;;EK96HM;IAOI,2BAAA;EL26HV;;EKl7HM;IAOI,2BAAA;EL+6HV;;EKt7HM;IAOI,yBAAA;ELm7HV;;EK17HM;IAOI,+BAAA;ELu7HV;;EK97HM;IAOI,8BAAA;EL27HV;;EKl8HM;IAOI,4BAAA;EL+7HV;;EKt8HM;IAOI,8BAAA;ELm8HV;;EK18HM;IAOI,4BAAA;ELu8HV;;EK98HM;IAOI,4BAAA;EL28HV;;EKl9HM;IAOI,2BAAA;EL+8HV;;EKt9HM;IAOI,iCAAA;ELm9HV;;EK19HM;IAOI,gCAAA;ELu9HV;;EK99HM;IAOI,8BAAA;EL29HV;;EKl+HM;IAOI,gCAAA;EL+9HV;;EKt+HM;IAOI,8BAAA;ELm+HV;;EK1+HM;IAOI,8BAAA;ELu+HV;;EK9+HM;IAOI,0BAAA;EL2+HV;;EKl/HM;IAOI,gCAAA;EL++HV;;EKt/HM;IAOI,+BAAA;ELm/HV;;EK1/HM;IAOI,6BAAA;ELu/HV;;EK9/HM;IAOI,+BAAA;EL2/HV;;EKlgIM;IAOI,6BAAA;EL+/HV;;EKtgIM;IAOI,6BAAA;ELmgIV;;EK1gIM;IAOI,qBAAA;ELugIV;;EK9gIM;IAOI,2BAAA;EL2gIV;;EKlhIM;IAOI,0BAAA;EL+gIV;;EKthIM;IAOI,wBAAA;ELmhIV;;EK1hIM;IAOI,0BAAA;ELuhIV;;EK9hIM;IAOI,wBAAA;EL2hIV;;EKliIM;IAOI,0BAAA;IAAA,2BAAA;ELgiIV;;EKviIM;IAOI,gCAAA;IAAA,iCAAA;ELqiIV;;EK5iIM;IAOI,+BAAA;IAAA,gCAAA;EL0iIV;;EKjjIM;IAOI,6BAAA;IAAA,8BAAA;EL+iIV;;EKtjIM;IAOI,+BAAA;IAAA,gCAAA;ELojIV;;EK3jIM;IAOI,6BAAA;IAAA,8BAAA;ELyjIV;;EKhkIM;IAOI,yBAAA;IAAA,4BAAA;EL8jIV;;EKrkIM;IAOI,+BAAA;IAAA,kCAAA;ELmkIV;;EK1kIM;IAOI,8BAAA;IAAA,iCAAA;ELwkIV;;EK/kIM;IAOI,4BAAA;IAAA,+BAAA;EL6kIV;;EKplIM;IAOI,8BAAA;IAAA,iCAAA;ELklIV;;EKzlIM;IAOI,4BAAA;IAAA,+BAAA;ELulIV;;EK9lIM;IAOI,yBAAA;EL2lIV;;EKlmIM;IAOI,+BAAA;EL+lIV;;EKtmIM;IAOI,8BAAA;ELmmIV;;EK1mIM;IAOI,4BAAA;ELumIV;;EK9mIM;IAOI,8BAAA;EL2mIV;;EKlnIM;IAOI,4BAAA;EL+mIV;;EKtnIM;IAOI,0BAAA;ELmnIV;;EK1nIM;IAOI,gCAAA;ELunIV;;EK9nIM;IAOI,+BAAA;EL2nIV;;EKloIM;IAOI,6BAAA;EL+nIV;;EKtoIM;IAOI,+BAAA;ELmoIV;;EK1oIM;IAOI,6BAAA;ELuoIV;;EK9oIM;IAOI,4BAAA;EL2oIV;;EKlpIM;IAOI,kCAAA;EL+oIV;;EKtpIM;IAOI,iCAAA;ELmpIV;;EK1pIM;IAOI,+BAAA;ELupIV;;EK9pIM;IAOI,iCAAA;EL2pIV;;EKlqIM;IAOI,+BAAA;EL+pIV;;EKtqIM;IAOI,2BAAA;ELmqIV;;EK1qIM;IAOI,iCAAA;ELuqIV;;EK9qIM;IAOI,gCAAA;EL2qIV;;EKlrIM;IAOI,8BAAA;EL+qIV;;EKtrIM;IAOI,gCAAA;ELmrIV;;EK1rIM;IAOI,8BAAA;ELurIV;AACF;AC/rII;EIAI;IAOI,0BAAA;EL4rIV;;EKnsIM;IAOI,gCAAA;ELgsIV;;EKvsIM;IAOI,yBAAA;ELosIV;;EK3sIM;IAOI,wBAAA;ELwsIV;;EK/sIM;IAOI,yBAAA;EL4sIV;;EKntIM;IAOI,6BAAA;ELgtIV;;EKvtIM;IAOI,8BAAA;ELotIV;;EK3tIM;IAOI,wBAAA;ELwtIV;;EK/tIM;IAOI,+BAAA;EL4tIV;;EKnuIM;IAOI,wBAAA;ELguIV;;EKvuIM;IAOI,yBAAA;ELouIV;;EK3uIM;IAOI,8BAAA;ELwuIV;;EK/uIM;IAOI,iCAAA;EL4uIV;;EKnvIM;IAOI,sCAAA;ELgvIV;;EKvvIM;IAOI,yCAAA;ELovIV;;EK3vIM;IAOI,uBAAA;ELwvIV;;EK/vIM;IAOI,uBAAA;EL4vIV;;EKnwIM;IAOI,yBAAA;ELgwIV;;EKvwIM;IAOI,yBAAA;ELowIV;;EK3wIM;IAOI,0BAAA;ELwwIV;;EK/wIM;IAOI,4BAAA;EL4wIV;;EKnxIM;IAOI,kCAAA;ELgxIV;;EKvxIM;IAOI,sCAAA;ELoxIV;;EK3xIM;IAOI,oCAAA;ELwxIV;;EK/xIM;IAOI,kCAAA;EL4xIV;;EKnyIM;IAOI,yCAAA;ELgyIV;;EKvyIM;IAOI,wCAAA;ELoyIV;;EK3yIM;IAOI,wCAAA;ELwyIV;;EK/yIM;IAOI,kCAAA;EL4yIV;;EKnzIM;IAOI,gCAAA;ELgzIV;;EKvzIM;IAOI,8BAAA;ELozIV;;EK3zIM;IAOI,gCAAA;ELwzIV;;EK/zIM;IAOI,+BAAA;EL4zIV;;EKn0IM;IAOI,oCAAA;ELg0IV;;EKv0IM;IAOI,kCAAA;ELo0IV;;EK30IM;IAOI,gCAAA;ELw0IV;;EK/0IM;IAOI,uCAAA;EL40IV;;EKn1IM;IAOI,sCAAA;ELg1IV;;EKv1IM;IAOI,iCAAA;ELo1IV;;EK31IM;IAOI,2BAAA;ELw1IV;;EK/1IM;IAOI,iCAAA;EL41IV;;EKn2IM;IAOI,+BAAA;ELg2IV;;EKv2IM;IAOI,6BAAA;ELo2IV;;EK32IM;IAOI,+BAAA;ELw2IV;;EK/2IM;IAOI,8BAAA;EL42IV;;EKn3IM;IAOI,oBAAA;ELg3IV;;EKv3IM;IAOI,mBAAA;ELo3IV;;EK33IM;IAOI,mBAAA;ELw3IV;;EK/3IM;IAOI,mBAAA;EL43IV;;EKn4IM;IAOI,mBAAA;ELg4IV;;EKv4IM;IAOI,mBAAA;ELo4IV;;EK34IM;IAOI,mBAAA;ELw4IV;;EK/4IM;IAOI,mBAAA;EL44IV;;EKn5IM;IAOI,oBAAA;ELg5IV;;EKv5IM;IAOI,0BAAA;ELo5IV;;EK35IM;IAOI,yBAAA;ELw5IV;;EK/5IM;IAOI,uBAAA;EL45IV;;EKn6IM;IAOI,yBAAA;ELg6IV;;EKv6IM;IAOI,uBAAA;ELo6IV;;EK36IM;IAOI,uBAAA;ELw6IV;;EK/6IM;IAOI,yBAAA;IAAA,0BAAA;EL66IV;;EKp7IM;IAOI,+BAAA;IAAA,gCAAA;ELk7IV;;EKz7IM;IAOI,8BAAA;IAAA,+BAAA;ELu7IV;;EK97IM;IAOI,4BAAA;IAAA,6BAAA;EL47IV;;EKn8IM;IAOI,8BAAA;IAAA,+BAAA;ELi8IV;;EKx8IM;IAOI,4BAAA;IAAA,6BAAA;ELs8IV;;EK78IM;IAOI,4BAAA;IAAA,6BAAA;EL28IV;;EKl9IM;IAOI,wBAAA;IAAA,2BAAA;ELg9IV;;EKv9IM;IAOI,8BAAA;IAAA,iCAAA;ELq9IV;;EK59IM;IAOI,6BAAA;IAAA,gCAAA;EL09IV;;EKj+IM;IAOI,2BAAA;IAAA,8BAAA;EL+9IV;;EKt+IM;IAOI,6BAAA;IAAA,gCAAA;ELo+IV;;EK3+IM;IAOI,2BAAA;IAAA,8BAAA;ELy+IV;;EKh/IM;IAOI,2BAAA;IAAA,8BAAA;EL8+IV;;EKr/IM;IAOI,wBAAA;ELk/IV;;EKz/IM;IAOI,8BAAA;ELs/IV;;EK7/IM;IAOI,6BAAA;EL0/IV;;EKjgJM;IAOI,2BAAA;EL8/IV;;EKrgJM;IAOI,6BAAA;ELkgJV;;EKzgJM;IAOI,2BAAA;ELsgJV;;EK7gJM;IAOI,2BAAA;EL0gJV;;EKjhJM;IAOI,yBAAA;EL8gJV;;EKrhJM;IAOI,+BAAA;ELkhJV;;EKzhJM;IAOI,8BAAA;ELshJV;;EK7hJM;IAOI,4BAAA;EL0hJV;;EKjiJM;IAOI,8BAAA;EL8hJV;;EKriJM;IAOI,4BAAA;ELkiJV;;EKziJM;IAOI,4BAAA;ELsiJV;;EK7iJM;IAOI,2BAAA;EL0iJV;;EKjjJM;IAOI,iCAAA;EL8iJV;;EKrjJM;IAOI,gCAAA;ELkjJV;;EKzjJM;IAOI,8BAAA;ELsjJV;;EK7jJM;IAOI,gCAAA;EL0jJV;;EKjkJM;IAOI,8BAAA;EL8jJV;;EKrkJM;IAOI,8BAAA;ELkkJV;;EKzkJM;IAOI,0BAAA;ELskJV;;EK7kJM;IAOI,gCAAA;EL0kJV;;EKjlJM;IAOI,+BAAA;EL8kJV;;EKrlJM;IAOI,6BAAA;ELklJV;;EKzlJM;IAOI,+BAAA;ELslJV;;EK7lJM;IAOI,6BAAA;EL0lJV;;EKjmJM;IAOI,6BAAA;EL8lJV;;EKrmJM;IAOI,qBAAA;ELkmJV;;EKzmJM;IAOI,2BAAA;ELsmJV;;EK7mJM;IAOI,0BAAA;EL0mJV;;EKjnJM;IAOI,wBAAA;EL8mJV;;EKrnJM;IAOI,0BAAA;ELknJV;;EKznJM;IAOI,wBAAA;ELsnJV;;EK7nJM;IAOI,0BAAA;IAAA,2BAAA;EL2nJV;;EKloJM;IAOI,gCAAA;IAAA,iCAAA;ELgoJV;;EKvoJM;IAOI,+BAAA;IAAA,gCAAA;ELqoJV;;EK5oJM;IAOI,6BAAA;IAAA,8BAAA;EL0oJV;;EKjpJM;IAOI,+BAAA;IAAA,gCAAA;EL+oJV;;EKtpJM;IAOI,6BAAA;IAAA,8BAAA;ELopJV;;EK3pJM;IAOI,yBAAA;IAAA,4BAAA;ELypJV;;EKhqJM;IAOI,+BAAA;IAAA,kCAAA;EL8pJV;;EKrqJM;IAOI,8BAAA;IAAA,iCAAA;ELmqJV;;EK1qJM;IAOI,4BAAA;IAAA,+BAAA;ELwqJV;;EK/qJM;IAOI,8BAAA;IAAA,iCAAA;EL6qJV;;EKprJM;IAOI,4BAAA;IAAA,+BAAA;ELkrJV;;EKzrJM;IAOI,yBAAA;ELsrJV;;EK7rJM;IAOI,+BAAA;EL0rJV;;EKjsJM;IAOI,8BAAA;EL8rJV;;EKrsJM;IAOI,4BAAA;ELksJV;;EKzsJM;IAOI,8BAAA;ELssJV;;EK7sJM;IAOI,4BAAA;EL0sJV;;EKjtJM;IAOI,0BAAA;EL8sJV;;EKrtJM;IAOI,gCAAA;ELktJV;;EKztJM;IAOI,+BAAA;ELstJV;;EK7tJM;IAOI,6BAAA;EL0tJV;;EKjuJM;IAOI,+BAAA;EL8tJV;;EKruJM;IAOI,6BAAA;ELkuJV;;EKzuJM;IAOI,4BAAA;ELsuJV;;EK7uJM;IAOI,kCAAA;EL0uJV;;EKjvJM;IAOI,iCAAA;EL8uJV;;EKrvJM;IAOI,+BAAA;ELkvJV;;EKzvJM;IAOI,iCAAA;ELsvJV;;EK7vJM;IAOI,+BAAA;EL0vJV;;EKjwJM;IAOI,2BAAA;EL8vJV;;EKrwJM;IAOI,iCAAA;ELkwJV;;EKzwJM;IAOI,gCAAA;ELswJV;;EK7wJM;IAOI,8BAAA;EL0wJV;;EKjxJM;IAOI,gCAAA;EL8wJV;;EKrxJM;IAOI,8BAAA;ELkxJV;AACF;AMnzJA;EDyBQ;IAOI,0BAAA;ELuxJV;;EK9xJM;IAOI,gCAAA;EL2xJV;;EKlyJM;IAOI,yBAAA;EL+xJV;;EKtyJM;IAOI,wBAAA;ELmyJV;;EK1yJM;IAOI,yBAAA;ELuyJV;;EK9yJM;IAOI,6BAAA;EL2yJV;;EKlzJM;IAOI,8BAAA;EL+yJV;;EKtzJM;IAOI,wBAAA;ELmzJV;;EK1zJM;IAOI,+BAAA;ELuzJV;;EK9zJM;IAOI,wBAAA;EL2zJV;AACF","file":"bootstrap-grid.rtl.css","sourcesContent":["/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n\n$include-column-box-sizing: true !default;\n\n@import \"functions\";\n@import \"variables\";\n\n@import \"mixins/lists\";\n@import \"mixins/breakpoints\";\n@import \"mixins/container\";\n@import \"mixins/grid\";\n@import \"mixins/utilities\";\n\n@import \"vendor/rfs\";\n\n@import \"containers\";\n@import \"grid\";\n\n@import \"utilities\";\n// Only use the utilities we need\n// stylelint-disable-next-line scss/dollar-variable-default\n$utilities: map-get-multiple(\n $utilities,\n (\n \"display\",\n \"order\",\n \"flex\",\n \"flex-direction\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"justify-content\",\n \"align-items\",\n \"align-content\",\n \"align-self\",\n \"margin\",\n \"margin-x\",\n \"margin-y\",\n \"margin-top\",\n \"margin-end\",\n \"margin-bottom\",\n \"margin-start\",\n \"negative-margin\",\n \"negative-margin-x\",\n \"negative-margin-y\",\n \"negative-margin-top\",\n \"negative-margin-end\",\n \"negative-margin-bottom\",\n \"negative-margin-start\",\n \"padding\",\n \"padding-x\",\n \"padding-y\",\n \"padding-top\",\n \"padding-end\",\n \"padding-bottom\",\n \"padding-start\",\n )\n);\n\n@import \"utilities/api\";\n","// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n@if $enable-grid-classes {\n // Single container class with breakpoint max-widths\n .container,\n // 100% wide container at all breakpoints\n .container-fluid {\n @include make-container();\n }\n\n // Responsive containers that are 100% wide until a breakpoint\n @each $breakpoint, $container-max-width in $container-max-widths {\n .container-#{$breakpoint} {\n @extend .container-fluid;\n }\n\n @include media-breakpoint-up($breakpoint, $grid-breakpoints) {\n %responsive-container-#{$breakpoint} {\n max-width: $container-max-width;\n }\n\n // Extend each breakpoint which is smaller or equal to the current breakpoint\n $extend-breakpoint: true;\n\n @each $name, $width in $grid-breakpoints {\n @if ($extend-breakpoint) {\n .container#{breakpoint-infix($name, $grid-breakpoints)} {\n @extend %responsive-container-#{$breakpoint};\n }\n\n // Once the current breakpoint is reached, stop extending\n @if ($breakpoint == $name) {\n $extend-breakpoint: false;\n }\n }\n }\n }\n }\n}\n","// Container mixins\n\n@mixin make-container($gutter: $container-padding-x) {\n width: 100%;\n padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter});\n padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter});\n margin-right: auto;\n margin-left: auto;\n}\n","/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n.container,\n.container-fluid,\n.container-xxl,\n.container-xl,\n.container-lg,\n.container-md,\n.container-sm {\n width: 100%;\n padding-right: var(--bs-gutter-x, 0.75rem);\n padding-left: var(--bs-gutter-x, 0.75rem);\n margin-right: auto;\n margin-left: auto;\n}\n\n@media (min-width: 576px) {\n .container-sm, .container {\n max-width: 540px;\n }\n}\n@media (min-width: 768px) {\n .container-md, .container-sm, .container {\n max-width: 720px;\n }\n}\n@media (min-width: 992px) {\n .container-lg, .container-md, .container-sm, .container {\n max-width: 960px;\n }\n}\n@media (min-width: 1200px) {\n .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1140px;\n }\n}\n@media (min-width: 1400px) {\n .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1320px;\n }\n}\n.row {\n --bs-gutter-x: 1.5rem;\n --bs-gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--bs-gutter-y) * -1);\n margin-right: calc(var(--bs-gutter-x) * -.5);\n margin-left: calc(var(--bs-gutter-x) * -.5);\n}\n.row > * {\n box-sizing: border-box;\n flex-shrink: 0;\n width: 100%;\n max-width: 100%;\n padding-right: calc(var(--bs-gutter-x) * .5);\n padding-left: calc(var(--bs-gutter-x) * .5);\n margin-top: var(--bs-gutter-y);\n}\n\n.col {\n flex: 1 0 0%;\n}\n\n.row-cols-auto > * {\n flex: 0 0 auto;\n width: auto;\n}\n\n.row-cols-1 > * {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.row-cols-2 > * {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.row-cols-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n}\n\n.row-cols-4 > * {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.row-cols-5 > * {\n flex: 0 0 auto;\n width: 20%;\n}\n\n.row-cols-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n}\n\n.col-auto {\n flex: 0 0 auto;\n width: auto;\n}\n\n.col-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n}\n\n.col-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n}\n\n.col-3 {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.col-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n}\n\n.col-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n}\n\n.col-6 {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.col-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n}\n\n.col-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n}\n\n.col-9 {\n flex: 0 0 auto;\n width: 75%;\n}\n\n.col-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n}\n\n.col-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n}\n\n.col-12 {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.offset-1 {\n margin-left: 8.33333333%;\n}\n\n.offset-2 {\n margin-left: 16.66666667%;\n}\n\n.offset-3 {\n margin-left: 25%;\n}\n\n.offset-4 {\n margin-left: 33.33333333%;\n}\n\n.offset-5 {\n margin-left: 41.66666667%;\n}\n\n.offset-6 {\n margin-left: 50%;\n}\n\n.offset-7 {\n margin-left: 58.33333333%;\n}\n\n.offset-8 {\n margin-left: 66.66666667%;\n}\n\n.offset-9 {\n margin-left: 75%;\n}\n\n.offset-10 {\n margin-left: 83.33333333%;\n}\n\n.offset-11 {\n margin-left: 91.66666667%;\n}\n\n.g-0,\n.gx-0 {\n --bs-gutter-x: 0;\n}\n\n.g-0,\n.gy-0 {\n --bs-gutter-y: 0;\n}\n\n.g-1,\n.gx-1 {\n --bs-gutter-x: 0.25rem;\n}\n\n.g-1,\n.gy-1 {\n --bs-gutter-y: 0.25rem;\n}\n\n.g-2,\n.gx-2 {\n --bs-gutter-x: 0.5rem;\n}\n\n.g-2,\n.gy-2 {\n --bs-gutter-y: 0.5rem;\n}\n\n.g-3,\n.gx-3 {\n --bs-gutter-x: 1rem;\n}\n\n.g-3,\n.gy-3 {\n --bs-gutter-y: 1rem;\n}\n\n.g-4,\n.gx-4 {\n --bs-gutter-x: 1.5rem;\n}\n\n.g-4,\n.gy-4 {\n --bs-gutter-y: 1.5rem;\n}\n\n.g-5,\n.gx-5 {\n --bs-gutter-x: 3rem;\n}\n\n.g-5,\n.gy-5 {\n --bs-gutter-y: 3rem;\n}\n\n@media (min-width: 576px) {\n .col-sm {\n flex: 1 0 0%;\n }\n\n .row-cols-sm-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-sm-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-sm-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-sm-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-sm-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-sm-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-sm-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-sm-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-sm-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-sm-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-sm-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-sm-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-sm-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-sm-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-sm-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-sm-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-sm-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-sm-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-sm-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-sm-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-sm-0 {\n margin-left: 0;\n }\n\n .offset-sm-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-sm-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-sm-3 {\n margin-left: 25%;\n }\n\n .offset-sm-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-sm-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-sm-6 {\n margin-left: 50%;\n }\n\n .offset-sm-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-sm-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-sm-9 {\n margin-left: 75%;\n }\n\n .offset-sm-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-sm-11 {\n margin-left: 91.66666667%;\n }\n\n .g-sm-0,\n.gx-sm-0 {\n --bs-gutter-x: 0;\n }\n\n .g-sm-0,\n.gy-sm-0 {\n --bs-gutter-y: 0;\n }\n\n .g-sm-1,\n.gx-sm-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-sm-1,\n.gy-sm-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-sm-2,\n.gx-sm-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-sm-2,\n.gy-sm-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-sm-3,\n.gx-sm-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-sm-3,\n.gy-sm-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-sm-4,\n.gx-sm-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-sm-4,\n.gy-sm-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-sm-5,\n.gx-sm-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-sm-5,\n.gy-sm-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 768px) {\n .col-md {\n flex: 1 0 0%;\n }\n\n .row-cols-md-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-md-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-md-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-md-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-md-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-md-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-md-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-md-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-md-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-md-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-md-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-md-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-md-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-md-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-md-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-md-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-md-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-md-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-md-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-md-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-md-0 {\n margin-left: 0;\n }\n\n .offset-md-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-md-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-md-3 {\n margin-left: 25%;\n }\n\n .offset-md-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-md-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-md-6 {\n margin-left: 50%;\n }\n\n .offset-md-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-md-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-md-9 {\n margin-left: 75%;\n }\n\n .offset-md-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-md-11 {\n margin-left: 91.66666667%;\n }\n\n .g-md-0,\n.gx-md-0 {\n --bs-gutter-x: 0;\n }\n\n .g-md-0,\n.gy-md-0 {\n --bs-gutter-y: 0;\n }\n\n .g-md-1,\n.gx-md-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-md-1,\n.gy-md-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-md-2,\n.gx-md-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-md-2,\n.gy-md-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-md-3,\n.gx-md-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-md-3,\n.gy-md-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-md-4,\n.gx-md-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-md-4,\n.gy-md-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-md-5,\n.gx-md-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-md-5,\n.gy-md-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 992px) {\n .col-lg {\n flex: 1 0 0%;\n }\n\n .row-cols-lg-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-lg-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-lg-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-lg-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-lg-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-lg-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-lg-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-lg-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-lg-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-lg-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-lg-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-lg-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-lg-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-lg-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-lg-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-lg-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-lg-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-lg-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-lg-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-lg-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-lg-0 {\n margin-left: 0;\n }\n\n .offset-lg-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-lg-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-lg-3 {\n margin-left: 25%;\n }\n\n .offset-lg-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-lg-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-lg-6 {\n margin-left: 50%;\n }\n\n .offset-lg-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-lg-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-lg-9 {\n margin-left: 75%;\n }\n\n .offset-lg-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-lg-11 {\n margin-left: 91.66666667%;\n }\n\n .g-lg-0,\n.gx-lg-0 {\n --bs-gutter-x: 0;\n }\n\n .g-lg-0,\n.gy-lg-0 {\n --bs-gutter-y: 0;\n }\n\n .g-lg-1,\n.gx-lg-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-lg-1,\n.gy-lg-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-lg-2,\n.gx-lg-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-lg-2,\n.gy-lg-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-lg-3,\n.gx-lg-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-lg-3,\n.gy-lg-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-lg-4,\n.gx-lg-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-lg-4,\n.gy-lg-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-lg-5,\n.gx-lg-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-lg-5,\n.gy-lg-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1200px) {\n .col-xl {\n flex: 1 0 0%;\n }\n\n .row-cols-xl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xl-0 {\n margin-left: 0;\n }\n\n .offset-xl-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-xl-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-xl-3 {\n margin-left: 25%;\n }\n\n .offset-xl-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-xl-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-xl-6 {\n margin-left: 50%;\n }\n\n .offset-xl-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-xl-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-xl-9 {\n margin-left: 75%;\n }\n\n .offset-xl-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-xl-11 {\n margin-left: 91.66666667%;\n }\n\n .g-xl-0,\n.gx-xl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xl-0,\n.gy-xl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xl-1,\n.gx-xl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xl-1,\n.gy-xl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xl-2,\n.gx-xl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xl-2,\n.gy-xl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xl-3,\n.gx-xl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xl-3,\n.gy-xl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xl-4,\n.gx-xl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xl-4,\n.gy-xl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xl-5,\n.gx-xl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xl-5,\n.gy-xl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1400px) {\n .col-xxl {\n flex: 1 0 0%;\n }\n\n .row-cols-xxl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xxl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xxl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xxl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xxl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xxl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xxl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xxl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xxl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xxl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xxl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xxl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xxl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xxl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xxl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xxl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xxl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xxl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xxl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xxl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xxl-0 {\n margin-left: 0;\n }\n\n .offset-xxl-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-xxl-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-xxl-3 {\n margin-left: 25%;\n }\n\n .offset-xxl-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-xxl-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-xxl-6 {\n margin-left: 50%;\n }\n\n .offset-xxl-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-xxl-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-xxl-9 {\n margin-left: 75%;\n }\n\n .offset-xxl-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-xxl-11 {\n margin-left: 91.66666667%;\n }\n\n .g-xxl-0,\n.gx-xxl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xxl-0,\n.gy-xxl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xxl-1,\n.gx-xxl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xxl-1,\n.gy-xxl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xxl-2,\n.gx-xxl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xxl-2,\n.gy-xxl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xxl-3,\n.gx-xxl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xxl-3,\n.gy-xxl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xxl-4,\n.gx-xxl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xxl-4,\n.gy-xxl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xxl-5,\n.gx-xxl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xxl-5,\n.gy-xxl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n.d-inline {\n display: inline !important;\n}\n\n.d-inline-block {\n display: inline-block !important;\n}\n\n.d-block {\n display: block !important;\n}\n\n.d-grid {\n display: grid !important;\n}\n\n.d-table {\n display: table !important;\n}\n\n.d-table-row {\n display: table-row !important;\n}\n\n.d-table-cell {\n display: table-cell !important;\n}\n\n.d-flex {\n display: flex !important;\n}\n\n.d-inline-flex {\n display: inline-flex !important;\n}\n\n.d-none {\n display: none !important;\n}\n\n.flex-fill {\n flex: 1 1 auto !important;\n}\n\n.flex-row {\n flex-direction: row !important;\n}\n\n.flex-column {\n flex-direction: column !important;\n}\n\n.flex-row-reverse {\n flex-direction: row-reverse !important;\n}\n\n.flex-column-reverse {\n flex-direction: column-reverse !important;\n}\n\n.flex-grow-0 {\n flex-grow: 0 !important;\n}\n\n.flex-grow-1 {\n flex-grow: 1 !important;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0 !important;\n}\n\n.flex-shrink-1 {\n flex-shrink: 1 !important;\n}\n\n.flex-wrap {\n flex-wrap: wrap !important;\n}\n\n.flex-nowrap {\n flex-wrap: nowrap !important;\n}\n\n.flex-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n}\n\n.justify-content-start {\n justify-content: flex-start !important;\n}\n\n.justify-content-end {\n justify-content: flex-end !important;\n}\n\n.justify-content-center {\n justify-content: center !important;\n}\n\n.justify-content-between {\n justify-content: space-between !important;\n}\n\n.justify-content-around {\n justify-content: space-around !important;\n}\n\n.justify-content-evenly {\n justify-content: space-evenly !important;\n}\n\n.align-items-start {\n align-items: flex-start !important;\n}\n\n.align-items-end {\n align-items: flex-end !important;\n}\n\n.align-items-center {\n align-items: center !important;\n}\n\n.align-items-baseline {\n align-items: baseline !important;\n}\n\n.align-items-stretch {\n align-items: stretch !important;\n}\n\n.align-content-start {\n align-content: flex-start !important;\n}\n\n.align-content-end {\n align-content: flex-end !important;\n}\n\n.align-content-center {\n align-content: center !important;\n}\n\n.align-content-between {\n align-content: space-between !important;\n}\n\n.align-content-around {\n align-content: space-around !important;\n}\n\n.align-content-stretch {\n align-content: stretch !important;\n}\n\n.align-self-auto {\n align-self: auto !important;\n}\n\n.align-self-start {\n align-self: flex-start !important;\n}\n\n.align-self-end {\n align-self: flex-end !important;\n}\n\n.align-self-center {\n align-self: center !important;\n}\n\n.align-self-baseline {\n align-self: baseline !important;\n}\n\n.align-self-stretch {\n align-self: stretch !important;\n}\n\n.order-first {\n order: -1 !important;\n}\n\n.order-0 {\n order: 0 !important;\n}\n\n.order-1 {\n order: 1 !important;\n}\n\n.order-2 {\n order: 2 !important;\n}\n\n.order-3 {\n order: 3 !important;\n}\n\n.order-4 {\n order: 4 !important;\n}\n\n.order-5 {\n order: 5 !important;\n}\n\n.order-last {\n order: 6 !important;\n}\n\n.m-0 {\n margin: 0 !important;\n}\n\n.m-1 {\n margin: 0.25rem !important;\n}\n\n.m-2 {\n margin: 0.5rem !important;\n}\n\n.m-3 {\n margin: 1rem !important;\n}\n\n.m-4 {\n margin: 1.5rem !important;\n}\n\n.m-5 {\n margin: 3rem !important;\n}\n\n.m-auto {\n margin: auto !important;\n}\n\n.mx-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n}\n\n.mx-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n}\n\n.mx-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n}\n\n.mx-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n}\n\n.mx-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n}\n\n.mx-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n}\n\n.mx-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n}\n\n.my-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n}\n\n.my-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n}\n\n.my-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n}\n\n.my-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n}\n\n.my-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n}\n\n.my-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n}\n\n.my-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n}\n\n.mt-0 {\n margin-top: 0 !important;\n}\n\n.mt-1 {\n margin-top: 0.25rem !important;\n}\n\n.mt-2 {\n margin-top: 0.5rem !important;\n}\n\n.mt-3 {\n margin-top: 1rem !important;\n}\n\n.mt-4 {\n margin-top: 1.5rem !important;\n}\n\n.mt-5 {\n margin-top: 3rem !important;\n}\n\n.mt-auto {\n margin-top: auto !important;\n}\n\n.me-0 {\n margin-right: 0 !important;\n}\n\n.me-1 {\n margin-right: 0.25rem !important;\n}\n\n.me-2 {\n margin-right: 0.5rem !important;\n}\n\n.me-3 {\n margin-right: 1rem !important;\n}\n\n.me-4 {\n margin-right: 1.5rem !important;\n}\n\n.me-5 {\n margin-right: 3rem !important;\n}\n\n.me-auto {\n margin-right: auto !important;\n}\n\n.mb-0 {\n margin-bottom: 0 !important;\n}\n\n.mb-1 {\n margin-bottom: 0.25rem !important;\n}\n\n.mb-2 {\n margin-bottom: 0.5rem !important;\n}\n\n.mb-3 {\n margin-bottom: 1rem !important;\n}\n\n.mb-4 {\n margin-bottom: 1.5rem !important;\n}\n\n.mb-5 {\n margin-bottom: 3rem !important;\n}\n\n.mb-auto {\n margin-bottom: auto !important;\n}\n\n.ms-0 {\n margin-left: 0 !important;\n}\n\n.ms-1 {\n margin-left: 0.25rem !important;\n}\n\n.ms-2 {\n margin-left: 0.5rem !important;\n}\n\n.ms-3 {\n margin-left: 1rem !important;\n}\n\n.ms-4 {\n margin-left: 1.5rem !important;\n}\n\n.ms-5 {\n margin-left: 3rem !important;\n}\n\n.ms-auto {\n margin-left: auto !important;\n}\n\n.p-0 {\n padding: 0 !important;\n}\n\n.p-1 {\n padding: 0.25rem !important;\n}\n\n.p-2 {\n padding: 0.5rem !important;\n}\n\n.p-3 {\n padding: 1rem !important;\n}\n\n.p-4 {\n padding: 1.5rem !important;\n}\n\n.p-5 {\n padding: 3rem !important;\n}\n\n.px-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n}\n\n.px-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n}\n\n.px-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n}\n\n.px-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n}\n\n.px-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n}\n\n.px-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n}\n\n.py-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n\n.py-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n}\n\n.py-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n}\n\n.py-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n}\n\n.py-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n}\n\n.py-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n}\n\n.pt-0 {\n padding-top: 0 !important;\n}\n\n.pt-1 {\n padding-top: 0.25rem !important;\n}\n\n.pt-2 {\n padding-top: 0.5rem !important;\n}\n\n.pt-3 {\n padding-top: 1rem !important;\n}\n\n.pt-4 {\n padding-top: 1.5rem !important;\n}\n\n.pt-5 {\n padding-top: 3rem !important;\n}\n\n.pe-0 {\n padding-right: 0 !important;\n}\n\n.pe-1 {\n padding-right: 0.25rem !important;\n}\n\n.pe-2 {\n padding-right: 0.5rem !important;\n}\n\n.pe-3 {\n padding-right: 1rem !important;\n}\n\n.pe-4 {\n padding-right: 1.5rem !important;\n}\n\n.pe-5 {\n padding-right: 3rem !important;\n}\n\n.pb-0 {\n padding-bottom: 0 !important;\n}\n\n.pb-1 {\n padding-bottom: 0.25rem !important;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem !important;\n}\n\n.pb-3 {\n padding-bottom: 1rem !important;\n}\n\n.pb-4 {\n padding-bottom: 1.5rem !important;\n}\n\n.pb-5 {\n padding-bottom: 3rem !important;\n}\n\n.ps-0 {\n padding-left: 0 !important;\n}\n\n.ps-1 {\n padding-left: 0.25rem !important;\n}\n\n.ps-2 {\n padding-left: 0.5rem !important;\n}\n\n.ps-3 {\n padding-left: 1rem !important;\n}\n\n.ps-4 {\n padding-left: 1.5rem !important;\n}\n\n.ps-5 {\n padding-left: 3rem !important;\n}\n\n@media (min-width: 576px) {\n .d-sm-inline {\n display: inline !important;\n }\n\n .d-sm-inline-block {\n display: inline-block !important;\n }\n\n .d-sm-block {\n display: block !important;\n }\n\n .d-sm-grid {\n display: grid !important;\n }\n\n .d-sm-table {\n display: table !important;\n }\n\n .d-sm-table-row {\n display: table-row !important;\n }\n\n .d-sm-table-cell {\n display: table-cell !important;\n }\n\n .d-sm-flex {\n display: flex !important;\n }\n\n .d-sm-inline-flex {\n display: inline-flex !important;\n }\n\n .d-sm-none {\n display: none !important;\n }\n\n .flex-sm-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-sm-row {\n flex-direction: row !important;\n }\n\n .flex-sm-column {\n flex-direction: column !important;\n }\n\n .flex-sm-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-sm-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-sm-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-sm-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-sm-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-sm-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-sm-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-sm-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-sm-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-sm-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-sm-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-sm-center {\n justify-content: center !important;\n }\n\n .justify-content-sm-between {\n justify-content: space-between !important;\n }\n\n .justify-content-sm-around {\n justify-content: space-around !important;\n }\n\n .justify-content-sm-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-sm-start {\n align-items: flex-start !important;\n }\n\n .align-items-sm-end {\n align-items: flex-end !important;\n }\n\n .align-items-sm-center {\n align-items: center !important;\n }\n\n .align-items-sm-baseline {\n align-items: baseline !important;\n }\n\n .align-items-sm-stretch {\n align-items: stretch !important;\n }\n\n .align-content-sm-start {\n align-content: flex-start !important;\n }\n\n .align-content-sm-end {\n align-content: flex-end !important;\n }\n\n .align-content-sm-center {\n align-content: center !important;\n }\n\n .align-content-sm-between {\n align-content: space-between !important;\n }\n\n .align-content-sm-around {\n align-content: space-around !important;\n }\n\n .align-content-sm-stretch {\n align-content: stretch !important;\n }\n\n .align-self-sm-auto {\n align-self: auto !important;\n }\n\n .align-self-sm-start {\n align-self: flex-start !important;\n }\n\n .align-self-sm-end {\n align-self: flex-end !important;\n }\n\n .align-self-sm-center {\n align-self: center !important;\n }\n\n .align-self-sm-baseline {\n align-self: baseline !important;\n }\n\n .align-self-sm-stretch {\n align-self: stretch !important;\n }\n\n .order-sm-first {\n order: -1 !important;\n }\n\n .order-sm-0 {\n order: 0 !important;\n }\n\n .order-sm-1 {\n order: 1 !important;\n }\n\n .order-sm-2 {\n order: 2 !important;\n }\n\n .order-sm-3 {\n order: 3 !important;\n }\n\n .order-sm-4 {\n order: 4 !important;\n }\n\n .order-sm-5 {\n order: 5 !important;\n }\n\n .order-sm-last {\n order: 6 !important;\n }\n\n .m-sm-0 {\n margin: 0 !important;\n }\n\n .m-sm-1 {\n margin: 0.25rem !important;\n }\n\n .m-sm-2 {\n margin: 0.5rem !important;\n }\n\n .m-sm-3 {\n margin: 1rem !important;\n }\n\n .m-sm-4 {\n margin: 1.5rem !important;\n }\n\n .m-sm-5 {\n margin: 3rem !important;\n }\n\n .m-sm-auto {\n margin: auto !important;\n }\n\n .mx-sm-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-sm-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-sm-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-sm-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-sm-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-sm-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-sm-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-sm-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-sm-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-sm-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-sm-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-sm-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-sm-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-sm-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-sm-0 {\n margin-top: 0 !important;\n }\n\n .mt-sm-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-sm-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-sm-3 {\n margin-top: 1rem !important;\n }\n\n .mt-sm-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-sm-5 {\n margin-top: 3rem !important;\n }\n\n .mt-sm-auto {\n margin-top: auto !important;\n }\n\n .me-sm-0 {\n margin-right: 0 !important;\n }\n\n .me-sm-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-sm-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-sm-3 {\n margin-right: 1rem !important;\n }\n\n .me-sm-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-sm-5 {\n margin-right: 3rem !important;\n }\n\n .me-sm-auto {\n margin-right: auto !important;\n }\n\n .mb-sm-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-sm-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-sm-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-sm-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-sm-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-sm-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-sm-auto {\n margin-bottom: auto !important;\n }\n\n .ms-sm-0 {\n margin-left: 0 !important;\n }\n\n .ms-sm-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-sm-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-sm-3 {\n margin-left: 1rem !important;\n }\n\n .ms-sm-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-sm-5 {\n margin-left: 3rem !important;\n }\n\n .ms-sm-auto {\n margin-left: auto !important;\n }\n\n .p-sm-0 {\n padding: 0 !important;\n }\n\n .p-sm-1 {\n padding: 0.25rem !important;\n }\n\n .p-sm-2 {\n padding: 0.5rem !important;\n }\n\n .p-sm-3 {\n padding: 1rem !important;\n }\n\n .p-sm-4 {\n padding: 1.5rem !important;\n }\n\n .p-sm-5 {\n padding: 3rem !important;\n }\n\n .px-sm-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-sm-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-sm-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-sm-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-sm-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-sm-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-sm-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-sm-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-sm-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-sm-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-sm-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-sm-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-sm-0 {\n padding-top: 0 !important;\n }\n\n .pt-sm-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-sm-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-sm-3 {\n padding-top: 1rem !important;\n }\n\n .pt-sm-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-sm-5 {\n padding-top: 3rem !important;\n }\n\n .pe-sm-0 {\n padding-right: 0 !important;\n }\n\n .pe-sm-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-sm-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-sm-3 {\n padding-right: 1rem !important;\n }\n\n .pe-sm-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-sm-5 {\n padding-right: 3rem !important;\n }\n\n .pb-sm-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-sm-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-sm-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-sm-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-sm-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-sm-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-sm-0 {\n padding-left: 0 !important;\n }\n\n .ps-sm-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-sm-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-sm-3 {\n padding-left: 1rem !important;\n }\n\n .ps-sm-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-sm-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 768px) {\n .d-md-inline {\n display: inline !important;\n }\n\n .d-md-inline-block {\n display: inline-block !important;\n }\n\n .d-md-block {\n display: block !important;\n }\n\n .d-md-grid {\n display: grid !important;\n }\n\n .d-md-table {\n display: table !important;\n }\n\n .d-md-table-row {\n display: table-row !important;\n }\n\n .d-md-table-cell {\n display: table-cell !important;\n }\n\n .d-md-flex {\n display: flex !important;\n }\n\n .d-md-inline-flex {\n display: inline-flex !important;\n }\n\n .d-md-none {\n display: none !important;\n }\n\n .flex-md-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-md-row {\n flex-direction: row !important;\n }\n\n .flex-md-column {\n flex-direction: column !important;\n }\n\n .flex-md-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-md-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-md-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-md-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-md-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-md-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-md-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-md-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-md-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-md-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-md-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-md-center {\n justify-content: center !important;\n }\n\n .justify-content-md-between {\n justify-content: space-between !important;\n }\n\n .justify-content-md-around {\n justify-content: space-around !important;\n }\n\n .justify-content-md-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-md-start {\n align-items: flex-start !important;\n }\n\n .align-items-md-end {\n align-items: flex-end !important;\n }\n\n .align-items-md-center {\n align-items: center !important;\n }\n\n .align-items-md-baseline {\n align-items: baseline !important;\n }\n\n .align-items-md-stretch {\n align-items: stretch !important;\n }\n\n .align-content-md-start {\n align-content: flex-start !important;\n }\n\n .align-content-md-end {\n align-content: flex-end !important;\n }\n\n .align-content-md-center {\n align-content: center !important;\n }\n\n .align-content-md-between {\n align-content: space-between !important;\n }\n\n .align-content-md-around {\n align-content: space-around !important;\n }\n\n .align-content-md-stretch {\n align-content: stretch !important;\n }\n\n .align-self-md-auto {\n align-self: auto !important;\n }\n\n .align-self-md-start {\n align-self: flex-start !important;\n }\n\n .align-self-md-end {\n align-self: flex-end !important;\n }\n\n .align-self-md-center {\n align-self: center !important;\n }\n\n .align-self-md-baseline {\n align-self: baseline !important;\n }\n\n .align-self-md-stretch {\n align-self: stretch !important;\n }\n\n .order-md-first {\n order: -1 !important;\n }\n\n .order-md-0 {\n order: 0 !important;\n }\n\n .order-md-1 {\n order: 1 !important;\n }\n\n .order-md-2 {\n order: 2 !important;\n }\n\n .order-md-3 {\n order: 3 !important;\n }\n\n .order-md-4 {\n order: 4 !important;\n }\n\n .order-md-5 {\n order: 5 !important;\n }\n\n .order-md-last {\n order: 6 !important;\n }\n\n .m-md-0 {\n margin: 0 !important;\n }\n\n .m-md-1 {\n margin: 0.25rem !important;\n }\n\n .m-md-2 {\n margin: 0.5rem !important;\n }\n\n .m-md-3 {\n margin: 1rem !important;\n }\n\n .m-md-4 {\n margin: 1.5rem !important;\n }\n\n .m-md-5 {\n margin: 3rem !important;\n }\n\n .m-md-auto {\n margin: auto !important;\n }\n\n .mx-md-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-md-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-md-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-md-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-md-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-md-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-md-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-md-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-md-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-md-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-md-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-md-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-md-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-md-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-md-0 {\n margin-top: 0 !important;\n }\n\n .mt-md-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-md-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-md-3 {\n margin-top: 1rem !important;\n }\n\n .mt-md-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-md-5 {\n margin-top: 3rem !important;\n }\n\n .mt-md-auto {\n margin-top: auto !important;\n }\n\n .me-md-0 {\n margin-right: 0 !important;\n }\n\n .me-md-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-md-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-md-3 {\n margin-right: 1rem !important;\n }\n\n .me-md-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-md-5 {\n margin-right: 3rem !important;\n }\n\n .me-md-auto {\n margin-right: auto !important;\n }\n\n .mb-md-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-md-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-md-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-md-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-md-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-md-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-md-auto {\n margin-bottom: auto !important;\n }\n\n .ms-md-0 {\n margin-left: 0 !important;\n }\n\n .ms-md-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-md-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-md-3 {\n margin-left: 1rem !important;\n }\n\n .ms-md-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-md-5 {\n margin-left: 3rem !important;\n }\n\n .ms-md-auto {\n margin-left: auto !important;\n }\n\n .p-md-0 {\n padding: 0 !important;\n }\n\n .p-md-1 {\n padding: 0.25rem !important;\n }\n\n .p-md-2 {\n padding: 0.5rem !important;\n }\n\n .p-md-3 {\n padding: 1rem !important;\n }\n\n .p-md-4 {\n padding: 1.5rem !important;\n }\n\n .p-md-5 {\n padding: 3rem !important;\n }\n\n .px-md-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-md-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-md-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-md-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-md-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-md-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-md-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-md-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-md-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-md-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-md-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-md-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-md-0 {\n padding-top: 0 !important;\n }\n\n .pt-md-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-md-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-md-3 {\n padding-top: 1rem !important;\n }\n\n .pt-md-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-md-5 {\n padding-top: 3rem !important;\n }\n\n .pe-md-0 {\n padding-right: 0 !important;\n }\n\n .pe-md-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-md-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-md-3 {\n padding-right: 1rem !important;\n }\n\n .pe-md-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-md-5 {\n padding-right: 3rem !important;\n }\n\n .pb-md-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-md-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-md-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-md-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-md-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-md-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-md-0 {\n padding-left: 0 !important;\n }\n\n .ps-md-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-md-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-md-3 {\n padding-left: 1rem !important;\n }\n\n .ps-md-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-md-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 992px) {\n .d-lg-inline {\n display: inline !important;\n }\n\n .d-lg-inline-block {\n display: inline-block !important;\n }\n\n .d-lg-block {\n display: block !important;\n }\n\n .d-lg-grid {\n display: grid !important;\n }\n\n .d-lg-table {\n display: table !important;\n }\n\n .d-lg-table-row {\n display: table-row !important;\n }\n\n .d-lg-table-cell {\n display: table-cell !important;\n }\n\n .d-lg-flex {\n display: flex !important;\n }\n\n .d-lg-inline-flex {\n display: inline-flex !important;\n }\n\n .d-lg-none {\n display: none !important;\n }\n\n .flex-lg-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-lg-row {\n flex-direction: row !important;\n }\n\n .flex-lg-column {\n flex-direction: column !important;\n }\n\n .flex-lg-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-lg-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-lg-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-lg-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-lg-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-lg-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-lg-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-lg-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-lg-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-lg-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-lg-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-lg-center {\n justify-content: center !important;\n }\n\n .justify-content-lg-between {\n justify-content: space-between !important;\n }\n\n .justify-content-lg-around {\n justify-content: space-around !important;\n }\n\n .justify-content-lg-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-lg-start {\n align-items: flex-start !important;\n }\n\n .align-items-lg-end {\n align-items: flex-end !important;\n }\n\n .align-items-lg-center {\n align-items: center !important;\n }\n\n .align-items-lg-baseline {\n align-items: baseline !important;\n }\n\n .align-items-lg-stretch {\n align-items: stretch !important;\n }\n\n .align-content-lg-start {\n align-content: flex-start !important;\n }\n\n .align-content-lg-end {\n align-content: flex-end !important;\n }\n\n .align-content-lg-center {\n align-content: center !important;\n }\n\n .align-content-lg-between {\n align-content: space-between !important;\n }\n\n .align-content-lg-around {\n align-content: space-around !important;\n }\n\n .align-content-lg-stretch {\n align-content: stretch !important;\n }\n\n .align-self-lg-auto {\n align-self: auto !important;\n }\n\n .align-self-lg-start {\n align-self: flex-start !important;\n }\n\n .align-self-lg-end {\n align-self: flex-end !important;\n }\n\n .align-self-lg-center {\n align-self: center !important;\n }\n\n .align-self-lg-baseline {\n align-self: baseline !important;\n }\n\n .align-self-lg-stretch {\n align-self: stretch !important;\n }\n\n .order-lg-first {\n order: -1 !important;\n }\n\n .order-lg-0 {\n order: 0 !important;\n }\n\n .order-lg-1 {\n order: 1 !important;\n }\n\n .order-lg-2 {\n order: 2 !important;\n }\n\n .order-lg-3 {\n order: 3 !important;\n }\n\n .order-lg-4 {\n order: 4 !important;\n }\n\n .order-lg-5 {\n order: 5 !important;\n }\n\n .order-lg-last {\n order: 6 !important;\n }\n\n .m-lg-0 {\n margin: 0 !important;\n }\n\n .m-lg-1 {\n margin: 0.25rem !important;\n }\n\n .m-lg-2 {\n margin: 0.5rem !important;\n }\n\n .m-lg-3 {\n margin: 1rem !important;\n }\n\n .m-lg-4 {\n margin: 1.5rem !important;\n }\n\n .m-lg-5 {\n margin: 3rem !important;\n }\n\n .m-lg-auto {\n margin: auto !important;\n }\n\n .mx-lg-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-lg-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-lg-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-lg-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-lg-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-lg-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-lg-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-lg-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-lg-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-lg-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-lg-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-lg-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-lg-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-lg-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-lg-0 {\n margin-top: 0 !important;\n }\n\n .mt-lg-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-lg-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-lg-3 {\n margin-top: 1rem !important;\n }\n\n .mt-lg-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-lg-5 {\n margin-top: 3rem !important;\n }\n\n .mt-lg-auto {\n margin-top: auto !important;\n }\n\n .me-lg-0 {\n margin-right: 0 !important;\n }\n\n .me-lg-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-lg-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-lg-3 {\n margin-right: 1rem !important;\n }\n\n .me-lg-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-lg-5 {\n margin-right: 3rem !important;\n }\n\n .me-lg-auto {\n margin-right: auto !important;\n }\n\n .mb-lg-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-lg-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-lg-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-lg-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-lg-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-lg-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-lg-auto {\n margin-bottom: auto !important;\n }\n\n .ms-lg-0 {\n margin-left: 0 !important;\n }\n\n .ms-lg-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-lg-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-lg-3 {\n margin-left: 1rem !important;\n }\n\n .ms-lg-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-lg-5 {\n margin-left: 3rem !important;\n }\n\n .ms-lg-auto {\n margin-left: auto !important;\n }\n\n .p-lg-0 {\n padding: 0 !important;\n }\n\n .p-lg-1 {\n padding: 0.25rem !important;\n }\n\n .p-lg-2 {\n padding: 0.5rem !important;\n }\n\n .p-lg-3 {\n padding: 1rem !important;\n }\n\n .p-lg-4 {\n padding: 1.5rem !important;\n }\n\n .p-lg-5 {\n padding: 3rem !important;\n }\n\n .px-lg-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-lg-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-lg-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-lg-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-lg-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-lg-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-lg-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-lg-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-lg-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-lg-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-lg-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-lg-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-lg-0 {\n padding-top: 0 !important;\n }\n\n .pt-lg-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-lg-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-lg-3 {\n padding-top: 1rem !important;\n }\n\n .pt-lg-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-lg-5 {\n padding-top: 3rem !important;\n }\n\n .pe-lg-0 {\n padding-right: 0 !important;\n }\n\n .pe-lg-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-lg-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-lg-3 {\n padding-right: 1rem !important;\n }\n\n .pe-lg-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-lg-5 {\n padding-right: 3rem !important;\n }\n\n .pb-lg-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-lg-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-lg-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-lg-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-lg-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-lg-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-lg-0 {\n padding-left: 0 !important;\n }\n\n .ps-lg-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-lg-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-lg-3 {\n padding-left: 1rem !important;\n }\n\n .ps-lg-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-lg-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1200px) {\n .d-xl-inline {\n display: inline !important;\n }\n\n .d-xl-inline-block {\n display: inline-block !important;\n }\n\n .d-xl-block {\n display: block !important;\n }\n\n .d-xl-grid {\n display: grid !important;\n }\n\n .d-xl-table {\n display: table !important;\n }\n\n .d-xl-table-row {\n display: table-row !important;\n }\n\n .d-xl-table-cell {\n display: table-cell !important;\n }\n\n .d-xl-flex {\n display: flex !important;\n }\n\n .d-xl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xl-none {\n display: none !important;\n }\n\n .flex-xl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xl-row {\n flex-direction: row !important;\n }\n\n .flex-xl-column {\n flex-direction: column !important;\n }\n\n .flex-xl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xl-center {\n justify-content: center !important;\n }\n\n .justify-content-xl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xl-center {\n align-items: center !important;\n }\n\n .align-items-xl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xl-center {\n align-content: center !important;\n }\n\n .align-content-xl-between {\n align-content: space-between !important;\n }\n\n .align-content-xl-around {\n align-content: space-around !important;\n }\n\n .align-content-xl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xl-auto {\n align-self: auto !important;\n }\n\n .align-self-xl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xl-center {\n align-self: center !important;\n }\n\n .align-self-xl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xl-stretch {\n align-self: stretch !important;\n }\n\n .order-xl-first {\n order: -1 !important;\n }\n\n .order-xl-0 {\n order: 0 !important;\n }\n\n .order-xl-1 {\n order: 1 !important;\n }\n\n .order-xl-2 {\n order: 2 !important;\n }\n\n .order-xl-3 {\n order: 3 !important;\n }\n\n .order-xl-4 {\n order: 4 !important;\n }\n\n .order-xl-5 {\n order: 5 !important;\n }\n\n .order-xl-last {\n order: 6 !important;\n }\n\n .m-xl-0 {\n margin: 0 !important;\n }\n\n .m-xl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xl-3 {\n margin: 1rem !important;\n }\n\n .m-xl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xl-5 {\n margin: 3rem !important;\n }\n\n .m-xl-auto {\n margin: auto !important;\n }\n\n .mx-xl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-xl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-xl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-xl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-xl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-xl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-xl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-xl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xl-auto {\n margin-top: auto !important;\n }\n\n .me-xl-0 {\n margin-right: 0 !important;\n }\n\n .me-xl-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-xl-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-xl-3 {\n margin-right: 1rem !important;\n }\n\n .me-xl-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-xl-5 {\n margin-right: 3rem !important;\n }\n\n .me-xl-auto {\n margin-right: auto !important;\n }\n\n .mb-xl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xl-0 {\n margin-left: 0 !important;\n }\n\n .ms-xl-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-xl-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-xl-3 {\n margin-left: 1rem !important;\n }\n\n .ms-xl-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-xl-5 {\n margin-left: 3rem !important;\n }\n\n .ms-xl-auto {\n margin-left: auto !important;\n }\n\n .p-xl-0 {\n padding: 0 !important;\n }\n\n .p-xl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xl-3 {\n padding: 1rem !important;\n }\n\n .p-xl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xl-5 {\n padding: 3rem !important;\n }\n\n .px-xl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-xl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-xl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-xl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-xl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-xl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-xl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xl-0 {\n padding-right: 0 !important;\n }\n\n .pe-xl-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-xl-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-xl-3 {\n padding-right: 1rem !important;\n }\n\n .pe-xl-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-xl-5 {\n padding-right: 3rem !important;\n }\n\n .pb-xl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xl-0 {\n padding-left: 0 !important;\n }\n\n .ps-xl-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-xl-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-xl-3 {\n padding-left: 1rem !important;\n }\n\n .ps-xl-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-xl-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1400px) {\n .d-xxl-inline {\n display: inline !important;\n }\n\n .d-xxl-inline-block {\n display: inline-block !important;\n }\n\n .d-xxl-block {\n display: block !important;\n }\n\n .d-xxl-grid {\n display: grid !important;\n }\n\n .d-xxl-table {\n display: table !important;\n }\n\n .d-xxl-table-row {\n display: table-row !important;\n }\n\n .d-xxl-table-cell {\n display: table-cell !important;\n }\n\n .d-xxl-flex {\n display: flex !important;\n }\n\n .d-xxl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xxl-none {\n display: none !important;\n }\n\n .flex-xxl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xxl-row {\n flex-direction: row !important;\n }\n\n .flex-xxl-column {\n flex-direction: column !important;\n }\n\n .flex-xxl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xxl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xxl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xxl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xxl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xxl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xxl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xxl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xxl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xxl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xxl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xxl-center {\n justify-content: center !important;\n }\n\n .justify-content-xxl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xxl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xxl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xxl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xxl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xxl-center {\n align-items: center !important;\n }\n\n .align-items-xxl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xxl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xxl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xxl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xxl-center {\n align-content: center !important;\n }\n\n .align-content-xxl-between {\n align-content: space-between !important;\n }\n\n .align-content-xxl-around {\n align-content: space-around !important;\n }\n\n .align-content-xxl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xxl-auto {\n align-self: auto !important;\n }\n\n .align-self-xxl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xxl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xxl-center {\n align-self: center !important;\n }\n\n .align-self-xxl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xxl-stretch {\n align-self: stretch !important;\n }\n\n .order-xxl-first {\n order: -1 !important;\n }\n\n .order-xxl-0 {\n order: 0 !important;\n }\n\n .order-xxl-1 {\n order: 1 !important;\n }\n\n .order-xxl-2 {\n order: 2 !important;\n }\n\n .order-xxl-3 {\n order: 3 !important;\n }\n\n .order-xxl-4 {\n order: 4 !important;\n }\n\n .order-xxl-5 {\n order: 5 !important;\n }\n\n .order-xxl-last {\n order: 6 !important;\n }\n\n .m-xxl-0 {\n margin: 0 !important;\n }\n\n .m-xxl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xxl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xxl-3 {\n margin: 1rem !important;\n }\n\n .m-xxl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xxl-5 {\n margin: 3rem !important;\n }\n\n .m-xxl-auto {\n margin: auto !important;\n }\n\n .mx-xxl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-xxl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-xxl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-xxl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-xxl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-xxl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-xxl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-xxl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xxl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xxl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xxl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xxl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xxl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xxl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xxl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xxl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xxl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xxl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xxl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xxl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xxl-auto {\n margin-top: auto !important;\n }\n\n .me-xxl-0 {\n margin-right: 0 !important;\n }\n\n .me-xxl-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-xxl-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-xxl-3 {\n margin-right: 1rem !important;\n }\n\n .me-xxl-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-xxl-5 {\n margin-right: 3rem !important;\n }\n\n .me-xxl-auto {\n margin-right: auto !important;\n }\n\n .mb-xxl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xxl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xxl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xxl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xxl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xxl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xxl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xxl-0 {\n margin-left: 0 !important;\n }\n\n .ms-xxl-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-xxl-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-xxl-3 {\n margin-left: 1rem !important;\n }\n\n .ms-xxl-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-xxl-5 {\n margin-left: 3rem !important;\n }\n\n .ms-xxl-auto {\n margin-left: auto !important;\n }\n\n .p-xxl-0 {\n padding: 0 !important;\n }\n\n .p-xxl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xxl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xxl-3 {\n padding: 1rem !important;\n }\n\n .p-xxl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xxl-5 {\n padding: 3rem !important;\n }\n\n .px-xxl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-xxl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-xxl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-xxl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-xxl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-xxl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-xxl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xxl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xxl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xxl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xxl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xxl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xxl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xxl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xxl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xxl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xxl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xxl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xxl-0 {\n padding-right: 0 !important;\n }\n\n .pe-xxl-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-xxl-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-xxl-3 {\n padding-right: 1rem !important;\n }\n\n .pe-xxl-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-xxl-5 {\n padding-right: 3rem !important;\n }\n\n .pb-xxl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xxl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xxl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xxl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xxl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xxl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xxl-0 {\n padding-left: 0 !important;\n }\n\n .ps-xxl-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-xxl-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-xxl-3 {\n padding-left: 1rem !important;\n }\n\n .ps-xxl-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-xxl-5 {\n padding-left: 3rem !important;\n }\n}\n@media print {\n .d-print-inline {\n display: inline !important;\n }\n\n .d-print-inline-block {\n display: inline-block !important;\n }\n\n .d-print-block {\n display: block !important;\n }\n\n .d-print-grid {\n display: grid !important;\n }\n\n .d-print-table {\n display: table !important;\n }\n\n .d-print-table-row {\n display: table-row !important;\n }\n\n .d-print-table-cell {\n display: table-cell !important;\n }\n\n .d-print-flex {\n display: flex !important;\n }\n\n .d-print-inline-flex {\n display: inline-flex !important;\n }\n\n .d-print-none {\n display: none !important;\n }\n}\n\n/*# sourceMappingURL=bootstrap-grid.css.map */\n","// Breakpoint viewport sizes and media queries.\n//\n// Breakpoints are defined as a map of (name: minimum width), order from small to large:\n//\n// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n//\n// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n\n// Name of the next breakpoint, or null for the last breakpoint.\n//\n// >> breakpoint-next(sm)\n// md\n// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// md\n// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n// md\n@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {\n $n: index($breakpoint-names, $name);\n @if not $n {\n @error \"breakpoint `#{$name}` not found in `#{$breakpoints}`\";\n }\n @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);\n}\n\n// Minimum breakpoint width. Null for the smallest (first) breakpoint.\n//\n// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 576px\n@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {\n $min: map-get($breakpoints, $name);\n @return if($min != 0, $min, null);\n}\n\n// Maximum breakpoint width.\n// The maximum value is reduced by 0.02px to work around the limitations of\n// `min-` and `max-` prefixes and viewports with fractional widths.\n// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n// See https://bugs.webkit.org/show_bug.cgi?id=178261\n//\n// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 767.98px\n@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {\n $max: map-get($breakpoints, $name);\n @return if($max and $max > 0, $max - .02, null);\n}\n\n// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n// Useful for making responsive utilities.\n//\n// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"\" (Returns a blank string)\n// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"-sm\"\n@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {\n @return if(breakpoint-min($name, $breakpoints) == null, \"\", \"-#{$name}\");\n}\n\n// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n// Makes the @content apply to the given breakpoint and wider.\n@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n @if $min {\n @media (min-width: $min) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n// Makes the @content apply to the given breakpoint and narrower.\n@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {\n $max: breakpoint-max($name, $breakpoints);\n @if $max {\n @media (max-width: $max) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media that spans multiple breakpoint widths.\n// Makes the @content apply between the min and max breakpoints\n@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($lower, $breakpoints);\n $max: breakpoint-max($upper, $breakpoints);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($lower, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($upper, $breakpoints) {\n @content;\n }\n }\n}\n\n// Media between the breakpoint's minimum and maximum widths.\n// No minimum for the smallest breakpoint, and no maximum for the largest one.\n// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n $next: breakpoint-next($name, $breakpoints);\n $max: breakpoint-max($next);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($name, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($next, $breakpoints) {\n @content;\n }\n }\n}\n","// Variables\n//\n// Variables should follow the `$component-state-property-size` formula for\n// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.\n\n// Color system\n\n// scss-docs-start gray-color-variables\n$white: #fff !default;\n$gray-100: #f8f9fa !default;\n$gray-200: #e9ecef !default;\n$gray-300: #dee2e6 !default;\n$gray-400: #ced4da !default;\n$gray-500: #adb5bd !default;\n$gray-600: #6c757d !default;\n$gray-700: #495057 !default;\n$gray-800: #343a40 !default;\n$gray-900: #212529 !default;\n$black: #000 !default;\n// scss-docs-end gray-color-variables\n\n// fusv-disable\n// scss-docs-start gray-colors-map\n$grays: (\n \"100\": $gray-100,\n \"200\": $gray-200,\n \"300\": $gray-300,\n \"400\": $gray-400,\n \"500\": $gray-500,\n \"600\": $gray-600,\n \"700\": $gray-700,\n \"800\": $gray-800,\n \"900\": $gray-900\n) !default;\n// scss-docs-end gray-colors-map\n// fusv-enable\n\n// scss-docs-start color-variables\n$blue: #0d6efd !default;\n$indigo: #6610f2 !default;\n$purple: #6f42c1 !default;\n$pink: #d63384 !default;\n$red: #dc3545 !default;\n$orange: #fd7e14 !default;\n$yellow: #ffc107 !default;\n$green: #198754 !default;\n$teal: #20c997 !default;\n$cyan: #0dcaf0 !default;\n// scss-docs-end color-variables\n\n// scss-docs-start colors-map\n$colors: (\n \"blue\": $blue,\n \"indigo\": $indigo,\n \"purple\": $purple,\n \"pink\": $pink,\n \"red\": $red,\n \"orange\": $orange,\n \"yellow\": $yellow,\n \"green\": $green,\n \"teal\": $teal,\n \"cyan\": $cyan,\n \"white\": $white,\n \"gray\": $gray-600,\n \"gray-dark\": $gray-800\n) !default;\n// scss-docs-end colors-map\n\n// scss-docs-start theme-color-variables\n$primary: $blue !default;\n$secondary: $gray-600 !default;\n$success: $green !default;\n$info: $cyan !default;\n$warning: $yellow !default;\n$danger: $red !default;\n$light: $gray-100 !default;\n$dark: $gray-900 !default;\n// scss-docs-end theme-color-variables\n\n// scss-docs-start theme-colors-map\n$theme-colors: (\n \"primary\": $primary,\n \"secondary\": $secondary,\n \"success\": $success,\n \"info\": $info,\n \"warning\": $warning,\n \"danger\": $danger,\n \"light\": $light,\n \"dark\": $dark\n) !default;\n// scss-docs-end theme-colors-map\n\n// scss-docs-start theme-colors-rgb\n$theme-colors-rgb: map-loop($theme-colors, to-rgb, \"$value\") !default;\n// scss-docs-end theme-colors-rgb\n\n// The contrast ratio to reach against white, to determine if color changes from \"light\" to \"dark\". Acceptable values for WCAG 2.0 are 3, 4.5 and 7.\n// See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast\n$min-contrast-ratio: 4.5 !default;\n\n// Customize the light and dark text colors for use in our color contrast function.\n$color-contrast-dark: $black !default;\n$color-contrast-light: $white !default;\n\n// fusv-disable\n$blue-100: tint-color($blue, 80%) !default;\n$blue-200: tint-color($blue, 60%) !default;\n$blue-300: tint-color($blue, 40%) !default;\n$blue-400: tint-color($blue, 20%) !default;\n$blue-500: $blue !default;\n$blue-600: shade-color($blue, 20%) !default;\n$blue-700: shade-color($blue, 40%) !default;\n$blue-800: shade-color($blue, 60%) !default;\n$blue-900: shade-color($blue, 80%) !default;\n\n$indigo-100: tint-color($indigo, 80%) !default;\n$indigo-200: tint-color($indigo, 60%) !default;\n$indigo-300: tint-color($indigo, 40%) !default;\n$indigo-400: tint-color($indigo, 20%) !default;\n$indigo-500: $indigo !default;\n$indigo-600: shade-color($indigo, 20%) !default;\n$indigo-700: shade-color($indigo, 40%) !default;\n$indigo-800: shade-color($indigo, 60%) !default;\n$indigo-900: shade-color($indigo, 80%) !default;\n\n$purple-100: tint-color($purple, 80%) !default;\n$purple-200: tint-color($purple, 60%) !default;\n$purple-300: tint-color($purple, 40%) !default;\n$purple-400: tint-color($purple, 20%) !default;\n$purple-500: $purple !default;\n$purple-600: shade-color($purple, 20%) !default;\n$purple-700: shade-color($purple, 40%) !default;\n$purple-800: shade-color($purple, 60%) !default;\n$purple-900: shade-color($purple, 80%) !default;\n\n$pink-100: tint-color($pink, 80%) !default;\n$pink-200: tint-color($pink, 60%) !default;\n$pink-300: tint-color($pink, 40%) !default;\n$pink-400: tint-color($pink, 20%) !default;\n$pink-500: $pink !default;\n$pink-600: shade-color($pink, 20%) !default;\n$pink-700: shade-color($pink, 40%) !default;\n$pink-800: shade-color($pink, 60%) !default;\n$pink-900: shade-color($pink, 80%) !default;\n\n$red-100: tint-color($red, 80%) !default;\n$red-200: tint-color($red, 60%) !default;\n$red-300: tint-color($red, 40%) !default;\n$red-400: tint-color($red, 20%) !default;\n$red-500: $red !default;\n$red-600: shade-color($red, 20%) !default;\n$red-700: shade-color($red, 40%) !default;\n$red-800: shade-color($red, 60%) !default;\n$red-900: shade-color($red, 80%) !default;\n\n$orange-100: tint-color($orange, 80%) !default;\n$orange-200: tint-color($orange, 60%) !default;\n$orange-300: tint-color($orange, 40%) !default;\n$orange-400: tint-color($orange, 20%) !default;\n$orange-500: $orange !default;\n$orange-600: shade-color($orange, 20%) !default;\n$orange-700: shade-color($orange, 40%) !default;\n$orange-800: shade-color($orange, 60%) !default;\n$orange-900: shade-color($orange, 80%) !default;\n\n$yellow-100: tint-color($yellow, 80%) !default;\n$yellow-200: tint-color($yellow, 60%) !default;\n$yellow-300: tint-color($yellow, 40%) !default;\n$yellow-400: tint-color($yellow, 20%) !default;\n$yellow-500: $yellow !default;\n$yellow-600: shade-color($yellow, 20%) !default;\n$yellow-700: shade-color($yellow, 40%) !default;\n$yellow-800: shade-color($yellow, 60%) !default;\n$yellow-900: shade-color($yellow, 80%) !default;\n\n$green-100: tint-color($green, 80%) !default;\n$green-200: tint-color($green, 60%) !default;\n$green-300: tint-color($green, 40%) !default;\n$green-400: tint-color($green, 20%) !default;\n$green-500: $green !default;\n$green-600: shade-color($green, 20%) !default;\n$green-700: shade-color($green, 40%) !default;\n$green-800: shade-color($green, 60%) !default;\n$green-900: shade-color($green, 80%) !default;\n\n$teal-100: tint-color($teal, 80%) !default;\n$teal-200: tint-color($teal, 60%) !default;\n$teal-300: tint-color($teal, 40%) !default;\n$teal-400: tint-color($teal, 20%) !default;\n$teal-500: $teal !default;\n$teal-600: shade-color($teal, 20%) !default;\n$teal-700: shade-color($teal, 40%) !default;\n$teal-800: shade-color($teal, 60%) !default;\n$teal-900: shade-color($teal, 80%) !default;\n\n$cyan-100: tint-color($cyan, 80%) !default;\n$cyan-200: tint-color($cyan, 60%) !default;\n$cyan-300: tint-color($cyan, 40%) !default;\n$cyan-400: tint-color($cyan, 20%) !default;\n$cyan-500: $cyan !default;\n$cyan-600: shade-color($cyan, 20%) !default;\n$cyan-700: shade-color($cyan, 40%) !default;\n$cyan-800: shade-color($cyan, 60%) !default;\n$cyan-900: shade-color($cyan, 80%) !default;\n\n$blues: (\n \"blue-100\": $blue-100,\n \"blue-200\": $blue-200,\n \"blue-300\": $blue-300,\n \"blue-400\": $blue-400,\n \"blue-500\": $blue-500,\n \"blue-600\": $blue-600,\n \"blue-700\": $blue-700,\n \"blue-800\": $blue-800,\n \"blue-900\": $blue-900\n) !default;\n\n$indigos: (\n \"indigo-100\": $indigo-100,\n \"indigo-200\": $indigo-200,\n \"indigo-300\": $indigo-300,\n \"indigo-400\": $indigo-400,\n \"indigo-500\": $indigo-500,\n \"indigo-600\": $indigo-600,\n \"indigo-700\": $indigo-700,\n \"indigo-800\": $indigo-800,\n \"indigo-900\": $indigo-900\n) !default;\n\n$purples: (\n \"purple-100\": $purple-200,\n \"purple-200\": $purple-100,\n \"purple-300\": $purple-300,\n \"purple-400\": $purple-400,\n \"purple-500\": $purple-500,\n \"purple-600\": $purple-600,\n \"purple-700\": $purple-700,\n \"purple-800\": $purple-800,\n \"purple-900\": $purple-900\n) !default;\n\n$pinks: (\n \"pink-100\": $pink-100,\n \"pink-200\": $pink-200,\n \"pink-300\": $pink-300,\n \"pink-400\": $pink-400,\n \"pink-500\": $pink-500,\n \"pink-600\": $pink-600,\n \"pink-700\": $pink-700,\n \"pink-800\": $pink-800,\n \"pink-900\": $pink-900\n) !default;\n\n$reds: (\n \"red-100\": $red-100,\n \"red-200\": $red-200,\n \"red-300\": $red-300,\n \"red-400\": $red-400,\n \"red-500\": $red-500,\n \"red-600\": $red-600,\n \"red-700\": $red-700,\n \"red-800\": $red-800,\n \"red-900\": $red-900\n) !default;\n\n$oranges: (\n \"orange-100\": $orange-100,\n \"orange-200\": $orange-200,\n \"orange-300\": $orange-300,\n \"orange-400\": $orange-400,\n \"orange-500\": $orange-500,\n \"orange-600\": $orange-600,\n \"orange-700\": $orange-700,\n \"orange-800\": $orange-800,\n \"orange-900\": $orange-900\n) !default;\n\n$yellows: (\n \"yellow-100\": $yellow-100,\n \"yellow-200\": $yellow-200,\n \"yellow-300\": $yellow-300,\n \"yellow-400\": $yellow-400,\n \"yellow-500\": $yellow-500,\n \"yellow-600\": $yellow-600,\n \"yellow-700\": $yellow-700,\n \"yellow-800\": $yellow-800,\n \"yellow-900\": $yellow-900\n) !default;\n\n$greens: (\n \"green-100\": $green-100,\n \"green-200\": $green-200,\n \"green-300\": $green-300,\n \"green-400\": $green-400,\n \"green-500\": $green-500,\n \"green-600\": $green-600,\n \"green-700\": $green-700,\n \"green-800\": $green-800,\n \"green-900\": $green-900\n) !default;\n\n$teals: (\n \"teal-100\": $teal-100,\n \"teal-200\": $teal-200,\n \"teal-300\": $teal-300,\n \"teal-400\": $teal-400,\n \"teal-500\": $teal-500,\n \"teal-600\": $teal-600,\n \"teal-700\": $teal-700,\n \"teal-800\": $teal-800,\n \"teal-900\": $teal-900\n) !default;\n\n$cyans: (\n \"cyan-100\": $cyan-100,\n \"cyan-200\": $cyan-200,\n \"cyan-300\": $cyan-300,\n \"cyan-400\": $cyan-400,\n \"cyan-500\": $cyan-500,\n \"cyan-600\": $cyan-600,\n \"cyan-700\": $cyan-700,\n \"cyan-800\": $cyan-800,\n \"cyan-900\": $cyan-900\n) !default;\n// fusv-enable\n\n// Characters which are escaped by the escape-svg function\n$escaped-characters: (\n (\"<\", \"%3c\"),\n (\">\", \"%3e\"),\n (\"#\", \"%23\"),\n (\"(\", \"%28\"),\n (\")\", \"%29\"),\n) !default;\n\n// Options\n//\n// Quickly modify global styling by enabling or disabling optional features.\n\n$enable-caret: true !default;\n$enable-rounded: true !default;\n$enable-shadows: false !default;\n$enable-gradients: false !default;\n$enable-transitions: true !default;\n$enable-reduced-motion: true !default;\n$enable-smooth-scroll: true !default;\n$enable-grid-classes: true !default;\n$enable-cssgrid: false !default;\n$enable-button-pointers: true !default;\n$enable-rfs: true !default;\n$enable-validation-icons: true !default;\n$enable-negative-margins: false !default;\n$enable-deprecation-messages: true !default;\n$enable-important-utilities: true !default;\n\n// Prefix for :root CSS variables\n\n$variable-prefix: bs- !default;\n\n// Gradient\n//\n// The gradient which is added to components if `$enable-gradients` is `true`\n// This gradient is also added to elements with `.bg-gradient`\n// scss-docs-start variable-gradient\n$gradient: linear-gradient(180deg, rgba($white, .15), rgba($white, 0)) !default;\n// scss-docs-end variable-gradient\n\n// Spacing\n//\n// Control the default styling of most Bootstrap elements by modifying these\n// variables. Mostly focused on spacing.\n// You can add more entries to the $spacers map, should you need more variation.\n\n// scss-docs-start spacer-variables-maps\n$spacer: 1rem !default;\n$spacers: (\n 0: 0,\n 1: $spacer * .25,\n 2: $spacer * .5,\n 3: $spacer,\n 4: $spacer * 1.5,\n 5: $spacer * 3,\n) !default;\n\n$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;\n// scss-docs-end spacer-variables-maps\n\n// Position\n//\n// Define the edge positioning anchors of the position utilities.\n\n// scss-docs-start position-map\n$position-values: (\n 0: 0,\n 50: 50%,\n 100: 100%\n) !default;\n// scss-docs-end position-map\n\n// Body\n//\n// Settings for the `` element.\n\n$body-bg: $white !default;\n$body-color: $gray-900 !default;\n$body-text-align: null !default;\n\n// Utilities maps\n//\n// Extends the default `$theme-colors` maps to help create our utilities.\n\n// scss-docs-start utilities-colors\n$utilities-colors: map-merge(\n $theme-colors-rgb,\n (\n \"black\": to-rgb($black),\n \"white\": to-rgb($white),\n \"body\": to-rgb($body-color)\n )\n) !default;\n// scss-docs-end utilities-colors\n\n// scss-docs-start utilities-text-colors\n$utilities-text-colors: map-loop($utilities-colors, rgba-css-var, \"$key\", \"text\") !default;\n// scss-docs-end utilities-text-colors\n\n// scss-docs-start utilities-bg-colors\n$utilities-bg-colors: map-loop($utilities-colors, rgba-css-var, \"$key\", \"bg\") !default;\n// scss-docs-end utilities-bg-colors\n\n// Links\n//\n// Style anchor elements.\n\n$link-color: $primary !default;\n$link-decoration: underline !default;\n$link-shade-percentage: 20% !default;\n$link-hover-color: shift-color($link-color, $link-shade-percentage) !default;\n$link-hover-decoration: null !default;\n\n$stretched-link-pseudo-element: after !default;\n$stretched-link-z-index: 1 !default;\n\n// Paragraphs\n//\n// Style p element.\n\n$paragraph-margin-bottom: 1rem !default;\n\n\n// Grid breakpoints\n//\n// Define the minimum dimensions at which your layout will change,\n// adapting to different screen sizes, for use in media queries.\n\n// scss-docs-start grid-breakpoints\n$grid-breakpoints: (\n xs: 0,\n sm: 576px,\n md: 768px,\n lg: 992px,\n xl: 1200px,\n xxl: 1400px\n) !default;\n// scss-docs-end grid-breakpoints\n\n@include _assert-ascending($grid-breakpoints, \"$grid-breakpoints\");\n@include _assert-starts-at-zero($grid-breakpoints, \"$grid-breakpoints\");\n\n\n// Grid containers\n//\n// Define the maximum width of `.container` for different screen sizes.\n\n// scss-docs-start container-max-widths\n$container-max-widths: (\n sm: 540px,\n md: 720px,\n lg: 960px,\n xl: 1140px,\n xxl: 1320px\n) !default;\n// scss-docs-end container-max-widths\n\n@include _assert-ascending($container-max-widths, \"$container-max-widths\");\n\n\n// Grid columns\n//\n// Set the number of columns and specify the width of the gutters.\n\n$grid-columns: 12 !default;\n$grid-gutter-width: 1.5rem !default;\n$grid-row-columns: 6 !default;\n\n$gutters: $spacers !default;\n\n// Container padding\n\n$container-padding-x: $grid-gutter-width * .5 !default;\n\n\n// Components\n//\n// Define common padding and border radius sizes and more.\n\n// scss-docs-start border-variables\n$border-width: 1px !default;\n$border-widths: (\n 1: 1px,\n 2: 2px,\n 3: 3px,\n 4: 4px,\n 5: 5px\n) !default;\n\n$border-color: $gray-300 !default;\n// scss-docs-end border-variables\n\n// scss-docs-start border-radius-variables\n$border-radius: .25rem !default;\n$border-radius-sm: .2rem !default;\n$border-radius-lg: .3rem !default;\n$border-radius-pill: 50rem !default;\n// scss-docs-end border-radius-variables\n\n// scss-docs-start box-shadow-variables\n$box-shadow: 0 .5rem 1rem rgba($black, .15) !default;\n$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default;\n$box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default;\n$box-shadow-inset: inset 0 1px 2px rgba($black, .075) !default;\n// scss-docs-end box-shadow-variables\n\n$component-active-color: $white !default;\n$component-active-bg: $primary !default;\n\n// scss-docs-start caret-variables\n$caret-width: .3em !default;\n$caret-vertical-align: $caret-width * .85 !default;\n$caret-spacing: $caret-width * .85 !default;\n// scss-docs-end caret-variables\n\n$transition-base: all .2s ease-in-out !default;\n$transition-fade: opacity .15s linear !default;\n// scss-docs-start collapse-transition\n$transition-collapse: height .35s ease !default;\n$transition-collapse-width: width .35s ease !default;\n// scss-docs-end collapse-transition\n\n// stylelint-disable function-disallowed-list\n// scss-docs-start aspect-ratios\n$aspect-ratios: (\n \"1x1\": 100%,\n \"4x3\": calc(3 / 4 * 100%),\n \"16x9\": calc(9 / 16 * 100%),\n \"21x9\": calc(9 / 21 * 100%)\n) !default;\n// scss-docs-end aspect-ratios\n// stylelint-enable function-disallowed-list\n\n// Typography\n//\n// Font, line-height, and color for body text, headings, and more.\n\n// scss-docs-start font-variables\n// stylelint-disable value-keyword-case\n$font-family-sans-serif: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", \"Liberation Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\" !default;\n$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace !default;\n// stylelint-enable value-keyword-case\n$font-family-base: var(--#{$variable-prefix}font-sans-serif) !default;\n$font-family-code: var(--#{$variable-prefix}font-monospace) !default;\n\n// $font-size-root affects the value of `rem`, which is used for as well font sizes, paddings, and margins\n// $font-size-base affects the font size of the body text\n$font-size-root: null !default;\n$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`\n$font-size-sm: $font-size-base * .875 !default;\n$font-size-lg: $font-size-base * 1.25 !default;\n\n$font-weight-lighter: lighter !default;\n$font-weight-light: 300 !default;\n$font-weight-normal: 400 !default;\n$font-weight-bold: 700 !default;\n$font-weight-bolder: bolder !default;\n\n$font-weight-base: $font-weight-normal !default;\n\n$line-height-base: 1.5 !default;\n$line-height-sm: 1.25 !default;\n$line-height-lg: 2 !default;\n\n$h1-font-size: $font-size-base * 2.5 !default;\n$h2-font-size: $font-size-base * 2 !default;\n$h3-font-size: $font-size-base * 1.75 !default;\n$h4-font-size: $font-size-base * 1.5 !default;\n$h5-font-size: $font-size-base * 1.25 !default;\n$h6-font-size: $font-size-base !default;\n// scss-docs-end font-variables\n\n// scss-docs-start font-sizes\n$font-sizes: (\n 1: $h1-font-size,\n 2: $h2-font-size,\n 3: $h3-font-size,\n 4: $h4-font-size,\n 5: $h5-font-size,\n 6: $h6-font-size\n) !default;\n// scss-docs-end font-sizes\n\n// scss-docs-start headings-variables\n$headings-margin-bottom: $spacer * .5 !default;\n$headings-font-family: null !default;\n$headings-font-style: null !default;\n$headings-font-weight: 500 !default;\n$headings-line-height: 1.2 !default;\n$headings-color: null !default;\n// scss-docs-end headings-variables\n\n// scss-docs-start display-headings\n$display-font-sizes: (\n 1: 5rem,\n 2: 4.5rem,\n 3: 4rem,\n 4: 3.5rem,\n 5: 3rem,\n 6: 2.5rem\n) !default;\n\n$display-font-weight: 300 !default;\n$display-line-height: $headings-line-height !default;\n// scss-docs-end display-headings\n\n// scss-docs-start type-variables\n$lead-font-size: $font-size-base * 1.25 !default;\n$lead-font-weight: 300 !default;\n\n$small-font-size: .875em !default;\n\n$sub-sup-font-size: .75em !default;\n\n$text-muted: $gray-600 !default;\n\n$initialism-font-size: $small-font-size !default;\n\n$blockquote-margin-y: $spacer !default;\n$blockquote-font-size: $font-size-base * 1.25 !default;\n$blockquote-footer-color: $gray-600 !default;\n$blockquote-footer-font-size: $small-font-size !default;\n\n$hr-margin-y: $spacer !default;\n$hr-color: inherit !default;\n$hr-height: $border-width !default;\n$hr-opacity: .25 !default;\n\n$legend-margin-bottom: .5rem !default;\n$legend-font-size: 1.5rem !default;\n$legend-font-weight: null !default;\n\n$mark-padding: .2em !default;\n\n$dt-font-weight: $font-weight-bold !default;\n\n$nested-kbd-font-weight: $font-weight-bold !default;\n\n$list-inline-padding: .5rem !default;\n\n$mark-bg: #fcf8e3 !default;\n// scss-docs-end type-variables\n\n\n// Tables\n//\n// Customizes the `.table` component with basic values, each used across all table variations.\n\n// scss-docs-start table-variables\n$table-cell-padding-y: .5rem !default;\n$table-cell-padding-x: .5rem !default;\n$table-cell-padding-y-sm: .25rem !default;\n$table-cell-padding-x-sm: .25rem !default;\n\n$table-cell-vertical-align: top !default;\n\n$table-color: $body-color !default;\n$table-bg: transparent !default;\n$table-accent-bg: transparent !default;\n\n$table-th-font-weight: null !default;\n\n$table-striped-color: $table-color !default;\n$table-striped-bg-factor: .05 !default;\n$table-striped-bg: rgba($black, $table-striped-bg-factor) !default;\n\n$table-active-color: $table-color !default;\n$table-active-bg-factor: .1 !default;\n$table-active-bg: rgba($black, $table-active-bg-factor) !default;\n\n$table-hover-color: $table-color !default;\n$table-hover-bg-factor: .075 !default;\n$table-hover-bg: rgba($black, $table-hover-bg-factor) !default;\n\n$table-border-factor: .1 !default;\n$table-border-width: $border-width !default;\n$table-border-color: $border-color !default;\n\n$table-striped-order: odd !default;\n\n$table-group-separator-color: currentColor !default;\n\n$table-caption-color: $text-muted !default;\n\n$table-bg-scale: -80% !default;\n// scss-docs-end table-variables\n\n// scss-docs-start table-loop\n$table-variants: (\n \"primary\": shift-color($primary, $table-bg-scale),\n \"secondary\": shift-color($secondary, $table-bg-scale),\n \"success\": shift-color($success, $table-bg-scale),\n \"info\": shift-color($info, $table-bg-scale),\n \"warning\": shift-color($warning, $table-bg-scale),\n \"danger\": shift-color($danger, $table-bg-scale),\n \"light\": $light,\n \"dark\": $dark,\n) !default;\n// scss-docs-end table-loop\n\n\n// Buttons + Forms\n//\n// Shared variables that are reassigned to `$input-` and `$btn-` specific variables.\n\n// scss-docs-start input-btn-variables\n$input-btn-padding-y: .375rem !default;\n$input-btn-padding-x: .75rem !default;\n$input-btn-font-family: null !default;\n$input-btn-font-size: $font-size-base !default;\n$input-btn-line-height: $line-height-base !default;\n\n$input-btn-focus-width: .25rem !default;\n$input-btn-focus-color-opacity: .25 !default;\n$input-btn-focus-color: rgba($component-active-bg, $input-btn-focus-color-opacity) !default;\n$input-btn-focus-blur: 0 !default;\n$input-btn-focus-box-shadow: 0 0 $input-btn-focus-blur $input-btn-focus-width $input-btn-focus-color !default;\n\n$input-btn-padding-y-sm: .25rem !default;\n$input-btn-padding-x-sm: .5rem !default;\n$input-btn-font-size-sm: $font-size-sm !default;\n\n$input-btn-padding-y-lg: .5rem !default;\n$input-btn-padding-x-lg: 1rem !default;\n$input-btn-font-size-lg: $font-size-lg !default;\n\n$input-btn-border-width: $border-width !default;\n// scss-docs-end input-btn-variables\n\n\n// Buttons\n//\n// For each of Bootstrap's buttons, define text, background, and border color.\n\n// scss-docs-start btn-variables\n$btn-padding-y: $input-btn-padding-y !default;\n$btn-padding-x: $input-btn-padding-x !default;\n$btn-font-family: $input-btn-font-family !default;\n$btn-font-size: $input-btn-font-size !default;\n$btn-line-height: $input-btn-line-height !default;\n$btn-white-space: null !default; // Set to `nowrap` to prevent text wrapping\n\n$btn-padding-y-sm: $input-btn-padding-y-sm !default;\n$btn-padding-x-sm: $input-btn-padding-x-sm !default;\n$btn-font-size-sm: $input-btn-font-size-sm !default;\n\n$btn-padding-y-lg: $input-btn-padding-y-lg !default;\n$btn-padding-x-lg: $input-btn-padding-x-lg !default;\n$btn-font-size-lg: $input-btn-font-size-lg !default;\n\n$btn-border-width: $input-btn-border-width !default;\n\n$btn-font-weight: $font-weight-normal !default;\n$btn-box-shadow: inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default;\n$btn-focus-width: $input-btn-focus-width !default;\n$btn-focus-box-shadow: $input-btn-focus-box-shadow !default;\n$btn-disabled-opacity: .65 !default;\n$btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default;\n\n$btn-link-color: $link-color !default;\n$btn-link-hover-color: $link-hover-color !default;\n$btn-link-disabled-color: $gray-600 !default;\n\n// Allows for customizing button radius independently from global border radius\n$btn-border-radius: $border-radius !default;\n$btn-border-radius-sm: $border-radius-sm !default;\n$btn-border-radius-lg: $border-radius-lg !default;\n\n$btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$btn-hover-bg-shade-amount: 15% !default;\n$btn-hover-bg-tint-amount: 15% !default;\n$btn-hover-border-shade-amount: 20% !default;\n$btn-hover-border-tint-amount: 10% !default;\n$btn-active-bg-shade-amount: 20% !default;\n$btn-active-bg-tint-amount: 20% !default;\n$btn-active-border-shade-amount: 25% !default;\n$btn-active-border-tint-amount: 10% !default;\n// scss-docs-end btn-variables\n\n\n// Forms\n\n// scss-docs-start form-text-variables\n$form-text-margin-top: .25rem !default;\n$form-text-font-size: $small-font-size !default;\n$form-text-font-style: null !default;\n$form-text-font-weight: null !default;\n$form-text-color: $text-muted !default;\n// scss-docs-end form-text-variables\n\n// scss-docs-start form-label-variables\n$form-label-margin-bottom: .5rem !default;\n$form-label-font-size: null !default;\n$form-label-font-style: null !default;\n$form-label-font-weight: null !default;\n$form-label-color: null !default;\n// scss-docs-end form-label-variables\n\n// scss-docs-start form-input-variables\n$input-padding-y: $input-btn-padding-y !default;\n$input-padding-x: $input-btn-padding-x !default;\n$input-font-family: $input-btn-font-family !default;\n$input-font-size: $input-btn-font-size !default;\n$input-font-weight: $font-weight-base !default;\n$input-line-height: $input-btn-line-height !default;\n\n$input-padding-y-sm: $input-btn-padding-y-sm !default;\n$input-padding-x-sm: $input-btn-padding-x-sm !default;\n$input-font-size-sm: $input-btn-font-size-sm !default;\n\n$input-padding-y-lg: $input-btn-padding-y-lg !default;\n$input-padding-x-lg: $input-btn-padding-x-lg !default;\n$input-font-size-lg: $input-btn-font-size-lg !default;\n\n$input-bg: $body-bg !default;\n$input-disabled-bg: $gray-200 !default;\n$input-disabled-border-color: null !default;\n\n$input-color: $body-color !default;\n$input-border-color: $gray-400 !default;\n$input-border-width: $input-btn-border-width !default;\n$input-box-shadow: $box-shadow-inset !default;\n\n$input-border-radius: $border-radius !default;\n$input-border-radius-sm: $border-radius-sm !default;\n$input-border-radius-lg: $border-radius-lg !default;\n\n$input-focus-bg: $input-bg !default;\n$input-focus-border-color: tint-color($component-active-bg, 50%) !default;\n$input-focus-color: $input-color !default;\n$input-focus-width: $input-btn-focus-width !default;\n$input-focus-box-shadow: $input-btn-focus-box-shadow !default;\n\n$input-placeholder-color: $gray-600 !default;\n$input-plaintext-color: $body-color !default;\n\n$input-height-border: $input-border-width * 2 !default;\n\n$input-height-inner: add($input-line-height * 1em, $input-padding-y * 2) !default;\n$input-height-inner-half: add($input-line-height * .5em, $input-padding-y) !default;\n$input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y * .5) !default;\n\n$input-height: add($input-line-height * 1em, add($input-padding-y * 2, $input-height-border, false)) !default;\n$input-height-sm: add($input-line-height * 1em, add($input-padding-y-sm * 2, $input-height-border, false)) !default;\n$input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default;\n\n$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$form-color-width: 3rem !default;\n// scss-docs-end form-input-variables\n\n// scss-docs-start form-check-variables\n$form-check-input-width: 1em !default;\n$form-check-min-height: $font-size-base * $line-height-base !default;\n$form-check-padding-start: $form-check-input-width + .5em !default;\n$form-check-margin-bottom: .125rem !default;\n$form-check-label-color: null !default;\n$form-check-label-cursor: null !default;\n$form-check-transition: null !default;\n\n$form-check-input-active-filter: brightness(90%) !default;\n\n$form-check-input-bg: $input-bg !default;\n$form-check-input-border: 1px solid rgba($black, .25) !default;\n$form-check-input-border-radius: .25em !default;\n$form-check-radio-border-radius: 50% !default;\n$form-check-input-focus-border: $input-focus-border-color !default;\n$form-check-input-focus-box-shadow: $input-btn-focus-box-shadow !default;\n\n$form-check-input-checked-color: $component-active-color !default;\n$form-check-input-checked-bg-color: $component-active-bg !default;\n$form-check-input-checked-border-color: $form-check-input-checked-bg-color !default;\n$form-check-input-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-check-radio-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-check-input-indeterminate-color: $component-active-color !default;\n$form-check-input-indeterminate-bg-color: $component-active-bg !default;\n$form-check-input-indeterminate-border-color: $form-check-input-indeterminate-bg-color !default;\n$form-check-input-indeterminate-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-check-input-disabled-opacity: .5 !default;\n$form-check-label-disabled-opacity: $form-check-input-disabled-opacity !default;\n$form-check-btn-check-disabled-opacity: $btn-disabled-opacity !default;\n\n$form-check-inline-margin-end: 1rem !default;\n// scss-docs-end form-check-variables\n\n// scss-docs-start form-switch-variables\n$form-switch-color: rgba(0, 0, 0, .25) !default;\n$form-switch-width: 2em !default;\n$form-switch-padding-start: $form-switch-width + .5em !default;\n$form-switch-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-switch-border-radius: $form-switch-width !default;\n$form-switch-transition: background-position .15s ease-in-out !default;\n\n$form-switch-focus-color: $input-focus-border-color !default;\n$form-switch-focus-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-switch-checked-color: $component-active-color !default;\n$form-switch-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-switch-checked-bg-position: right center !default;\n// scss-docs-end form-switch-variables\n\n// scss-docs-start input-group-variables\n$input-group-addon-padding-y: $input-padding-y !default;\n$input-group-addon-padding-x: $input-padding-x !default;\n$input-group-addon-font-weight: $input-font-weight !default;\n$input-group-addon-color: $input-color !default;\n$input-group-addon-bg: $gray-200 !default;\n$input-group-addon-border-color: $input-border-color !default;\n// scss-docs-end input-group-variables\n\n// scss-docs-start form-select-variables\n$form-select-padding-y: $input-padding-y !default;\n$form-select-padding-x: $input-padding-x !default;\n$form-select-font-family: $input-font-family !default;\n$form-select-font-size: $input-font-size !default;\n$form-select-indicator-padding: $form-select-padding-x * 3 !default; // Extra padding for background-image\n$form-select-font-weight: $input-font-weight !default;\n$form-select-line-height: $input-line-height !default;\n$form-select-color: $input-color !default;\n$form-select-bg: $input-bg !default;\n$form-select-disabled-color: null !default;\n$form-select-disabled-bg: $gray-200 !default;\n$form-select-disabled-border-color: $input-disabled-border-color !default;\n$form-select-bg-position: right $form-select-padding-x center !default;\n$form-select-bg-size: 16px 12px !default; // In pixels because image dimensions\n$form-select-indicator-color: $gray-800 !default;\n$form-select-indicator: url(\"data:image/svg+xml,\") !default;\n\n$form-select-feedback-icon-padding-end: $form-select-padding-x * 2.5 + $form-select-indicator-padding !default;\n$form-select-feedback-icon-position: center right $form-select-indicator-padding !default;\n$form-select-feedback-icon-size: $input-height-inner-half $input-height-inner-half !default;\n\n$form-select-border-width: $input-border-width !default;\n$form-select-border-color: $input-border-color !default;\n$form-select-border-radius: $border-radius !default;\n$form-select-box-shadow: $box-shadow-inset !default;\n\n$form-select-focus-border-color: $input-focus-border-color !default;\n$form-select-focus-width: $input-focus-width !default;\n$form-select-focus-box-shadow: 0 0 0 $form-select-focus-width $input-btn-focus-color !default;\n\n$form-select-padding-y-sm: $input-padding-y-sm !default;\n$form-select-padding-x-sm: $input-padding-x-sm !default;\n$form-select-font-size-sm: $input-font-size-sm !default;\n\n$form-select-padding-y-lg: $input-padding-y-lg !default;\n$form-select-padding-x-lg: $input-padding-x-lg !default;\n$form-select-font-size-lg: $input-font-size-lg !default;\n\n$form-select-transition: $input-transition !default;\n// scss-docs-end form-select-variables\n\n// scss-docs-start form-range-variables\n$form-range-track-width: 100% !default;\n$form-range-track-height: .5rem !default;\n$form-range-track-cursor: pointer !default;\n$form-range-track-bg: $gray-300 !default;\n$form-range-track-border-radius: 1rem !default;\n$form-range-track-box-shadow: $box-shadow-inset !default;\n\n$form-range-thumb-width: 1rem !default;\n$form-range-thumb-height: $form-range-thumb-width !default;\n$form-range-thumb-bg: $component-active-bg !default;\n$form-range-thumb-border: 0 !default;\n$form-range-thumb-border-radius: 1rem !default;\n$form-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1) !default;\n$form-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-focus-box-shadow !default;\n$form-range-thumb-focus-box-shadow-width: $input-focus-width !default; // For focus box shadow issue in Edge\n$form-range-thumb-active-bg: tint-color($component-active-bg, 70%) !default;\n$form-range-thumb-disabled-bg: $gray-500 !default;\n$form-range-thumb-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n// scss-docs-end form-range-variables\n\n// scss-docs-start form-file-variables\n$form-file-button-color: $input-color !default;\n$form-file-button-bg: $input-group-addon-bg !default;\n$form-file-button-hover-bg: shade-color($form-file-button-bg, 5%) !default;\n// scss-docs-end form-file-variables\n\n// scss-docs-start form-floating-variables\n$form-floating-height: add(3.5rem, $input-height-border) !default;\n$form-floating-line-height: 1.25 !default;\n$form-floating-padding-x: $input-padding-x !default;\n$form-floating-padding-y: 1rem !default;\n$form-floating-input-padding-t: 1.625rem !default;\n$form-floating-input-padding-b: .625rem !default;\n$form-floating-label-opacity: .65 !default;\n$form-floating-label-transform: scale(.85) translateY(-.5rem) translateX(.15rem) !default;\n$form-floating-transition: opacity .1s ease-in-out, transform .1s ease-in-out !default;\n// scss-docs-end form-floating-variables\n\n// Form validation\n\n// scss-docs-start form-feedback-variables\n$form-feedback-margin-top: $form-text-margin-top !default;\n$form-feedback-font-size: $form-text-font-size !default;\n$form-feedback-font-style: $form-text-font-style !default;\n$form-feedback-valid-color: $success !default;\n$form-feedback-invalid-color: $danger !default;\n\n$form-feedback-icon-valid-color: $form-feedback-valid-color !default;\n$form-feedback-icon-valid: url(\"data:image/svg+xml,\") !default;\n$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default;\n$form-feedback-icon-invalid: url(\"data:image/svg+xml,\") !default;\n// scss-docs-end form-feedback-variables\n\n// scss-docs-start form-validation-states\n$form-validation-states: (\n \"valid\": (\n \"color\": $form-feedback-valid-color,\n \"icon\": $form-feedback-icon-valid\n ),\n \"invalid\": (\n \"color\": $form-feedback-invalid-color,\n \"icon\": $form-feedback-icon-invalid\n )\n) !default;\n// scss-docs-end form-validation-states\n\n// Z-index master list\n//\n// Warning: Avoid customizing these values. They're used for a bird's eye view\n// of components dependent on the z-axis and are designed to all work together.\n\n// scss-docs-start zindex-stack\n$zindex-dropdown: 1000 !default;\n$zindex-sticky: 1020 !default;\n$zindex-fixed: 1030 !default;\n$zindex-offcanvas-backdrop: 1040 !default;\n$zindex-offcanvas: 1045 !default;\n$zindex-modal-backdrop: 1050 !default;\n$zindex-modal: 1055 !default;\n$zindex-popover: 1070 !default;\n$zindex-tooltip: 1080 !default;\n// scss-docs-end zindex-stack\n\n\n// Navs\n\n// scss-docs-start nav-variables\n$nav-link-padding-y: .5rem !default;\n$nav-link-padding-x: 1rem !default;\n$nav-link-font-size: null !default;\n$nav-link-font-weight: null !default;\n$nav-link-color: $link-color !default;\n$nav-link-hover-color: $link-hover-color !default;\n$nav-link-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out !default;\n$nav-link-disabled-color: $gray-600 !default;\n\n$nav-tabs-border-color: $gray-300 !default;\n$nav-tabs-border-width: $border-width !default;\n$nav-tabs-border-radius: $border-radius !default;\n$nav-tabs-link-hover-border-color: $gray-200 $gray-200 $nav-tabs-border-color !default;\n$nav-tabs-link-active-color: $gray-700 !default;\n$nav-tabs-link-active-bg: $body-bg !default;\n$nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg !default;\n\n$nav-pills-border-radius: $border-radius !default;\n$nav-pills-link-active-color: $component-active-color !default;\n$nav-pills-link-active-bg: $component-active-bg !default;\n// scss-docs-end nav-variables\n\n\n// Navbar\n\n// scss-docs-start navbar-variables\n$navbar-padding-y: $spacer * .5 !default;\n$navbar-padding-x: null !default;\n\n$navbar-nav-link-padding-x: .5rem !default;\n\n$navbar-brand-font-size: $font-size-lg !default;\n// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link\n$nav-link-height: $font-size-base * $line-height-base + $nav-link-padding-y * 2 !default;\n$navbar-brand-height: $navbar-brand-font-size * $line-height-base !default;\n$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) * .5 !default;\n$navbar-brand-margin-end: 1rem !default;\n\n$navbar-toggler-padding-y: .25rem !default;\n$navbar-toggler-padding-x: .75rem !default;\n$navbar-toggler-font-size: $font-size-lg !default;\n$navbar-toggler-border-radius: $btn-border-radius !default;\n$navbar-toggler-focus-width: $btn-focus-width !default;\n$navbar-toggler-transition: box-shadow .15s ease-in-out !default;\n// scss-docs-end navbar-variables\n\n// scss-docs-start navbar-theme-variables\n$navbar-dark-color: rgba($white, .55) !default;\n$navbar-dark-hover-color: rgba($white, .75) !default;\n$navbar-dark-active-color: $white !default;\n$navbar-dark-disabled-color: rgba($white, .25) !default;\n$navbar-dark-toggler-icon-bg: url(\"data:image/svg+xml,\") !default;\n$navbar-dark-toggler-border-color: rgba($white, .1) !default;\n\n$navbar-light-color: rgba($black, .55) !default;\n$navbar-light-hover-color: rgba($black, .7) !default;\n$navbar-light-active-color: rgba($black, .9) !default;\n$navbar-light-disabled-color: rgba($black, .3) !default;\n$navbar-light-toggler-icon-bg: url(\"data:image/svg+xml,\") !default;\n$navbar-light-toggler-border-color: rgba($black, .1) !default;\n\n$navbar-light-brand-color: $navbar-light-active-color !default;\n$navbar-light-brand-hover-color: $navbar-light-active-color !default;\n$navbar-dark-brand-color: $navbar-dark-active-color !default;\n$navbar-dark-brand-hover-color: $navbar-dark-active-color !default;\n// scss-docs-end navbar-theme-variables\n\n\n// Dropdowns\n//\n// Dropdown menu container and contents.\n\n// scss-docs-start dropdown-variables\n$dropdown-min-width: 10rem !default;\n$dropdown-padding-x: 0 !default;\n$dropdown-padding-y: .5rem !default;\n$dropdown-spacer: .125rem !default;\n$dropdown-font-size: $font-size-base !default;\n$dropdown-color: $body-color !default;\n$dropdown-bg: $white !default;\n$dropdown-border-color: rgba($black, .15) !default;\n$dropdown-border-radius: $border-radius !default;\n$dropdown-border-width: $border-width !default;\n$dropdown-inner-border-radius: subtract($dropdown-border-radius, $dropdown-border-width) !default;\n$dropdown-divider-bg: $dropdown-border-color !default;\n$dropdown-divider-margin-y: $spacer * .5 !default;\n$dropdown-box-shadow: $box-shadow !default;\n\n$dropdown-link-color: $gray-900 !default;\n$dropdown-link-hover-color: shade-color($gray-900, 10%) !default;\n$dropdown-link-hover-bg: $gray-200 !default;\n\n$dropdown-link-active-color: $component-active-color !default;\n$dropdown-link-active-bg: $component-active-bg !default;\n\n$dropdown-link-disabled-color: $gray-500 !default;\n\n$dropdown-item-padding-y: $spacer * .25 !default;\n$dropdown-item-padding-x: $spacer !default;\n\n$dropdown-header-color: $gray-600 !default;\n$dropdown-header-padding: $dropdown-padding-y $dropdown-item-padding-x !default;\n// scss-docs-end dropdown-variables\n\n// scss-docs-start dropdown-dark-variables\n$dropdown-dark-color: $gray-300 !default;\n$dropdown-dark-bg: $gray-800 !default;\n$dropdown-dark-border-color: $dropdown-border-color !default;\n$dropdown-dark-divider-bg: $dropdown-divider-bg !default;\n$dropdown-dark-box-shadow: null !default;\n$dropdown-dark-link-color: $dropdown-dark-color !default;\n$dropdown-dark-link-hover-color: $white !default;\n$dropdown-dark-link-hover-bg: rgba($white, .15) !default;\n$dropdown-dark-link-active-color: $dropdown-link-active-color !default;\n$dropdown-dark-link-active-bg: $dropdown-link-active-bg !default;\n$dropdown-dark-link-disabled-color: $gray-500 !default;\n$dropdown-dark-header-color: $gray-500 !default;\n// scss-docs-end dropdown-dark-variables\n\n\n// Pagination\n\n// scss-docs-start pagination-variables\n$pagination-padding-y: .375rem !default;\n$pagination-padding-x: .75rem !default;\n$pagination-padding-y-sm: .25rem !default;\n$pagination-padding-x-sm: .5rem !default;\n$pagination-padding-y-lg: .75rem !default;\n$pagination-padding-x-lg: 1.5rem !default;\n\n$pagination-color: $link-color !default;\n$pagination-bg: $white !default;\n$pagination-border-width: $border-width !default;\n$pagination-border-radius: $border-radius !default;\n$pagination-margin-start: -$pagination-border-width !default;\n$pagination-border-color: $gray-300 !default;\n\n$pagination-focus-color: $link-hover-color !default;\n$pagination-focus-bg: $gray-200 !default;\n$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default;\n$pagination-focus-outline: 0 !default;\n\n$pagination-hover-color: $link-hover-color !default;\n$pagination-hover-bg: $gray-200 !default;\n$pagination-hover-border-color: $gray-300 !default;\n\n$pagination-active-color: $component-active-color !default;\n$pagination-active-bg: $component-active-bg !default;\n$pagination-active-border-color: $pagination-active-bg !default;\n\n$pagination-disabled-color: $gray-600 !default;\n$pagination-disabled-bg: $white !default;\n$pagination-disabled-border-color: $gray-300 !default;\n\n$pagination-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$pagination-border-radius-sm: $border-radius-sm !default;\n$pagination-border-radius-lg: $border-radius-lg !default;\n// scss-docs-end pagination-variables\n\n\n// Placeholders\n\n// scss-docs-start placeholders\n$placeholder-opacity-max: .5 !default;\n$placeholder-opacity-min: .2 !default;\n// scss-docs-end placeholders\n\n// Cards\n\n// scss-docs-start card-variables\n$card-spacer-y: $spacer !default;\n$card-spacer-x: $spacer !default;\n$card-title-spacer-y: $spacer * .5 !default;\n$card-border-width: $border-width !default;\n$card-border-color: rgba($black, .125) !default;\n$card-border-radius: $border-radius !default;\n$card-box-shadow: null !default;\n$card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default;\n$card-cap-padding-y: $card-spacer-y * .5 !default;\n$card-cap-padding-x: $card-spacer-x !default;\n$card-cap-bg: rgba($black, .03) !default;\n$card-cap-color: null !default;\n$card-height: null !default;\n$card-color: null !default;\n$card-bg: $white !default;\n$card-img-overlay-padding: $spacer !default;\n$card-group-margin: $grid-gutter-width * .5 !default;\n// scss-docs-end card-variables\n\n// Accordion\n\n// scss-docs-start accordion-variables\n$accordion-padding-y: 1rem !default;\n$accordion-padding-x: 1.25rem !default;\n$accordion-color: $body-color !default;\n$accordion-bg: $body-bg !default;\n$accordion-border-width: $border-width !default;\n$accordion-border-color: rgba($black, .125) !default;\n$accordion-border-radius: $border-radius !default;\n$accordion-inner-border-radius: subtract($accordion-border-radius, $accordion-border-width) !default;\n\n$accordion-body-padding-y: $accordion-padding-y !default;\n$accordion-body-padding-x: $accordion-padding-x !default;\n\n$accordion-button-padding-y: $accordion-padding-y !default;\n$accordion-button-padding-x: $accordion-padding-x !default;\n$accordion-button-color: $accordion-color !default;\n$accordion-button-bg: $accordion-bg !default;\n$accordion-transition: $btn-transition, border-radius .15s ease !default;\n$accordion-button-active-bg: tint-color($component-active-bg, 90%) !default;\n$accordion-button-active-color: shade-color($primary, 10%) !default;\n\n$accordion-button-focus-border-color: $input-focus-border-color !default;\n$accordion-button-focus-box-shadow: $btn-focus-box-shadow !default;\n\n$accordion-icon-width: 1.25rem !default;\n$accordion-icon-color: $accordion-button-color !default;\n$accordion-icon-active-color: $accordion-button-active-color !default;\n$accordion-icon-transition: transform .2s ease-in-out !default;\n$accordion-icon-transform: rotate(-180deg) !default;\n\n$accordion-button-icon: url(\"data:image/svg+xml,\") !default;\n$accordion-button-active-icon: url(\"data:image/svg+xml,\") !default;\n// scss-docs-end accordion-variables\n\n// Tooltips\n\n// scss-docs-start tooltip-variables\n$tooltip-font-size: $font-size-sm !default;\n$tooltip-max-width: 200px !default;\n$tooltip-color: $white !default;\n$tooltip-bg: $black !default;\n$tooltip-border-radius: $border-radius !default;\n$tooltip-opacity: .9 !default;\n$tooltip-padding-y: $spacer * .25 !default;\n$tooltip-padding-x: $spacer * .5 !default;\n$tooltip-margin: 0 !default;\n\n$tooltip-arrow-width: .8rem !default;\n$tooltip-arrow-height: .4rem !default;\n$tooltip-arrow-color: $tooltip-bg !default;\n// scss-docs-end tooltip-variables\n\n// Form tooltips must come after regular tooltips\n// scss-docs-start tooltip-feedback-variables\n$form-feedback-tooltip-padding-y: $tooltip-padding-y !default;\n$form-feedback-tooltip-padding-x: $tooltip-padding-x !default;\n$form-feedback-tooltip-font-size: $tooltip-font-size !default;\n$form-feedback-tooltip-line-height: null !default;\n$form-feedback-tooltip-opacity: $tooltip-opacity !default;\n$form-feedback-tooltip-border-radius: $tooltip-border-radius !default;\n// scss-docs-end tooltip-feedback-variables\n\n\n// Popovers\n\n// scss-docs-start popover-variables\n$popover-font-size: $font-size-sm !default;\n$popover-bg: $white !default;\n$popover-max-width: 276px !default;\n$popover-border-width: $border-width !default;\n$popover-border-color: rgba($black, .2) !default;\n$popover-border-radius: $border-radius-lg !default;\n$popover-inner-border-radius: subtract($popover-border-radius, $popover-border-width) !default;\n$popover-box-shadow: $box-shadow !default;\n\n$popover-header-bg: shade-color($popover-bg, 6%) !default;\n$popover-header-color: $headings-color !default;\n$popover-header-padding-y: .5rem !default;\n$popover-header-padding-x: $spacer !default;\n\n$popover-body-color: $body-color !default;\n$popover-body-padding-y: $spacer !default;\n$popover-body-padding-x: $spacer !default;\n\n$popover-arrow-width: 1rem !default;\n$popover-arrow-height: .5rem !default;\n$popover-arrow-color: $popover-bg !default;\n\n$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default;\n// scss-docs-end popover-variables\n\n\n// Toasts\n\n// scss-docs-start toast-variables\n$toast-max-width: 350px !default;\n$toast-padding-x: .75rem !default;\n$toast-padding-y: .5rem !default;\n$toast-font-size: .875rem !default;\n$toast-color: null !default;\n$toast-background-color: rgba($white, .85) !default;\n$toast-border-width: 1px !default;\n$toast-border-color: rgba(0, 0, 0, .1) !default;\n$toast-border-radius: $border-radius !default;\n$toast-box-shadow: $box-shadow !default;\n$toast-spacing: $container-padding-x !default;\n\n$toast-header-color: $gray-600 !default;\n$toast-header-background-color: rgba($white, .85) !default;\n$toast-header-border-color: rgba(0, 0, 0, .05) !default;\n// scss-docs-end toast-variables\n\n\n// Badges\n\n// scss-docs-start badge-variables\n$badge-font-size: .75em !default;\n$badge-font-weight: $font-weight-bold !default;\n$badge-color: $white !default;\n$badge-padding-y: .35em !default;\n$badge-padding-x: .65em !default;\n$badge-border-radius: $border-radius !default;\n// scss-docs-end badge-variables\n\n\n// Modals\n\n// scss-docs-start modal-variables\n$modal-inner-padding: $spacer !default;\n\n$modal-footer-margin-between: .5rem !default;\n\n$modal-dialog-margin: .5rem !default;\n$modal-dialog-margin-y-sm-up: 1.75rem !default;\n\n$modal-title-line-height: $line-height-base !default;\n\n$modal-content-color: null !default;\n$modal-content-bg: $white !default;\n$modal-content-border-color: rgba($black, .2) !default;\n$modal-content-border-width: $border-width !default;\n$modal-content-border-radius: $border-radius-lg !default;\n$modal-content-inner-border-radius: subtract($modal-content-border-radius, $modal-content-border-width) !default;\n$modal-content-box-shadow-xs: $box-shadow-sm !default;\n$modal-content-box-shadow-sm-up: $box-shadow !default;\n\n$modal-backdrop-bg: $black !default;\n$modal-backdrop-opacity: .5 !default;\n$modal-header-border-color: $border-color !default;\n$modal-footer-border-color: $modal-header-border-color !default;\n$modal-header-border-width: $modal-content-border-width !default;\n$modal-footer-border-width: $modal-header-border-width !default;\n$modal-header-padding-y: $modal-inner-padding !default;\n$modal-header-padding-x: $modal-inner-padding !default;\n$modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility\n\n$modal-sm: 300px !default;\n$modal-md: 500px !default;\n$modal-lg: 800px !default;\n$modal-xl: 1140px !default;\n\n$modal-fade-transform: translate(0, -50px) !default;\n$modal-show-transform: none !default;\n$modal-transition: transform .3s ease-out !default;\n$modal-scale-transform: scale(1.02) !default;\n// scss-docs-end modal-variables\n\n\n// Alerts\n//\n// Define alert colors, border radius, and padding.\n\n// scss-docs-start alert-variables\n$alert-padding-y: $spacer !default;\n$alert-padding-x: $spacer !default;\n$alert-margin-bottom: 1rem !default;\n$alert-border-radius: $border-radius !default;\n$alert-link-font-weight: $font-weight-bold !default;\n$alert-border-width: $border-width !default;\n$alert-bg-scale: -80% !default;\n$alert-border-scale: -70% !default;\n$alert-color-scale: 40% !default;\n$alert-dismissible-padding-r: $alert-padding-x * 3 !default; // 3x covers width of x plus default padding on either side\n// scss-docs-end alert-variables\n\n\n// Progress bars\n\n// scss-docs-start progress-variables\n$progress-height: 1rem !default;\n$progress-font-size: $font-size-base * .75 !default;\n$progress-bg: $gray-200 !default;\n$progress-border-radius: $border-radius !default;\n$progress-box-shadow: $box-shadow-inset !default;\n$progress-bar-color: $white !default;\n$progress-bar-bg: $primary !default;\n$progress-bar-animation-timing: 1s linear infinite !default;\n$progress-bar-transition: width .6s ease !default;\n// scss-docs-end progress-variables\n\n\n// List group\n\n// scss-docs-start list-group-variables\n$list-group-color: $gray-900 !default;\n$list-group-bg: $white !default;\n$list-group-border-color: rgba($black, .125) !default;\n$list-group-border-width: $border-width !default;\n$list-group-border-radius: $border-radius !default;\n\n$list-group-item-padding-y: $spacer * .5 !default;\n$list-group-item-padding-x: $spacer !default;\n$list-group-item-bg-scale: -80% !default;\n$list-group-item-color-scale: 40% !default;\n\n$list-group-hover-bg: $gray-100 !default;\n$list-group-active-color: $component-active-color !default;\n$list-group-active-bg: $component-active-bg !default;\n$list-group-active-border-color: $list-group-active-bg !default;\n\n$list-group-disabled-color: $gray-600 !default;\n$list-group-disabled-bg: $list-group-bg !default;\n\n$list-group-action-color: $gray-700 !default;\n$list-group-action-hover-color: $list-group-action-color !default;\n\n$list-group-action-active-color: $body-color !default;\n$list-group-action-active-bg: $gray-200 !default;\n// scss-docs-end list-group-variables\n\n\n// Image thumbnails\n\n// scss-docs-start thumbnail-variables\n$thumbnail-padding: .25rem !default;\n$thumbnail-bg: $body-bg !default;\n$thumbnail-border-width: $border-width !default;\n$thumbnail-border-color: $gray-300 !default;\n$thumbnail-border-radius: $border-radius !default;\n$thumbnail-box-shadow: $box-shadow-sm !default;\n// scss-docs-end thumbnail-variables\n\n\n// Figures\n\n// scss-docs-start figure-variables\n$figure-caption-font-size: $small-font-size !default;\n$figure-caption-color: $gray-600 !default;\n// scss-docs-end figure-variables\n\n\n// Breadcrumbs\n\n// scss-docs-start breadcrumb-variables\n$breadcrumb-font-size: null !default;\n$breadcrumb-padding-y: 0 !default;\n$breadcrumb-padding-x: 0 !default;\n$breadcrumb-item-padding-x: .5rem !default;\n$breadcrumb-margin-bottom: 1rem !default;\n$breadcrumb-bg: null !default;\n$breadcrumb-divider-color: $gray-600 !default;\n$breadcrumb-active-color: $gray-600 !default;\n$breadcrumb-divider: quote(\"/\") !default;\n$breadcrumb-divider-flipped: $breadcrumb-divider !default;\n$breadcrumb-border-radius: null !default;\n// scss-docs-end breadcrumb-variables\n\n// Carousel\n\n// scss-docs-start carousel-variables\n$carousel-control-color: $white !default;\n$carousel-control-width: 15% !default;\n$carousel-control-opacity: .5 !default;\n$carousel-control-hover-opacity: .9 !default;\n$carousel-control-transition: opacity .15s ease !default;\n\n$carousel-indicator-width: 30px !default;\n$carousel-indicator-height: 3px !default;\n$carousel-indicator-hit-area-height: 10px !default;\n$carousel-indicator-spacer: 3px !default;\n$carousel-indicator-opacity: .5 !default;\n$carousel-indicator-active-bg: $white !default;\n$carousel-indicator-active-opacity: 1 !default;\n$carousel-indicator-transition: opacity .6s ease !default;\n\n$carousel-caption-width: 70% !default;\n$carousel-caption-color: $white !default;\n$carousel-caption-padding-y: 1.25rem !default;\n$carousel-caption-spacer: 1.25rem !default;\n\n$carousel-control-icon-width: 2rem !default;\n\n$carousel-control-prev-icon-bg: url(\"data:image/svg+xml,\") !default;\n$carousel-control-next-icon-bg: url(\"data:image/svg+xml,\") !default;\n\n$carousel-transition-duration: .6s !default;\n$carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)\n\n$carousel-dark-indicator-active-bg: $black !default;\n$carousel-dark-caption-color: $black !default;\n$carousel-dark-control-icon-filter: invert(1) grayscale(100) !default;\n// scss-docs-end carousel-variables\n\n\n// Spinners\n\n// scss-docs-start spinner-variables\n$spinner-width: 2rem !default;\n$spinner-height: $spinner-width !default;\n$spinner-vertical-align: -.125em !default;\n$spinner-border-width: .25em !default;\n$spinner-animation-speed: .75s !default;\n\n$spinner-width-sm: 1rem !default;\n$spinner-height-sm: $spinner-width-sm !default;\n$spinner-border-width-sm: .2em !default;\n// scss-docs-end spinner-variables\n\n\n// Close\n\n// scss-docs-start close-variables\n$btn-close-width: 1em !default;\n$btn-close-height: $btn-close-width !default;\n$btn-close-padding-x: .25em !default;\n$btn-close-padding-y: $btn-close-padding-x !default;\n$btn-close-color: $black !default;\n$btn-close-bg: url(\"data:image/svg+xml,\") !default;\n$btn-close-focus-shadow: $input-btn-focus-box-shadow !default;\n$btn-close-opacity: .5 !default;\n$btn-close-hover-opacity: .75 !default;\n$btn-close-focus-opacity: 1 !default;\n$btn-close-disabled-opacity: .25 !default;\n$btn-close-white-filter: invert(1) grayscale(100%) brightness(200%) !default;\n// scss-docs-end close-variables\n\n\n// Offcanvas\n\n// scss-docs-start offcanvas-variables\n$offcanvas-padding-y: $modal-inner-padding !default;\n$offcanvas-padding-x: $modal-inner-padding !default;\n$offcanvas-horizontal-width: 400px !default;\n$offcanvas-vertical-height: 30vh !default;\n$offcanvas-transition-duration: .3s !default;\n$offcanvas-border-color: $modal-content-border-color !default;\n$offcanvas-border-width: $modal-content-border-width !default;\n$offcanvas-title-line-height: $modal-title-line-height !default;\n$offcanvas-bg-color: $modal-content-bg !default;\n$offcanvas-color: $modal-content-color !default;\n$offcanvas-box-shadow: $modal-content-box-shadow-xs !default;\n$offcanvas-backdrop-bg: $modal-backdrop-bg !default;\n$offcanvas-backdrop-opacity: $modal-backdrop-opacity !default;\n// scss-docs-end offcanvas-variables\n\n// Code\n\n$code-font-size: $small-font-size !default;\n$code-color: $pink !default;\n\n$kbd-padding-y: .2rem !default;\n$kbd-padding-x: .4rem !default;\n$kbd-font-size: $code-font-size !default;\n$kbd-color: $white !default;\n$kbd-bg: $gray-900 !default;\n\n$pre-color: null !default;\n","// Row\n//\n// Rows contain your columns.\n\n@if $enable-grid-classes {\n .row {\n @include make-row();\n\n > * {\n @include make-col-ready();\n }\n }\n}\n\n@if $enable-cssgrid {\n .grid {\n display: grid;\n grid-template-rows: repeat(var(--#{$variable-prefix}rows, 1), 1fr);\n grid-template-columns: repeat(var(--#{$variable-prefix}columns, #{$grid-columns}), 1fr);\n gap: var(--#{$variable-prefix}gap, #{$grid-gutter-width});\n\n @include make-cssgrid();\n }\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n@if $enable-grid-classes {\n @include make-grid-columns();\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n@mixin make-row($gutter: $grid-gutter-width) {\n --#{$variable-prefix}gutter-x: #{$gutter};\n --#{$variable-prefix}gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list\n margin-right: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n margin-left: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n}\n\n@mixin make-col-ready($gutter: $grid-gutter-width) {\n // Add box sizing if only the grid is loaded\n box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);\n // Prevent columns from becoming too narrow when at smaller grid tiers by\n // always setting `width: 100%;`. This works because we set the width\n // later on to override this initial width.\n flex-shrink: 0;\n width: 100%;\n max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid\n padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n padding-left: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n margin-top: var(--#{$variable-prefix}gutter-y);\n}\n\n@mixin make-col($size: false, $columns: $grid-columns) {\n @if $size {\n flex: 0 0 auto;\n width: percentage(divide($size, $columns));\n\n } @else {\n flex: 1 1 0;\n max-width: 100%;\n }\n}\n\n@mixin make-col-auto() {\n flex: 0 0 auto;\n width: auto;\n}\n\n@mixin make-col-offset($size, $columns: $grid-columns) {\n $num: divide($size, $columns);\n margin-left: if($num == 0, 0, percentage($num));\n}\n\n// Row columns\n//\n// Specify on a parent element(e.g., .row) to force immediate children into NN\n// numberof columns. Supports wrapping to new lines, but does not do a Masonry\n// style grid.\n@mixin row-cols($count) {\n > * {\n flex: 0 0 auto;\n width: divide(100%, $count);\n }\n}\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `$grid-columns`.\n\n@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n // Provide basic `.col-{bp}` classes for equal-width flexbox columns\n .col#{$infix} {\n flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4\n }\n\n .row-cols#{$infix}-auto > * {\n @include make-col-auto();\n }\n\n @if $grid-row-columns > 0 {\n @for $i from 1 through $grid-row-columns {\n .row-cols#{$infix}-#{$i} {\n @include row-cols($i);\n }\n }\n }\n\n .col#{$infix}-auto {\n @include make-col-auto();\n }\n\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .col#{$infix}-#{$i} {\n @include make-col($i, $columns);\n }\n }\n\n // `$columns - 1` because offsetting by the width of an entire row isn't possible\n @for $i from 0 through ($columns - 1) {\n @if not ($infix == \"\" and $i == 0) { // Avoid emitting useless .offset-0\n .offset#{$infix}-#{$i} {\n @include make-col-offset($i, $columns);\n }\n }\n }\n }\n\n // Gutters\n //\n // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.\n @each $key, $value in $gutters {\n .g#{$infix}-#{$key},\n .gx#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-x: #{$value};\n }\n\n .g#{$infix}-#{$key},\n .gy#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-y: #{$value};\n }\n }\n }\n }\n}\n\n@mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .g-col#{$infix}-#{$i} {\n grid-column: auto / span $i;\n }\n }\n\n // Start with `1` because `0` is and invalid value.\n // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.\n @for $i from 1 through ($columns - 1) {\n .g-start#{$infix}-#{$i} {\n grid-column-start: $i;\n }\n }\n }\n }\n }\n}\n","// Utility generator\n// Used to generate utilities & print utilities\n@mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {\n $values: map-get($utility, values);\n\n // If the values are a list or string, convert it into a map\n @if type-of($values) == \"string\" or type-of(nth($values, 1)) != \"list\" {\n $values: zip($values, $values);\n }\n\n @each $key, $value in $values {\n $properties: map-get($utility, property);\n\n // Multiple properties are possible, for example with vertical or horizontal margins or paddings\n @if type-of($properties) == \"string\" {\n $properties: append((), $properties);\n }\n\n // Use custom class if present\n $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));\n $property-class: if($property-class == null, \"\", $property-class);\n\n // State params to generate pseudo-classes\n $state: if(map-has-key($utility, state), map-get($utility, state), ());\n\n $infix: if($property-class == \"\" and str-slice($infix, 1, 1) == \"-\", str-slice($infix, 2), $infix);\n\n // Don't prefix if value key is null (eg. with shadow class)\n $property-class-modifier: if($key, if($property-class == \"\" and $infix == \"\", \"\", \"-\") + $key, \"\");\n\n @if map-get($utility, rfs) {\n // Inside the media query\n @if $is-rfs-media-query {\n $val: rfs-value($value);\n\n // Do not render anything if fluid and non fluid values are the same\n $value: if($val == rfs-fluid-value($value), null, $val);\n }\n @else {\n $value: rfs-fluid-value($value);\n }\n }\n\n $is-css-var: map-get($utility, css-var);\n $is-local-vars: map-get($utility, local-vars);\n $is-rtl: map-get($utility, rtl);\n\n @if $value != null {\n @if $is-rtl == false {\n /* rtl:begin:remove */\n }\n\n @if $is-css-var {\n .#{$property-class + $infix + $property-class-modifier} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n }\n } @else {\n .#{$property-class + $infix + $property-class-modifier} {\n @each $property in $properties {\n @if $is-local-vars {\n @each $local-var, $value in $is-local-vars {\n --#{$variable-prefix}#{$local-var}: #{$value};\n }\n }\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n @each $property in $properties {\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n }\n }\n\n @if $is-rtl == false {\n /* rtl:end:remove */\n }\n }\n }\n}\n","// Loop over each breakpoint\n@each $breakpoint in map-keys($grid-breakpoints) {\n\n // Generate media query if needed\n @include media-breakpoint-up($breakpoint) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix);\n }\n }\n }\n}\n\n// RFS rescaling\n@media (min-width: $rfs-mq-value) {\n @each $breakpoint in map-keys($grid-breakpoints) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n @if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix, true);\n }\n }\n }\n }\n}\n\n\n// Print utilities\n@media print {\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Then check if the utility needs print styles\n @if type-of($utility) == \"map\" and map-get($utility, print) == true {\n @include generate-utility($utility, \"-print\");\n }\n }\n}\n"]} \ No newline at end of file diff --git a/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css new file mode 100644 index 0000000..d3dfc1b --- /dev/null +++ b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap Grid v5.1.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{width:100%;padding-left:var(--bs-gutter-x,.75rem);padding-right:var(--bs-gutter-x,.75rem);margin-left:auto;margin-right:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(var(--bs-gutter-y) * -1);margin-left:calc(var(--bs-gutter-x) * -.5);margin-right:calc(var(--bs-gutter-x) * -.5)}.row>*{box-sizing:border-box;flex-shrink:0;width:100%;max-width:100%;padding-left:calc(var(--bs-gutter-x) * .5);padding-right:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-right:8.33333333%}.offset-2{margin-right:16.66666667%}.offset-3{margin-right:25%}.offset-4{margin-right:33.33333333%}.offset-5{margin-right:41.66666667%}.offset-6{margin-right:50%}.offset-7{margin-right:58.33333333%}.offset-8{margin-right:66.66666667%}.offset-9{margin-right:75%}.offset-10{margin-right:83.33333333%}.offset-11{margin-right:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-right:0}.offset-sm-1{margin-right:8.33333333%}.offset-sm-2{margin-right:16.66666667%}.offset-sm-3{margin-right:25%}.offset-sm-4{margin-right:33.33333333%}.offset-sm-5{margin-right:41.66666667%}.offset-sm-6{margin-right:50%}.offset-sm-7{margin-right:58.33333333%}.offset-sm-8{margin-right:66.66666667%}.offset-sm-9{margin-right:75%}.offset-sm-10{margin-right:83.33333333%}.offset-sm-11{margin-right:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-right:0}.offset-md-1{margin-right:8.33333333%}.offset-md-2{margin-right:16.66666667%}.offset-md-3{margin-right:25%}.offset-md-4{margin-right:33.33333333%}.offset-md-5{margin-right:41.66666667%}.offset-md-6{margin-right:50%}.offset-md-7{margin-right:58.33333333%}.offset-md-8{margin-right:66.66666667%}.offset-md-9{margin-right:75%}.offset-md-10{margin-right:83.33333333%}.offset-md-11{margin-right:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-right:0}.offset-lg-1{margin-right:8.33333333%}.offset-lg-2{margin-right:16.66666667%}.offset-lg-3{margin-right:25%}.offset-lg-4{margin-right:33.33333333%}.offset-lg-5{margin-right:41.66666667%}.offset-lg-6{margin-right:50%}.offset-lg-7{margin-right:58.33333333%}.offset-lg-8{margin-right:66.66666667%}.offset-lg-9{margin-right:75%}.offset-lg-10{margin-right:83.33333333%}.offset-lg-11{margin-right:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-right:0}.offset-xl-1{margin-right:8.33333333%}.offset-xl-2{margin-right:16.66666667%}.offset-xl-3{margin-right:25%}.offset-xl-4{margin-right:33.33333333%}.offset-xl-5{margin-right:41.66666667%}.offset-xl-6{margin-right:50%}.offset-xl-7{margin-right:58.33333333%}.offset-xl-8{margin-right:66.66666667%}.offset-xl-9{margin-right:75%}.offset-xl-10{margin-right:83.33333333%}.offset-xl-11{margin-right:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-right:0}.offset-xxl-1{margin-right:8.33333333%}.offset-xxl-2{margin-right:16.66666667%}.offset-xxl-3{margin-right:25%}.offset-xxl-4{margin-right:33.33333333%}.offset-xxl-5{margin-right:41.66666667%}.offset-xxl-6{margin-right:50%}.offset-xxl-7{margin-right:58.33333333%}.offset-xxl-8{margin-right:66.66666667%}.offset-xxl-9{margin-right:75%}.offset-xxl-10{margin-right:83.33333333%}.offset-xxl-11{margin-right:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-left:0!important;margin-right:0!important}.mx-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-3{margin-left:1rem!important;margin-right:1rem!important}.mx-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-5{margin-left:3rem!important;margin-right:3rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-left:0!important}.me-1{margin-left:.25rem!important}.me-2{margin-left:.5rem!important}.me-3{margin-left:1rem!important}.me-4{margin-left:1.5rem!important}.me-5{margin-left:3rem!important}.me-auto{margin-left:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-right:0!important}.ms-1{margin-right:.25rem!important}.ms-2{margin-right:.5rem!important}.ms-3{margin-right:1rem!important}.ms-4{margin-right:1.5rem!important}.ms-5{margin-right:3rem!important}.ms-auto{margin-right:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-left:0!important;padding-right:0!important}.px-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-3{padding-left:1rem!important;padding-right:1rem!important}.px-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-5{padding-left:3rem!important;padding-right:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-left:0!important}.pe-1{padding-left:.25rem!important}.pe-2{padding-left:.5rem!important}.pe-3{padding-left:1rem!important}.pe-4{padding-left:1.5rem!important}.pe-5{padding-left:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-right:0!important}.ps-1{padding-right:.25rem!important}.ps-2{padding-right:.5rem!important}.ps-3{padding-right:1rem!important}.ps-4{padding-right:1.5rem!important}.ps-5{padding-right:3rem!important}@media (min-width:576px){.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-left:0!important;margin-right:0!important}.mx-sm-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-sm-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-sm-3{margin-left:1rem!important;margin-right:1rem!important}.mx-sm-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-sm-5{margin-left:3rem!important;margin-right:3rem!important}.mx-sm-auto{margin-left:auto!important;margin-right:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-left:0!important}.me-sm-1{margin-left:.25rem!important}.me-sm-2{margin-left:.5rem!important}.me-sm-3{margin-left:1rem!important}.me-sm-4{margin-left:1.5rem!important}.me-sm-5{margin-left:3rem!important}.me-sm-auto{margin-left:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-right:0!important}.ms-sm-1{margin-right:.25rem!important}.ms-sm-2{margin-right:.5rem!important}.ms-sm-3{margin-right:1rem!important}.ms-sm-4{margin-right:1.5rem!important}.ms-sm-5{margin-right:3rem!important}.ms-sm-auto{margin-right:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-left:0!important;padding-right:0!important}.px-sm-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-sm-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-sm-3{padding-left:1rem!important;padding-right:1rem!important}.px-sm-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-sm-5{padding-left:3rem!important;padding-right:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-left:0!important}.pe-sm-1{padding-left:.25rem!important}.pe-sm-2{padding-left:.5rem!important}.pe-sm-3{padding-left:1rem!important}.pe-sm-4{padding-left:1.5rem!important}.pe-sm-5{padding-left:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-right:0!important}.ps-sm-1{padding-right:.25rem!important}.ps-sm-2{padding-right:.5rem!important}.ps-sm-3{padding-right:1rem!important}.ps-sm-4{padding-right:1.5rem!important}.ps-sm-5{padding-right:3rem!important}}@media (min-width:768px){.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-left:0!important;margin-right:0!important}.mx-md-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-md-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-md-3{margin-left:1rem!important;margin-right:1rem!important}.mx-md-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-md-5{margin-left:3rem!important;margin-right:3rem!important}.mx-md-auto{margin-left:auto!important;margin-right:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-left:0!important}.me-md-1{margin-left:.25rem!important}.me-md-2{margin-left:.5rem!important}.me-md-3{margin-left:1rem!important}.me-md-4{margin-left:1.5rem!important}.me-md-5{margin-left:3rem!important}.me-md-auto{margin-left:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-right:0!important}.ms-md-1{margin-right:.25rem!important}.ms-md-2{margin-right:.5rem!important}.ms-md-3{margin-right:1rem!important}.ms-md-4{margin-right:1.5rem!important}.ms-md-5{margin-right:3rem!important}.ms-md-auto{margin-right:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-left:0!important;padding-right:0!important}.px-md-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-md-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-md-3{padding-left:1rem!important;padding-right:1rem!important}.px-md-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-md-5{padding-left:3rem!important;padding-right:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-left:0!important}.pe-md-1{padding-left:.25rem!important}.pe-md-2{padding-left:.5rem!important}.pe-md-3{padding-left:1rem!important}.pe-md-4{padding-left:1.5rem!important}.pe-md-5{padding-left:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-right:0!important}.ps-md-1{padding-right:.25rem!important}.ps-md-2{padding-right:.5rem!important}.ps-md-3{padding-right:1rem!important}.ps-md-4{padding-right:1.5rem!important}.ps-md-5{padding-right:3rem!important}}@media (min-width:992px){.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-left:0!important;margin-right:0!important}.mx-lg-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-lg-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-lg-3{margin-left:1rem!important;margin-right:1rem!important}.mx-lg-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-lg-5{margin-left:3rem!important;margin-right:3rem!important}.mx-lg-auto{margin-left:auto!important;margin-right:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-left:0!important}.me-lg-1{margin-left:.25rem!important}.me-lg-2{margin-left:.5rem!important}.me-lg-3{margin-left:1rem!important}.me-lg-4{margin-left:1.5rem!important}.me-lg-5{margin-left:3rem!important}.me-lg-auto{margin-left:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-right:0!important}.ms-lg-1{margin-right:.25rem!important}.ms-lg-2{margin-right:.5rem!important}.ms-lg-3{margin-right:1rem!important}.ms-lg-4{margin-right:1.5rem!important}.ms-lg-5{margin-right:3rem!important}.ms-lg-auto{margin-right:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-left:0!important;padding-right:0!important}.px-lg-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-lg-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-lg-3{padding-left:1rem!important;padding-right:1rem!important}.px-lg-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-lg-5{padding-left:3rem!important;padding-right:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-left:0!important}.pe-lg-1{padding-left:.25rem!important}.pe-lg-2{padding-left:.5rem!important}.pe-lg-3{padding-left:1rem!important}.pe-lg-4{padding-left:1.5rem!important}.pe-lg-5{padding-left:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-right:0!important}.ps-lg-1{padding-right:.25rem!important}.ps-lg-2{padding-right:.5rem!important}.ps-lg-3{padding-right:1rem!important}.ps-lg-4{padding-right:1.5rem!important}.ps-lg-5{padding-right:3rem!important}}@media (min-width:1200px){.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-left:0!important;margin-right:0!important}.mx-xl-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-xl-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-xl-3{margin-left:1rem!important;margin-right:1rem!important}.mx-xl-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-xl-5{margin-left:3rem!important;margin-right:3rem!important}.mx-xl-auto{margin-left:auto!important;margin-right:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-left:0!important}.me-xl-1{margin-left:.25rem!important}.me-xl-2{margin-left:.5rem!important}.me-xl-3{margin-left:1rem!important}.me-xl-4{margin-left:1.5rem!important}.me-xl-5{margin-left:3rem!important}.me-xl-auto{margin-left:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-right:0!important}.ms-xl-1{margin-right:.25rem!important}.ms-xl-2{margin-right:.5rem!important}.ms-xl-3{margin-right:1rem!important}.ms-xl-4{margin-right:1.5rem!important}.ms-xl-5{margin-right:3rem!important}.ms-xl-auto{margin-right:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-left:0!important;padding-right:0!important}.px-xl-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-xl-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-xl-3{padding-left:1rem!important;padding-right:1rem!important}.px-xl-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-xl-5{padding-left:3rem!important;padding-right:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-left:0!important}.pe-xl-1{padding-left:.25rem!important}.pe-xl-2{padding-left:.5rem!important}.pe-xl-3{padding-left:1rem!important}.pe-xl-4{padding-left:1.5rem!important}.pe-xl-5{padding-left:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-right:0!important}.ps-xl-1{padding-right:.25rem!important}.ps-xl-2{padding-right:.5rem!important}.ps-xl-3{padding-right:1rem!important}.ps-xl-4{padding-right:1.5rem!important}.ps-xl-5{padding-right:3rem!important}}@media (min-width:1400px){.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-left:0!important;margin-right:0!important}.mx-xxl-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-xxl-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-xxl-3{margin-left:1rem!important;margin-right:1rem!important}.mx-xxl-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-xxl-5{margin-left:3rem!important;margin-right:3rem!important}.mx-xxl-auto{margin-left:auto!important;margin-right:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-left:0!important}.me-xxl-1{margin-left:.25rem!important}.me-xxl-2{margin-left:.5rem!important}.me-xxl-3{margin-left:1rem!important}.me-xxl-4{margin-left:1.5rem!important}.me-xxl-5{margin-left:3rem!important}.me-xxl-auto{margin-left:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-right:0!important}.ms-xxl-1{margin-right:.25rem!important}.ms-xxl-2{margin-right:.5rem!important}.ms-xxl-3{margin-right:1rem!important}.ms-xxl-4{margin-right:1.5rem!important}.ms-xxl-5{margin-right:3rem!important}.ms-xxl-auto{margin-right:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-left:0!important;padding-right:0!important}.px-xxl-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-xxl-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-xxl-3{padding-left:1rem!important;padding-right:1rem!important}.px-xxl-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-xxl-5{padding-left:3rem!important;padding-right:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-left:0!important}.pe-xxl-1{padding-left:.25rem!important}.pe-xxl-2{padding-left:.5rem!important}.pe-xxl-3{padding-left:1rem!important}.pe-xxl-4{padding-left:1.5rem!important}.pe-xxl-5{padding-left:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-right:0!important}.ps-xxl-1{padding-right:.25rem!important}.ps-xxl-2{padding-right:.5rem!important}.ps-xxl-3{padding-right:1rem!important}.ps-xxl-4{padding-right:1.5rem!important}.ps-xxl-5{padding-right:3rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}} +/*# sourceMappingURL=bootstrap-grid.rtl.min.css.map */ \ No newline at end of file diff --git a/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map new file mode 100644 index 0000000..86d302a --- /dev/null +++ b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/bootstrap-grid.scss","../../scss/_containers.scss","dist/css/bootstrap-grid.rtl.css","../../scss/mixins/_container.scss","../../scss/mixins/_breakpoints.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AAAA;;;;;ACME,WCCF,iBAGA,cACA,cACA,cAHA,cADA,eCLE,MAAA,KACA,aAAA,0BACA,cAAA,0BACA,YAAA,KACA,aAAA,KCwDE,yBH5CE,WAAA,cACE,UAAA,OG2CJ,yBH5CE,WAAA,cAAA,cACE,UAAA,OG2CJ,yBH5CE,WAAA,cAAA,cAAA,cACE,UAAA,OG2CJ,0BH5CE,WAAA,cAAA,cAAA,cAAA,cACE,UAAA,QG2CJ,0BH5CE,WAAA,cAAA,cAAA,cAAA,cAAA,eACE,UAAA,QIfN,KCAA,cAAA,OACA,cAAA,EACA,QAAA,KACA,UAAA,KACA,WAAA,8BACA,YAAA,+BACA,aAAA,+BDHE,OCQF,WAAA,WAIA,YAAA,EACA,MAAA,KACA,UAAA,KACA,aAAA,8BACA,cAAA,8BACA,WAAA,mBA+CI,KACE,KAAA,EAAA,EAAA,GAGF,iBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,cACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,UAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,UAxDV,aAAA,YAwDU,UAxDV,aAAA,aAwDU,UAxDV,aAAA,IAwDU,UAxDV,aAAA,aAwDU,UAxDV,aAAA,aAwDU,UAxDV,aAAA,IAwDU,UAxDV,aAAA,aAwDU,UAxDV,aAAA,aAwDU,UAxDV,aAAA,IAwDU,WAxDV,aAAA,aAwDU,WAxDV,aAAA,aAmEM,KJoGR,MIlGU,cAAA,EAGF,KJoGR,MIlGU,cAAA,EAPF,KJ8GR,MI5GU,cAAA,QAGF,KJ8GR,MI5GU,cAAA,QAPF,KJwHR,MItHU,cAAA,OAGF,KJwHR,MItHU,cAAA,OAPF,KJkIR,MIhIU,cAAA,KAGF,KJkIR,MIhIU,cAAA,KAPF,KJ4IR,MI1IU,cAAA,OAGF,KJ4IR,MI1IU,cAAA,OAPF,KJsJR,MIpJU,cAAA,KAGF,KJsJR,MIpJU,cAAA,KFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,aAAA,EAwDU,aAxDV,aAAA,YAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,aAmEM,QJyTR,SIvTU,cAAA,EAGF,QJyTR,SIvTU,cAAA,EAPF,QJmUR,SIjUU,cAAA,QAGF,QJmUR,SIjUU,cAAA,QAPF,QJ6UR,SI3UU,cAAA,OAGF,QJ6UR,SI3UU,cAAA,OAPF,QJuVR,SIrVU,cAAA,KAGF,QJuVR,SIrVU,cAAA,KAPF,QJiWR,SI/VU,cAAA,OAGF,QJiWR,SI/VU,cAAA,OAPF,QJ2WR,SIzWU,cAAA,KAGF,QJ2WR,SIzWU,cAAA,MFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,aAAA,EAwDU,aAxDV,aAAA,YAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,aAmEM,QJ8gBR,SI5gBU,cAAA,EAGF,QJ8gBR,SI5gBU,cAAA,EAPF,QJwhBR,SIthBU,cAAA,QAGF,QJwhBR,SIthBU,cAAA,QAPF,QJkiBR,SIhiBU,cAAA,OAGF,QJkiBR,SIhiBU,cAAA,OAPF,QJ4iBR,SI1iBU,cAAA,KAGF,QJ4iBR,SI1iBU,cAAA,KAPF,QJsjBR,SIpjBU,cAAA,OAGF,QJsjBR,SIpjBU,cAAA,OAPF,QJgkBR,SI9jBU,cAAA,KAGF,QJgkBR,SI9jBU,cAAA,MFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,aAAA,EAwDU,aAxDV,aAAA,YAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,aAmEM,QJmuBR,SIjuBU,cAAA,EAGF,QJmuBR,SIjuBU,cAAA,EAPF,QJ6uBR,SI3uBU,cAAA,QAGF,QJ6uBR,SI3uBU,cAAA,QAPF,QJuvBR,SIrvBU,cAAA,OAGF,QJuvBR,SIrvBU,cAAA,OAPF,QJiwBR,SI/vBU,cAAA,KAGF,QJiwBR,SI/vBU,cAAA,KAPF,QJ2wBR,SIzwBU,cAAA,OAGF,QJ2wBR,SIzwBU,cAAA,OAPF,QJqxBR,SInxBU,cAAA,KAGF,QJqxBR,SInxBU,cAAA,MFzDN,0BESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,aAAA,EAwDU,aAxDV,aAAA,YAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,aAmEM,QJw7BR,SIt7BU,cAAA,EAGF,QJw7BR,SIt7BU,cAAA,EAPF,QJk8BR,SIh8BU,cAAA,QAGF,QJk8BR,SIh8BU,cAAA,QAPF,QJ48BR,SI18BU,cAAA,OAGF,QJ48BR,SI18BU,cAAA,OAPF,QJs9BR,SIp9BU,cAAA,KAGF,QJs9BR,SIp9BU,cAAA,KAPF,QJg+BR,SI99BU,cAAA,OAGF,QJg+BR,SI99BU,cAAA,OAPF,QJ0+BR,SIx+BU,cAAA,KAGF,QJ0+BR,SIx+BU,cAAA,MFzDN,0BESE,SACE,KAAA,EAAA,EAAA,GAGF,qBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,cAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,cAxDV,aAAA,EAwDU,cAxDV,aAAA,YAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,IAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,IAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,IAwDU,eAxDV,aAAA,aAwDU,eAxDV,aAAA,aAmEM,SJ6oCR,UI3oCU,cAAA,EAGF,SJ6oCR,UI3oCU,cAAA,EAPF,SJupCR,UIrpCU,cAAA,QAGF,SJupCR,UIrpCU,cAAA,QAPF,SJiqCR,UI/pCU,cAAA,OAGF,SJiqCR,UI/pCU,cAAA,OAPF,SJ2qCR,UIzqCU,cAAA,KAGF,SJ2qCR,UIzqCU,cAAA,KAPF,SJqrCR,UInrCU,cAAA,OAGF,SJqrCR,UInrCU,cAAA,OAPF,SJ+rCR,UI7rCU,cAAA,KAGF,SJ+rCR,UI7rCU,cAAA,MCzDF,UAOI,QAAA,iBAPJ,gBAOI,QAAA,uBAPJ,SAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,SAOI,QAAA,gBAPJ,aAOI,QAAA,oBAPJ,cAOI,QAAA,qBAPJ,QAOI,QAAA,eAPJ,eAOI,QAAA,sBAPJ,QAOI,QAAA,eAPJ,WAOI,KAAA,EAAA,EAAA,eAPJ,UAOI,eAAA,cAPJ,aAOI,eAAA,iBAPJ,kBAOI,eAAA,sBAPJ,qBAOI,eAAA,yBAPJ,aAOI,UAAA,YAPJ,aAOI,UAAA,YAPJ,eAOI,YAAA,YAPJ,eAOI,YAAA,YAPJ,WAOI,UAAA,eAPJ,aAOI,UAAA,iBAPJ,mBAOI,UAAA,uBAPJ,uBAOI,gBAAA,qBAPJ,qBAOI,gBAAA,mBAPJ,wBAOI,gBAAA,iBAPJ,yBAOI,gBAAA,wBAPJ,wBAOI,gBAAA,uBAPJ,wBAOI,gBAAA,uBAPJ,mBAOI,YAAA,qBAPJ,iBAOI,YAAA,mBAPJ,oBAOI,YAAA,iBAPJ,sBAOI,YAAA,mBAPJ,qBAOI,YAAA,kBAPJ,qBAOI,cAAA,qBAPJ,mBAOI,cAAA,mBAPJ,sBAOI,cAAA,iBAPJ,uBAOI,cAAA,wBAPJ,sBAOI,cAAA,uBAPJ,uBAOI,cAAA,kBAPJ,iBAOI,WAAA,eAPJ,kBAOI,WAAA,qBAPJ,gBAOI,WAAA,mBAPJ,mBAOI,WAAA,iBAPJ,qBAOI,WAAA,mBAPJ,oBAOI,WAAA,kBAPJ,aAOI,MAAA,aAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,KAOI,OAAA,YAPJ,KAOI,OAAA,iBAPJ,KAOI,OAAA,gBAPJ,KAOI,OAAA,eAPJ,KAOI,OAAA,iBAPJ,KAOI,OAAA,eAPJ,QAOI,OAAA,eAPJ,MAOI,YAAA,YAAA,aAAA,YAPJ,MAOI,YAAA,iBAAA,aAAA,iBAPJ,MAOI,YAAA,gBAAA,aAAA,gBAPJ,MAOI,YAAA,eAAA,aAAA,eAPJ,MAOI,YAAA,iBAAA,aAAA,iBAPJ,MAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,MAOI,WAAA,YAAA,cAAA,YAPJ,MAOI,WAAA,iBAAA,cAAA,iBAPJ,MAOI,WAAA,gBAAA,cAAA,gBAPJ,MAOI,WAAA,eAAA,cAAA,eAPJ,MAOI,WAAA,iBAAA,cAAA,iBAPJ,MAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,MAOI,WAAA,YAPJ,MAOI,WAAA,iBAPJ,MAOI,WAAA,gBAPJ,MAOI,WAAA,eAPJ,MAOI,WAAA,iBAPJ,MAOI,WAAA,eAPJ,SAOI,WAAA,eAPJ,MAOI,YAAA,YAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,gBAPJ,MAOI,YAAA,eAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,eAPJ,SAOI,YAAA,eAPJ,MAOI,cAAA,YAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,gBAPJ,MAOI,cAAA,eAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,eAPJ,SAOI,cAAA,eAPJ,MAOI,aAAA,YAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,gBAPJ,MAOI,aAAA,eAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,eAPJ,SAOI,aAAA,eAPJ,KAOI,QAAA,YAPJ,KAOI,QAAA,iBAPJ,KAOI,QAAA,gBAPJ,KAOI,QAAA,eAPJ,KAOI,QAAA,iBAPJ,KAOI,QAAA,eAPJ,MAOI,aAAA,YAAA,cAAA,YAPJ,MAOI,aAAA,iBAAA,cAAA,iBAPJ,MAOI,aAAA,gBAAA,cAAA,gBAPJ,MAOI,aAAA,eAAA,cAAA,eAPJ,MAOI,aAAA,iBAAA,cAAA,iBAPJ,MAOI,aAAA,eAAA,cAAA,eAPJ,MAOI,YAAA,YAAA,eAAA,YAPJ,MAOI,YAAA,iBAAA,eAAA,iBAPJ,MAOI,YAAA,gBAAA,eAAA,gBAPJ,MAOI,YAAA,eAAA,eAAA,eAPJ,MAOI,YAAA,iBAAA,eAAA,iBAPJ,MAOI,YAAA,eAAA,eAAA,eAPJ,MAOI,YAAA,YAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,gBAPJ,MAOI,YAAA,eAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,eAPJ,MAOI,aAAA,YAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,gBAPJ,MAOI,aAAA,eAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,eAPJ,MAOI,eAAA,YAPJ,MAOI,eAAA,iBAPJ,MAOI,eAAA,gBAPJ,MAOI,eAAA,eAPJ,MAOI,eAAA,iBAPJ,MAOI,eAAA,eAPJ,MAOI,cAAA,YAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,gBAPJ,MAOI,cAAA,eAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,eHPR,yBGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,YAAA,YAAA,aAAA,YAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,gBAAA,aAAA,gBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,YAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,aAAA,YAAA,cAAA,YAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,gBAAA,cAAA,gBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBHPR,yBGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,YAAA,YAAA,aAAA,YAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,gBAAA,aAAA,gBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,YAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,aAAA,YAAA,cAAA,YAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,gBAAA,cAAA,gBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBHPR,yBGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,YAAA,YAAA,aAAA,YAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,gBAAA,aAAA,gBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,YAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,aAAA,YAAA,cAAA,YAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,gBAAA,cAAA,gBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBHPR,0BGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,YAAA,YAAA,aAAA,YAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,gBAAA,aAAA,gBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,YAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,aAAA,YAAA,cAAA,YAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,gBAAA,cAAA,gBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBHPR,0BGAI,cAOI,QAAA,iBAPJ,oBAOI,QAAA,uBAPJ,aAOI,QAAA,gBAPJ,YAOI,QAAA,eAPJ,aAOI,QAAA,gBAPJ,iBAOI,QAAA,oBAPJ,kBAOI,QAAA,qBAPJ,YAOI,QAAA,eAPJ,mBAOI,QAAA,sBAPJ,YAOI,QAAA,eAPJ,eAOI,KAAA,EAAA,EAAA,eAPJ,cAOI,eAAA,cAPJ,iBAOI,eAAA,iBAPJ,sBAOI,eAAA,sBAPJ,yBAOI,eAAA,yBAPJ,iBAOI,UAAA,YAPJ,iBAOI,UAAA,YAPJ,mBAOI,YAAA,YAPJ,mBAOI,YAAA,YAPJ,eAOI,UAAA,eAPJ,iBAOI,UAAA,iBAPJ,uBAOI,UAAA,uBAPJ,2BAOI,gBAAA,qBAPJ,yBAOI,gBAAA,mBAPJ,4BAOI,gBAAA,iBAPJ,6BAOI,gBAAA,wBAPJ,4BAOI,gBAAA,uBAPJ,4BAOI,gBAAA,uBAPJ,uBAOI,YAAA,qBAPJ,qBAOI,YAAA,mBAPJ,wBAOI,YAAA,iBAPJ,0BAOI,YAAA,mBAPJ,yBAOI,YAAA,kBAPJ,yBAOI,cAAA,qBAPJ,uBAOI,cAAA,mBAPJ,0BAOI,cAAA,iBAPJ,2BAOI,cAAA,wBAPJ,0BAOI,cAAA,uBAPJ,2BAOI,cAAA,kBAPJ,qBAOI,WAAA,eAPJ,sBAOI,WAAA,qBAPJ,oBAOI,WAAA,mBAPJ,uBAOI,WAAA,iBAPJ,yBAOI,WAAA,mBAPJ,wBAOI,WAAA,kBAPJ,iBAOI,MAAA,aAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,gBAOI,MAAA,YAPJ,SAOI,OAAA,YAPJ,SAOI,OAAA,iBAPJ,SAOI,OAAA,gBAPJ,SAOI,OAAA,eAPJ,SAOI,OAAA,iBAPJ,SAOI,OAAA,eAPJ,YAOI,OAAA,eAPJ,UAOI,YAAA,YAAA,aAAA,YAPJ,UAOI,YAAA,iBAAA,aAAA,iBAPJ,UAOI,YAAA,gBAAA,aAAA,gBAPJ,UAOI,YAAA,eAAA,aAAA,eAPJ,UAOI,YAAA,iBAAA,aAAA,iBAPJ,UAOI,YAAA,eAAA,aAAA,eAPJ,aAOI,YAAA,eAAA,aAAA,eAPJ,UAOI,WAAA,YAAA,cAAA,YAPJ,UAOI,WAAA,iBAAA,cAAA,iBAPJ,UAOI,WAAA,gBAAA,cAAA,gBAPJ,UAOI,WAAA,eAAA,cAAA,eAPJ,UAOI,WAAA,iBAAA,cAAA,iBAPJ,UAOI,WAAA,eAAA,cAAA,eAPJ,aAOI,WAAA,eAAA,cAAA,eAPJ,UAOI,WAAA,YAPJ,UAOI,WAAA,iBAPJ,UAOI,WAAA,gBAPJ,UAOI,WAAA,eAPJ,UAOI,WAAA,iBAPJ,UAOI,WAAA,eAPJ,aAOI,WAAA,eAPJ,UAOI,YAAA,YAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,gBAPJ,UAOI,YAAA,eAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,eAPJ,aAOI,YAAA,eAPJ,UAOI,cAAA,YAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBAPJ,UAOI,cAAA,eAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,eAPJ,aAOI,cAAA,eAPJ,UAOI,aAAA,YAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBAPJ,UAOI,aAAA,eAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,eAPJ,aAOI,aAAA,eAPJ,SAOI,QAAA,YAPJ,SAOI,QAAA,iBAPJ,SAOI,QAAA,gBAPJ,SAOI,QAAA,eAPJ,SAOI,QAAA,iBAPJ,SAOI,QAAA,eAPJ,UAOI,aAAA,YAAA,cAAA,YAPJ,UAOI,aAAA,iBAAA,cAAA,iBAPJ,UAOI,aAAA,gBAAA,cAAA,gBAPJ,UAOI,aAAA,eAAA,cAAA,eAPJ,UAOI,aAAA,iBAAA,cAAA,iBAPJ,UAOI,aAAA,eAAA,cAAA,eAPJ,UAOI,YAAA,YAAA,eAAA,YAPJ,UAOI,YAAA,iBAAA,eAAA,iBAPJ,UAOI,YAAA,gBAAA,eAAA,gBAPJ,UAOI,YAAA,eAAA,eAAA,eAPJ,UAOI,YAAA,iBAAA,eAAA,iBAPJ,UAOI,YAAA,eAAA,eAAA,eAPJ,UAOI,YAAA,YAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,gBAPJ,UAOI,YAAA,eAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,eAPJ,UAOI,aAAA,YAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBAPJ,UAOI,aAAA,eAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,eAPJ,UAOI,eAAA,YAPJ,UAOI,eAAA,iBAPJ,UAOI,eAAA,gBAPJ,UAOI,eAAA,eAPJ,UAOI,eAAA,iBAPJ,UAOI,eAAA,eAPJ,UAOI,cAAA,YAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBAPJ,UAOI,cAAA,eAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBChCZ,aDyBQ,gBAOI,QAAA,iBAPJ,sBAOI,QAAA,uBAPJ,eAOI,QAAA,gBAPJ,cAOI,QAAA,eAPJ,eAOI,QAAA,gBAPJ,mBAOI,QAAA,oBAPJ,oBAOI,QAAA,qBAPJ,cAOI,QAAA,eAPJ,qBAOI,QAAA,sBAPJ,cAOI,QAAA","sourcesContent":["/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n\n$include-column-box-sizing: true !default;\n\n@import \"functions\";\n@import \"variables\";\n\n@import \"mixins/lists\";\n@import \"mixins/breakpoints\";\n@import \"mixins/container\";\n@import \"mixins/grid\";\n@import \"mixins/utilities\";\n\n@import \"vendor/rfs\";\n\n@import \"containers\";\n@import \"grid\";\n\n@import \"utilities\";\n// Only use the utilities we need\n// stylelint-disable-next-line scss/dollar-variable-default\n$utilities: map-get-multiple(\n $utilities,\n (\n \"display\",\n \"order\",\n \"flex\",\n \"flex-direction\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"justify-content\",\n \"align-items\",\n \"align-content\",\n \"align-self\",\n \"margin\",\n \"margin-x\",\n \"margin-y\",\n \"margin-top\",\n \"margin-end\",\n \"margin-bottom\",\n \"margin-start\",\n \"negative-margin\",\n \"negative-margin-x\",\n \"negative-margin-y\",\n \"negative-margin-top\",\n \"negative-margin-end\",\n \"negative-margin-bottom\",\n \"negative-margin-start\",\n \"padding\",\n \"padding-x\",\n \"padding-y\",\n \"padding-top\",\n \"padding-end\",\n \"padding-bottom\",\n \"padding-start\",\n )\n);\n\n@import \"utilities/api\";\n","// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n@if $enable-grid-classes {\n // Single container class with breakpoint max-widths\n .container,\n // 100% wide container at all breakpoints\n .container-fluid {\n @include make-container();\n }\n\n // Responsive containers that are 100% wide until a breakpoint\n @each $breakpoint, $container-max-width in $container-max-widths {\n .container-#{$breakpoint} {\n @extend .container-fluid;\n }\n\n @include media-breakpoint-up($breakpoint, $grid-breakpoints) {\n %responsive-container-#{$breakpoint} {\n max-width: $container-max-width;\n }\n\n // Extend each breakpoint which is smaller or equal to the current breakpoint\n $extend-breakpoint: true;\n\n @each $name, $width in $grid-breakpoints {\n @if ($extend-breakpoint) {\n .container#{breakpoint-infix($name, $grid-breakpoints)} {\n @extend %responsive-container-#{$breakpoint};\n }\n\n // Once the current breakpoint is reached, stop extending\n @if ($breakpoint == $name) {\n $extend-breakpoint: false;\n }\n }\n }\n }\n }\n}\n","/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n.container,\n.container-fluid,\n.container-xxl,\n.container-xl,\n.container-lg,\n.container-md,\n.container-sm {\n width: 100%;\n padding-left: var(--bs-gutter-x, 0.75rem);\n padding-right: var(--bs-gutter-x, 0.75rem);\n margin-left: auto;\n margin-right: auto;\n}\n\n@media (min-width: 576px) {\n .container-sm, .container {\n max-width: 540px;\n }\n}\n@media (min-width: 768px) {\n .container-md, .container-sm, .container {\n max-width: 720px;\n }\n}\n@media (min-width: 992px) {\n .container-lg, .container-md, .container-sm, .container {\n max-width: 960px;\n }\n}\n@media (min-width: 1200px) {\n .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1140px;\n }\n}\n@media (min-width: 1400px) {\n .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1320px;\n }\n}\n.row {\n --bs-gutter-x: 1.5rem;\n --bs-gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--bs-gutter-y) * -1);\n margin-left: calc(var(--bs-gutter-x) * -.5);\n margin-right: calc(var(--bs-gutter-x) * -.5);\n}\n.row > * {\n box-sizing: border-box;\n flex-shrink: 0;\n width: 100%;\n max-width: 100%;\n padding-left: calc(var(--bs-gutter-x) * .5);\n padding-right: calc(var(--bs-gutter-x) * .5);\n margin-top: var(--bs-gutter-y);\n}\n\n.col {\n flex: 1 0 0%;\n}\n\n.row-cols-auto > * {\n flex: 0 0 auto;\n width: auto;\n}\n\n.row-cols-1 > * {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.row-cols-2 > * {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.row-cols-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n}\n\n.row-cols-4 > * {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.row-cols-5 > * {\n flex: 0 0 auto;\n width: 20%;\n}\n\n.row-cols-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n}\n\n.col-auto {\n flex: 0 0 auto;\n width: auto;\n}\n\n.col-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n}\n\n.col-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n}\n\n.col-3 {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.col-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n}\n\n.col-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n}\n\n.col-6 {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.col-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n}\n\n.col-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n}\n\n.col-9 {\n flex: 0 0 auto;\n width: 75%;\n}\n\n.col-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n}\n\n.col-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n}\n\n.col-12 {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.offset-1 {\n margin-right: 8.33333333%;\n}\n\n.offset-2 {\n margin-right: 16.66666667%;\n}\n\n.offset-3 {\n margin-right: 25%;\n}\n\n.offset-4 {\n margin-right: 33.33333333%;\n}\n\n.offset-5 {\n margin-right: 41.66666667%;\n}\n\n.offset-6 {\n margin-right: 50%;\n}\n\n.offset-7 {\n margin-right: 58.33333333%;\n}\n\n.offset-8 {\n margin-right: 66.66666667%;\n}\n\n.offset-9 {\n margin-right: 75%;\n}\n\n.offset-10 {\n margin-right: 83.33333333%;\n}\n\n.offset-11 {\n margin-right: 91.66666667%;\n}\n\n.g-0,\n.gx-0 {\n --bs-gutter-x: 0;\n}\n\n.g-0,\n.gy-0 {\n --bs-gutter-y: 0;\n}\n\n.g-1,\n.gx-1 {\n --bs-gutter-x: 0.25rem;\n}\n\n.g-1,\n.gy-1 {\n --bs-gutter-y: 0.25rem;\n}\n\n.g-2,\n.gx-2 {\n --bs-gutter-x: 0.5rem;\n}\n\n.g-2,\n.gy-2 {\n --bs-gutter-y: 0.5rem;\n}\n\n.g-3,\n.gx-3 {\n --bs-gutter-x: 1rem;\n}\n\n.g-3,\n.gy-3 {\n --bs-gutter-y: 1rem;\n}\n\n.g-4,\n.gx-4 {\n --bs-gutter-x: 1.5rem;\n}\n\n.g-4,\n.gy-4 {\n --bs-gutter-y: 1.5rem;\n}\n\n.g-5,\n.gx-5 {\n --bs-gutter-x: 3rem;\n}\n\n.g-5,\n.gy-5 {\n --bs-gutter-y: 3rem;\n}\n\n@media (min-width: 576px) {\n .col-sm {\n flex: 1 0 0%;\n }\n\n .row-cols-sm-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-sm-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-sm-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-sm-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-sm-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-sm-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-sm-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-sm-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-sm-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-sm-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-sm-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-sm-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-sm-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-sm-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-sm-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-sm-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-sm-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-sm-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-sm-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-sm-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-sm-0 {\n margin-right: 0;\n }\n\n .offset-sm-1 {\n margin-right: 8.33333333%;\n }\n\n .offset-sm-2 {\n margin-right: 16.66666667%;\n }\n\n .offset-sm-3 {\n margin-right: 25%;\n }\n\n .offset-sm-4 {\n margin-right: 33.33333333%;\n }\n\n .offset-sm-5 {\n margin-right: 41.66666667%;\n }\n\n .offset-sm-6 {\n margin-right: 50%;\n }\n\n .offset-sm-7 {\n margin-right: 58.33333333%;\n }\n\n .offset-sm-8 {\n margin-right: 66.66666667%;\n }\n\n .offset-sm-9 {\n margin-right: 75%;\n }\n\n .offset-sm-10 {\n margin-right: 83.33333333%;\n }\n\n .offset-sm-11 {\n margin-right: 91.66666667%;\n }\n\n .g-sm-0,\n.gx-sm-0 {\n --bs-gutter-x: 0;\n }\n\n .g-sm-0,\n.gy-sm-0 {\n --bs-gutter-y: 0;\n }\n\n .g-sm-1,\n.gx-sm-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-sm-1,\n.gy-sm-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-sm-2,\n.gx-sm-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-sm-2,\n.gy-sm-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-sm-3,\n.gx-sm-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-sm-3,\n.gy-sm-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-sm-4,\n.gx-sm-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-sm-4,\n.gy-sm-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-sm-5,\n.gx-sm-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-sm-5,\n.gy-sm-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 768px) {\n .col-md {\n flex: 1 0 0%;\n }\n\n .row-cols-md-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-md-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-md-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-md-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-md-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-md-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-md-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-md-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-md-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-md-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-md-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-md-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-md-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-md-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-md-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-md-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-md-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-md-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-md-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-md-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-md-0 {\n margin-right: 0;\n }\n\n .offset-md-1 {\n margin-right: 8.33333333%;\n }\n\n .offset-md-2 {\n margin-right: 16.66666667%;\n }\n\n .offset-md-3 {\n margin-right: 25%;\n }\n\n .offset-md-4 {\n margin-right: 33.33333333%;\n }\n\n .offset-md-5 {\n margin-right: 41.66666667%;\n }\n\n .offset-md-6 {\n margin-right: 50%;\n }\n\n .offset-md-7 {\n margin-right: 58.33333333%;\n }\n\n .offset-md-8 {\n margin-right: 66.66666667%;\n }\n\n .offset-md-9 {\n margin-right: 75%;\n }\n\n .offset-md-10 {\n margin-right: 83.33333333%;\n }\n\n .offset-md-11 {\n margin-right: 91.66666667%;\n }\n\n .g-md-0,\n.gx-md-0 {\n --bs-gutter-x: 0;\n }\n\n .g-md-0,\n.gy-md-0 {\n --bs-gutter-y: 0;\n }\n\n .g-md-1,\n.gx-md-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-md-1,\n.gy-md-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-md-2,\n.gx-md-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-md-2,\n.gy-md-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-md-3,\n.gx-md-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-md-3,\n.gy-md-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-md-4,\n.gx-md-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-md-4,\n.gy-md-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-md-5,\n.gx-md-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-md-5,\n.gy-md-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 992px) {\n .col-lg {\n flex: 1 0 0%;\n }\n\n .row-cols-lg-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-lg-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-lg-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-lg-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-lg-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-lg-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-lg-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-lg-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-lg-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-lg-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-lg-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-lg-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-lg-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-lg-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-lg-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-lg-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-lg-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-lg-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-lg-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-lg-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-lg-0 {\n margin-right: 0;\n }\n\n .offset-lg-1 {\n margin-right: 8.33333333%;\n }\n\n .offset-lg-2 {\n margin-right: 16.66666667%;\n }\n\n .offset-lg-3 {\n margin-right: 25%;\n }\n\n .offset-lg-4 {\n margin-right: 33.33333333%;\n }\n\n .offset-lg-5 {\n margin-right: 41.66666667%;\n }\n\n .offset-lg-6 {\n margin-right: 50%;\n }\n\n .offset-lg-7 {\n margin-right: 58.33333333%;\n }\n\n .offset-lg-8 {\n margin-right: 66.66666667%;\n }\n\n .offset-lg-9 {\n margin-right: 75%;\n }\n\n .offset-lg-10 {\n margin-right: 83.33333333%;\n }\n\n .offset-lg-11 {\n margin-right: 91.66666667%;\n }\n\n .g-lg-0,\n.gx-lg-0 {\n --bs-gutter-x: 0;\n }\n\n .g-lg-0,\n.gy-lg-0 {\n --bs-gutter-y: 0;\n }\n\n .g-lg-1,\n.gx-lg-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-lg-1,\n.gy-lg-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-lg-2,\n.gx-lg-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-lg-2,\n.gy-lg-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-lg-3,\n.gx-lg-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-lg-3,\n.gy-lg-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-lg-4,\n.gx-lg-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-lg-4,\n.gy-lg-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-lg-5,\n.gx-lg-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-lg-5,\n.gy-lg-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1200px) {\n .col-xl {\n flex: 1 0 0%;\n }\n\n .row-cols-xl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xl-0 {\n margin-right: 0;\n }\n\n .offset-xl-1 {\n margin-right: 8.33333333%;\n }\n\n .offset-xl-2 {\n margin-right: 16.66666667%;\n }\n\n .offset-xl-3 {\n margin-right: 25%;\n }\n\n .offset-xl-4 {\n margin-right: 33.33333333%;\n }\n\n .offset-xl-5 {\n margin-right: 41.66666667%;\n }\n\n .offset-xl-6 {\n margin-right: 50%;\n }\n\n .offset-xl-7 {\n margin-right: 58.33333333%;\n }\n\n .offset-xl-8 {\n margin-right: 66.66666667%;\n }\n\n .offset-xl-9 {\n margin-right: 75%;\n }\n\n .offset-xl-10 {\n margin-right: 83.33333333%;\n }\n\n .offset-xl-11 {\n margin-right: 91.66666667%;\n }\n\n .g-xl-0,\n.gx-xl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xl-0,\n.gy-xl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xl-1,\n.gx-xl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xl-1,\n.gy-xl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xl-2,\n.gx-xl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xl-2,\n.gy-xl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xl-3,\n.gx-xl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xl-3,\n.gy-xl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xl-4,\n.gx-xl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xl-4,\n.gy-xl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xl-5,\n.gx-xl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xl-5,\n.gy-xl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1400px) {\n .col-xxl {\n flex: 1 0 0%;\n }\n\n .row-cols-xxl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xxl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xxl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xxl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xxl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xxl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xxl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xxl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xxl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xxl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xxl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xxl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xxl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xxl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xxl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xxl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xxl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xxl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xxl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xxl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xxl-0 {\n margin-right: 0;\n }\n\n .offset-xxl-1 {\n margin-right: 8.33333333%;\n }\n\n .offset-xxl-2 {\n margin-right: 16.66666667%;\n }\n\n .offset-xxl-3 {\n margin-right: 25%;\n }\n\n .offset-xxl-4 {\n margin-right: 33.33333333%;\n }\n\n .offset-xxl-5 {\n margin-right: 41.66666667%;\n }\n\n .offset-xxl-6 {\n margin-right: 50%;\n }\n\n .offset-xxl-7 {\n margin-right: 58.33333333%;\n }\n\n .offset-xxl-8 {\n margin-right: 66.66666667%;\n }\n\n .offset-xxl-9 {\n margin-right: 75%;\n }\n\n .offset-xxl-10 {\n margin-right: 83.33333333%;\n }\n\n .offset-xxl-11 {\n margin-right: 91.66666667%;\n }\n\n .g-xxl-0,\n.gx-xxl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xxl-0,\n.gy-xxl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xxl-1,\n.gx-xxl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xxl-1,\n.gy-xxl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xxl-2,\n.gx-xxl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xxl-2,\n.gy-xxl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xxl-3,\n.gx-xxl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xxl-3,\n.gy-xxl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xxl-4,\n.gx-xxl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xxl-4,\n.gy-xxl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xxl-5,\n.gx-xxl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xxl-5,\n.gy-xxl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n.d-inline {\n display: inline !important;\n}\n\n.d-inline-block {\n display: inline-block !important;\n}\n\n.d-block {\n display: block !important;\n}\n\n.d-grid {\n display: grid !important;\n}\n\n.d-table {\n display: table !important;\n}\n\n.d-table-row {\n display: table-row !important;\n}\n\n.d-table-cell {\n display: table-cell !important;\n}\n\n.d-flex {\n display: flex !important;\n}\n\n.d-inline-flex {\n display: inline-flex !important;\n}\n\n.d-none {\n display: none !important;\n}\n\n.flex-fill {\n flex: 1 1 auto !important;\n}\n\n.flex-row {\n flex-direction: row !important;\n}\n\n.flex-column {\n flex-direction: column !important;\n}\n\n.flex-row-reverse {\n flex-direction: row-reverse !important;\n}\n\n.flex-column-reverse {\n flex-direction: column-reverse !important;\n}\n\n.flex-grow-0 {\n flex-grow: 0 !important;\n}\n\n.flex-grow-1 {\n flex-grow: 1 !important;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0 !important;\n}\n\n.flex-shrink-1 {\n flex-shrink: 1 !important;\n}\n\n.flex-wrap {\n flex-wrap: wrap !important;\n}\n\n.flex-nowrap {\n flex-wrap: nowrap !important;\n}\n\n.flex-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n}\n\n.justify-content-start {\n justify-content: flex-start !important;\n}\n\n.justify-content-end {\n justify-content: flex-end !important;\n}\n\n.justify-content-center {\n justify-content: center !important;\n}\n\n.justify-content-between {\n justify-content: space-between !important;\n}\n\n.justify-content-around {\n justify-content: space-around !important;\n}\n\n.justify-content-evenly {\n justify-content: space-evenly !important;\n}\n\n.align-items-start {\n align-items: flex-start !important;\n}\n\n.align-items-end {\n align-items: flex-end !important;\n}\n\n.align-items-center {\n align-items: center !important;\n}\n\n.align-items-baseline {\n align-items: baseline !important;\n}\n\n.align-items-stretch {\n align-items: stretch !important;\n}\n\n.align-content-start {\n align-content: flex-start !important;\n}\n\n.align-content-end {\n align-content: flex-end !important;\n}\n\n.align-content-center {\n align-content: center !important;\n}\n\n.align-content-between {\n align-content: space-between !important;\n}\n\n.align-content-around {\n align-content: space-around !important;\n}\n\n.align-content-stretch {\n align-content: stretch !important;\n}\n\n.align-self-auto {\n align-self: auto !important;\n}\n\n.align-self-start {\n align-self: flex-start !important;\n}\n\n.align-self-end {\n align-self: flex-end !important;\n}\n\n.align-self-center {\n align-self: center !important;\n}\n\n.align-self-baseline {\n align-self: baseline !important;\n}\n\n.align-self-stretch {\n align-self: stretch !important;\n}\n\n.order-first {\n order: -1 !important;\n}\n\n.order-0 {\n order: 0 !important;\n}\n\n.order-1 {\n order: 1 !important;\n}\n\n.order-2 {\n order: 2 !important;\n}\n\n.order-3 {\n order: 3 !important;\n}\n\n.order-4 {\n order: 4 !important;\n}\n\n.order-5 {\n order: 5 !important;\n}\n\n.order-last {\n order: 6 !important;\n}\n\n.m-0 {\n margin: 0 !important;\n}\n\n.m-1 {\n margin: 0.25rem !important;\n}\n\n.m-2 {\n margin: 0.5rem !important;\n}\n\n.m-3 {\n margin: 1rem !important;\n}\n\n.m-4 {\n margin: 1.5rem !important;\n}\n\n.m-5 {\n margin: 3rem !important;\n}\n\n.m-auto {\n margin: auto !important;\n}\n\n.mx-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n}\n\n.mx-1 {\n margin-left: 0.25rem !important;\n margin-right: 0.25rem !important;\n}\n\n.mx-2 {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n}\n\n.mx-3 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n}\n\n.mx-4 {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n}\n\n.mx-5 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n}\n\n.mx-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n}\n\n.my-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n}\n\n.my-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n}\n\n.my-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n}\n\n.my-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n}\n\n.my-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n}\n\n.my-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n}\n\n.my-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n}\n\n.mt-0 {\n margin-top: 0 !important;\n}\n\n.mt-1 {\n margin-top: 0.25rem !important;\n}\n\n.mt-2 {\n margin-top: 0.5rem !important;\n}\n\n.mt-3 {\n margin-top: 1rem !important;\n}\n\n.mt-4 {\n margin-top: 1.5rem !important;\n}\n\n.mt-5 {\n margin-top: 3rem !important;\n}\n\n.mt-auto {\n margin-top: auto !important;\n}\n\n.me-0 {\n margin-left: 0 !important;\n}\n\n.me-1 {\n margin-left: 0.25rem !important;\n}\n\n.me-2 {\n margin-left: 0.5rem !important;\n}\n\n.me-3 {\n margin-left: 1rem !important;\n}\n\n.me-4 {\n margin-left: 1.5rem !important;\n}\n\n.me-5 {\n margin-left: 3rem !important;\n}\n\n.me-auto {\n margin-left: auto !important;\n}\n\n.mb-0 {\n margin-bottom: 0 !important;\n}\n\n.mb-1 {\n margin-bottom: 0.25rem !important;\n}\n\n.mb-2 {\n margin-bottom: 0.5rem !important;\n}\n\n.mb-3 {\n margin-bottom: 1rem !important;\n}\n\n.mb-4 {\n margin-bottom: 1.5rem !important;\n}\n\n.mb-5 {\n margin-bottom: 3rem !important;\n}\n\n.mb-auto {\n margin-bottom: auto !important;\n}\n\n.ms-0 {\n margin-right: 0 !important;\n}\n\n.ms-1 {\n margin-right: 0.25rem !important;\n}\n\n.ms-2 {\n margin-right: 0.5rem !important;\n}\n\n.ms-3 {\n margin-right: 1rem !important;\n}\n\n.ms-4 {\n margin-right: 1.5rem !important;\n}\n\n.ms-5 {\n margin-right: 3rem !important;\n}\n\n.ms-auto {\n margin-right: auto !important;\n}\n\n.p-0 {\n padding: 0 !important;\n}\n\n.p-1 {\n padding: 0.25rem !important;\n}\n\n.p-2 {\n padding: 0.5rem !important;\n}\n\n.p-3 {\n padding: 1rem !important;\n}\n\n.p-4 {\n padding: 1.5rem !important;\n}\n\n.p-5 {\n padding: 3rem !important;\n}\n\n.px-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n}\n\n.px-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important;\n}\n\n.px-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n}\n\n.px-3 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n}\n\n.px-4 {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n}\n\n.px-5 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n}\n\n.py-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n\n.py-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n}\n\n.py-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n}\n\n.py-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n}\n\n.py-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n}\n\n.py-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n}\n\n.pt-0 {\n padding-top: 0 !important;\n}\n\n.pt-1 {\n padding-top: 0.25rem !important;\n}\n\n.pt-2 {\n padding-top: 0.5rem !important;\n}\n\n.pt-3 {\n padding-top: 1rem !important;\n}\n\n.pt-4 {\n padding-top: 1.5rem !important;\n}\n\n.pt-5 {\n padding-top: 3rem !important;\n}\n\n.pe-0 {\n padding-left: 0 !important;\n}\n\n.pe-1 {\n padding-left: 0.25rem !important;\n}\n\n.pe-2 {\n padding-left: 0.5rem !important;\n}\n\n.pe-3 {\n padding-left: 1rem !important;\n}\n\n.pe-4 {\n padding-left: 1.5rem !important;\n}\n\n.pe-5 {\n padding-left: 3rem !important;\n}\n\n.pb-0 {\n padding-bottom: 0 !important;\n}\n\n.pb-1 {\n padding-bottom: 0.25rem !important;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem !important;\n}\n\n.pb-3 {\n padding-bottom: 1rem !important;\n}\n\n.pb-4 {\n padding-bottom: 1.5rem !important;\n}\n\n.pb-5 {\n padding-bottom: 3rem !important;\n}\n\n.ps-0 {\n padding-right: 0 !important;\n}\n\n.ps-1 {\n padding-right: 0.25rem !important;\n}\n\n.ps-2 {\n padding-right: 0.5rem !important;\n}\n\n.ps-3 {\n padding-right: 1rem !important;\n}\n\n.ps-4 {\n padding-right: 1.5rem !important;\n}\n\n.ps-5 {\n padding-right: 3rem !important;\n}\n\n@media (min-width: 576px) {\n .d-sm-inline {\n display: inline !important;\n }\n\n .d-sm-inline-block {\n display: inline-block !important;\n }\n\n .d-sm-block {\n display: block !important;\n }\n\n .d-sm-grid {\n display: grid !important;\n }\n\n .d-sm-table {\n display: table !important;\n }\n\n .d-sm-table-row {\n display: table-row !important;\n }\n\n .d-sm-table-cell {\n display: table-cell !important;\n }\n\n .d-sm-flex {\n display: flex !important;\n }\n\n .d-sm-inline-flex {\n display: inline-flex !important;\n }\n\n .d-sm-none {\n display: none !important;\n }\n\n .flex-sm-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-sm-row {\n flex-direction: row !important;\n }\n\n .flex-sm-column {\n flex-direction: column !important;\n }\n\n .flex-sm-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-sm-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-sm-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-sm-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-sm-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-sm-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-sm-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-sm-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-sm-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-sm-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-sm-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-sm-center {\n justify-content: center !important;\n }\n\n .justify-content-sm-between {\n justify-content: space-between !important;\n }\n\n .justify-content-sm-around {\n justify-content: space-around !important;\n }\n\n .justify-content-sm-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-sm-start {\n align-items: flex-start !important;\n }\n\n .align-items-sm-end {\n align-items: flex-end !important;\n }\n\n .align-items-sm-center {\n align-items: center !important;\n }\n\n .align-items-sm-baseline {\n align-items: baseline !important;\n }\n\n .align-items-sm-stretch {\n align-items: stretch !important;\n }\n\n .align-content-sm-start {\n align-content: flex-start !important;\n }\n\n .align-content-sm-end {\n align-content: flex-end !important;\n }\n\n .align-content-sm-center {\n align-content: center !important;\n }\n\n .align-content-sm-between {\n align-content: space-between !important;\n }\n\n .align-content-sm-around {\n align-content: space-around !important;\n }\n\n .align-content-sm-stretch {\n align-content: stretch !important;\n }\n\n .align-self-sm-auto {\n align-self: auto !important;\n }\n\n .align-self-sm-start {\n align-self: flex-start !important;\n }\n\n .align-self-sm-end {\n align-self: flex-end !important;\n }\n\n .align-self-sm-center {\n align-self: center !important;\n }\n\n .align-self-sm-baseline {\n align-self: baseline !important;\n }\n\n .align-self-sm-stretch {\n align-self: stretch !important;\n }\n\n .order-sm-first {\n order: -1 !important;\n }\n\n .order-sm-0 {\n order: 0 !important;\n }\n\n .order-sm-1 {\n order: 1 !important;\n }\n\n .order-sm-2 {\n order: 2 !important;\n }\n\n .order-sm-3 {\n order: 3 !important;\n }\n\n .order-sm-4 {\n order: 4 !important;\n }\n\n .order-sm-5 {\n order: 5 !important;\n }\n\n .order-sm-last {\n order: 6 !important;\n }\n\n .m-sm-0 {\n margin: 0 !important;\n }\n\n .m-sm-1 {\n margin: 0.25rem !important;\n }\n\n .m-sm-2 {\n margin: 0.5rem !important;\n }\n\n .m-sm-3 {\n margin: 1rem !important;\n }\n\n .m-sm-4 {\n margin: 1.5rem !important;\n }\n\n .m-sm-5 {\n margin: 3rem !important;\n }\n\n .m-sm-auto {\n margin: auto !important;\n }\n\n .mx-sm-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n\n .mx-sm-1 {\n margin-left: 0.25rem !important;\n margin-right: 0.25rem !important;\n }\n\n .mx-sm-2 {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n\n .mx-sm-3 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n\n .mx-sm-4 {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n\n .mx-sm-5 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n\n .mx-sm-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n\n .my-sm-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-sm-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-sm-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-sm-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-sm-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-sm-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-sm-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-sm-0 {\n margin-top: 0 !important;\n }\n\n .mt-sm-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-sm-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-sm-3 {\n margin-top: 1rem !important;\n }\n\n .mt-sm-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-sm-5 {\n margin-top: 3rem !important;\n }\n\n .mt-sm-auto {\n margin-top: auto !important;\n }\n\n .me-sm-0 {\n margin-left: 0 !important;\n }\n\n .me-sm-1 {\n margin-left: 0.25rem !important;\n }\n\n .me-sm-2 {\n margin-left: 0.5rem !important;\n }\n\n .me-sm-3 {\n margin-left: 1rem !important;\n }\n\n .me-sm-4 {\n margin-left: 1.5rem !important;\n }\n\n .me-sm-5 {\n margin-left: 3rem !important;\n }\n\n .me-sm-auto {\n margin-left: auto !important;\n }\n\n .mb-sm-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-sm-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-sm-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-sm-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-sm-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-sm-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-sm-auto {\n margin-bottom: auto !important;\n }\n\n .ms-sm-0 {\n margin-right: 0 !important;\n }\n\n .ms-sm-1 {\n margin-right: 0.25rem !important;\n }\n\n .ms-sm-2 {\n margin-right: 0.5rem !important;\n }\n\n .ms-sm-3 {\n margin-right: 1rem !important;\n }\n\n .ms-sm-4 {\n margin-right: 1.5rem !important;\n }\n\n .ms-sm-5 {\n margin-right: 3rem !important;\n }\n\n .ms-sm-auto {\n margin-right: auto !important;\n }\n\n .p-sm-0 {\n padding: 0 !important;\n }\n\n .p-sm-1 {\n padding: 0.25rem !important;\n }\n\n .p-sm-2 {\n padding: 0.5rem !important;\n }\n\n .p-sm-3 {\n padding: 1rem !important;\n }\n\n .p-sm-4 {\n padding: 1.5rem !important;\n }\n\n .p-sm-5 {\n padding: 3rem !important;\n }\n\n .px-sm-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n .px-sm-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important;\n }\n\n .px-sm-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n\n .px-sm-3 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n\n .px-sm-4 {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n\n .px-sm-5 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n\n .py-sm-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-sm-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-sm-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-sm-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-sm-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-sm-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-sm-0 {\n padding-top: 0 !important;\n }\n\n .pt-sm-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-sm-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-sm-3 {\n padding-top: 1rem !important;\n }\n\n .pt-sm-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-sm-5 {\n padding-top: 3rem !important;\n }\n\n .pe-sm-0 {\n padding-left: 0 !important;\n }\n\n .pe-sm-1 {\n padding-left: 0.25rem !important;\n }\n\n .pe-sm-2 {\n padding-left: 0.5rem !important;\n }\n\n .pe-sm-3 {\n padding-left: 1rem !important;\n }\n\n .pe-sm-4 {\n padding-left: 1.5rem !important;\n }\n\n .pe-sm-5 {\n padding-left: 3rem !important;\n }\n\n .pb-sm-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-sm-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-sm-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-sm-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-sm-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-sm-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-sm-0 {\n padding-right: 0 !important;\n }\n\n .ps-sm-1 {\n padding-right: 0.25rem !important;\n }\n\n .ps-sm-2 {\n padding-right: 0.5rem !important;\n }\n\n .ps-sm-3 {\n padding-right: 1rem !important;\n }\n\n .ps-sm-4 {\n padding-right: 1.5rem !important;\n }\n\n .ps-sm-5 {\n padding-right: 3rem !important;\n }\n}\n@media (min-width: 768px) {\n .d-md-inline {\n display: inline !important;\n }\n\n .d-md-inline-block {\n display: inline-block !important;\n }\n\n .d-md-block {\n display: block !important;\n }\n\n .d-md-grid {\n display: grid !important;\n }\n\n .d-md-table {\n display: table !important;\n }\n\n .d-md-table-row {\n display: table-row !important;\n }\n\n .d-md-table-cell {\n display: table-cell !important;\n }\n\n .d-md-flex {\n display: flex !important;\n }\n\n .d-md-inline-flex {\n display: inline-flex !important;\n }\n\n .d-md-none {\n display: none !important;\n }\n\n .flex-md-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-md-row {\n flex-direction: row !important;\n }\n\n .flex-md-column {\n flex-direction: column !important;\n }\n\n .flex-md-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-md-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-md-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-md-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-md-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-md-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-md-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-md-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-md-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-md-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-md-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-md-center {\n justify-content: center !important;\n }\n\n .justify-content-md-between {\n justify-content: space-between !important;\n }\n\n .justify-content-md-around {\n justify-content: space-around !important;\n }\n\n .justify-content-md-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-md-start {\n align-items: flex-start !important;\n }\n\n .align-items-md-end {\n align-items: flex-end !important;\n }\n\n .align-items-md-center {\n align-items: center !important;\n }\n\n .align-items-md-baseline {\n align-items: baseline !important;\n }\n\n .align-items-md-stretch {\n align-items: stretch !important;\n }\n\n .align-content-md-start {\n align-content: flex-start !important;\n }\n\n .align-content-md-end {\n align-content: flex-end !important;\n }\n\n .align-content-md-center {\n align-content: center !important;\n }\n\n .align-content-md-between {\n align-content: space-between !important;\n }\n\n .align-content-md-around {\n align-content: space-around !important;\n }\n\n .align-content-md-stretch {\n align-content: stretch !important;\n }\n\n .align-self-md-auto {\n align-self: auto !important;\n }\n\n .align-self-md-start {\n align-self: flex-start !important;\n }\n\n .align-self-md-end {\n align-self: flex-end !important;\n }\n\n .align-self-md-center {\n align-self: center !important;\n }\n\n .align-self-md-baseline {\n align-self: baseline !important;\n }\n\n .align-self-md-stretch {\n align-self: stretch !important;\n }\n\n .order-md-first {\n order: -1 !important;\n }\n\n .order-md-0 {\n order: 0 !important;\n }\n\n .order-md-1 {\n order: 1 !important;\n }\n\n .order-md-2 {\n order: 2 !important;\n }\n\n .order-md-3 {\n order: 3 !important;\n }\n\n .order-md-4 {\n order: 4 !important;\n }\n\n .order-md-5 {\n order: 5 !important;\n }\n\n .order-md-last {\n order: 6 !important;\n }\n\n .m-md-0 {\n margin: 0 !important;\n }\n\n .m-md-1 {\n margin: 0.25rem !important;\n }\n\n .m-md-2 {\n margin: 0.5rem !important;\n }\n\n .m-md-3 {\n margin: 1rem !important;\n }\n\n .m-md-4 {\n margin: 1.5rem !important;\n }\n\n .m-md-5 {\n margin: 3rem !important;\n }\n\n .m-md-auto {\n margin: auto !important;\n }\n\n .mx-md-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n\n .mx-md-1 {\n margin-left: 0.25rem !important;\n margin-right: 0.25rem !important;\n }\n\n .mx-md-2 {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n\n .mx-md-3 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n\n .mx-md-4 {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n\n .mx-md-5 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n\n .mx-md-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n\n .my-md-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-md-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-md-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-md-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-md-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-md-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-md-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-md-0 {\n margin-top: 0 !important;\n }\n\n .mt-md-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-md-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-md-3 {\n margin-top: 1rem !important;\n }\n\n .mt-md-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-md-5 {\n margin-top: 3rem !important;\n }\n\n .mt-md-auto {\n margin-top: auto !important;\n }\n\n .me-md-0 {\n margin-left: 0 !important;\n }\n\n .me-md-1 {\n margin-left: 0.25rem !important;\n }\n\n .me-md-2 {\n margin-left: 0.5rem !important;\n }\n\n .me-md-3 {\n margin-left: 1rem !important;\n }\n\n .me-md-4 {\n margin-left: 1.5rem !important;\n }\n\n .me-md-5 {\n margin-left: 3rem !important;\n }\n\n .me-md-auto {\n margin-left: auto !important;\n }\n\n .mb-md-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-md-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-md-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-md-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-md-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-md-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-md-auto {\n margin-bottom: auto !important;\n }\n\n .ms-md-0 {\n margin-right: 0 !important;\n }\n\n .ms-md-1 {\n margin-right: 0.25rem !important;\n }\n\n .ms-md-2 {\n margin-right: 0.5rem !important;\n }\n\n .ms-md-3 {\n margin-right: 1rem !important;\n }\n\n .ms-md-4 {\n margin-right: 1.5rem !important;\n }\n\n .ms-md-5 {\n margin-right: 3rem !important;\n }\n\n .ms-md-auto {\n margin-right: auto !important;\n }\n\n .p-md-0 {\n padding: 0 !important;\n }\n\n .p-md-1 {\n padding: 0.25rem !important;\n }\n\n .p-md-2 {\n padding: 0.5rem !important;\n }\n\n .p-md-3 {\n padding: 1rem !important;\n }\n\n .p-md-4 {\n padding: 1.5rem !important;\n }\n\n .p-md-5 {\n padding: 3rem !important;\n }\n\n .px-md-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n .px-md-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important;\n }\n\n .px-md-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n\n .px-md-3 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n\n .px-md-4 {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n\n .px-md-5 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n\n .py-md-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-md-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-md-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-md-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-md-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-md-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-md-0 {\n padding-top: 0 !important;\n }\n\n .pt-md-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-md-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-md-3 {\n padding-top: 1rem !important;\n }\n\n .pt-md-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-md-5 {\n padding-top: 3rem !important;\n }\n\n .pe-md-0 {\n padding-left: 0 !important;\n }\n\n .pe-md-1 {\n padding-left: 0.25rem !important;\n }\n\n .pe-md-2 {\n padding-left: 0.5rem !important;\n }\n\n .pe-md-3 {\n padding-left: 1rem !important;\n }\n\n .pe-md-4 {\n padding-left: 1.5rem !important;\n }\n\n .pe-md-5 {\n padding-left: 3rem !important;\n }\n\n .pb-md-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-md-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-md-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-md-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-md-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-md-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-md-0 {\n padding-right: 0 !important;\n }\n\n .ps-md-1 {\n padding-right: 0.25rem !important;\n }\n\n .ps-md-2 {\n padding-right: 0.5rem !important;\n }\n\n .ps-md-3 {\n padding-right: 1rem !important;\n }\n\n .ps-md-4 {\n padding-right: 1.5rem !important;\n }\n\n .ps-md-5 {\n padding-right: 3rem !important;\n }\n}\n@media (min-width: 992px) {\n .d-lg-inline {\n display: inline !important;\n }\n\n .d-lg-inline-block {\n display: inline-block !important;\n }\n\n .d-lg-block {\n display: block !important;\n }\n\n .d-lg-grid {\n display: grid !important;\n }\n\n .d-lg-table {\n display: table !important;\n }\n\n .d-lg-table-row {\n display: table-row !important;\n }\n\n .d-lg-table-cell {\n display: table-cell !important;\n }\n\n .d-lg-flex {\n display: flex !important;\n }\n\n .d-lg-inline-flex {\n display: inline-flex !important;\n }\n\n .d-lg-none {\n display: none !important;\n }\n\n .flex-lg-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-lg-row {\n flex-direction: row !important;\n }\n\n .flex-lg-column {\n flex-direction: column !important;\n }\n\n .flex-lg-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-lg-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-lg-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-lg-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-lg-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-lg-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-lg-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-lg-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-lg-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-lg-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-lg-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-lg-center {\n justify-content: center !important;\n }\n\n .justify-content-lg-between {\n justify-content: space-between !important;\n }\n\n .justify-content-lg-around {\n justify-content: space-around !important;\n }\n\n .justify-content-lg-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-lg-start {\n align-items: flex-start !important;\n }\n\n .align-items-lg-end {\n align-items: flex-end !important;\n }\n\n .align-items-lg-center {\n align-items: center !important;\n }\n\n .align-items-lg-baseline {\n align-items: baseline !important;\n }\n\n .align-items-lg-stretch {\n align-items: stretch !important;\n }\n\n .align-content-lg-start {\n align-content: flex-start !important;\n }\n\n .align-content-lg-end {\n align-content: flex-end !important;\n }\n\n .align-content-lg-center {\n align-content: center !important;\n }\n\n .align-content-lg-between {\n align-content: space-between !important;\n }\n\n .align-content-lg-around {\n align-content: space-around !important;\n }\n\n .align-content-lg-stretch {\n align-content: stretch !important;\n }\n\n .align-self-lg-auto {\n align-self: auto !important;\n }\n\n .align-self-lg-start {\n align-self: flex-start !important;\n }\n\n .align-self-lg-end {\n align-self: flex-end !important;\n }\n\n .align-self-lg-center {\n align-self: center !important;\n }\n\n .align-self-lg-baseline {\n align-self: baseline !important;\n }\n\n .align-self-lg-stretch {\n align-self: stretch !important;\n }\n\n .order-lg-first {\n order: -1 !important;\n }\n\n .order-lg-0 {\n order: 0 !important;\n }\n\n .order-lg-1 {\n order: 1 !important;\n }\n\n .order-lg-2 {\n order: 2 !important;\n }\n\n .order-lg-3 {\n order: 3 !important;\n }\n\n .order-lg-4 {\n order: 4 !important;\n }\n\n .order-lg-5 {\n order: 5 !important;\n }\n\n .order-lg-last {\n order: 6 !important;\n }\n\n .m-lg-0 {\n margin: 0 !important;\n }\n\n .m-lg-1 {\n margin: 0.25rem !important;\n }\n\n .m-lg-2 {\n margin: 0.5rem !important;\n }\n\n .m-lg-3 {\n margin: 1rem !important;\n }\n\n .m-lg-4 {\n margin: 1.5rem !important;\n }\n\n .m-lg-5 {\n margin: 3rem !important;\n }\n\n .m-lg-auto {\n margin: auto !important;\n }\n\n .mx-lg-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n\n .mx-lg-1 {\n margin-left: 0.25rem !important;\n margin-right: 0.25rem !important;\n }\n\n .mx-lg-2 {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n\n .mx-lg-3 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n\n .mx-lg-4 {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n\n .mx-lg-5 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n\n .mx-lg-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n\n .my-lg-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-lg-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-lg-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-lg-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-lg-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-lg-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-lg-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-lg-0 {\n margin-top: 0 !important;\n }\n\n .mt-lg-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-lg-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-lg-3 {\n margin-top: 1rem !important;\n }\n\n .mt-lg-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-lg-5 {\n margin-top: 3rem !important;\n }\n\n .mt-lg-auto {\n margin-top: auto !important;\n }\n\n .me-lg-0 {\n margin-left: 0 !important;\n }\n\n .me-lg-1 {\n margin-left: 0.25rem !important;\n }\n\n .me-lg-2 {\n margin-left: 0.5rem !important;\n }\n\n .me-lg-3 {\n margin-left: 1rem !important;\n }\n\n .me-lg-4 {\n margin-left: 1.5rem !important;\n }\n\n .me-lg-5 {\n margin-left: 3rem !important;\n }\n\n .me-lg-auto {\n margin-left: auto !important;\n }\n\n .mb-lg-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-lg-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-lg-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-lg-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-lg-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-lg-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-lg-auto {\n margin-bottom: auto !important;\n }\n\n .ms-lg-0 {\n margin-right: 0 !important;\n }\n\n .ms-lg-1 {\n margin-right: 0.25rem !important;\n }\n\n .ms-lg-2 {\n margin-right: 0.5rem !important;\n }\n\n .ms-lg-3 {\n margin-right: 1rem !important;\n }\n\n .ms-lg-4 {\n margin-right: 1.5rem !important;\n }\n\n .ms-lg-5 {\n margin-right: 3rem !important;\n }\n\n .ms-lg-auto {\n margin-right: auto !important;\n }\n\n .p-lg-0 {\n padding: 0 !important;\n }\n\n .p-lg-1 {\n padding: 0.25rem !important;\n }\n\n .p-lg-2 {\n padding: 0.5rem !important;\n }\n\n .p-lg-3 {\n padding: 1rem !important;\n }\n\n .p-lg-4 {\n padding: 1.5rem !important;\n }\n\n .p-lg-5 {\n padding: 3rem !important;\n }\n\n .px-lg-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n .px-lg-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important;\n }\n\n .px-lg-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n\n .px-lg-3 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n\n .px-lg-4 {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n\n .px-lg-5 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n\n .py-lg-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-lg-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-lg-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-lg-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-lg-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-lg-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-lg-0 {\n padding-top: 0 !important;\n }\n\n .pt-lg-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-lg-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-lg-3 {\n padding-top: 1rem !important;\n }\n\n .pt-lg-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-lg-5 {\n padding-top: 3rem !important;\n }\n\n .pe-lg-0 {\n padding-left: 0 !important;\n }\n\n .pe-lg-1 {\n padding-left: 0.25rem !important;\n }\n\n .pe-lg-2 {\n padding-left: 0.5rem !important;\n }\n\n .pe-lg-3 {\n padding-left: 1rem !important;\n }\n\n .pe-lg-4 {\n padding-left: 1.5rem !important;\n }\n\n .pe-lg-5 {\n padding-left: 3rem !important;\n }\n\n .pb-lg-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-lg-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-lg-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-lg-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-lg-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-lg-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-lg-0 {\n padding-right: 0 !important;\n }\n\n .ps-lg-1 {\n padding-right: 0.25rem !important;\n }\n\n .ps-lg-2 {\n padding-right: 0.5rem !important;\n }\n\n .ps-lg-3 {\n padding-right: 1rem !important;\n }\n\n .ps-lg-4 {\n padding-right: 1.5rem !important;\n }\n\n .ps-lg-5 {\n padding-right: 3rem !important;\n }\n}\n@media (min-width: 1200px) {\n .d-xl-inline {\n display: inline !important;\n }\n\n .d-xl-inline-block {\n display: inline-block !important;\n }\n\n .d-xl-block {\n display: block !important;\n }\n\n .d-xl-grid {\n display: grid !important;\n }\n\n .d-xl-table {\n display: table !important;\n }\n\n .d-xl-table-row {\n display: table-row !important;\n }\n\n .d-xl-table-cell {\n display: table-cell !important;\n }\n\n .d-xl-flex {\n display: flex !important;\n }\n\n .d-xl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xl-none {\n display: none !important;\n }\n\n .flex-xl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xl-row {\n flex-direction: row !important;\n }\n\n .flex-xl-column {\n flex-direction: column !important;\n }\n\n .flex-xl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xl-center {\n justify-content: center !important;\n }\n\n .justify-content-xl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xl-center {\n align-items: center !important;\n }\n\n .align-items-xl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xl-center {\n align-content: center !important;\n }\n\n .align-content-xl-between {\n align-content: space-between !important;\n }\n\n .align-content-xl-around {\n align-content: space-around !important;\n }\n\n .align-content-xl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xl-auto {\n align-self: auto !important;\n }\n\n .align-self-xl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xl-center {\n align-self: center !important;\n }\n\n .align-self-xl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xl-stretch {\n align-self: stretch !important;\n }\n\n .order-xl-first {\n order: -1 !important;\n }\n\n .order-xl-0 {\n order: 0 !important;\n }\n\n .order-xl-1 {\n order: 1 !important;\n }\n\n .order-xl-2 {\n order: 2 !important;\n }\n\n .order-xl-3 {\n order: 3 !important;\n }\n\n .order-xl-4 {\n order: 4 !important;\n }\n\n .order-xl-5 {\n order: 5 !important;\n }\n\n .order-xl-last {\n order: 6 !important;\n }\n\n .m-xl-0 {\n margin: 0 !important;\n }\n\n .m-xl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xl-3 {\n margin: 1rem !important;\n }\n\n .m-xl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xl-5 {\n margin: 3rem !important;\n }\n\n .m-xl-auto {\n margin: auto !important;\n }\n\n .mx-xl-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n\n .mx-xl-1 {\n margin-left: 0.25rem !important;\n margin-right: 0.25rem !important;\n }\n\n .mx-xl-2 {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n\n .mx-xl-3 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n\n .mx-xl-4 {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n\n .mx-xl-5 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n\n .mx-xl-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n\n .my-xl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xl-auto {\n margin-top: auto !important;\n }\n\n .me-xl-0 {\n margin-left: 0 !important;\n }\n\n .me-xl-1 {\n margin-left: 0.25rem !important;\n }\n\n .me-xl-2 {\n margin-left: 0.5rem !important;\n }\n\n .me-xl-3 {\n margin-left: 1rem !important;\n }\n\n .me-xl-4 {\n margin-left: 1.5rem !important;\n }\n\n .me-xl-5 {\n margin-left: 3rem !important;\n }\n\n .me-xl-auto {\n margin-left: auto !important;\n }\n\n .mb-xl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xl-0 {\n margin-right: 0 !important;\n }\n\n .ms-xl-1 {\n margin-right: 0.25rem !important;\n }\n\n .ms-xl-2 {\n margin-right: 0.5rem !important;\n }\n\n .ms-xl-3 {\n margin-right: 1rem !important;\n }\n\n .ms-xl-4 {\n margin-right: 1.5rem !important;\n }\n\n .ms-xl-5 {\n margin-right: 3rem !important;\n }\n\n .ms-xl-auto {\n margin-right: auto !important;\n }\n\n .p-xl-0 {\n padding: 0 !important;\n }\n\n .p-xl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xl-3 {\n padding: 1rem !important;\n }\n\n .p-xl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xl-5 {\n padding: 3rem !important;\n }\n\n .px-xl-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n .px-xl-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important;\n }\n\n .px-xl-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n\n .px-xl-3 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n\n .px-xl-4 {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n\n .px-xl-5 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n\n .py-xl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xl-0 {\n padding-left: 0 !important;\n }\n\n .pe-xl-1 {\n padding-left: 0.25rem !important;\n }\n\n .pe-xl-2 {\n padding-left: 0.5rem !important;\n }\n\n .pe-xl-3 {\n padding-left: 1rem !important;\n }\n\n .pe-xl-4 {\n padding-left: 1.5rem !important;\n }\n\n .pe-xl-5 {\n padding-left: 3rem !important;\n }\n\n .pb-xl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xl-0 {\n padding-right: 0 !important;\n }\n\n .ps-xl-1 {\n padding-right: 0.25rem !important;\n }\n\n .ps-xl-2 {\n padding-right: 0.5rem !important;\n }\n\n .ps-xl-3 {\n padding-right: 1rem !important;\n }\n\n .ps-xl-4 {\n padding-right: 1.5rem !important;\n }\n\n .ps-xl-5 {\n padding-right: 3rem !important;\n }\n}\n@media (min-width: 1400px) {\n .d-xxl-inline {\n display: inline !important;\n }\n\n .d-xxl-inline-block {\n display: inline-block !important;\n }\n\n .d-xxl-block {\n display: block !important;\n }\n\n .d-xxl-grid {\n display: grid !important;\n }\n\n .d-xxl-table {\n display: table !important;\n }\n\n .d-xxl-table-row {\n display: table-row !important;\n }\n\n .d-xxl-table-cell {\n display: table-cell !important;\n }\n\n .d-xxl-flex {\n display: flex !important;\n }\n\n .d-xxl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xxl-none {\n display: none !important;\n }\n\n .flex-xxl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xxl-row {\n flex-direction: row !important;\n }\n\n .flex-xxl-column {\n flex-direction: column !important;\n }\n\n .flex-xxl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xxl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xxl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xxl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xxl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xxl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xxl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xxl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xxl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xxl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xxl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xxl-center {\n justify-content: center !important;\n }\n\n .justify-content-xxl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xxl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xxl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xxl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xxl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xxl-center {\n align-items: center !important;\n }\n\n .align-items-xxl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xxl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xxl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xxl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xxl-center {\n align-content: center !important;\n }\n\n .align-content-xxl-between {\n align-content: space-between !important;\n }\n\n .align-content-xxl-around {\n align-content: space-around !important;\n }\n\n .align-content-xxl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xxl-auto {\n align-self: auto !important;\n }\n\n .align-self-xxl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xxl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xxl-center {\n align-self: center !important;\n }\n\n .align-self-xxl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xxl-stretch {\n align-self: stretch !important;\n }\n\n .order-xxl-first {\n order: -1 !important;\n }\n\n .order-xxl-0 {\n order: 0 !important;\n }\n\n .order-xxl-1 {\n order: 1 !important;\n }\n\n .order-xxl-2 {\n order: 2 !important;\n }\n\n .order-xxl-3 {\n order: 3 !important;\n }\n\n .order-xxl-4 {\n order: 4 !important;\n }\n\n .order-xxl-5 {\n order: 5 !important;\n }\n\n .order-xxl-last {\n order: 6 !important;\n }\n\n .m-xxl-0 {\n margin: 0 !important;\n }\n\n .m-xxl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xxl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xxl-3 {\n margin: 1rem !important;\n }\n\n .m-xxl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xxl-5 {\n margin: 3rem !important;\n }\n\n .m-xxl-auto {\n margin: auto !important;\n }\n\n .mx-xxl-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n\n .mx-xxl-1 {\n margin-left: 0.25rem !important;\n margin-right: 0.25rem !important;\n }\n\n .mx-xxl-2 {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n\n .mx-xxl-3 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n\n .mx-xxl-4 {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n\n .mx-xxl-5 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n\n .mx-xxl-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n\n .my-xxl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xxl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xxl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xxl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xxl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xxl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xxl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xxl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xxl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xxl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xxl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xxl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xxl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xxl-auto {\n margin-top: auto !important;\n }\n\n .me-xxl-0 {\n margin-left: 0 !important;\n }\n\n .me-xxl-1 {\n margin-left: 0.25rem !important;\n }\n\n .me-xxl-2 {\n margin-left: 0.5rem !important;\n }\n\n .me-xxl-3 {\n margin-left: 1rem !important;\n }\n\n .me-xxl-4 {\n margin-left: 1.5rem !important;\n }\n\n .me-xxl-5 {\n margin-left: 3rem !important;\n }\n\n .me-xxl-auto {\n margin-left: auto !important;\n }\n\n .mb-xxl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xxl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xxl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xxl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xxl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xxl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xxl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xxl-0 {\n margin-right: 0 !important;\n }\n\n .ms-xxl-1 {\n margin-right: 0.25rem !important;\n }\n\n .ms-xxl-2 {\n margin-right: 0.5rem !important;\n }\n\n .ms-xxl-3 {\n margin-right: 1rem !important;\n }\n\n .ms-xxl-4 {\n margin-right: 1.5rem !important;\n }\n\n .ms-xxl-5 {\n margin-right: 3rem !important;\n }\n\n .ms-xxl-auto {\n margin-right: auto !important;\n }\n\n .p-xxl-0 {\n padding: 0 !important;\n }\n\n .p-xxl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xxl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xxl-3 {\n padding: 1rem !important;\n }\n\n .p-xxl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xxl-5 {\n padding: 3rem !important;\n }\n\n .px-xxl-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n .px-xxl-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important;\n }\n\n .px-xxl-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n\n .px-xxl-3 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n\n .px-xxl-4 {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n\n .px-xxl-5 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n\n .py-xxl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xxl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xxl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xxl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xxl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xxl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xxl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xxl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xxl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xxl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xxl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xxl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xxl-0 {\n padding-left: 0 !important;\n }\n\n .pe-xxl-1 {\n padding-left: 0.25rem !important;\n }\n\n .pe-xxl-2 {\n padding-left: 0.5rem !important;\n }\n\n .pe-xxl-3 {\n padding-left: 1rem !important;\n }\n\n .pe-xxl-4 {\n padding-left: 1.5rem !important;\n }\n\n .pe-xxl-5 {\n padding-left: 3rem !important;\n }\n\n .pb-xxl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xxl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xxl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xxl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xxl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xxl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xxl-0 {\n padding-right: 0 !important;\n }\n\n .ps-xxl-1 {\n padding-right: 0.25rem !important;\n }\n\n .ps-xxl-2 {\n padding-right: 0.5rem !important;\n }\n\n .ps-xxl-3 {\n padding-right: 1rem !important;\n }\n\n .ps-xxl-4 {\n padding-right: 1.5rem !important;\n }\n\n .ps-xxl-5 {\n padding-right: 3rem !important;\n }\n}\n@media print {\n .d-print-inline {\n display: inline !important;\n }\n\n .d-print-inline-block {\n display: inline-block !important;\n }\n\n .d-print-block {\n display: block !important;\n }\n\n .d-print-grid {\n display: grid !important;\n }\n\n .d-print-table {\n display: table !important;\n }\n\n .d-print-table-row {\n display: table-row !important;\n }\n\n .d-print-table-cell {\n display: table-cell !important;\n }\n\n .d-print-flex {\n display: flex !important;\n }\n\n .d-print-inline-flex {\n display: inline-flex !important;\n }\n\n .d-print-none {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap-grid.rtl.css.map */","// Container mixins\n\n@mixin make-container($gutter: $container-padding-x) {\n width: 100%;\n padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter});\n padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter});\n margin-right: auto;\n margin-left: auto;\n}\n","// Breakpoint viewport sizes and media queries.\n//\n// Breakpoints are defined as a map of (name: minimum width), order from small to large:\n//\n// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n//\n// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n\n// Name of the next breakpoint, or null for the last breakpoint.\n//\n// >> breakpoint-next(sm)\n// md\n// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// md\n// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n// md\n@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {\n $n: index($breakpoint-names, $name);\n @if not $n {\n @error \"breakpoint `#{$name}` not found in `#{$breakpoints}`\";\n }\n @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);\n}\n\n// Minimum breakpoint width. Null for the smallest (first) breakpoint.\n//\n// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 576px\n@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {\n $min: map-get($breakpoints, $name);\n @return if($min != 0, $min, null);\n}\n\n// Maximum breakpoint width.\n// The maximum value is reduced by 0.02px to work around the limitations of\n// `min-` and `max-` prefixes and viewports with fractional widths.\n// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n// See https://bugs.webkit.org/show_bug.cgi?id=178261\n//\n// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 767.98px\n@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {\n $max: map-get($breakpoints, $name);\n @return if($max and $max > 0, $max - .02, null);\n}\n\n// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n// Useful for making responsive utilities.\n//\n// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"\" (Returns a blank string)\n// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"-sm\"\n@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {\n @return if(breakpoint-min($name, $breakpoints) == null, \"\", \"-#{$name}\");\n}\n\n// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n// Makes the @content apply to the given breakpoint and wider.\n@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n @if $min {\n @media (min-width: $min) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n// Makes the @content apply to the given breakpoint and narrower.\n@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {\n $max: breakpoint-max($name, $breakpoints);\n @if $max {\n @media (max-width: $max) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media that spans multiple breakpoint widths.\n// Makes the @content apply between the min and max breakpoints\n@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($lower, $breakpoints);\n $max: breakpoint-max($upper, $breakpoints);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($lower, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($upper, $breakpoints) {\n @content;\n }\n }\n}\n\n// Media between the breakpoint's minimum and maximum widths.\n// No minimum for the smallest breakpoint, and no maximum for the largest one.\n// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n $next: breakpoint-next($name, $breakpoints);\n $max: breakpoint-max($next);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($name, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($next, $breakpoints) {\n @content;\n }\n }\n}\n","// Row\n//\n// Rows contain your columns.\n\n@if $enable-grid-classes {\n .row {\n @include make-row();\n\n > * {\n @include make-col-ready();\n }\n }\n}\n\n@if $enable-cssgrid {\n .grid {\n display: grid;\n grid-template-rows: repeat(var(--#{$variable-prefix}rows, 1), 1fr);\n grid-template-columns: repeat(var(--#{$variable-prefix}columns, #{$grid-columns}), 1fr);\n gap: var(--#{$variable-prefix}gap, #{$grid-gutter-width});\n\n @include make-cssgrid();\n }\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n@if $enable-grid-classes {\n @include make-grid-columns();\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n@mixin make-row($gutter: $grid-gutter-width) {\n --#{$variable-prefix}gutter-x: #{$gutter};\n --#{$variable-prefix}gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list\n margin-right: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n margin-left: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n}\n\n@mixin make-col-ready($gutter: $grid-gutter-width) {\n // Add box sizing if only the grid is loaded\n box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);\n // Prevent columns from becoming too narrow when at smaller grid tiers by\n // always setting `width: 100%;`. This works because we set the width\n // later on to override this initial width.\n flex-shrink: 0;\n width: 100%;\n max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid\n padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n padding-left: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n margin-top: var(--#{$variable-prefix}gutter-y);\n}\n\n@mixin make-col($size: false, $columns: $grid-columns) {\n @if $size {\n flex: 0 0 auto;\n width: percentage(divide($size, $columns));\n\n } @else {\n flex: 1 1 0;\n max-width: 100%;\n }\n}\n\n@mixin make-col-auto() {\n flex: 0 0 auto;\n width: auto;\n}\n\n@mixin make-col-offset($size, $columns: $grid-columns) {\n $num: divide($size, $columns);\n margin-left: if($num == 0, 0, percentage($num));\n}\n\n// Row columns\n//\n// Specify on a parent element(e.g., .row) to force immediate children into NN\n// numberof columns. Supports wrapping to new lines, but does not do a Masonry\n// style grid.\n@mixin row-cols($count) {\n > * {\n flex: 0 0 auto;\n width: divide(100%, $count);\n }\n}\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `$grid-columns`.\n\n@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n // Provide basic `.col-{bp}` classes for equal-width flexbox columns\n .col#{$infix} {\n flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4\n }\n\n .row-cols#{$infix}-auto > * {\n @include make-col-auto();\n }\n\n @if $grid-row-columns > 0 {\n @for $i from 1 through $grid-row-columns {\n .row-cols#{$infix}-#{$i} {\n @include row-cols($i);\n }\n }\n }\n\n .col#{$infix}-auto {\n @include make-col-auto();\n }\n\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .col#{$infix}-#{$i} {\n @include make-col($i, $columns);\n }\n }\n\n // `$columns - 1` because offsetting by the width of an entire row isn't possible\n @for $i from 0 through ($columns - 1) {\n @if not ($infix == \"\" and $i == 0) { // Avoid emitting useless .offset-0\n .offset#{$infix}-#{$i} {\n @include make-col-offset($i, $columns);\n }\n }\n }\n }\n\n // Gutters\n //\n // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.\n @each $key, $value in $gutters {\n .g#{$infix}-#{$key},\n .gx#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-x: #{$value};\n }\n\n .g#{$infix}-#{$key},\n .gy#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-y: #{$value};\n }\n }\n }\n }\n}\n\n@mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .g-col#{$infix}-#{$i} {\n grid-column: auto / span $i;\n }\n }\n\n // Start with `1` because `0` is and invalid value.\n // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.\n @for $i from 1 through ($columns - 1) {\n .g-start#{$infix}-#{$i} {\n grid-column-start: $i;\n }\n }\n }\n }\n }\n}\n","// Utility generator\n// Used to generate utilities & print utilities\n@mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {\n $values: map-get($utility, values);\n\n // If the values are a list or string, convert it into a map\n @if type-of($values) == \"string\" or type-of(nth($values, 1)) != \"list\" {\n $values: zip($values, $values);\n }\n\n @each $key, $value in $values {\n $properties: map-get($utility, property);\n\n // Multiple properties are possible, for example with vertical or horizontal margins or paddings\n @if type-of($properties) == \"string\" {\n $properties: append((), $properties);\n }\n\n // Use custom class if present\n $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));\n $property-class: if($property-class == null, \"\", $property-class);\n\n // State params to generate pseudo-classes\n $state: if(map-has-key($utility, state), map-get($utility, state), ());\n\n $infix: if($property-class == \"\" and str-slice($infix, 1, 1) == \"-\", str-slice($infix, 2), $infix);\n\n // Don't prefix if value key is null (eg. with shadow class)\n $property-class-modifier: if($key, if($property-class == \"\" and $infix == \"\", \"\", \"-\") + $key, \"\");\n\n @if map-get($utility, rfs) {\n // Inside the media query\n @if $is-rfs-media-query {\n $val: rfs-value($value);\n\n // Do not render anything if fluid and non fluid values are the same\n $value: if($val == rfs-fluid-value($value), null, $val);\n }\n @else {\n $value: rfs-fluid-value($value);\n }\n }\n\n $is-css-var: map-get($utility, css-var);\n $is-local-vars: map-get($utility, local-vars);\n $is-rtl: map-get($utility, rtl);\n\n @if $value != null {\n @if $is-rtl == false {\n /* rtl:begin:remove */\n }\n\n @if $is-css-var {\n .#{$property-class + $infix + $property-class-modifier} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n }\n } @else {\n .#{$property-class + $infix + $property-class-modifier} {\n @each $property in $properties {\n @if $is-local-vars {\n @each $local-var, $value in $is-local-vars {\n --#{$variable-prefix}#{$local-var}: #{$value};\n }\n }\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n @each $property in $properties {\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n }\n }\n\n @if $is-rtl == false {\n /* rtl:end:remove */\n }\n }\n }\n}\n","// Loop over each breakpoint\n@each $breakpoint in map-keys($grid-breakpoints) {\n\n // Generate media query if needed\n @include media-breakpoint-up($breakpoint) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix);\n }\n }\n }\n}\n\n// RFS rescaling\n@media (min-width: $rfs-mq-value) {\n @each $breakpoint in map-keys($grid-breakpoints) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n @if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix, true);\n }\n }\n }\n }\n}\n\n\n// Print utilities\n@media print {\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Then check if the utility needs print styles\n @if type-of($utility) == \"map\" and map-get($utility, print) == true {\n @include generate-utility($utility, \"-print\");\n }\n }\n}\n"]} \ No newline at end of file diff --git a/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css new file mode 100644 index 0000000..c1bcf3b --- /dev/null +++ b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css @@ -0,0 +1,427 @@ +/*! + * Bootstrap Reboot v5.1.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) + */ +*, +*::before, +*::after { + box-sizing: border-box; +} + +@media (prefers-reduced-motion: no-preference) { + :root { + scroll-behavior: smooth; + } +} + +body { + margin: 0; + font-family: var(--bs-body-font-family); + font-size: var(--bs-body-font-size); + font-weight: var(--bs-body-font-weight); + line-height: var(--bs-body-line-height); + color: var(--bs-body-color); + text-align: var(--bs-body-text-align); + background-color: var(--bs-body-bg); + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +hr { + margin: 1rem 0; + color: inherit; + background-color: currentColor; + border: 0; + opacity: 0.25; +} + +hr:not([size]) { + height: 1px; +} + +h6, h5, h4, h3, h2, h1 { + margin-top: 0; + margin-bottom: 0.5rem; + font-weight: 500; + line-height: 1.2; +} + +h1 { + font-size: calc(1.375rem + 1.5vw); +} +@media (min-width: 1200px) { + h1 { + font-size: 2.5rem; + } +} + +h2 { + font-size: calc(1.325rem + 0.9vw); +} +@media (min-width: 1200px) { + h2 { + font-size: 2rem; + } +} + +h3 { + font-size: calc(1.3rem + 0.6vw); +} +@media (min-width: 1200px) { + h3 { + font-size: 1.75rem; + } +} + +h4 { + font-size: calc(1.275rem + 0.3vw); +} +@media (min-width: 1200px) { + h4 { + font-size: 1.5rem; + } +} + +h5 { + font-size: 1.25rem; +} + +h6 { + font-size: 1rem; +} + +p { + margin-top: 0; + margin-bottom: 1rem; +} + +abbr[title], +abbr[data-bs-original-title] { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + cursor: help; + -webkit-text-decoration-skip-ink: none; + text-decoration-skip-ink: none; +} + +address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +ol, +ul { + padding-left: 2rem; +} + +ol, +ul, +dl { + margin-top: 0; + margin-bottom: 1rem; +} + +ol ol, +ul ul, +ol ul, +ul ol { + margin-bottom: 0; +} + +dt { + font-weight: 700; +} + +dd { + margin-bottom: 0.5rem; + margin-left: 0; +} + +blockquote { + margin: 0 0 1rem; +} + +b, +strong { + font-weight: bolder; +} + +small { + font-size: 0.875em; +} + +mark { + padding: 0.2em; + background-color: #fcf8e3; +} + +sub, +sup { + position: relative; + font-size: 0.75em; + line-height: 0; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +a { + color: #0d6efd; + text-decoration: underline; +} +a:hover { + color: #0a58ca; +} + +a:not([href]):not([class]), a:not([href]):not([class]):hover { + color: inherit; + text-decoration: none; +} + +pre, +code, +kbd, +samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + font-size: 1em; + direction: ltr /* rtl:ignore */; + unicode-bidi: bidi-override; +} + +pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + font-size: 0.875em; +} +pre code { + font-size: inherit; + color: inherit; + word-break: normal; +} + +code { + font-size: 0.875em; + color: #d63384; + word-wrap: break-word; +} +a > code { + color: inherit; +} + +kbd { + padding: 0.2rem 0.4rem; + font-size: 0.875em; + color: #fff; + background-color: #212529; + border-radius: 0.2rem; +} +kbd kbd { + padding: 0; + font-size: 1em; + font-weight: 700; +} + +figure { + margin: 0 0 1rem; +} + +img, +svg { + vertical-align: middle; +} + +table { + caption-side: bottom; + border-collapse: collapse; +} + +caption { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: #6c757d; + text-align: left; +} + +th { + text-align: inherit; + text-align: -webkit-match-parent; +} + +thead, +tbody, +tfoot, +tr, +td, +th { + border-color: inherit; + border-style: solid; + border-width: 0; +} + +label { + display: inline-block; +} + +button { + border-radius: 0; +} + +button:focus:not(:focus-visible) { + outline: 0; +} + +input, +button, +select, +optgroup, +textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +button, +select { + text-transform: none; +} + +[role=button] { + cursor: pointer; +} + +select { + word-wrap: normal; +} +select:disabled { + opacity: 1; +} + +[list]::-webkit-calendar-picker-indicator { + display: none; +} + +button, +[type=button], +[type=reset], +[type=submit] { + -webkit-appearance: button; +} +button:not(:disabled), +[type=button]:not(:disabled), +[type=reset]:not(:disabled), +[type=submit]:not(:disabled) { + cursor: pointer; +} + +::-moz-focus-inner { + padding: 0; + border-style: none; +} + +textarea { + resize: vertical; +} + +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} + +legend { + float: left; + width: 100%; + padding: 0; + margin-bottom: 0.5rem; + font-size: calc(1.275rem + 0.3vw); + line-height: inherit; +} +@media (min-width: 1200px) { + legend { + font-size: 1.5rem; + } +} +legend + * { + clear: left; +} + +::-webkit-datetime-edit-fields-wrapper, +::-webkit-datetime-edit-text, +::-webkit-datetime-edit-minute, +::-webkit-datetime-edit-hour-field, +::-webkit-datetime-edit-day-field, +::-webkit-datetime-edit-month-field, +::-webkit-datetime-edit-year-field { + padding: 0; +} + +::-webkit-inner-spin-button { + height: auto; +} + +[type=search] { + outline-offset: -2px; + -webkit-appearance: textfield; +} + +/* rtl:raw: +[type="tel"], +[type="url"], +[type="email"], +[type="number"] { + direction: ltr; +} +*/ +::-webkit-search-decoration { + -webkit-appearance: none; +} + +::-webkit-color-swatch-wrapper { + padding: 0; +} + +::file-selector-button { + font: inherit; +} + +::-webkit-file-upload-button { + font: inherit; + -webkit-appearance: button; +} + +output { + display: inline-block; +} + +iframe { + border: 0; +} + +summary { + display: list-item; + cursor: pointer; +} + +progress { + vertical-align: baseline; +} + +[hidden] { + display: none !important; +} + +/*# sourceMappingURL=bootstrap-reboot.css.map */ \ No newline at end of file diff --git a/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map new file mode 100644 index 0000000..c06c13a --- /dev/null +++ b/Berry/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/bootstrap-reboot.scss","../../scss/_reboot.scss","bootstrap-reboot.css","../../scss/vendor/_rfs.scss","../../scss/_variables.scss","../../scss/mixins/_border-radius.scss"],"names":[],"mappings":"AAAA;;;;;;EAAA;ACeA;;;EAGE,sBAAA;ACPF;;ADsBI;EANJ;IAOM,uBAAA;EClBJ;AACF;;AD+BA;EACE,SAAA;EACA,uCAAA;EEmPI,mCALI;EF5OR,uCAAA;EACA,uCAAA;EACA,2BAAA;EACA,qCAAA;EACA,mCAAA;EACA,8BAAA;EACA,6CAAA;AC5BF;;ADsCA;EACE,cAAA;EACA,cGqkB4B;EHpkB5B,8BAAA;EACA,SAAA;EACA,aGokB4B;AFvmB9B;;ADsCA;EACE,WG8a4B;AFjd9B;;AD6CA;EACE,aAAA;EACA,qBG0gB4B;EHvgB5B,gBG0gB4B;EHzgB5B,gBG0gB4B;AFtjB9B;;ADgDA;EEwMQ,iCAAA;ADpPR;ACkFI;EFtCJ;IE+MQ,iBAAA;EDvPN;AACF;;AD4CA;EEmMQ,iCAAA;AD3OR;ACyEI;EFjCJ;IE0MQ,eAAA;ED9ON;AACF;;ADwCA;EE8LQ,+BAAA;ADlOR;ACgEI;EF5BJ;IEqMQ,kBAAA;EDrON;AACF;;ADoCA;EEyLQ,iCAAA;ADzNR;ACuDI;EFvBJ;IEgMQ,iBAAA;ED5NN;AACF;;ADgCA;EEgLM,kBALI;ADvMV;;ADiCA;EE2KM,eALI;ADnMV;;ADwCA;EACE,aAAA;EACA,mBGwT0B;AF7V5B;;ADgDA;;EAEE,yCAAA;EAAA,iCAAA;EACA,YAAA;EACA,sCAAA;EAAA,8BAAA;AC7CF;;ADmDA;EACE,mBAAA;EACA,kBAAA;EACA,oBAAA;AChDF;;ADsDA;;EAEE,kBAAA;ACnDF;;ADsDA;;;EAGE,aAAA;EACA,mBAAA;ACnDF;;ADsDA;;;;EAIE,gBAAA;ACnDF;;ADsDA;EACE,gBG6Y4B;AFhc9B;;ADwDA;EACE,qBAAA;EACA,cAAA;ACrDF;;AD2DA;EACE,gBAAA;ACxDF;;ADgEA;;EAEE,mBGsX4B;AFnb9B;;ADqEA;EE4EM,kBALI;ADxIV;;ADwEA;EACE,cGkb4B;EHjb5B,yBGyb4B;AF9f9B;;AD8EA;;EAEE,kBAAA;EEwDI,iBALI;EFjDR,cAAA;EACA,wBAAA;AC3EF;;AD8EA;EAAM,eAAA;AC1EN;;AD2EA;EAAM,WAAA;ACvEN;;AD4EA;EACE,cGpNQ;EHqNR,0BGwLwC;AFjQ1C;AD2EE;EACE,cGuLsC;AFhQ1C;;ADoFE;EAEE,cAAA;EACA,qBAAA;AClFJ;;ADyFA;;;;EAIE,iGGgS4B;EDlRxB,cALI;EFPR,+BAAA;EACA,2BAAA;ACtFF;;AD6FA;EACE,cAAA;EACA,aAAA;EACA,mBAAA;EACA,cAAA;EEAI,kBALI;ADpFV;AD8FE;EELI,kBALI;EFYN,cAAA;EACA,kBAAA;AC5FJ;;ADgGA;EEZM,kBALI;EFmBR,cG1QQ;EH2QR,qBAAA;AC7FF;ADgGE;EACE,cAAA;AC9FJ;;ADkGA;EACE,sBAAA;EExBI,kBALI;EF+BR,WGvTS;EHwTT,yBG/SS;ECEP,qBAAA;AH+MJ;ADiGE;EACE,UAAA;EE/BE,cALI;EFsCN,gBGgQ0B;AF/V9B;;ADwGA;EACE,gBAAA;ACrGF;;AD2GA;;EAEE,sBAAA;ACxGF;;ADgHA;EACE,oBAAA;EACA,yBAAA;AC7GF;;ADgHA;EACE,mBG8T4B;EH7T5B,sBG6T4B;EH5T5B,cG1VS;EH2VT,gBAAA;AC7GF;;ADoHA;EAEE,mBAAA;EACA,gCAAA;AClHF;;ADqHA;;;;;;EAME,qBAAA;EACA,mBAAA;EACA,eAAA;AClHF;;AD0HA;EACE,qBAAA;ACvHF;;AD6HA;EAEE,gBAAA;AC3HF;;ADmIA;EACE,UAAA;AChIF;;ADqIA;;;;;EAKE,SAAA;EACA,oBAAA;EE9HI,kBALI;EFqIR,oBAAA;AClIF;;ADsIA;;EAEE,oBAAA;ACnIF;;ADwIA;EACE,eAAA;ACrIF;;ADwIA;EAGE,iBAAA;ACvIF;AD0IE;EACE,UAAA;ACxIJ;;AD+IA;EACE,aAAA;AC5IF;;ADoJA;;;;EAIE,0BAAA;ACjJF;ADoJI;;;;EACE,eAAA;AC/IN;;ADsJA;EACE,UAAA;EACA,kBAAA;ACnJF;;ADwJA;EACE,gBAAA;ACrJF;;AD+JA;EACE,YAAA;EACA,UAAA;EACA,SAAA;EACA,SAAA;AC5JF;;ADoKA;EACE,WAAA;EACA,WAAA;EACA,UAAA;EACA,qBGmJ4B;EDtWtB,iCAAA;EFsNN,oBAAA;AClKF;ACtNI;EFiXJ;IExMQ,iBAAA;EDiDN;AACF;AD+JE;EACE,WAAA;AC7JJ;;ADoKA;;;;;;;EAOE,UAAA;ACjKF;;ADoKA;EACE,YAAA;ACjKF;;AD0KA;EACE,oBAAA;EACA,6BAAA;ACvKF;;AD+KA;;;;;;;CAAA;AAWA;EACE,wBAAA;AC/KF;;ADoLA;EACE,UAAA;ACjLF;;ADuLA;EACE,aAAA;ACpLF;;AD0LA;EACE,aAAA;EACA,0BAAA;ACvLF;;AD4LA;EACE,qBAAA;ACzLF;;AD8LA;EACE,SAAA;AC3LF;;ADkMA;EACE,kBAAA;EACA,eAAA;AC/LF;;ADuMA;EACE,wBAAA;ACpMF;;AD4MA;EACE,wBAAA;ACzMF","file":"bootstrap-reboot.css","sourcesContent":["/*!\n * Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)\n */\n\n@import \"functions\";\n@import \"variables\";\n// Prevent the usage of custom properties since we don't add them to `:root` in reboot\n$font-family-base: $font-family-sans-serif; // stylelint-disable-line scss/dollar-variable-default\n$font-family-code: $font-family-monospace; // stylelint-disable-line scss/dollar-variable-default\n@import \"mixins\";\n@import \"reboot\";\n","// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix\n\n\n// Reboot\n//\n// Normalization of HTML elements, manually forked from Normalize.css to remove\n// styles targeting irrelevant browsers while applying new styles.\n//\n// Normalize is licensed MIT. https://github.com/necolas/normalize.css\n\n\n// Document\n//\n// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n\n// Root\n//\n// Ability to the value of the root font sizes, affecting the value of `rem`.\n// null by default, thus nothing is generated.\n\n:root {\n @if $font-size-root != null {\n font-size: var(--#{$variable-prefix}-root-font-size);\n }\n\n @if $enable-smooth-scroll {\n @media (prefers-reduced-motion: no-preference) {\n scroll-behavior: smooth;\n }\n }\n}\n\n\n// Body\n//\n// 1. Remove the margin in all browsers.\n// 2. As a best practice, apply a default `background-color`.\n// 3. Prevent adjustments of font size after orientation changes in iOS.\n// 4. Change the default tap highlight to be completely transparent in iOS.\n\n// scss-docs-start reboot-body-rules\nbody {\n margin: 0; // 1\n font-family: var(--#{$variable-prefix}body-font-family);\n @include font-size(var(--#{$variable-prefix}body-font-size));\n font-weight: var(--#{$variable-prefix}body-font-weight);\n line-height: var(--#{$variable-prefix}body-line-height);\n color: var(--#{$variable-prefix}body-color);\n text-align: var(--#{$variable-prefix}body-text-align);\n background-color: var(--#{$variable-prefix}body-bg); // 2\n -webkit-text-size-adjust: 100%; // 3\n -webkit-tap-highlight-color: rgba($black, 0); // 4\n}\n// scss-docs-end reboot-body-rules\n\n\n// Content grouping\n//\n// 1. Reset Firefox's gray color\n// 2. Set correct height and prevent the `size` attribute to make the `hr` look like an input field\n\nhr {\n margin: $hr-margin-y 0;\n color: $hr-color; // 1\n background-color: currentColor;\n border: 0;\n opacity: $hr-opacity;\n}\n\nhr:not([size]) {\n height: $hr-height; // 2\n}\n\n\n// Typography\n//\n// 1. Remove top margins from headings\n// By default, `

`-`

` all receive top and bottom margins. We nuke the top\n// margin for easier control within type scales as it avoids margin collapsing.\n\n%heading {\n margin-top: 0; // 1\n margin-bottom: $headings-margin-bottom;\n font-family: $headings-font-family;\n font-style: $headings-font-style;\n font-weight: $headings-font-weight;\n line-height: $headings-line-height;\n color: $headings-color;\n}\n\nh1 {\n @extend %heading;\n @include font-size($h1-font-size);\n}\n\nh2 {\n @extend %heading;\n @include font-size($h2-font-size);\n}\n\nh3 {\n @extend %heading;\n @include font-size($h3-font-size);\n}\n\nh4 {\n @extend %heading;\n @include font-size($h4-font-size);\n}\n\nh5 {\n @extend %heading;\n @include font-size($h5-font-size);\n}\n\nh6 {\n @extend %heading;\n @include font-size($h6-font-size);\n}\n\n\n// Reset margins on paragraphs\n//\n// Similarly, the top margin on `

`s get reset. However, we also reset the\n// bottom margin to use `rem` units instead of `em`.\n\np {\n margin-top: 0;\n margin-bottom: $paragraph-margin-bottom;\n}\n\n\n// Abbreviations\n//\n// 1. Duplicate behavior to the data-bs-* attribute for our tooltip plugin\n// 2. Add the correct text decoration in Chrome, Edge, Opera, and Safari.\n// 3. Add explicit cursor to indicate changed behavior.\n// 4. Prevent the text-decoration to be skipped.\n\nabbr[title],\nabbr[data-bs-original-title] { // 1\n text-decoration: underline dotted; // 2\n cursor: help; // 3\n text-decoration-skip-ink: none; // 4\n}\n\n\n// Address\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\n\n// Lists\n\nol,\nul {\n padding-left: 2rem;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: $dt-font-weight;\n}\n\n// 1. Undo browser default\n\ndd {\n margin-bottom: .5rem;\n margin-left: 0; // 1\n}\n\n\n// Blockquote\n\nblockquote {\n margin: 0 0 1rem;\n}\n\n\n// Strong\n//\n// Add the correct font weight in Chrome, Edge, and Safari\n\nb,\nstrong {\n font-weight: $font-weight-bolder;\n}\n\n\n// Small\n//\n// Add the correct font size in all browsers\n\nsmall {\n @include font-size($small-font-size);\n}\n\n\n// Mark\n\nmark {\n padding: $mark-padding;\n background-color: $mark-bg;\n}\n\n\n// Sub and Sup\n//\n// Prevent `sub` and `sup` elements from affecting the line height in\n// all browsers.\n\nsub,\nsup {\n position: relative;\n @include font-size($sub-sup-font-size);\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub { bottom: -.25em; }\nsup { top: -.5em; }\n\n\n// Links\n\na {\n color: $link-color;\n text-decoration: $link-decoration;\n\n &:hover {\n color: $link-hover-color;\n text-decoration: $link-hover-decoration;\n }\n}\n\n// And undo these styles for placeholder links/named anchors (without href).\n// It would be more straightforward to just use a[href] in previous block, but that\n// causes specificity issues in many other styles that are too complex to fix.\n// See https://github.com/twbs/bootstrap/issues/19402\n\na:not([href]):not([class]) {\n &,\n &:hover {\n color: inherit;\n text-decoration: none;\n }\n}\n\n\n// Code\n\npre,\ncode,\nkbd,\nsamp {\n font-family: $font-family-code;\n @include font-size(1em); // Correct the odd `em` font sizing in all browsers.\n direction: ltr #{\"/* rtl:ignore */\"};\n unicode-bidi: bidi-override;\n}\n\n// 1. Remove browser default top margin\n// 2. Reset browser default of `1em` to use `rem`s\n// 3. Don't allow content to break outside\n\npre {\n display: block;\n margin-top: 0; // 1\n margin-bottom: 1rem; // 2\n overflow: auto; // 3\n @include font-size($code-font-size);\n color: $pre-color;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n @include font-size(inherit);\n color: inherit;\n word-break: normal;\n }\n}\n\ncode {\n @include font-size($code-font-size);\n color: $code-color;\n word-wrap: break-word;\n\n // Streamline the style when inside anchors to avoid broken underline and more\n a > & {\n color: inherit;\n }\n}\n\nkbd {\n padding: $kbd-padding-y $kbd-padding-x;\n @include font-size($kbd-font-size);\n color: $kbd-color;\n background-color: $kbd-bg;\n @include border-radius($border-radius-sm);\n\n kbd {\n padding: 0;\n @include font-size(1em);\n font-weight: $nested-kbd-font-weight;\n }\n}\n\n\n// Figures\n//\n// Apply a consistent margin strategy (matches our type styles).\n\nfigure {\n margin: 0 0 1rem;\n}\n\n\n// Images and content\n\nimg,\nsvg {\n vertical-align: middle;\n}\n\n\n// Tables\n//\n// Prevent double borders\n\ntable {\n caption-side: bottom;\n border-collapse: collapse;\n}\n\ncaption {\n padding-top: $table-cell-padding-y;\n padding-bottom: $table-cell-padding-y;\n color: $table-caption-color;\n text-align: left;\n}\n\n// 1. Removes font-weight bold by inheriting\n// 2. Matches default `` alignment by inheriting `text-align`.\n// 3. Fix alignment for Safari\n\nth {\n font-weight: $table-th-font-weight; // 1\n text-align: inherit; // 2\n text-align: -webkit-match-parent; // 3\n}\n\nthead,\ntbody,\ntfoot,\ntr,\ntd,\nth {\n border-color: inherit;\n border-style: solid;\n border-width: 0;\n}\n\n\n// Forms\n//\n// 1. Allow labels to use `margin` for spacing.\n\nlabel {\n display: inline-block; // 1\n}\n\n// Remove the default `border-radius` that macOS Chrome adds.\n// See https://github.com/twbs/bootstrap/issues/24093\n\nbutton {\n // stylelint-disable-next-line property-disallowed-list\n border-radius: 0;\n}\n\n// Explicitly remove focus outline in Chromium when it shouldn't be\n// visible (e.g. as result of mouse click or touch tap). It already\n// should be doing this automatically, but seems to currently be\n// confused and applies its very visible two-tone outline anyway.\n\nbutton:focus:not(:focus-visible) {\n outline: 0;\n}\n\n// 1. Remove the margin in Firefox and Safari\n\ninput,\nbutton,\nselect,\noptgroup,\ntextarea {\n margin: 0; // 1\n font-family: inherit;\n @include font-size(inherit);\n line-height: inherit;\n}\n\n// Remove the inheritance of text transform in Firefox\nbutton,\nselect {\n text-transform: none;\n}\n// Set the cursor for non-`