Frontend analyzer for Pascal source codes. The first part is the Lexer/Lexan responsible for lexical analysis of the given input source code, i.e., breaking the source code into lexical tokens. The second part is the syntax analysis in which the lexical tokens are parsed into the abstract syntax tree (AST). Lastly, the AST is transformed into LLVM intermediate representation (IR) and executable code is generated.
Semester work for BI-PJP at CTU in Prague.
LLVM 6.0.0 make clang
- run cmake ./ (creates makefile)
- run make
- ./pas_compiler "path_to_source_file"
- clang output.o
- ./a.out