diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2018-03-10 22:53:48 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2018-03-10 22:53:48 +0000 |
commit | 733e278a3c20988cfe1ae386fe057945a805bbb3 (patch) | |
tree | 33768c321ed595677a456c2c104944df275a4b5e /README.md | |
parent | e05e2206c362c541766c0b12abdfd4355c4b232a (diff) | |
download | Compiler-733e278a3c20988cfe1ae386fe057945a805bbb3.tar.gz Compiler-733e278a3c20988cfe1ae386fe057945a805bbb3.zip |
[Doc] Writing more
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -1,6 +1,48 @@ # Compiler +## Structure + +The project is structured in three directories. + +- `c_compiler` contains the main compiler, together with the final parser and lexer. +- `c_parser` contains the first parser that was written and covered a very simple c-like syntax. +- `c_lexer` contains the first lexer for the C syntax. + + +## Usage + +To use the compiler and test it out, together with the lexer and parser, the [`makefile`](/makefile) can +be used. The main compiler can be built using the following commands. + +``` shell +# build all the targets +make + +# Building the main compiler +make bin/c_compiler + +# Building the parser +make bin/c_parser + +# Building the lexer +make bin/c_lexer +``` + +These can then be tested using the following shell scripts. + +``` shell +# Running tests for the compiler +./run_test_deliverable.sh + +# Running tests for the parser +./test_parser.sh + +# Running tests for the lexer +./test_lexer.sh +``` + + ## Functionality Implemented compiler functionality following the C89 Spec. |