Class: Dhaka::ParseTreeCompositeNode

### Home Classes Methods

### In Files

- lib/dhaka/parser/parse_tree.rb

### Parent

Object

### Methods

- #to_dot
- #tokens

### Class/Module Index

Quicksearch

- Dhaka
- Dhaka::CompiledLexer
- Dhaka::CompiledParser
- Dhaka::Evaluator
- Dhaka::Grammar
- Dhaka::GrammarSymbol
- Dhaka::Lexeme
- Dhaka::Lexer
- Dhaka::LexerRun
- Dhaka::LexerSpecification
- Dhaka::LexerSupport
- Dhaka::LexerSupport::AcceptAction
- Dhaka::LexerSupport::CheckpointAction
- Dhaka::LexerSupport::DFARun
- Dhaka::LexerSupport::InvalidRegexException
- Dhaka::LexerSupport::LookaheadAcceptAction
- Dhaka::LexerSupport::RegexParser
- Dhaka::LexerSupport::RegexTokenizer
- Dhaka::LexerSupport::State
- Dhaka::LexerSupport::StateMachine
- Dhaka::NoStartProductionsError
- Dhaka::ParseErrorResult
- Dhaka::ParseSuccessResult
- Dhaka::ParseTreeCompositeNode
- Dhaka::ParseTreeLeafNode
- Dhaka::Parser
- Dhaka::ParserMethods
- Dhaka::PrecedenceBuilder
- Dhaka::Production
- Dhaka::ProductionBuilder
- Dhaka::Token
- Dhaka::Tokenizer
- Dhaka::TokenizerErrorResult
- Dhaka::TokenizerState
- Dhaka::TokenizerSuccessResult

No matching classes.

# 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.