public class ParseOperation extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
expression |
protected boolean |
infix
State flag for parsing context.
|
protected LinkedList<Object> |
outputQueue |
protected ExpressionParser |
parser |
protected Position |
pos |
protected Deque<Object> |
stack |
| Constructor and Description |
|---|
ParseOperation(ExpressionParser parser,
String expression) |
| Modifier and Type | Method and Description |
|---|---|
protected char |
currentChar() |
protected char |
futureChar(int offset) |
protected Character |
parseChar(char c)
Attempts to parse the given character.
|
protected <CS extends CharSequence> |
parseChars(CS cs)
Attempts to parse the given characters.
|
protected String |
parseElementSeparator()
Attempts to parse an element separator symbol.
|
protected Group |
parseGroupTerminator()
Attempts to parse a group terminator symbol.
|
protected int |
parseIdentifier()
Attempts to parse an identifier, as defined by
Character.isUnicodeIdentifierStart(char) and
Character.isUnicodeIdentifierPart(char). |
protected Object |
parseLiteral()
Attempts to parse a literal (e.g.
|
protected Operator |
parseOperator()
Attempts to parse an operator.
|
LinkedList<Object> |
parsePostfix()
Parses the expression into an output queue in Reverse
Polish notation (i.e., postfix notation).
|
protected String |
parseStatementSeparator()
Attempts to parse a statement separator symbol.
|
protected String |
parseToken(int length)
Parses a token of the given length.
|
protected Variable |
parseVariable()
Attempts to parse a variable.
|
protected void |
parseWhitespace()
Skips past any whitespace to the next interesting character.
|
String |
toString() |
protected final ExpressionParser parser
protected final String expression
protected final Position pos
protected final LinkedList<Object> outputQueue
protected boolean infix
public ParseOperation(ExpressionParser parser, String expression)
public LinkedList<Object> parsePostfix()
protected char currentChar()
protected char futureChar(int offset)
protected void parseWhitespace()
protected Object parseLiteral()
Literals.parseLiteral(java.lang.CharSequence)protected Variable parseVariable()
protected int parseIdentifier()
Character.isUnicodeIdentifierStart(char) and
Character.isUnicodeIdentifierPart(char).protected Operator parseOperator()
protected Group parseGroupTerminator()
protected String parseElementSeparator()
protected String parseStatementSeparator()
protected Character parseChar(char c)
protected <CS extends CharSequence> CS parseChars(CS cs)
protected String parseToken(int length)
Copyright © 2015–2021 SciJava. All rights reserved.