/DEMO

repo for Compiler Construction

Primary LanguageYacc

Compile:

  • make: complie all files into executable file.
  • make all: complie all files into executable file.
  • make clean: clean all compiled files

Usage:

  • ./demo -h: print this help message and exit
  • ./demo filename: compile the target file
  • ./demo: compile from stdin

Test:

  • The scanner and parser has been tested under all testcases in folder ./demo/lab1 and pass them all.
  • The scanner and parser can detect errors with detailed information and list the linenumbers where errors happen.
  • The test1.demo and test2.demo are self-written test programs in DEMO accepted by the scanner and paser.