README 1.59 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
This is the provided git repository for the WACC Lab in C. You should work in this 
repository regularly committing and pushing your work back to GitLab.

----------------------------
Provided files/directories  
---------------------------- 

> src < 

The src directory contains a simple lexer and parser for a basic calculator 
grammar. It also contains an simple abstract syntax tree and a visitor for this
tree to demonstrate the interface with the lexer/parser files along with a 
makefile that builds this example project. There are some further details on 
these provided files in the src directory README file. You are expected to 
extend or rewrite these files to build your WACC compiler.

> compile <

The compile script should be edited to provide a frontend interface to your WACC
compiler. You are free to change the language used in this script, but do not 
change its name. This script currently writes a TODO: message to the console, 
but you should update it to call the the main method of your compiler with 
appropriate arguments. Note that the lab's automated testing service will be 
using this script as the access point to your compiler.

> LexAndYaccTutorial.pdf <

A tutorial document that describes the basics of Lex and Yaxx and also details 
how to create a lexer and parser project similar to that found in the src 
directory.

> Makefile <

Your Makefile should be edited so that running 'make' in the root directory 
builds your WACC compiler. Currently this makefile will delegate to running 
'make' in the src directory. You are free to modify this build structure in any 
way that you wish.