HEADER

ru.biosoft.math.model
Interface Parser

All Known Implementing Classes:
AbstractParser

public interface Parser

Specifies general parser definition.

todo comments
pending other methods can be formalised and added.

Field Summary
 final static intSTATUS_ERROR
          There were some errors during expression parser.
 final static intSTATUS_FATAL_ERROR
          Some fatal errors have occured during the parser.
 final static intSTATUS_OK
          The expression was parsed successfully without any errors or wornings.
 final static intSTATUS_WARNING
          There were some warnings during expression parser.

Method Summary
 ParserContextgetContext()
           
 ListgetMessages()
          Returns list of warning and error messages.
 AstStartgetStartNode()
          Returs root of the AST tree.
 booleanisDeclareUndefinedVariables()
           
 intparse(String expression)
           
 voidsetContext(ParserContext context)
           
 voidsetDeclareUndefinedVariables(boolean declareUndefinedVariables)
           

Field Detail

STATUS_ERROR

public final static int STATUS_ERROR
There were some errors during expression parser.

STATUS_FATAL_ERROR

public final static int STATUS_FATAL_ERROR
Some fatal errors have occured during the parser. For MathML such status indicates that XML document is not well formed, for linear syntax parser this indicates that some rror in grammar was found.

STATUS_OK

public final static int STATUS_OK
The expression was parsed successfully without any errors or wornings.

STATUS_WARNING

public final static int STATUS_WARNING
There were some warnings during expression parser.
Method Detail

getContext

public ParserContext getContext()

getMessages

public List getMessages()
Returns list of warning and error messages.

getStartNode

public AstStart getStartNode()
Returs root of the AST tree.

isDeclareUndefinedVariables

public boolean isDeclareUndefinedVariables()

parse

public int parse(String expression)

setContext

public void setContext(ParserContext context)

setDeclareUndefinedVariables

public void setDeclareUndefinedVariables(boolean declareUndefinedVariables)

FOOTER

BOTTOM