List of usage examples for org.antlr.v4.runtime ParserRuleContext depth
public int depth()
From source file:tilda.grammar.TildaSQLTreePrinter.java
License:Apache License
@Override public void enterEveryRule(ParserRuleContext ctx) { LOG.debug(PaddingUtil.getPad(ctx.depth() * 3) + _Parser.getRuleNames()[ctx.getRuleIndex()]); if (isLeafNode(ctx) == true) LOG.debug(PaddingUtil.getPad(ctx.depth() * 3) + " -] " + ctx.getText()); if (_Path.containsKey(ctx.parent) == false) _Path.put(ctx.parent, new ArrayList<String>()); if (_Path.containsKey(ctx) == false) _Path.put(ctx, new ArrayList<String>()); _Path.get(ctx).add(_Parser.getRuleNames()[ctx.getRuleIndex()]); }