Class bnfBaseVisitor<Result>
This class provides an empty implementation of IbnfVisitor<Result>, which can be extended to create a visitor which only needs to handle a subset of the available methods.
Inheritance
Namespace: GCore.Antlr.Grammers.Bnf
Assembly: Bnf.dll
Syntax
public class bnfBaseVisitor<Result> : AbstractParseTreeVisitor<Result>, IbnfVisitor<Result>, IParseTreeVisitor<Result>
Type Parameters
| Name | Description |
|---|---|
| Result | The return type of the visit operation. |
Methods
| Improve this Doc View SourceVisitAlternative(bnfParser.AlternativeContext)
Visit a parse tree produced by alternative().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitAlternative(bnfParser.AlternativeContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.AlternativeContext | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |
VisitAlternatives(bnfParser.AlternativesContext)
Visit a parse tree produced by alternatives().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitAlternatives(bnfParser.AlternativesContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.AlternativesContext | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |
VisitElement(bnfParser.ElementContext)
Visit a parse tree produced by element().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitElement(bnfParser.ElementContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.ElementContext | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |
VisitId_(bnfParser.Id_Context)
Visit a parse tree produced by id_().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitId_(bnfParser.Id_Context context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.Id_Context | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |
VisitLhs(bnfParser.LhsContext)
Visit a parse tree produced by lhs().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitLhs(bnfParser.LhsContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.LhsContext | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |
VisitOneormore(bnfParser.OneormoreContext)
Visit a parse tree produced by oneormore().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitOneormore(bnfParser.OneormoreContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.OneormoreContext | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |
VisitOptional_(bnfParser.Optional_Context)
Visit a parse tree produced by optional_().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitOptional_(bnfParser.Optional_Context context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.Optional_Context | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |
VisitRhs(bnfParser.RhsContext)
Visit a parse tree produced by rhs().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitRhs(bnfParser.RhsContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.RhsContext | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |
VisitRule_(bnfParser.Rule_Context)
Visit a parse tree produced by rule_().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitRule_(bnfParser.Rule_Context context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.Rule_Context | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |
VisitRuleid(bnfParser.RuleidContext)
Visit a parse tree produced by ruleid().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitRuleid(bnfParser.RuleidContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.RuleidContext | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |
VisitRulelist(bnfParser.RulelistContext)
Visit a parse tree produced by rulelist().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitRulelist(bnfParser.RulelistContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.RulelistContext | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |
VisitText_(bnfParser.Text_Context)
Visit a parse tree produced by text_().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitText_(bnfParser.Text_Context context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.Text_Context | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |
VisitZeroormore(bnfParser.ZeroormoreContext)
Visit a parse tree produced by zeroormore().
The default implementation returns the result of calling context.
Declaration
public virtual Result VisitZeroormore(bnfParser.ZeroormoreContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| bnfParser.ZeroormoreContext | context | The parse tree. |
Returns
| Type | Description |
|---|---|
| Result |