public class GrammarTransformPipeline extends Object
| Constructor and Description |
|---|
GrammarTransformPipeline(Grammar
|
| Modifier and Type | Method and Description |
|---|---|
static void |
augmentTokensWithOriginalPosition(Grammar
|
GrammarAST |
expandParameterizedLoop(GrammarAST
|
void |
expandParameterizedLoops(GrammarAST
Find and replace ID*[','] with ID (',' ID)* ID+[','] with ID (',' ID)+ (x {action} y)+[','] with x {action} y (',' x {action} y)+ Parameter must be a token.
|
GrammarRootAST |
extractImplicitLexer(Grammar
Build lexer grammar from combined grammar that looks like: (COMBINED_GRAMMAR A (tokens { X (= Y 'y')) (OPTIONS (= x 'y')) (@ members {foo}) (@ lexer header {package jj;}) (RULES (RULE .+))) Move rules and actions to new tree, don't dup.
|
void |
integrateImportedGrammars(Grammar
Merge all the rules, token definitions, and named actions from imported grammars into the root grammar tree.
|
void |
process()
|
void |
reduceBlocksToSets(GrammarAST
|
static void |
setGrammarPtr(Grammar
Utility visitor that sets grammar ptr in each node
|
public void process()
public void reduceBlocksToSets(GrammarASTroot)
public void expandParameterizedLoops(GrammarASTroot)
public GrammarASTexpandParameterizedLoop(GrammarAST t)
public static void setGrammarPtr(Grammarg, GrammarAST tree)
public static void augmentTokensWithOriginalPosition(Grammarg, GrammarAST tree)
public void integrateImportedGrammars(GrammarrootGrammar)
public GrammarRootASTextractImplicitLexer(Grammar combinedGrammar)