Class: Dhaka::LexerSupport::BinaryNode
- Defined in:
- lib/dhaka/lexer/regex_grammar.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Instance Method Summary collapse
- #calculate_follow_sets ⇒ Object
-
#initialize(left, right) ⇒ BinaryNode
constructor
A new instance of BinaryNode.
- #to_dot(graph) ⇒ Object
Methods inherited from ASTNode
Constructor Details
#initialize(left, right) ⇒ BinaryNode
Returns a new instance of BinaryNode.
143 144 145 |
# File 'lib/dhaka/lexer/regex_grammar.rb', line 143 def initialize left, right @left, @right = left, right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
142 143 144 |
# File 'lib/dhaka/lexer/regex_grammar.rb', line 142 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
142 143 144 |
# File 'lib/dhaka/lexer/regex_grammar.rb', line 142 def right @right end |
Instance Method Details
#calculate_follow_sets ⇒ Object
155 156 157 158 |
# File 'lib/dhaka/lexer/regex_grammar.rb', line 155 def calculate_follow_sets left.calculate_follow_sets right.calculate_follow_sets end |
#to_dot(graph) ⇒ Object
147 148 149 150 151 152 153 |
# File 'lib/dhaka/lexer/regex_grammar.rb', line 147 def to_dot(graph) graph.node(self, :label => label) graph.edge(self, left) graph.edge(self, right) left.to_dot(graph) right.to_dot(graph) end |