parser
Interface ParserFactory

All Known Implementing Classes:
DynamicParserFactory, SolutionParserFactory, SolutionStudentParserFactory, StudentParserFactory

public interface ParserFactory


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.
 java.lang.Object 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.
 

Method Detail

setLexer

void setLexer(CoolTokenLexer lexer)
This method is used to specify the input to the parser.

Parameters:
lexer - -- input to parser

parse

void parse()
           throws java.lang.Exception
After setting the lexer, this parse() is the command to parse the stream coming from the lexer, debug_parse() does so in debug mode.

Throws:
java.lang.Exception - -- if unrecoverable exception occured during parsing.

debug_parse

void debug_parse()
                 throws java.lang.Exception
Throws:
java.lang.Exception

errorsDuringParse

boolean errorsDuringParse()
After parsing, the return value of this method will be valid.


getResultAST

java.lang.Object getResultAST()

semant

void semant()
            throws java.lang.Exception
Runs the semantic checker on the AST accessible by getResultAST().

Throws:
java.lang.Exception - -- if there are exceptions during semantic checking.

getDumpedAST

java.lang.String getDumpedAST()
Returns the AST from the parse as dumped into a string.