Skip to content

Commit e29b2c5

Browse files
General Update to v0.2.0
1 parent e2053ce commit e29b2c5

File tree

11 files changed

+378
-153
lines changed

11 files changed

+378
-153
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ CritLang/Properties/PublishProfiles/FolderProfile.pubxml
66
CritLang/Properties/PublishProfiles/FolderProfile.pubxml.user
77
CritLang/CritLang.csproj.user
88
CritLang/Content/ola.txt
9+
10+
.antlr

CHANGELOG.MD

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## 0.1.11 -> 0.2.0
2+
Updated from .Net 6 to [.Net 7](https://dotnet.microsoft.com/en-us/download/dotnet/7.0).
3+
Updated from [Antlrcs4.6.6](https://github.com/tunnelvisionlabs/antlr4cs/releases/tag/v4.6.6) to [Antlr4.11.1](https://github.com/antlr/antlr4/releases/tag/4.11.1).
4+
No more dynamics used inside the interpreter, this only happened because of the new Generic maths added in .NET 7 and for now, basically all numbers are converted to doubles but this needs urgent change.
5+
The compiled executable is about 5.5 times smaller and the execution time is about 2.93 times faster. This is only possible with the new [Native AOT](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/) introduced in .Net7.<br> Unfortunately it only works on win-x64 and Linux-x64 (it also works for win-arm64 and linux-arm64 but I don't own any ARM machines to compile it to those targets) for now, the other platforms still use [ReadyToRun](https://learn.microsoft.com/en-us/dotnet/core/deploying/ready-to-run).

CritLang.sln

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.2.32526.322
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CritLang", "CritLang\CritLang.csproj", "{56347825-5AA0-4FC9-8F61-774E0B4E8C15}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CritLang", "CritLang\CritLang.csproj", "{56347825-5AA0-4FC9-8F61-774E0B4E8C15}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
11+
Debug|x64 = Debug|x64
1112
Release|Any CPU = Release|Any CPU
13+
Release|x64 = Release|x64
1214
EndGlobalSection
1315
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1416
{56347825-5AA0-4FC9-8F61-774E0B4E8C15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1517
{56347825-5AA0-4FC9-8F61-774E0B4E8C15}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{56347825-5AA0-4FC9-8F61-774E0B4E8C15}.Debug|x64.ActiveCfg = Debug|x64
19+
{56347825-5AA0-4FC9-8F61-774E0B4E8C15}.Debug|x64.Build.0 = Debug|x64
1620
{56347825-5AA0-4FC9-8F61-774E0B4E8C15}.Release|Any CPU.ActiveCfg = Release|Any CPU
1721
{56347825-5AA0-4FC9-8F61-774E0B4E8C15}.Release|Any CPU.Build.0 = Release|Any CPU
22+
{56347825-5AA0-4FC9-8F61-774E0B4E8C15}.Release|x64.ActiveCfg = Release|x64
23+
{56347825-5AA0-4FC9-8F61-774E0B4E8C15}.Release|x64.Build.0 = Release|x64
1824
EndGlobalSection
1925
GlobalSection(SolutionProperties) = preSolution
2026
HideSolutionNode = FALSE

CritLang/CritLang.csproj

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,70 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net7.0</TargetFramework>
6+
<Version>0.2.0</Version>
7+
<Authors>Lucas de Linhares</Authors>
8+
<Description>Just another programming language</Description>
9+
<FileDescription>Just another programming lanugage</FileDescription>
10+
611
<ImplicitUsings>enable</ImplicitUsings>
712
<Nullable>enable</Nullable>
813
<WarningsAsErrors>Nullable</WarningsAsErrors>
914
<Optimize>true</Optimize>
1015
<PackAsTool>true</PackAsTool>
1116
<ToolCommandName>crit</ToolCommandName>
1217
<PackageOutputPath>./nupkg</PackageOutputPath>
18+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
19+
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
20+
<Platforms>AnyCPU;x64</Platforms>
1321
</PropertyGroup>
1422

15-
<ItemGroup>
16-
<PackageReference Include="Antlr4" Version="4.6.6">
17-
<PrivateAssets>all</PrivateAssets>
18-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19-
</PackageReference>
20-
<PackageReference Include="Antlr4.CodeGenerator" Version="4.6.6">
21-
<PrivateAssets>all</PrivateAssets>
22-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
23-
</PackageReference>
24-
<PackageReference Include="Antlr4.Runtime" Version="4.6.6" />
25-
</ItemGroup>
23+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
24+
<DebugType>embedded</DebugType>
25+
</PropertyGroup>
26+
27+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
28+
<DebugType>none</DebugType>
29+
</PropertyGroup>
30+
31+
<PropertyGroup>
32+
<StripSymbols>true</StripSymbols>
33+
</PropertyGroup>
34+
2635
<ItemGroup>
2736
<Content Include="Crit.g4" />
37+
<Content Include=".\antlr\*.cs" />
38+
</ItemGroup>
39+
<ItemGroup>
40+
<Compile Include="C:\Users\lucas\Desktop\CritVisitor.cs" Link="CritVisitor.cs" />
41+
<Compile Include="Content\.antlr\CritBaseListener.cs" />
42+
<Compile Include="Content\.antlr\CritBaseVisitor.cs" />
43+
<Compile Include="Content\.antlr\CritLexer.cs" />
44+
<Compile Include="Content\.antlr\CritListener.cs" />
45+
<Compile Include="Content\.antlr\CritParser.cs" />
46+
<Compile Include="Content\.antlr\CritVisitor.cs" />
47+
</ItemGroup>
48+
<ItemGroup>
49+
<PackageReference Include="Antlr4.Runtime.Standard" Version="4.11.1" />
50+
<PackageReference Include="Antlr4BuildTasks" Version="12.1.0" PrivateAssets="all" />
2851
</ItemGroup>
2952
<ItemGroup>
3053
<None Update="Content\test.crit">
3154
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
3255
</None>
56+
</ItemGroup>
57+
<ItemGroup>
58+
<None Include="..\LICENSE">
59+
<Pack>True</Pack>
60+
<PackagePath>\</PackagePath>
61+
</None>
62+
<None Include="Content\.antlr\Crit.interp" />
63+
<None Include="Content\.antlr\Crit.tokens" />
64+
<None Include="Content\.antlr\CritLexer.interp" />
65+
<None Include="Content\.antlr\CritLexer.tokens" />
3366
</ItemGroup>
3467

68+
<PropertyGroup >
69+
<PublishAot>true</PublishAot>
70+
</PropertyGroup>
3571
</Project>

CritLang/CritLangCross.csproj

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net7.0</TargetFramework>
6+
<Version>0.2.0</Version>
7+
<Authors>Lucas de Linhares</Authors>
8+
<Description>Just another programming language</Description>
9+
<FileDescription>Just another programming lanugage</FileDescription>
10+
11+
<ImplicitUsings>enable</ImplicitUsings>
12+
<Nullable>enable</Nullable>
13+
<WarningsAsErrors>Nullable</WarningsAsErrors>
14+
<Optimize>true</Optimize>
15+
<PackAsTool>true</PackAsTool>
16+
<ToolCommandName>crit</ToolCommandName>
17+
<PackageOutputPath>./nupkg</PackageOutputPath>
18+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
19+
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
20+
<Platforms>AnyCPU;x64</Platforms>
21+
</PropertyGroup>
22+
23+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
24+
<DebugType>embedded</DebugType>
25+
</PropertyGroup>
26+
27+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
28+
<DebugType>embedded</DebugType>
29+
</PropertyGroup>
30+
31+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
32+
<DebugType>none</DebugType>
33+
</PropertyGroup>
34+
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
36+
<DebugType>none</DebugType>
37+
</PropertyGroup>
38+
39+
<PropertyGroup>
40+
<StripSymbols>true</StripSymbols>
41+
</PropertyGroup>
42+
43+
<ItemGroup>
44+
<Content Include="Crit.g4" />
45+
<Content Include=".\antlr\*.cs" />
46+
</ItemGroup>
47+
<ItemGroup>
48+
<Compile Include="C:\Users\lucas\Desktop\CritVisitor.cs" Link="CritVisitor.cs" />
49+
<Compile Include="Content\.antlr\CritBaseListener.cs" />
50+
<Compile Include="Content\.antlr\CritBaseVisitor.cs" />
51+
<Compile Include="Content\.antlr\CritLexer.cs" />
52+
<Compile Include="Content\.antlr\CritListener.cs" />
53+
<Compile Include="Content\.antlr\CritParser.cs" />
54+
<Compile Include="Content\.antlr\CritVisitor.cs" />
55+
</ItemGroup>
56+
<ItemGroup>
57+
<PackageReference Include="Antlr4.Runtime.Standard" Version="4.11.1" />
58+
<PackageReference Include="Antlr4BuildTasks" Version="12.1.0" PrivateAssets="all" />
59+
</ItemGroup>
60+
<ItemGroup>
61+
<None Update="Content\test.crit">
62+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
63+
</None>
64+
</ItemGroup>
65+
<ItemGroup>
66+
<None Include="..\LICENSE">
67+
<Pack>True</Pack>
68+
<PackagePath>\</PackagePath>
69+
</None>
70+
<None Include="Content\.antlr\Crit.interp" />
71+
<None Include="Content\.antlr\Crit.tokens" />
72+
<None Include="Content\.antlr\CritLexer.interp" />
73+
<None Include="Content\.antlr\CritLexer.tokens" />
74+
</ItemGroup>
75+
76+
</Project>

0 commit comments

Comments
 (0)