ru.biosoft.math.parser
Class Parser

java.lang.Object
  extended byru.biosoft.math.model.AbstractParser
      extended byru.biosoft.math.parser.Parser
All Implemented Interfaces:
Parser, ParserConstants, ParserTreeConstants

public class Parser
extends AbstractParser
implements ParserTreeConstants, ParserConstants


Field Summary
 Token jj_nt
           
protected  ru.biosoft.math.parser.JJTParserState jjtree
           
 boolean lookingAhead
           
 Token token
           
 ParserTokenManager token_source
           
 
Fields inherited from class ru.biosoft.math.model.AbstractParser
astStart, context, declareUndefinedVariables, messages, status, variableResolver
 
Fields inherited from interface ru.biosoft.math.parser.ParserTreeConstants
JJTCONSTANT, JJTFUNCTIONDECLARATION, JJTFUNNODE, jjtNodeName, JJTPIECE, JJTPIECEWISE, JJTSTART, JJTVARNODE, JJTVOID
 
Fields inherited from interface ru.biosoft.math.parser.ParserConstants
AND, ASSIGNMENT, DECIMAL_LITERAL, DEFAULT, DIFF, DIGIT, DIV, EOF, EQ, EXPONENT, FLOATING_POINT_LITERAL, FUNCTION, GE, GT, IDENTIFIER, INTEGER_LITERAL, LE, LETTER, LT, MINUS, MUL, NE, NOT, OR, PIECEWISE, PLUS, POWER, STRING_LITERAL, tokenImage, XOR
 
Fields inherited from interface ru.biosoft.math.model.Parser
STATUS_ERROR, STATUS_FATAL_ERROR, STATUS_OK, STATUS_WARNING
 
Constructor Summary
Parser()
          Default constructor.
Parser(java.io.InputStream stream)
           
Parser(ParserTokenManager tm)
           
Parser(java.io.Reader stream)
           
 
Method Summary
 void AdditiveExpression()
           
 void AndExpression()
           
 void AnyConstant()
           
 void ArgumentDeclaration()
           
 void ArgumentList(int reqArguments, java.lang.String functionName)
           
 java.util.Vector Array()
           
 void Assignment()
          ASSIGNMENT
 void Diff()
           
 void DiffEquation()
          DIFFERENTIATION
 void disable_tracing()
           
 void enable_tracing()
           
 void EqualExpression()
           
 void Expression()
          EXPRESSION
 void Function()
           
 void FunctionDeclaration()
          FUNCTION DECLARATION
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 java.lang.String Identifier()
           
 void MultiplicativeExpression()
           
 void OrExpression()
           
 void ParenthisExpression()
           
 int parse(java.lang.String expression)
           
 void Piece()
           
 void PieceOrOtherwise()
           
 void Piecewise()
          PIECEWISE
 void PowerExpression()
           
 void PredefinedConstant()
           
 java.lang.Object RealConstant()
           
 void ReInit(java.io.InputStream stream)
           
 void ReInit(ParserTokenManager tm)
           
 void ReInit(java.io.Reader stream)
           
 void RelationalExpression()
           
 AstStart Start()
          GRAMMAR START
 void UnaryExpression()
           
 void UnaryExpressionNotPlusMinus()
           
 void Variable()
           
 void VariableOrPredefinedConstant()
           
 void XorExpression()
           
 
Methods inherited from class ru.biosoft.math.model.AbstractParser
error, fatalError, getContext, getMessages, getStartNode, getVariableResolver, isDeclareUndefinedVariables, processConstant, processVariable, reinit, setContext, setDeclareUndefinedVariables, setOperator, setVariableResolver, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jjtree

protected ru.biosoft.math.parser.JJTParserState jjtree

token_source

public ParserTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

Parser

public Parser()
Default constructor.


Parser

public Parser(java.io.InputStream stream)

Parser

public Parser(java.io.Reader stream)

Parser

public Parser(ParserTokenManager tm)
Method Detail

parse

public int parse(java.lang.String expression)
Specified by:
parse in interface Parser

Start

public final AstStart Start()
                     throws ParseException
GRAMMAR START

Throws:
ParseException

Assignment

public final void Assignment()
                      throws ParseException
ASSIGNMENT

Throws:
ParseException

FunctionDeclaration

public final void FunctionDeclaration()
                               throws ParseException
FUNCTION DECLARATION

Throws:
ParseException

ArgumentDeclaration

public final void ArgumentDeclaration()
                               throws ParseException
Throws:
ParseException

DiffEquation

public final void DiffEquation()
                        throws ParseException
DIFFERENTIATION

Throws:
ParseException

Diff

public final void Diff()
                throws ParseException
Throws:
ParseException

Piecewise

public final void Piecewise()
                     throws ParseException
PIECEWISE

Throws:
ParseException

Piece

public final void Piece()
                 throws ParseException
Throws:
ParseException

PieceOrOtherwise

public final void PieceOrOtherwise()
                            throws ParseException
Throws:
ParseException

Expression

public final void Expression()
                      throws ParseException
EXPRESSION

Throws:
ParseException

OrExpression

public final void OrExpression()
                        throws ParseException
Throws:
ParseException

XorExpression

public final void XorExpression()
                         throws ParseException
Throws:
ParseException

AndExpression

public final void AndExpression()
                         throws ParseException
Throws:
ParseException

EqualExpression

public final void EqualExpression()
                           throws ParseException
Throws:
ParseException

RelationalExpression

public final void RelationalExpression()
                                throws ParseException
Throws:
ParseException

AdditiveExpression

public final void AdditiveExpression()
                              throws ParseException
Throws:
ParseException

MultiplicativeExpression

public final void MultiplicativeExpression()
                                    throws ParseException
Throws:
ParseException

UnaryExpression

public final void UnaryExpression()
                           throws ParseException
Throws:
ParseException

PowerExpression

public final void PowerExpression()
                           throws ParseException
Throws:
ParseException

UnaryExpressionNotPlusMinus

public final void UnaryExpressionNotPlusMinus()
                                       throws ParseException
Throws:
ParseException

ParenthisExpression

public final void ParenthisExpression()
                               throws ParseException
Throws:
ParseException

VariableOrPredefinedConstant

public final void VariableOrPredefinedConstant()
                                        throws ParseException
Throws:
ParseException

PredefinedConstant

public final void PredefinedConstant()
                              throws ParseException
Throws:
ParseException

Variable

public final void Variable()
                    throws ParseException
Throws:
ParseException

Function

public final void Function()
                    throws ParseException
Throws:
ParseException

ArgumentList

public final void ArgumentList(int reqArguments,
                               java.lang.String functionName)
                        throws ParseException
Throws:
ParseException

Identifier

public final java.lang.String Identifier()
                                  throws ParseException
Throws:
ParseException

AnyConstant

public final void AnyConstant()
                       throws ParseException
Throws:
ParseException

RealConstant

public final java.lang.Object RealConstant()
                                    throws ParseException
Throws:
ParseException

Array

public final java.util.Vector Array()
                             throws ParseException
Throws:
ParseException

ReInit

public void ReInit(java.io.InputStream stream)

ReInit

public void ReInit(java.io.Reader stream)

ReInit

public void ReInit(ParserTokenManager tm)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

generateParseException

public ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.