# -*- warn-indent:false;  -*-

# line 1 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"

# line 678 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"


# THIS IS A GENERATED FILE, DO NOT EDIT DIRECTLY
# This file was generated from lib/regexp_parser/scanner/scanner.rl

class Regexp::Scanner
  # General scanner error (catch all)
  class ScannerError < StandardError; end

  # Base for all scanner validation errors
  class ValidationError < StandardError
    def initialize(reason)
      super reason
    end
  end

  # Unexpected end of pattern
  class PrematureEndError < ScannerError
    def initialize(where = '')
      super "Premature end of pattern at #{where}"
    end
  end

  # Invalid sequence format. Used for escape sequences, mainly.
  class InvalidSequenceError < ValidationError
    def initialize(what = 'sequence', where = '')
      super "Invalid #{what} at #{where}"
    end
  end

  # Invalid group. Used for named groups.
  class InvalidGroupError < ValidationError
    def initialize(what, reason)
      super "Invalid #{what}, #{reason}."
    end
  end

  # Invalid groupOption. Used for inline options.
  class InvalidGroupOption < ValidationError
    def initialize(option, text)
      super "Invalid group option #{option} in #{text}"
    end
  end

  # Invalid back reference. Used for name a number refs/calls.
  class InvalidBackrefError < ValidationError
    def initialize(what, reason)
      super "Invalid back reference #{what}, #{reason}"
    end
  end

  # The property name was not recognized by the scanner.
  class UnknownUnicodePropertyError < ValidationError
    def initialize(name)
      super "Unknown unicode character property name #{name}"
    end
  end

  # Scans the given regular expression text, or Regexp object and collects the
  # emitted token into an array that gets returned at the end. If a block is
  # given, it gets called for each emitted token.
  #
  # This method may raise errors if a syntax error is encountered.
  # --------------------------------------------------------------------------
  def self.scan(input_object, options: nil, &block)
    new.scan(input_object, options: options, &block)
  end

  def scan(input_object, options: nil, &block)
    self.literal = nil
    stack = []

    input = input_object.is_a?(Regexp) ? input_object.source : input_object
    self.free_spacing = free_spacing?(input_object, options)
    self.spacing_stack = [{:free_spacing => free_spacing, :depth => 0}]

    data  = input.unpack("c*") if input.is_a?(String)
    eof   = data.length

    self.tokens = []
    self.block  = block_given? ? block : nil

    self.set_depth = 0
    self.group_depth = 0
    self.conditional_stack = []

    
# line 93 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
class << self
	attr_accessor :_re_scanner_trans_keys
	private :_re_scanner_trans_keys, :_re_scanner_trans_keys=
end
self._re_scanner_trans_keys = [
	0, 0, -128, -65, -128, -65, 
	-128, -65, -128, -65, -128, 
	-65, -128, -65, 41, 41, 
	39, 122, 33, 122, 48, 122, 
	39, 60, 39, 122, 48, 
	57, 39, 57, 48, 57, 
	39, 57, 39, 122, 43, 122, 
	48, 57, 48, 62, 48, 
	57, 43, 62, 43, 122, 
	48, 57, 48, 125, 44, 125, 
	123, 123, 9, 122, 9, 
	125, 9, 122, -128, -65, 
	-128, -65, 38, 38, 45, 122, 
	45, 122, 93, 93, 94, 
	120, 97, 120, 108, 115, 
	110, 112, 117, 117, 109, 109, 
	58, 58, 93, 93, 104, 
	104, 97, 97, 99, 99, 
	105, 105, 105, 105, 108, 108, 
	97, 97, 110, 110, 107, 
	107, 110, 110, 116, 116, 
	114, 114, 108, 108, 105, 105, 
	103, 103, 105, 105, 116, 
	116, 114, 114, 97, 97, 
	112, 112, 104, 104, 111, 111, 
	119, 119, 101, 101, 114, 
	114, 114, 117, 105, 105, 
	110, 110, 110, 110, 99, 99, 
	112, 112, 97, 97, 99, 
	99, 101, 101, 112, 112, 
	112, 112, 111, 111, 114, 114, 
	100, 100, 100, 100, 65, 
	122, 61, 61, 93, 93, 
	45, 45, 92, 92, 92, 92, 
	45, 45, 92, 92, 92, 
	92, 48, 123, 48, 102, 
	48, 102, 48, 102, 48, 102, 
	9, 125, 9, 125, 9, 
	125, 9, 125, 9, 125, 
	9, 125, 48, 123, 41, 41, 
	39, 122, 41, 57, 48, 
	122, -128, 127, -62, -33, 
	-32, -17, -16, -12, 1, 127, 
	1, 127, 9, 32, 33, 
	126, 10, 10, 63, 63, 
	33, 126, 33, 126, 43, 63, 
	43, 63, 43, 63, 65, 
	122, 44, 57, 43, 63, 
	68, 119, 80, 112, -62, 125, 
	-128, -65, -128, -65, -128, 
	-65, 38, 38, 38, 93, 
	46, 61, 48, 122, 36, 125, 
	48, 55, 48, 55, 77, 
	77, 45, 45, 0, 0, 
	67, 99, 45, 45, 0, 0, 
	92, 92, 48, 102, 39, 
	60, 39, 122, 49, 57, 
	41, 57, 48, 122, 0
]

class << self
	attr_accessor :_re_scanner_key_spans
	private :_re_scanner_key_spans, :_re_scanner_key_spans=
end
self._re_scanner_key_spans = [
	0, 64, 64, 64, 64, 64, 64, 1, 
	84, 90, 75, 22, 84, 10, 19, 10, 
	19, 84, 80, 10, 15, 10, 20, 80, 
	10, 78, 82, 1, 114, 117, 114, 64, 
	64, 1, 78, 78, 1, 27, 24, 8, 
	3, 1, 1, 1, 1, 1, 1, 1, 
	1, 1, 1, 1, 1, 1, 1, 1, 
	1, 1, 1, 1, 1, 1, 1, 1, 
	1, 1, 1, 1, 1, 1, 4, 1, 
	1, 1, 1, 1, 1, 1, 1, 1, 
	1, 1, 1, 1, 1, 58, 1, 1, 
	1, 1, 1, 1, 1, 1, 76, 55, 
	55, 55, 55, 117, 117, 117, 117, 117, 
	117, 76, 1, 84, 17, 75, 256, 30, 
	16, 5, 127, 127, 24, 94, 1, 1, 
	94, 94, 21, 21, 21, 58, 14, 21, 
	52, 33, 188, 64, 64, 64, 1, 56, 
	16, 75, 90, 8, 8, 1, 1, 0, 
	33, 1, 0, 1, 55, 22, 84, 9, 
	17, 75
]

class << self
	attr_accessor :_re_scanner_index_offsets
	private :_re_scanner_index_offsets, :_re_scanner_index_offsets=
end
self._re_scanner_index_offsets = [
	0, 0, 65, 130, 195, 260, 325, 390, 
	392, 477, 568, 644, 667, 752, 763, 783, 
	794, 814, 899, 980, 991, 1007, 1018, 1039, 
	1120, 1131, 1210, 1293, 1295, 1410, 1528, 1643, 
	1708, 1773, 1775, 1854, 1933, 1935, 1963, 1988, 
	1997, 2001, 2003, 2005, 2007, 2009, 2011, 2013, 
	2015, 2017, 2019, 2021, 2023, 2025, 2027, 2029, 
	2031, 2033, 2035, 2037, 2039, 2041, 2043, 2045, 
	2047, 2049, 2051, 2053, 2055, 2057, 2059, 2064, 
	2066, 2068, 2070, 2072, 2074, 2076, 2078, 2080, 
	2082, 2084, 2086, 2088, 2090, 2092, 2151, 2153, 
	2155, 2157, 2159, 2161, 2163, 2165, 2167, 2244, 
	2300, 2356, 2412, 2468, 2586, 2704, 2822, 2940, 
	3058, 3176, 3253, 3255, 3340, 3358, 3434, 3691, 
	3722, 3739, 3745, 3873, 4001, 4026, 4121, 4123, 
	4125, 4220, 4315, 4337, 4359, 4381, 4440, 4455, 
	4477, 4530, 4564, 4753, 4818, 4883, 4948, 4950, 
	5007, 5024, 5100, 5191, 5200, 5209, 5211, 5213, 
	5214, 5248, 5250, 5251, 5253, 5309, 5332, 5417, 
	5427, 5445
]

class << self
	attr_accessor :_re_scanner_indicies
	private :_re_scanner_indicies, :_re_scanner_indicies=
