Class: Rsec::PUnsignedInt64

Inherits:
PInt show all
Defined in:
lib/rsec/parsers/prim.rb

Overview

unsigned 64-bit int parser

Instance Attribute Summary

Attributes inherited from Binary

#left, #right

Attributes included from Parser

#name

Instance Method Summary collapse

Methods inherited from PInt

#_parse, #int_pattern

Methods included from Prim

#sign_strategy_to_pattern

Methods included from Parser

#&, #*, #<<, #>>, #^, #cached, #eof, #fail, #inspect, #join, #map, #maybe, #parse, #parse!, #star, #|

Constructor Details

#initialize(sign_strategy, base) ⇒ PUnsignedInt64

Returns a new instance of PUnsignedInt64.



95
96
97
98
99
# File 'lib/rsec/parsers/prim.rb', line 95

def initialize sign_strategy, base
  @base = base
  self.left = int_pattern sign_strategy, base
  self.right = 0...(1<<64)
end