Class: ANTLR3::AST::RewriteRuleNodeStream

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

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

Raises:

  • (TypeError)

1377
1378
1379
# File 'lib/antlr3/tree.rb', line 1377

def dup( el )
  raise TypeError, "dup can't be called for a node stream"
end

#to_tree(el) ⇒ Object


1373
1374
1375
# File 'lib/antlr3/tree.rb', line 1373

def to_tree( el )
  @adaptor.copy_node( el )
end