end
self._re_scanner_indicies = [
	1, 1, 1, 1, 1, 1, 1, 1, 
	1, 1, 1, 1, 1, 1, 1, 1, 
	1, 1, 1, 1, 1, 1, 1, 1, 
	1, 1, 1, 1, 1, 1, 1, 1, 
	1, 1, 1, 1, 1, 1, 1, 1, 
	1, 1, 1, 1, 1, 1, 1, 1, 
	1, 1, 1, 1, 1, 1, 1, 1, 
	1, 1, 1, 1, 1, 1, 1, 1, 
	0, 2, 2, 2, 2, 2, 2, 2, 
	2, 2, 2, 2, 2, 2, 2, 2, 
	2, 2, 2, 2, 2, 2, 2, 2, 
	2, 2, 2, 2, 2, 2, 2, 2, 
	2, 2, 2, 2, 2, 2, 2, 2, 
	2, 2, 2, 2, 2, 2, 2, 2, 
	2, 2, 2, 2, 2, 2, 2, 2, 
	2, 2, 2, 2, 2, 2, 2, 2, 
	2, 0, 3, 3, 3, 3, 3, 3, 
	3, 3, 3, 3, 3, 3, 3, 3, 
	3, 3, 3, 3, 3, 3, 3, 3, 
	3, 3, 3, 3, 3, 3, 3, 3, 
	3, 3, 3, 3, 3, 3, 3, 3, 
	3, 3, 3, 3, 3, 3, 3, 3, 
	3, 3, 3, 3, 3, 3, 3, 3, 
	3, 3, 3, 3, 3, 3, 3, 3, 
	3, 3, 0, 4, 4, 4, 4, 4, 
	4, 4, 4, 4, 4, 4, 4, 4, 
	4, 4, 4, 4, 4, 4, 4, 4, 
	4, 4, 4, 4, 4, 4, 4, 4, 
	4, 4, 4, 4, 4, 4, 4, 4, 
	4, 4, 4, 4, 4, 4, 4, 4, 
	4, 4, 4, 4, 4, 4, 4, 4, 
	4, 4, 4, 4, 4, 4, 4, 4, 
	4, 4, 4, 0, 5, 5, 5, 5, 
	5, 5, 5, 5, 5, 5, 5, 5, 
	5, 5, 5, 5, 5, 5, 5, 5, 
	5, 5, 5, 5, 5, 5, 5, 5, 
	5, 5, 5, 5, 5, 5, 5, 5, 
	5, 5, 5, 5, 5, 5, 5, 5, 
	5, 5, 5, 5, 5, 5, 5, 5, 
	5, 5, 5, 5, 5, 5, 5, 5, 
	5, 5, 5, 5, 0, 6, 6, 6, 
	6, 6, 6, 6, 6, 6, 6, 6, 
	6, 6, 6, 6, 6, 6, 6, 6, 
	6, 6, 6, 6, 6, 6, 6, 6, 
	6, 6, 6, 6, 6, 6, 6, 6, 
	6, 6, 6, 6, 6, 6, 6, 6, 
	6, 6, 6, 6, 6, 6, 6, 6, 
	6, 6, 6, 6, 6, 6, 6, 6, 
	6, 6, 6, 6, 6, 0, 9, 8, 
	10, 7, 7, 7, 7, 7, 7, 7, 
	7, 11, 11, 11, 11, 11, 11, 11, 
	11, 11, 11, 7, 7, 7, 7, 7, 
	7, 7, 11, 11, 11, 11, 11, 11, 
	11, 11, 11, 11, 11, 11, 11, 11, 
	11, 11, 11, 11, 11, 11, 11, 11, 
	11, 11, 11, 11, 7, 7, 7, 7, 
	11, 7, 11, 11, 11, 11, 11, 11, 
	11, 11, 11, 11, 11, 11, 11, 11, 
	11, 11, 11, 11, 11, 11, 11, 11, 
	11, 11, 11, 11, 7, 12, 7, 7, 
	7, 7, 7, 7, 7, 7, 7, 7, 
	7, 7, 7, 7, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 7, 7, 
	7, 12, 10, 7, 7, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 7, 
	7, 7, 7, 13, 7, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 7, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 7, 7, 7, 7, 10, 7, 
	7, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 7, 7, 7, 7, 13, 
	7, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 7, 15, 14, 14, 14, 
	14, 14, 14, 14, 14, 14, 14, 14, 
	14, 14, 14, 14, 14, 14, 14, 14, 
	14, 16, 14, 17, 14, 14, 14, 18, 
	14, 19, 14, 14, 20, 20, 20, 20, 
	20, 20, 20, 20, 20, 20, 14, 14, 
	14, 14, 14, 14, 14, 20, 20, 20, 
	20, 20, 20, 20, 20, 20, 20, 20, 
	20, 20, 20, 20, 20, 20, 20, 20, 
	20, 20, 20, 20, 20, 20, 20, 14, 
	14, 14, 14, 20, 14, 20, 20, 20, 
	20, 20, 20, 20, 20, 20, 20, 20, 
	20, 20, 20, 20, 20, 20, 20, 20, 
	20, 20, 20, 20, 20, 20, 20, 14, 
	21, 21, 21, 21, 21, 21, 21, 21, 
	21, 21, 14, 17, 14, 14, 14, 14, 
	14, 14, 14, 14, 21, 21, 21, 21, 
	21, 21, 21, 21, 21, 21, 14, 21, 
	22, 22, 22, 22, 22, 22, 22, 22, 
	22, 14, 17, 14, 14, 14, 18, 14, 
	18, 14, 14, 22, 22, 22, 22, 22, 
	22, 22, 22, 22, 22, 14, 17, 14, 
	14, 14, 18, 14, 18, 14, 14, 20, 
	20, 20, 20, 20, 20, 20, 20, 20, 
	20, 14, 14, 14, 14, 14, 14, 14, 
	20, 20, 20, 20, 20, 20, 20, 20, 
	20, 20, 20, 20, 20, 20, 20, 20, 
	20, 20, 20, 20, 20, 20, 20, 20, 
	20, 20, 14, 14, 14, 14, 20, 14, 
	20, 20, 20, 20, 20, 20, 20, 20, 
	20, 20, 20, 20, 20, 20, 20, 20, 
	20, 20, 20, 20, 20, 20, 20, 20, 
	20, 20, 14, 23, 14, 24, 14, 14, 
	25, 25, 25, 25, 25, 25, 25, 25, 
	25, 25, 14, 14, 14, 14, 17, 14, 
	14, 25, 25, 25, 25, 25, 25, 25, 
	25, 25, 25, 25, 25, 25, 25, 25, 
	25, 25, 25, 25, 25, 25, 25, 25, 
	25, 25, 25, 14, 14, 14, 14, 25, 
	14, 25, 25, 25, 25, 25, 25, 25, 
	25, 25, 25, 25, 25, 25, 25, 25, 
	25, 25, 25, 25, 25, 25, 25, 25, 
	25, 25, 25, 14, 26, 26, 26, 26, 
	26, 26, 26, 26, 26, 26, 14, 26, 
	26, 26, 26, 26, 26, 26, 26, 26, 
	26, 14, 14, 14, 14, 17, 14, 26, 
	27, 27, 27, 27, 27, 27, 27, 27, 
	27, 14, 23, 14, 23, 14, 14, 27, 
	27, 27, 27, 27, 27, 27, 27, 27, 
	27, 14, 14, 14, 14, 17, 14, 23, 
	14, 23, 14, 14, 25, 25, 25, 25, 
	25, 25, 25, 25, 25, 25, 14, 14, 
	14, 14, 17, 14, 14, 25, 25, 25, 
	25, 25, 25, 25, 25, 25, 25, 25, 
	25, 25, 25, 25, 25, 25, 25, 25, 
	25, 25, 25, 25, 25, 25, 25, 14, 
	14, 14, 14, 25, 14, 25, 25, 25, 
	25, 25, 25, 25, 25, 25, 25, 25, 
	25, 25, 25, 25, 25, 25, 25, 25, 
	25, 25, 25, 25, 25, 25, 25, 14, 
	29, 29, 29, 29, 29, 29, 29, 29, 
	29, 29, 28, 29, 29, 29, 29, 29, 
	29, 29, 29, 29, 29, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	30, 28, 29, 28, 28, 28, 31, 31, 
	31, 31, 31, 31, 31, 31, 31, 31, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 28, 28, 28, 28, 28, 
	28, 28, 28, 30, 28, 32, 33, 34, 
	34, 34, 34, 34, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 34, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 34, 34, 33, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	33, 33, 33, 34, 33, 33, 33, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 33, 33, 33, 35, 34, 33, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 33, 34, 34, 34, 34, 34, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 34, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 34, 34, 
	33, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 33, 33, 33, 34, 33, 
	33, 33, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 33, 33, 33, 33, 
	34, 33, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 33, 33, 36, 33, 
	34, 34, 34, 34, 34, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 34, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 34, 34, 33, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 33, 33, 33, 34, 33, 33, 33, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 33, 33, 33, 33, 34, 33, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 34, 34, 34, 34, 34, 34, 
	34, 34, 33, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 37, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 37, 41, 40, 44, 
	43, 43, 43, 43, 43, 43, 43, 43, 
	43, 43, 43, 43, 43, 43, 43, 43, 
	43, 43, 43, 44, 44, 44, 44, 44, 
	44, 44, 44, 44, 44, 44, 44, 44, 
	44, 44, 44, 44, 44, 44, 44, 44, 
	44, 44, 44, 44, 44, 43, 43, 43, 
	43, 43, 43, 44, 44, 44, 44, 44, 
	44, 44, 44, 44, 44, 44, 44, 44, 
	44, 44, 44, 44, 44, 44, 44, 44, 
	44, 44, 44, 44, 44, 43, 44, 45, 
	43, 43, 43, 43, 43, 43, 43, 43, 
	43, 43, 43, 43, 43, 43, 43, 43, 
	43, 43, 44, 44, 44, 44, 44, 44, 
	44, 44, 44, 44, 44, 44, 44, 44, 
	44, 44, 44, 44, 44, 44, 44, 44, 
	44, 44, 44, 44, 43, 43, 43, 43, 
	43, 43, 44, 44, 44, 44, 44, 44, 
	44, 44, 44, 44, 44, 44, 44, 44, 
	44, 44, 44, 44, 44, 44, 44, 44, 
	44, 44, 44, 44, 43, 46, 43, 47, 
	43, 43, 48, 49, 50, 51, 43, 43, 
	52, 43, 43, 43, 43, 53, 43, 43, 
	43, 54, 43, 43, 55, 43, 56, 43, 
	57, 58, 43, 48, 49, 50, 51, 43, 
	43, 52, 43, 43, 43, 43, 53, 43, 
	43, 43, 54, 43, 43, 55, 43, 56, 
	43, 57, 58, 43, 59, 43, 43, 43, 
	43, 43, 43, 60, 43, 61, 43, 62, 
	43, 63, 43, 64, 43, 65, 43, 66, 
	43, 67, 43, 64, 43, 68, 43, 69, 
	43, 64, 43, 70, 43, 71, 43, 72, 
	43, 64, 43, 73, 43, 74, 43, 75, 
	43, 64, 43, 76, 43, 77, 43, 78, 
	43, 64, 43, 79, 43, 80, 43, 81, 
	43, 64, 43, 82, 43, 83, 43, 84, 
	43, 64, 43, 85, 43, 43, 86, 43, 
	87, 43, 78, 43, 88, 43, 78, 43, 
	89, 43, 90, 43, 91, 43, 64, 43, 
	92, 43, 83, 43, 93, 43, 94, 43, 
	64, 43, 51, 43, 95, 95, 95, 95, 
	95, 95, 95, 95, 95, 95, 95, 95, 
	95, 95, 95, 95, 95, 95, 95, 95, 
	95, 95, 95, 95, 95, 95, 43, 43, 
	43, 43, 43, 43, 95, 95, 95, 95, 
	95, 95, 95, 95, 95, 95, 95, 95, 
	95, 95, 95, 95, 95, 95, 95, 95, 
	95, 95, 95, 95, 95, 95, 43, 96, 
	43, 97, 43, 98, 33, 100, 99, 102, 
	99, 103, 33, 105, 104, 107, 104, 108, 
	108, 108, 108, 108, 108, 108, 108, 108, 
	108, 33, 33, 33, 33, 33, 33, 33, 
	108, 108, 108, 108, 108, 108, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	108, 108, 108, 108, 108, 108, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 109, 33, 110, 110, 110, 110, 
	110, 110, 110, 110, 110, 110, 33, 33, 
	33, 33, 33, 33, 33, 110, 110, 110, 
	110, 110, 110, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 110, 110, 110, 
	110, 110, 110, 33, 111, 111, 111, 111, 
	111, 111, 111, 111, 111, 111, 33, 33, 
	33, 33, 33, 33, 33, 111, 111, 111, 
	111, 111, 111, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 111, 111, 111, 
	111, 111, 111, 33, 112, 112, 112, 112, 
	112, 112, 112, 112, 112, 112, 33, 33, 
	33, 33, 33, 33, 33, 112, 112, 112, 
	112, 112, 112, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 112, 112, 112, 
	112, 112, 112, 33, 113, 113, 113, 113, 
	113, 113, 113, 113, 113, 113, 33, 33, 
	33, 33, 33, 33, 33, 113, 113, 113, 
	113, 113, 113, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 113, 113, 113, 
	113, 113, 113, 33, 109, 109, 109, 109, 
	109, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 109, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 114, 114, 114, 114, 114, 
	114, 114, 114, 114, 114, 33, 33, 33, 
	33, 33, 33, 33, 114, 114, 114, 114, 
	114, 114, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 114, 114, 114, 114, 
	114, 114, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	112, 33, 109, 109, 109, 109, 109, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 109, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 115, 115, 115, 115, 115, 115, 115, 
	115, 115, 115, 33, 33, 33, 33, 33, 
	33, 33, 115, 115, 115, 115, 115, 115, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 115, 115, 115, 115, 115, 115, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 112, 33, 
	109, 109, 109, 109, 109, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 109, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 116, 
	116, 116, 116, 116, 116, 116, 116, 116, 
	116, 33, 33, 33, 33, 33, 33, 33, 
	116, 116, 116, 116, 116, 116, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	116, 116, 116, 116, 116, 116, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 112, 33, 109, 109, 
	109, 109, 109, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 109, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 117, 117, 117, 
	117, 117, 117, 117, 117, 117, 117, 33, 
	33, 33, 33, 33, 33, 33, 117, 117, 
	117, 117, 117, 117, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 117, 117, 
	117, 117, 117, 117, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 112, 33, 109, 109, 109, 109, 
	109, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 109, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 118, 118, 118, 118, 118, 
	118, 118, 118, 118, 118, 33, 33, 33, 
	33, 33, 33, 33, 118, 118, 118, 118, 
	118, 118, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 118, 118, 118, 118, 
	118, 118, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	112, 33, 109, 109, 109, 109, 109, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 109, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 112, 33, 
	120, 120, 120, 120, 120, 120, 120, 120, 
	120, 120, 119, 119, 119, 119, 119, 119, 
	119, 120, 120, 120, 120, 120, 120, 119, 
	119, 119, 119, 119, 119, 119, 119, 119, 
	119, 119, 119, 119, 119, 119, 119, 119, 
	119, 119, 119, 119, 119, 119, 119, 119, 
	119, 120, 120, 120, 120, 120, 120, 119, 
	119, 119, 119, 119, 119, 119, 119, 119, 
	119, 119, 119, 119, 119, 119, 119, 119, 
	119, 119, 119, 33, 119, 122, 121, 123, 
	121, 121, 121, 121, 121, 121, 121, 121, 
	124, 124, 124, 124, 124, 124, 124, 124, 
	124, 124, 121, 121, 121, 121, 121, 121, 
	121, 124, 124, 124, 124, 124, 124, 124, 
	124, 124, 124, 124, 124, 124, 124, 124, 
	124, 124, 124, 124, 124, 124, 124, 124, 
	124, 124, 124, 121, 121, 121, 121, 124, 
	121, 124, 124, 124, 124, 124, 124, 124, 
	124, 124, 124, 124, 124, 124, 124, 124, 
	124, 124, 124, 124, 124, 124, 124, 124, 
	124, 124, 124, 121, 122, 121, 121, 121, 
	121, 121, 121, 125, 125, 125, 125, 125, 
	125, 125, 125, 125, 125, 121, 126, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	121, 121, 121, 121, 123, 121, 121, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	126, 121, 121, 121, 121, 126, 121, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	126, 121, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 127, 127, 127, 127, 
	127, 127, 127, 127, 127, 127, 127, 127, 
	127, 127, 127, 127, 127, 127, 127, 127, 
	127, 127, 127, 127, 127, 127, 127, 127, 
	127, 127, 128, 128, 128, 128, 128, 128, 
	128, 128, 128, 128, 128, 128, 128, 128, 
	128, 128, 129, 129, 129, 129, 129, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 130, 130, 130, 130, 130, 
	130, 130, 130, 131, 131, 131, 131, 131, 
	130, 130, 130, 130, 130, 130, 130, 130, 
	130, 130, 130, 130, 130, 130, 130, 130, 
	130, 130, 132, 133, 133, 134, 135, 133, 
	133, 133, 136, 137, 138, 139, 133, 133, 
	140, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 133, 133, 133, 133, 
	133, 141, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 133, 142, 143, 144, 
	145, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 133, 146, 147, 144, 
	133, 130, 133, 127, 127, 127, 127, 127, 
	127, 127, 127, 127, 127, 127, 127, 127, 
	127, 127, 127, 127, 127, 127, 127, 127, 
	127, 127, 127, 127, 127, 127, 127, 127, 
	127, 148, 128, 128, 128, 128, 128, 128, 
	128, 128, 128, 128, 128, 128, 128, 128, 
	128, 128, 148, 129, 129, 129, 129, 129, 
	148, 130, 130, 130, 130, 130, 130, 130, 
	130, 130, 130, 130, 130, 130, 130, 130, 
	130, 130, 130, 130, 130, 130, 130, 130, 
	130, 130, 130, 130, 130, 130, 130, 130, 
	148, 148, 148, 148, 148, 148, 148, 148, 
	148, 148, 148, 148, 148, 148, 148, 148, 
	148, 148, 148, 148, 148, 148, 148, 148, 
	148, 148, 148, 148, 148, 148, 148, 148, 
	148, 148, 148, 148, 148, 148, 148, 148, 
	148, 148, 148, 148, 148, 148, 148, 148, 
	148, 148, 148, 148, 148, 148, 148, 148, 
	148, 148, 148, 148, 148, 148, 148, 148, 
	148, 148, 148, 148, 148, 148, 148, 148, 
	148, 148, 148, 148, 148, 148, 148, 148, 
	148, 148, 148, 148, 148, 148, 148, 148, 
	148, 148, 148, 148, 148, 148, 148, 130, 
	148, 130, 130, 130, 130, 130, 130, 130, 
	130, 131, 131, 131, 131, 131, 130, 130, 
	130, 130, 130, 130, 130, 130, 130, 130, 
	130, 130, 130, 130, 130, 130, 130, 130, 
	132, 149, 149, 149, 149, 149, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 130, 
	149, 132, 132, 132, 132, 132, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 149, 
	149, 149, 149, 149, 149, 149, 149, 149, 
	132, 149, 133, 133, 148, 148, 133, 133, 
	133, 148, 148, 148, 148, 133, 133, 148, 
	133, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 133, 133, 133, 133, 
	148, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 148, 148, 148, 148, 
	133, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 133, 133, 133, 133, 
	133, 133, 133, 133, 148, 148, 148, 133, 
	148, 151, 134, 153, 152, 12, 155, 8, 
	155, 155, 155, 11, 156, 154, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 10, 155, 
	157, 12, 10, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 10, 155, 154, 155, 154, 155, 
	155, 155, 154, 154, 154, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 158, 155, 154, 
	154, 154, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 155, 155, 155, 155, 155, 155, 155, 
	155, 154, 155, 160, 159, 159, 159, 159, 
	159, 159, 159, 159, 159, 159, 159, 159, 
	159, 159, 159, 159, 159, 159, 159, 160, 
	159, 162, 161, 161, 161, 161, 161, 161, 
	161, 161, 161, 161, 161, 161, 161, 161, 
	161, 161, 161, 161, 161, 162, 161, 164, 
	163, 163, 163, 163, 163, 163, 163, 163, 
	163, 163, 163, 163, 163, 163, 163, 163, 
	163, 163, 163, 164, 163, 166, 166, 165, 
	165, 165, 165, 166, 165, 165, 165, 167, 
	165, 165, 165, 165, 165, 165, 165, 165, 
	165, 165, 165, 165, 165, 165, 166, 165, 
	165, 165, 165, 165, 165, 165, 166, 165, 
	165, 165, 165, 168, 165, 165, 165, 168, 
	165, 165, 165, 165, 165, 165, 165, 165, 
	165, 165, 165, 165, 165, 165, 166, 165, 
	170, 169, 169, 169, 31, 31, 31, 31, 
	31, 31, 31, 31, 31, 31, 169, 172, 
	171, 171, 171, 171, 171, 171, 171, 171, 
	171, 171, 171, 171, 171, 171, 171, 171, 
	171, 171, 171, 172, 171, 173, 33, 33, 
	33, 173, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 173, 173, 33, 33, 33, 
	173, 173, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 173, 33, 33, 
	33, 173, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 173, 33, 33, 33, 
	173, 33, 174, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 33, 33, 33, 33, 33, 33, 
	33, 33, 174, 33, 175, 175, 175, 175, 
	175, 175, 175, 175, 175, 175, 175, 175, 
	175, 175, 175, 175, 175, 175, 175, 175, 
	175, 175, 175, 175, 175, 175, 175, 175, 
	175, 175, 176, 176, 176, 176, 176, 176, 
	176, 176, 176, 176, 176, 176, 176, 176, 
	176, 176, 177, 177, 177, 177, 177, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 178, 38, 
	179, 38, 178, 178, 178, 178, 38, 180, 
	178, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 178, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 181, 182, 183, 
	184, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 178, 178, 178, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 38, 38, 38, 38, 38, 38, 38, 
	38, 185, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 39, 39, 39, 39, 39, 39, 
	39, 39, 185, 186, 186, 186, 186, 186, 
	186, 186, 186, 186, 186, 186, 186, 186, 
	186, 186, 186, 186, 186, 186, 186, 186, 
	186, 186, 186, 186, 186, 186, 186, 186, 
	186, 186, 186, 186, 186, 186, 186, 186, 
	186, 186, 186, 186, 186, 186, 186, 186, 
	186, 186, 186, 186, 186, 186, 186, 186, 
	186, 186, 186, 186, 186, 186, 186, 186, 
	186, 186, 186, 185, 187, 185, 189, 188, 
	188, 188, 188, 188, 188, 188, 188, 188, 
	188, 188, 188, 188, 188, 188, 188, 188, 
	188, 188, 188, 188, 188, 188, 188, 188, 
	188, 188, 188, 188, 188, 188, 188, 188, 
	188, 188, 188, 188, 188, 188, 188, 188, 
	188, 188, 188, 188, 188, 188, 188, 188, 
	188, 188, 188, 188, 188, 190, 188, 193, 
	192, 192, 192, 192, 192, 192, 192, 192, 
	192, 192, 192, 194, 192, 192, 195, 192, 
	197, 197, 197, 197, 197, 197, 197, 197, 
	197, 197, 196, 196, 196, 196, 196, 196, 
	196, 197, 197, 197, 196, 196, 196, 197, 
	196, 196, 196, 197, 196, 197, 196, 196, 
	196, 196, 197, 196, 196, 196, 196, 196, 
	197, 196, 197, 196, 196, 196, 196, 196, 
	196, 196, 196, 197, 196, 196, 196, 197, 
	196, 196, 196, 197, 196, 196, 196, 196, 
	196, 196, 196, 196, 196, 196, 196, 196, 
	196, 196, 197, 196, 199, 198, 198, 198, 
	199, 199, 199, 199, 198, 198, 199, 198, 
	200, 201, 201, 201, 201, 201, 201, 201, 
	202, 202, 198, 198, 198, 198, 198, 199, 
	198, 33, 33, 203, 204, 198, 198, 33, 
	204, 198, 198, 33, 198, 205, 198, 198, 
	206, 198, 204, 204, 198, 198, 198, 204, 
	204, 198, 33, 199, 199, 199, 199, 198, 
	198, 207, 207, 98, 204, 207, 207, 198, 
	204, 198, 198, 198, 198, 198, 207, 198, 
	206, 198, 207, 204, 207, 208, 207, 204, 
	209, 198, 33, 199, 199, 199, 198, 211, 
	211, 211, 211, 211, 211, 211, 211, 210, 
	213, 213, 213, 213, 213, 213, 213, 213, 
	212, 215, 99, 217, 216, 99, 219, 104, 
	104, 104, 104, 104, 104, 104, 104, 104, 
	104, 104, 104, 104, 104, 104, 104, 104, 
	104, 104, 104, 104, 104, 104, 104, 104, 
	104, 104, 104, 104, 104, 104, 220, 104, 
	222, 221, 104, 107, 104, 225, 225, 225, 
	225, 225, 225, 225, 225, 225, 225, 224, 
	224, 224, 224, 224, 224, 224, 225, 225, 
	225, 225, 225, 225, 224, 224, 224, 224, 
	224, 224, 224, 224, 224, 224, 224, 224, 
	224, 224, 224, 224, 224, 224, 224, 224, 
	224, 224, 224, 224, 224, 224, 225, 225, 
	225, 225, 225, 225, 224, 227, 226, 226, 
	226, 226, 226, 228, 226, 226, 226, 229, 
	229, 229, 229, 229, 229, 229, 229, 229, 
	226, 226, 230, 226, 123, 231, 231, 231, 
	231, 231, 231, 231, 231, 124, 124, 124, 
	124, 124, 124, 124, 124, 124, 124, 231, 
	231, 231, 231, 231, 231, 231, 124, 124, 
	124, 124, 124, 124, 124, 124, 124, 124, 
	124, 124, 124, 124, 124, 124, 124, 124, 
	124, 124, 124, 124, 124, 124, 124, 124, 
	231, 231, 231, 231, 124, 231, 124, 124, 
	124, 124, 124, 124, 124, 124, 124, 124, 
	124, 124, 124, 124, 124, 124, 124, 124, 
	124, 124, 124, 124, 124, 124, 124, 124, 
	231, 125, 125, 125, 125, 125, 125, 125, 
	125, 125, 231, 122, 231, 231, 231, 231, 
	231, 231, 125, 125, 125, 125, 125, 125, 
	125, 125, 125, 125, 231, 126, 126, 126, 
	126, 126, 126, 126, 126, 126, 126, 231, 
	231, 231, 231, 123, 231, 231, 126, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	231, 231, 231, 231, 126, 231, 126, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	126, 126, 126, 126, 126, 126, 126, 126, 
	231, 0
]

