Class: Rsec::PUnsignedInt32
- Defined in:
- lib/rsec/parsers/prim.rb
Overview
unsigned 32 bit int parser
Instance Attribute Summary
Attributes inherited from Binary
Attributes included from Parser
Instance Method Summary collapse
-
#initialize(sign_strategy, base) ⇒ PUnsignedInt32
constructor
A new instance of PUnsignedInt32.
Methods inherited from PInt
Methods included from Prim
Methods included from Parser
#&, #*, #<<, #>>, #^, #cached, #eof, #fail, #inspect, #join, #map, #maybe, #parse, #parse!, #star, #|
Constructor Details
#initialize(sign_strategy, base) ⇒ PUnsignedInt32
Returns a new instance of PUnsignedInt32.
77 78 79 80 81 |
# File 'lib/rsec/parsers/prim.rb', line 77 def initialize sign_strategy, base @base = base self.left = int_pattern sign_strategy, base self.right = 0...(1<<32) end |