Search in sources :

Example 1 with VisitorAdaptorgenLexer

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

the class Generate method visitorAdaptor.

private static void visitorAdaptor(File file) throws Exception {
    InputStream is = new FileInputStream(file);
    ANTLRInputStream input = new ANTLRInputStream(is);
    VisitorAdaptorgenLexer lexer = new VisitorAdaptorgenLexer(input);
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    VisitorAdaptorgenParser parser = new VisitorAdaptorgenParser(tokens);
    File out = new File(GENERATED_PACKAGE_DIR + "VisitorAdaptor.java");
    out.createNewFile();
    Util.out = new PrintStream(out);
    parser.nodeList();
}
Also used : CommonTokenStream(org.antlr.runtime.CommonTokenStream) VisitorAdaptorgenParser(org.eclipse.ceylon.compiler.typechecker.treegen.VisitorAdaptorgenParser) PrintStream(java.io.PrintStream) VisitorAdaptorgenLexer(org.eclipse.ceylon.compiler.typechecker.treegen.VisitorAdaptorgenLexer) ANTLRInputStream(org.antlr.runtime.ANTLRInputStream) FileInputStream(java.io.FileInputStream) InputStream(java.io.InputStream) 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 VisitorAdaptorgenLexer (org.eclipse.ceylon.compiler.typechecker.treegen.VisitorAdaptorgenLexer)1 VisitorAdaptorgenParser (org.eclipse.ceylon.compiler.typechecker.treegen.VisitorAdaptorgenParser)1