Class: SbuilderSexp::ChooseExpression
- Inherits:
-
SimpleExpression
- Object
- Treetop::Runtime::SyntaxNode
- Root
- AbstactExpression
- SimpleExpression
- SbuilderSexp::ChooseExpression
- Defined in:
- lib/parser/parser_nodes.rb
Instance Method Summary collapse
-
#binds_node ⇒ BoundInExpression
Root node for x in S.
-
#choose_expression ⇒ AbstractExpression
Choose defines ‘choose_expression’ in left hand size in binary tree modeling expression.
-
#name ⇒ String
For documentation purposes symbol table context needs a name (For procedures, and macros name is ovbious. For a set expression we define name set a string “Set+<generator set>”.
-
#symbol_definition ⇒ Hash
for the bind variabe in choose.
-
#symbol_definitions ⇒ Hash:Array
See ‘symbol_definition’.
Methods inherited from SimpleExpression
Methods inherited from AbstactExpression
#expression_postfix, #expression_prefix, #expression_val, #expressions, #has_rhs, #lhs_node, #node_value, #rhs_node, #traverse
Methods inherited from Treetop::Runtime::SyntaxNode
#node_type, #node_value, #recursive_inject, #recursive_inject_parent, #recursive_select, #value
Instance Method Details
#binds_node ⇒ BoundInExpression
Returns root node for x in S.
389 390 391 |
# File 'lib/parser/parser_nodes.rb', line 389 def binds_node recursive_select( SbuilderSexp::BoundInExpression ).first end |
#choose_expression ⇒ AbstractExpression
Choose defines ‘choose_expression’ in left hand size in binary tree modeling expression.
397 398 399 |
# File 'lib/parser/parser_nodes.rb', line 397 def choose_expression expressions.first end |
#name ⇒ String
For documentation purposes symbol table context needs a name (For procedures, and macros name is ovbious. For a set expression we define name set a string “Set+<generator set>”
407 408 409 |
# File 'lib/parser/parser_nodes.rb', line 407 def name "Choose-in-#{binds_node.bind_set.text_value}" end |
#symbol_definition ⇒ Hash
for the bind variabe in choose
418 419 420 |
# File 'lib/parser/parser_nodes.rb', line 418 def symbol_definition { :node_type => node_type, :value => binds_node.bind_var.expression_val, :tree=>binds_node } end |
#symbol_definitions ⇒ Hash:Array
Returns see ‘symbol_definition’.
412 413 414 |
# File 'lib/parser/parser_nodes.rb', line 412 def symbol_definitions [symbol_definition] end |