Lines Matching defs:code
9 * 1. Redistributions of source code must retain the above copyright
49 /** ANTLR's code generator.
58 * To make a new code generation target, define X.stg for language X
61 * bunch of templates that are needed by the code generator. You can add
91 /** Which grammar are we generating code for? Each generator
104 /** Where are the templates this generator should use to generate code? */
271 * Finally, walk the AST again to generate code.
312 // create a dummy to avoid null-checks all over code generator
416 // Walk the AST holding the input grammar, this time generating code
624 /** Generate code that computes the predicted alt given a DFA. The
627 * the code that ultimately invokes the codegen.g grammar rule.
806 * code template. This is not the token vocab interchange file, but
809 protected void genTokenTypeConstants(ST code) {
819 code.addAggr("tokens.{name,type}", tokenID, Utils.integer(tokenType));
827 protected void genTokenTypeNames(ST code) {
832 code.add("tokenNames", tokenName);
837 /** Get a meaningful name for a token type useful during code generation.
841 * to a token type in the generated code. If in the lexer, return the
1260 public void write(ST code, String fileName) throws IOException {
1266 code.write(wr);