private static Tree findFootNode ( Tree t ) { Tree footNode = findFootNodeHelper ( t ) ; Tree result = footNode ; if ( footNode != null ) { Tree parent = footNode . parent ( t ) ; int i = parent . indexOf ( footNode ) ; Tree newFootNode = footNode . treeFactory ( ) . newTreeNode ( footNode . label ( ) , new ArrayList < Tree > ( ) ) ; parent . setChild ( i , newFootNode ) ; result = newFootNode ; } return result ; }
Returns the foot node of the adjunction tree which is the terminal node that ends in