Built using Flex & Bison to take in any java source code and emits its equivalent bytecode. This is a project developed for the PLT (Programming Language Translation) course at Faculty of Engineering, Alexandria University in Spring 2020 Offering.
To run the program, use the script run.sh
as follows:
./run.sh file_name
where filename, can be any file that contains java source code.
For testing purposes while development use this,
./run.sh --debug file_name
or
./run.sh -d file_name
where file_name is a file that exists in the test-cases
folder. The extra argument will ensure we keep all our test files from the test-cases
folder and picking the suitable unit test case for the part you're developing.
- Flex & Bison by John Levine. The definitive textbok for using these tools.
- Bison Official Doumentation.
- Tutorial: Simple Bison Tutorial to start with
- Tutorial: For complete novices needing to use Flex and Bison for some real project, then watching this complemntery video.
- Tutorial: Writing Your Own Toy Compiler Using Flex, Bison and LLVM.