Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/rxm.git

Updated comments.

Author Dave Jarvis <email>
Date 2015-03-07 20:01:24 GMT-0800
Commit dd442c7ef8f0f0ce58610f71c8b53e0330da7795
Parent 3812827
Delta 17 lines added, 18 lines removed, 1-line decrease
source/java/com/whitemagicsoftware/rxm/Parser.java
* sets the context tree to the root context node.
*
- * @param ctx The root context node.
+ * @param ctx The payload to transform.
*/
@Override
public synchronized void enterRoot( QueryParser.RootContext ctx ) {
setContextTree( createTree( ctx ) );
}
/**
- * Invoked when parsing <code>table &gt; node</code>. Adds a new leaf to
+ * Invoked when parsing <code>table &gt; path</code>. Adds a new leaf to
* the context tree, then changes the context tree to the newly added leaf.
+ *
+ * @param ctx The payload to transform.
*/
@Override
public synchronized void enterTableMap( QueryParser.TableMapContext ctx ) {
setContextTree( addLeaf( ctx ) );
}
/**
- * Invoked when parsing <code>column &gt; node</code>. Adds a new leaf to
+ * Invoked when parsing <code>column &gt; path</code>. Adds a new leaf to
* the context tree.
+ *
+ * @param ctx The payload to transform.
*/
@Override
public synchronized void enterColumnMap( QueryParser.ColumnMapContext ctx ) {
addLeaf( ctx );
}
+ /**
+ * Invoked when parsing <code>column &gt; attribute</code>. Adds a new leaf
+ * to the context tree.
+ *
+ * @param ctx The payload to transform.
+ */
@Override
public synchronized void enterAttributeMap(
QueryParser.AttributeMapContext ctx ) {
addLeaf( ctx );
}
/**
* Invoked when parsing <code>^</code>. Changes context tree to its parent.
* If the parent doesn't exist, this will fail silently.
+ *
+ * @param ctx Indicates that context should switch, has no payload.
*/
@Override
/**
* Invoked when there are no more <b>rxm</b> tokens to parse.
+ *
+ * @param ctx Indicates that the query has been parsed.
*/
@Override
public synchronized void exitQuery( QueryParser.QueryContext ctx ) {
- /*
- push( "XMLROOT(" );
- push( String.format( "XMLELEMENT( NAME \"%s\"", root ) );
-
- push( ")" );
- push( ", VERSION '1.0', STANDALONE YES)" );
-
- String s = String.format( "XMLELEMENT( \"%s\" AS %s )",
- ctx.getText(), "COLUMN" );
- push( s );
- String s = String.format( "XMLATTRIBUTES( %s AS \"%s\" )",
- "COLUMN", ctx.getText().substring(1) );
- push( s );
- */
-
System.out.println( getContextTree().getRoot().toString() );
}