Skip to content

Commit

Permalink
SML Single quotes (#233)
Browse files Browse the repository at this point in the history
* Regen antlr

* Update unit tests

* Update version

* Update all recipes to use new strings

* Remove old built ins
  • Loading branch information
mwasplund authored Dec 29, 2023
1 parent ba9cb3d commit bf1b449
Show file tree
Hide file tree
Showing 52 changed files with 1,594 additions and 1,525 deletions.
10 changes: 5 additions & 5 deletions Docs/SML.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ In SML newline characters (`\r\n`) and comma (`,`) characters can be used interc
## Example.sml
```sml
# Here is a comment
KeyName: "A String Value"
"KeyWithSpecial#@": 1234
KeyName: 'A String Value'
'KeyWithSpecial#@': 1234
IsEnabled: true
AnArray: [
"Main.cpp"
'Main.cpp'
1234
]
Table1: {
ChildArray: [ "value1", "value2" ]
ChildArray: [ 'value1', 'value2' ]
}
```

Expand Down Expand Up @@ -71,6 +71,6 @@ COMMENT : '#'.*?'\r'?'\n' -> channel(HIDDEN) ;
INTEGER : DIGIT+ ;
KEY_LITERAL : [\p{L}\p{N}]+ ;
WORD : (LOWERCASE | UPPERCASE)+ ;
STRING_LITERAL : '"' BASIC_CHAR*? '"' ;
STRING_LITERAL : '\'' BASIC_CHAR*? '\'' ;
WHITESPACE : (' '|'\t')+ -> channel(HIDDEN) ;
```
2 changes: 1 addition & 1 deletion RootRecipe.sml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
OutputRoot: "out/"
OutputRoot: 'out/'
2 changes: 1 addition & 1 deletion Samples/C/BuildExtension/Extension/PackageLock.sml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Closures: {
}
Build0: {
Wren: {
"mwasplund|Soup.Wren": { Version: "0.3.0" }
"mwasplund|Soup.Wren": { Version: "0.4.0" }
}
}
Tool0: {
Expand Down
10 changes: 5 additions & 5 deletions Samples/C/ConsoleApplication/PackageLock.sml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ Version: 5
Closures: {
Root: {
C: {
"Samples.C.ConsoleApplication": { Version: "../ConsoleApplication", Build: "Build0", Tool: "Tool0" }
'Samples.C.ConsoleApplication': { Version: '../ConsoleApplication', Build: 'Build0', Tool: 'Tool0' }
}
}
Build0: {
Wren: {
"mwasplund|Soup.C": { Version: "0.2.0" }
'mwasplund|Soup.C': { Version: '0.3.0' }
}
}
Tool0: {
"C++": {
"mwasplund|copy": { Version: "1.0.0" }
"mwasplund|mkdir": { Version: "1.0.0" }
'C++': {
'mwasplund|copy': { Version: '1.0.0' }
'mwasplund|mkdir': { Version: '1.0.0' }
}
}
}
10 changes: 5 additions & 5 deletions Samples/C/ConsoleApplication/Recipe.sml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: "Samples.C.ConsoleApplication"
Language: "C|0"
Type: "Executable"
Version: "1.0.0"
Name: 'Samples.C.ConsoleApplication'
Language: 'C|0'
Type: 'Executable'
Version: '1.0.0'
Source: [
"Main.c"
'Main.c'
]
12 changes: 6 additions & 6 deletions Samples/CSharp/ConsoleApplication/PackageLock.sml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Version: 5
Closures: {
Root: {
"C#": {
"Samples.CSharp.ConsoleApplication": { Version: "../ConsoleApplication", Build: "Build0", Tool: "Tool0" }
'C#': {
'Samples.CSharp.ConsoleApplication': { Version: '../ConsoleApplication', Build: 'Build0', Tool: 'Tool0' }
}
}
Build0: {
Wren: {
"mwasplund|Soup.CSharp": { Version: "0.12.0" }
'mwasplund|Soup.CSharp': { Version: '0.13.0' }
}
}
Tool0: {
"C++": {
"mwasplund|copy": { Version: "1.0.0" }
"mwasplund|mkdir": { Version: "1.0.0" }
'C++': {
'mwasplund|copy': { Version: '1.0.0' }
'mwasplund|mkdir': { Version: '1.0.0' }
}
}
}
10 changes: 5 additions & 5 deletions Samples/CSharp/ConsoleApplication/Recipe.sml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: "Samples.CSharp.ConsoleApplication"
Language: "C#|0"
Type: "Executable"
Version: "1.0.0"
Name: 'Samples.CSharp.ConsoleApplication'
Language: 'C#|0'
Type: 'Executable'
Version: '1.0.0'
Source: [
"Program.cs"
'Program.cs'
]
12 changes: 6 additions & 6 deletions Samples/Cpp/ConsoleApplication/PackageLock.sml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Version: 5
Closures: {
Root: {
"C++": {
"Samples.Cpp.ConsoleApplication": { Version: "../ConsoleApplication", Build: "Build0", Tool: "Tool0" }
'C++': {
'Samples.Cpp.ConsoleApplication': { Version: '../ConsoleApplication', Build: 'Build0', Tool: 'Tool0' }
}
}
Build0: {
Wren: {
"mwasplund|Soup.Cpp": { Version: "0.11.0" }
'mwasplund|Soup.Cpp': { Version: '0.12.0' }
}
}
Tool0: {
"C++": {
"mwasplund|copy": { Version: "1.0.0" }
"mwasplund|mkdir": { Version: "1.0.0" }
'C++': {
'mwasplund|copy': { Version: '1.0.0' }
'mwasplund|mkdir': { Version: '1.0.0' }
}
}
}
10 changes: 5 additions & 5 deletions Samples/Cpp/ConsoleApplication/Recipe.sml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: "Samples.Cpp.ConsoleApplication"
Language: "C++|0"
Type: "Executable"
Version: "1.0.0"
Name: 'Samples.Cpp.ConsoleApplication'
Language: 'C++|0'
Type: 'Executable'
Version: '1.0.0'
Source: [
"Main.cpp"
'Main.cpp'
]
2 changes: 1 addition & 1 deletion Scripts/Linux/release
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ OUT_DIR=$ROOT_DIR/out
RUN_DIR=$OUT_DIR/run

# Cleanup previous runs
tar -a -cf $OUT_DIR/soup-build-0.36.0-linux-x64.tar.gz -C $RUN_DIR .
tar -a -cf $OUT_DIR/soup-build-0.37.0-linux-x64.tar.gz -C $RUN_DIR .
2 changes: 1 addition & 1 deletion Scripts/Linux/soupd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GLOBAL_OUT_DIR=~/.soup/out

CONFIG_HASH=J_HqSstV55vlb-x6RWC_hLRFRDU

SOUP_VERSION="0.36.0"
SOUP_VERSION="0.37.0"
COPY_VERSION="1.0.0"
MKDIR_VERSION="1.0.0"
SOUP_CPP_VERSION="0.8.2"
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Windows/generate-sml-lexer.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SET Flavor=%1
SET ScriptsDir=%~dp0
SET RootDir=%ScriptsDir%..\..\
SET ClientCoreSourceDir=Source\Client\Core\Source
SET REFLEX=%UserProfile%\source\repos\RE-flex\bin\win64\reflex.exe
SET REFLEX=%UserProfile%\Dev\Repos\RE-flex\bin\win64\reflex.exe

pushd %RootDir%
echo %REFLEX% %ClientCoreSourceDir%\SML\SMLParser.l -o %ClientCoreSourceDir%\SML\SMLParser.cpp
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Windows/install.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ SET RootDir=%ScriptsDir%..\..
SET OutDir=%RootDir%\out

pushd %OutDir%
start msiexec /package soup-build-0.36.0-windows-x64.msi /passive
start msiexec /package soup-build-0.37.0-windows-x64.msi /passive
popd
6 changes: 3 additions & 3 deletions Scripts/Windows/soup.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ SET ConfigHash=Oltq7cGwk0Rbgy1I-3mCMDDE5yM

SET PKG_OWNER=mwasplund

SET SOUP_VERSION=0.36.0
SET SOUP_VERSION=0.37.0
SET COPY_VERSION=1.0.0
SET MKDIR_VERSION=1.0.0
SET SOUP_WREN_VERSION=0.3.0
SET SOUP_WREN_VERSION=0.4.1

REM - Use a copy of the final binary in case we are re-buiding itself
robocopy %ScriptsDir%\Install\ %RunDir%\ /MIR /NJH /NJS /NDL > NUL
robocopy %OutDir%\Cpp\Soup\%SOUP_VERSION%\%ConfigHash%\bin\ %RunDir%\Soup\ /MIR /NJH /NJS /NDL > NUL
robocopy %OutDir%\Cpp\Local\Soup\%SOUP_VERSION%\%ConfigHash%\bin\ %RunDir%\Soup\ /MIR /NJH /NJS /NDL > NUL

robocopy %SourceDir%\Tools\Copy\ %RunDir%\Soup\BuiltIn\%PKG_OWNER%\copy\%COPY_VERSION%\ Recipe.sml /NJH /NJS /NDL > NUL
robocopy %OutDir%\Cpp\Local\copy\%COPY_VERSION%\%ConfigHash%\ %RunDir%\Soup\BuiltIn\%PKG_OWNER%\copy\%COPY_VERSION%\out\ /MIR /NJH /NJS /NDL > NUL
Expand Down
6 changes: 3 additions & 3 deletions Scripts/Windows/soupd.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ SET ConfigHash=OZlIVjblazFuKXg-raWUNoGEnG4

SET PKG_OWNER=mwasplund

SET SOUP_VERSION=0.36.0
SET SOUP_VERSION=0.37.0
SET COPY_VERSION=1.0.0
SET MKDIR_VERSION=1.0.0
SET SOUP_WREN_VERSION=0.3.0
SET SOUP_WREN_VERSION=0.4.1

REM - Use a copy of the final binary in case we are re-buiding itself
robocopy %ScriptsDir%\Install\ %RunDir%\ /MIR /NJH /NJS /NDL > NUL
robocopy %OutDir%\Cpp\Soup\%SOUP_VERSION%\%ConfigHash%\bin\ %RunDir%\Soup\ /MIR /NJH /NJS /NDL > NUL
robocopy %OutDir%\Cpp\Local\Soup\%SOUP_VERSION%\%ConfigHash%\bin\ %RunDir%\Soup\ /MIR /NJH /NJS /NDL > NUL

robocopy %SourceDir%\Tools\Copy\ %RunDir%\Soup\BuiltIn\%PKG_OWNER%\copy\%COPY_VERSION%\ Recipe.sml /NJH /NJS /NDL > NUL
robocopy %OutDir%\Cpp\Local\copy\%COPY_VERSION%\%ConfigHash%\ %RunDir%\Soup\BuiltIn\%PKG_OWNER%\copy\%COPY_VERSION%\out\ /MIR /NJH /NJS /NDL > NUL
Expand Down
54 changes: 27 additions & 27 deletions Source/Client/CLI/PackageLock.sml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
Version: 5
Closures: {
Root: {
"C++": {
copy: { Version: "../../Tools/Copy/", Build: "Build0", Tool: "Tool0" }
mkdir: { Version: "../../Tools/Mkdir/", Build: "Build0", Tool: "Tool0" }
"Monitor.Host": { Version: "../../Monitor/Host/", Build: "Build0", Tool: "Tool0" }
"Monitor.Shared": { Version: "../../Monitor/Shared/", Build: "Build0", Tool: "Tool0" }
"mwasplund|CryptoPP": { Version: "1.2.1", Build: "Build0", Tool: "Tool0" }
"mwasplund|Detours": { Version: "4.0.11", Build: "Build0", Tool: "Tool0" }
"mwasplund|Opal": { Version: "0.9.5", Build: "Build0", Tool: "Tool0" }
"mwasplund|reflex": { Version: "1.0.3", Build: "Build0", Tool: "Tool0" }
"mwasplund|wren": { Version: "1.0.4", Build: "Build0", Tool: "Tool0" }
Soup: { Version: "./", Build: "Build0", Tool: "Tool0" }
"Soup.Core": { Version: "../Core/", Build: "Build0", Tool: "Tool0" }
"Soup.Generate": { Version: "../../Generate/", Build: "Build0", Tool: "Tool0" }
'C++': {
copy: { Version: '../../Tools/Copy/', Build: 'Build0', Tool: 'Tool0' }
mkdir: { Version: '../../Tools/Mkdir/', Build: 'Build0', Tool: 'Tool0' }
'Monitor.Host': { Version: '../../Monitor/Host/', Build: 'Build0', Tool: 'Tool0' }
'Monitor.Shared': { Version: '../../Monitor/Shared/', Build: 'Build0', Tool: 'Tool0' }
'mwasplund|CryptoPP': { Version: '1.2.1', Build: 'Build0', Tool: 'Tool0' }
'mwasplund|Detours': { Version: '4.0.11', Build: 'Build0', Tool: 'Tool0' }
'mwasplund|Opal': { Version: '0.10.0', Build: 'Build0', Tool: 'Tool0' }
'mwasplund|reflex': { Version: '1.0.4', Build: 'Build0', Tool: 'Tool0' }
'mwasplund|Soup.Test.Assert': { Version: '0.4.0', Build: 'Build0', Tool: 'Tool0' }
'mwasplund|wren': { Version: '1.0.4', Build: 'Build0', Tool: 'Tool0' }
Soup: { Version: '../CLI', Build: 'Build0', Tool: 'Tool0' }
'Soup.Core': { Version: '../Core/', Build: 'Build1', Tool: 'Tool0' }
'Soup.Generate': { Version: '../../Generate/', Build: 'Build0', Tool: 'Tool0' }
}
Wren: {
"mwasplund|Soup.Build.Utils": { Version: "0.6.0", Build: "Build1", Tool: "Tool0" }
"mwasplund|Soup.Cpp": { Version: "0.8.2", Build: "Build1", Tool: "Tool0" }
"mwasplund|Soup.Cpp.Compiler": { Version: "0.10.0", Build: "Build1", Tool: "Tool0" }
"mwasplund|Soup.Cpp.Compiler.GCC": { Version: "0.3.0", Build: "Build1", Tool: "Tool0" }
"mwasplund|Soup.Cpp.Compiler.MSVC": { Version: "0.9.0", Build: "Build1", Tool: "Tool0" }
"mwasplund|Soup.CSharp": { Version: "0.9.0", Build: "Build1", Tool: "Tool0" }
"mwasplund|Soup.CSharp.Compiler": { Version: "0.10.0", Build: "Build1", Tool: "Tool0" }
"mwasplund|Soup.CSharp.Compiler.Roslyn": { Version: "0.11.0", Build: "Build1", Tool: "Tool0" }
"mwasplund|Soup.Wren": { Version: "0.3.0", Build: "Build1", Tool: "Tool0" }
'mwasplund|Soup.Build.Utils': { Version: '0.7.0', Build: 'Build2', Tool: 'Tool0' }
'mwasplund|Soup.Wren': { Version: '0.4.1', Build: 'Build2', Tool: 'Tool0' }
}
}
Build0: {
Wren: {
"mwasplund|Soup.Cpp": { Version: "0.11.0" }
'mwasplund|Soup.Cpp': { Version: '0.12.0' }
}
}
Build1: {
Wren: {
"mwasplund|Soup.Wren": { Version: "0.3.0" }
'mwasplund|Soup.Cpp': { Version: '0.12.0' }
'mwasplund|Soup.Test.Cpp': { Version: '0.11.0' }
}
}
Build2: {
Wren: {
'mwasplund|Soup.Wren': { Version: '0.4.1' }
}
}
Tool0: {
"C++": {
"mwasplund|copy": { Version: "1.0.0" }
"mwasplund|mkdir": { Version: "1.0.0" }
'C++': {
'mwasplund|copy': { Version: '1.0.0' }
'mwasplund|mkdir': { Version: '1.0.0' }
}
}
}
36 changes: 17 additions & 19 deletions Source/Client/CLI/Recipe.sml
Original file line number Diff line number Diff line change
@@ -1,44 +1,42 @@
Name: "Soup"
Version: "0.36.0"
Language: "C++|0"
Name: 'Soup'
Version: '0.37.0'
Language: 'C++|0'

Type: "Executable"
Type: 'Executable'

Source: [
"Source/Main.cpp"
'Source/Main.cpp'
]
IncludePaths: [
"Source/Commands/"
"Source/Options/"
'Source/Commands/'
'Source/Options/'
]

Dependencies: {
# Ensure the core build extensions are runtime dependencies
Runtime: [
"../Core/"
"../../Generate/"
"../../Monitor/Host/"
'../Core/'
'../../Generate/'
'../../Monitor/Host/'
]
Other: [
"../../Tools/Copy/"
"../../Tools/Mkdir/"
"[Wren]mwasplund|Soup.Cpp@0"
"[Wren]mwasplund|Soup.CSharp@0"
"[Wren]mwasplund|Soup.Wren@0"
'../../Tools/Copy/'
'../../Tools/Mkdir/'
'[Wren]mwasplund|Soup.Wren@0'
]
Build: [
# TODO: "[email protected]"
# TODO: 'Soup.Test.Cpp@0.4.0'
]
Test: [
# TODO: "[email protected]"
# TODO: 'Soup.Test.Assert@0.3.0'
]
}

Tests: {
Source: [
"UnitTests/gen/Main.cpp"
'UnitTests/gen/Main.cpp'
]
IncludePaths: [
"UnitTests/"
'UnitTests/'
]
}
2 changes: 1 addition & 1 deletion Source/Client/CLI/Source/Commands/VersionCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Soup::Client

// TODO var version = Assembly.GetExecutingAssembly().GetName().Version;
// Log::Message($"{version.Major}.{version.Minor}.{version.Build}");
Log::HighPriority("0.36.0");
Log::HighPriority("0.37.0");
}

private:
Expand Down
Loading

0 comments on commit bf1b449

Please sign in to comment.