Documentation ¶
Overview ¶
Example ¶
package main import ( "bramp.net/antlr4/tiny" "fmt" "github.com/antlr/antlr4/runtime/Go/antlr" ) type exampleListener struct { *tiny.BasetinyListener } 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 := tiny.NewtinyLexer(is) stream := antlr.NewCommonTokenStream(lexer, antlr.TokenDefaultChannel) // Create the Parser p := tiny.NewtinyParser(stream) p.BuildParseTrees = true p.AddErrorListener(antlr.NewDiagnosticErrorListener(true)) // Finally walk the tree tree := p.Program() antlr.ParseTreeWalkerDefault.Walk(&exampleListener{}, tree) }
Output:
Index ¶
- func NewtinyLexer(input antlr.CharStream) *tinyLexer
- func NewtinyParser(input antlr.TokenStream) *tinyParser
- type Assign_stmtContext
- func (s *Assign_stmtContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *Assign_stmtContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *Assign_stmtContext) Expr() IExprContext
- func (s *Assign_stmtContext) GetParser() antlr.Parser
- func (s *Assign_stmtContext) GetRuleContext() antlr.RuleContext
- func (s *Assign_stmtContext) Ident() IIdentContext
- func (*Assign_stmtContext) IsAssign_stmtContext()
- func (s *Assign_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type BasetinyListener
- func (s *BasetinyListener) EnterAssign_stmt(ctx *Assign_stmtContext)
- func (s *BasetinyListener) EnterEveryRule(ctx antlr.ParserRuleContext)
- func (s *BasetinyListener) EnterExpr(ctx *ExprContext)
- func (s *BasetinyListener) EnterExpr_list(ctx *Expr_listContext)
- func (s *BasetinyListener) EnterFactor(ctx *FactorContext)
- func (s *BasetinyListener) EnterId_list(ctx *Id_listContext)
- func (s *BasetinyListener) EnterIdent(ctx *IdentContext)
- func (s *BasetinyListener) EnterInteger(ctx *IntegerContext)
- func (s *BasetinyListener) EnterOp(ctx *OpContext)
- func (s *BasetinyListener) EnterProgram(ctx *ProgramContext)
- func (s *BasetinyListener) EnterRead_stmt(ctx *Read_stmtContext)
- func (s *BasetinyListener) EnterStmt(ctx *StmtContext)
- func (s *BasetinyListener) EnterStmt_list(ctx *Stmt_listContext)
- func (s *BasetinyListener) EnterWrite_stmt(ctx *Write_stmtContext)
- func (s *BasetinyListener) ExitAssign_stmt(ctx *Assign_stmtContext)
- func (s *BasetinyListener) ExitEveryRule(ctx antlr.ParserRuleContext)
- func (s *BasetinyListener) ExitExpr(ctx *ExprContext)
- func (s *BasetinyListener) ExitExpr_list(ctx *Expr_listContext)
- func (s *BasetinyListener) ExitFactor(ctx *FactorContext)
- func (s *BasetinyListener) ExitId_list(ctx *Id_listContext)
- func (s *BasetinyListener) ExitIdent(ctx *IdentContext)
- func (s *BasetinyListener) ExitInteger(ctx *IntegerContext)
- func (s *BasetinyListener) ExitOp(ctx *OpContext)
- func (s *BasetinyListener) ExitProgram(ctx *ProgramContext)
- func (s *BasetinyListener) ExitRead_stmt(ctx *Read_stmtContext)
- func (s *BasetinyListener) ExitStmt(ctx *StmtContext)
- func (s *BasetinyListener) ExitStmt_list(ctx *Stmt_listContext)
- func (s *BasetinyListener) ExitWrite_stmt(ctx *Write_stmtContext)
- func (s *BasetinyListener) VisitErrorNode(node antlr.ErrorNode)
- func (s *BasetinyListener) VisitTerminal(node antlr.TerminalNode)
- type ExprContext
- func (s *ExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *ExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *ExprContext) Expr() IExprContext
- func (s *ExprContext) Factor() IFactorContext
- func (s *ExprContext) GetParser() antlr.Parser
- func (s *ExprContext) GetRuleContext() antlr.RuleContext
- func (*ExprContext) IsExprContext()
- func (s *ExprContext) Op() IOpContext
- func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type Expr_listContext
- func (s *Expr_listContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *Expr_listContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *Expr_listContext) Expr() IExprContext
- func (s *Expr_listContext) Expr_list() IExpr_listContext
- func (s *Expr_listContext) GetParser() antlr.Parser
- func (s *Expr_listContext) GetRuleContext() antlr.RuleContext
- func (*Expr_listContext) IsExpr_listContext()
- func (s *Expr_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type FactorContext
- func (s *FactorContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *FactorContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *FactorContext) GetParser() antlr.Parser
- func (s *FactorContext) GetRuleContext() antlr.RuleContext
- func (s *FactorContext) Ident() IIdentContext
- func (s *FactorContext) Integer() IIntegerContext
- func (*FactorContext) IsFactorContext()
- func (s *FactorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type IAssign_stmtContext
- type IExprContext
- type IExpr_listContext
- type IFactorContext
- type IId_listContext
- type IIdentContext
- type IIntegerContext
- type IOpContext
- type IProgramContext
- type IRead_stmtContext
- type IStmtContext
- type IStmt_listContext
- type IWrite_stmtContext
- type Id_listContext
- func (s *Id_listContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *Id_listContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *Id_listContext) GetParser() antlr.Parser
- func (s *Id_listContext) GetRuleContext() antlr.RuleContext
- func (s *Id_listContext) Id_list() IId_listContext
- func (s *Id_listContext) Ident() IIdentContext
- func (*Id_listContext) IsId_listContext()
- func (s *Id_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type IdentContext
- func (s *IdentContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *IdentContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *IdentContext) GetParser() antlr.Parser
- func (s *IdentContext) GetRuleContext() antlr.RuleContext
- func (s *IdentContext) ID() antlr.TerminalNode
- func (*IdentContext) IsIdentContext()
- func (s *IdentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type IntegerContext
- func (s *IntegerContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *IntegerContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *IntegerContext) GetParser() antlr.Parser
- func (s *IntegerContext) GetRuleContext() antlr.RuleContext
- func (*IntegerContext) IsIntegerContext()
- func (s *IntegerContext) NUMBER() antlr.TerminalNode
- func (s *IntegerContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type OpContext
- func (s *OpContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *OpContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *OpContext) GetParser() antlr.Parser
- func (s *OpContext) GetRuleContext() antlr.RuleContext
- func (*OpContext) IsOpContext()
- func (s *OpContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type ProgramContext
- func (s *ProgramContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *ProgramContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *ProgramContext) GetParser() antlr.Parser
- func (s *ProgramContext) GetRuleContext() antlr.RuleContext
- func (*ProgramContext) IsProgramContext()
- func (s *ProgramContext) Stmt_list() IStmt_listContext
- func (s *ProgramContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type Read_stmtContext
- func (s *Read_stmtContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *Read_stmtContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *Read_stmtContext) GetParser() antlr.Parser
- func (s *Read_stmtContext) GetRuleContext() antlr.RuleContext
- func (s *Read_stmtContext) Id_list() IId_listContext
- func (*Read_stmtContext) IsRead_stmtContext()
- func (s *Read_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type StmtContext
- func (s *StmtContext) Assign_stmt() IAssign_stmtContext
- func (s *StmtContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *StmtContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *StmtContext) GetParser() antlr.Parser
- func (s *StmtContext) GetRuleContext() antlr.RuleContext
- func (*StmtContext) IsStmtContext()
- func (s *StmtContext) Read_stmt() IRead_stmtContext
- func (s *StmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *StmtContext) Write_stmt() IWrite_stmtContext
- type Stmt_listContext
- func (s *Stmt_listContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *Stmt_listContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *Stmt_listContext) GetParser() antlr.Parser
- func (s *Stmt_listContext) GetRuleContext() antlr.RuleContext
- func (*Stmt_listContext) IsStmt_listContext()
- func (s *Stmt_listContext) Stmt() IStmtContext
- func (s *Stmt_listContext) Stmt_list() IStmt_listContext
- func (s *Stmt_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type Write_stmtContext
- func (s *Write_stmtContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *Write_stmtContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *Write_stmtContext) Expr_list() IExpr_listContext
- func (s *Write_stmtContext) GetParser() antlr.Parser
- func (s *Write_stmtContext) GetRuleContext() antlr.RuleContext
- func (*Write_stmtContext) IsWrite_stmtContext()
- func (s *Write_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewtinyLexer ¶
func NewtinyLexer(input antlr.CharStream) *tinyLexer
func NewtinyParser ¶
func NewtinyParser(input antlr.TokenStream) *tinyParser
Types ¶
type Assign_stmtContext ¶
type Assign_stmtContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewAssign_stmtContext ¶
func NewAssign_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Assign_stmtContext
func NewEmptyAssign_stmtContext ¶
func NewEmptyAssign_stmtContext() *Assign_stmtContext
func (*Assign_stmtContext) EnterRule ¶
func (s *Assign_stmtContext) EnterRule(listener antlr.ParseTreeListener)
func (*Assign_stmtContext) ExitRule ¶
func (s *Assign_stmtContext) ExitRule(listener antlr.ParseTreeListener)
func (*Assign_stmtContext) Expr ¶
func (s *Assign_stmtContext) Expr() IExprContext
func (*Assign_stmtContext) GetParser ¶
func (s *Assign_stmtContext) GetParser() antlr.Parser
func (*Assign_stmtContext) GetRuleContext ¶
func (s *Assign_stmtContext) GetRuleContext() antlr.RuleContext
func (*Assign_stmtContext) Ident ¶
func (s *Assign_stmtContext) Ident() IIdentContext
func (*Assign_stmtContext) IsAssign_stmtContext ¶
func (*Assign_stmtContext) IsAssign_stmtContext()
func (*Assign_stmtContext) ToStringTree ¶
func (s *Assign_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type BasetinyListener ¶
type BasetinyListener struct{}
BasetinyListener is a complete listener for a parse tree produced by tinyParser.
func (*BasetinyListener) EnterAssign_stmt ¶
func (s *BasetinyListener) EnterAssign_stmt(ctx *Assign_stmtContext)
EnterAssign_stmt is called when production assign_stmt is entered.
func (*BasetinyListener) EnterEveryRule ¶
func (s *BasetinyListener) EnterEveryRule(ctx antlr.ParserRuleContext)
EnterEveryRule is called when any rule is entered.
func (*BasetinyListener) EnterExpr ¶
func (s *BasetinyListener) EnterExpr(ctx *ExprContext)
EnterExpr is called when production expr is entered.
func (*BasetinyListener) EnterExpr_list ¶
func (s *BasetinyListener) EnterExpr_list(ctx *Expr_listContext)
EnterExpr_list is called when production expr_list is entered.
func (*BasetinyListener) EnterFactor ¶
func (s *BasetinyListener) EnterFactor(ctx *FactorContext)
EnterFactor is called when production factor is entered.
func (*BasetinyListener) EnterId_list ¶
func (s *BasetinyListener) EnterId_list(ctx *Id_listContext)
EnterId_list is called when production id_list is entered.
func (*BasetinyListener) EnterIdent ¶
func (s *BasetinyListener) EnterIdent(ctx *IdentContext)
EnterIdent is called when production ident is entered.
func (*BasetinyListener) EnterInteger ¶
func (s *BasetinyListener) EnterInteger(ctx *IntegerContext)
EnterInteger is called when production integer is entered.
func (*BasetinyListener) EnterOp ¶
func (s *BasetinyListener) EnterOp(ctx *OpContext)
EnterOp is called when production op is entered.
func (*BasetinyListener) EnterProgram ¶
func (s *BasetinyListener) EnterProgram(ctx *ProgramContext)
EnterProgram is called when production program is entered.
func (*BasetinyListener) EnterRead_stmt ¶
func (s *BasetinyListener) EnterRead_stmt(ctx *Read_stmtContext)
EnterRead_stmt is called when production read_stmt is entered.
func (*BasetinyListener) EnterStmt ¶
func (s *BasetinyListener) EnterStmt(ctx *StmtContext)
EnterStmt is called when production stmt is entered.
func (*BasetinyListener) EnterStmt_list ¶
func (s *BasetinyListener) EnterStmt_list(ctx *Stmt_listContext)
EnterStmt_list is called when production stmt_list is entered.
func (*BasetinyListener) EnterWrite_stmt ¶
func (s *BasetinyListener) EnterWrite_stmt(ctx *Write_stmtContext)
EnterWrite_stmt is called when production write_stmt is entered.
func (*BasetinyListener) ExitAssign_stmt ¶
func (s *BasetinyListener) ExitAssign_stmt(ctx *Assign_stmtContext)
ExitAssign_stmt is called when production assign_stmt is exited.
func (*BasetinyListener) ExitEveryRule ¶
func (s *BasetinyListener) ExitEveryRule(ctx antlr.ParserRuleContext)
ExitEveryRule is called when any rule is exited.
func (*BasetinyListener) ExitExpr ¶
func (s *BasetinyListener) ExitExpr(ctx *ExprContext)
ExitExpr is called when production expr is exited.
func (*BasetinyListener) ExitExpr_list ¶
func (s *BasetinyListener) ExitExpr_list(ctx *Expr_listContext)
ExitExpr_list is called when production expr_list is exited.
func (*BasetinyListener) ExitFactor ¶
func (s *BasetinyListener) ExitFactor(ctx *FactorContext)
ExitFactor is called when production factor is exited.
func (*BasetinyListener) ExitId_list ¶
func (s *BasetinyListener) ExitId_list(ctx *Id_listContext)
ExitId_list is called when production id_list is exited.
func (*BasetinyListener) ExitIdent ¶
func (s *BasetinyListener) ExitIdent(ctx *IdentContext)
ExitIdent is called when production ident is exited.
func (*BasetinyListener) ExitInteger ¶
func (s *BasetinyListener) ExitInteger(ctx *IntegerContext)
ExitInteger is called when production integer is exited.
func (*BasetinyListener) ExitOp ¶
func (s *BasetinyListener) ExitOp(ctx *OpContext)
ExitOp is called when production op is exited.
func (*BasetinyListener) ExitProgram ¶
func (s *BasetinyListener) ExitProgram(ctx *ProgramContext)
ExitProgram is called when production program is exited.
func (*BasetinyListener) ExitRead_stmt ¶
func (s *BasetinyListener) ExitRead_stmt(ctx *Read_stmtContext)
ExitRead_stmt is called when production read_stmt is exited.
func (*BasetinyListener) ExitStmt ¶
func (s *BasetinyListener) ExitStmt(ctx *StmtContext)
ExitStmt is called when production stmt is exited.
func (*BasetinyListener) ExitStmt_list ¶
func (s *BasetinyListener) ExitStmt_list(ctx *Stmt_listContext)
ExitStmt_list is called when production stmt_list is exited.
func (*BasetinyListener) ExitWrite_stmt ¶
func (s *BasetinyListener) ExitWrite_stmt(ctx *Write_stmtContext)
ExitWrite_stmt is called when production write_stmt is exited.
func (*BasetinyListener) VisitErrorNode ¶
func (s *BasetinyListener) VisitErrorNode(node antlr.ErrorNode)
VisitErrorNode is called when an error node is visited.
func (*BasetinyListener) VisitTerminal ¶
func (s *BasetinyListener) VisitTerminal(node antlr.TerminalNode)
VisitTerminal is called when a terminal node is visited.
type ExprContext ¶
type ExprContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyExprContext ¶
func NewEmptyExprContext() *ExprContext
func NewExprContext ¶
func NewExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExprContext
func (*ExprContext) EnterRule ¶
func (s *ExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*ExprContext) ExitRule ¶
func (s *ExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*ExprContext) Expr ¶
func (s *ExprContext) Expr() IExprContext
func (*ExprContext) Factor ¶
func (s *ExprContext) Factor() IFactorContext
func (*ExprContext) GetParser ¶
func (s *ExprContext) GetParser() antlr.Parser
func (*ExprContext) GetRuleContext ¶
func (s *ExprContext) GetRuleContext() antlr.RuleContext
func (*ExprContext) IsExprContext ¶
func (*ExprContext) IsExprContext()
func (*ExprContext) Op ¶
func (s *ExprContext) Op() IOpContext
func (*ExprContext) ToStringTree ¶
func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type Expr_listContext ¶
type Expr_listContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyExpr_listContext ¶
func NewEmptyExpr_listContext() *Expr_listContext
func NewExpr_listContext ¶
func NewExpr_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Expr_listContext
func (*Expr_listContext) EnterRule ¶
func (s *Expr_listContext) EnterRule(listener antlr.ParseTreeListener)
func (*Expr_listContext) ExitRule ¶
func (s *Expr_listContext) ExitRule(listener antlr.ParseTreeListener)
func (*Expr_listContext) Expr ¶
func (s *Expr_listContext) Expr() IExprContext
func (*Expr_listContext) Expr_list ¶
func (s *Expr_listContext) Expr_list() IExpr_listContext
func (*Expr_listContext) GetParser ¶
func (s *Expr_listContext) GetParser() antlr.Parser
func (*Expr_listContext) GetRuleContext ¶
func (s *Expr_listContext) GetRuleContext() antlr.RuleContext
func (*Expr_listContext) IsExpr_listContext ¶
func (*Expr_listContext) IsExpr_listContext()
func (*Expr_listContext) ToStringTree ¶
func (s *Expr_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type FactorContext ¶
type FactorContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyFactorContext ¶
func NewEmptyFactorContext() *FactorContext
func NewFactorContext ¶
func NewFactorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FactorContext
func (*FactorContext) EnterRule ¶
func (s *FactorContext) EnterRule(listener antlr.ParseTreeListener)
func (*FactorContext) ExitRule ¶
func (s *FactorContext) ExitRule(listener antlr.ParseTreeListener)
func (*FactorContext) GetParser ¶
func (s *FactorContext) GetParser() antlr.Parser
func (*FactorContext) GetRuleContext ¶
func (s *FactorContext) GetRuleContext() antlr.RuleContext
func (*FactorContext) Ident ¶
func (s *FactorContext) Ident() IIdentContext
func (*FactorContext) Integer ¶
func (s *FactorContext) Integer() IIntegerContext
func (*FactorContext) IsFactorContext ¶
func (*FactorContext) IsFactorContext()
func (*FactorContext) ToStringTree ¶
func (s *FactorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type IAssign_stmtContext ¶
type IAssign_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsAssign_stmtContext differentiates from other interfaces. IsAssign_stmtContext() }
IAssign_stmtContext is an interface to support dynamic dispatch.
type IExprContext ¶
type IExprContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsExprContext differentiates from other interfaces. IsExprContext() }
IExprContext is an interface to support dynamic dispatch.
type IExpr_listContext ¶
type IExpr_listContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsExpr_listContext differentiates from other interfaces. IsExpr_listContext() }
IExpr_listContext is an interface to support dynamic dispatch.
type IFactorContext ¶
type IFactorContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsFactorContext differentiates from other interfaces. IsFactorContext() }
IFactorContext is an interface to support dynamic dispatch.
type IId_listContext ¶
type IId_listContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsId_listContext differentiates from other interfaces. IsId_listContext() }
IId_listContext is an interface to support dynamic dispatch.
type IIdentContext ¶
type IIdentContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsIdentContext differentiates from other interfaces. IsIdentContext() }
IIdentContext is an interface to support dynamic dispatch.
type IIntegerContext ¶
type IIntegerContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsIntegerContext differentiates from other interfaces. IsIntegerContext() }
IIntegerContext is an interface to support dynamic dispatch.
type IOpContext ¶
type IOpContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsOpContext differentiates from other interfaces. IsOpContext() }
IOpContext is an interface to support dynamic dispatch.
type IProgramContext ¶
type IProgramContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsProgramContext differentiates from other interfaces. IsProgramContext() }
IProgramContext is an interface to support dynamic dispatch.
type IRead_stmtContext ¶
type IRead_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsRead_stmtContext differentiates from other interfaces. IsRead_stmtContext() }
IRead_stmtContext is an interface to support dynamic dispatch.
type IStmtContext ¶
type IStmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsStmtContext differentiates from other interfaces. IsStmtContext() }
IStmtContext is an interface to support dynamic dispatch.
type IStmt_listContext ¶
type IStmt_listContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsStmt_listContext differentiates from other interfaces. IsStmt_listContext() }
IStmt_listContext is an interface to support dynamic dispatch.
type IWrite_stmtContext ¶
type IWrite_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsWrite_stmtContext differentiates from other interfaces. IsWrite_stmtContext() }
IWrite_stmtContext is an interface to support dynamic dispatch.
type Id_listContext ¶
type Id_listContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyId_listContext ¶
func NewEmptyId_listContext() *Id_listContext
func NewId_listContext ¶
func NewId_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Id_listContext
func (*Id_listContext) EnterRule ¶
func (s *Id_listContext) EnterRule(listener antlr.ParseTreeListener)
func (*Id_listContext) ExitRule ¶
func (s *Id_listContext) ExitRule(listener antlr.ParseTreeListener)
func (*Id_listContext) GetParser ¶
func (s *Id_listContext) GetParser() antlr.Parser
func (*Id_listContext) GetRuleContext ¶
func (s *Id_listContext) GetRuleContext() antlr.RuleContext
func (*Id_listContext) Id_list ¶
func (s *Id_listContext) Id_list() IId_listContext
func (*Id_listContext) Ident ¶
func (s *Id_listContext) Ident() IIdentContext
func (*Id_listContext) IsId_listContext ¶
func (*Id_listContext) IsId_listContext()
func (*Id_listContext) ToStringTree ¶
func (s *Id_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type IdentContext ¶
type IdentContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyIdentContext ¶
func NewEmptyIdentContext() *IdentContext
func NewIdentContext ¶
func NewIdentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *IdentContext
func (*IdentContext) EnterRule ¶
func (s *IdentContext) EnterRule(listener antlr.ParseTreeListener)
func (*IdentContext) ExitRule ¶
func (s *IdentContext) ExitRule(listener antlr.ParseTreeListener)
func (*IdentContext) GetParser ¶
func (s *IdentContext) GetParser() antlr.Parser
func (*IdentContext) GetRuleContext ¶
func (s *IdentContext) GetRuleContext() antlr.RuleContext
func (*IdentContext) ID ¶
func (s *IdentContext) ID() antlr.TerminalNode
func (*IdentContext) IsIdentContext ¶
func (*IdentContext) IsIdentContext()
func (*IdentContext) ToStringTree ¶
func (s *IdentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type IntegerContext ¶
type IntegerContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyIntegerContext ¶
func NewEmptyIntegerContext() *IntegerContext
func NewIntegerContext ¶
func NewIntegerContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *IntegerContext
func (*IntegerContext) EnterRule ¶
func (s *IntegerContext) EnterRule(listener antlr.ParseTreeListener)
func (*IntegerContext) ExitRule ¶
func (s *IntegerContext) ExitRule(listener antlr.ParseTreeListener)
func (*IntegerContext) GetParser ¶
func (s *IntegerContext) GetParser() antlr.Parser
func (*IntegerContext) GetRuleContext ¶
func (s *IntegerContext) GetRuleContext() antlr.RuleContext
func (*IntegerContext) IsIntegerContext ¶
func (*IntegerContext) IsIntegerContext()
func (*IntegerContext) NUMBER ¶
func (s *IntegerContext) NUMBER() antlr.TerminalNode
func (*IntegerContext) ToStringTree ¶
func (s *IntegerContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type OpContext ¶
type OpContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyOpContext ¶
func NewEmptyOpContext() *OpContext
func NewOpContext ¶
func (*OpContext) EnterRule ¶
func (s *OpContext) EnterRule(listener antlr.ParseTreeListener)
func (*OpContext) ExitRule ¶
func (s *OpContext) ExitRule(listener antlr.ParseTreeListener)
func (*OpContext) GetRuleContext ¶
func (s *OpContext) GetRuleContext() antlr.RuleContext
func (*OpContext) IsOpContext ¶
func (*OpContext) IsOpContext()
func (*OpContext) ToStringTree ¶
func (s *OpContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type ProgramContext ¶
type ProgramContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyProgramContext ¶
func NewEmptyProgramContext() *ProgramContext
func NewProgramContext ¶
func NewProgramContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ProgramContext
func (*ProgramContext) EnterRule ¶
func (s *ProgramContext) EnterRule(listener antlr.ParseTreeListener)
func (*ProgramContext) ExitRule ¶
func (s *ProgramContext) ExitRule(listener antlr.ParseTreeListener)
func (*ProgramContext) GetParser ¶
func (s *ProgramContext) GetParser() antlr.Parser
func (*ProgramContext) GetRuleContext ¶
func (s *ProgramContext) GetRuleContext() antlr.RuleContext
func (*ProgramContext) IsProgramContext ¶
func (*ProgramContext) IsProgramContext()
func (*ProgramContext) Stmt_list ¶
func (s *ProgramContext) Stmt_list() IStmt_listContext
func (*ProgramContext) ToStringTree ¶
func (s *ProgramContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type Read_stmtContext ¶
type Read_stmtContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyRead_stmtContext ¶
func NewEmptyRead_stmtContext() *Read_stmtContext
func NewRead_stmtContext ¶
func NewRead_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Read_stmtContext
func (*Read_stmtContext) EnterRule ¶
func (s *Read_stmtContext) EnterRule(listener antlr.ParseTreeListener)
func (*Read_stmtContext) ExitRule ¶
func (s *Read_stmtContext) ExitRule(listener antlr.ParseTreeListener)
func (*Read_stmtContext) GetParser ¶
func (s *Read_stmtContext) GetParser() antlr.Parser
func (*Read_stmtContext) GetRuleContext ¶
func (s *Read_stmtContext) GetRuleContext() antlr.RuleContext
func (*Read_stmtContext) Id_list ¶
func (s *Read_stmtContext) Id_list() IId_listContext
func (*Read_stmtContext) IsRead_stmtContext ¶
func (*Read_stmtContext) IsRead_stmtContext()
func (*Read_stmtContext) ToStringTree ¶
func (s *Read_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type StmtContext ¶
type StmtContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyStmtContext ¶
func NewEmptyStmtContext() *StmtContext
func NewStmtContext ¶
func NewStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StmtContext
func (*StmtContext) Assign_stmt ¶
func (s *StmtContext) Assign_stmt() IAssign_stmtContext
func (*StmtContext) EnterRule ¶
func (s *StmtContext) EnterRule(listener antlr.ParseTreeListener)
func (*StmtContext) ExitRule ¶
func (s *StmtContext) ExitRule(listener antlr.ParseTreeListener)
func (*StmtContext) GetParser ¶
func (s *StmtContext) GetParser() antlr.Parser
func (*StmtContext) GetRuleContext ¶
func (s *StmtContext) GetRuleContext() antlr.RuleContext
func (*StmtContext) IsStmtContext ¶
func (*StmtContext) IsStmtContext()
func (*StmtContext) Read_stmt ¶
func (s *StmtContext) Read_stmt() IRead_stmtContext
func (*StmtContext) ToStringTree ¶
func (s *StmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*StmtContext) Write_stmt ¶
func (s *StmtContext) Write_stmt() IWrite_stmtContext
type Stmt_listContext ¶
type Stmt_listContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyStmt_listContext ¶
func NewEmptyStmt_listContext() *Stmt_listContext
func NewStmt_listContext ¶
func NewStmt_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Stmt_listContext
func (*Stmt_listContext) EnterRule ¶
func (s *Stmt_listContext) EnterRule(listener antlr.ParseTreeListener)
func (*Stmt_listContext) ExitRule ¶
func (s *Stmt_listContext) ExitRule(listener antlr.ParseTreeListener)
func (*Stmt_listContext) GetParser ¶
func (s *Stmt_listContext) GetParser() antlr.Parser
func (*Stmt_listContext) GetRuleContext ¶
func (s *Stmt_listContext) GetRuleContext() antlr.RuleContext
func (*Stmt_listContext) IsStmt_listContext ¶
func (*Stmt_listContext) IsStmt_listContext()
func (*Stmt_listContext) Stmt ¶
func (s *Stmt_listContext) Stmt() IStmtContext
func (*Stmt_listContext) Stmt_list ¶
func (s *Stmt_listContext) Stmt_list() IStmt_listContext
func (*Stmt_listContext) ToStringTree ¶
func (s *Stmt_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type Write_stmtContext ¶
type Write_stmtContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyWrite_stmtContext ¶
func NewEmptyWrite_stmtContext() *Write_stmtContext
func NewWrite_stmtContext ¶
func NewWrite_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Write_stmtContext
func (*Write_stmtContext) EnterRule ¶
func (s *Write_stmtContext) EnterRule(listener antlr.ParseTreeListener)
func (*Write_stmtContext) ExitRule ¶
func (s *Write_stmtContext) ExitRule(listener antlr.ParseTreeListener)
func (*Write_stmtContext) Expr_list ¶
func (s *Write_stmtContext) Expr_list() IExpr_listContext
func (*Write_stmtContext) GetParser ¶
func (s *Write_stmtContext) GetParser() antlr.Parser
func (*Write_stmtContext) GetRuleContext ¶
func (s *Write_stmtContext) GetRuleContext() antlr.RuleContext
func (*Write_stmtContext) IsWrite_stmtContext ¶
func (*Write_stmtContext) IsWrite_stmtContext()
func (*Write_stmtContext) ToStringTree ¶
func (s *Write_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string