| | @Override |
| | public synchronized void enterTableMap( QueryParser.TableMapContext ctx ) { |
| | - setContextTree( addContextLeaf( ctx ) ); |
| | + Tree<ParserRuleContext> tree = createTree( ctx ); |
| | + getContextTree().addLeaf( tree ); |
| | + |
| | + setContextTree( tree ); |
| | + } |
| | + |
| | + private String getText() { |
| | + return getContextTree().getPayload().getText(); |
| | } |
| | |
| | /** |
| | * Invoked when parsing <code>column > node</code>. Adds a new leaf to |
| | * the context tree. |
| | */ |
| | @Override |
| | public synchronized void enterColumnMap( QueryParser.ColumnMapContext ctx ) { |
| | - addContextLeaf( ctx ); |
| | + Tree<ParserRuleContext> tree = createTree( ctx ); |
| | + getContextTree().addLeaf( tree ); |
| | } |
| | |
 |
| | |
| | System.out.println( toString() ); |
| | - } |
| | - |
| | - /** |
| | - * Adds the given context to the context tree. |
| | - * |
| | - * @param ctx The parser rule context to add to the context tree. |
| | - * |
| | - * @return The leaf (the ctx parameter wrapper) that was added. |
| | - */ |
| | - private Tree<ParserRuleContext> addContextLeaf( ParserRuleContext ctx ) { |
| | - return getContextTree().addLeaf( createTree( ctx ) ); |
| | } |
| | |