C# Class Antlr4.Analysis.LeftFactoringRuleTransformer

显示文件 Open project: sharwell/antlr4cs Class Usage Examples

Public Properties

Property Type Description
LEFTFACTOR string
SUPPRESS_ACCESSOR string
_ast Antlr4.Tool.Ast.GrammarRootAST
_g Antlr4.Tool.Grammar
_rules Rule>.IDictionary
_tool AntlrTool

Public Methods

Method Description
LeftFactoringRuleTransformer ( [ ast, Rule>.[ rules, [ g ) : System.Collections.Generic
TranslateLeftFactoredRules ( ) : void

Protected Methods

Method Description
CreateLeftFactoredRuleVariant ( Rule rule, string factoredElement ) : RuleVariants
ExpandOptionalQuantifiersForAlt ( GrammarAST alt ) : GrammarAST
ExpandOptionalQuantifiersForBlock ( GrammarAST block, bool variant ) : bool
TranslateLeftFactoredAlternative ( GrammarAST alternative, string factoredRule, bool variant, DecisionFactorMode mode, bool includeFactoredElement ) : GrammarAST
TranslateLeftFactoredDecision ( GrammarAST block, string factoredRule, bool variant, DecisionFactorMode mode, bool includeFactoredElement ) : bool
TranslateLeftFactoredElement ( GrammarAST element, string factoredRule, bool variant, DecisionFactorMode mode, bool includeFactoredElement ) : GrammarAST

Method Details

CreateLeftFactoredRuleVariant() protected method

protected CreateLeftFactoredRuleVariant ( Rule rule, string factoredElement ) : RuleVariants
rule Antlr4.Tool.Rule
factoredElement string
return RuleVariants

ExpandOptionalQuantifiersForAlt() protected method

protected ExpandOptionalQuantifiersForAlt ( GrammarAST alt ) : GrammarAST
alt Antlr4.Tool.Ast.GrammarAST
return Antlr4.Tool.Ast.GrammarAST

ExpandOptionalQuantifiersForBlock() protected method

protected ExpandOptionalQuantifiersForBlock ( GrammarAST block, bool variant ) : bool
block Antlr4.Tool.Ast.GrammarAST
variant bool
return bool

LeftFactoringRuleTransformer() public method

public LeftFactoringRuleTransformer ( [ ast, Rule>.[ rules, [ g ) : System.Collections.Generic
ast [
rules Rule>.[
g [
return System.Collections.Generic

TranslateLeftFactoredAlternative() protected method

protected TranslateLeftFactoredAlternative ( GrammarAST alternative, string factoredRule, bool variant, DecisionFactorMode mode, bool includeFactoredElement ) : GrammarAST
alternative Antlr4.Tool.Ast.GrammarAST
factoredRule string
variant bool
mode DecisionFactorMode
includeFactoredElement bool
return Antlr4.Tool.Ast.GrammarAST

TranslateLeftFactoredDecision() protected method

protected TranslateLeftFactoredDecision ( GrammarAST block, string factoredRule, bool variant, DecisionFactorMode mode, bool includeFactoredElement ) : bool
block Antlr4.Tool.Ast.GrammarAST
factoredRule string
variant bool
mode DecisionFactorMode
includeFactoredElement bool
return bool

TranslateLeftFactoredElement() protected method

protected TranslateLeftFactoredElement ( GrammarAST element, string factoredRule, bool variant, DecisionFactorMode mode, bool includeFactoredElement ) : GrammarAST
element Antlr4.Tool.Ast.GrammarAST
factoredRule string
variant bool
mode DecisionFactorMode
includeFactoredElement bool
return Antlr4.Tool.Ast.GrammarAST

TranslateLeftFactoredRules() public method

public TranslateLeftFactoredRules ( ) : void
return void

Property Details

LEFTFACTOR public_oe static_oe property

public static string LEFTFACTOR
return string

SUPPRESS_ACCESSOR public_oe static_oe property

public static string SUPPRESS_ACCESSOR
return string

_ast public_oe property

public GrammarRootAST,Antlr4.Tool.Ast _ast
return Antlr4.Tool.Ast.GrammarRootAST

_g public_oe property

public Grammar,Antlr4.Tool _g
return Antlr4.Tool.Grammar

_rules public_oe property

public IDictionary _rules
return Rule>.IDictionary

_tool public_oe property

public AntlrTool _tool
return AntlrTool