| 1 |
# Routines to test grammars passed through the TCLL1 |
| 2 |
# parser generator. |
| 3 |
# Link this with parseLL1 and it will write out the tokens |
| 4 |
# and action symbols recognized by the parser. |
| 5 |
# (written by Dr. Thomas W. Christopher) |
| 6 |
# |
| 7 |
procedure outToken(tok) |
| 8 |
write(tok.type," ",tok.line," ",tok.column," ",tok.body) |
| 9 |
return |
| 10 |
end |
| 11 |
|
| 12 |
procedure outAction(a) |
| 13 |
write(a) |
| 14 |
return |
| 15 |
end |
| 16 |
|
| 17 |
procedure outError(t) |
| 18 |
write("ERROR: ",t) |
| 19 |
return |
| 20 |
end |
| 21 |
|
| 22 |
procedure initSemantics() |
| 23 |
return |
| 24 |
end |
| 25 |
|