Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 698 Bytes

File metadata and controls

24 lines (21 loc) · 698 Bytes

Parser for Mini-Pascal

Usage

You can try directly by compiled executable or compile from source

Run Compiled Executable

Under folder compiled_executable

./mini_pascal_compiler ../testcase/12_fib.p fib
java -jar jasmin.jar fib.j
java fib

More testcases, see testcase

Compile by Yourself

You must install Lex and YACC first before compiling the source.

Library Dependency for Ubuntu

$ sudo apt-get update && sudo apt-get install bison flex byacc

Instructions

  1. go to folder src
  2. $ make
  3. change IN file, ex: IN = ../testcase/12_fib.p
  4. $ make gen to compile and then $ make run
  5. $ make clean_all