antlr

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2019 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GruleParser

type GruleParser struct {
}

GruleParser will act as a lexer and parser for Grule antlr syntax. Right now this parser is empty parsing is only for test purpose in test go file.

type GruleParserListener

type GruleParserListener struct {
	parser.BasegruleListener
	PreviousNode []string

	KnowledgeBase *model.KnowledgeBase
	Stack         *stack.Stack
	StopParse     bool
	ErrorCallback func(e error)
}

GruleParserListener is an implementation of logic to build the execution flow or execution graph as it defined within the knowledge base.

func NewGruleParserListener

func NewGruleParserListener(kbase *model.KnowledgeBase, errCallback func(e error)) *GruleParserListener

NewGruleParserListener create a new instancce of GruleParserListener. This listener will walk in the Grule GRL file and invoke operations based on the context within the knowledge base.

func (*GruleParserListener) EnterAssignExpression

func (s *GruleParserListener) EnterAssignExpression(ctx *parser.AssignExpressionContext)

EnterAssignExpression is called when production assignExpression is entered.

func (*GruleParserListener) EnterAssignExpressions

func (s *GruleParserListener) EnterAssignExpressions(ctx *parser.AssignExpressionsContext)

EnterAssignExpressions is called when production assignExpressions is entered.

func (*GruleParserListener) EnterAssignment

func (s *GruleParserListener) EnterAssignment(ctx *parser.AssignmentContext)

EnterAssignment is called when production assignment is entered.

func (*GruleParserListener) EnterBooleanLiteral

func (s *GruleParserListener) EnterBooleanLiteral(ctx *parser.BooleanLiteralContext)

EnterBooleanLiteral is called when production booleanLiteral is entered.

func (*GruleParserListener) EnterComparisonOperator

func (s *GruleParserListener) EnterComparisonOperator(ctx *parser.ComparisonOperatorContext)

EnterComparisonOperator is called when production comparisonOperator is entered.

func (*GruleParserListener) EnterConstant

func (s *GruleParserListener) EnterConstant(ctx *parser.ConstantContext)

EnterConstant is called when production constant is entered.

func (*GruleParserListener) EnterDecimalLiteral

func (s *GruleParserListener) EnterDecimalLiteral(ctx *parser.DecimalLiteralContext)

EnterDecimalLiteral is called when production decimalLiteral is entered.

func (*GruleParserListener) EnterEveryRule

func (s *GruleParserListener) EnterEveryRule(ctx antlr.ParserRuleContext)

EnterEveryRule is called when any engine is entered.

func (*GruleParserListener) EnterExpression

func (s *GruleParserListener) EnterExpression(ctx *parser.ExpressionContext)

EnterExpression is called when production expression is entered.

func (*GruleParserListener) EnterExpressionAtom

func (s *GruleParserListener) EnterExpressionAtom(ctx *parser.ExpressionAtomContext)

EnterExpressionAtom is called when production expressionAtom is entered.

func (*GruleParserListener) EnterFunctionArgs

func (s *GruleParserListener) EnterFunctionArgs(ctx *parser.FunctionArgsContext)

EnterFunctionArgs is called when production functionArgs is entered.

func (*GruleParserListener) EnterFunctionCall

func (s *GruleParserListener) EnterFunctionCall(ctx *parser.FunctionCallContext)

EnterFunctionCall is called when production functionCall is entered.

func (*GruleParserListener) EnterLogicalOperator

func (s *GruleParserListener) EnterLogicalOperator(ctx *parser.LogicalOperatorContext)

EnterLogicalOperator is called when production logicalOperator is entered.

func (*GruleParserListener) EnterMathOperator

func (s *GruleParserListener) EnterMathOperator(ctx *parser.MathOperatorContext)

EnterMathOperator is called when production mathOperator is entered.

func (*GruleParserListener) EnterMethodCall

func (s *GruleParserListener) EnterMethodCall(ctx *parser.MethodCallContext)

