info.bliki.wiki.template.expr
Class Parser
java.lang.Object
info.bliki.wiki.template.expr.Scanner
info.bliki.wiki.template.expr.Parser
public class Parser
- extends Scanner
Create an expression of the ASTNode
class-hierarchy from a
math formulas string representation
See Operator-precedence
parser for the idea, how to parse the operators depending on their
precedence.
Fields inherited from class info.bliki.wiki.template.expr.Scanner |
fCurrentChar, fCurrentColumnStartPosition, fCurrentPosition, fFactory, fInputString, fOperatorString, fOperList, fToken, numFormat, rowCount, TT_CONSTANT, TT_DIGIT, TT_EOF, TT_FLOATING_POINT, TT_OPERATOR, TT_PRECEDENCE_CLOSE, TT_PRECEDENCE_OPEN |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Parser
public Parser()
Parser
public Parser(boolean relaxedSyntax)
throws SyntaxError
- Throws:
SyntaxError
Parser
public Parser(IParserFactory factory,
boolean relaxedSyntax)
throws SyntaxError
- Throws:
SyntaxError
setFactory
public void setFactory(IParserFactory factory)
getFactory
public IParserFactory getFactory()
parse
public ASTNode parse(java.lang.String expression)
throws SyntaxError
- Parse the given
expression
String into an ASTNode.
- Parameters:
expression
- a formula string which should be parsed.
- Returns:
- the parsed ASTNode representation of the given formula string
- Throws:
SyntaxError
Copyright © 2012 Java Wikipedia API (Bliki engine). All Rights Reserved.