Package wyvern.tools.typedAST.interfaces

Examples of wyvern.tools.typedAST.interfaces.TypedAST


      "  A => 15                                   \n" //Error, this will catch everything
      "  B => 15                                   \n" + //So anything after is pointless
      "  C => 25                                   \n" +
      "  default => 35                             \n";
   
    TypedAST ast = getAST(input);
   
    typeCheckfailWith(ast, ErrorMessage.SUPERTAG_PRECEEDS_SUBTAG);
  }
View Full Code Here


      "  C => 15                                   \n"
      "  B => 15                                   \n" + //Error, this will catch the D just below
      "  D => 25                                   \n" +
      "  A => 25                                   \n";
   
    TypedAST ast = getAST(input);
   
    typeCheckfailWith(ast, ErrorMessage.SUPERTAG_PRECEEDS_SUBTAG);
  }
View Full Code Here

      "match(d):                                    \n" +
      "  B => 15                                   \n" +    //matches B since D is a subtag of B
      "  C => 25                                   \n" +
      "  default => 35                             \n";
   
    TypedAST ast = getAST(input);
   
    // Should be 15 because D is a subclass of B and will match that
    evaluateExpecting(ast, 15);
  }
View Full Code Here

        "  NumJSON => 10                             \n" +
        "  ObjJSON => 15                             \n" +
        "  StrJSON => 20                             \n" +
        "  default => 30                             \n";
     
      TypedAST ast = getAST(input);
     
      evaluateExpecting(ast, 25);
  }
View Full Code Here

   * Test test ensures the dynamic tag example works properly when stripped of actual
   * dynamic tag features. This is to make sure non-dynamic tag code is working.
   */
  public void nonDynamicTest() throws CopperParserException, IOException {
    String program = readFile(PATH + "NonDynamicDynamicTag.wyv");
    TypedAST ast = TagTests.getAST(program);
   
    TagTests.evaluateExpecting(ast, 2);
  }
View Full Code Here

        "                                   \n" +
        "match(x):                          \n" +
        "  X => 15                         \n" +
        "  default => 30                   \n";
       
    TypedAST ast = TagTests.getAST(input);
    TagTests.evaluateExpecting(ast, 15);
  }
View Full Code Here

        "match(x):                          \n" +
        "  Y => 20                         \n" +
        "  X => 15                         \n" +
        "  default => 30                   \n";
       
    TypedAST ast = TagTests.getAST(input);
    TagTests.evaluateExpecting(ast, 20);
  }
View Full Code Here

        "match(x):                          \n" +
        "  Y => 20                         \n" +
        "  Z => 15                         \n" +
        "  X => 30                         \n";
       
    TypedAST ast = TagTests.getAST(input);
    TagTests.evaluateExpecting(ast, 30);
  }
View Full Code Here

        "match(x):                          \n" +
        "  Y => 20                         \n" +
        "  Z => 15                         \n" +
        "  X => 30                         \n";
       
    TypedAST ast = TagTests.getAST(input);
    TagTests.evaluateExpecting(ast, 20);
  }
View Full Code Here

 
  @Test
  public void jsonTest() throws CopperParserException, IOException {
    String input = readFile(PATH + "TaggedTypeTest.wyv");
     
    TypedAST ast = TagTests.getAST(input);
     
    TagTests.evaluateExpecting(ast, 25);
  }
View Full Code Here

TOP

Related Classes of wyvern.tools.typedAST.interfaces.TypedAST

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.