public class LeftFactoringRuleTransformer extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
LeftFactoringRuleTransformer.DecisionFactorMode |
protected static class |
LeftFactoringRuleTransformer.RuleVariants |
| Modifier and Type | Field and Description |
|---|---|
GrammarRootAST |
_ast |
Grammar |
_g |
Map<String,Rule> |
_rules |
Tool |
_tool |
static String |
LEFTFACTOR |
static String |
SUPPRESS_ACCESSOR |
| Constructor and Description |
|---|
LeftFactoringRuleTransformer(GrammarRootAST ast,
Map<String,Rule> rules,
Grammar g) |
| Modifier and Type | Method and Description |
|---|---|
protected LeftFactoringRuleTransformer.RuleVariants |
createLeftFactoredRuleVariant(Rule rule,
String factoredElement) |
protected GrammarAST |
expandOptionalQuantifiersForAlt(GrammarAST alt) |
protected boolean |
expandOptionalQuantifiersForBlock(GrammarAST block,
boolean variant) |
protected GrammarAST |
translateLeftFactoredAlternative(GrammarAST alternative,
String factoredRule,
boolean variant,
LeftFactoringRuleTransformer.DecisionFactorMode mode,
boolean includeFactoredElement) |
protected boolean |
translateLeftFactoredDecision(GrammarAST block,
String factoredRule,
boolean variant,
LeftFactoringRuleTransformer.DecisionFactorMode mode,
boolean includeFactoredElement) |
protected GrammarAST |
translateLeftFactoredElement(GrammarAST element,
String factoredRule,
boolean variant,
LeftFactoringRuleTransformer.DecisionFactorMode mode,
boolean includeFactoredElement) |
void |
translateLeftFactoredRules() |
public static final String LEFTFACTOR
public static final String SUPPRESS_ACCESSOR
public GrammarRootAST _ast
public Grammar _g
public Tool _tool
public LeftFactoringRuleTransformer(@NotNull
GrammarRootAST ast,
@NotNull
Map<String,Rule> rules,
@NotNull
Grammar g)
public void translateLeftFactoredRules()
protected boolean expandOptionalQuantifiersForBlock(GrammarAST block, boolean variant)
protected GrammarAST expandOptionalQuantifiersForAlt(GrammarAST alt)
protected boolean translateLeftFactoredDecision(GrammarAST block, String factoredRule, boolean variant, LeftFactoringRuleTransformer.DecisionFactorMode mode, boolean includeFactoredElement)
protected GrammarAST translateLeftFactoredAlternative(GrammarAST alternative, String factoredRule, boolean variant, LeftFactoringRuleTransformer.DecisionFactorMode mode, boolean includeFactoredElement)
protected GrammarAST translateLeftFactoredElement(GrammarAST element, String factoredRule, boolean variant, LeftFactoringRuleTransformer.DecisionFactorMode mode, boolean includeFactoredElement)
protected LeftFactoringRuleTransformer.RuleVariants createLeftFactoredRuleVariant(Rule rule, String factoredElement)
Copyright © 1992–2022 Daniel Sun. All rights reserved.