class << self
	attr_accessor :_re_scanner_trans_targs
	private :_re_scanner_trans_targs, :_re_scanner_trans_targs=
end
self._re_scanner_trans_targs = [
	110, 111, 3, 112, 5, 6, 113, 110, 
	7, 110, 110, 8, 110, 10, 110, 12, 
	18, 110, 13, 15, 17, 14, 16, 19, 
	21, 23, 20, 22, 110, 25, 127, 26, 
	28, 0, 29, 30, 129, 130, 130, 31, 
	130, 130, 130, 130, 35, 36, 130, 38, 
	39, 50, 54, 58, 62, 66, 70, 75, 
	79, 81, 84, 40, 47, 41, 45, 42, 
	43, 44, 130, 46, 48, 49, 51, 52, 
	53, 55, 56, 57, 59, 60, 61, 63, 
	64, 65, 67, 68, 69, 71, 73, 72, 
	74, 76, 77, 78, 80, 82, 83, 86, 
	87, 130, 89, 138, 141, 138, 143, 92, 
	138, 144, 138, 146, 95, 98, 96, 97, 
	138, 99, 100, 101, 102, 103, 104, 138, 
	148, 149, 149, 106, 107, 108, 109, 1, 
	2, 4, 114, 115, 116, 117, 118, 110, 
	119, 110, 122, 123, 110, 124, 110, 125, 
	110, 110, 126, 110, 110, 110, 110, 110, 
	110, 120, 110, 121, 110, 9, 110, 110, 
	110, 110, 110, 110, 110, 110, 110, 110, 
	11, 110, 24, 110, 110, 128, 27, 131, 
	132, 133, 130, 134, 135, 136, 130, 130, 
	130, 130, 32, 130, 130, 33, 130, 130, 
	130, 34, 37, 85, 137, 137, 138, 138, 
	139, 139, 138, 88, 138, 91, 138, 138, 
	94, 105, 138, 140, 138, 138, 138, 142, 
	138, 90, 138, 145, 147, 138, 93, 138, 
	138, 138, 149, 150, 151, 152, 153, 149
]

