Search in sources :

Example 1 with ValidatorgenParser

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

the class Generate method validator.

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

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 ValidatorgenLexer (org.eclipse.ceylon.compiler.typechecker.treegen.ValidatorgenLexer)1 ValidatorgenParser (org.eclipse.ceylon.compiler.typechecker.treegen.ValidatorgenParser)1