throw new SemanticException("TOK_SELECT expected in incremental rewriting"); ASTNode selectExprNodeInUpdate = (ASTNode) ParseDriver.adaptor.dupNode(selectExprNodeInputROJ); ASTNode dotNodeInUpdate = (ASTNode) ParseDriver.adaptor.dupNode(dotNodeInputROJ); ASTNode columnTokNodeInUpdate = (ASTNode) ParseDriver.adaptor.dupNode(columnTokNodeInputROJ); ASTNode tableNameNodeInUpdate = (ASTNode) ParseDriver.adaptor.dupNode(subqueryNodeInputROJ.getChild(1)); ASTNode rowIdNodeInUpdate = (ASTNode) ParseDriver.adaptor.dupNode(rowIdNodeInputROJ); ParseDriver.adaptor.addChild(selectExprNodeInUpdate, dotNodeInUpdate); ParseDriver.adaptor.addChild(dotNodeInUpdate, columnTokNodeInUpdate);
@Override protected Object toTree(Object el) { return adaptor.dupNode(el); }
@Override protected Object toTree(Object el) { return adaptor.dupNode(el); }
@Override protected Object toTree(Object el) { return adaptor.dupNode(el); }
@Override protected Object toTree(Object el) { return adaptor.dupNode(el); }
@Override protected Object toTree(Object el) { return adaptor.dupNode(el); }
protected Object toTree(Object el) { return adaptor.dupNode(el); }
@Override public Object dupNode(Object treeNode) { Object d = adaptor.dupNode(treeNode); dbg.createNode(d); return d; }
@Override public Object dupNode(Object treeNode) { Object d = adaptor.dupNode(treeNode); dbg.createNode(d); return d; }
@Override public Object dupNode(Object treeNode) { Object d = adaptor.dupNode(treeNode); dbg.createNode(d); return d; }
@Override public Object dupNode(Object treeNode) { Object d = adaptor.dupNode(treeNode); dbg.createNode(d); return d; }
@Override public Object dupNode(Object treeNode) { Object d = adaptor.dupNode(treeNode); dbg.createNode(d); return d; }
public Object dupNode(Object treeNode) { Object d = adaptor.dupNode(treeNode); dbg.createNode(d); return d; }
/** Treat next element as a single node even if it's a subtree. * This is used instead of next() when the result has to be a * tree root node. Also prevents us from duplicating recently-added * children; e.g., ^(type ID)+ adds ID to type and then 2nd iteration * must dup the type node, but ID has been added. * * Referencing a rule result twice is ok; dup entire tree as * we can't be adding trees as root; e.g., expr expr. * * Hideous code duplication here with super.next(). Can't think of * a proper way to refactor. This needs to always call dup node * and super.next() doesn't know which to call: dup node or dup tree. */ public Object nextNode() { //System.out.println("nextNode: elements="+elements+", singleElement="+((Tree)singleElement).toStringTree()); int n = size(); if ( dirty || (cursor>=n && n==1) ) { // if out of elements and size is 1, dup (at most a single node // since this is for making root nodes). Object el = _next(); return adaptor.dupNode(el); } // test size above then fetch Object tree = _next(); //System.out.println("_next="+((Tree)tree).toStringTree()); Object el = adaptor.dupNode(tree); // dup just the root (want node here) return el; }
/** Treat next element as a single node even if it's a subtree. * This is used instead of next() when the result has to be a * tree root node. Also prevents us from duplicating recently-added * children; e.g., ^(type ID)+ adds ID to type and then 2nd iteration * must dup the type node, but ID has been added. * * Referencing a rule result twice is ok; dup entire tree as * we can't be adding trees as root; e.g., expr expr. * * Hideous code duplication here with super.next(). Can't think of * a proper way to refactor. This needs to always call dup node * and super.next() doesn't know which to call: dup node or dup tree. */ public Object nextNode() { //System.out.println("nextNode: elements="+elements+", singleElement="+((Tree)singleElement).toStringTree()); int n = size(); if ( dirty || (cursor>=n && n==1) ) { // if out of elements and size is 1, dup (at most a single node // since this is for making root nodes). Object el = _next(); return adaptor.dupNode(el); } // test size above then fetch Object tree = _next(); while (adaptor.isNil(tree) && adaptor.getChildCount(tree) == 1) tree = adaptor.getChild(tree, 0); //System.out.println("_next="+((Tree)tree).toStringTree()); Object el = adaptor.dupNode(tree); // dup just the root (want node here) return el; }
/** Treat next element as a single node even if it's a subtree. * This is used instead of next() when the result has to be a * tree root node. Also prevents us from duplicating recently-added * children; e.g., ^(type ID)+ adds ID to type and then 2nd iteration * must dup the type node, but ID has been added. * * Referencing a rule result twice is ok; dup entire tree as * we can't be adding trees as root; e.g., expr expr. * * Hideous code duplication here with super.next(). Can't think of * a proper way to refactor. This needs to always call dup node * and super.next() doesn't know which to call: dup node or dup tree. */ public Object nextNode() { //System.out.println("nextNode: elements="+elements+", singleElement="+((Tree)singleElement).toStringTree()); int n = size(); if ( dirty || (cursor>=n && n==1) ) { // if out of elements and size is 1, dup (at most a single node // since this is for making root nodes). Object el = _next(); return adaptor.dupNode(el); } // test size above then fetch Object tree = _next(); while (adaptor.isNil(tree) && adaptor.getChildCount(tree) == 1) tree = adaptor.getChild(tree, 0); //System.out.println("_next="+((Tree)tree).toStringTree()); Object el = adaptor.dupNode(tree); // dup just the root (want node here) return el; }
/** Treat next element as a single node even if it's a subtree. * This is used instead of next() when the result has to be a * tree root node. Also prevents us from duplicating recently-added * children; e.g., ^(type ID)+ adds ID to type and then 2nd iteration * must dup the type node, but ID has been added. * * Referencing a rule result twice is ok; dup entire tree as * we can't be adding trees as root; e.g., expr expr. * * Hideous code duplication here with super.next(). Can't think of * a proper way to refactor. This needs to always call dup node * and super.next() doesn't know which to call: dup node or dup tree. */ public Object nextNode() { //System.out.println("nextNode: elements="+elements+", singleElement="+((Tree)singleElement).toStringTree()); int n = size(); if ( dirty || (cursor>=n && n==1) ) { // if out of elements and size is 1, dup (at most a single node // since this is for making root nodes). Object el = _next(); return adaptor.dupNode(el); } // test size above then fetch Object tree = _next(); while (adaptor.isNil(tree) && adaptor.getChildCount(tree) == 1) tree = adaptor.getChild(tree, 0); //System.out.println("_next="+((Tree)tree).toStringTree()); Object el = adaptor.dupNode(tree); // dup just the root (want node here) return el; }
public final CmisQueryWalker_CmisBaseWalker.correlation_name_return correlation_name() throws RecognitionException { CmisQueryWalker_CmisBaseWalker.correlation_name_return retval = new CmisQueryWalker_CmisBaseWalker.correlation_name_return(); retval.start = input.LT(1); CommonTree root_0 = null; CommonTree _first_0 = null; CommonTree _last = null; CommonTree ID107=null; CommonTree ID107_tree=null; try { // CmisBaseWalker.g:352:17: ( ID ) // CmisBaseWalker.g:353:5: ID { root_0 = (CommonTree)adaptor.nil(); _last = (CommonTree)input.LT(1); ID107=(CommonTree)match(input,ID,FOLLOW_ID_in_correlation_name1244); ID107_tree = (CommonTree)adaptor.dupNode(ID107); adaptor.addChild(root_0, ID107_tree); } retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); } catch (RecognitionException e) { throw e; } finally { // do for sure before leaving } return retval; } // $ANTLR end "correlation_name"
public final CmisQueryWalker_CmisBaseWalker.table_name_return table_name() throws RecognitionException { CmisQueryWalker_CmisBaseWalker.table_name_return retval = new CmisQueryWalker_CmisBaseWalker.table_name_return(); retval.start = input.LT(1); CommonTree root_0 = null; CommonTree _first_0 = null; CommonTree _last = null; CommonTree ID108=null; CommonTree ID108_tree=null; try { // CmisBaseWalker.g:355:11: ( ID ) // CmisBaseWalker.g:356:5: ID { root_0 = (CommonTree)adaptor.nil(); _last = (CommonTree)input.LT(1); ID108=(CommonTree)match(input,ID,FOLLOW_ID_in_table_name1255); ID108_tree = (CommonTree)adaptor.dupNode(ID108); adaptor.addChild(root_0, ID108_tree); } retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); } catch (RecognitionException e) { throw e; } finally { // do for sure before leaving } return retval; } // $ANTLR end "table_name"
public final CmisQueryWalker_CmisBaseWalker.column_name_return column_name() throws RecognitionException { CmisQueryWalker_CmisBaseWalker.column_name_return retval = new CmisQueryWalker_CmisBaseWalker.column_name_return(); retval.start = input.LT(1); CommonTree root_0 = null; CommonTree _first_0 = null; CommonTree _last = null; CommonTree ID109=null; CommonTree ID109_tree=null; try { // CmisBaseWalker.g:358:12: ( ID ) // CmisBaseWalker.g:359:5: ID { root_0 = (CommonTree)adaptor.nil(); _last = (CommonTree)input.LT(1); ID109=(CommonTree)match(input,ID,FOLLOW_ID_in_column_name1266); ID109_tree = (CommonTree)adaptor.dupNode(ID109); adaptor.addChild(root_0, ID109_tree); } retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); } catch (RecognitionException e) { throw e; } finally { // do for sure before leaving } return retval; } // $ANTLR end "column_name"