|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectparser.StudentParserFactory
public class StudentParserFactory
This class works as an interface for the parsing with the student AST.
| Constructor Summary | |
|---|---|
StudentParserFactory()
|
|
| Method Summary | |
|---|---|
void |
debug_parse()
|
boolean |
errorsDuringParse()
After parsing, the return value of this method will be valid. |
java.lang.String |
getDumpedAST()
Returns the AST from the parse as dumped into a string. |
Program |
getResultAST()
|
void |
parse()
After setting the lexer, this parse() is the command to parse the stream coming from the lexer, debug_parse() does so in debug mode. |
void |
semant()
Runs the semantic checker on the AST accessible by getResultAST(). |
void |
setLexer(CoolTokenLexer lexer)
This method is used to specify the input to the parser. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StudentParserFactory()
| Method Detail |
|---|
public void setLexer(CoolTokenLexer lexer)
ParserFactory
setLexer in interface ParserFactorylexer - -- input to parser
public void parse()
throws java.lang.Exception
ParserFactory
parse in interface ParserFactoryjava.lang.Exception - -- if unrecoverable exception occured during parsing.
public void debug_parse()
throws java.lang.Exception
debug_parse in interface ParserFactoryjava.lang.Exceptionpublic boolean errorsDuringParse()
ParserFactory
errorsDuringParse in interface ParserFactorypublic Program getResultAST()
getResultAST in interface ParserFactory
public void semant()
throws SemanticError
ParserFactory
semant in interface ParserFactorySemanticErrorpublic java.lang.String getDumpedAST()
ParserFactory
getDumpedAST in interface ParserFactory
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||