Package tool.model.grammar.ForteParser

Examples of tool.model.grammar.ForteParser.project_return


      CommonTree tree = null;
      CommonTokenStream tokens = createTokenStream(source);
      parser.setTokenStream(tokens);
      parser.setErrorReporter(this);
      parser.setTreeAdaptor(adaptor);
      project_return result = parser.project();
      if (parser.getNumberOfSyntaxErrors() > 0){
        ToolPlugin.showError(parser.getNumberOfSyntaxErrors() + " Syntax error in project " + getFile().getName() + "\n"
            + this.parseErrors.toString(), null);
      } else {
        tree = (CommonTree) result.getTree();
        CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree);
        nodes.setTokenStream(tokens);
        FortePRXTree walker = new FortePRXTree(this, nodes);
        walker.project();
      }
View Full Code Here


      return;
    System.out.println("===== PRX: " + prx.getName() + " =====");
    TokenStream tokens = getStream(prx);
    parser.setTokenStream(tokens);
    parser.setTreeAdaptor(adaptor);
    project_return result = parser.project();
    CommonTree tree = (CommonTree) result.getTree();
    ForteAST walker = null;
    if (parser.getNumberOfSyntaxErrors() == 0){
      if (PRINT_TREE)
        System.out.println("Tree==>"+tree.toStringTree());
      CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree);
View Full Code Here

        "-- END METHOD DEFINITIONS\n" +
        "\n" +
        "end NavAbsConstants;\n" +
        ""));
    parser.setTreeAdaptor(adaptor);
    project_return result = parser.project();
    CommonTree tree = (CommonTree) result.getTree();
//    printTree(tree, 1);
    failOnSyntaxError("Project String" , parser, null);

  }
View Full Code Here

      return;
    System.out.println("===== PRX: " + prx.getName() + " =====");
    TokenStream tokens = getStream(prx);
    parser.setTokenStream(tokens);
    parser.setTreeAdaptor(adaptor);
    project_return result = parser.project();
    CommonTree tree = (CommonTree) result.getTree();
    ForteAST walker = null;
    if (parser.getNumberOfSyntaxErrors() == 0){
      if (PRINT_TREE)
        System.out.println("Tree==>"+tree.toStringTree());
      CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree);
View Full Code Here

        "-- END METHOD DEFINITIONS\n" +
        "\n" +
        "end NavAbsConstants;\n" +
        ""));
    parser.setTreeAdaptor(adaptor);
    project_return result = parser.project();
    CommonTree tree = (CommonTree) result.getTree();
//    printTree(tree, 1);
    failOnSyntaxError("Project String" , parser, null);

  }
View Full Code Here

      parser.setTreeAdaptor(new CommonTreeAdaptor(){
        public Object create(Token payload){
          return new CommonTree(payload);
        }
      });
      project_return result = parser.project();
      if (parser.getNumberOfSyntaxErrors() > 0){
        MessageConsole console = ToolModelActivator.findConsole(ToolModelActivator.TOOL_PARSER_OUTPUT);
        MessageConsoleStream msgStream = console.newMessageStream();
        msgStream.println(parser.getNumberOfSyntaxErrors() + " Syntax error in project " + file.getName() + "\n"
            + parseErrors.toString());
      } else {
        tree = (CommonTree) result.getTree();
        CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree);
        nodes.setTokenStream(tokens);
        ForteAST walker = new ForteAST(file, nodes);
        ToolPlan plan = walker.project();
        plan.document = document;
View Full Code Here

TOP

Related Classes of tool.model.grammar.ForteParser.project_return

Copyright © 2018 www.massapicom. 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.