Class: RLTK::Parser::ProdProc
- Inherits:
-
Proc
- Object
- Proc
- RLTK::Parser::ProdProc
- Defined in:
- lib/rltk/parser.rb
Overview
A subclass of Proc that indicates how it should be passed arguments by the parser.
Instance Attribute Summary collapse
-
#arg_type ⇒ :array, :splat
readonly
Method that should be used to pass arguments to this proc.
-
#selections ⇒ Array<Integer>
readonly
Mask for selection of tokens to pass to action.
Instance Method Summary collapse
-
#initialize(arg_type = :splat, selections = []) ⇒ ProdProc
constructor
A new instance of ProdProc.
Constructor Details
#initialize(arg_type = :splat, selections = []) ⇒ ProdProc
Returns a new instance of ProdProc.
1619 1620 1621 1622 1623 |
# File 'lib/rltk/parser.rb', line 1619 def initialize(arg_type = :splat, selections = []) super() @arg_type = arg_type @selections = selections end |
Instance Attribute Details
#arg_type ⇒ :array, :splat (readonly)
Returns Method that should be used to pass arguments to this proc.
1614 1615 1616 |
# File 'lib/rltk/parser.rb', line 1614 def arg_type @arg_type end |
#selections ⇒ Array<Integer> (readonly)
Returns Mask for selection of tokens to pass to action. Empty mask means pass all.
1617 1618 1619 |
# File 'lib/rltk/parser.rb', line 1617 def selections @selections end |