Class: ANTLR3::AST::RewriteRuleSubtreeStream

Inherits:
RewriteRuleElementStream show all
Defined in:
lib/antlr3/tree.rb

Overview

Special type of stream that is used internally by tree-building and tree- rewriting parsers.

Instance Method Summary collapse

Methods inherited from RewriteRuleElementStream

#add, #has_next?, #initialize, #next_tree, #reset, #size, #to_tree

Methods included from Error

EarlyExit, FailedPredicate, MismatchedNotSet, MismatchedRange, MismatchedSet, MismatchedToken, MismatchedTreeNode, MissingToken, NoViableAlternative, RewriteCardinalityError, RewriteEarlyExit, RewriteEmptyStream, UnwantedToken

Constructor Details

This class inherits a constructor from ANTLR3::AST::RewriteRuleElementStream

Instance Method Details

#dup(el) ⇒ Object


1358
1359
1360
# File 'lib/antlr3/tree.rb', line 1358

def dup( el )
  @adaptor.copy_tree( el )
end

#next_nodeObject


1351
1352
1353
1354
1355
1356
# File 'lib/antlr3/tree.rb', line 1351

def next_node
  if @dirty or @cursor >= length && length == 1
    return @adaptor.copy_node( __next__ )
  end
  return __next__
end