Examples of compilationUnit()


Examples of openbook.tools.parser.JavaParser.compilationUnit()

        JavaLexer lexer = new JavaLexer(input);
        CommonTokenStream tokens = new CommonTokenStream(lexer);
        DebugEventListener builder = new ParseTokenListener(renderer, out);
        JavaParser parser = new JavaParser(tokens, builder);
        // launch the parser starting at compilation unit
        parser.compilationUnit();
    }
   
    /**
     * Gets the input stream.
     *
 
View Full Code Here

Examples of org.apache.avro.compiler.idl.Idl.CompilationUnit()

      URLClassLoader projPathLoader = new URLClassLoader
          (runtimeUrls.toArray(new URL[0]), Thread.currentThread().getContextClassLoader());
        parser = new Idl(new File(sourceDirectory, filename), projPathLoader);

      Protocol p = parser.CompilationUnit();
      String json = p.toString(true);
      Protocol protocol = Protocol.parse(json);
      SpecificCompiler compiler = new SpecificCompiler(protocol);
      compiler.setStringType(GenericData.StringType.valueOf(stringType));
      compiler.setTemplateDir(templateDirectory);
View Full Code Here

Examples of org.apache.avro.compiler.idl.Idl.CompilationUnit()

  @Override
  protected void doCompile(String filename, File sourceDirectory, File outputDirectory) throws IOException {
    Idl parser = new Idl(new File(sourceDirectory, filename));
    try {
      Protocol p = parser.CompilationUnit();
      String json = p.toString(true);
      Protocol protocol = Protocol.parse(json);
      SpecificCompiler compiler = new SpecificCompiler(protocol);
      compiler.compileToDestination(null, outputDirectory);
    } catch (ParseException e) {
View Full Code Here

Examples of org.apache.avro.compiler.idl.Idl.CompilationUnit()

      URLClassLoader projPathLoader = new URLClassLoader
        (runtimeUrls, Thread.currentThread().getContextClassLoader());
        parser = new Idl(new File(sourceDirectory, filename), projPathLoader);
      }

      Protocol p = parser.CompilationUnit();
      String json = p.toString(true);
      Protocol protocol = Protocol.parse(json);
      SpecificCompiler compiler = new SpecificCompiler(protocol);
      compiler.setStringType(GenericData.StringType.valueOf(stringType));
      compiler.setTemplateDir(templateDirectory);
View Full Code Here

Examples of org.apache.avro.compiler.idl.Idl.CompilationUnit()

  @Override
  protected void doCompile(String filename, File sourceDirectory, File outputDirectory) throws IOException {
    Idl parser = new Idl(new File(sourceDirectory, filename));
    try {
      Protocol p = parser.CompilationUnit();
      String json = p.toString(true);
      Protocol protocol = Protocol.parse(json);
      SpecificCompiler compiler = new SpecificCompiler(protocol);
      compiler.compileToDestination(null, outputDirectory);
    } catch (ParseException e) {
View Full Code Here

Examples of org.apache.avro.compiler.idl.Idl.CompilationUnit()

      URLClassLoader projPathLoader = new URLClassLoader
        (runtimeUrls, Thread.currentThread().getContextClassLoader());
        parser = new Idl(new File(sourceDirectory, filename), projPathLoader);
      }

      Protocol p = parser.CompilationUnit();
      String json = p.toString(true);
      Protocol protocol = Protocol.parse(json);
      SpecificCompiler compiler = new SpecificCompiler(protocol);
      compiler.setStringType(GenericData.StringType.valueOf(stringType));
      compiler.setTemplateDir(templateDirectory);
View Full Code Here

Examples of org.apache.avro.genavro.GenAvro.CompilationUnit()

      parseOut = new PrintStream(new FileOutputStream(args.get(1)));
    }


    GenAvro parser = new GenAvro(parseIn);
    Protocol p = parser.CompilationUnit();
    parseOut.print(p.toString(true));
    return 0;
  }

  @Override
View Full Code Here

Examples of org.apache.avro.idl.Idl.CompilationUnit()

   
    if (args.size() == 2 && ! "-".equals(args.get(1))) {
      parseOut = new PrintStream(new FileOutputStream(args.get(1)));
    }

    Protocol p = parser.CompilationUnit();
    parseOut.print(p.toString(true));
    return 0;
  }

  @Override
View Full Code Here

Examples of org.apache.ws.jaxme.js.jparser.JavaRecognizer.compilationUnit()

     * @return List of classes, that have been read.
     */
    public List parse(TokenStream pStream) throws RecognitionException, TokenStreamException {
      reset();
        JavaRecognizer parser = new JavaRecognizer(pStream);
      parser.compilationUnit();
      for (AST ast = parser.getAST();  ast != null;  ast = ast.getNextSibling()) {
        //showAST(0, ast);
            parseAST(ast);
        }
        return generatedClasses;
View Full Code Here

Examples of org.apache.ws.jaxme.js.jparser.JavaRecognizer.compilationUnit()

     * @return List of classes, that have been read.
     */
    public List parse(TokenStream pStream) throws RecognitionException, TokenStreamException {
      reset();
        JavaRecognizer parser = new JavaRecognizer(pStream);
      parser.compilationUnit();
      for (AST ast = parser.getAST();  ast != null;  ast = ast.getNextSibling()) {
        //showAST(0, ast);
            parseAST(ast);
        }
        return generatedClasses;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.