Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/rxm.git
source/java/com/whitemagicsoftware/rxm/Parser.java
@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 &gt; 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 ) );
}
test/people.rxm
.id > @id,
.legal_name > name,
+address > address,
+street > street,
;

Reverted to fix bug.

Author Dave Jarvis <email>
Date 2015-03-06 19:58:19 GMT-0800
Commit a4a0e109f1db5d35ab95c1c6e0be0cffda702bbd
Parent 7b98141
Delta 12 lines added, 13 lines removed, 1-line decrease