Package edu.cmu.cs.fusion.parsers.predicate

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser.operation()


  @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


  @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

  @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

  @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

    try {
      for (IMemberValuePair pair : constraint.getMemberValuePairs()) {
        String name = pair.getMemberName();
        if (name.equals("op")) {
          parser.reset((String)pair.getValue());
          op = parser.operation();
        }
        else if (name.equals("trigger")) {
          parser.reset((String)pair.getValue());
          trigger = parser.expression();
        }
View Full Code Here

        String name = node.getNodeName();
       
        if (name.equals("op")) {
          assert op == null;
          parser.reset(node.getTextContent());
          op = parser.operation();
        }
        else if (name.equals("trg")) {
          assert trigger == null;
          parser.reset(node.getTextContent());
          trigger = parser.expression();
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.