EnterMethodCall is called when production methodCall is entered.

func (*GruleParserListener) EnterPredicate

func (s *GruleParserListener) EnterPredicate(ctx *parser.PredicateContext)

EnterPredicate is called when production predicate is entered.

func (*GruleParserListener) EnterRealLiteral

func (s *GruleParserListener) EnterRealLiteral(ctx *parser.RealLiteralContext)

EnterRealLiteral is called when production realLiteral is entered.

func (*GruleParserListener) EnterRoot

func (s *GruleParserListener) EnterRoot(ctx *parser.RootContext)

EnterRoot is called when production root is entered.

func (*GruleParserListener) EnterRuleDescription

func (s *GruleParserListener) EnterRuleDescription(ctx *parser.RuleDescriptionContext)

EnterRuleDescription is called when production ruleDescription is entered.

func (*GruleParserListener) EnterRuleEntry

func (s *GruleParserListener) EnterRuleEntry(ctx *parser.RuleEntryContext)

EnterRuleEntry is called when production ruleEntry is entered.

func (*GruleParserListener) EnterRuleName

func (s *GruleParserListener) EnterRuleName(ctx *parser.RuleNameContext)

EnterRuleName is called when production ruleName is entered.

func (*GruleParserListener) EnterSalience

func (s *GruleParserListener) EnterSalience(ctx *parser.SalienceContext)

EnterSalience is called when production salience is entered.

func (*GruleParserListener) EnterStringLiteral

func (s *GruleParserListener) EnterStringLiteral(ctx *parser.StringLiteralContext)

EnterStringLiteral is called when production stringLiteral is entered.

func (*GruleParserListener) EnterThenScope

func (s *GruleParserListener) EnterThenScope(ctx *parser.ThenScopeContext)

EnterThenScope is called when production thenScope is entered.

func (*GruleParserListener) EnterVariable

func (s *GruleParserListener) EnterVariable(ctx *parser.VariableContext)

EnterVariable is called when production variable is entered.

func (*GruleParserListener) EnterWhenScope

func (s *GruleParserListener) EnterWhenScope(ctx *parser.WhenScopeContext)

EnterWhenScope is called when production whenScope is entered.

func (*GruleParserListener) ExitAssignExpression

func (s *GruleParserListener) ExitAssignExpression(ctx *parser.AssignExpressionContext)

ExitAssignExpression is called when production assignExpression is exited.

func (*GruleParserListener) ExitAssignExpressions

func (s *GruleParserListener) ExitAssignExpressions(ctx *parser.AssignExpressionsContext)

ExitAssignExpressions is called when production assignExpressions is exited.

func (*GruleParserListener) ExitAssignment

func (s *GruleParserListener) ExitAssignment(ctx *parser.AssignmentContext)

ExitAssignment is called when production assignment is exited.

func (*GruleParserListener) ExitBooleanLiteral

func (s *GruleParserListener) ExitBooleanLiteral(ctx *parser.BooleanLiteralContext)

ExitBooleanLiteral is called when production booleanLiteral is exited.

func (*GruleParserListener) ExitComparisonOperator

func (s *GruleParserListener) ExitComparisonOperator(ctx *parser.ComparisonOperatorContext)

ExitComparisonOperator is called when production comparisonOperator is exited.

func (*GruleParserListener) ExitConstant

func (s *GruleParserListener) ExitConstant(ctx *parser.ConstantContext)

ExitConstant is called when production constant is exited.

func (*GruleParserListener) ExitDecimalLiteral

func (s *GruleParserListener) ExitDecimalLiteral(ctx *parser.DecimalLiteralContext)

ExitDecimalLiteral is called when production decimalLiteral is exited.

func (*GruleParserListener) ExitEveryRule

func (s *GruleParserListener) ExitEveryRule(ctx antlr.ParserRuleContext)

ExitEveryRule is called when any engine is exited.

func (*GruleParserListener) ExitExpression