class << self
	attr_accessor :_re_scanner_trans_actions
	private :_re_scanner_trans_actions, :_re_scanner_trans_actions=
end
self._re_scanner_trans_actions = [
	1, 2, 0, 2, 0, 0, 2, 3, 
	4, 5, 6, 0, 7, 0, 8, 0, 
	0, 9, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 10, 0, 0, 0, 
	0, 0, 0, 0, 12, 13, 14, 0, 
	15, 16, 17, 18, 0, 0, 19, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 20, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 21, 0, 23, 0, 24, 0, 0, 
	25, 0, 26, 0, 0, 0, 0, 0, 
	27, 0, 0, 0, 0, 0, 0, 28, 
	0, 29, 30, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 33, 
	34, 35, 0, 0, 36, 0, 37, 38, 
	39, 40, 38, 41, 42, 43, 44, 45, 
	46, 47, 48, 0, 49, 0, 50, 51, 
	52, 53, 54, 55, 56, 57, 58, 59, 
	0, 60, 0, 61, 62, 64, 0, 0, 
	38, 38, 65, 0, 38, 66, 67, 68, 
	69, 70, 0, 71, 72, 0, 73, 74, 
	75, 0, 0, 0, 76, 77, 78, 79, 
	80, 81, 82, 0, 83, 0, 84, 85, 
	0, 0, 86, 0, 87, 88, 89, 38, 
	90, 0, 91, 38, 0, 92, 0, 93, 
	94, 95, 96, 38, 38, 38, 38, 97
]

