Class: Yaparc::Ident

Inherits:
Object
  • Object
show all
Includes:
Parsable
Defined in:
lib/yaparc/ident.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 Method Summary collapse

Methods included from Parsable

#parse

Constructor Details

#initializeIdent

Returns a new instance of Ident.



7
8
9
10
11
12
13
14
15
16
# File 'lib/yaparc/ident.rb', line 7

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