Crossfire JXClient, Trunk
|
Static Public Member Functions | |
static Expression | parseExpression (@NotNull final String str) throws IOException |
static int | parseInt (@NotNull final String str) throws IOException |
Private Member Functions | |
ExpressionParser () | |
Static Private Member Functions | |
static Expression | parseTerm (@NotNull final String factor, @NotNull final String constant) throws IOException |
static Expression | parseTerm (@NotNull final String str) throws IOException |
Static Private Attributes | |
static final Pattern | PATTERN_EXPR = Pattern.compile("(.+?) *([+-]) *(.+)") |
static final Pattern | PATTERN_TERM1 = Pattern.compile("([0-9.]+) *[*] *([A-Z_]+)") |
static final Pattern | PATTERN_TERM2 = Pattern.compile("([A-Z_]+) *[*] *([0-9.]+)") |
Parser for integer expressions.
Definition at line 35 of file ExpressionParser.java.
|
private |
Private constructor to prevent instantiation.
Definition at line 58 of file ExpressionParser.java.
|
static |
Parses an integer constant. Valid constants are "3", "3+4", and "1+2-3+4".
str | the integer constant string to parse |
IOException | if a parsing error occurs |
Definition at line 80 of file ExpressionParser.java.
References com.realtime.crossfire.jxclient.skin.io.ExpressionParser.parseTerm(), and com.realtime.crossfire.jxclient.skin.io.ExpressionParser.PATTERN_EXPR.
Referenced by com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseDialog(), com.realtime.crossfire.jxclient.skin.io.ExpressionParser.parseInt(), and com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseSetAutoSize().
|
static |
Parses an integer constant. Valid constants are "3", "3+4", and "1+2-3+4".
str | the integer constant string to parse |
IOException | if a parsing error occurs |
Definition at line 68 of file ExpressionParser.java.
References com.realtime.crossfire.jxclient.gui.gui.Expression.evaluateConstant(), and com.realtime.crossfire.jxclient.skin.io.ExpressionParser.parseExpression().
Referenced by com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseBegin(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseButton(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseCharacterList(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseCommandText(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseItem(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseList(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseLogColor(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseMetaList(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseMinimap(), com.realtime.crossfire.jxclient.skin.io.CommandParser.parseMoveFocus(), com.realtime.crossfire.jxclient.skin.io.CommandParser.parseMoveSelection(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseQueryText(), com.realtime.crossfire.jxclient.skin.io.CommandParser.parseScroll(), com.realtime.crossfire.jxclient.skin.io.CommandParser.parseScrollList(), and com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseText().
|
staticprivate |
Constructs an Expression consisting of a factor which is applied to a named constant.
factor | the factor |
constant | the named constant |
IOException | if the expression cannot be constructed |
Definition at line 173 of file ExpressionParser.java.
|
staticprivate |
Parses a term which contains no operators.
str | the string |
IOException | if the string cannot be parsed |
Definition at line 119 of file ExpressionParser.java.
References com.realtime.crossfire.jxclient.skin.io.ExpressionParser.PATTERN_TERM1, and com.realtime.crossfire.jxclient.skin.io.ExpressionParser.PATTERN_TERM2.
Referenced by com.realtime.crossfire.jxclient.skin.io.ExpressionParser.parseExpression().
|
staticprivate |
Pattern that matches an expression consisting of multiple terms.
Definition at line 41 of file ExpressionParser.java.
Referenced by com.realtime.crossfire.jxclient.skin.io.ExpressionParser.parseExpression().
|
staticprivate |
Pattern that matches a simple term.
Definition at line 47 of file ExpressionParser.java.
Referenced by com.realtime.crossfire.jxclient.skin.io.ExpressionParser.parseTerm().
|
staticprivate |
Pattern that matches a simple term.
Definition at line 53 of file ExpressionParser.java.
Referenced by com.realtime.crossfire.jxclient.skin.io.ExpressionParser.parseTerm().