class << self
	attr_accessor :_re_scanner_to_state_actions
	private :_re_scanner_to_state_actions, :_re_scanner_to_state_actions=
end
self._re_scanner_to_state_actions = [
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 31, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	63, 63, 63, 0, 0, 0, 0, 0, 
	0, 63, 63, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 63, 0, 0, 
	0, 0
]

class << self
	attr_accessor :_re_scanner_from_state_actions
	private :_re_scanner_from_state_actions, :_re_scanner_from_state_actions=
end
self._re_scanner_from_state_actions = [
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 32, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	32, 32, 32, 0, 0, 0, 0, 0, 
	0, 32, 32, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 32, 0, 0, 
	0, 0
]

class << self
	attr_accessor :_re_scanner_eof_actions
	private :_re_scanner_eof_actions, :_re_scanner_eof_actions=
end
self._re_scanner_eof_actions = [
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 11, 11, 11, 11, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	22, 22, 0, 22, 22, 0, 22, 22, 
	22, 22, 22, 22, 22, 22, 22, 22, 
	22, 22, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 22, 0, 0, 0, 0, 0, 
	0, 0, 22, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0
]

class << self
	attr_accessor :_re_scanner_eof_trans
	private :_re_scanner_eof_trans, :_re_scanner_eof_trans=
end
self._re_scanner_eof_trans = [
	0, 1, 1, 1, 1, 1, 1, 8, 
	8, 8, 8, 15, 15, 15, 15, 15, 
	15, 15, 15, 15, 15, 15, 15, 15, 
	29, 29, 29, 0, 0, 0, 0, 38, 
	38, 41, 43, 43, 43, 43, 43, 43, 
	43, 43, 43, 43, 43, 43, 43, 43, 
	43, 43, 43, 43, 43, 43, 43, 43, 
	43, 43, 43, 43, 43, 43, 43, 43, 
	43, 43, 43, 43, 43, 43, 43, 43, 
	43, 43, 43, 43, 43, 43, 43, 43, 
	43, 43, 43, 43, 43, 43, 43, 43, 
	0, 0, 102, 0, 0, 107, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 122, 122, 122, 122, 0, 149, 
	149, 149, 149, 150, 150, 149, 151, 153, 
	155, 155, 160, 162, 164, 166, 170, 172, 
	0, 0, 0, 186, 186, 186, 186, 189, 
	192, 0, 0, 211, 213, 215, 215, 215, 
	219, 219, 219, 219, 224, 0, 232, 232, 
	232, 232
]

class << self
	attr_accessor :re_scanner_start
end
self.re_scanner_start = 110;
class << self
	attr_accessor :re_scanner_first_final
end
self.re_scanner_first_final = 110;
class << self
	attr_accessor :re_scanner_error
end
self.re_scanner_error = 0;

class << self
	attr_accessor :re_scanner_en_char_type
end
self.re_scanner_en_char_type = 128;
class << self
	attr_accessor :re_scanner_en_unicode_property
end
self.re_scanner_en_unicode_property = 129;
class << self
	attr_accessor :re_scanner_en_character_set
end
self.re_scanner_en_character_set = 130;
class << self
	attr_accessor :re_scanner_en_set_escape_sequence
end
self.re_scanner_en_set_escape_sequence = 137;
class << self
	attr_accessor :re_scanner_en_escape_sequence
end
self.re_scanner_en_escape_sequence = 138;
class << self
	attr_accessor :re_scanner_en_conditional_expression
end
self.re_scanner_en_conditional_expression = 149;
class << self
	attr_accessor :re_scanner_en_main
end
self.re_scanner_en_main = 110;


# line 765 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
    
# line 1136 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
begin
	p ||= 0
	pe ||= data.length
	cs = re_scanner_start
	top = 0
	ts = nil
	te = nil
	act = 0
end

# line 766 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
    
# line 1149 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
begin
	testEof = false
	_slen, _trans, _keys, _inds, _acts, _nacts = nil
	_goto_level = 0
	_resume = 10
	_eof_trans = 15
	_again = 20
	_test_eof = 30
	_out = 40
	while true
	if _goto_level <= 0
	if p == pe
		_goto_level = _test_eof
		next
	end
	if cs == 0
		_goto_level = _out
		next
	end
	end
	if _goto_level <= _resume
	case _re_scanner_from_state_actions[cs] 
	when 32 then
# line 1 "NONE"
		begin
ts = p
		end
# line 1177 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
	end
	_keys = cs << 1
	_inds = _re_scanner_index_offsets[cs]
	_slen = _re_scanner_key_spans[cs]
	_wide = data[p].ord
	_trans = if (   _slen > 0 && 
			_re_scanner_trans_keys[_keys] <= _wide && 
			_wide <= _re_scanner_trans_keys[_keys + 1] 
		    ) then
			_re_scanner_indicies[ _inds + _wide - _re_scanner_trans_keys[_keys] ] 
		 else 
			_re_scanner_indicies[ _inds + _slen ]
		 end
	end
	if _goto_level <= _eof_trans
	cs = _re_scanner_trans_targs[_trans]
	if _re_scanner_trans_actions[_trans] != 0
	case _re_scanner_trans_actions[_trans]
	when 34 then
# line 149 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.group_depth = group_depth + 1 		end
	when 4 then
# line 150 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.group_depth = group_depth - 1 		end
	when 38 then
# line 1 "NONE"
		begin
te = p+1
		end
	when 64 then
# line 12 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/char_type.rl"
		begin
te = p+1
 begin 
      case text = text(data, ts, te, 1).first
      when '\d'; emit(:type, :digit,      text, ts - 1, te)
      when '\D'; emit(:type, :nondigit,   text, ts - 1, te)
      when '\h'; emit(:type, :hex,        text, ts - 1, te)
      when '\H'; emit(:type, :nonhex,     text, ts - 1, te)
      when '\s'; emit(:type, :space,      text, ts - 1, te)
      when '\S'; emit(:type, :nonspace,   text, ts - 1, te)
      when '\w'; emit(:type, :word,       text, ts - 1, te)
      when '\W'; emit(:type, :nonword,    text, ts - 1, te)
      when '\R'; emit(:type, :linebreak,  text, ts - 1, te)
      when '\X'; emit(:type, :xgrapheme,  text, ts - 1, te)
      end
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 12 then
# line 16 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/property.rl"
		begin
te = p+1
 begin 
      text = text(data, ts, te, 1).first
      type = (text[1] == 'P') ^ (text[3] == '^') ? :nonproperty : :property

      name = data[ts+2..te-2].pack('c*').gsub(/[\^\s_\-]/, '').downcase

      token = self.class.short_prop_map[name] || self.class.long_prop_map[name]
      raise UnknownUnicodePropertyError.new(name) unless token

      self.emit(type, token.to_sym, text, ts-1, te)

      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 16 then
# line 177 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin  # special case, emits two tokens
      emit(:literal, :literal, '-', ts, te)
      emit(:set, :intersection, '&&', ts, te)
     end
		end
	when 69 then
# line 182 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      text = text(data, ts, te).first
      if tokens.last[1] == :open
        emit(:set, :negate, text, ts, te)
      else
        emit(:literal, :literal, text, ts, te)
      end
     end
		end
	when 71 then
