public class SequenceExpression extends AbstractRegularExpression
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
add(AbstractRegularExpression expr)
add the given expression to the sequence
|
boolean |
interpret(Context c)
Parses this expression, possibly using the given Context to fetch the String to interpret
if this Expression is a leaf expression.
|
java.lang.String |
toString() |
action
public SequenceExpression()
public SequenceExpression(boolean throwIncompleteSequenceException)
throwIncompleteSequenceException
- if TRUE, and if the first sub-expression has been found but
any ensuing expression hasn't been found, throw a REParserException.IncompleteSequenceException.public SequenceExpression(AbstractRegularExpression expr)
public SequenceExpression(AbstractRegularExpression expr, boolean throwIncompleteSequenceException)
throwIncompleteSequenceException
- if TRUE, and if the first sub-expression has been found but
any ensuing sub-expression hasn't been found, throw a REParserException.IncompleteSequenceException.public SequenceExpression(AbstractRegularExpression expr1, AbstractRegularExpression expr2)
public SequenceExpression(AbstractRegularExpression expr1, AbstractRegularExpression expr2, boolean throwIncompleteSequenceException)
throwIncompleteSequenceException
- if TRUE, and if the first sub-expression has been found but
any ensuing sub-expression hasn't been found, throw a REParserException.IncompleteSequenceException.public SequenceExpression(AbstractRegularExpression expr1, AbstractRegularExpression expr2, AbstractRegularExpression expr3, boolean throwIncompleteSequenceException)
throwIncompleteSequenceException
- if TRUE, and if the first sub-expression has been found but
any ensuing sub-expression hasn't been found, throw a REParserException.IncompleteSequenceException.public void add(AbstractRegularExpression expr)
public boolean interpret(Context c) throws REParserException
AbstractRegularExpression
interpret
in class AbstractRegularExpression
REParserException.IncompleteSequence
- if flag throwIncompleteSequenceException is TRUE
and any expression but the first one wasn't found
Whether TRUE or FALSE, calls action with key="&" and value=new Integer(index of last expression parsed with success)REParserException
- if an error occur during parsingpublic java.lang.String toString()
toString
in class java.lang.Object
Submit a bug : syd@jpicedt.org