Class: Yaparc::Ident

Inherits:
Object
  • Object
show all
Includes:
Parsable
Defined in:
lib/yaparc.rb

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

#tree

Instance Method Summary collapse

Methods included from Parsable

#parse

Constructor Details

#initializeIdent

Returns a new instance of Ident.



537
538
539
540
541
542
543
544
545
546
# File 'lib/yaparc.rb', line 537

def initialize
  @parser = lambda do |input|
    Seq.new(
            Satisfy.new(IS_LOWER),
            Many.new(Satisfy.new(IS_ALPHANUM),"")
            ) do |head, tail|
      head + tail
    end
  end
end