maint: update copyright
[gnulib.git] / lib / uniwbrk / wbrktable.c
1 /* Word break auxiliary table.
2    Copyright (C) 2009-2014 Free Software Foundation, Inc.
3    Written by Bruno Haible <bruno@clisp.org>, 2009.
4
5    This program is free software: you can redistribute it and/or modify it
6    under the terms of the GNU Lesser General Public License as published
7    by the Free Software Foundation; either version 3 of the License, or
8    (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Lesser General Public License for more details.
14
15    You should have received a copy of the GNU Lesser General Public License
16    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17
18 #include <config.h>
19
20 /* Specification.  */
21 #include "wbrktable.h"
22
23 /* This table contains the following rules (see UAX #29):
24
25                        last         current
26
27                          ALetter × ALetter                         (WB5)
28                          ALetter × Numeric                         (WB9)
29                          Numeric × ALetter                         (WB10)
30                          Numeric × Numeric                         (WB8)
31                         Katakana × Katakana                        (WB13)
32   (ALetter | Numeric | Katakana) × ExtendNumLet                    (WB13a)
33                     ExtendNumLet × ExtendNumLet                    (WB13a)
34                     ExtendNumLet × (ALetter | Numeric | Katakana)  (WB13b)
35  */
36
37 const unsigned char uniwbrk_table[10][8] =
38 {        /* current:      OTHER            MIDNUMLET         NUMERIC         */
39          /*                   KATAKANA           MIDLETTER      EXTENDNUMLET */
40          /*                          ALETTER            MIDNUM               */
41   /* last */
42   /* WBP_OTHER */        {  1,    1,    1,    1,    1,    1,    1,    1 },
43   /* WBP_KATAKANA */     {  1,    0,    1,    1,    1,    1,    1,    0 },
44   /* WBP_ALETTER */      {  1,    1,    0,    1,    1,    1,    0,    0 },
45   /* WBP_MIDNUMLET */    {  1,    1,    1,    1,    1,    1,    1,    1 },
46   /* WBP_MIDLETTER */    {  1,    1,    1,    1,    1,    1,    1,    1 },
47   /* WBP_MIDNUM */       {  1,    1,    1,    1,    1,    1,    1,    1 },
48   /* WBP_NUMERIC */      {  1,    1,    0,    1,    1,    1,    0,    0 },
49   /* WBP_EXTENDNUMLET */ {  1,    0,    0,    1,    1,    1,    0,    0 },
50   /* WBP_EXTEND */       {  1,    1,    1,    1,    1,    1,    1,    1 },
51   /* WBP_FORMAT */       {  1,    1,    1,    1,    1,    1,    1,    1 }
52 };