Class ParserANTLR
java.lang.Object
de.mid.innovator.m2msdk.model.transformation.function.expressionparser.SyntaxBaseListener
de.mid.innovator.m2msdk.model.transformation.function.expressionparser.ParserANTLR
- All Implemented Interfaces:
ParserInterface,SyntaxListener,Serializable,org.antlr.v4.runtime.tree.ParseTreeListener
Expressions are parsed in left and right term and in the properties. The
client and server hold their own parsers. They are not synchronized but at
program start. Implementation with ANTLR.
- Version:
- 16.1.0
- Author:
- jmback
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEnter a parse tree produced bySyntaxParser.left_term().voidEnter a parse tree produced bySyntaxParser.prop_constant().voidEnter a parse tree produced bySyntaxParser.property_single().voidEnter a parse tree produced by thePropertySequencedlabeled alternative inSyntaxParser.property().voidEnter a parse tree produced bySyntaxParser.propertyType().voidEnter a parse tree produced bySyntaxParser.right_term().voidEnter a parse tree produced bySyntaxParser.terms().voidExit a parse tree produced bySyntaxParser.left_term().voidExit a parse tree produced bySyntaxParser.property_single().voidExit a parse tree produced by thePropertySequencedlabeled alternative inSyntaxParser.property().voidExit a parse tree produced bySyntaxParser.propertyType().voidExit a parse tree produced bySyntaxParser.right_term().voidExit a parse tree produced bySyntaxParser.terms().logicalExpression(Object left, Object logicalOperator, Object right) de.mid.innovator.m2msdk.model.transformation.function.expressionparser.ParseResultParse an expression with the known syntax.property_sequenced(Object s1, Object dot, Object s2) property_single(Object propertyType, Object LPAREN, Object RPAREN) property_single(Object propertyType, Object LPAREN, Object property_parameters, Object RPAREN) right_term(Object rightterm) Methods inherited from class de.mid.innovator.m2msdk.model.transformation.function.expressionparser.SyntaxBaseListener
enterEveryRule, enterLogicalExpression, enterLogicalOperator, enterNumber, enterProgram, enterProperty_parameter, enterProperty_parameters, enterPropertySingle, enterTerm, exitEveryRule, exitLogicalExpression, exitLogicalOperator, exitNumber, exitProgram, exitProp_constant, exitProperty_parameter, exitProperty_parameters, exitPropertySingle, exitTerm, visitErrorNode, visitTerminal
-
Constructor Details
-
ParserANTLR
public ParserANTLR()Default constructor. -
ParserANTLR
Constructor- Parameters:
iSession- session- Throws:
SevereException
-
-
Method Details
-
parse
public de.mid.innovator.m2msdk.model.transformation.function.expressionparser.ParseResult parse(String expression) throws M2MException Description copied from interface:ParserInterfaceParse an expression with the known syntax.- Specified by:
parsein interfaceParserInterface- Parameters:
expression- expression to parse- Returns:
- parse result including errors
- Throws:
M2MException
-
left_term
-
right_term
-
terms
-
property_single
-
property_single
-
logicalExpression
-
property_sequenced
-
enterProp_constant
Description copied from class:SyntaxBaseListenerEnter a parse tree produced bySyntaxParser.prop_constant().The default implementation does nothing.
- Specified by:
enterProp_constantin interfaceSyntaxListener- Overrides:
enterProp_constantin classSyntaxBaseListener- Parameters:
ctx- the parse tree
-
enterPropertyType
Description copied from class:SyntaxBaseListenerEnter a parse tree produced bySyntaxParser.propertyType().The default implementation does nothing.
- Specified by:
enterPropertyTypein interfaceSyntaxListener- Overrides:
enterPropertyTypein classSyntaxBaseListener- Parameters:
ctx- the parse tree
-
exitPropertyType
Description copied from class:SyntaxBaseListenerExit a parse tree produced bySyntaxParser.propertyType().The default implementation does nothing.
- Specified by:
exitPropertyTypein interfaceSyntaxListener- Overrides:
exitPropertyTypein classSyntaxBaseListener- Parameters:
ctx- the parse tree
-
enterTerms
Description copied from class:SyntaxBaseListenerEnter a parse tree produced bySyntaxParser.terms().The default implementation does nothing.
- Specified by:
enterTermsin interfaceSyntaxListener- Overrides:
enterTermsin classSyntaxBaseListener- Parameters:
ctx- the parse tree
-
exitTerms
Description copied from class:SyntaxBaseListenerExit a parse tree produced bySyntaxParser.terms().The default implementation does nothing.
- Specified by:
exitTermsin interfaceSyntaxListener- Overrides:
exitTermsin classSyntaxBaseListener- Parameters:
ctx- the parse tree
-
enterLeft_term
Description copied from class:SyntaxBaseListenerEnter a parse tree produced bySyntaxParser.left_term().The default implementation does nothing.
- Specified by:
enterLeft_termin interfaceSyntaxListener- Overrides:
enterLeft_termin classSyntaxBaseListener- Parameters:
ctx- the parse tree
-
exitLeft_term
Description copied from class:SyntaxBaseListenerExit a parse tree produced bySyntaxParser.left_term().The default implementation does nothing.
- Specified by:
exitLeft_termin interfaceSyntaxListener- Overrides:
exitLeft_termin classSyntaxBaseListener- Parameters:
ctx- the parse tree
-
enterRight_term
Description copied from class:SyntaxBaseListenerEnter a parse tree produced bySyntaxParser.right_term().The default implementation does nothing.
- Specified by:
enterRight_termin interfaceSyntaxListener- Overrides:
enterRight_termin classSyntaxBaseListener- Parameters:
ctx- the parse tree
-
exitRight_term
Description copied from class:SyntaxBaseListenerExit a parse tree produced bySyntaxParser.right_term().The default implementation does nothing.
- Specified by:
exitRight_termin interfaceSyntaxListener- Overrides:
exitRight_termin classSyntaxBaseListener- Parameters:
ctx- the parse tree
-
enterProperty_single
Description copied from class:SyntaxBaseListenerEnter a parse tree produced bySyntaxParser.property_single().The default implementation does nothing.
- Specified by:
enterProperty_singlein interfaceSyntaxListener- Overrides:
enterProperty_singlein classSyntaxBaseListener- Parameters:
ctx- the parse tree
-
exitProperty_single
Description copied from class:SyntaxBaseListenerExit a parse tree produced bySyntaxParser.property_single().The default implementation does nothing.
- Specified by:
exitProperty_singlein interfaceSyntaxListener- Overrides:
exitProperty_singlein classSyntaxBaseListener- Parameters:
ctx- the parse tree
-
enterPropertySequenced
Description copied from class:SyntaxBaseListenerEnter a parse tree produced by thePropertySequencedlabeled alternative inSyntaxParser.property().The default implementation does nothing.
- Specified by:
enterPropertySequencedin interfaceSyntaxListener- Overrides:
enterPropertySequencedin classSyntaxBaseListener- Parameters:
ctx- the parse tree
-
exitPropertySequenced
Description copied from class:SyntaxBaseListenerExit a parse tree produced by thePropertySequencedlabeled alternative inSyntaxParser.property().The default implementation does nothing.
- Specified by:
exitPropertySequencedin interfaceSyntaxListener- Overrides:
exitPropertySequencedin classSyntaxBaseListener- Parameters:
ctx- the parse tree
-