Class TslParserImpl
java.lang.Object
com.aquima.interactions.expressions.tsl.TslParserImpl
TSL parser implementation class. This class can be used to parse strings to TslText objects.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionTslParserImpl
(IExprParser exprParser, IDefinitionSource definitions) Constructs the parser with an expression parser and an object that can provide the definitions for the objects used in the expressions. -
Method Summary
Modifier and TypeMethodDescriptionparse
(String id, String text, IParseListener listener) This method parses the TSL string provided into a TSL text object.static void
parseSuggestions
(String unitName, String text, ISuggestionListener listener) This methods parses the syntax of the expression and notifies the listener of possible other symbols.static IParseNode
parseText
(String id, String text, IParseListener listener)
-
Constructor Details
-
TslParserImpl
Constructs the parser with an expression parser and an object that can provide the definitions for the objects used in the expressions.- Parameters:
exprParser
- The expression parser that should be used to parse expression in the TSL.definitions
- Object containing the definition of the model.
-
-
Method Details
-
parse
This method parses the TSL string provided into a TSL text object.- Parameters:
id
- Optional unique ID for the text being parsed.text
- The text that should be parsed.listener
- Listener that should be notified of errors and warnings.- Returns:
- TslText object containing the parsed text.
- Throws:
ParseException
- This exception is thrown when the TSL could not be parsed.
-
parseText
-
parseSuggestions
This methods parses the syntax of the expression and notifies the listener of possible other symbols. The method is intended for use for syntax highlighting and auto completion. *- Parameters:
unitName
-text
-listener
-- Throws:
ParseException
-