ru.biosoft.math.model
Class AbstractParser
java.lang.Object
ru.biosoft.math.model.AbstractParser
- All Implemented Interfaces:
- Parser
- Direct Known Subclasses:
- MathMLParser, Parser
- public abstract class AbstractParser
- extends java.lang.Object
- implements Parser
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ru.biosoft.math.model.Parser |
parse |
context
protected ParserContext context
declareUndefinedVariables
protected boolean declareUndefinedVariables
variableResolver
protected VariableResolver variableResolver
status
protected int status
messages
protected java.util.ArrayList messages
astStart
protected AstStart astStart
AbstractParser
public AbstractParser()
getContext
public ParserContext getContext()
- Specified by:
getContext in interface Parser
setContext
public void setContext(ParserContext context)
- Specified by:
setContext in interface Parser
isDeclareUndefinedVariables
public boolean isDeclareUndefinedVariables()
- Specified by:
isDeclareUndefinedVariables in interface Parser
setDeclareUndefinedVariables
public void setDeclareUndefinedVariables(boolean declareUndefinedVariables)
- Specified by:
setDeclareUndefinedVariables in interface Parser
getVariableResolver
public VariableResolver getVariableResolver()
setVariableResolver
public void setVariableResolver(VariableResolver variableResolver)
warning
public void warning(java.lang.String warningStr)
error
public void error(java.lang.String errorStr)
fatalError
public void fatalError(java.lang.String errorStr)
getMessages
public java.util.List getMessages()
- Description copied from interface:
Parser
- Returns list of warning and error messages.
- Specified by:
getMessages in interface Parser
getStartNode
public AstStart getStartNode()
- Description copied from interface:
Parser
- Returs root of the AST tree.
- Specified by:
getStartNode in interface Parser
reinit
protected void reinit()
setOperator
protected void setOperator(Node node,
java.lang.String name)
- Set ups build in operators.
- Pendung:
- validation.
processVariable
protected java.lang.String processVariable(java.lang.String varName)
- Register variable, if neccessary.
- Pendung:
- validation.
processConstant
protected void processConstant(Node node,
java.lang.String constName)
- Register constant, if neccessary.
- Pendung:
- validation.
Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.