func (s *GruleParserListener) ExitExpression(ctx *parser.ExpressionContext)

ExitExpression is called when production expression is exited.

func (*GruleParserListener) ExitExpressionAtom

func (s *GruleParserListener) ExitExpressionAtom(ctx *parser.ExpressionAtomContext)

ExitExpressionAtom is called when production expressionAtom is exited.

func (*GruleParserListener) ExitFunctionArgs

func (s *GruleParserListener) ExitFunctionArgs(ctx *parser.FunctionArgsContext)

ExitFunctionArgs is called when production functionArgs is exited.

func (*GruleParserListener) ExitFunctionCall

func (s *GruleParserListener) ExitFunctionCall(ctx *parser.FunctionCallContext)

ExitFunctionCall is called when production functionCall is exited.

func (*GruleParserListener) ExitLogicalOperator

func (s *GruleParserListener) ExitLogicalOperator(ctx *parser.LogicalOperatorContext)

ExitLogicalOperator is called when production logicalOperator is exited.

func (*GruleParserListener) ExitMathOperator

func (s *GruleParserListener) ExitMathOperator(ctx *parser.MathOperatorContext)

ExitMathOperator is called when production mathOperator is exited.

func (*GruleParserListener) ExitMethodCall

func (s *GruleParserListener) ExitMethodCall(ctx *parser.MethodCallContext)

ExitMethodCall is called when production methodCall is exited.

func (*GruleParserListener) ExitPredicate

func (s *GruleParserListener) ExitPredicate(ctx *parser.PredicateContext)

ExitPredicate is called when production predicate is exited.

func (*GruleParserListener) ExitRealLiteral

func (s *GruleParserListener) ExitRealLiteral(ctx *parser.RealLiteralContext)

ExitRealLiteral is called when production realLiteral is exited.

func (*GruleParserListener) ExitRoot

func (s *GruleParserListener) ExitRoot(ctx *parser.RootContext)

ExitRoot is called when production root is exited.

func (*GruleParserListener) ExitRuleDescription

func (s *GruleParserListener) ExitRuleDescription(ctx *parser.RuleDescriptionContext)

ExitRuleDescription is called when production ruleDescription is exited.

func (*GruleParserListener) ExitRuleEntry

func (s *GruleParserListener) ExitRuleEntry(ctx *parser.RuleEntryContext)

ExitRuleEntry is called when production ruleEntry is exited.

func (*GruleParserListener) ExitRuleName

func (s *GruleParserListener) ExitRuleName(ctx *parser.RuleNameContext)

ExitRuleName is called when production ruleName is exited.

func (*GruleParserListener) ExitSalience

func (s *GruleParserListener) ExitSalience(ctx *parser.SalienceContext)

ExitSalience is called when production salience is exited.

func (*GruleParserListener) ExitStringLiteral

func (s *GruleParserListener) ExitStringLiteral(ctx *parser.StringLiteralContext)

ExitStringLiteral is called when production stringLiteral is exited.

func (*GruleParserListener) ExitThenScope

func (s *GruleParserListener) ExitThenScope(ctx *parser.ThenScopeContext)

ExitThenScope is called when production thenScope is exited.

func (*GruleParserListener) ExitVariable

func (s *GruleParserListener) ExitVariable(ctx *parser.VariableContext)

ExitVariable is called when production variable is exited.

func (*GruleParserListener) ExitWhenScope

func (s *GruleParserListener) ExitWhenScope(ctx *parser.WhenScopeContext)

ExitWhenScope is called when production whenScope is exited.

func (*GruleParserListener) VisitErrorNode

func (s *GruleParserListener) VisitErrorNode(node antlr.ErrorNode)

VisitErrorNode is called when an error node is visited.

func (*GruleParserListener) VisitTerminal

func (s *GruleParserListener) VisitTerminal(node antlr.TerminalNode)

VisitTerminal is called when a terminal node is visited.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL