Search in sources :

Example 1 with VisitorgenLexer

use of org.eclipse.ceylon.compiler.typechecker.treegen.VisitorgenLexer in project ceylon by eclipse.

the class Generate method visitor.

private static void visitor(File file) throws Exception {
    InputStream is = new FileInputStream(file);
    ANTLRInputStream input = new ANTLRInputStream(is);
    VisitorgenLexer lexer = new VisitorgenLexer(input);
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    VisitorgenParser parser = new VisitorgenParser(tokens);
    File out = new File(GENERATED_PACKAGE_DIR + "Visitor.java");
    out.createNewFile();
    Util.out = new PrintStream(out);
    parser.nodeList();
}
Also used : VisitorgenLexer(org.eclipse.ceylon.compiler.typechecker.treegen.VisitorgenLexer) CommonTokenStream(org.antlr.runtime.CommonTokenStream) PrintStream(java.io.PrintStream) ANTLRInputStream(org.antlr.runtime.ANTLRInputStream) FileInputStream(java.io.FileInputStream) InputStream(java.io.InputStream) VisitorgenParser(org.eclipse.ceylon.compiler.typechecker.treegen.VisitorgenParser) File(java.io.File) FileInputStream(java.io.FileInputStream) ANTLRInputStream(org.antlr.runtime.ANTLRInputStream)

Aggregations

File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 InputStream (java.io.InputStream)1 PrintStream (java.io.PrintStream)1 ANTLRInputStream (org.antlr.runtime.ANTLRInputStream)1 CommonTokenStream (org.antlr.runtime.CommonTokenStream)1 VisitorgenLexer (org.eclipse.ceylon.compiler.typechecker.treegen.VisitorgenLexer)1 VisitorgenParser (org.eclipse.ceylon.compiler.typechecker.treegen.VisitorgenParser)1