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 int | STATUS_ERROR There were some errors during expression parser. |
final static int | STATUS_FATAL_ERROR Some fatal errors have occured during the parser. |
final static int | STATUS_OK The expression was parsed successfully without any errors or wornings. |
final static int | STATUS_WARNING There were some warnings during expression parser. |
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.
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)
BOTTOM