Examples of CompilationUnit()


Examples of fr.insalyon.citi.golo.compiler.parser.GoloParser.CompilationUnit()

  }

  @Test
  public void markdown_processor() throws Throwable {
    GoloParser parser = new GoloOffsetParser(new FileInputStream(SRC + "doc.golo"));
    ASTCompilationUnit compilationUnit = parser.CompilationUnit();

    MarkdownProcessor processor = new MarkdownProcessor();
    String result = processor.render(compilationUnit);
    assertThat(result, containsString("# Documentation for `Documented`"));
    assertThat(result, containsString("### `with_doc(a, b)`"));
View Full Code Here

Examples of fr.insalyon.citi.golo.compiler.parser.GoloParser.CompilationUnit()

  }

  @Test
  public void html_processor() throws Throwable {
    GoloParser parser = new GoloOffsetParser(new FileInputStream(SRC + "doc.golo"));
    ASTCompilationUnit compilationUnit = parser.CompilationUnit();

    HtmlProcessor processor = new HtmlProcessor();
    String result = processor.render(compilationUnit);
    assertThat(result, containsString("<h1>Documentation for Documented</h1>"));
    assertThat(result, containsString("<h3 id=\"with_doc_a_b\">with_doc(a, b)"));
View Full Code Here

Examples of fr.insalyon.citi.golo.compiler.parser.GoloParser.CompilationUnit()

  }

  @Test
  public void ctags_processor() throws Throwable {
    GoloParser parser = new GoloOffsetParser(new FileInputStream(SRC + "doc.golo"));
    ASTCompilationUnit compilationUnit = parser.CompilationUnit();

    CtagsProcessor processor = new CtagsProcessor();
    String result = processor.render(compilationUnit);
    assertThat(result, containsString("Documented\tfile\t/^module[:blank:]+Documented$/;\"\tp\tline:1\tlanguage:golo"));
    assertThat(result, containsString("Point\tfile\t/^struct[:blank:]+Point[:blank:]+=/;\"\ts\tline:59\tlanguage:golo"));
View Full Code Here

Examples of fr.insalyon.citi.golo.compiler.parser.GoloParser.CompilationUnit()

  public static final String SRC = "src/test/resources/for-parsing-and-compilation/";

  @Test
  public void check() throws Throwable {
    GoloParser parser = new GoloOffsetParser(new FileInputStream(SRC + "doc.golo"));
    ASTCompilationUnit compilationUnit = parser.CompilationUnit();
    ModuleDocumentation doc = new ModuleDocumentation(compilationUnit);

    assertThat(doc.moduleName(), is("Documented"));
    assertThat(doc.moduleDocumentation(), containsString("    let foo = \"bar\""));
    assertThat(doc.moduleDefLine(), is(1)); //Module doc is part of the module node
View Full Code Here

Examples of java5parsingCheckstyleGrammar.GeneratedJavaRecognizer.compilationUnit()

            final GeneratedJavaRecognizer parser = new GeneratedJavaRecognizer(
                    lexer);
            parser.setFilename(filename);
            parser.setASTNodeClass(DetailAST.class.getName());

            parser.compilationUnit(); // TokenStreamException if newline missing
           
            result.setFirstChild(parser.getAST());
            return result;

        } catch (TokenStreamException e) {
View Full Code Here

Examples of java5parsingCheckstyleGrammar.GeneratedJavaRecognizer.compilationUnit()

            final GeneratedJavaRecognizer parser = new GeneratedJavaRecognizer(
                    lexer);
            parser.setFilename(filename);
            parser.setASTNodeClass(DetailAST.class.getName());

            parser.compilationUnit(); // TokenStreamException if newline missing
           
            result.setFirstChild(parser.getAST());
            return result;

        } catch (TokenStreamException e) {
View Full Code Here

Examples of javancss.JavaParser.CompilationUnit()

     
      InputStream in = new BufferedInputStream(new FileInputStream(file), 10240);
     
      JavaParser ncssParser = new JavaParser(in);
     
      ncssParser.CompilationUnit();
     
      metrics.incPackageCount(ncssParser.getPackage());
      metrics.incNCSSCount(ncssParser.getNcss());
      metrics.incLOCCount(ncssParser.getLOC());
      metrics.incJavaDocCount(ncssParser.getJvdc());
View Full Code Here

Examples of lupos.rif.generated.parser.RIFParser.CompilationUnit()

    final RIFParser parser = new RIFParser(new StringReader(query));

    try {

      this.compilationUnit = parser.CompilationUnit();

    } catch (final ParseException e) {
      console.setText(e.getLocalizedMessage());
      bottomPane.setSelectedIndex(1);
    }
View Full Code Here

Examples of lupos.rif.generated.parser.RIFParser.CompilationUnit()

   */
  @Override
  public String handleException(final String document) {
    try {
      final RIFParser parser = new RIFParser(new StringReader(document));
      parser.CompilationUnit();

      return "NE";

    } catch (final ParseException e1) {
      return "PE " + e1.toString();
View Full Code Here

Examples of lupos.rif.generated.parser.RIFParser.CompilationUnit()

  public long compileQuery(
      final String query, final IndexScanCreatorInterface indexScanCreator) throws Exception {
    final Date start = new Date();

    final RIFParser parser = new RIFParser(new StringReader(query));
    this.compilationUnit = parser.CompilationUnit();
    this.rifDocument = (Document) this.compilationUnit.accept(new ParseSyntaxTreeVisitor(), null);
    final BuildOperatorGraphRuleVisitor forward = new BuildOperatorGraphRuleVisitor(indexScanCreator);
    final ValidateRuleVisitor valVisitor = new ValidateRuleVisitor();
    final NormalizeRuleVisitor normVisitor = new NormalizeRuleVisitor();
    final SubstituteFunctionCallsVisitor subVisitor = new SubstituteFunctionCallsVisitor();
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.