Documentation ¶
Overview ¶
Example ¶
package main import ( "bramp.net/antlr4/suokif" "fmt" "github.com/antlr/antlr4/runtime/Go/antlr" ) type exampleListener struct { *suokif.BaseSUOKIFListener } func (l *exampleListener) EnterEveryRule(ctx antlr.ParserRuleContext) { fmt.Println(ctx.GetText()) } func main() { // Setup the input is := antlr.NewInputStream("...some text to parse...") // Create the Lexer lexer := suokif.NewSUOKIFLexer(is) stream := antlr.NewCommonTokenStream(lexer, antlr.TokenDefaultChannel) // Create the Parser p := suokif.NewSUOKIFParser(stream) p.BuildParseTrees = true p.AddErrorListener(antlr.NewDiagnosticErrorListener(true)) // Finally walk the tree tree := p.Top_level() antlr.ParseTreeWalkerDefault.Walk(&exampleListener{}, tree) }
Output:
Index ¶
- Constants
- type ArgumentContext
- func (s *ArgumentContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *ArgumentContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *ArgumentContext) GetParser() antlr.Parser
- func (s *ArgumentContext) GetRuleContext() antlr.RuleContext
- func (*ArgumentContext) IsArgumentContext()
- func (s *ArgumentContext) Sentence() ISentenceContext
- func (s *ArgumentContext) Term() ITermContext
- func (s *ArgumentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type BaseSUOKIFListener
- func (s *BaseSUOKIFListener) EnterArgument(ctx *ArgumentContext)
- func (s *BaseSUOKIFListener) EnterEquation(ctx *EquationContext)
- func (s *BaseSUOKIFListener) EnterEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseSUOKIFListener) EnterFunterm(ctx *FuntermContext)
- func (s *BaseSUOKIFListener) EnterLogsent(ctx *LogsentContext)
- func (s *BaseSUOKIFListener) EnterQuantsent(ctx *QuantsentContext)
- func (s *BaseSUOKIFListener) EnterRelsent(ctx *RelsentContext)
- func (s *BaseSUOKIFListener) EnterSentence(ctx *SentenceContext)
- func (s *BaseSUOKIFListener) EnterTerm(ctx *TermContext)
- func (s *BaseSUOKIFListener) EnterTop_level(ctx *Top_levelContext)
- func (s *BaseSUOKIFListener) ExitArgument(ctx *ArgumentContext)
- func (s *BaseSUOKIFListener) ExitEquation(ctx *EquationContext)
- func (s *BaseSUOKIFListener) ExitEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseSUOKIFListener) ExitFunterm(ctx *FuntermContext)
- func (s *BaseSUOKIFListener) ExitLogsent(ctx *LogsentContext)
- func (s *BaseSUOKIFListener) ExitQuantsent(ctx *QuantsentContext)
- func (s *BaseSUOKIFListener) ExitRelsent(ctx *RelsentContext)
- func (s *BaseSUOKIFListener) ExitSentence(ctx *SentenceContext)
- func (s *BaseSUOKIFListener) ExitTerm(ctx *TermContext)
- func (s *BaseSUOKIFListener) ExitTop_level(ctx *Top_levelContext)
- func (s *BaseSUOKIFListener) VisitErrorNode(node antlr.ErrorNode)
- func (s *BaseSUOKIFListener) VisitTerminal(node antlr.TerminalNode)
- type EquationContext
- func (s *EquationContext) ASSIGN() antlr.TerminalNode
- func (s *EquationContext) AllTerm() []ITermContext
- func (s *EquationContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *EquationContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *EquationContext) GetParser() antlr.Parser
- func (s *EquationContext) GetRuleContext() antlr.RuleContext
- func (*EquationContext) IsEquationContext()
- func (s *EquationContext) LPAREN() antlr.TerminalNode
- func (s *EquationContext) RPAREN() antlr.TerminalNode
- func (s *EquationContext) Term(i int) ITermContext
- func (s *EquationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type FuntermContext
- func (s *FuntermContext) AllArgument() []IArgumentContext
- func (s *FuntermContext) Argument(i int) IArgumentContext
- func (s *FuntermContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *FuntermContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *FuntermContext) GetParser() antlr.Parser
- func (s *FuntermContext) GetRuleContext() antlr.RuleContext
- func (*FuntermContext) IsFuntermContext()
- func (s *FuntermContext) LPAREN() antlr.TerminalNode
- func (s *FuntermContext) RPAREN() antlr.TerminalNode
- func (s *FuntermContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *FuntermContext) WORD() antlr.TerminalNode
- type IArgumentContext
- type IEquationContext
- type IFuntermContext
- type ILogsentContext
- type IQuantsentContext
- type IRelsentContext
- type ISentenceContext
- type ITermContext
- type ITop_levelContext
- type LogsentContext
- func (s *LogsentContext) AND() antlr.TerminalNode
- func (s *LogsentContext) ASSIGN() antlr.TerminalNode
- func (s *LogsentContext) AllSentence() []ISentenceContext
- func (s *LogsentContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *LogsentContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *LogsentContext) GT() antlr.TerminalNode
- func (s *LogsentContext) GetParser() antlr.Parser
- func (s *LogsentContext) GetRuleContext() antlr.RuleContext
- func (*LogsentContext) IsLogsentContext()
- func (s *LogsentContext) LPAREN() antlr.TerminalNode
- func (s *LogsentContext) LT() antlr.TerminalNode
- func (s *LogsentContext) NOT() antlr.TerminalNode
- func (s *LogsentContext) OR() antlr.TerminalNode
- func (s *LogsentContext) RPAREN() antlr.TerminalNode
- func (s *LogsentContext) Sentence(i int) ISentenceContext
- func (s *LogsentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type QuantsentContext
- func (s *QuantsentContext) AllLPAREN() []antlr.TerminalNode
- func (s *QuantsentContext) AllRPAREN() []antlr.TerminalNode
- func (s *QuantsentContext) AllVARIABLE() []antlr.TerminalNode
- func (s *QuantsentContext) EXISTS() antlr.TerminalNode
- func (s *QuantsentContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *QuantsentContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *QuantsentContext) FORALL() antlr.TerminalNode
- func (s *QuantsentContext) GetParser() antlr.Parser
- func (s *QuantsentContext) GetRuleContext() antlr.RuleContext
- func (*QuantsentContext) IsQuantsentContext()
- func (s *QuantsentContext) LPAREN(i int) antlr.TerminalNode
- func (s *QuantsentContext) RPAREN(i int) antlr.TerminalNode
- func (s *QuantsentContext) Sentence() ISentenceContext
- func (s *QuantsentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *QuantsentContext) VARIABLE(i int) antlr.TerminalNode
- type RelsentContext
- func (s *RelsentContext) AllArgument() []IArgumentContext
- func (s *RelsentContext) Argument(i int) IArgumentContext
- func (s *RelsentContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *RelsentContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *RelsentContext) GetParser() antlr.Parser
- func (s *RelsentContext) GetRuleContext() antlr.RuleContext
- func (*RelsentContext) IsRelsentContext()
- func (s *RelsentContext) LPAREN() antlr.TerminalNode
- func (s *RelsentContext) RPAREN() antlr.TerminalNode
- func (s *RelsentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *RelsentContext) VARIABLE() antlr.TerminalNode
- func (s *RelsentContext) WORD() antlr.TerminalNode
- type SUOKIFLexer
- type SUOKIFListener
- type SUOKIFParser
- func (p *SUOKIFParser) Argument() (localctx IArgumentContext)
- func (p *SUOKIFParser) Equation() (localctx IEquationContext)
- func (p *SUOKIFParser) Funterm() (localctx IFuntermContext)
- func (p *SUOKIFParser) Logsent() (localctx ILogsentContext)
- func (p *SUOKIFParser) Quantsent() (localctx IQuantsentContext)
- func (p *SUOKIFParser) Relsent() (localctx IRelsentContext)
- func (p *SUOKIFParser) Sentence() (localctx ISentenceContext)
- func (p *SUOKIFParser) Term() (localctx ITermContext)
- func (p *SUOKIFParser) Top_level() (localctx ITop_levelContext)
- type SentenceContext
- func (s *SentenceContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *SentenceContext) Equation() IEquationContext
- func (s *SentenceContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *SentenceContext) GetParser() antlr.Parser
- func (s *SentenceContext) GetRuleContext() antlr.RuleContext
- func (*SentenceContext) IsSentenceContext()
- func (s *SentenceContext) Logsent() ILogsentContext
- func (s *SentenceContext) Quantsent() IQuantsentContext
- func (s *SentenceContext) Relsent() IRelsentContext
- func (s *SentenceContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *SentenceContext) VARIABLE() antlr.TerminalNode
- func (s *SentenceContext) WORD() antlr.TerminalNode
- type TermContext
- func (s *TermContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *TermContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *TermContext) Funterm() IFuntermContext
- func (s *TermContext) GetParser() antlr.Parser
- func (s *TermContext) GetRuleContext() antlr.RuleContext
- func (*TermContext) IsTermContext()
- func (s *TermContext) NUMBER() antlr.TerminalNode
- func (s *TermContext) STRING() antlr.TerminalNode
- func (s *TermContext) Sentence() ISentenceContext
- func (s *TermContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *TermContext) VARIABLE() antlr.TerminalNode
- func (s *TermContext) WORD() antlr.TerminalNode
- type Top_levelContext
- func (s *Top_levelContext) AllSentence() []ISentenceContext
- func (s *Top_levelContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *Top_levelContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *Top_levelContext) GetParser() antlr.Parser
- func (s *Top_levelContext) GetRuleContext() antlr.RuleContext
- func (*Top_levelContext) IsTop_levelContext()
- func (s *Top_levelContext) Sentence(i int) ISentenceContext
- func (s *Top_levelContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
Examples ¶
Constants ¶
const ( SUOKIFLexerNOT = 1 SUOKIFLexerAND = 2 SUOKIFLexerOR = 3 SUOKIFLexerFORALL = 4 SUOKIFLexerEXISTS = 5 SUOKIFLexerWORD = 6 SUOKIFLexerSTRING = 7 SUOKIFLexerVARIABLE = 8 SUOKIFLexerNUMBER = 9 SUOKIFLexerWHITE = 10 SUOKIFLexerCOMMENT = 11 SUOKIFLexerLPAREN = 12 SUOKIFLexerRPAREN = 13 SUOKIFLexerASSIGN = 14 SUOKIFLexerGT = 15 SUOKIFLexerLT = 16 SUOKIFLexerQUESTION = 17 )
SUOKIFLexer tokens.
const ( SUOKIFParserEOF = antlr.TokenEOF SUOKIFParserNOT = 1 SUOKIFParserAND = 2 SUOKIFParserOR = 3 SUOKIFParserFORALL = 4 SUOKIFParserEXISTS = 5 SUOKIFParserWORD = 6 SUOKIFParserSTRING = 7 SUOKIFParserVARIABLE = 8 SUOKIFParserNUMBER = 9 SUOKIFParserWHITE = 10 SUOKIFParserCOMMENT = 11 SUOKIFParserLPAREN = 12 SUOKIFParserRPAREN = 13 SUOKIFParserASSIGN = 14 SUOKIFParserGT = 15 SUOKIFParserLT = 16 SUOKIFParserQUESTION = 17 )
SUOKIFParser tokens.
const ( SUOKIFParserRULE_top_level = 0 SUOKIFParserRULE_term = 1 SUOKIFParserRULE_argument = 2 SUOKIFParserRULE_funterm = 3 SUOKIFParserRULE_sentence = 4 SUOKIFParserRULE_equation = 5 SUOKIFParserRULE_relsent = 6 SUOKIFParserRULE_logsent = 7 SUOKIFParserRULE_quantsent = 8 )
SUOKIFParser rules.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgumentContext ¶
type ArgumentContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewArgumentContext ¶
func NewArgumentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArgumentContext
func NewEmptyArgumentContext ¶
func NewEmptyArgumentContext() *ArgumentContext
func (*ArgumentContext) EnterRule ¶
func (s *ArgumentContext) EnterRule(listener antlr.ParseTreeListener)
func (*ArgumentContext) ExitRule ¶
func (s *ArgumentContext) ExitRule(listener antlr.ParseTreeListener)
func (*ArgumentContext) GetParser ¶
func (s *ArgumentContext) GetParser() antlr.Parser
func (*ArgumentContext) GetRuleContext ¶
func (s *ArgumentContext) GetRuleContext() antlr.RuleContext
func (*ArgumentContext) IsArgumentContext ¶
func (*ArgumentContext) IsArgumentContext()
func (*ArgumentContext) Sentence ¶
func (s *ArgumentContext) Sentence() ISentenceContext
func (*ArgumentContext) Term ¶
func (s *ArgumentContext) Term() ITermContext
func (*ArgumentContext) ToStringTree ¶
func (s *ArgumentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type BaseSUOKIFListener ¶
type BaseSUOKIFListener struct{}
BaseSUOKIFListener is a complete listener for a parse tree produced by SUOKIFParser.
func (*BaseSUOKIFListener) EnterArgument ¶
func (s *BaseSUOKIFListener) EnterArgument(ctx *ArgumentContext)
EnterArgument is called when production argument is entered.
func (*BaseSUOKIFListener) EnterEquation ¶
func (s *BaseSUOKIFListener) EnterEquation(ctx *EquationContext)
EnterEquation is called when production equation is entered.
func (*BaseSUOKIFListener) EnterEveryRule ¶
func (s *BaseSUOKIFListener) EnterEveryRule(ctx antlr.ParserRuleContext)
EnterEveryRule is called when any rule is entered.
func (*BaseSUOKIFListener) EnterFunterm ¶
func (s *BaseSUOKIFListener) EnterFunterm(ctx *FuntermContext)
EnterFunterm is called when production funterm is entered.
func (*BaseSUOKIFListener) EnterLogsent ¶
func (s *BaseSUOKIFListener) EnterLogsent(ctx *LogsentContext)
EnterLogsent is called when production logsent is entered.
func (*BaseSUOKIFListener) EnterQuantsent ¶
func (s *BaseSUOKIFListener) EnterQuantsent(ctx *QuantsentContext)
EnterQuantsent is called when production quantsent is entered.
func (*BaseSUOKIFListener) EnterRelsent ¶
func (s *BaseSUOKIFListener) EnterRelsent(ctx *RelsentContext)
EnterRelsent is called when production relsent is entered.
func (*BaseSUOKIFListener) EnterSentence ¶
func (s *BaseSUOKIFListener) EnterSentence(ctx *SentenceContext)
EnterSentence is called when production sentence is entered.
func (*BaseSUOKIFListener) EnterTerm ¶
func (s *BaseSUOKIFListener) EnterTerm(ctx *TermContext)
EnterTerm is called when production term is entered.
func (*BaseSUOKIFListener) EnterTop_level ¶
func (s *BaseSUOKIFListener) EnterTop_level(ctx *Top_levelContext)
EnterTop_level is called when production top_level is entered.
func (*BaseSUOKIFListener) ExitArgument ¶
func (s *BaseSUOKIFListener) ExitArgument(ctx *ArgumentContext)
ExitArgument is called when production argument is exited.
func (*BaseSUOKIFListener) ExitEquation ¶
func (s *BaseSUOKIFListener) ExitEquation(ctx *EquationContext)
ExitEquation is called when production equation is exited.
func (*BaseSUOKIFListener) ExitEveryRule ¶
func (s *BaseSUOKIFListener) ExitEveryRule(ctx antlr.ParserRuleContext)
ExitEveryRule is called when any rule is exited.
func (*BaseSUOKIFListener) ExitFunterm ¶
func (s *BaseSUOKIFListener) ExitFunterm(ctx *FuntermContext)
ExitFunterm is called when production funterm is exited.
func (*BaseSUOKIFListener) ExitLogsent ¶
func (s *BaseSUOKIFListener) ExitLogsent(ctx *LogsentContext)
ExitLogsent is called when production logsent is exited.
func (*BaseSUOKIFListener) ExitQuantsent ¶
func (s *BaseSUOKIFListener) ExitQuantsent(ctx *QuantsentContext)
ExitQuantsent is called when production quantsent is exited.
func (*BaseSUOKIFListener) ExitRelsent ¶
func (s *BaseSUOKIFListener) ExitRelsent(ctx *RelsentContext)
ExitRelsent is called when production relsent is exited.
func (*BaseSUOKIFListener) ExitSentence ¶
func (s *BaseSUOKIFListener) ExitSentence(ctx *SentenceContext)
ExitSentence is called when production sentence is exited.
func (*BaseSUOKIFListener) ExitTerm ¶
func (s *BaseSUOKIFListener) ExitTerm(ctx *TermContext)
ExitTerm is called when production term is exited.
func (*BaseSUOKIFListener) ExitTop_level ¶
func (s *BaseSUOKIFListener) ExitTop_level(ctx *Top_levelContext)
ExitTop_level is called when production top_level is exited.
func (*BaseSUOKIFListener) VisitErrorNode ¶
func (s *BaseSUOKIFListener) VisitErrorNode(node antlr.ErrorNode)
VisitErrorNode is called when an error node is visited.
func (*BaseSUOKIFListener) VisitTerminal ¶
func (s *BaseSUOKIFListener) VisitTerminal(node antlr.TerminalNode)
VisitTerminal is called when a terminal node is visited.
type EquationContext ¶
type EquationContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyEquationContext ¶
func NewEmptyEquationContext() *EquationContext
func NewEquationContext ¶
func NewEquationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *EquationContext
func (*EquationContext) ASSIGN ¶
func (s *EquationContext) ASSIGN() antlr.TerminalNode
func (*EquationContext) AllTerm ¶
func (s *EquationContext) AllTerm() []ITermContext
func (*EquationContext) EnterRule ¶
func (s *EquationContext) EnterRule(listener antlr.ParseTreeListener)
func (*EquationContext) ExitRule ¶
func (s *EquationContext) ExitRule(listener antlr.ParseTreeListener)
func (*EquationContext) GetParser ¶
func (s *EquationContext) GetParser() antlr.Parser
func (*EquationContext) GetRuleContext ¶
func (s *EquationContext) GetRuleContext() antlr.RuleContext
func (*EquationContext) IsEquationContext ¶
func (*EquationContext) IsEquationContext()
func (*EquationContext) LPAREN ¶
func (s *EquationContext) LPAREN() antlr.TerminalNode
func (*EquationContext) RPAREN ¶
func (s *EquationContext) RPAREN() antlr.TerminalNode
func (*EquationContext) Term ¶
func (s *EquationContext) Term(i int) ITermContext
func (*EquationContext) ToStringTree ¶
func (s *EquationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type FuntermContext ¶
type FuntermContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyFuntermContext ¶
func NewEmptyFuntermContext() *FuntermContext
func NewFuntermContext ¶
func NewFuntermContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FuntermContext
func (*FuntermContext) AllArgument ¶
func (s *FuntermContext) AllArgument() []IArgumentContext
func (*FuntermContext) Argument ¶
func (s *FuntermContext) Argument(i int) IArgumentContext
func (*FuntermContext) EnterRule ¶
func (s *FuntermContext) EnterRule(listener antlr.ParseTreeListener)
func (*FuntermContext) ExitRule ¶
func (s *FuntermContext) ExitRule(listener antlr.ParseTreeListener)
func (*FuntermContext) GetParser ¶
func (s *FuntermContext) GetParser() antlr.Parser
func (*FuntermContext) GetRuleContext ¶
func (s *FuntermContext) GetRuleContext() antlr.RuleContext
func (*FuntermContext) IsFuntermContext ¶
func (*FuntermContext) IsFuntermContext()
func (*FuntermContext) LPAREN ¶
func (s *FuntermContext) LPAREN() antlr.TerminalNode
func (*FuntermContext) RPAREN ¶
func (s *FuntermContext) RPAREN() antlr.TerminalNode
func (*FuntermContext) ToStringTree ¶
func (s *FuntermContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*FuntermContext) WORD ¶
func (s *FuntermContext) WORD() antlr.TerminalNode
type IArgumentContext ¶
type IArgumentContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsArgumentContext differentiates from other interfaces. IsArgumentContext() }
IArgumentContext is an interface to support dynamic dispatch.
type IEquationContext ¶
type IEquationContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsEquationContext differentiates from other interfaces. IsEquationContext() }
IEquationContext is an interface to support dynamic dispatch.
type IFuntermContext ¶
type IFuntermContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsFuntermContext differentiates from other interfaces. IsFuntermContext() }
IFuntermContext is an interface to support dynamic dispatch.
type ILogsentContext ¶
type ILogsentContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsLogsentContext differentiates from other interfaces. IsLogsentContext() }
ILogsentContext is an interface to support dynamic dispatch.
type IQuantsentContext ¶
type IQuantsentContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsQuantsentContext differentiates from other interfaces. IsQuantsentContext() }
IQuantsentContext is an interface to support dynamic dispatch.
type IRelsentContext ¶
type IRelsentContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsRelsentContext differentiates from other interfaces. IsRelsentContext() }
IRelsentContext is an interface to support dynamic dispatch.
type ISentenceContext ¶
type ISentenceContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsSentenceContext differentiates from other interfaces. IsSentenceContext() }
ISentenceContext is an interface to support dynamic dispatch.
type ITermContext ¶
type ITermContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsTermContext differentiates from other interfaces. IsTermContext() }
ITermContext is an interface to support dynamic dispatch.
type ITop_levelContext ¶
type ITop_levelContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsTop_levelContext differentiates from other interfaces. IsTop_levelContext() }
ITop_levelContext is an interface to support dynamic dispatch.
type LogsentContext ¶
type LogsentContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyLogsentContext ¶
func NewEmptyLogsentContext() *LogsentContext
func NewLogsentContext ¶
func NewLogsentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LogsentContext
func (*LogsentContext) AND ¶
func (s *LogsentContext) AND() antlr.TerminalNode
func (*LogsentContext) ASSIGN ¶
func (s *LogsentContext) ASSIGN() antlr.TerminalNode
func (*LogsentContext) AllSentence ¶
func (s *LogsentContext) AllSentence() []ISentenceContext
func (*LogsentContext) EnterRule ¶
func (s *LogsentContext) EnterRule(listener antlr.ParseTreeListener)
func (*LogsentContext) ExitRule ¶
func (s *LogsentContext) ExitRule(listener antlr.ParseTreeListener)
func (*LogsentContext) GT ¶
func (s *LogsentContext) GT() antlr.TerminalNode
func (*LogsentContext) GetParser ¶
func (s *LogsentContext) GetParser() antlr.Parser
func (*LogsentContext) GetRuleContext ¶
func (s *LogsentContext) GetRuleContext() antlr.RuleContext
func (*LogsentContext) IsLogsentContext ¶
func (*LogsentContext) IsLogsentContext()
func (*LogsentContext) LPAREN ¶
func (s *LogsentContext) LPAREN() antlr.TerminalNode
func (*LogsentContext) LT ¶
func (s *LogsentContext) LT() antlr.TerminalNode
func (*LogsentContext) NOT ¶
func (s *LogsentContext) NOT() antlr.TerminalNode
func (*LogsentContext) OR ¶
func (s *LogsentContext) OR() antlr.TerminalNode
func (*LogsentContext) RPAREN ¶
func (s *LogsentContext) RPAREN() antlr.TerminalNode
func (*LogsentContext) Sentence ¶
func (s *LogsentContext) Sentence(i int) ISentenceContext
func (*LogsentContext) ToStringTree ¶
func (s *LogsentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type QuantsentContext ¶
type QuantsentContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyQuantsentContext ¶
func NewEmptyQuantsentContext() *QuantsentContext
func NewQuantsentContext ¶
func NewQuantsentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QuantsentContext
func (*QuantsentContext) AllLPAREN ¶
func (s *QuantsentContext) AllLPAREN() []antlr.TerminalNode
func (*QuantsentContext) AllRPAREN ¶
func (s *QuantsentContext) AllRPAREN() []antlr.TerminalNode
func (*QuantsentContext) AllVARIABLE ¶
func (s *QuantsentContext) AllVARIABLE() []antlr.TerminalNode
func (*QuantsentContext) EXISTS ¶
func (s *QuantsentContext) EXISTS() antlr.TerminalNode
func (*QuantsentContext) EnterRule ¶
func (s *QuantsentContext) EnterRule(listener antlr.ParseTreeListener)
func (*QuantsentContext) ExitRule ¶
func (s *QuantsentContext) ExitRule(listener antlr.ParseTreeListener)
func (*QuantsentContext) FORALL ¶
func (s *QuantsentContext) FORALL() antlr.TerminalNode
func (*QuantsentContext) GetParser ¶
func (s *QuantsentContext) GetParser() antlr.Parser
func (*QuantsentContext) GetRuleContext ¶
func (s *QuantsentContext) GetRuleContext() antlr.RuleContext
func (*QuantsentContext) IsQuantsentContext ¶
func (*QuantsentContext) IsQuantsentContext()
func (*QuantsentContext) LPAREN ¶
func (s *QuantsentContext) LPAREN(i int) antlr.TerminalNode
func (*QuantsentContext) RPAREN ¶
func (s *QuantsentContext) RPAREN(i int) antlr.TerminalNode
func (*QuantsentContext) Sentence ¶
func (s *QuantsentContext) Sentence() ISentenceContext
func (*QuantsentContext) ToStringTree ¶
func (s *QuantsentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*QuantsentContext) VARIABLE ¶
func (s *QuantsentContext) VARIABLE(i int) antlr.TerminalNode
type RelsentContext ¶
type RelsentContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyRelsentContext ¶
func NewEmptyRelsentContext() *RelsentContext
func NewRelsentContext ¶
func NewRelsentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RelsentContext
func (*RelsentContext) AllArgument ¶
func (s *RelsentContext) AllArgument() []IArgumentContext
func (*RelsentContext) Argument ¶
func (s *RelsentContext) Argument(i int) IArgumentContext
func (*RelsentContext) EnterRule ¶
func (s *RelsentContext) EnterRule(listener antlr.ParseTreeListener)
func (*RelsentContext) ExitRule ¶
func (s *RelsentContext) ExitRule(listener antlr.ParseTreeListener)
func (*RelsentContext) GetParser ¶
func (s *RelsentContext) GetParser() antlr.Parser
func (*RelsentContext) GetRuleContext ¶
func (s *RelsentContext) GetRuleContext() antlr.RuleContext
func (*RelsentContext) IsRelsentContext ¶
func (*RelsentContext) IsRelsentContext()
func (*RelsentContext) LPAREN ¶
func (s *RelsentContext) LPAREN() antlr.TerminalNode
func (*RelsentContext) RPAREN ¶
func (s *RelsentContext) RPAREN() antlr.TerminalNode
func (*RelsentContext) ToStringTree ¶
func (s *RelsentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*RelsentContext) VARIABLE ¶
func (s *RelsentContext) VARIABLE() antlr.TerminalNode
func (*RelsentContext) WORD ¶
func (s *RelsentContext) WORD() antlr.TerminalNode
type SUOKIFLexer ¶
func NewSUOKIFLexer ¶
func NewSUOKIFLexer(input antlr.CharStream) *SUOKIFLexer
type SUOKIFListener ¶
type SUOKIFListener interface { antlr.ParseTreeListener // EnterTop_level is called when entering the top_level production. EnterTop_level(c *Top_levelContext) // EnterTerm is called when entering the term production. EnterTerm(c *TermContext) // EnterArgument is called when entering the argument production. EnterArgument(c *ArgumentContext) // EnterFunterm is called when entering the funterm production. EnterFunterm(c *FuntermContext) // EnterSentence is called when entering the sentence production. EnterSentence(c *SentenceContext) // EnterEquation is called when entering the equation production. EnterEquation(c *EquationContext) // EnterRelsent is called when entering the relsent production. EnterRelsent(c *RelsentContext) // EnterLogsent is called when entering the logsent production. EnterLogsent(c *LogsentContext) // EnterQuantsent is called when entering the quantsent production. EnterQuantsent(c *QuantsentContext) // ExitTop_level is called when exiting the top_level production. ExitTop_level(c *Top_levelContext) // ExitTerm is called when exiting the term production. ExitTerm(c *TermContext) // ExitArgument is called when exiting the argument production. ExitArgument(c *ArgumentContext) // ExitFunterm is called when exiting the funterm production. ExitFunterm(c *FuntermContext) // ExitSentence is called when exiting the sentence production. ExitSentence(c *SentenceContext) // ExitEquation is called when exiting the equation production. ExitEquation(c *EquationContext) // ExitRelsent is called when exiting the relsent production. ExitRelsent(c *RelsentContext) // ExitLogsent is called when exiting the logsent production. ExitLogsent(c *LogsentContext) // ExitQuantsent is called when exiting the quantsent production. ExitQuantsent(c *QuantsentContext) }
SUOKIFListener is a complete listener for a parse tree produced by SUOKIFParser.
type SUOKIFParser ¶
type SUOKIFParser struct {
*antlr.BaseParser
}
func NewSUOKIFParser ¶
func NewSUOKIFParser(input antlr.TokenStream) *SUOKIFParser
func (*SUOKIFParser) Argument ¶
func (p *SUOKIFParser) Argument() (localctx IArgumentContext)
func (*SUOKIFParser) Equation ¶
func (p *SUOKIFParser) Equation() (localctx IEquationContext)
func (*SUOKIFParser) Funterm ¶
func (p *SUOKIFParser) Funterm() (localctx IFuntermContext)
func (*SUOKIFParser) Logsent ¶
func (p *SUOKIFParser) Logsent() (localctx ILogsentContext)
func (*SUOKIFParser) Quantsent ¶
func (p *SUOKIFParser) Quantsent() (localctx IQuantsentContext)
func (*SUOKIFParser) Relsent ¶
func (p *SUOKIFParser) Relsent() (localctx IRelsentContext)
func (*SUOKIFParser) Sentence ¶
func (p *SUOKIFParser) Sentence() (localctx ISentenceContext)
func (*SUOKIFParser) Term ¶
func (p *SUOKIFParser) Term() (localctx ITermContext)
func (*SUOKIFParser) Top_level ¶
func (p *SUOKIFParser) Top_level() (localctx ITop_levelContext)
type SentenceContext ¶
type SentenceContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptySentenceContext ¶
func NewEmptySentenceContext() *SentenceContext
func NewSentenceContext ¶
func NewSentenceContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SentenceContext
func (*SentenceContext) EnterRule ¶
func (s *SentenceContext) EnterRule(listener antlr.ParseTreeListener)
func (*SentenceContext) Equation ¶
func (s *SentenceContext) Equation() IEquationContext
func (*SentenceContext) ExitRule ¶
func (s *SentenceContext) ExitRule(listener antlr.ParseTreeListener)
func (*SentenceContext) GetParser ¶
func (s *SentenceContext) GetParser() antlr.Parser
func (*SentenceContext) GetRuleContext ¶
func (s *SentenceContext) GetRuleContext() antlr.RuleContext
func (*SentenceContext) IsSentenceContext ¶
func (*SentenceContext) IsSentenceContext()
func (*SentenceContext) Logsent ¶
func (s *SentenceContext) Logsent() ILogsentContext
func (*SentenceContext) Quantsent ¶
func (s *SentenceContext) Quantsent() IQuantsentContext
func (*SentenceContext) Relsent ¶
func (s *SentenceContext) Relsent() IRelsentContext
func (*SentenceContext) ToStringTree ¶
func (s *SentenceContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*SentenceContext) VARIABLE ¶
func (s *SentenceContext) VARIABLE() antlr.TerminalNode
func (*SentenceContext) WORD ¶
func (s *SentenceContext) WORD() antlr.TerminalNode
type TermContext ¶
type TermContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyTermContext ¶
func NewEmptyTermContext() *TermContext
func NewTermContext ¶
func NewTermContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TermContext
func (*TermContext) EnterRule ¶
func (s *TermContext) EnterRule(listener antlr.ParseTreeListener)
func (*TermContext) ExitRule ¶
func (s *TermContext) ExitRule(listener antlr.ParseTreeListener)
func (*TermContext) Funterm ¶
func (s *TermContext) Funterm() IFuntermContext
func (*TermContext) GetParser ¶
func (s *TermContext) GetParser() antlr.Parser
func (*TermContext) GetRuleContext ¶
func (s *TermContext) GetRuleContext() antlr.RuleContext
func (*TermContext) IsTermContext ¶
func (*TermContext) IsTermContext()
func (*TermContext) NUMBER ¶
func (s *TermContext) NUMBER() antlr.TerminalNode
func (*TermContext) STRING ¶
func (s *TermContext) STRING() antlr.TerminalNode
func (*TermContext) Sentence ¶
func (s *TermContext) Sentence() ISentenceContext
func (*TermContext) ToStringTree ¶
func (s *TermContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*TermContext) VARIABLE ¶
func (s *TermContext) VARIABLE() antlr.TerminalNode
func (*TermContext) WORD ¶
func (s *TermContext) WORD() antlr.TerminalNode
type Top_levelContext ¶
type Top_levelContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyTop_levelContext ¶
func NewEmptyTop_levelContext() *Top_levelContext
func NewTop_levelContext ¶
func NewTop_levelContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Top_levelContext
func (*Top_levelContext) AllSentence ¶
func (s *Top_levelContext) AllSentence() []ISentenceContext
func (*Top_levelContext) EnterRule ¶
func (s *Top_levelContext) EnterRule(listener antlr.ParseTreeListener)
func (*Top_levelContext) ExitRule ¶
func (s *Top_levelContext) ExitRule(listener antlr.ParseTreeListener)
func (*Top_levelContext) GetParser ¶
func (s *Top_levelContext) GetParser() antlr.Parser
func (*Top_levelContext) GetRuleContext ¶
func (s *Top_levelContext) GetRuleContext() antlr.RuleContext
func (*Top_levelContext) IsTop_levelContext ¶
func (*Top_levelContext) IsTop_levelContext()
func (*Top_levelContext) Sentence ¶
func (s *Top_levelContext) Sentence(i int) ISentenceContext
func (*Top_levelContext) ToStringTree ¶
func (s *Top_levelContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string