Sha256: e4c4e2b22058cf70e9b80cdf87f87aa2153ad361fa195e67798305079ff2032f

Contents?: true

Size: 885 Bytes

Versions: 153

Compression:

Stored size: 885 Bytes

Contents

%%{
  machine re_char_type;

  single_codepoint_char_type = [dDhHsSwW];
  multi_codepoint_char_type  = [RX];

  char_type_char = single_codepoint_char_type | multi_codepoint_char_type;

  # Char types scanner
  # --------------------------------------------------------------------------
  char_type := |*
    char_type_char {
      case text = copy(data, ts-1, te)
      when '\d'; emit(:type, :digit,      text)
      when '\D'; emit(:type, :nondigit,   text)
      when '\h'; emit(:type, :hex,        text)
      when '\H'; emit(:type, :nonhex,     text)
      when '\s'; emit(:type, :space,      text)
      when '\S'; emit(:type, :nonspace,   text)
      when '\w'; emit(:type, :word,       text)
      when '\W'; emit(:type, :nonword,    text)
      when '\R'; emit(:type, :linebreak,  text)
      when '\X'; emit(:type, :xgrapheme,  text)
      end
      fret;
    };
  *|;
}%%

Version data entries

153 entries across 143 versions & 23 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.2/lib/regexp_parser/scanner/char_type.rl
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.6.1/lib/regexp_parser/scanner/char_type.rl
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.6.1/lib/regexp_parser/scanner/char_type.rl
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.6.1/lib/regexp_parser/scanner/char_type.rl
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.9.2/lib/regexp_parser/scanner/char_type.rl
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/scanner/char_type.rl
bison-0.1.0 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/scanner/char_type.rl
mlh-rubocop-config-1.0.3 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/scanner/char_type.rl
study_line-0.2.7 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/scanner/char_type.rl
study_line-0.2.6 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/scanner/char_type.rl
study_line-0.2.5 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/scanner/char_type.rl
study_line-0.2.4 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/scanner/char_type.rl
study_line-0.2.3 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/scanner/char_type.rl
study_line-0.2.2 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/scanner/char_type.rl
study_line-0.2.1 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/scanner/char_type.rl
study_line-0.2.0 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.9.0/lib/regexp_parser/scanner/char_type.rl
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/scanner/char_type.rl
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/scanner/char_type.rl
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/scanner/char_type.rl
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/scanner/char_type.rl