- Tested on Windows 10 and Ubuntu 18.04 LTS
- JRE 8+
- Create an input file containing contents to be lexically and syntactically analyzed (ex.
input.c
) - Or, alternatively, just modify contents in
files/a.c
- Default input file is
files/a.c
if ran without any argument.
- Open
cmd.exe
- Type:
java -jar lexical_analyzer.jar <file-name>.c
- Example:
java -jar lexical_analyzer.jar files/a.c
- The result file will be generated as
<file-name>.ser
.- The generated file contains token list (
ArrayList<Token>
) information of the symbol tablesymtab
.
- The generated file contains token list (
- Type:
java -jar syntax_analyzer.jar <file-name>.ser
- Example:
java -jar syntax_analyzer.jar files/a.ser
- Error reports are shown on the console.