Documentation
¶
Overview ¶
Package parser contains an ANTLR-generated lexer and parser for SystemD Unit files, with some tests added to ensure grammar changes don't violate the current contract.
Index ¶
- Constants
- func UnitLexerInit()
- func UnitParserInit()
- type BaseUnitParserListener
- func (s *BaseUnitParserListener) EnterEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseUnitParserListener) EnterField(ctx *FieldContext)
- func (s *BaseUnitParserListener) EnterFieldName(ctx *FieldNameContext)
- func (s *BaseUnitParserListener) EnterFields(ctx *FieldsContext)
- func (s *BaseUnitParserListener) EnterPlainValue(ctx *PlainValueContext)
- func (s *BaseUnitParserListener) EnterPlainValues(ctx *PlainValuesContext)
- func (s *BaseUnitParserListener) EnterQuotedValue(ctx *QuotedValueContext)
- func (s *BaseUnitParserListener) EnterQuotedValues(ctx *QuotedValuesContext)
- func (s *BaseUnitParserListener) EnterSection(ctx *SectionContext)
- func (s *BaseUnitParserListener) EnterSectionHeader(ctx *SectionHeaderContext)
- func (s *BaseUnitParserListener) EnterSectionName(ctx *SectionNameContext)
- func (s *BaseUnitParserListener) EnterUnit(ctx *UnitContext)
- func (s *BaseUnitParserListener) EnterValues(ctx *ValuesContext)
- func (s *BaseUnitParserListener) ExitEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseUnitParserListener) ExitField(ctx *FieldContext)
- func (s *BaseUnitParserListener) ExitFieldName(ctx *FieldNameContext)
- func (s *BaseUnitParserListener) ExitFields(ctx *FieldsContext)
- func (s *BaseUnitParserListener) ExitPlainValue(ctx *PlainValueContext)
- func (s *BaseUnitParserListener) ExitPlainValues(ctx *PlainValuesContext)
- func (s *BaseUnitParserListener) ExitQuotedValue(ctx *QuotedValueContext)
- func (s *BaseUnitParserListener) ExitQuotedValues(ctx *QuotedValuesContext)
- func (s *BaseUnitParserListener) ExitSection(ctx *SectionContext)
- func (s *BaseUnitParserListener) ExitSectionHeader(ctx *SectionHeaderContext)
- func (s *BaseUnitParserListener) ExitSectionName(ctx *SectionNameContext)
- func (s *BaseUnitParserListener) ExitUnit(ctx *UnitContext)
- func (s *BaseUnitParserListener) ExitValues(ctx *ValuesContext)
- func (s *BaseUnitParserListener) VisitErrorNode(node antlr.ErrorNode)
- func (s *BaseUnitParserListener) VisitTerminal(node antlr.TerminalNode)
- type FieldContext
- func (s *FieldContext) ASSIGN() antlr.TerminalNode
- func (s *FieldContext) AllEOL() []antlr.TerminalNode
- func (s *FieldContext) EOF() antlr.TerminalNode
- func (s *FieldContext) EOL(i int) antlr.TerminalNode
- func (s *FieldContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *FieldContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *FieldContext) FieldName() IFieldNameContext
- func (s *FieldContext) GetParser() antlr.Parser
- func (s *FieldContext) GetRuleContext() antlr.RuleContext
- func (*FieldContext) IsFieldContext()
- func (s *FieldContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *FieldContext) Values() IValuesContext
- type FieldNameContext
- func (s *FieldNameContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *FieldNameContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *FieldNameContext) GetParser() antlr.Parser
- func (s *FieldNameContext) GetRuleContext() antlr.RuleContext
- func (s *FieldNameContext) IDENTIFIER() antlr.TerminalNode
- func (*FieldNameContext) IsFieldNameContext()
- func (s *FieldNameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type FieldsContext
- func (s *FieldsContext) AllField() []IFieldContext
- func (s *FieldsContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *FieldsContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *FieldsContext) Field(i int) IFieldContext
- func (s *FieldsContext) GetParser() antlr.Parser
- func (s *FieldsContext) GetRuleContext() antlr.RuleContext
- func (*FieldsContext) IsFieldsContext()
- func (s *FieldsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type IFieldContext
- type IFieldNameContext
- type IFieldsContext
- type IPlainValueContext
- type IPlainValuesContext
- type IQuotedValueContext
- type IQuotedValuesContext
- type ISectionContext
- type ISectionHeaderContext
- type ISectionNameContext
- type IUnitContext
- type IValuesContext
- type PlainValueContext
- func (s *PlainValueContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *PlainValueContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *PlainValueContext) GetParser() antlr.Parser
- func (s *PlainValueContext) GetRuleContext() antlr.RuleContext
- func (*PlainValueContext) IsPlainValueContext()
- func (s *PlainValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *PlainValueContext) VALUE() antlr.TerminalNode
- type PlainValuesContext
- func (s *PlainValuesContext) AllPlainValue() []IPlainValueContext
- func (s *PlainValuesContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *PlainValuesContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *PlainValuesContext) GetParser() antlr.Parser
- func (s *PlainValuesContext) GetRuleContext() antlr.RuleContext
- func (*PlainValuesContext) IsPlainValuesContext()
- func (s *PlainValuesContext) PlainValue(i int) IPlainValueContext
- func (s *PlainValuesContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type QuotedValueContext
- func (s *QuotedValueContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *QuotedValueContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *QuotedValueContext) GetParser() antlr.Parser
- func (s *QuotedValueContext) GetRuleContext() antlr.RuleContext
- func (*QuotedValueContext) IsQuotedValueContext()
- func (s *QuotedValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- func (s *QuotedValueContext) VALUE() antlr.TerminalNode
- type QuotedValuesContext
- func (s *QuotedValuesContext) AllDQUOTE() []antlr.TerminalNode
- func (s *QuotedValuesContext) AllQuotedValue() []IQuotedValueContext
- func (s *QuotedValuesContext) AllSQUOTE() []antlr.TerminalNode
- func (s *QuotedValuesContext) DQUOTE(i int) antlr.TerminalNode
- func (s *QuotedValuesContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *QuotedValuesContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *QuotedValuesContext) GetParser() antlr.Parser
- func (s *QuotedValuesContext) GetRuleContext() antlr.RuleContext
- func (*QuotedValuesContext) IsQuotedValuesContext()
- func (s *QuotedValuesContext) QuotedValue(i int) IQuotedValueContext
- func (s *QuotedValuesContext) SQUOTE(i int) antlr.TerminalNode
- func (s *QuotedValuesContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type SectionContext
- func (s *SectionContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *SectionContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *SectionContext) Fields() IFieldsContext
- func (s *SectionContext) GetParser() antlr.Parser
- func (s *SectionContext) GetRuleContext() antlr.RuleContext
- func (*SectionContext) IsSectionContext()
- func (s *SectionContext) SectionHeader() ISectionHeaderContext
- func (s *SectionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type SectionHeaderContext
- func (s *SectionHeaderContext) EOL() antlr.TerminalNode
- func (s *SectionHeaderContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *SectionHeaderContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *SectionHeaderContext) GetParser() antlr.Parser
- func (s *SectionHeaderContext) GetRuleContext() antlr.RuleContext
- func (*SectionHeaderContext) IsSectionHeaderContext()
- func (s *SectionHeaderContext) LBRACKET() antlr.TerminalNode
- func (s *SectionHeaderContext) RBRACKET() antlr.TerminalNode
- func (s *SectionHeaderContext) SectionName() ISectionNameContext
- func (s *SectionHeaderContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type SectionNameContext
- func (s *SectionNameContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *SectionNameContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *SectionNameContext) GetParser() antlr.Parser
- func (s *SectionNameContext) GetRuleContext() antlr.RuleContext
- func (s *SectionNameContext) IDENTIFIER() antlr.TerminalNode
- func (*SectionNameContext) IsSectionNameContext()
- func (s *SectionNameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type UnitContext
- func (s *UnitContext) AllSection() []ISectionContext
- func (s *UnitContext) EOF() antlr.TerminalNode
- func (s *UnitContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *UnitContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *UnitContext) GetParser() antlr.Parser
- func (s *UnitContext) GetRuleContext() antlr.RuleContext
- func (*UnitContext) IsUnitContext()
- func (s *UnitContext) Section(i int) ISectionContext
- func (s *UnitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type UnitLexer
- type UnitParser
- func (p *UnitParser) Field() (localctx IFieldContext)
- func (p *UnitParser) FieldName() (localctx IFieldNameContext)
- func (p *UnitParser) Fields() (localctx IFieldsContext)
- func (p *UnitParser) PlainValue() (localctx IPlainValueContext)
- func (p *UnitParser) PlainValues() (localctx IPlainValuesContext)
- func (p *UnitParser) QuotedValue() (localctx IQuotedValueContext)
- func (p *UnitParser) QuotedValues() (localctx IQuotedValuesContext)
- func (p *UnitParser) Section() (localctx ISectionContext)
- func (p *UnitParser) SectionHeader() (localctx ISectionHeaderContext)
- func (p *UnitParser) SectionName() (localctx ISectionNameContext)
- func (p *UnitParser) Unit() (localctx IUnitContext)
- func (p *UnitParser) Values() (localctx IValuesContext)
- type UnitParserListener
- type ValuesContext
- func (s *ValuesContext) AllCONTINUATION() []antlr.TerminalNode
- func (s *ValuesContext) AllPlainValues() []IPlainValuesContext
- func (s *ValuesContext) AllQuotedValues() []IQuotedValuesContext
- func (s *ValuesContext) CONTINUATION(i int) antlr.TerminalNode
- func (s *ValuesContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *ValuesContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *ValuesContext) GetParser() antlr.Parser
- func (s *ValuesContext) GetRuleContext() antlr.RuleContext
- func (*ValuesContext) IsValuesContext()
- func (s *ValuesContext) PlainValues(i int) IPlainValuesContext
- func (s *ValuesContext) QuotedValues(i int) IQuotedValuesContext
- func (s *ValuesContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
Constants ¶
const ( UnitLexerLBRACKET = 1 UnitLexerRBRACKET = 2 UnitLexerASSIGN = 3 UnitLexerDQUOTE = 4 UnitLexerSQUOTE = 5 UnitLexerEOL = 6 UnitLexerESCAPE = 7 UnitLexerWHITESPACE = 8 UnitLexerIDENTIFIER = 9 UnitLexerCOMMENT = 10 UnitLexerCONTINUATION = 11 UnitLexerWHITESPACE_IN_ASSIGN = 12 UnitLexerVALUE = 13 )
UnitLexer tokens.
const ( UnitLexerHEADER_MODE = iota + 1 UnitLexerASSIGN_MODE UnitLexerPLAIN_MODE UnitLexerDQUOTE_STRING_MODE UnitLexerSQUOTE_STRING_MODE )
UnitLexer modes.
const ( UnitParserEOF = antlr.TokenEOF UnitParserLBRACKET = 1 UnitParserRBRACKET = 2 UnitParserASSIGN = 3 UnitParserDQUOTE = 4 UnitParserSQUOTE = 5 UnitParserEOL = 6 UnitParserESCAPE = 7 UnitParserWHITESPACE = 8 UnitParserIDENTIFIER = 9 UnitParserCOMMENT = 10 UnitParserCONTINUATION = 11 UnitParserWHITESPACE_IN_ASSIGN = 12 UnitParserVALUE = 13 )
UnitParser tokens.
const ( UnitParserRULE_unit = 0 UnitParserRULE_section = 1 UnitParserRULE_sectionHeader = 2 UnitParserRULE_sectionName = 3 UnitParserRULE_fields = 4 UnitParserRULE_field = 5 UnitParserRULE_fieldName = 6 UnitParserRULE_values = 7 UnitParserRULE_plainValues = 8 UnitParserRULE_plainValue = 9 UnitParserRULE_quotedValues = 10 UnitParserRULE_quotedValue = 11 )
UnitParser rules.
Variables ¶
This section is empty.
Functions ¶
func UnitLexerInit ¶
func UnitLexerInit()
UnitLexerInit initializes any static state used to implement UnitLexer. By default the static state used to implement the lexer is lazily initialized during the first call to NewUnitLexer(). You can call this function if you wish to initialize the static state ahead of time.
func UnitParserInit ¶
func UnitParserInit()
UnitParserInit initializes any static state used to implement UnitParser. By default the static state used to implement the parser is lazily initialized during the first call to NewUnitParser(). You can call this function if you wish to initialize the static state ahead of time.
Types ¶
type BaseUnitParserListener ¶
type BaseUnitParserListener struct{}
BaseUnitParserListener is a complete listener for a parse tree produced by UnitParser.
func (*BaseUnitParserListener) EnterEveryRule ¶
func (s *BaseUnitParserListener) EnterEveryRule(ctx antlr.ParserRuleContext)
EnterEveryRule is called when any rule is entered.
func (*BaseUnitParserListener) EnterField ¶
func (s *BaseUnitParserListener) EnterField(ctx *FieldContext)
EnterField is called when production field is entered.
func (*BaseUnitParserListener) EnterFieldName ¶
func (s *BaseUnitParserListener) EnterFieldName(ctx *FieldNameContext)
EnterFieldName is called when production fieldName is entered.
func (*BaseUnitParserListener) EnterFields ¶
func (s *BaseUnitParserListener) EnterFields(ctx *FieldsContext)
EnterFields is called when production fields is entered.
func (*BaseUnitParserListener) EnterPlainValue ¶
func (s *BaseUnitParserListener) EnterPlainValue(ctx *PlainValueContext)
EnterPlainValue is called when production plainValue is entered.
func (*BaseUnitParserListener) EnterPlainValues ¶
func (s *BaseUnitParserListener) EnterPlainValues(ctx *PlainValuesContext)
EnterPlainValues is called when production plainValues is entered.
func (*BaseUnitParserListener) EnterQuotedValue ¶
func (s *BaseUnitParserListener) EnterQuotedValue(ctx *QuotedValueContext)
EnterQuotedValue is called when production quotedValue is entered.
func (*BaseUnitParserListener) EnterQuotedValues ¶
func (s *BaseUnitParserListener) EnterQuotedValues(ctx *QuotedValuesContext)
EnterQuotedValues is called when production quotedValues is entered.
func (*BaseUnitParserListener) EnterSection ¶
func (s *BaseUnitParserListener) EnterSection(ctx *SectionContext)
EnterSection is called when production section is entered.
func (*BaseUnitParserListener) EnterSectionHeader ¶
func (s *BaseUnitParserListener) EnterSectionHeader(ctx *SectionHeaderContext)
EnterSectionHeader is called when production sectionHeader is entered.
func (*BaseUnitParserListener) EnterSectionName ¶
func (s *BaseUnitParserListener) EnterSectionName(ctx *SectionNameContext)
EnterSectionName is called when production sectionName is entered.
func (*BaseUnitParserListener) EnterUnit ¶
func (s *BaseUnitParserListener) EnterUnit(ctx *UnitContext)
EnterUnit is called when production unit is entered.
func (*BaseUnitParserListener) EnterValues ¶
func (s *BaseUnitParserListener) EnterValues(ctx *ValuesContext)
EnterValues is called when production values is entered.
func (*BaseUnitParserListener) ExitEveryRule ¶
func (s *BaseUnitParserListener) ExitEveryRule(ctx antlr.ParserRuleContext)
ExitEveryRule is called when any rule is exited.
func (*BaseUnitParserListener) ExitField ¶
func (s *BaseUnitParserListener) ExitField(ctx *FieldContext)
ExitField is called when production field is exited.
func (*BaseUnitParserListener) ExitFieldName ¶
func (s *BaseUnitParserListener) ExitFieldName(ctx *FieldNameContext)
ExitFieldName is called when production fieldName is exited.
func (*BaseUnitParserListener) ExitFields ¶
func (s *BaseUnitParserListener) ExitFields(ctx *FieldsContext)
ExitFields is called when production fields is exited.
func (*BaseUnitParserListener) ExitPlainValue ¶
func (s *BaseUnitParserListener) ExitPlainValue(ctx *PlainValueContext)
ExitPlainValue is called when production plainValue is exited.
func (*BaseUnitParserListener) ExitPlainValues ¶
func (s *BaseUnitParserListener) ExitPlainValues(ctx *PlainValuesContext)
ExitPlainValues is called when production plainValues is exited.
func (*BaseUnitParserListener) ExitQuotedValue ¶
func (s *BaseUnitParserListener) ExitQuotedValue(ctx *QuotedValueContext)
ExitQuotedValue is called when production quotedValue is exited.
func (*BaseUnitParserListener) ExitQuotedValues ¶
func (s *BaseUnitParserListener) ExitQuotedValues(ctx *QuotedValuesContext)
ExitQuotedValues is called when production quotedValues is exited.
func (*BaseUnitParserListener) ExitSection ¶
func (s *BaseUnitParserListener) ExitSection(ctx *SectionContext)
ExitSection is called when production section is exited.
func (*BaseUnitParserListener) ExitSectionHeader ¶
func (s *BaseUnitParserListener) ExitSectionHeader(ctx *SectionHeaderContext)
ExitSectionHeader is called when production sectionHeader is exited.
func (*BaseUnitParserListener) ExitSectionName ¶
func (s *BaseUnitParserListener) ExitSectionName(ctx *SectionNameContext)
ExitSectionName is called when production sectionName is exited.
func (*BaseUnitParserListener) ExitUnit ¶
func (s *BaseUnitParserListener) ExitUnit(ctx *UnitContext)
ExitUnit is called when production unit is exited.
func (*BaseUnitParserListener) ExitValues ¶
func (s *BaseUnitParserListener) ExitValues(ctx *ValuesContext)
ExitValues is called when production values is exited.
func (*BaseUnitParserListener) VisitErrorNode ¶
func (s *BaseUnitParserListener) VisitErrorNode(node antlr.ErrorNode)
VisitErrorNode is called when an error node is visited.
func (*BaseUnitParserListener) VisitTerminal ¶
func (s *BaseUnitParserListener) VisitTerminal(node antlr.TerminalNode)
VisitTerminal is called when a terminal node is visited.
type FieldContext ¶
type FieldContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyFieldContext ¶
func NewEmptyFieldContext() *FieldContext
func NewFieldContext ¶
func NewFieldContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FieldContext
func (*FieldContext) ASSIGN ¶
func (s *FieldContext) ASSIGN() antlr.TerminalNode
func (*FieldContext) AllEOL ¶
func (s *FieldContext) AllEOL() []antlr.TerminalNode
func (*FieldContext) EOF ¶
func (s *FieldContext) EOF() antlr.TerminalNode
func (*FieldContext) EOL ¶
func (s *FieldContext) EOL(i int) antlr.TerminalNode
func (*FieldContext) EnterRule ¶
func (s *FieldContext) EnterRule(listener antlr.ParseTreeListener)
func (*FieldContext) ExitRule ¶
func (s *FieldContext) ExitRule(listener antlr.ParseTreeListener)
func (*FieldContext) FieldName ¶
func (s *FieldContext) FieldName() IFieldNameContext
func (*FieldContext) GetParser ¶
func (s *FieldContext) GetParser() antlr.Parser
func (*FieldContext) GetRuleContext ¶
func (s *FieldContext) GetRuleContext() antlr.RuleContext
func (*FieldContext) IsFieldContext ¶
func (*FieldContext) IsFieldContext()
func (*FieldContext) ToStringTree ¶
func (s *FieldContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*FieldContext) Values ¶
func (s *FieldContext) Values() IValuesContext
type FieldNameContext ¶
type FieldNameContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyFieldNameContext ¶
func NewEmptyFieldNameContext() *FieldNameContext
func NewFieldNameContext ¶
func NewFieldNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FieldNameContext
func (*FieldNameContext) EnterRule ¶
func (s *FieldNameContext) EnterRule(listener antlr.ParseTreeListener)
func (*FieldNameContext) ExitRule ¶
func (s *FieldNameContext) ExitRule(listener antlr.ParseTreeListener)
func (*FieldNameContext) GetParser ¶
func (s *FieldNameContext) GetParser() antlr.Parser
func (*FieldNameContext) GetRuleContext ¶
func (s *FieldNameContext) GetRuleContext() antlr.RuleContext
func (*FieldNameContext) IDENTIFIER ¶
func (s *FieldNameContext) IDENTIFIER() antlr.TerminalNode
func (*FieldNameContext) IsFieldNameContext ¶
func (*FieldNameContext) IsFieldNameContext()
func (*FieldNameContext) ToStringTree ¶
func (s *FieldNameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type FieldsContext ¶
type FieldsContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyFieldsContext ¶
func NewEmptyFieldsContext() *FieldsContext
func NewFieldsContext ¶
func NewFieldsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FieldsContext
func (*FieldsContext) AllField ¶
func (s *FieldsContext) AllField() []IFieldContext
func (*FieldsContext) EnterRule ¶
func (s *FieldsContext) EnterRule(listener antlr.ParseTreeListener)
func (*FieldsContext) ExitRule ¶
func (s *FieldsContext) ExitRule(listener antlr.ParseTreeListener)
func (*FieldsContext) Field ¶
func (s *FieldsContext) Field(i int) IFieldContext
func (*FieldsContext) GetParser ¶
func (s *FieldsContext) GetParser() antlr.Parser
func (*FieldsContext) GetRuleContext ¶
func (s *FieldsContext) GetRuleContext() antlr.RuleContext
func (*FieldsContext) IsFieldsContext ¶
func (*FieldsContext) IsFieldsContext()
func (*FieldsContext) ToStringTree ¶
func (s *FieldsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type IFieldContext ¶
type IFieldContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsFieldContext differentiates from other interfaces. IsFieldContext() }
IFieldContext is an interface to support dynamic dispatch.
type IFieldNameContext ¶
type IFieldNameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsFieldNameContext differentiates from other interfaces. IsFieldNameContext() }
IFieldNameContext is an interface to support dynamic dispatch.
type IFieldsContext ¶
type IFieldsContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsFieldsContext differentiates from other interfaces. IsFieldsContext() }
IFieldsContext is an interface to support dynamic dispatch.
type IPlainValueContext ¶
type IPlainValueContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsPlainValueContext differentiates from other interfaces. IsPlainValueContext() }
IPlainValueContext is an interface to support dynamic dispatch.
type IPlainValuesContext ¶
type IPlainValuesContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsPlainValuesContext differentiates from other interfaces. IsPlainValuesContext() }
IPlainValuesContext is an interface to support dynamic dispatch.
type IQuotedValueContext ¶
type IQuotedValueContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsQuotedValueContext differentiates from other interfaces. IsQuotedValueContext() }
IQuotedValueContext is an interface to support dynamic dispatch.
type IQuotedValuesContext ¶
type IQuotedValuesContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsQuotedValuesContext differentiates from other interfaces. IsQuotedValuesContext() }
IQuotedValuesContext is an interface to support dynamic dispatch.
type ISectionContext ¶
type ISectionContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsSectionContext differentiates from other interfaces. IsSectionContext() }
ISectionContext is an interface to support dynamic dispatch.
type ISectionHeaderContext ¶
type ISectionHeaderContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsSectionHeaderContext differentiates from other interfaces. IsSectionHeaderContext() }
ISectionHeaderContext is an interface to support dynamic dispatch.
type ISectionNameContext ¶
type ISectionNameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsSectionNameContext differentiates from other interfaces. IsSectionNameContext() }
ISectionNameContext is an interface to support dynamic dispatch.
type IUnitContext ¶
type IUnitContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsUnitContext differentiates from other interfaces. IsUnitContext() }
IUnitContext is an interface to support dynamic dispatch.
type IValuesContext ¶
type IValuesContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsValuesContext differentiates from other interfaces. IsValuesContext() }
IValuesContext is an interface to support dynamic dispatch.
type PlainValueContext ¶
type PlainValueContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyPlainValueContext ¶
func NewEmptyPlainValueContext() *PlainValueContext
func NewPlainValueContext ¶
func NewPlainValueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PlainValueContext
func (*PlainValueContext) EnterRule ¶
func (s *PlainValueContext) EnterRule(listener antlr.ParseTreeListener)
func (*PlainValueContext) ExitRule ¶
func (s *PlainValueContext) ExitRule(listener antlr.ParseTreeListener)
func (*PlainValueContext) GetParser ¶
func (s *PlainValueContext) GetParser() antlr.Parser
func (*PlainValueContext) GetRuleContext ¶
func (s *PlainValueContext) GetRuleContext() antlr.RuleContext
func (*PlainValueContext) IsPlainValueContext ¶
func (*PlainValueContext) IsPlainValueContext()
func (*PlainValueContext) ToStringTree ¶
func (s *PlainValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*PlainValueContext) VALUE ¶
func (s *PlainValueContext) VALUE() antlr.TerminalNode
type PlainValuesContext ¶
type PlainValuesContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyPlainValuesContext ¶
func NewEmptyPlainValuesContext() *PlainValuesContext
func NewPlainValuesContext ¶
func NewPlainValuesContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PlainValuesContext
func (*PlainValuesContext) AllPlainValue ¶
func (s *PlainValuesContext) AllPlainValue() []IPlainValueContext
func (*PlainValuesContext) EnterRule ¶
func (s *PlainValuesContext) EnterRule(listener antlr.ParseTreeListener)
func (*PlainValuesContext) ExitRule ¶
func (s *PlainValuesContext) ExitRule(listener antlr.ParseTreeListener)
func (*PlainValuesContext) GetParser ¶
func (s *PlainValuesContext) GetParser() antlr.Parser
func (*PlainValuesContext) GetRuleContext ¶
func (s *PlainValuesContext) GetRuleContext() antlr.RuleContext
func (*PlainValuesContext) IsPlainValuesContext ¶
func (*PlainValuesContext) IsPlainValuesContext()
func (*PlainValuesContext) PlainValue ¶
func (s *PlainValuesContext) PlainValue(i int) IPlainValueContext
func (*PlainValuesContext) ToStringTree ¶
func (s *PlainValuesContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type QuotedValueContext ¶
type QuotedValueContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyQuotedValueContext ¶
func NewEmptyQuotedValueContext() *QuotedValueContext
func NewQuotedValueContext ¶
func NewQuotedValueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QuotedValueContext
func (*QuotedValueContext) EnterRule ¶
func (s *QuotedValueContext) EnterRule(listener antlr.ParseTreeListener)
func (*QuotedValueContext) ExitRule ¶
func (s *QuotedValueContext) ExitRule(listener antlr.ParseTreeListener)
func (*QuotedValueContext) GetParser ¶
func (s *QuotedValueContext) GetParser() antlr.Parser
func (*QuotedValueContext) GetRuleContext ¶
func (s *QuotedValueContext) GetRuleContext() antlr.RuleContext
func (*QuotedValueContext) IsQuotedValueContext ¶
func (*QuotedValueContext) IsQuotedValueContext()
func (*QuotedValueContext) ToStringTree ¶
func (s *QuotedValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
func (*QuotedValueContext) VALUE ¶
func (s *QuotedValueContext) VALUE() antlr.TerminalNode
type QuotedValuesContext ¶
type QuotedValuesContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyQuotedValuesContext ¶
func NewEmptyQuotedValuesContext() *QuotedValuesContext
func NewQuotedValuesContext ¶
func NewQuotedValuesContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QuotedValuesContext
func (*QuotedValuesContext) AllDQUOTE ¶
func (s *QuotedValuesContext) AllDQUOTE() []antlr.TerminalNode
func (*QuotedValuesContext) AllQuotedValue ¶
func (s *QuotedValuesContext) AllQuotedValue() []IQuotedValueContext
func (*QuotedValuesContext) AllSQUOTE ¶
func (s *QuotedValuesContext) AllSQUOTE() []antlr.TerminalNode
func (*QuotedValuesContext) DQUOTE ¶
func (s *QuotedValuesContext) DQUOTE(i int) antlr.TerminalNode
func (*QuotedValuesContext) EnterRule ¶
func (s *QuotedValuesContext) EnterRule(listener antlr.ParseTreeListener)
func (*QuotedValuesContext) ExitRule ¶
func (s *QuotedValuesContext) ExitRule(listener antlr.ParseTreeListener)
func (*QuotedValuesContext) GetParser ¶
func (s *QuotedValuesContext) GetParser() antlr.Parser
func (*QuotedValuesContext) GetRuleContext ¶
func (s *QuotedValuesContext) GetRuleContext() antlr.RuleContext
func (*QuotedValuesContext) IsQuotedValuesContext ¶
func (*QuotedValuesContext) IsQuotedValuesContext()
func (*QuotedValuesContext) QuotedValue ¶
func (s *QuotedValuesContext) QuotedValue(i int) IQuotedValueContext
func (*QuotedValuesContext) SQUOTE ¶
func (s *QuotedValuesContext) SQUOTE(i int) antlr.TerminalNode
func (*QuotedValuesContext) ToStringTree ¶
func (s *QuotedValuesContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type SectionContext ¶
type SectionContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptySectionContext ¶
func NewEmptySectionContext() *SectionContext
func NewSectionContext ¶
func NewSectionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SectionContext
func (*SectionContext) EnterRule ¶
func (s *SectionContext) EnterRule(listener antlr.ParseTreeListener)
func (*SectionContext) ExitRule ¶
func (s *SectionContext) ExitRule(listener antlr.ParseTreeListener)
func (*SectionContext) Fields ¶
func (s *SectionContext) Fields() IFieldsContext
func (*SectionContext) GetParser ¶
func (s *SectionContext) GetParser() antlr.Parser
func (*SectionContext) GetRuleContext ¶
func (s *SectionContext) GetRuleContext() antlr.RuleContext
func (*SectionContext) IsSectionContext ¶
func (*SectionContext) IsSectionContext()
func (*SectionContext) SectionHeader ¶
func (s *SectionContext) SectionHeader() ISectionHeaderContext
func (*SectionContext) ToStringTree ¶
func (s *SectionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type SectionHeaderContext ¶
type SectionHeaderContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptySectionHeaderContext ¶
func NewEmptySectionHeaderContext() *SectionHeaderContext
func NewSectionHeaderContext ¶
func NewSectionHeaderContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SectionHeaderContext
func (*SectionHeaderContext) EOL ¶
func (s *SectionHeaderContext) EOL() antlr.TerminalNode
func (*SectionHeaderContext) EnterRule ¶
func (s *SectionHeaderContext) EnterRule(listener antlr.ParseTreeListener)
func (*SectionHeaderContext) ExitRule ¶
func (s *SectionHeaderContext) ExitRule(listener antlr.ParseTreeListener)
func (*SectionHeaderContext) GetParser ¶
func (s *SectionHeaderContext) GetParser() antlr.Parser
func (*SectionHeaderContext) GetRuleContext ¶
func (s *SectionHeaderContext) GetRuleContext() antlr.RuleContext
func (*SectionHeaderContext) IsSectionHeaderContext ¶
func (*SectionHeaderContext) IsSectionHeaderContext()
func (*SectionHeaderContext) LBRACKET ¶
func (s *SectionHeaderContext) LBRACKET() antlr.TerminalNode
func (*SectionHeaderContext) RBRACKET ¶
func (s *SectionHeaderContext) RBRACKET() antlr.TerminalNode
func (*SectionHeaderContext) SectionName ¶
func (s *SectionHeaderContext) SectionName() ISectionNameContext
func (*SectionHeaderContext) ToStringTree ¶
func (s *SectionHeaderContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type SectionNameContext ¶
type SectionNameContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptySectionNameContext ¶
func NewEmptySectionNameContext() *SectionNameContext
func NewSectionNameContext ¶
func NewSectionNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SectionNameContext
func (*SectionNameContext) EnterRule ¶
func (s *SectionNameContext) EnterRule(listener antlr.ParseTreeListener)
func (*SectionNameContext) ExitRule ¶
func (s *SectionNameContext) ExitRule(listener antlr.ParseTreeListener)
func (*SectionNameContext) GetParser ¶
func (s *SectionNameContext) GetParser() antlr.Parser
func (*SectionNameContext) GetRuleContext ¶
func (s *SectionNameContext) GetRuleContext() antlr.RuleContext
func (*SectionNameContext) IDENTIFIER ¶
func (s *SectionNameContext) IDENTIFIER() antlr.TerminalNode
func (*SectionNameContext) IsSectionNameContext ¶
func (*SectionNameContext) IsSectionNameContext()
func (*SectionNameContext) ToStringTree ¶
func (s *SectionNameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type UnitContext ¶
type UnitContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyUnitContext ¶
func NewEmptyUnitContext() *UnitContext
func NewUnitContext ¶
func NewUnitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *UnitContext
func (*UnitContext) AllSection ¶
func (s *UnitContext) AllSection() []ISectionContext
func (*UnitContext) EOF ¶
func (s *UnitContext) EOF() antlr.TerminalNode
func (*UnitContext) EnterRule ¶
func (s *UnitContext) EnterRule(listener antlr.ParseTreeListener)
func (*UnitContext) ExitRule ¶
func (s *UnitContext) ExitRule(listener antlr.ParseTreeListener)
func (*UnitContext) GetParser ¶
func (s *UnitContext) GetParser() antlr.Parser
func (*UnitContext) GetRuleContext ¶
func (s *UnitContext) GetRuleContext() antlr.RuleContext
func (*UnitContext) IsUnitContext ¶
func (*UnitContext) IsUnitContext()
func (*UnitContext) Section ¶
func (s *UnitContext) Section(i int) ISectionContext
func (*UnitContext) ToStringTree ¶
func (s *UnitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type UnitLexer ¶
type UnitLexer struct { *antlr.BaseLexer // contains filtered or unexported fields }
func NewUnitLexer ¶
func NewUnitLexer(input antlr.CharStream) *UnitLexer
NewUnitLexer produces a new lexer instance for the optional input antlr.CharStream.
type UnitParser ¶
type UnitParser struct {
*antlr.BaseParser
}
func NewUnitParser ¶
func NewUnitParser(input antlr.TokenStream) *UnitParser
NewUnitParser produces a new parser instance for the optional input antlr.TokenStream.
func (*UnitParser) Field ¶
func (p *UnitParser) Field() (localctx IFieldContext)
func (*UnitParser) FieldName ¶
func (p *UnitParser) FieldName() (localctx IFieldNameContext)
func (*UnitParser) Fields ¶
func (p *UnitParser) Fields() (localctx IFieldsContext)
func (*UnitParser) PlainValue ¶
func (p *UnitParser) PlainValue() (localctx IPlainValueContext)
func (*UnitParser) PlainValues ¶
func (p *UnitParser) PlainValues() (localctx IPlainValuesContext)
func (*UnitParser) QuotedValue ¶
func (p *UnitParser) QuotedValue() (localctx IQuotedValueContext)
func (*UnitParser) QuotedValues ¶
func (p *UnitParser) QuotedValues() (localctx IQuotedValuesContext)
func (*UnitParser) Section ¶
func (p *UnitParser) Section() (localctx ISectionContext)
func (*UnitParser) SectionHeader ¶
func (p *UnitParser) SectionHeader() (localctx ISectionHeaderContext)
func (*UnitParser) SectionName ¶
func (p *UnitParser) SectionName() (localctx ISectionNameContext)
func (*UnitParser) Unit ¶
func (p *UnitParser) Unit() (localctx IUnitContext)
func (*UnitParser) Values ¶
func (p *UnitParser) Values() (localctx IValuesContext)
type UnitParserListener ¶
type UnitParserListener interface { antlr.ParseTreeListener // EnterUnit is called when entering the unit production. EnterUnit(c *UnitContext) // EnterSection is called when entering the section production. EnterSection(c *SectionContext) // EnterSectionHeader is called when entering the sectionHeader production. EnterSectionHeader(c *SectionHeaderContext) // EnterSectionName is called when entering the sectionName production. EnterSectionName(c *SectionNameContext) // EnterFields is called when entering the fields production. EnterFields(c *FieldsContext) // EnterField is called when entering the field production. EnterField(c *FieldContext) // EnterFieldName is called when entering the fieldName production. EnterFieldName(c *FieldNameContext) // EnterValues is called when entering the values production. EnterValues(c *ValuesContext) // EnterPlainValues is called when entering the plainValues production. EnterPlainValues(c *PlainValuesContext) // EnterPlainValue is called when entering the plainValue production. EnterPlainValue(c *PlainValueContext) // EnterQuotedValues is called when entering the quotedValues production. EnterQuotedValues(c *QuotedValuesContext) // EnterQuotedValue is called when entering the quotedValue production. EnterQuotedValue(c *QuotedValueContext) // ExitUnit is called when exiting the unit production. ExitUnit(c *UnitContext) // ExitSection is called when exiting the section production. ExitSection(c *SectionContext) // ExitSectionHeader is called when exiting the sectionHeader production. ExitSectionHeader(c *SectionHeaderContext) // ExitSectionName is called when exiting the sectionName production. ExitSectionName(c *SectionNameContext) // ExitFields is called when exiting the fields production. ExitFields(c *FieldsContext) // ExitField is called when exiting the field production. ExitField(c *FieldContext) // ExitFieldName is called when exiting the fieldName production. ExitFieldName(c *FieldNameContext) // ExitValues is called when exiting the values production. ExitValues(c *ValuesContext) // ExitPlainValues is called when exiting the plainValues production. ExitPlainValues(c *PlainValuesContext) // ExitPlainValue is called when exiting the plainValue production. ExitPlainValue(c *PlainValueContext) // ExitQuotedValues is called when exiting the quotedValues production. ExitQuotedValues(c *QuotedValuesContext) // ExitQuotedValue is called when exiting the quotedValue production. ExitQuotedValue(c *QuotedValueContext) }
UnitParserListener is a complete listener for a parse tree produced by UnitParser.
type ValuesContext ¶
type ValuesContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyValuesContext ¶
func NewEmptyValuesContext() *ValuesContext
func NewValuesContext ¶
func NewValuesContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ValuesContext
func (*ValuesContext) AllCONTINUATION ¶
func (s *ValuesContext) AllCONTINUATION() []antlr.TerminalNode
func (*ValuesContext) AllPlainValues ¶
func (s *ValuesContext) AllPlainValues() []IPlainValuesContext
func (*ValuesContext) AllQuotedValues ¶
func (s *ValuesContext) AllQuotedValues() []IQuotedValuesContext
func (*ValuesContext) CONTINUATION ¶
func (s *ValuesContext) CONTINUATION(i int) antlr.TerminalNode
func (*ValuesContext) EnterRule ¶
func (s *ValuesContext) EnterRule(listener antlr.ParseTreeListener)
func (*ValuesContext) ExitRule ¶
func (s *ValuesContext) ExitRule(listener antlr.ParseTreeListener)
func (*ValuesContext) GetParser ¶
func (s *ValuesContext) GetParser() antlr.Parser
func (*ValuesContext) GetRuleContext ¶
func (s *ValuesContext) GetRuleContext() antlr.RuleContext
func (*ValuesContext) IsValuesContext ¶
func (*ValuesContext) IsValuesContext()
func (*ValuesContext) PlainValues ¶
func (s *ValuesContext) PlainValues(i int) IPlainValuesContext
func (*ValuesContext) QuotedValues ¶
func (s *ValuesContext) QuotedValues(i int) IQuotedValuesContext
func (*ValuesContext) ToStringTree ¶
func (s *ValuesContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string