|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTreeNode
Program
programc
class programc
Defines AST constructor 'programc'.
See TreeNode for full documentation.
Field Summary | |
---|---|
protected Classes |
classes
|
Fields inherited from class TreeNode |
---|
lineNumber |
Constructor Summary | |
---|---|
programc(int lineNumber,
Classes a1)
Creates "programc" AST node. |
Method Summary | |
---|---|
void |
cgen(java.io.PrintStream s)
This method is the entry point to the code generator. |
TreeNode |
copy()
Creates a copy of this node. |
void |
dump_with_types(java.io.PrintStream out,
int n)
|
void |
dump(java.io.PrintStream out,
int n)
Pretty-prints this node to this output stream. |
void |
semant()
This method is the entry point to the semantic checker. |
Methods inherited from class TreeNode |
---|
copy_AbstractSymbol, copy_Boolean, dump_AbstractSymbol, dump_Boolean, dump_line, getLineNumber, set |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Classes classes
Constructor Detail |
---|
public programc(int lineNumber, Classes a1)
lineNumber
- the line in the source file from which this node came.a1
- initial value for classesMethod Detail |
---|
public TreeNode copy()
TreeNode
copy
in class TreeNode
public void dump(java.io.PrintStream out, int n)
TreeNode
dump
in class TreeNode
out
- the output streamn
- the number of spaces to indent the outputpublic void dump_with_types(java.io.PrintStream out, int n)
dump_with_types
in class Program
public void semant()
Your checker should do the following two things:
You are free to first do (1) and make sure you catch all semantic errors. Part (2) can be done in a second stage when you want to test the complete compiler.
semant
in class Program
public void cgen(java.io.PrintStream s)
cgen
in class Program
s
- the output streamCgenClassTable
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |