GLaDOS (Generic Language and Data Operand Syntax) is a custom programming language implemented in Haskell. The project's aim is to create a minimalist yet functional programming environment, inspired by languages like LISP, C and Scheme, and is designed with a focus on functional programming principles.
Our language is called CCS (Confused Code Syntax) and it produces DZ (Dazed) compiled files that you can execute using our VM.
- Custom Language Design: Implementing a language from scratch, including parsing, syntax, and semantics.
- Build System: Compilation via Makefile with
re
,clean
, andfclean
rules. Stack is recommended for building. - Testing: Comprehensive unit and integration tests, with continuous integration and delivery setups.
make test
- Error Handling: Robust error handling with meaningful output.
- Functional Paradigms: Emphasis on functional programming concepts like lambda expressions, closures, and immutable data.
- Documentation for the source code:
make doc
- Haskell
- Stack (recommended build tool)
For Linux distributions, you need to run ./setup-haskell-stack.sh
in order to install Haskell and Stack.
Then, run make build
to build GLaDOS binary.
To run a program written in CCS (Confused Code Syntax), use the following command to compile it:
./glados yourFile.ccs
A compiled ".dz" (Dazed) file will be generated, now run the following command to execute your code:
./glados-vm yourCompiledFile.dz
If your ccs file contains the following code below:
let a = 1;
let b = 2;
if (a == b) then:
(
print("a is equal to b");
)
print("a isn’t equal to b");
The output should be:
a isn't equal to b
fact (a) => (
if (a == 1) then:
return (1);
else:
return (fact(a - 1) * a);
);
let result = (fact(5));
print(result);
The output should be:
120
- Artyom TILLON ([email protected]).
- Aurélien LECLERCQ ([email protected]).
- Edgar DION ([email protected]).
- Marius LACOMBLEZ ([email protected]).
- Yanis BERKANE ([email protected]).