Skip to content

Commit

Permalink
Completed refactoring of the exception handling system
Browse files Browse the repository at this point in the history
  • Loading branch information
hallambaker committed Jul 14, 2020
1 parent eae7996 commit 239d90f
Show file tree
Hide file tree
Showing 269 changed files with 27,203 additions and 3,335 deletions.
55 changes: 26 additions & 29 deletions ASN/Goedel.Tool.ASN/Asn2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
// TokenType
// IDName

#pragma warning disable IDE0022
#pragma warning disable IDE0022, IDE0066, IDE1006, IDE0059
namespace Goedel.Tool.ASN {


Expand Down Expand Up @@ -1377,7 +1377,7 @@ void Push (Goedel.Tool.ASN._Choice Token) {
}

void Pop () {
Assert.False (Stack.Count == 0, InternalError.Throw);
Assert.AssertFalse (Stack.Count == 0, InternalError.Throw);

_StackItem Item = Stack[Stack.Count -1];
State = Item.State;
Expand All @@ -1397,7 +1397,7 @@ public override void Process(TokenType Token, Position Position, string Text) {
(Token == TokenType.COMMENT)) {
return;
}
Assert.False (Token == TokenType.INVALID, InvalidToken.Throw);
Assert.AssertFalse (Token == TokenType.INVALID, InvalidToken.Throw);

bool Represent = true;

Expand Down Expand Up @@ -1433,7 +1433,7 @@ public override void Process(TokenType Token, Position Position, string Text) {
}
break;
}
if (Token == TokenType.END) {
if (Token == TokenType.END) {
State = StateCode._End;
break;
}
Expand Down Expand Up @@ -1715,9 +1715,8 @@ public override void Process(TokenType Token, Position Position, string Text) {
Current_Cast.Spec = New_Choice(Text);
}
else {
Goedel.Tool.ASN._Label result = new Goedel.Tool.ASN._Label {
Label = Registry.REF(Position, Text, TYPE__IDName, Current_Cast)
};
Goedel.Tool.ASN._Label result = new Goedel.Tool.ASN._Label();
result.Label = Registry.REF(Position, Text, TYPE__IDName, Current_Cast);
Current_Cast.Spec = result;
State = StateCode.Member__Spec;
}
Expand All @@ -1731,10 +1730,10 @@ public override void Process(TokenType Token, Position Position, string Text) {
State = StateCode.Member__Spec;
break;
}
else {
throw new Expected ("Parser Error Expected [OIDRef Any Bits VBits Octets Integer BigInteger Boolean Time List Set Choice IA5String BMPString UTF8String PrintableString ]");
}

else {
throw new Expected ("Parser Error Expected [OIDRef Any Bits VBits Octets Integer BigInteger Boolean Time List Set Choice IA5String BMPString UTF8String PrintableString ]");
}

case StateCode.Member__Spec:

if (Token == TokenType.BEGIN) {
Expand Down Expand Up @@ -1825,9 +1824,8 @@ public override void Process(TokenType Token, Position Position, string Text) {
Current_Cast.Spec = New_Choice(Text);
}
else {
Goedel.Tool.ASN._Label result = new Goedel.Tool.ASN._Label {
Label = Registry.REF(Position, Text, TYPE__IDName, Current_Cast)
};
Goedel.Tool.ASN._Label result = new Goedel.Tool.ASN._Label();
result.Label = Registry.REF(Position, Text, TYPE__IDName, Current_Cast);
Current_Cast.Spec = result;
State = StateCode.List__Spec;
}
Expand All @@ -1841,10 +1839,10 @@ public override void Process(TokenType Token, Position Position, string Text) {
State = StateCode.List__Spec;
break;
}
else {
throw new Expected ("Parser Error Expected [OIDRef Any Bits VBits Octets Integer BigInteger Boolean Time List Set Choice IA5String BMPString UTF8String PrintableString ]");
}

else {
throw new Expected ("Parser Error Expected [OIDRef Any Bits VBits Octets Integer BigInteger Boolean Time List Set Choice IA5String BMPString UTF8String PrintableString ]");
}

case StateCode.List__Spec:
Pop ();
Represent = true;
Expand Down Expand Up @@ -1874,9 +1872,8 @@ public override void Process(TokenType Token, Position Position, string Text) {
Current_Cast.Spec = New_Choice(Text);
}
else {
Goedel.Tool.ASN._Label result = new Goedel.Tool.ASN._Label {
Label = Registry.REF(Position, Text, TYPE__IDName, Current_Cast)
};
Goedel.Tool.ASN._Label result = new Goedel.Tool.ASN._Label();
result.Label = Registry.REF(Position, Text, TYPE__IDName, Current_Cast);
Current_Cast.Spec = result;
State = StateCode.Set__Spec;
}
Expand All @@ -1890,10 +1887,10 @@ public override void Process(TokenType Token, Position Position, string Text) {
State = StateCode.Set__Spec;
break;
}
else {
throw new Expected ("Parser Error Expected [OIDRef Any Bits VBits Octets Integer BigInteger Boolean Time List Set Choice IA5String BMPString UTF8String PrintableString ]");
}

else {
throw new Expected ("Parser Error Expected [OIDRef Any Bits VBits Octets Integer BigInteger Boolean Time List Set Choice IA5String BMPString UTF8String PrintableString ]");
}

case StateCode.Set__Spec:
Pop ();
Represent = true;
Expand Down Expand Up @@ -1962,10 +1959,10 @@ public override void Process(TokenType Token, Position Position, string Text) {
}
break;
}
else {
throw new Expected("Parser Error Expected [Code Implicit Explicit Optional Default Context ]");
}

else {
throw new Expected("Parser Error Expected [Code Implicit Explicit Optional Default Context ]");
}

case StateCode.Qualifier__Entry:
Pop ();
Represent = true;
Expand Down
4 changes: 2 additions & 2 deletions ASN/asn2/AssemblyVersion.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyVersionAttribute("3.0.0.249")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("3.0.0.249")]
[assembly: System.Reflection.AssemblyVersionAttribute("3.0.0.259")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("3.0.0.259")]

5 changes: 2 additions & 3 deletions ASN/asn2/VS.Make
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
MSBuildThisFileDirectory =

LinkFiles = \
Goedel.ASN.dll\
Goedel.Tool.Core.dll

ToolTargets = \
Expand All @@ -28,13 +29,11 @@ ASN2.cs : ASN2.command


prebuildRecurse :
cd ..\Goedel.Tool.ASN && nmake /c /f VS.make prebuild
cd ..\..\..\mmm\Libraries\Goedel.ASN && nmake /c /f VS.make prebuild
cd ..\Goedel.Tool.ASN && nmake /a /c /f VS.make prebuild


postbuildRecurse :
cd ..\Goedel.Tool.ASN && nmake /c /f VS.make postbuild
cd ..\..\..\mmm\Libraries\Goedel.ASN && nmake /c /f VS.make postbuild

# Non shared project, nothing to do
prebuild : prebuildRecurse $(ToolTargets)
Expand Down
3 changes: 1 addition & 2 deletions ASN/asn2/asn2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\mmm\Libraries\Core\Goedel.ASN\Goedel.ASN.csproj" />
<ProjectReference Include="..\..\Libraries\Goedel.Tool.Core\Goedel.Tool.Core.csproj" />
</ItemGroup>

Expand All @@ -35,8 +36,6 @@

<Import Project="..\Goedel.Tool.ASN\Goedel.Tool.ASN.projitems" Label="Shared" />

<Import Project="..\..\..\mmm\Libraries\Goedel.ASN\Goedel.ASN.projitems" Label="Shared" />

<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="VSPreBuild" />
</Target>
Expand Down
4 changes: 2 additions & 2 deletions ASN/asn2/version.version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
3.0.0.249
3.0.0.249
3.0.0.259
3.0.0.259
3 changes: 0 additions & 3 deletions BuildTools.sln
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,12 @@ Global
DocTools\Goedel.Document.RFCConvert\Goedel.Document.RFCConvert.projitems*{03c081d6-fe5a-4a20-b387-8a960a45e77f}*SharedItemsImports = 13
Protogen\Goedel.Tool.Protogen\Goedel.Tool.Protogen.projitems*{04206448-ff4b-430d-8270-a4cbfa9d2fa3}*SharedItemsImports = 13
DocTools\Goedel.Document.Markdown\Goedel.Document.Markdown.projitems*{1326416b-712a-44d0-ae00-ad0ddf7f9258}*SharedItemsImports = 13
VSIXBuild\Goedel.Tool.VSIXBuild\Goedel.Tool.VSIXBuild.projitems*{145387d3-292e-4e16-b16b-e2e0b0755a5b}*SharedItemsImports = 13
RegistryConfig\Goedel.Tool.RegistryConfig\Goedel.Tool.RegistryConfig.projitems*{35bc3550-4add-4bb8-a3ee-0f75253cc63a}*SharedItemsImports = 5
FSRGen\Goedel.Tool.FSRGen\Goedel.Tool.FSRGen.projitems*{3622efbf-83de-4af2-ae1a-76fb2368ccf8}*SharedItemsImports = 13
Exceptional\Goedel.Tool.Exceptional\Goedel.Tool.Exceptional.projitems*{41a32fd3-3814-4370-a2c7-ae6e29f4ab01}*SharedItemsImports = 5
Command\Goedel.Tool.Command\Goedel.Tool.Command.projitems*{4256f87b-9ba6-4996-a4dd-dc1e36136054}*SharedItemsImports = 5
MakeyMakey\Goedel.Tool.Makey\Goedel.Tool.Makey.projitems*{5288bb4f-3685-4f5f-afd0-596dbdf843b5}*SharedItemsImports = 13
ASN\Goedel.Tool.ASN\Goedel.Tool.ASN.projitems*{54d70c8d-707d-4456-bbd0-3210f42ca97c}*SharedItemsImports = 5
..\mmm\Libraries\Goedel.ASN\Goedel.ASN.projitems*{54d70c8d-707d-4456-bbd0-3210f42ca97c}*SharedItemsImports = 5
Command\Goedel.Tool.Command\Goedel.Tool.Command.projitems*{5a910d73-f8ea-48a5-a325-1f7ebdce92f7}*SharedItemsImports = 13
Domainer\Goedel.Tool.Domainer\Goedel.Tool.Domainer.projitems*{608732b4-132c-41a3-b785-164ff4239b20}*SharedItemsImports = 13
DNSConfig\Goedel.Tool.DNSConfig\Goedel.Tool.DNSConfig.projitems*{627a80a7-f304-444e-b1df-0f5a9515716f}*SharedItemsImports = 5
Expand All @@ -208,7 +206,6 @@ Global
DocTools\Goedel.Document.OpenXML\Goedel.Document.OpenXML.projitems*{d52143dd-04dc-4fa9-8c77-6adff4b00275}*SharedItemsImports = 5
DocTools\Goedel.Document.RFCConvert\Goedel.Document.RFCConvert.projitems*{d52143dd-04dc-4fa9-8c77-6adff4b00275}*SharedItemsImports = 5
DocTools\Goedel.Document.RFC\Goedel.Document.RFC.projitems*{d52143dd-04dc-4fa9-8c77-6adff4b00275}*SharedItemsImports = 5
VSIXBuild\Goedel.Tool.VSIXBuild\Goedel.Tool.VSIXBuild.projitems*{ef9a072d-d974-400f-b118-7ba299f81484}*SharedItemsImports = 5
GScript\Goedel.Tool.Script\Goedel.Tool.Script.projitems*{f9ba54ca-95e0-4709-8705-ad52673dfbfe}*SharedItemsImports = 5
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
4 changes: 2 additions & 2 deletions Command/CommandEcho/AssemblyVersion.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyVersionAttribute("3.0.0.61")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("3.0.0.61")]
[assembly: System.Reflection.AssemblyVersionAttribute("3.0.0.68")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("3.0.0.68")]

