|
|||||||||
Home >> All >> jpicedt >> graphic >> io >> [ parser overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
jpicedt.graphic.io.parser
Class SequenceExpression

java.lang.Objectjpicedt.graphic.io.parser.AbstractRegularExpression
jpicedt.graphic.io.parser.SequenceExpression
- All Implemented Interfaces:
- ExpressionConstants
- Direct Known Subclasses:
- CommentExpression, DefaultParser, LaTeXParser
- public class SequenceExpression
- extends AbstractRegularExpression
An expression that represents a sequence of expressions to be matched exactly in the same order they're being added to the sequence.
Field Summary | |
private java.util.ArrayList |
expressionList
|
private boolean |
throwIncompleteSequenceException
|
Fields inherited from interface jpicedt.graphic.io.parser.ExpressionConstants |
ANY_CHAR, ANY_CHAR_EOL, ANY_SIGN, AT_LEAST, AT_MOST, DEBUG, DOUBLE, EOL, EXACTLY, INTEGER, NEGATIVE, NON_NULL, POSITIVE, STRICTLY_NEGATIVE, STRICTLY_POSITIVE, WHITE_SPACES, WHITE_SPACES_OR_EOL |
Constructor Summary | |
SequenceExpression()
constructs a sequence that contains no sub-expression and doesn't throw IncompleteSequenceException |
|
SequenceExpression(AbstractRegularExpression expr)
constructs a sequence with the given expression as the first sub-expression and which doesn't throw IncompleteSequenceException. |
|
SequenceExpression(AbstractRegularExpression expr1,
AbstractRegularExpression expr2)
constructs a sequence with the given expression as the first and second sub-expression and which doesn't throw Exception |
|
SequenceExpression(AbstractRegularExpression expr1,
AbstractRegularExpression expr2,
AbstractRegularExpression expr3,
boolean throwIncompleteSequenceException)
constructs a sequence with three sub-expressions |
|
SequenceExpression(AbstractRegularExpression expr1,
AbstractRegularExpression expr2,
boolean throwIncompleteSequenceException)
constructs a sequence with the given expression as the first and second sub-expression |
|
SequenceExpression(AbstractRegularExpression expr,
boolean throwIncompleteSequenceException)
constructs a sequence with the given expression as the first sub-expression. |
|
SequenceExpression(boolean throwIncompleteSequenceException)
constructs a sequence that contains no sub-expression. |
Method Summary | |
void |
add(AbstractRegularExpression expr)
add the given expression to the sequence |
boolean |
interpret(Context c)
Parses this expression, possibly using Context to fetch the String to interpret if this Expression is a leaf expression. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
Methods inherited from class jpicedt.graphic.io.parser.AbstractRegularExpression |
action |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
expressionList
private java.util.ArrayList expressionList
throwIncompleteSequenceException
private boolean throwIncompleteSequenceException
Constructor Detail |
SequenceExpression
public SequenceExpression()
- constructs a sequence that contains no sub-expression and doesn't throw IncompleteSequenceException
SequenceExpression
public SequenceExpression(boolean throwIncompleteSequenceException)
- constructs a sequence that contains no sub-expression.
SequenceExpression
public SequenceExpression(AbstractRegularExpression expr)
- constructs a sequence with the given expression as the first sub-expression
and which doesn't throw IncompleteSequenceException.
SequenceExpression
public SequenceExpression(AbstractRegularExpression expr, boolean throwIncompleteSequenceException)
- constructs a sequence with the given expression as the first sub-expression.
SequenceExpression
public SequenceExpression(AbstractRegularExpression expr1, AbstractRegularExpression expr2)
- constructs a sequence with the given expression as the first and second sub-expression and which doesn't throw Exception
SequenceExpression
public SequenceExpression(AbstractRegularExpression expr1, AbstractRegularExpression expr2, boolean throwIncompleteSequenceException)
- constructs a sequence with the given expression as the first and second sub-expression
SequenceExpression
public SequenceExpression(AbstractRegularExpression expr1, AbstractRegularExpression expr2, AbstractRegularExpression expr3, boolean throwIncompleteSequenceException)
- constructs a sequence with three sub-expressions
Method Detail |
add
public void add(AbstractRegularExpression expr)
- add the given expression to the sequence
interpret
public boolean interpret(Context c) throws ParserException
- Description copied from class:
AbstractRegularExpression
- Parses this expression, possibly using Context to fetch the String to interpret
if this Expression is a leaf expression.
- Specified by:
interpret
in classAbstractRegularExpression
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null
, string concatenation will instead use"null"
.The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode())
.
|
|||||||||
Home >> All >> jpicedt >> graphic >> io >> [ parser overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |