-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
39 lines (22 loc) · 1.24 KB
/
README
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
39
** to compile optimally **
make clean
make
** to run on input files **
./parser < lexer_test.pas
./parser < test2.pas
./parser < test3.pas
** to examine output **
cat symtable.out (<-- this output is not used since each scope now has a symbol table)
cat rules.out
/*
note:
1. Conflicts: 1 shift/reduce, 1 reduce/reduce
2. The current symbol table does not have any name-mangling features (perhaps to be added in the foreseeable future).
3. The current version only checks for type mismatch in simple assignment operations (i.e. assignment in the form of "a := b") but does not check for
type mismatch in assignment of the form "a := b + c" (since specific language-dependent rules are needed to determine the type of the right-hand side
and the project would become too complicated if all those rules have to be included).
4. Many other things such as division by 0 are not handled yet (not part of the project though)
5. Assuming all for loop have step size +1, and also because the for ? = ? to ? in PASCAL already implies an increment, an instruction in the form of
? := ? + 1 will be automatically printed in the TAC)
6. A test case that failed was component selections in the form of c.d[e]
*/