- This project has been built for comp 520.
- Relevant material can be found on the course webpage
- GoLite specification
- As part of this project. GoLite can be translated into JS.
- We are using flex and bison to build scanner and parser.
- We are using
make
to build our project.
sudo apt install make flex bison
cd src
make install
# Run tests located in Programs directory
./test.sh
# Run scanner on go string
printf "package main\n func main(){ println(\"Hello\")\n }" | ./golite scan
# Scan with the file
./golite scan < my_golite.go
# Parse
./golite parse < my_golite.go # outputs OK if the program is syntactically correct
# Symbol
./golite symbol < my_golite.go # outputs symbol table that is being built for the program
# Typecheck
./golite typecheck < my_golite.go # outputs ok if the program typechecks
# Codegen
./golite codegen generated_file_name < my_golite_to_tranlsate_from.go
- I found that Emacs has the best support for writing C code. I wish I knew about this back in the time when I took operating systems.
valgrind
very useful when debugging segfault errors. Just follow installation instructions from their website.