Class: Yaparc::Many
Overview
permits zero or more applications of parser.
Constant Summary
Constants included from Parsable
Parsable::IS_ALPHANUM, Parsable::IS_CR, Parsable::IS_DIGIT, Parsable::IS_LOWER, Parsable::IS_SPACE, Parsable::IS_WHITESPACE
Instance Attribute Summary
Attributes included from Parsable
Instance Method Summary collapse
-
#initialize(parser, identity = []) ⇒ Many
constructor
A new instance of Many.
Methods included from Parsable
Constructor Details
#initialize(parser, identity = []) ⇒ Many
Returns a new instance of Many.
305 306 307 308 309 |
# File 'lib/yaparc.rb', line 305 def initialize(parser, identity = []) @parser = lambda do |input| Alt.new(ManyOne.new(parser, identity), Succeed.new(identity)) end end |