Search in sources :

Example 1 with TreegenParser

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

the class Generate method tree.

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