# line 203 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:set, :intersection, *text(data, ts, te))
     end
		end
	when 67 then
# line 207 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      	begin
		stack[top] = cs
		top+= 1
		cs = 137
		_goto_level = _again
		next
	end

     end
		end
	when 65 then
# line 237 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:literal, :literal, *text(data, ts, te))
     end
		end
	when 14 then
# line 245 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      char, *rest = *text(data, ts, te)
      char.force_encoding('utf-8') if char.respond_to?(:force_encoding)
      emit(:literal, :literal, char, *rest)
     end
		end
	when 72 then
# line 191 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      text = text(data, ts, te).first
      # ranges cant start with a subset or intersection/negation/range operator
      if tokens.last[0] == :set
        emit(:literal, :literal, text, ts, te)
      else
        emit(:set, :range, text, ts, te)
      end
     end
		end
	when 75 then
# line 211 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      emit(:set, :open, *text(data, ts, te))
      	begin
		stack[top] = cs
		top+= 1
		cs = 130
		_goto_level = _again
		next
	end

     end
		end
	when 70 then
# line 245 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      char, *rest = *text(data, ts, te)
      char.force_encoding('utf-8') if char.respond_to?(:force_encoding)
      emit(:literal, :literal, char, *rest)
     end
		end
	when 15 then
# line 191 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 begin p = ((te))-1; end
 begin 
      text = text(data, ts, te).first
      # ranges cant start with a subset or intersection/negation/range operator
      if tokens.last[0] == :set
        emit(:literal, :literal, text, ts, te)
      else
        emit(:set, :range, text, ts, te)
      end
     end
		end
	when 18 then
# line 211 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 begin p = ((te))-1; end
 begin 
      emit(:set, :open, *text(data, ts, te))
      	begin
		stack[top] = cs
		top+= 1
		cs = 130
		_goto_level = _again
		next
	end

     end
		end
	when 13 then
# line 245 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 begin p = ((te))-1; end
 begin 
      char, *rest = *text(data, ts, te)
      char.force_encoding('utf-8') if char.respond_to?(:force_encoding)
      emit(:literal, :literal, char, *rest)
     end
		end
	when 77 then
# line 255 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:escape, :literal, *text(data, ts, te, 1))
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 76 then
# line 260 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      p = p - 1;
      cs = 130;
      	begin
		stack[top] = cs
		top+= 1
		cs = 138
		_goto_level = _again
		next
	end

     end
		end
	when 82 then
# line 271 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      text = text(data, ts, te, 1).first
      emit(:backref, :number, text, ts-1, te)
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 88 then
# line 277 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:escape, :octal, *text(data, ts, te, 1))
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 79 then
# line 282 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      case text = text(data, ts, te, 1).first
      when '\.';  emit(:escape, :dot,               text, ts-1, te)
      when '\|';  emit(:escape, :alternation,       text, ts-1, te)
      when '\^';  emit(:escape, :bol,               text, ts-1, te)
      when '\$';  emit(:escape, :eol,               text, ts-1, te)
      when '\?';  emit(:escape, :zero_or_one,       text, ts-1, te)
      when '\*';  emit(:escape, :zero_or_more,      text, ts-1, te)
      when '\+';  emit(:escape, :one_or_more,       text, ts-1, te)
      when '\(';  emit(:escape, :group_open,        text, ts-1, te)
      when '\)';  emit(:escape, :group_close,       text, ts-1, te)
      when '\{';  emit(:escape, :interval_open,     text, ts-1, te)
      when '\}';  emit(:escape, :interval_close,    text, ts-1, te)
      when '\[';  emit(:escape, :set_open,          text, ts-1, te)
      when '\]';  emit(:escape, :set_close,         text, ts-1, te)
      when "\\\\";
        emit(:escape, :backslash, text, ts-1, te)
      end
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 85 then
# line 303 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      # \b is emitted as backspace only when inside a character set, otherwise
      # it is a word boundary anchor. A syntax might "normalize" it if needed.
      case text = text(data, ts, te, 1).first
      when '\a'; emit(:escape, :bell,           text, ts-1, te)
      when '\b'; emit(:escape, :backspace,      text, ts-1, te)
      when '\e'; emit(:escape, :escape,         text, ts-1, te)
      when '\f'; emit(:escape, :form_feed,      text, ts-1, te)
      when '\n'; emit(:escape, :newline,        text, ts-1, te)
      when '\r'; emit(:escape, :carriage,       text, ts-1, te)
      when '\t'; emit(:escape, :tab,            text, ts-1, te)
      when '\v'; emit(:escape, :vertical_tab,   text, ts-1, te)
      end
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 27 then
# line 319 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      text = text(data, ts, te, 1).first
      if text[2].chr == '{'
        emit(:escape, :codepoint_list, text, ts-1, te)
      else
        emit(:escape, :codepoint,      text, ts-1, te)
      end
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 95 then
# line 329 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:escape, :hex, *text(data, ts, te, 1))
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 23 then
# line 338 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit_meta_control_sequence(data, ts, te, :control)
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 25 then
# line 343 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit_meta_control_sequence(data, ts, te, :meta_sequence)
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 83 then
# line 348 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      p = p - 1;
      cs = ((in_set? ? 130 : 110));
      	begin
		stack[top] = cs
		top+= 1
		cs = 128
		_goto_level = _again
		next
	end

     end
		end
	when 84 then
# line 354 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      p = p - 1;
      cs = ((in_set? ? 130 : 110));
      	begin
		stack[top] = cs
		top+= 1
		cs = 129
		_goto_level = _again
		next
	end

     end
		end
	when 78 then
# line 360 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:escape, :literal, *text(data, ts, te, 1))
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 87 then
# line 277 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      emit(:escape, :octal, *text(data, ts, te, 1))
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 94 then
# line 329 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      emit(:escape, :hex, *text(data, ts, te, 1))
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 90 then
# line 338 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      emit_meta_control_sequence(data, ts, te, :control)
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 92 then
# line 343 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      emit_meta_control_sequence(data, ts, te, :meta_sequence)
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 86 then
# line 1 "NONE"
		begin
	case act
	when 18 then
	begin begin p = ((te))-1; end

      text = text(data, ts, te, 1).first
      emit(:backref, :number, text, ts-1, te)
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

    end
	when 19 then
	begin begin p = ((te))-1; end

      emit(:escape, :octal, *text(data, ts, te, 1))
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

    end
end 
			end
	when 30 then
# line 370 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      text = text(data, ts, te-1).first
      emit(:conditional, :condition, text, ts, te-1)
      emit(:conditional, :condition_close, ')', te-1, te)
     end
		end
	when 96 then
# line 376 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      p = p - 1;
      	begin
		stack[top] = cs
		top+= 1
		cs = 110
		_goto_level = _again
		next
	end

     end
		end
	when 97 then
# line 376 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      p = p - 1;
      	begin
		stack[top] = cs
		top+= 1
		cs = 110
		_goto_level = _again
		next
	end

     end
		end
	when 29 then
# line 376 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 begin p = ((te))-1; end
 begin 
      p = p - 1;
      	begin
		stack[top] = cs
		top+= 1
		cs = 110
		_goto_level = _again
		next
	end

     end
		end
	when 36 then
# line 389 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:meta, :dot, *text(data, ts, te))
     end
		end
	when 41 then
# line 393 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      if conditional_stack.last == group_depth
        emit(:conditional, :separator, *text(data, ts, te))
      else
        emit(:meta, :alternation, *text(data, ts, te))
      end
     end
		end
	when 40 then
# line 403 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:anchor, :bol, *text(data, ts, te))
     end
		end
	when 33 then
# line 407 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:anchor, :eol, *text(data, ts, te))
     end
		end
	when 59 then
# line 411 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:keep, :mark, *text(data, ts, te))
     end
		end
	when 58 then
# line 415 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      case text = text(data, ts, te).first
      when '\\A'; emit(:anchor, :bos,                text, ts, te)
      when '\\z'; emit(:anchor, :eos,                text, ts, te)
      when '\\Z'; emit(:anchor, :eos_ob_eol,         text, ts, te)
      when '\\b'; emit(:anchor, :word_boundary,      text, ts, te)
      when '\\B'; emit(:anchor, :nonword_boundary,   text, ts, te)
      when '\\G'; emit(:anchor, :match_start,        text, ts, te)
      end
     end
		end
	when 39 then
# line 426 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      append_literal(data, ts, te)
     end
		end
	when 49 then
# line 441 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      text = text(data, ts, te).first

      conditional_stack << group_depth

      emit(:conditional, :open, text[0..-2], ts, te-1)
      emit(:conditional, :condition_open, '(', te-1, te)
      	begin
		stack[top] = cs
		top+= 1
		cs = 149
		_goto_level = _again
		next
	end

     end
		end
	when 50 then
# line 472 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      text = text(data, ts, te).first
      if text[2..-1] =~ /([^\-mixdau:]|^$)|-.*([dau])/
        raise InvalidGroupOption.new($1 || "-#{$2}", text)
      end
      emit_options(text, ts, te)
     end
		end
	when 7 then
