Package org.jostraca.comp.antlr.collections

Examples of org.jostraca.comp.antlr.collections.AST.initialize()


    public AST create(int type) {
    Class c = getASTNodeType(type);
    AST t = create(c);
    if ( t!=null ) {
      t.initialize(type, "");
    }
    return t;
  }

  public AST create(int type, String txt) {
View Full Code Here


  }

  public AST create(int type, String txt) {
        AST t = create(type);
    if ( t!=null ) {
      t.initialize(type, txt);
    }
        return t;
    }

  /** Create an AST node with the token type and text passed in, but
View Full Code Here

   @since 2.7.2
   */
  public AST create(int type, String txt, String className) {
        AST t = create(className);
    if ( t!=null ) {
      t.initialize(type, txt);
    }
        return t;
    }

    /** Create a new empty AST node; if the user did not specify
View Full Code Here

     */
    public AST create(AST tr) {
        if (tr == null) return null;    // create(null) == null
        AST t = create(tr.getType());
    if ( t!=null ) {
      t.initialize(tr);
    }
        return t;
    }

  public AST create(Token tok) {
View Full Code Here

    }

  public AST create(Token tok) {
        AST t = create(tok.getType());
    if ( t!=null ) {
      t.initialize(tok);
    }
        return t;
    }

  /** ANTLR generates reference to this when you reference a token
View Full Code Here

        // just do the regular thing if you can't find the ctor
        // Your AST must have default ctor to use this.
        t = create(c);
        if ( t!=null ) {
          t.initialize(token);
        }
      }
    }
    catch (Exception e) {
      // for c# conversion
View Full Code Here

    public AST dup(AST t) {
    if ( t==null ) {
      return null;
    }
    AST dup_t = create(t.getClass());
    dup_t.initialize(t);
    return dup_t;
    }

    /** Duplicate tree including siblings of root. */
    public AST dupList(AST t) {
View Full Code Here

    public AST create(int type) {
    Class c = getASTNodeType(type);
    AST t = create(c);
    if ( t!=null ) {
      t.initialize(type, "");
    }
    return t;
  }

  public AST create(int type, String txt) {
View Full Code Here

  }

  public AST create(int type, String txt) {
        AST t = create(type);
    if ( t!=null ) {
      t.initialize(type, txt);
    }
        return t;
    }

  /** Create an AST node with the token type and text passed in, but
View Full Code Here

   @since 2.7.2
   */
  public AST create(int type, String txt, String className) {
        AST t = create(className);
    if ( t!=null ) {
      t.initialize(type, txt);
    }
        return t;
    }

    /** Create a new empty AST node; if the user did not specify
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.