Search in sources :

Example 1 with LexerFile

use of org.antlr.v4.codegen.model.LexerFile in project antlr4 by antlr.

the class OutputModelController method buildLexerOutputModel.

public OutputModelObject buildLexerOutputModel(boolean header) {
    CodeGenerator gen = delegate.getGenerator();
    LexerFile file = lexerFile(gen.getRecognizerFileName(header));
    setRoot(file);
    file.lexer = lexer(file);
    Grammar g = delegate.getGrammar();
    for (Rule r : g.rules.values()) {
        buildLexerRuleActions(file.lexer, r);
    }
    return file;
}
Also used : Grammar(org.antlr.v4.tool.Grammar) Rule(org.antlr.v4.tool.Rule) LeftRecursiveRule(org.antlr.v4.tool.LeftRecursiveRule) LexerFile(org.antlr.v4.codegen.model.LexerFile)

Aggregations

LexerFile (org.antlr.v4.codegen.model.LexerFile)1 Grammar (org.antlr.v4.tool.Grammar)1 LeftRecursiveRule (org.antlr.v4.tool.LeftRecursiveRule)1 Rule (org.antlr.v4.tool.Rule)1