Package org.antlr.v4.codegen
Class ParserFactory
- java.lang.Object
-
- org.antlr.v4.codegen.BlankOutputModelFactory
-
- org.antlr.v4.codegen.DefaultOutputModelFactory
-
- org.antlr.v4.codegen.ParserFactory
-
- All Implemented Interfaces:
OutputModelFactory
public class ParserFactory extends DefaultOutputModelFactory
-
-
Field Summary
-
Fields inherited from class org.antlr.v4.codegen.DefaultOutputModelFactory
controller, g, gen
-
-
Constructor Summary
Constructors Constructor Description ParserFactory(CodeGenerator gen)
-
Method Summary
-
Methods inherited from class org.antlr.v4.codegen.DefaultOutputModelFactory
getCodeBlockLevel, getController, getCurrentBlock, getCurrentOuterMostAlt, getCurrentOuterMostAlternativeBlock, getCurrentRuleFunction, getGenerator, getGrammar, getRoot, getTreeLevel, list, list, rulePostamble, setController
-
Methods inherited from class org.antlr.v4.codegen.BlankOutputModelFactory
lexer, lexerFile, stringRef
-
-
-
-
Constructor Detail
-
ParserFactory
public ParserFactory(CodeGenerator gen)
-
-
Method Detail
-
parserFile
public ParserFile parserFile(String fileName)
- Specified by:
parserFilein interfaceOutputModelFactory- Overrides:
parserFilein classBlankOutputModelFactory
-
parser
public Parser parser(ParserFile file)
- Specified by:
parserin interfaceOutputModelFactory- Overrides:
parserin classBlankOutputModelFactory
-
rule
public RuleFunction rule(Rule r)
- Specified by:
rulein interfaceOutputModelFactory- Overrides:
rulein classBlankOutputModelFactory
-
epsilon
public CodeBlockForAlt epsilon(Alternative alt, boolean outerMost)
- Specified by:
epsilonin interfaceOutputModelFactory- Overrides:
epsilonin classBlankOutputModelFactory
-
alternative
public CodeBlockForAlt alternative(Alternative alt, boolean outerMost)
- Specified by:
alternativein interfaceOutputModelFactory- Overrides:
alternativein classBlankOutputModelFactory
-
finishAlternative
public CodeBlockForAlt finishAlternative(CodeBlockForAlt blk, List<SrcOp> ops)
- Specified by:
finishAlternativein interfaceOutputModelFactory- Overrides:
finishAlternativein classBlankOutputModelFactory
-
action
public List<SrcOp> action(ActionAST ast)
- Specified by:
actionin interfaceOutputModelFactory- Overrides:
actionin classBlankOutputModelFactory
-
sempred
public List<SrcOp> sempred(ActionAST ast)
- Specified by:
sempredin interfaceOutputModelFactory- Overrides:
sempredin classBlankOutputModelFactory
-
ruleRef
public List<SrcOp> ruleRef(GrammarAST ID, GrammarAST label, GrammarAST args)
- Specified by:
ruleRefin interfaceOutputModelFactory- Overrides:
ruleRefin classBlankOutputModelFactory
-
tokenRef
public List<SrcOp> tokenRef(GrammarAST ID, GrammarAST labelAST, GrammarAST args)
- Specified by:
tokenRefin interfaceOutputModelFactory- Overrides:
tokenRefin classBlankOutputModelFactory
-
getTokenListLabelDecl
public TokenListDecl getTokenListLabelDecl(String label)
-
set
public List<SrcOp> set(GrammarAST setAST, GrammarAST labelAST, boolean invert)
- Specified by:
setin interfaceOutputModelFactory- Overrides:
setin classBlankOutputModelFactory
-
wildcard
public List<SrcOp> wildcard(GrammarAST ast, GrammarAST labelAST)
- Specified by:
wildcardin interfaceOutputModelFactory- Overrides:
wildcardin classBlankOutputModelFactory
-
getChoiceBlock
public Choice getChoiceBlock(BlockAST blkAST, List<CodeBlockForAlt> alts, GrammarAST labelAST)
- Specified by:
getChoiceBlockin interfaceOutputModelFactory- Overrides:
getChoiceBlockin classBlankOutputModelFactory
-
getEBNFBlock
public Choice getEBNFBlock(GrammarAST ebnfRoot, List<CodeBlockForAlt> alts)
- Specified by:
getEBNFBlockin interfaceOutputModelFactory- Overrides:
getEBNFBlockin classBlankOutputModelFactory
-
getLL1ChoiceBlock
public Choice getLL1ChoiceBlock(BlockAST blkAST, List<CodeBlockForAlt> alts)
- Specified by:
getLL1ChoiceBlockin interfaceOutputModelFactory- Overrides:
getLL1ChoiceBlockin classBlankOutputModelFactory
-
getComplexChoiceBlock
public Choice getComplexChoiceBlock(BlockAST blkAST, List<CodeBlockForAlt> alts)
- Specified by:
getComplexChoiceBlockin interfaceOutputModelFactory- Overrides:
getComplexChoiceBlockin classBlankOutputModelFactory
-
getLL1EBNFBlock
public Choice getLL1EBNFBlock(GrammarAST ebnfRoot, List<CodeBlockForAlt> alts)
- Specified by:
getLL1EBNFBlockin interfaceOutputModelFactory- Overrides:
getLL1EBNFBlockin classBlankOutputModelFactory
-
getComplexEBNFBlock
public Choice getComplexEBNFBlock(GrammarAST ebnfRoot, List<CodeBlockForAlt> alts)
- Specified by:
getComplexEBNFBlockin interfaceOutputModelFactory- Overrides:
getComplexEBNFBlockin classBlankOutputModelFactory
-
getLL1Test
public List<SrcOp> getLL1Test(IntervalSet look, GrammarAST blkAST)
- Specified by:
getLL1Testin interfaceOutputModelFactory- Overrides:
getLL1Testin classBlankOutputModelFactory
-
needsImplicitLabel
public boolean needsImplicitLabel(GrammarAST ID, LabeledOp op)
- Specified by:
needsImplicitLabelin interfaceOutputModelFactory- Overrides:
needsImplicitLabelin classBlankOutputModelFactory
-
defineImplicitLabel
public void defineImplicitLabel(GrammarAST ast, LabeledOp op)
-
getAddToListOpIfListLabelPresent
public AddToLabelList getAddToListOpIfListLabelPresent(LabeledOp op, GrammarAST label)
-
-