Skip to content

Commit

Permalink
Merge pull request #49 from Arthur-Aillet/readme
Browse files Browse the repository at this point in the history
Readme
  • Loading branch information
augustefrater authored Oct 11, 2023
2 parents 5ff6ee0 + ab08808 commit 7f0fe8a
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ ignore/
test/coverage/*
!test/coverage/.gitkeep
*.cabal
.history
Binary file added GLaDOS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ all:

clean:
stack clean
rm .history

fclean: clean
rm -f $(NAME)
Expand All @@ -25,7 +26,7 @@ format:
IFS=$$'\n' sourceFiles=("$$(find src test -type f -name "*.hs")"); \
ormolu -m inplace $${sourceFiles[*]}

format_check:
format-check:
IFS=$$'\n' sourceFiles=("$$(find src test -type f -name "*.hs")"); \
ormolu -m 'check' $${sourceFiles[*]}

Expand Down
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
# GLaDOS
![glados](GLaDOS.png)

GLaDOS is a lisp interpreter with the goal to emulate the behaviour of shezscheme.

# Installation
To compile GLaDOS, use the MAKEFILE at the root of the directory.

To use a Makefile, just use the "make" command.
this makefile has other rules you can call by using make + [the command of your choice]:
```
all (default) -> just compiles GLaDOS
clean -> cleans the repository of unnecessary files
fclean -> cleans the repository of unnecesary files and of the executable
re -> calls fclean then all
quick -> compiles without stack
format -> formats the source code according to our coding style
format-check -> checks if the code is to our coding style's standards
test-run -> lanches a battery of unit tests
funct-tests -> launches a battery of functional tests
tests -> launches both the unit and functional tests
```
For instance, if you want to recompile GLaDOS, you can use
```
$ make re
```

# Usage
```
$ ./glados
```
Opens the interractive command interpreter
while the programm is running you can type your commands, press tab for autocompletion on keywords and defined variables, and press the up and down arrow to access the command history.


```
$ ./glados < yourfile
```
Executes the instructions in the file

---

GLaDOS can only interpret Lisp. to read more about lisp.
here's a basic Lisp tutorial to get you started:
https://lisp-lang.org/learn/

there are also examples in the test/samples directory.

0 comments on commit 7f0fe8a

Please sign in to comment.