1. Files
-----------------------------------------------------------------
README		this file
Makefile	a makefile to build the example
run.sh		a shell script to run compiler with the specified input
***********************************************
include		directory to store header files
  |--common.h   include common declarations and definitions for compilers
  |--util.h     include utility declarations and definitions, e.g. list
  |--errcfg.h   include error types and their corresponding error messages
  |--op.h   	include operator constants and their corresponding literals

config		directory to store grammar files
  |--expr.lex, expr.y, expr1.y, exprL.y
  |             grammar files of an expression language
  |--asgn.lex, asgn.y, asgn1.y asgn2ast.y
  |--asgn_err.lex, asgn_err.y
  |             grammar files of an assignment statement language
  |             asgn.y: evaluate when parsing
  |		asgn1.y: similar to asgn.y, but introduce nonterminal 'op' 
  |             asgn_err.y: evaluate when parsing with error recovery
  |--           asgn2ast.y: generate AST when parsing

src		directory to store source files 
  |--symtab.c   source file providing functions of symbolic table
  |--list.c     source file providing functions of list, list iterator
  |--error.c    source file providing functions of error message managment
  |--ast.c      source file providing functions of abstract syntax tree
  |--expr.lex.c lexer file generated by flex from ../config/expr.lex
  |--expr*.tab.c parser file generated by Bison from ../config/expr*.y
  |--expr.tab.h header file generated by Bison from ../config/expr*.y
  |--asgn*.lex.c lexer file generated by flex from ../config/asgn*.lex
  |--asgn*.tab.c parser file generated by Bison from ../config/asgn*.y
  |--asgn*.tab.h header file generated by Bison from ../config/asgn*.y

test		directory to store test files
  |--expr.in	a simple expr program
  |--asgn.in	a simple asgn program
  |--asgn_err.in	an invalid asgn program

bin		directory to store executable files

-----------------------------------------------------------------

2. Building expr/asgn parsers
   $ make 
   It will build all parsers. You will get expr, expr1, asgn, ... 
   in bin directory. The functionality of 'make' is the same as 
   that of the following commandlines.

   $ make expr
   $ make expr1
   $ make asgn
   ...

3. Run a parser to parse a program.
   $ ./run.sh expr expr.in
   It is the same as the commandline "bin/expr <test/expr.in".

========
Yu Zhang ( yuzhang@ustc.edu.cn )
School of Computer Science and Technology
University of Science and Technology of China
Hefei, Anhui, P.R.China

Created on Mar 13, 2012
Last Revised on Sept 15, 2013
