public class EnclosingExpression 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 |
---|
EnclosingExpression(java.lang.String openingDelimiter,
AbstractRegularExpression child,
java.lang.String closingDelimiter) |
EnclosingExpression(java.lang.String openingDelimiter,
AbstractRegularExpression child,
java.lang.String closingDelimiter,
boolean noLineFeed) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEnclosedString() |
boolean |
interpret(Context context)
Call action() with value=enclosed string
|
void |
setChild(AbstractRegularExpression child)
Change the Expression that must be parsed inside the delimiters
to the given expression (can be null)
|
java.lang.String |
toString() |
action
public EnclosingExpression(java.lang.String openingDelimiter, AbstractRegularExpression child, java.lang.String closingDelimiter, boolean noLineFeed)
openingDelimiter
- the opening delimiterchild
- the Expression that must be parsed inside the delimiters (can be null)closingDelimiter
- the closing delimiternoLineFeed
- if true, closingDelimiter must be on the same line as openingDelimiter
A typical use would be : EnclosingExpression("{", new WildChar(ANY_CHAR),"}",false)public EnclosingExpression(java.lang.String openingDelimiter, AbstractRegularExpression child, java.lang.String closingDelimiter)
openingDelimiter
- the opening delimiterchild
- the Expression that must be parse inside the delimiter (can be null)closingDelimiter
- the closing delimiter
Linefeeds are allowed.public void setChild(AbstractRegularExpression child)
public boolean interpret(Context context) throws REParserException
interpret
in class AbstractRegularExpression
REParserException
- if an error occur during parsingpublic java.lang.String getEnclosedString()
public java.lang.String toString()
toString
in class java.lang.Object
Submit a bug : syd@jpicedt.org