Package org.antlr.runtime

Examples of org.antlr.runtime.RuleReturnScope


    assertEquals("testing rule element", expecting, actual);
  }

  @Test public void test_element8() throws Exception {
    // gunit test on line 136
    RuleReturnScope rstruct = (RuleReturnScope)execParser("element", "'while'*", 136);
    Object actual = ((Tree)rstruct.getTree()).toStringTree();
    Object expecting = "(* (BLOCK (ALT 'while')))";
    assertEquals("testing rule element", expecting, actual);
  }
View Full Code Here


    assertEquals("testing rule element", expecting, actual);
  }

  @Test public void test_element9() throws Exception {
    // gunit test on line 137
    RuleReturnScope rstruct = (RuleReturnScope)execParser("element", "'a'+", 137);
    Object actual = ((Tree)rstruct.getTree()).toStringTree();
    Object expecting = "(+ (BLOCK (ALT 'a')))";
    assertEquals("testing rule element", expecting, actual);
  }
View Full Code Here

    assertEquals("testing rule element", expecting, actual);
  }

  @Test public void test_element10() throws Exception {
    // gunit test on line 138
    RuleReturnScope rstruct = (RuleReturnScope)execParser("element", "a[3]", 138);
    Object actual = ((Tree)rstruct.getTree()).toStringTree();
    Object expecting = "(a 3)";
    assertEquals("testing rule element", expecting, actual);
  }
View Full Code Here

    assertEquals("testing rule element", expecting, actual);
  }

  @Test public void test_element11() throws Exception {
    // gunit test on line 139
    RuleReturnScope rstruct = (RuleReturnScope)execParser("element", "'a'..'z'+", 139);
    Object actual = ((Tree)rstruct.getTree()).toStringTree();
    Object expecting = "(+ (BLOCK (ALT (.. 'a' 'z'))))";
    assertEquals("testing rule element", expecting, actual);
  }
View Full Code Here

    assertEquals("testing rule element", expecting, actual);
  }

  @Test public void test_element12() throws Exception {
    // gunit test on line 140
    RuleReturnScope rstruct = (RuleReturnScope)execParser("element", "x=ID", 140);
    Object actual = ((Tree)rstruct.getTree()).toStringTree();
    Object expecting = "(= x ID)";
    assertEquals("testing rule element", expecting, actual);
  }
View Full Code Here

    assertEquals("testing rule element", expecting, actual);
  }

  @Test public void test_element13() throws Exception {
    // gunit test on line 141
    RuleReturnScope rstruct = (RuleReturnScope)execParser("element", "x=ID?", 141);
    Object actual = ((Tree)rstruct.getTree()).toStringTree();
    Object expecting = "(? (BLOCK (ALT (= x ID))))";
    assertEquals("testing rule element", expecting, actual);
  }
View Full Code Here

    assertEquals("testing rule element", expecting, actual);
  }

  @Test public void test_element14() throws Exception {
    // gunit test on line 142
    RuleReturnScope rstruct = (RuleReturnScope)execParser("element", "x=ID*", 142);
    Object actual = ((Tree)rstruct.getTree()).toStringTree();
    Object expecting = "(* (BLOCK (ALT (= x ID))))";
    assertEquals("testing rule element", expecting, actual);
  }
View Full Code Here

    assertEquals("testing rule element", expecting, actual);
  }

  @Test public void test_element15() throws Exception {
    // gunit test on line 143
    RuleReturnScope rstruct = (RuleReturnScope)execParser("element", "x=b", 143);
    Object actual = ((Tree)rstruct.getTree()).toStringTree();
    Object expecting = "(= x b)";
    assertEquals("testing rule element", expecting, actual);
  }
View Full Code Here

    assertEquals("testing rule element", expecting, actual);
  }

  @Test public void test_element16() throws Exception {
    // gunit test on line 144
    RuleReturnScope rstruct = (RuleReturnScope)execParser("element", "x=(A|B)", 144);
    Object actual = ((Tree)rstruct.getTree()).toStringTree();
    Object expecting = "(= x (BLOCK (ALT A) (ALT B)))";
    assertEquals("testing rule element", expecting, actual);
  }
View Full Code Here

    assertEquals("testing rule element", expecting, actual);
  }

  @Test public void test_element17() throws Exception {
    // gunit test on line 145
    RuleReturnScope rstruct = (RuleReturnScope)execParser("element", "x=~(A|B)", 145);
    Object actual = ((Tree)rstruct.getTree()).toStringTree();
    Object expecting = "(= x (~ (SET A B)))";
    assertEquals("testing rule element", expecting, actual);
  }
View Full Code Here

TOP

Related Classes of org.antlr.runtime.RuleReturnScope

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.