Sha256: a68edff7251007bfa341b1997465c7eb4f43795e69d14138b090dca4d7f4bf42

Contents?: true

Size: 807 Bytes

Versions: 13

Compression:

Stored size: 807 Bytes

Contents

%%{
  machine re_property;

  property_char     = [pP];

  property_sequence = property_char . '{' . '^'? (alnum|space|[_\-\.=])+ '}';

  action premature_property_end {
    raise PrematureEndError.new('unicode property')
  }

  # Unicode properties scanner
  # --------------------------------------------------------------------------
  unicode_property := |*

    property_sequence < eof(premature_property_end) {
      text = copy(data, ts-1, te)
      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]
      validation_error(:property, name) unless token

      self.emit(type, token.to_sym, text)

      fret;
    };
  *|;
}%%

Version data entries

13 entries across 13 versions & 4 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.6.1/lib/regexp_parser/scanner/property.rl
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.6.1/lib/regexp_parser/scanner/property.rl
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.6.1/lib/regexp_parser/scanner/property.rl
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/regexp_parser-2.5.0/lib/regexp_parser/scanner/property.rl
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/regexp_parser-2.5.0/lib/regexp_parser/scanner/property.rl
regexp_parser-2.6.2 lib/regexp_parser/scanner/property.rl
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/regexp_parser-2.5.0/lib/regexp_parser/scanner/property.rl
regexp_parser-2.6.1 lib/regexp_parser/scanner/property.rl
regexp_parser-2.6.0 lib/regexp_parser/scanner/property.rl
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/regexp_parser-2.5.0/lib/regexp_parser/scanner/property.rl
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/regexp_parser-2.5.0/lib/regexp_parser/scanner/property.rl
regexp_parser-2.5.0 lib/regexp_parser/scanner/property.rl
regexp_parser-2.4.0 lib/regexp_parser/scanner/property.rl