Initialise the repository

Files are from Project 3 framework, with parser.y replaced by the one
from Project 2 Solution. However, switch-case statement and postfix
operators are removed.

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Reformat code

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Add declaration conflict check for Program

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Add GetClass() for Program

GetClass() automatically triggers semantic checking for target class
declaration.

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Add virtual Check() for Node

Every derived class should have its Check() implemented.

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Add Check() for Program

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Fix improper usage of "this"

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Add declaration conflict check for StmtBlock

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Add GetClass(), GetFn() and GetVar() framework

Node class has its primitive GetClass(), GetFn() and GetVar(). Most
non-declarative syntactic blocks will use these function to call their
parents' corresponding methods. Declarative blocks like Program should
have their own implementation.

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Add Get*() for Program

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Implement Node::Check()

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Move checking part to Node::DoCheck()

Check() will only check whether this structure is checked before. The
true parsing is performed by DoCheck().

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Fix virtual methods in Node

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Add public methods to access protected fields

Identifier::get_name() returns Identifier::name. Decl::get_id() returns
Decl::id.

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Reformat code

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Change Node::Check() to a virtual method

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Add function
Fix some compile errors
Add symbol tables for all related nodes

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>
Add hashtable.h to ast_decl.h

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>