Class: Spectre::Directives::ShortestDirective
- Inherits:
-
Spectre::Directive
- Object
- Node
- Spectre::Directive
- Spectre::Directives::ShortestDirective
- Defined in:
- lib/spectre/generic/directives.rb
Overview
Forces Unions to take the alternative that successfully matches the shortest input. All alternatives will be tried.
Shortcut: shortest_d
Instance Attribute Summary
Attributes inherited from Spectre::Directive
#iter_skipper, #iter_transformation, #pre_skip
Attributes inherited from Node
#actions, #backtrace, #left, #parent, #parser, #policy, #right, #symbols
Instance Method Summary collapse
Methods inherited from Spectre::Directive
#[], #initialize, #parse, policy, policy!, skipper!, transformation!
Methods inherited from Node
#%, #&, #*, #**, #+, #-, #-@, #>>, #[], #^, #backtrack, #chain, #closure, #closure=, #closure?, #find, #initialize, #initialize_copy, #leaf?, #parse, #replace_with, #root?, #shallow_copy, #to_p, #|, #~@
Constructor Details
This class inherits a constructor from Spectre::Directive
Instance Method Details
#inspect ⇒ Object
173 174 175 |
# File 'lib/spectre/generic/directives.rb', line 173 def inspect "[shortest_d:#{@left.inspect}]" end |