Source file src/regexp/syntax/perl_groups.go

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

View as plain text