Home | History | Annotate | Download | only in syntax
      1 // Copyright 2013 The Go Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style
      3 // license that can be found in the LICENSE file.
      4 
      5 // GENERATED BY make_perl_groups.pl; DO NOT EDIT.
      6 // make_perl_groups.pl >perl_groups.go
      7 
      8 package syntax
      9 
     10 var code1 = []rune{ /* \d */
     11 	0x30, 0x39,
     12 }
     13 
     14 var code2 = []rune{ /* \s */
     15 	0x9, 0xa,
     16 	0xc, 0xd,
     17 	0x20, 0x20,
     18 }
     19 
     20 var code3 = []rune{ /* \w */
     21 	0x30, 0x39,
     22 	0x41, 0x5a,
     23 	0x5f, 0x5f,
     24 	0x61, 0x7a,
     25 }
     26 
     27 var perlGroup = map[string]charGroup{
     28 	`\d`: {+1, code1},
     29 	`\D`: {-1, code1},
     30 	`\s`: {+1, code2},
     31 	`\S`: {-1, code2},
     32 	`\w`: {+1, code3},
     33 	`\W`: {-1, code3},
     34 }
     35 var code4 = []rune{ /* [:alnum:] */
     36 	0x30, 0x39,
     37 	0x41, 0x5a,
     38 	0x61, 0x7a,
     39 }
     40 
     41 var code5 = []rune{ /* [:alpha:] */
     42 	0x41, 0x5a,
     43 	0x61, 0x7a,
     44 }
     45 
     46 var code6 = []rune{ /* [:ascii:] */
     47 	0x0, 0x7f,
     48 }
     49 
     50 var code7 = []rune{ /* [:blank:] */
     51 	0x9, 0x9,
     52 	0x20, 0x20,
     53 }
     54 
     55 var code8 = []rune{ /* [:cntrl:] */
     56 	0x0, 0x1f,
     57 	0x7f, 0x7f,
     58 }
     59 
     60 var code9 = []rune{ /* [:digit:] */
     61 	0x30, 0x39,
     62 }
     63 
     64 var code10 = []rune{ /* [:graph:] */
     65 	0x21, 0x7e,
     66 }
     67 
     68 var code11 = []rune{ /* [:lower:] */
     69 	0x61, 0x7a,
     70 }
     71 
     72 var code12 = []rune{ /* [:print:] */
     73 	0x20, 0x7e,
     74 }
     75 
     76 var code13 = []rune{ /* [:punct:] */
     77 	0x21, 0x2f,
     78 	0x3a, 0x40,
     79 	0x5b, 0x60,
     80 	0x7b, 0x7e,
     81 }
     82 
     83 var code14 = []rune{ /* [:space:] */
     84 	0x9, 0xd,
     85 	0x20, 0x20,
     86 }
     87 
     88 var code15 = []rune{ /* [:upper:] */
     89 	0x41, 0x5a,
     90 }
     91 
     92 var code16 = []rune{ /* [:word:] */
     93 	0x30, 0x39,
     94 	0x41, 0x5a,
     95 	0x5f, 0x5f,
     96 	0x61, 0x7a,
     97 }
     98 
     99 var code17 = []rune{ /* [:xdigit:] */
    100 	0x30, 0x39,
    101 	0x41, 0x46,
    102 	0x61, 0x66,
    103 }
    104 
    105 var posixGroup = map[string]charGroup{
    106 	`[:alnum:]`:   {+1, code4},
    107 	`[:^alnum:]`:  {-1, code4},
    108 	`[:alpha:]`:   {+1, code5},
    109 	`[:^alpha:]`:  {-1, code5},
    110 	`[:ascii:]`:   {+1, code6},
    111 	`[:^ascii:]`:  {-1, code6},
    112 	`[:blank:]`:   {+1, code7},
    113 	`[:^blank:]`:  {-1, code7},
    114 	`[:cntrl:]`:   {+1, code8},
    115 	`[:^cntrl:]`:  {-1, code8},
    116 	`[:digit:]`:   {+1, code9},
    117 	`[:^digit:]`:  {-1, code9},
    118 	`[:graph:]`:   {+1, code10},
    119 	`[:^graph:]`:  {-1, code10},
    120 	`[:lower:]`:   {+1, code11},
    121 	`[:^lower:]`:  {-1, code11},
    122 	`[:print:]`:   {+1, code12},
    123 	`[:^print:]`:  {-1, code12},
    124 	`[:punct:]`:   {+1, code13},
    125 	`[:^punct:]`:  {-1, code13},
    126 	`[:space:]`:   {+1, code14},
    127 	`[:^space:]`:  {-1, code14},
    128 	`[:upper:]`:   {+1, code15},
    129 	`[:^upper:]`:  {-1, code15},
    130 	`[:word:]`:    {+1, code16},
    131 	`[:^word:]`:   {-1, code16},
    132 	`[:xdigit:]`:  {+1, code17},
    133 	`[:^xdigit:]`: {-1, code17},
    134 }
    135