Bump to 1.14.1
[platform/upstream/augeas.git] / lib / uniwbrk / wbrktable.c
1 /* Word break auxiliary table.  -*- coding: utf-8 -*-
2    Copyright (C) 2009-2016 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 | HL) × (ALetter | HL)                  (WB5)
28                      (ALetter | HL) × Numeric                         (WB9)
29                                  HL × SQ                              (WB7a)
30                             Numeric × (ALetter | HL)                  (WB10)
31                             Numeric × Numeric                         (WB8)
32                            Katakana × Katakana                        (WB13)
33 (ALetter | HL | Numeric | Katakana) × ExtendNumLet                    (WB13a)
34                        ExtendNumLet × ExtendNumLet                    (WB13a)
35                    ExtendNumLet × (ALetter | HL | Numeric | Katakana) (WB13b)
36                  Regional_Indicator × Regional_Indicator              (WB13c)
37  */
38
39 const unsigned char uniwbrk_table[12][12] =
40 {        /* current:      OTHER        MIDNUMLET    NUMERIC     DQ         */
41          /*                 KATAKANA     MIDLETTER    EXTENDNUMLET  SQ     */
42          /*                   ALETTER      MIDNUM           RI          HL */
43   /* last */
44   /* WBP_OTHER */        {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1 },
45   /* WBP_KATAKANA */     {  1,  0,  1,  1,  1,  1,  1,  0,  1,  1,  1,  1 },
46   /* WBP_ALETTER */      {  1,  1,  0,  1,  1,  1,  0,  0,  1,  1,  1,  0 },
47   /* WBP_MIDNUMLET */    {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1 },
48   /* WBP_MIDLETTER */    {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1 },
49   /* WBP_MIDNUM */       {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1 },
50   /* WBP_NUMERIC */      {  1,  1,  0,  1,  1,  1,  0,  0,  1,  1,  1,  0 },
51   /* WBP_EXTENDNUMLET */ {  1,  0,  0,  1,  1,  1,  0,  0,  1,  1,  1,  0 },
52   /* WBP_RI */           {  1,  1,  1,  1,  1,  1,  1,  1,  0,  1,  1,  1 },
53   /* WBP_DQ */           {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1 },
54   /* WBP_SQ */           {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1 },
55   /* WBP_HL */           {  1,  1,  0,  1,  1,  1,  0,  0,  1,  1,  0,  0 }
56 };