# line 486 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      case text = text(data, ts, te).first
      when '(?=';  emit(:assertion, :lookahead,    text, ts, te)
      when '(?!';  emit(:assertion, :nlookahead,   text, ts, te)
      when '(?<='; emit(:assertion, :lookbehind,   text, ts, te)
      when '(?<!'; emit(:assertion, :nlookbehind,  text, ts, te)
      end
     end
		end
	when 6 then
# line 503 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      case text = text(data, ts, te).first
      when '(?:';  emit(:group, :passive,      text, ts, te)
      when '(?>';  emit(:group, :atomic,       text, ts, te)
      when '(?~';  emit(:group, :absence,      text, ts, te)

      when /^\(\?(?:<>|'')/
        validation_error(:group, 'named group', 'name is empty')

      when /^\(\?<\w*>/
        emit(:group, :named_ab,  text, ts, te)

      when /^\(\?'\w*'/
        emit(:group, :named_sq,  text, ts, te)

      end
     end
		end
	when 9 then
# line 544 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      case text = text(data, ts, te).first
      when /^\\([gk])(<>|'')/ # angle brackets
        validation_error(:backref, 'ref/call', 'ref ID is empty')

      when /^\\([gk])<[^\d+-]\w*>/ # angle-brackets
        if $1 == 'k'
          emit(:backref, :name_ref_ab, text, ts, te)
        else
          emit(:backref, :name_call_ab, text, ts, te)
        end

      when /^\\([gk])'[^\d+-]\w*'/ #single quotes
        if $1 == 'k'
          emit(:backref, :name_ref_sq, text, ts, te)
        else
          emit(:backref, :name_call_sq, text, ts, te)
        end

      when /^\\([gk])<\d+>/ # angle-brackets
        if $1 == 'k'
          emit(:backref, :number_ref_ab, text, ts, te)
        else
          emit(:backref, :number_call_ab, text, ts, te)
        end

      when /^\\([gk])'\d+'/ # single quotes
        if $1 == 'k'
          emit(:backref, :number_ref_sq, text, ts, te)
        else
          emit(:backref, :number_call_sq, text, ts, te)
        end

      when /^\\(?:g<\+|g<-|(k)<-)\d+>/ # angle-brackets
        if $1 == 'k'
          emit(:backref, :number_rel_ref_ab, text, ts, te)
        else
          emit(:backref, :number_rel_call_ab, text, ts, te)
        end

      when /^\\(?:g'\+|g'-|(k)'-)\d+'/ # single quotes
        if $1 == 'k'
          emit(:backref, :number_rel_ref_sq, text, ts, te)
        else
          emit(:backref, :number_rel_call_sq, text, ts, te)
        end

      when /^\\k<[^\d+\-]\w*[+\-]\d+>/ # angle-brackets
        emit(:backref, :name_recursion_ref_ab, text, ts, te)

      when /^\\k'[^\d+\-]\w*[+\-]\d+'/ # single-quotes
        emit(:backref, :name_recursion_ref_sq, text, ts, te)

      when /^\\([gk])<[+\-]?\d+[+\-]\d+>/ # angle-brackets
        emit(:backref, :number_recursion_ref_ab, text, ts, te)

      when /^\\([gk])'[+\-]?\d+[+\-]\d+'/ # single-quotes
        emit(:backref, :number_recursion_ref_sq, text, ts, te)

      end
     end
		end
	when 56 then
# line 609 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      case text = text(data, ts, te).first
      when '?' ;  emit(:quantifier, :zero_or_one,            text, ts, te)
      when '??';  emit(:quantifier, :zero_or_one_reluctant,  text, ts, te)
      when '?+';  emit(:quantifier, :zero_or_one_possessive, text, ts, te)
      end
     end
		end
	when 52 then
# line 617 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      case text = text(data, ts, te).first
      when '*' ;  emit(:quantifier, :zero_or_more,            text, ts, te)
      when '*?';  emit(:quantifier, :zero_or_more_reluctant,  text, ts, te)
      when '*+';  emit(:quantifier, :zero_or_more_possessive, text, ts, te)
      end
     end
		end
	when 54 then
# line 625 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      case text = text(data, ts, te).first
      when '+' ;  emit(:quantifier, :one_or_more,            text, ts, te)
      when '+?';  emit(:quantifier, :one_or_more_reluctant,  text, ts, te)
      when '++';  emit(:quantifier, :one_or_more_possessive, text, ts, te)
      end
     end
		end
	when 62 then
# line 633 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:quantifier, :interval, *text(data, ts, te))
     end
		end
	when 45 then
# line 648 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      if free_spacing
        emit(:free_space, :comment, *text(data, ts, te))
      else
        # consume only the pound sign (#) and backtrack to do regular scanning
        append_literal(data, ts, ts + 1)
         begin p = (( ts + 1))-1; end

      end
     end
		end
	when 48 then
# line 472 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      text = text(data, ts, te).first
      if text[2..-1] =~ /([^\-mixdau:]|^$)|-.*([dau])/
        raise InvalidGroupOption.new($1 || "-#{$2}", text)
      end
      emit_options(text, ts, te)
     end
		end
	when 46 then
# line 521 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      text = text(data, ts, te).first
      emit(:group, :capture, text, ts, te)
     end
		end
	when 55 then
# line 609 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      case text = text(data, ts, te).first
      when '?' ;  emit(:quantifier, :zero_or_one,            text, ts, te)
      when '??';  emit(:quantifier, :zero_or_one_reluctant,  text, ts, te)
      when '?+';  emit(:quantifier, :zero_or_one_possessive, text, ts, te)
      end
     end
		end
	when 51 then
# line 617 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      case text = text(data, ts, te).first
      when '*' ;  emit(:quantifier, :zero_or_more,            text, ts, te)
      when '*?';  emit(:quantifier, :zero_or_more_reluctant,  text, ts, te)
      when '*+';  emit(:quantifier, :zero_or_more_possessive, text, ts, te)
      end
     end
		end
	when 53 then
# line 625 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      case text = text(data, ts, te).first
      when '+' ;  emit(:quantifier, :one_or_more,            text, ts, te)
      when '+?';  emit(:quantifier, :one_or_more_reluctant,  text, ts, te)
      when '++';  emit(:quantifier, :one_or_more_possessive, text, ts, te)
      end
     end
		end
	when 61 then
# line 633 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      emit(:quantifier, :interval, *text(data, ts, te))
     end
		end
	when 60 then
# line 638 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      append_literal(data, ts, te)
     end
		end
	when 57 then
# line 644 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      	begin
		stack[top] = cs
		top+= 1
		cs = 138
		_goto_level = _again
		next
	end

     end
		end
	when 44 then
# line 648 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      if free_spacing
        emit(:free_space, :comment, *text(data, ts, te))
      else
        # consume only the pound sign (#) and backtrack to do regular scanning
        append_literal(data, ts, ts + 1)
         begin p = (( ts + 1))-1; end

      end
     end
		end
	when 43 then
# line 658 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      if free_spacing
        emit(:free_space, :whitespace, *text(data, ts, te))
      else
        append_literal(data, ts, te)
      end
     end
		end
	when 42 then
# line 673 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      append_literal(data, ts, te)
     end
		end
	when 3 then
# line 472 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 begin p = ((te))-1; end
 begin 
      text = text(data, ts, te).first
      if text[2..-1] =~ /([^\-mixdau:]|^$)|-.*([dau])/
        raise InvalidGroupOption.new($1 || "-#{$2}", text)
      end
      emit_options(text, ts, te)
     end
		end
	when 10 then
# line 638 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 begin p = ((te))-1; end
 begin 
      append_literal(data, ts, te)
     end
		end
	when 8 then
# line 644 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 begin p = ((te))-1; end
 begin 
      	begin
		stack[top] = cs
		top+= 1
		cs = 138
		_goto_level = _again
		next
	end

     end
		end
	when 1 then
# line 1 "NONE"
		begin
	case act
	when 0 then
	begin	begin
		cs = 0
		_goto_level = _again
		next
	end
end
	when 56 then
	begin begin p = ((te))-1; end

      append_literal(data, ts, te)
    end
end 
			end
	when 74 then
# line 137 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin

    text = ts ? copy(data, ts-1..-1) : data.pack('c*')
    raise PrematureEndError.new( text )
  		end
# line 211 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      emit(:set, :open, *text(data, ts, te))
      	begin
		stack[top] = cs
		top+= 1
		cs = 130
		_goto_level = _again
		next
	end

     end
		end
	when 17 then
# line 137 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin

    text = ts ? copy(data, ts-1..-1) : data.pack('c*')
    raise PrematureEndError.new( text )
  		end
# line 211 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 begin p = ((te))-1; end
 begin 
      emit(:set, :open, *text(data, ts, te))
      	begin
		stack[top] = cs
		top+= 1
		cs = 130
		_goto_level = _again
		next
	end

     end
		end
	when 93 then
# line 137 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin

    text = ts ? copy(data, ts-1..-1) : data.pack('c*')
    raise PrematureEndError.new( text )
  		end
# line 329 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      emit(:escape, :hex, *text(data, ts, te, 1))
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 89 then
# line 137 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin

    text = ts ? copy(data, ts-1..-1) : data.pack('c*')
    raise PrematureEndError.new( text )
  		end
# line 338 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      emit_meta_control_sequence(data, ts, te, :control)
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 91 then
# line 137 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin

    text = ts ? copy(data, ts-1..-1) : data.pack('c*')
    raise PrematureEndError.new( text )
  		end
# line 343 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p
p = p - 1; begin 
      emit_meta_control_sequence(data, ts, te, :meta_sequence)
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 24 then
# line 137 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin

    text = ts ? copy(data, ts-1..-1) : data.pack('c*')
    raise PrematureEndError.new( text )
  		end
# line 338 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 begin p = ((te))-1; end
 begin 
      emit_meta_control_sequence(data, ts, te, :control)
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 26 then
# line 137 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin

    text = ts ? copy(data, ts-1..-1) : data.pack('c*')
    raise PrematureEndError.new( text )
  		end
# line 343 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 begin p = ((te))-1; end
 begin 
      emit_meta_control_sequence(data, ts, te, :meta_sequence)
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 28 then
# line 143 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin

    text = ts ? copy(data, ts-1..-1) : data.pack('c*')
    validation_error(:sequence, 'sequence', text)
  		end
# line 334 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

     end
		end
	when 5 then
# line 150 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.group_depth = group_depth - 1 		end
# line 457 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:group, :comment, *text(data, ts, te))
     end
		end
	when 35 then
# line 150 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.group_depth = group_depth - 1 		end
# line 526 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      if conditional_stack.last == group_depth + 1
        conditional_stack.pop
        emit(:conditional, :close, *text(data, ts, te))
      else
        if spacing_stack.length > 1 &&
           spacing_stack.last[:depth] == group_depth + 1
          spacing_stack.pop
          self.free_spacing = spacing_stack.last[:free_spacing]
        end

        emit(:group, :close, *text(data, ts, te))
      end
     end
		end
	when 37 then
# line 151 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.set_depth   = set_depth   + 1 		end
# line 432 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:set, :open, *text(data, ts, te))
      	begin
		stack[top] = cs
		top+= 1
		cs = 130
		_goto_level = _again
		next
	end

     end
		end
	when 68 then
# line 152 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.set_depth   = set_depth   - 1 		end
# line 158 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:set, :close, *text(data, ts, te))
      if in_set?
        	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

      else
        	begin
		cs = 110
		_goto_level = _again
		next
	end

      end
     end
		end
	when 73 then
# line 152 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.set_depth   = set_depth   - 1 		end
# line 167 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin  # special case, emits two tokens
      emit(:literal, :literal, copy(data, ts..te-2), ts, te - 1)
      emit(:set, :close, copy(data, ts+1..te-1), ts + 1, te)
      if in_set?
        	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end

      else
        	begin
		cs = 110
		_goto_level = _again
		next
	end

      end
     end
		end
	when 20 then
# line 152 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.set_depth   = set_depth   - 1 		end
# line 216 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      text = text(data, ts, te).first

      type = :posixclass
      class_name = text[2..-3]
      if class_name[0].chr == '^'
        class_name = class_name[1..-1]
        type = :nonposixclass
      end

      emit(type, class_name.to_sym, text, ts, te)
     end
		end
	when 19 then
# line 152 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.set_depth   = set_depth   - 1 		end
# line 229 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:set, :collation, *text(data, ts, te))
     end
		end
	when 21 then
# line 152 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.set_depth   = set_depth   - 1 		end
# line 233 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
te = p+1
 begin 
      emit(:set, :equivalent, *text(data, ts, te))
     end
		end
	when 66 then
# line 1 "NONE"
		begin
te = p+1
		end
# line 151 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.set_depth   = set_depth   + 1 		end
	when 81 then
# line 1 "NONE"
		begin
te = p+1
		end
# line 271 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
act = 18;		end
	when 80 then
# line 1 "NONE"
		begin
te = p+1
		end
# line 277 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
act = 19;		end
	when 2 then
# line 1 "NONE"
		begin
te = p+1
		end
# line 673 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
act = 56;		end
	when 47 then
# line 1 "NONE"
		begin
te = p+1
		end
# line 150 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.group_depth = group_depth - 1 		end
# line 149 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin
 self.group_depth = group_depth + 1 		end
# line 2582 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
	end
	end
	end
	if _goto_level <= _again
	case _re_scanner_to_state_actions[cs] 
	when 63 then
# line 1 "NONE"
		begin
ts = nil;		end
	when 31 then
# line 1 "NONE"
		begin
ts = nil;		end
# line 1 "NONE"
		begin
act = 0
		end
# line 2600 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
	end

	if cs == 0
		_goto_level = _out
		next
	end
	p += 1
	if p != pe
		_goto_level = _resume
		next
	end
	end
	if _goto_level <= _test_eof
	if p == eof
	if _re_scanner_eof_trans[cs] > 0
		_trans = _re_scanner_eof_trans[cs] - 1;
		_goto_level = _eof_trans
		next;
	end
	  case _re_scanner_eof_actions[cs]
	when 11 then
# line 8 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/property.rl"
		begin

    raise PrematureEndError.new('unicode property')
  		end
	when 22 then
# line 137 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
		begin

    text = ts ? copy(data, ts-1..-1) : data.pack('c*')
    raise PrematureEndError.new( text )
  		end
# line 2634 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
	  end
	end

	end
	if _goto_level <= _out
		break
	end
end
	end

# line 767 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"

    # to avoid "warning: assigned but unused variable - testEof"
    testEof = testEof

    if cs == re_scanner_error
      text = ts ? copy(data, ts-1..-1) : data.pack('c*')
      raise ScannerError.new("Scan error at '#{text}'")
    end

    raise PrematureEndError.new("(missing group closing paranthesis) "+
          "[#{group_depth}]") if in_group?
    raise PrematureEndError.new("(missing set closing bracket) "+
          "[#{set_depth}]") if in_set?

    # when the entire expression is a literal run
    emit_literal if literal

    tokens
  end

  # lazy-load property maps when first needed
  require 'yaml'
  PROP_MAPS_DIR = File.expand_path('../scanner/properties', __FILE__)

  def self.short_prop_map
    @short_prop_map ||= YAML.load_file("#{PROP_MAPS_DIR}/short.yml")
  end

  def self.long_prop_map
    @long_prop_map ||= YAML.load_file("#{PROP_MAPS_DIR}/long.yml")
  end

  # Emits an array with the details of the scanned pattern
  def emit(type, token, text, ts, te)
    #puts "EMIT: type: #{type}, token: #{token}, text: #{text}, ts: #{ts}, te: #{te}"

    emit_literal if literal

    if block
      block.call type, token, text, ts, te
    end

    tokens << [type, token, text, ts, te]
  end

  private

  attr_accessor :tokens, :literal, :block, :free_spacing, :spacing_stack,
                :group_depth, :set_depth, :conditional_stack

  def free_spacing?(input_object, options)
    if options && !input_object.is_a?(String)
      raise ArgumentError, 'options cannot be supplied unless scanning a String'
    end

    options = input_object.options if input_object.is_a?(::Regexp)

    return false unless options

    options & Regexp::EXTENDED != 0
  end

  def in_group?
    group_depth > 0
  end

  def in_set?
    set_depth > 0
  end

  # Copy from ts to te from data as text
  def copy(data, range)
    data[range].pack('c*')
  end

  # Copy from ts to te from data as text, returning an array with the text
  #  and the offsets used to copy it.
  def text(data, ts, te, soff = 0)
    [copy(data, ts-soff..te-1), ts-soff, te]
  end

  # Appends one or more characters to the literal buffer, to be emitted later
  # by a call to emit_literal. Contents can be a mix of ASCII and UTF-8.
  def append_literal(data, ts, te)
    self.literal = literal || []
    literal << text(data, ts, te)
  end

  # Emits the literal run collected by calls to the append_literal method,
  # using the total start (ts) and end (te) offsets of the run.
  def emit_literal
    ts, te = literal.first[1], literal.last[2]
    text = literal.map {|t| t[0]}.join

    text.force_encoding('utf-8') if text.respond_to?(:force_encoding)

    self.literal = nil
    emit(:literal, :literal, text, ts, te)
  end

  def emit_options(text, ts, te)
    token = nil

    # Ruby allows things like '(?-xxxx)' or '(?xx-xx--xx-:abc)'.
    text =~ /\(\?([mixdau]*)(-(?:[mix]*))*(:)?/
    positive, negative, group_local = $1, $2, $3

    if positive.include?('x')
      self.free_spacing = true
    end

    # If the x appears in both, treat it like ruby does, the second cancels
    # the first.
    if negative && negative.include?('x')
      self.free_spacing = false
    end

    if group_local
      spacing_stack << {:free_spacing => free_spacing, :depth => group_depth}
      token = :options
    else
      # switch for parent group level
      spacing_stack.last[:free_spacing] = free_spacing
      token = :options_switch
    end

    emit(:group, token, text, ts, te)
  end

  def emit_meta_control_sequence(data, ts, te, token)
    if data.last < 0x00 || data.last > 0x7F
      validation_error(:sequence, 'escape', token.to_s)
    end
    emit(:escape, token, *text(data, ts, te, 1))
  end

  # Centralizes and unifies the handling of validation related
  # errors.
  def validation_error(type, what, reason)
    case type
    when :group
      error = InvalidGroupError.new(what, reason)
    when :backref
      error = InvalidBackrefError.new(what, reason)
    when :sequence
      error = InvalidSequenceError.new(what, reason)
    end

    raise error # unless @@config.validation_ignore
  end
end # module Regexp::Scanner
