Package org.antlr.runtime.tree

Examples of org.antlr.runtime.tree.CommonTreeNodeStream.LT()


    // CALL 102
    stream.push(indexOf102);
    assertEquals(102, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 102
    assertEquals(Token.DOWN, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume DN
    assertEquals(103, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 103
    assertEquals(Token.UP, ((Tree)stream.LT(1)).getType());
    // RETURN (to empty stack)
View Full Code Here


    stream.push(indexOf102);
    assertEquals(102, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 102
    assertEquals(Token.DOWN, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume DN
    assertEquals(103, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 103
    assertEquals(Token.UP, ((Tree)stream.LT(1)).getType());
    // RETURN (to empty stack)
    stream.pop();
    assertEquals(Token.EOF, ((Tree)stream.LT(1)).getType());
View Full Code Here

    stream.consume(); // consume 102
    assertEquals(Token.DOWN, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume DN
    assertEquals(103, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 103
    assertEquals(Token.UP, ((Tree)stream.LT(1)).getType());
    // RETURN (to empty stack)
    stream.pop();
    assertEquals(Token.EOF, ((Tree)stream.LT(1)).getType());

    // CALL 104
View Full Code Here

    assertEquals(103, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 103
    assertEquals(Token.UP, ((Tree)stream.LT(1)).getType());
    // RETURN (to empty stack)
    stream.pop();
    assertEquals(Token.EOF, ((Tree)stream.LT(1)).getType());

    // CALL 104
    stream.push(indexOf104);
    assertEquals(104, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 102
View Full Code Here

    stream.pop();
    assertEquals(Token.EOF, ((Tree)stream.LT(1)).getType());

    // CALL 104
    stream.push(indexOf104);
    assertEquals(104, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 102
    assertEquals(Token.DOWN, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume DN
    assertEquals(105, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 103
View Full Code Here

    // CALL 104
    stream.push(indexOf104);
    assertEquals(104, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 102
    assertEquals(Token.DOWN, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume DN
    assertEquals(105, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 103
    assertEquals(Token.UP, ((Tree)stream.LT(1)).getType());
    // RETURN (to empty stack)
View Full Code Here

    stream.push(indexOf104);
    assertEquals(104, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 102
    assertEquals(Token.DOWN, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume DN
    assertEquals(105, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 103
    assertEquals(Token.UP, ((Tree)stream.LT(1)).getType());
    // RETURN (to empty stack)
    stream.pop();
    assertEquals(Token.EOF, ((Tree)stream.LT(1)).getType());
View Full Code Here

    stream.consume(); // consume 102
    assertEquals(Token.DOWN, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume DN
    assertEquals(105, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 103
    assertEquals(Token.UP, ((Tree)stream.LT(1)).getType());
    // RETURN (to empty stack)
    stream.pop();
    assertEquals(Token.EOF, ((Tree)stream.LT(1)).getType());
  }
View Full Code Here

    assertEquals(105, ((Tree)stream.LT(1)).getType());
    stream.consume(); // consume 103
    assertEquals(Token.UP, ((Tree)stream.LT(1)).getType());
    // RETURN (to empty stack)
    stream.pop();
    assertEquals(Token.EOF, ((Tree)stream.LT(1)).getType());
  }

  public void testStackStretch() throws Exception {
    // make more than INITIAL_CALL_STACK_SIZE pushes
    Tree r0 = new CommonTree(new CommonToken(101));
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.