-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from nLatt/develop
Develop
- Loading branch information
Showing
133 changed files
with
1,662 additions
and
1,043 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,6 @@ cabal.project.local~ | |
glados | ||
tmp | ||
packagedb | ||
/*.scm | ||
/*.scm | ||
*_lnk | ||
a.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,148 @@ | ||
cabal-version: 2.4 | ||
name: GLaDOS2023 | ||
version: 0.1.0.0 | ||
-- A short (one-line) description of the package. | ||
-- synopsis: | ||
|
||
-- A longer description of the package. | ||
-- description: | ||
|
||
-- A URL where users can report bugs. | ||
-- bug-reports: | ||
|
||
-- The license under which the package is released. | ||
-- license: | ||
version: 0.2.0.0 | ||
author: Nydragon | ||
|
||
-- A copyright notice. | ||
-- copyright: | ||
-- category: | ||
extra-source-files: | ||
CHANGELOG.md | ||
README.md | ||
|
||
library | ||
-- | ||
-- Compilation | ||
-- | ||
|
||
library compilation-lib | ||
default-language: Haskell2010 | ||
hs-source-dirs: lib | ||
exposed-modules: Parsing, | ||
build-depends: base >= 4.14.1.0, containers >= 0.5.10.2, shared-lib | ||
hs-source-dirs: libraries/compilation-lib | ||
ghc-options: -Wall -debug | ||
exposed-modules: | ||
Parsing.Args, | ||
Parsing.Token, | ||
Parsing.TokenType, | ||
Parsing.Ast, | ||
Parsing.Cpt, | ||
Parsing.Infix, | ||
Exec, | ||
Exec.RuntimeException, | ||
Exec.Function, | ||
Exec.Variables | ||
Exec.Registry, | ||
Exec.Builtins, | ||
Exec.InteractivePrompt | ||
Exec.Eval, | ||
Exec.Utils | ||
Parsing.Token, | ||
Parsing.TokenType, | ||
Compilation.Utils, | ||
Compilation.Compile, | ||
Compilation.CompilationError, | ||
Compilation.Registry, | ||
Compilation.RetVal | ||
|
||
-- Compiler | ||
executable glados | ||
default-language: Haskell2010 | ||
hs-source-dirs: compiler unit-tests | ||
ghc-options: -Wall -debug | ||
build-depends: base >= 4.14.1.0, | ||
compilation-lib, | ||
shared-lib, | ||
-- Testing deps are here for vscode highlighting purposes | ||
tasty >= 1.4.3, | ||
tasty-discover >= 5.0.0, | ||
tasty-hunit >= 0.10.0.3, | ||
containers >= 0.5.10.2 | ||
main-is: Main.hs | ||
|
||
hs-source-dirs: lib | ||
build-depends: base >= 4.14.1.0, containers | ||
-- | ||
-- Execution | ||
-- | ||
|
||
library exec-lib | ||
default-language: Haskell2010 | ||
build-depends: base >= 4.14.1.0, | ||
containers >=0.5.10.2 | ||
hs-source-dirs: libraries/exec-lib | ||
build-depends: base >= 4.14.1.0, shared-lib, containers | ||
ghc-options: -Wall | ||
exposed-modules: | ||
Parser.ReadFile, | ||
Exec.InferType, | ||
Exec.Builtins, | ||
Exec.Infer, | ||
Exec.Instructions, | ||
Exec.RuntimeException, | ||
Exec.Utils, | ||
Exec | ||
|
||
executable glados | ||
executable runner | ||
default-language: Haskell2010 | ||
hs-source-dirs: app test | ||
main-is: Main.hs | ||
-- Modules included in this executable, other than Main. | ||
-- LANGUAGE extensions used by modules in this package. | ||
-- other-extensions: | ||
build-depends: base >= 4.14.1.0, tasty >= 1.4.3, tasty-discover >= 5.0.0, tasty-hunit >= 0.10.0.3, containers >=0.5.10.2, GLaDOS2023 | ||
hs-source-dirs: runner | ||
build-depends: base >= 4.14.1.0, exec-lib | ||
main-is: Main.hs | ||
|
||
-- | ||
-- Shared | ||
-- | ||
|
||
test-suite unitTest | ||
library shared-lib | ||
default-language: Haskell2010 | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: unitTest | ||
build-depends: base >= 4.14.1.0, containers >= 0.5.10.2 | ||
hs-source-dirs: libraries/shared-lib | ||
ghc-options: -Wall | ||
exposed-modules: | ||
Instruction, | ||
FunctionBlock, | ||
Utils | ||
|
||
-- | ||
-- Interactive | ||
-- | ||
|
||
executable sun-tzu | ||
default-language: Haskell2010 | ||
build-depends: base >= 4.14.1.0, | ||
containers, | ||
shared-lib, | ||
compilation-lib, | ||
exec-lib | ||
hs-source-dirs: interactive | ||
main-is: Main.hs | ||
ghc-options: -Wall | ||
other-modules: | ||
Utils | ||
|
||
-- | ||
-- Tests | ||
-- | ||
|
||
test-suite unit-tests | ||
default-language: Haskell2010 | ||
hs-source-dirs: tests/unit-tests | ||
build-depends: base >=4.14.1.0, | ||
tasty >= 1.4.3, | ||
tasty-discover >= 5.0.0, | ||
tasty-hunit >= 0.10.0.3, | ||
containers >=0.5.10.2, | ||
exec-lib, | ||
compilation-lib, | ||
shared-lib | ||
main-is: TestMain.hs | ||
other-modules: Parsing.ArgsTests, | ||
Parsing.TokenTests, | ||
Parsing.CptTests, | ||
Parsing.AstTests, | ||
Parsing.InfixTests, | ||
ParsingTests, | ||
ExecTests | ||
build-depends: base >=4.14.1.0, | ||
tasty >= 1.4.3, | ||
tasty-discover >= 5.0.0, | ||
tasty-hunit >= 0.10.0.3, | ||
containers >=0.5.10.2, | ||
GLaDOS2023 | ||
type: exitcode-stdio-1.0 | ||
other-modules: | ||
CompilationLib.Parser.ArgsTests, | ||
CompilationLib.Parser.TokenTests, | ||
CompilationLib.Parser.CptTests, | ||
CompilationLib.Parser.AstTests, | ||
CompilationLib.Parser.InfixTests, | ||
ExecLib.Exec.Infer, | ||
ExecLib.Exec.Instructions, | ||
ExecLib.Exec.Utils, | ||
ExecLib.Parser.ReadFile, | ||
CompilationLib | ||
ExecLib | ||
|
||
test-suite integrationTest | ||
test-suite integration-tests | ||
default-language: Haskell2010 | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: integrationTests/ | ||
main-is: Main.hs | ||
other-modules: Print | ||
Test | ||
hs-source-dirs: tests/integration-tests | ||
build-depends: base >=4.14.1.0, | ||
ansi-terminal >= 0.11.3, | ||
process >= 1.6.8.0, | ||
filepath >= 1.4.2.1, | ||
directory >= 1.3.3.0, | ||
exitcode >= 0.1.0.0, | ||
GLaDOS2023 | ||
ansi-terminal >= 0.11.3, | ||
process >= 1.6.8.0, | ||
filepath >= 1.4.2.1, | ||
directory >= 1.3.3.0, | ||
exitcode >= 0.1.0.0, | ||
exec-lib, | ||
compilation-lib | ||
main-is: Main.hs | ||
type: exitcode-stdio-1.0 | ||
other-modules: | ||
Print, | ||
Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,46 @@ | ||
SHELL := /bin/bash | ||
|
||
# Binary Names | ||
COMPILER_NAME = glados | ||
RUNNER_NAME = runner | ||
INTERACTIVE=sun-tzu | ||
|
||
all: clean | ||
@cabal run glados -- $(ARGS) | ||
|
||
build: clean | ||
@rm -rf ./dist-newstyle | ||
@cabal build glados | ||
@find . -wholename "*glados/glados" -exec cp {} . \; | ||
|
||
test: clean | ||
@cabal test --test-show-details=direct | ||
build: | ||
ifeq ($(filter $(COMPILER_NAME),$(MAKECMDGOALS)),$(COMPILER_NAME)) | ||
@cabal build $(COMPILER_NAME) | ||
@find . -wholename "*$(COMPILER_NAME)/$(COMPILER_NAME)" -exec ln -fs {} ./$(COMPILER_NAME)_lnk \; | ||
else ifeq ($(filter $(RUNNER_NAME),$(MAKECMDGOALS)),$(RUNNER_NAME)) | ||
@cabal build $(RUNNER_NAME) | ||
@find . -wholename "*$(RUNNER_NAME)/$(RUNNER_NAME)" -exec ln -fs {} ./$(RUNNER_NAME)_lnk \; | ||
else | ||
@cabal build $(COMPILER_NAME) | ||
@cabal build $(RUNNER_NAME) | ||
@cabal build $(INTERACTIVE) | ||
@find . -wholename "*$(COMPILER_NAME)/$(COMPILER_NAME)" -exec ln -fs {} ./$(COMPILER_NAME)_lnk \; | ||
@find . -wholename "*$(RUNNER_NAME)/$(RUNNER_NAME)" -exec ln -fs {} ./$(RUNNER_NAME)_lnk \; | ||
@find . -wholename "*$(INTERACTIVE)/$(INTERACTIVE)" -exec ln -fs {} ./$(INTERACTIVE)_lnk \; | ||
endif | ||
|
||
unit-test: clean | ||
@cabal run unitTest --test-show-details=direct | ||
clean: | ||
@rm -rf ./dist-newstyle | ||
@rm -f $(RUNNER_NAME)_lnk | ||
@rm -f $(COMPILER_NAME)_lnk | ||
|
||
integration-test: clean | ||
@cabal run integrationTest --test-show-details=direct | ||
re: clean build | ||
|
||
clean: | ||
@rm -f *.tix | ||
test: clean | ||
ifeq ($(filter unit,$(MAKECMDGOALS)),unit) | ||
@cabal run unit-tests --test-show-details=direct | ||
else ifeq ($(filter integration,$(MAKECMDGOALS)),integration) | ||
make build | ||
@cabal run integration-tests --test-show-details=direct | ||
else | ||
make build | ||
@cabal run unit-tests --test-show-details=direct | ||
@cabal run integration-tests --test-show-details=direct | ||
endif | ||
|
||
.PHONY: all build tests integration-test unit-test clean | ||
.PHONY: all build test clean glados |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
packages : ./GLaDOS2023.cabal | ||
tests: True | ||
coverage: True | ||
library-coverage: True | ||
library-coverage: False |
Oops, something went wrong.