Package antlr

Examples of antlr.ParseTreeRule


  protected void addCurrentTokenToParseTree()
    throws TokenStreamException
  {
    if (this.inputState.guessing > 0)
      return;
    ParseTreeRule localParseTreeRule = (ParseTreeRule)this.currentParseTreeRoot.peek();
    ParseTreeToken localParseTreeToken = null;
    if (LA(1) == 1)
      localParseTreeToken = new ParseTreeToken(new CommonToken("EOF"));
    else
      localParseTreeToken = new ParseTreeToken(LT(1));
    localParseTreeRule.addChild(localParseTreeToken);
  }
View Full Code Here


  public void traceIn(String paramString)
    throws TokenStreamException
  {
    if (this.inputState.guessing > 0)
      return;
    ParseTreeRule localParseTreeRule1 = new ParseTreeRule(paramString);
    if (this.currentParseTreeRoot.size() > 0)
    {
      ParseTreeRule localParseTreeRule2 = (ParseTreeRule)this.currentParseTreeRoot.peek();
      localParseTreeRule2.addChild(localParseTreeRule1);
    }
    this.currentParseTreeRoot.push(localParseTreeRule1);
    this.numberOfDerivationSteps += 1;
  }
View Full Code Here

TOP

Related Classes of antlr.ParseTreeRule

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.