/COMPILER

Flex, Bison, Abstract Syntax Tree, Type Checking

Primary LanguageC

Compiler Construction

Lab Goals

  • lab1: Using flex and bison for DEMO language
  • lab2: Use the bison parser generator to build an abstract syntax tree (AST) for an input DemoSub program. Based on the AST constructed, write an interpreter in C to execute the program.

Lab 1 - Running

  1. make parser
  2. make demo
  3. ./demo

Lab 2 - Running

  1. make clean
  2. make demo
  3. ./demo

All detailed running procedures are shown in Makefile.