Search in sources :

Example 1 with WalkergenLexer

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

the class Generate method walker.

/*private static void builder(File file) throws Exception {
        InputStream is = new FileInputStream( file );
        ANTLRInputStream input = new ANTLRInputStream(is);
        BuildergenLexer lexer = new BuildergenLexer(input);
        CommonTokenStream tokens = new CommonTokenStream(lexer);
        BuildergenParser parser = new BuildergenParser(tokens);
        File out = new File( GENERATED_PACKAGE_DIR + "Builder.java" );
        out.createNewFile();
        AnalyzerUtil.out=new PrintStream(out);
        parser.nodeList();
    }*/
private static void walker(File file) throws Exception {
    InputStream is = new FileInputStream(file);
    ANTLRInputStream input = new ANTLRInputStream(is);
    WalkergenLexer lexer = new WalkergenLexer(input);
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    WalkergenParser parser = new WalkergenParser(tokens);
    File out = new File(GENERATED_PACKAGE_DIR + "Walker.java");
    out.createNewFile();
    Util.out = new PrintStream(out);
    parser.nodeList();
}
Also used : WalkergenLexer(org.eclipse.ceylon.compiler.typechecker.treegen.WalkergenLexer) CommonTokenStream(org.antlr.runtime.CommonTokenStream) PrintStream(java.io.PrintStream) WalkergenParser(org.eclipse.ceylon.compiler.typechecker.treegen.WalkergenParser) 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 WalkergenLexer (org.eclipse.ceylon.compiler.typechecker.treegen.WalkergenLexer)1 WalkergenParser (org.eclipse.ceylon.compiler.typechecker.treegen.WalkergenParser)1