CPM:=cpm
-BIN:=main
+BIN:=spl
-.PHONY: man main
+.PHONY: man
all: $(BIN) $(BIN).1
-main:
+spl:
$(CPM) make
%.1: %
help2man ./$< > $@
clean:
- $(RM) -rv Clean\ System\ Files sapl $(BIN) $(BIN).1
+ $(RM) -rv Clean\ System\ Files $(BIN) $(BIN).1
--- /dev/null
+#spl
+`<spl> ::= <spl> <parsing> <lexing>`
+
+## Instructions
+### Linux
+Append `envs/envs.linux64` to your `IDEEnvs` and run `make`.
+
+### Mac
+Append `envs/envs.mac` to your `IDEEnvs` and run `make`.
+
+### Windows
+Install a real operating system. And try again.o
+
+## `LICENCE`
+The MIT License (MIT)
+
+Copyright (c) 2016 Pim Jager & Mart Lubbers
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
--- /dev/null
+ Environment
+ EnvironmentName: CleanPlatform
+ EnvironmentPaths
+ Path: {Application}/lib/StdEnv
+ Path: {Application}/lib/Generics
+ Path: {Application}/lib/StdLib
+ Path: {Application}/lib/clean-platform/OS-Independent
+ Path: {Application}/lib/clean-platform/OS-Independent/Data
+ Path: {Application}/lib/clean-platform/OS-Independent/Database
+ Path: {Application}/lib/clean-platform/OS-Independent/Database/SQL
+ Path: {Application}/lib/clean-platform/OS-Independent/GUI
+ Path: {Application}/lib/clean-platform/OS-Independent/Internet
+ Path: {Application}/lib/clean-platform/OS-Independent/Internet/HTTP
+ Path: {Application}/lib/clean-platform/OS-Independent/Math
+ Path: {Application}/lib/clean-platform/OS-Independent/Network
+ Path: {Application}/lib/clean-platform/OS-Independent/System
+ Path: {Application}/lib/clean-platform/OS-Independent/Test
+ Path: {Application}/lib/clean-platform/OS-Independent/Text
+ Path: {Application}/lib/clean-platform/OS-Independent/Text/Encodings
+ Path: {Application}/lib/clean-platform/OS-Linux
+ Path: {Application}/lib/clean-platform/OS-Linux/Network
+ Path: {Application}/lib/clean-platform/OS-Linux/System
+ Path: {Application}/lib/clean-platform/OS-Linux-64
+ Path: {Application}/lib/clean-platform/OS-Linux-64/System
+ Path: {Application}/lib/clean-platform/OS-Linux-64/Database
+ Path: {Application}/lib/clean-platform/OS-Linux-64/Database/SQL
+ Path: {Application}/lib/clean-platform/OS-Linux-32
+ Path: {Application}/lib/clean-platform/OS-Linux-32/System
+ Path: {Application}/lib/clean-platform/OS-Linux-32/Database
+ Path: {Application}/lib/clean-platform/OS-Linux-32/Database/SQL
+ Path: {Application}/lib/clean-platform/OS-Posix
+ Path: {Application}/lib/clean-platform/OS-Posix/DataSources
+ Path: {Application}/lib/clean-platform/OS-Posix/Network
+ Path: {Application}/lib/clean-platform/OS-Posix/System
+ EnvironmentCompiler: lib/exe/cocl:-generics
+ EnvironmentCodeGen: lib/exe/cg
+ EnvironmentLinker: lib/exe/linker
+ EnvironmentDynLink: lib/exe/linker
+ EnvironmentVersion: 920
+ EnvironmentRedirect: False
+ EnvironmentCompileMethod: Pers
+ EnvironmentProcessor: I386
+ Environment64BitProcessor: True
--- /dev/null
+ Environment
+ EnvironmentName: CleanPlatform
+ EnvironmentPaths
+ Path: {Application}/lib/StdEnv
+ Path: {Application}/lib/Generics
+ Path: {Application}/lib/StdLib
+ Path: {Application}/lib/clean-platform/OS-Independent
+ Path: {Application}/lib/clean-platform/OS-Independent/Data
+ Path: {Application}/lib/clean-platform/OS-Independent/Database
+ Path: {Application}/lib/clean-platform/OS-Independent/Database/SQL
+ Path: {Application}/lib/clean-platform/OS-Independent/GUI
+ Path: {Application}/lib/clean-platform/OS-Independent/Internet
+ Path: {Application}/lib/clean-platform/OS-Independent/Internet/HTTP
+ Path: {Application}/lib/clean-platform/OS-Independent/Math
+ Path: {Application}/lib/clean-platform/OS-Independent/Network
+ Path: {Application}/lib/clean-platform/OS-Independent/System
+ Path: {Application}/lib/clean-platform/OS-Independent/Test
+ Path: {Application}/lib/clean-platform/OS-Independent/Text
+ Path: {Application}/lib/clean-platform/OS-Independent/Text/Encodings
+ Path: {Application}/lib/clean-platform/OS-Mac
+ Path: {Application}/lib/clean-platform/OS-Mac/Database
+ Path: {Application}/lib/clean-platform/OS-Mac/Database/SQL
+ Path: {Application}/lib/clean-platform/OS-Mac/Network
+ Path: {Application}/lib/clean-platform/OS-Mac/System
+ Path: {Application}/lib/clean-platform/OS-Posix
+ Path: {Application}/lib/clean-platform/OS-Posix/DataSources
+ Path: {Application}/lib/clean-platform/OS-Posix/Network
+ Path: {Application}/lib/clean-platform/OS-Posix/System
+ EnvironmentCompiler: lib/exe/cocl:-generics
+ EnvironmentCodeGen: lib/exe/cg
+ EnvironmentLinker: lib/exe/linker
+ EnvironmentDynLink: lib/exe/linker
+ EnvironmentVersion: 920
+ EnvironmentRedirect: False
+ EnvironmentCompileMethod: Pers
+ EnvironmentProcessor: I386
+ Environment64BitProcessor: True
from Data.Either import :: Either
from Data.Maybe import :: Maybe
+from StdString import class toString
import lex
-module main
+module spl
import StdFile
import StdBool
# (stdin, w) = stdio w
| args.version
# stdin = stdin
- <<< "main 0.1 (17 march 2016)\n"
+ <<< "spl 0.1 (17 march 2016)\n"
<<< "Copyright Pim Jager and Mart Lubbers\n"
= snd $ fclose stdin w
| args.help
# stdin = stdin
<<< "Usage: " <<< args.program <<< " [OPTION] [FILE]\n"
+ <<< "<spl> ::= <spl> <parser> <lexer>\n"
<<< "Lex parse and either FILE or stdin\n"
<<< "\n"
<<< "Options:\n"
Version: 1.4
Global
ProjectRoot: .
- Target: iTasks
- Exec: {Project}/main
+ Target: CleanPlatform
+ Exec: {Project}/spl
CodeGen
CheckStacks: False
CheckIndexes: True
Application
- HeapSize: 8388608
- StackSize: 4194304
- ExtraMemory: 81920
- IntialHeapSize: 1048576
+ HeapSize: 2097152
+ StackSize: 512000
+ ExtraMemory: 8192
+ IntialHeapSize: 204800
HeapSizeMultiplier: 4096
ShowExecutionTime: False
ShowGC: False
Profile
Memory: False
MemoryMinimumHeapSize: 0
- Time: True
- Stack: True
+ Time: False
+ Stack: False
Output
- Output: NoConsole
- Font: Courier
+ Output: ShowConstructors
+ Font: Monaco
FontSize: 9
WriteStdErr: False
Link
LinkMethod: Static
GenerateRelocations: False
- GenerateSymbolTable: False
GenerateLinkMap: False
LinkResources: False
ResourceSource:
Precompile:
Postlink:
MainModule
- Name: main
+ Name: spl
Dir: {Project}
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdArray
- Dir: {Application}/lib/StdEnv
+ Name: GenEq
+ Dir: {Application}/lib/Generics
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdBool
- Dir: {Application}/lib/StdEnv
+ Name: GenPrint
+ Dir: {Application}/lib/Generics
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdChar
+ Name: StdArray
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdCharList
+ Name: StdBool
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdClass
+ Name: StdChar
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdEnum
+ Name: StdCharList
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdEnv
+ Name: StdClass
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdFile
+ Name: StdEnum
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdFunc
+ Name: StdEnv
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdInt
+ Name: StdFile
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdList
+ Name: StdFunc
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdMisc
+ Name: StdGeneric
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdOrdList
+ Name: StdInt
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdOverloaded
+ Name: StdList
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdReal
+ Name: StdMisc
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdString
+ Name: StdOrdList
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdTuple
+ Name: StdOverloaded
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: _SystemArray
+ Name: StdReal
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: _SystemEnum
+ Name: StdString
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: System.OS
- Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Linux-64
- Compiler
- NeverMemoryProfile: False
- NeverTimeProfile: False
- StrictnessAnalysis: True
- ListTypes: StrictExportTypes
- ListAttributes: True
- Warnings: True
- Verbose: True
- ReadableABC: False
- ReuseUniqueNodes: True
- Fusion: False
- Module
- Name: System.OS
- Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Linux-64
- Compiler
- NeverMemoryProfile: False
- NeverTimeProfile: False
- StrictnessAnalysis: True
- ListTypes: StrictExportTypes
- ListAttributes: True
- Warnings: True
- Verbose: True
- ReadableABC: False
- ReuseUniqueNodes: True
- Fusion: False
- Module
- Name: Control.Applicative
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: StdTuple
+ Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: Control.Monad
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: _SystemArray
+ Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: Data.Either
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: _SystemEnum
+ Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: Data.Func
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: StdMaybe
+ Dir: {Application}/lib/StdLib
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: Data.Functor
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: Control.Applicative
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: Data.List
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: Control.Monad
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: Data.Maybe
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: Data.Either
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: Data.Monoid
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: Data.Func
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: Data.Void
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: Data.Functor
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: System.CommandLine
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: Data.List
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: System.IO
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: Data.Maybe
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: System._Pointer
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: Data.Monoid
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: Text
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Name: Data.Void
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdMaybe
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent/Deprecated/StdLib
+ Name: System.CommandLine
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: _SystemDynamic
- Dir: {Application}/lib/iTasks-SDK/Patches/Dynamics
+ Name: System.IO
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: GenEq
- Dir: {Application}/lib/iTasks-SDK/Patches/Generics
+ Name: System._Pointer
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: GenPrint
- Dir: {Application}/lib/iTasks-SDK/Patches/Generics
+ Name: Text
+ Dir: {Application}/lib/clean-platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdGeneric
- Dir: {Application}/lib/iTasks-SDK/Patches/StdEnv
+ Name: System.OS
+ Dir: {Application}/lib/clean-platform/OS-Linux-64
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
from StdString import class toString
from Data.Either import :: Either
-from StdClass import class Eq
+from StdClass import class ==, class Eq
from Data.Functor import class Functor
from Control.Monad import class Monad
from Control.Applicative import class Applicative, class Alternative