Examples of FPLParser


Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser

  @Test
  public void testBOMWCReceiver() throws ParseException {
    String string = "BOM: *.Name(Bar bar, Baz baz)";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a BOM, but is " + op.getClass().getCanonicalName(), op instanceof BeginOfMethodOp);
   
    BeginOfMethodOp invoke = (BeginOfMethodOp)op;
       
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser

  @Test
  public void testBOMStatic() throws ParseException {
    String string = "BOM: static Foo.Name(Bar bar, Baz baz) : Baz";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a BOM, but is " + op.getClass().getCanonicalName(), op instanceof BeginOfMethodOp);
   
    BeginOfMethodOp invoke = (BeginOfMethodOp)op;
       
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser

  @Test
  public void testMethodInvocation0() throws ParseException {
    String string = "Foo.mName() : Baz";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a MethodInvoke, but is " + op.getClass().getCanonicalName(), op instanceof MethodInvocationOp);
   
    MethodInvocationOp invoke = (MethodInvocationOp)op;
       
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser

  @Test
  public void testMethodInvocation1() throws ParseException {
    String string = "Foo.mName(Bar bar) : Baz";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a MethodInvoke, but is " + op.getClass().getCanonicalName(), op instanceof MethodInvocationOp);
   
    MethodInvocationOp invoke = (MethodInvocationOp)op;
       
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser

  @Test
  public void testMethodInvocation2() throws ParseException {
    String string = "Foo.mName(Bar bar, Baz baz) : Baz";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a MethodInvoke, but is " + op.getClass().getCanonicalName(), op instanceof MethodInvocationOp);
   
    MethodInvocationOp invoke = (MethodInvocationOp)op;
       
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser

  @Test
  public void testConstructor0() throws ParseException {
    String string = "Foo()";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a ConstructorOp, but is " + op.getClass().getCanonicalName(), op instanceof ConstructorOp);
   
    ConstructorOp construct = (ConstructorOp)op;
       
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser

  @Test
  public void testConstructor1() throws ParseException {
    String string = "Foo(Bar bar)";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a ConstructorOp, but is " + op.getClass().getCanonicalName(), op instanceof ConstructorOp);
   
    ConstructorOp construct = (ConstructorOp)op;
       
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser

  @Test
  public void testConstructor2() throws ParseException {
    String string = "Foo(Bar bar, Baz baz)";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a ConstructorOp, but is " + op.getClass().getCanonicalName(), op instanceof ConstructorOp);
   
    ConstructorOp construct = (ConstructorOp)op;
       
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser

  public void testTestPosPosPred() throws ParseException {
    String string = "?Foo(a, b) : c";
    RelationsEnvironment env = new RelationsEnvironment();
    env.addRelation(new Relation("Foo", new String[] {"Bar", "Baz"}));
   
    FPLParser parser = new FPLParser(string, env, new StubIType());
    Predicate pred = parser.expression();
   
    Assert.assertTrue("Parsed predicate should be a TestPredicate, but is " + pred.getClass().getCanonicalName(), pred instanceof TestPredicate);
   
    TestPredicate val = (TestPredicate)pred;
    Assert.assertTrue("Parsed predicate should be positive", val.isPositive());
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser

  public void testTestNegPosPred() throws ParseException {
    String string = "?Foo(a, b) : !c";
    RelationsEnvironment env = new RelationsEnvironment();
    env.addRelation(new Relation("Foo", new String[] {"Bar", "Baz"}));
   
    FPLParser parser = new FPLParser(string, env, new StubIType());
    Predicate pred = parser.expression();
   
    Assert.assertTrue("Parsed predicate should be a TestPredicate, but is " + pred.getClass().getCanonicalName(), pred instanceof TestPredicate);
   
    TestPredicate val = (TestPredicate)pred;
    Assert.assertTrue("Parsed predicate should be negative", !val.isPositive());
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.