Package com.walkfares.odsl.conversion
Class UnitGrammar
java.lang.Object
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor<T>
com.walkfares.odsl.conversion.grammar.UnitsBaseVisitor<Unit>
com.walkfares.odsl.conversion.UnitGrammar
- All Implemented Interfaces:
com.walkfares.odsl.conversion.grammar.UnitsVisitor<Unit>
,org.antlr.v4.runtime.tree.ParseTreeVisitor<Unit>
public class UnitGrammar extends com.walkfares.odsl.conversion.grammar.UnitsBaseVisitor<Unit>
-
Constructor Summary
Constructors Constructor Description UnitGrammar()
UnitGrammar(OpenDSLContext context)
-
Method Summary
Modifier and Type Method Description Unit
parse(String text)
UnitGrammar
setContext(OpenDSLContext context)
Unit
visitNumber(com.walkfares.odsl.conversion.grammar.UnitsParser.NumberContext ctx)
Visit a parse tree produced byUnitsParser.number()
.Unit
visitNumberValue(com.walkfares.odsl.conversion.grammar.UnitsParser.NumberValueContext ctx)
Visit a parse tree produced byUnitsParser.numberValue()
.Unit
visitUnit(com.walkfares.odsl.conversion.grammar.UnitsParser.UnitContext ctx)
Visit a parse tree produced byUnitsParser.unit()
.Methods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
visit, visitChildren, visitErrorNode, visitTerminal
-
Constructor Details
-
UnitGrammar
public UnitGrammar() -
UnitGrammar
-
-
Method Details
-
setContext
-
parse
-
visitNumber
Description copied from class:com.walkfares.odsl.conversion.grammar.UnitsBaseVisitor
Visit a parse tree produced byUnitsParser.number()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
. -
visitNumberValue
public Unit visitNumberValue(com.walkfares.odsl.conversion.grammar.UnitsParser.NumberValueContext ctx)Description copied from class:com.walkfares.odsl.conversion.grammar.UnitsBaseVisitor
Visit a parse tree produced byUnitsParser.numberValue()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
. -
visitUnit
Description copied from class:com.walkfares.odsl.conversion.grammar.UnitsBaseVisitor
Visit a parse tree produced byUnitsParser.unit()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.
-