Tabnine Logo
org.antlr.v4.tool.ast
Code IndexAdd Tabnine to your IDE (free)

How to use org.antlr.v4.tool.ast

Best Java code snippets using org.antlr.v4.tool.ast (Showing top 20 results out of 315)

origin: com.impetus.fabric/fabric-jdbc-driver-shaded

public String getRuleName() {
  GrammarAST nameNode = (GrammarAST)getChild(0);
  if ( nameNode!=null ) return nameNode.getText();
  return null;
}
origin: org.antlr/antlr4

  @Override
  public String toString() {
    return label.getText()+" "+type+" "+element.toString();
  }
}
origin: org.antlr/antlr4

  public CodeBlockForOuterMostAlt(OutputModelFactory factory, Alternative alt) {
    super(factory);
    this.alt = alt;
    altLabel = alt.ast.altLabel!=null ? alt.ast.altLabel.getText() : null;
  }
}
origin: com.impetus.fabric/fabric-jdbc-driver-shaded

public CommonTree getFirstDescendantWithType(int type) {
  if ( getType()==type ) return this;
  if ( children==null ) return null;
  for (Object c : children) {
    GrammarAST t = (GrammarAST)c;
    if ( t.getType()==type ) return t;
    CommonTree d = t.getFirstDescendantWithType(type);
    if ( d!=null ) return d;
  }
  return null;
}
origin: org.antlr/antlr4

@Override
public Object dupNode(Object t) {
  if ( t==null ) return null;
  return ((GrammarAST)t).dupNode(); //create(((GrammarAST)t).token);
}
origin: io.virtdata/virtdata-lib-realer

public AltAST getOutermostAltNode() {
  if ( this instanceof AltAST && parent.parent instanceof RuleAST ) {
    return (AltAST)this;
  }
  if ( parent!=null ) return ((GrammarAST)parent).getOutermostAltNode();
  return null;
}
origin: org.antlr/antlr4

@Override
public GrammarAST dupNode() {
  return new GrammarAST(this);
}
origin: org.antlr/antlr4

@Override
public SetAST dupNode() {
  return new SetAST(this);
}
origin: org.antlr/antlr4

  @Override
  public Object errorNode(org.antlr.runtime.TokenStream input, org.antlr.runtime.Token start, org.antlr.runtime.Token stop,
              org.antlr.runtime.RecognitionException e)
  {
    return new GrammarASTErrorNode(input, start, stop, e);
  }
}
origin: org.antlr/antlr4

public String getRuleName() {
  GrammarAST nameNode = (GrammarAST)getChild(0);
  if ( nameNode!=null ) return nameNode.getText();
  return null;
}
origin: org.antlr/antlr4

public CommonTree getFirstDescendantWithType(int type) {
  if ( getType()==type ) return this;
  if ( children==null ) return null;
  for (Object c : children) {
    GrammarAST t = (GrammarAST)c;
    if ( t.getType()==type ) return t;
    CommonTree d = t.getFirstDescendantWithType(type);
    if ( d!=null ) return d;
  }
  return null;
}
origin: com.impetus.fabric/fabric-jdbc-driver-shaded

  @Override
  public String toString() {
    return label.getText()+" "+type+" "+element.toString();
  }
}
origin: com.tunnelvisionlabs/antlr4

  public CodeBlockForOuterMostAlt(OutputModelFactory factory, Alternative alt) {
    super(factory);
    this.alt = alt;
    altLabel = alt.ast.altLabel!=null ? alt.ast.altLabel.getText() : null;
  }
}
origin: com.tunnelvisionlabs/antlr4

@Override
public GrammarAST dupNode(Object t) {
  if ( t==null ) return null;
  return ((GrammarAST)t).dupNode(); //create(((GrammarAST)t).token);
}
origin: org.antlr/antlr4

public AltAST getOutermostAltNode() {
  if ( this instanceof AltAST && parent.parent instanceof RuleAST ) {
    return (AltAST)this;
  }
  if ( parent!=null ) return ((GrammarAST)parent).getOutermostAltNode();
  return null;
}
origin: uk.co.nichesolutions/antlr4

public String getRuleName() {
  GrammarAST nameNode = (GrammarAST)getChild(0);
  if ( nameNode!=null ) return nameNode.getText();
  return null;
}
origin: io.virtdata/virtdata-lib-realer

public CommonTree getFirstDescendantWithType(int type) {
  if ( getType()==type ) return this;
  if ( children==null ) return null;
  for (Object c : children) {
    GrammarAST t = (GrammarAST)c;
    if ( t.getType()==type ) return t;
    CommonTree d = t.getFirstDescendantWithType(type);
    if ( d!=null ) return d;
  }
  return null;
}
origin: io.virtdata/virtdata-lib-realer

  public CodeBlockForOuterMostAlt(OutputModelFactory factory, Alternative alt) {
    super(factory);
    this.alt = alt;
    altLabel = alt.ast.altLabel!=null ? alt.ast.altLabel.getText() : null;
  }
}
origin: com.tunnelvisionlabs/antlr4

public String getRuleName() {
  GrammarAST nameNode = (GrammarAST)getChild(0);
  if ( nameNode!=null ) return nameNode.getText();
  return null;
}
origin: io.virtdata/virtdata-lib-realer

public String getRuleName() {
  GrammarAST nameNode = (GrammarAST)getChild(0);
  if ( nameNode!=null ) return nameNode.getText();
  return null;
}
org.antlr.v4.tool.ast

Most used classes

  • GrammarAST
  • GrammarRootAST
  • RuleAST
  • RuleRefAST
  • ActionAST
  • BlockAST,
  • GrammarASTErrorNode,
  • GrammarASTVisitor,
  • GrammarASTWithOptions,
  • NotAST,
  • OptionalBlockAST,
  • PlusBlockAST,
  • PredAST,
  • QuantifierAST,
  • RangeAST,
  • SetAST,
  • StarBlockAST,
  • TerminalAST
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now