Class MultiLineMatcher
java.lang.Object
com.singularsys.jep.configurableparser.matchers.MultiLineMatcher
- All Implemented Interfaces:
TokenMatcher,Serializable
Matches tokens which span multiple lines of the input.
The tokenizer matches the input a line at a time and subclasses of this
can be used match tokens which span multiple lines.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMultiLineMatcher(TokenMatcher startMatcher, TokenMatcher endMatcher, TokenBuilder completeMatcher) -
Method Summary
-
Constructor Details
-
MultiLineMatcher
public MultiLineMatcher(TokenMatcher startMatcher, TokenMatcher endMatcher, TokenBuilder completeMatcher) - Parameters:
startMatcher- a matcher to match the start of the token.endMatcher- a matcher to match the end of the token.completeMatcher- a TokenBuilder which is used to produce the final token.
-
-
Method Details
-
match
Match the start of the token.- Specified by:
matchin interfaceTokenMatcher- Parameters:
s- the string to match against- Returns:
- a
MultiLineToken - Throws:
ParseException- on syntax error
-
init
Description copied from interface:TokenMatcherInitialize the matcher when the Jep instance is known.- Specified by:
initin interfaceTokenMatcher- Parameters:
j- Jep instance
-