Package org.antlr.runtime

Examples of org.antlr.runtime.RuleReturnScope


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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @Test public void test_element7() throws Exception {
    // gunit test on line 135
    RuleReturnScope rstruct = (RuleReturnScope)execParser("element", "b*", 135);
    Object actual = ((Tree)rstruct.getTree()).toStringTree();
    Object expecting = "(* (BLOCK (ALT 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.