Parent

Methods

Dhaka::ParseTreeCompositeNode

These are composite nodes of the syntax tree returned by the successful parsing of a token stream.

Attributes

child_nodes[R]
production[R]

Public Instance Methods

to_dot(graph) click to toggle source

Returns the dot representation of this node.

# File lib/dhaka/parser/parse_tree.rb, line 23
def to_dot graph
  graph.node(self, :label => production)
  child_nodes.each do |child|
    graph.edge(self, child)
    child.to_dot(graph)
  end
end
tokens() click to toggle source
# File lib/dhaka/parser/parse_tree.rb, line 14
def tokens
  child_nodes.collect{|child_node| child_node.tokens}.flatten
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.