Package org.antlr.runtime3_3_0.tree

Examples of org.antlr.runtime3_3_0.tree.BufferedTreeNodeStream$StreamIterator


      e.printStackTrace();
    }
  }
*/
  public void process() throws IOException {
    CharStream input = new ANTLRFileStream(dispelFile);
    DISPEL lexer = new DISPEL(input);
    Token token;
    while ((token = lexer.nextToken()) != Token.EOF_TOKEN) {
      tp.process(token);
    }
View Full Code Here


  public Generator(InputStream is)  {
    tp = new TokenProcessor(docType, tabSize, latexSpaceSize, numberLines);
   
    CharStream input;
    try {
      input = new ANTLRInputStream(is);
     
      DISPEL lexer = new DISPEL(input);
      Token token;
       
        while ((token = lexer.nextToken()).getType() !=
View Full Code Here

      e.printStackTrace();
    }
  }
*/
  public void process() throws IOException {
    CharStream input = new ANTLRFileStream(dispelFile);
    DISPEL lexer = new DISPEL(input);
    Token token;
    while ((token = lexer.nextToken()) != Token.EOF_TOKEN) {
      tp.process(token);
    }
View Full Code Here

*/

  public Generator(InputStream is)  {
    tp = new TokenProcessor(docType, tabSize, latexSpaceSize, numberLines);
   
    CharStream input;
    try {
      input = new ANTLRInputStream(is);
     
      DISPEL lexer = new DISPEL(input);
      Token token;
View Full Code Here

    }

    // Wildcard?
    if ( ttype == TreePatternLexer.DOT ) {
      ttype = tokenizer.nextToken();
      Token wildcardPayload = new CommonToken(0, ".");
      TreeWizard.TreePattern node =
        new TreeWizard.WildcardTreePattern(wildcardPayload);
      if ( label!=null ) {
        node.label = label;
      }
View Full Code Here

   *
   *  If you care what the token payload objects' type is, you should
   *  override this method and any other createToken variant.
   */
  public Token createToken(int tokenType, String text) {
    return new CommonToken(tokenType, text);
  }
View Full Code Here

   *
   *  If you care what the token payload objects' type is, you should
   *  override this method and any other createToken variant.
   */
  public Token createToken(Token fromToken) {
    return new CommonToken(fromToken);
  }
View Full Code Here

                    BitSet follow)
  {
    String tokenText =
      "<missing "+getTokenNames()[expectedTokenType]+">";
        TreeAdaptor adaptor = ((TreeNodeStream)e.input).getTreeAdaptor();
        return adaptor.create(new CommonToken(expectedTokenType, tokenText));
  }
View Full Code Here

  public String getErrorMessage(RecognitionException e, String[] tokenNames) {
    if ( this instanceof TreeParser ) {
      TreeAdaptor adaptor = ((TreeNodeStream)e.input).getTreeAdaptor();
      e.token = adaptor.getToken(e.node);
      if ( e.token==null ) { // could be an UP/DOWN node
        e.token = new CommonToken(adaptor.getType(e.node),
                      adaptor.getText(e.node));
      }
    }
    return super.getErrorMessage(e, tokenNames);
  }
View Full Code Here

    protected Object recoverFromMismatchedToken(IntStream input,
                                                int ttype,
                                                BitSet follow)
        throws RecognitionException
    {
        throw new MismatchedTreeNodeException(ttype, (TreeNodeStream)input);
    }
View Full Code Here

TOP

Related Classes of org.antlr.runtime3_3_0.tree.BufferedTreeNodeStream$StreamIterator

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.