4 changes: 2 additions & 2 deletions Command/CommandEcho/version.version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
3.0.0.61
3.0.0.61
3.0.0.68
3.0.0.68
2 changes: 1 addition & 1 deletion Command/Goedel.Tool.Command/Annotate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public override void Init (_Choice parent) {
}
case Include include: {
var OptionSet = include.Id.Definition as OptionSet;
Assert.NotNull(NYI.Throw, String: include.Id.ToString());
OptionSet.AssertNotNull(UnknownOptionSet.Throw, include.Id.ToString());
foreach (var SubEntry in OptionSet.Options) {
switch (SubEntry) {
case Option Option: {
Expand Down
8 changes: 4 additions & 4 deletions Command/Goedel.Tool.Command/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
// PType
// CaseType

#pragma warning disable IDE0022
#pragma warning disable IDE0022, IDE0066, IDE1006, IDE0059
namespace Goedel.Tool.Command {


Expand Down Expand Up @@ -1179,7 +1179,7 @@ void Push (Goedel.Tool.Command._Choice Token) {
}

void Pop () {
Assert.False (Stack.Count == 0, InternalError.Throw);
Assert.AssertFalse (Stack.Count == 0, InternalError.Throw);

_StackItem Item = Stack[Stack.Count -1];
State = Item.State;
Expand All @@ -1199,7 +1199,7 @@ public override void Process(TokenType Token, Position Position, string Text) {
(Token == TokenType.COMMENT)) {
return;
}
Assert.False (Token == TokenType.INVALID, InvalidToken.Throw);
Assert.AssertFalse (Token == TokenType.INVALID, InvalidToken.Throw);

bool Represent = true;

Expand Down Expand Up @@ -1230,7 +1230,7 @@ public override void Process(TokenType Token, Position Position, string Text) {
}
break;
}
if (Token == TokenType.END) {
if (Token == TokenType.END) {
State = StateCode._End;
break;
}
Expand Down
Loading

0 comments on commit 239d90f

Please sign in to comment.