spell_defs.h
Go to the documentation of this file.
1 #ifndef NVIM_SPELL_DEFS_H
2 #define NVIM_SPELL_DEFS_H
3 
4 #include <stdbool.h>
5 #include <stdint.h>
6 
7 #include "nvim/buffer_defs.h"
8 #include "nvim/garray.h"
9 #include "nvim/regexp_defs.h"
10 #include "nvim/types.h"
11 
12 #define MAXWLEN 254 // Assume max. word len is this many bytes.
13  // Some places assume a word length fits in a
14  // byte, thus it can't be above 255.
15 
16 // Number of regions supported.
17 #define MAXREGIONS 8
18 
19 // Type used for indexes in the word tree need to be at least 4 bytes. If int
20 // is 8 bytes we could use something smaller, but what?
21 typedef int idx_T;
22 
23 #define SPL_FNAME_TMPL "%s.%s.spl"
24 #define SPL_FNAME_ADD ".add."
25 #define SPL_FNAME_ASCII ".ascii."
26 
27 // Flags used for a word. Only the lowest byte can be used, the region byte
28 // comes above it.
29 #define WF_REGION 0x01 // region byte follows
30 #define WF_ONECAP 0x02 // word with one capital (or all capitals)
31 #define WF_ALLCAP 0x04 // word must be all capitals
32 #define WF_RARE 0x08 // rare word
33 #define WF_BANNED 0x10 // bad word
34 #define WF_AFX 0x20 // affix ID follows
35 #define WF_FIXCAP 0x40 // keep-case word, allcap not allowed
36 #define WF_KEEPCAP 0x80 // keep-case word
37 
38 // for <flags2>, shifted up one byte to be used in wn_flags
39 #define WF_HAS_AFF 0x0100 // word includes affix
40 #define WF_NEEDCOMP 0x0200 // word only valid in compound
41 #define WF_NOSUGGEST 0x0400 // word not to be suggested
42 #define WF_COMPROOT 0x0800 // already compounded word, COMPOUNDROOT
43 #define WF_NOCOMPBEF 0x1000 // no compounding before this word
44 #define WF_NOCOMPAFT 0x2000 // no compounding after this word
45 
46 // flags for <pflags>
47 #define WFP_RARE 0x01 // rare prefix
48 #define WFP_NC 0x02 // prefix is not combining
49 #define WFP_UP 0x04 // to-upper prefix
50 #define WFP_COMPPERMIT 0x08 // prefix with COMPOUNDPERMITFLAG
51 #define WFP_COMPFORBID 0x10 // prefix with COMPOUNDFORBIDFLAG
52 
53 // Flags for postponed prefixes in "sl_pidxs". Must be above affixID (one
54 // byte) and prefcondnr (two bytes).
55 #define WF_RAREPFX (WFP_RARE << 24) // rare postponed prefix
56 #define WF_PFX_NC (WFP_NC << 24) // non-combining postponed prefix
57 #define WF_PFX_UP (WFP_UP << 24) // to-upper postponed prefix
58 #define WF_PFX_COMPPERMIT (WFP_COMPPERMIT << 24) // postponed prefix with
59  // COMPOUNDPERMITFLAG
60 #define WF_PFX_COMPFORBID (WFP_COMPFORBID << 24) // postponed prefix with
61  // COMPOUNDFORBIDFLAG
62 
63 
64 // flags for <compoptions>
65 #define COMP_CHECKDUP 1 // CHECKCOMPOUNDDUP
66 #define COMP_CHECKREP 2 // CHECKCOMPOUNDREP
67 #define COMP_CHECKCASE 4 // CHECKCOMPOUNDCASE
68 #define COMP_CHECKTRIPLE 8 // CHECKCOMPOUNDTRIPLE
69 
70 // Info from "REP", "REPSAL" and "SAL" entries in ".aff" file used in si_rep,
71 // si_repsal, sl_rep, and si_sal. Not for sl_sal!
72 // One replacement: from "ft_from" to "ft_to".
73 typedef struct fromto_S {
76 } fromto_T;
77 
78 // Info from "SAL" entries in ".aff" file used in sl_sal.
79 // The info is split for quick processing by spell_soundfold().
80 // Note that "sm_oneof" and "sm_rules" point into sm_lead.
81 typedef struct salitem_S {
82  char_u *sm_lead; // leading letters
83  int sm_leadlen; // length of "sm_lead"
84  char_u *sm_oneof; // letters from () or NULL
85  char_u *sm_rules; // rules like ^, $, priority
86  char_u *sm_to; // replacement.
87  int *sm_lead_w; // wide character copy of "sm_lead"
88  int *sm_oneof_w; // wide character copy of "sm_oneof"
89  int *sm_to_w; // wide character copy of "sm_to"
90 } salitem_T;
91 
92 typedef int salfirst_T;
93 
94 // Values for SP_*ERROR are negative, positive values are used by
95 // read_cnt_string().
96 #define SP_TRUNCERROR -1 // spell file truncated error
97 #define SP_FORMERROR -2 // format error in spell file
98 #define SP_OTHERERROR -3 // other error while reading spell file
99 
100 // Structure used to store words and other info for one language, loaded from
101 // a .spl file.
102 // The main access is through the tree in "sl_fbyts/sl_fidxs", storing the
103 // case-folded words. "sl_kbyts/sl_kidxs" is for keep-case words.
104 //
105 // The "byts" array stores the possible bytes in each tree node, preceded by
106 // the number of possible bytes, sorted on byte value:
107 // <len> <byte1> <byte2> ...
108 // The "idxs" array stores the index of the child node corresponding to the
109 // byte in "byts".
110 // Exception: when the byte is zero, the word may end here and "idxs" holds
111 // the flags, region mask and affixID for the word. There may be several
112 // zeros in sequence for alternative flag/region/affixID combinations.
113 typedef struct slang_S slang_T;
114 
115 struct slang_S {
116  slang_T *sl_next; // next language
117  char_u *sl_name; // language name "en", "en.rare", "nl", etc.
118  char_u *sl_fname; // name of .spl file
119  bool sl_add; // true if it's a .add file.
120 
121  char_u *sl_fbyts; // case-folded word bytes
122  long sl_fbyts_len; // length of sl_fbyts
123  idx_T *sl_fidxs; // case-folded word indexes
124  char_u *sl_kbyts; // keep-case word bytes
125  idx_T *sl_kidxs; // keep-case word indexes
126  char_u *sl_pbyts; // prefix tree word bytes
127  idx_T *sl_pidxs; // prefix tree word indexes
128 
129  char_u *sl_info; // infotext string or NULL
130 
132  // table with up to 8 region names plus NUL
133 
134  char_u *sl_midword; // MIDWORD string or NULL
135 
136  hashtab_T sl_wordcount; // hashtable with word count, wordcount_T
137 
138  int sl_compmax; // COMPOUNDWORDMAX (default: MAXWLEN)
139  int sl_compminlen; // COMPOUNDMIN (default: 0)
140  int sl_compsylmax; // COMPOUNDSYLMAX (default: MAXWLEN)
141  int sl_compoptions; // COMP_* flags
142  garray_T sl_comppat; // CHECKCOMPOUNDPATTERN items
143  regprog_T *sl_compprog; // COMPOUNDRULE turned into a regexp progrm
144  // (NULL when no compounding)
145  char_u *sl_comprules; // all COMPOUNDRULE concatenated (or NULL)
146  char_u *sl_compstartflags; // flags for first compound word
147  char_u *sl_compallflags; // all flags for compound words
148  bool sl_nobreak; // When true: no spaces between words
149  char_u *sl_syllable; // SYLLABLE repeatable chars or NULL
150  garray_T sl_syl_items; // syllable items
151 
152  int sl_prefixcnt; // number of items in "sl_prefprog"
153  regprog_T **sl_prefprog; // table with regprogs for prefixes
154 
155  garray_T sl_rep; // list of fromto_T entries from REP lines
156  int16_t sl_rep_first[256]; // indexes where byte first appears, -1 if
157  // there is none
158  garray_T sl_sal; // list of salitem_T entries from SAL lines
159  salfirst_T sl_sal_first[256]; // indexes where byte first appears, -1 if
160  // there is none
161  bool sl_followup; // SAL followup
162  bool sl_collapse; // SAL collapse_result
163  bool sl_rem_accents; // SAL remove_accents
164  bool sl_sofo; // SOFOFROM and SOFOTO instead of SAL items:
165  // "sl_sal_first" maps chars
166  // "sl_sal" is a list of wide char lists.
167  garray_T sl_repsal; // list of fromto_T entries from REPSAL lines
168  int16_t sl_repsal_first[256]; // sl_rep_first for REPSAL lines
169  bool sl_nosplitsugs; // don't suggest splitting a word
170  bool sl_nocompoundsugs; // don't suggest compounding
171 
172  // Info from the .sug file. Loaded on demand.
173  time_t sl_sugtime; // timestamp for .sug file
174  char_u *sl_sbyts; // soundfolded word bytes
175  idx_T *sl_sidxs; // soundfolded word indexes
176  buf_T *sl_sugbuf; // buffer with word number table
177  bool sl_sugloaded; // true when .sug file was loaded or failed to
178  // load
179 
180  bool sl_has_map; // true, if there is a MAP line
181  hashtab_T sl_map_hash; // MAP for multi-byte chars
182  int sl_map_array[256]; // MAP for first 256 chars
183  hashtab_T sl_sounddone; // table with soundfolded words that have
184  // handled, see add_sound_suggest()
185 };
186 
187 // Structure used in "b_langp", filled from 'spelllang'.
188 typedef struct langp_S {
189  slang_T *lp_slang; // info for this language
190  slang_T *lp_sallang; // language used for sound folding or NULL
191  slang_T *lp_replang; // language used for REP items or NULL
192  int lp_region; // bitmask for region or REGION_ALL
193 } langp_T;
194 
195 #define LANGP_ENTRY(ga, i) (((langp_T *)(ga).ga_data) + (i))
196 
197 #define VIMSUGMAGIC "VIMsug" // string at start of Vim .sug file
198 #define VIMSUGMAGICL 6
199 #define VIMSUGVERSION 1
200 
201 #define REGION_ALL 0xff // word valid in all regions
202 
203 // The tables used for recognizing word characters according to spelling.
204 // These are only used for the first 256 characters of 'encoding'.
205 typedef struct {
206  bool st_isw[256]; // flags: is word char
207  bool st_isu[256]; // flags: is uppercase char
208  char_u st_fold[256]; // chars: folded case
209  char_u st_upper[256]; // chars: upper case
210 } spelltab_T;
211 
212 // For finding suggestions: At each node in the tree these states are tried:
213 typedef enum {
214  STATE_START = 0, // At start of node check for NUL bytes (goodword
215  // ends); if badword ends there is a match, otherwise
216  // try splitting word.
217  STATE_NOPREFIX, // try without prefix
218  STATE_SPLITUNDO, // Undo splitting.
219  STATE_ENDNUL, // Past NUL bytes at start of the node.
220  STATE_PLAIN, // Use each byte of the node.
221  STATE_DEL, // Delete a byte from the bad word.
222  STATE_INS_PREP, // Prepare for inserting bytes.
223  STATE_INS, // Insert a byte in the bad word.
224  STATE_SWAP, // Swap two bytes.
225  STATE_UNSWAP, // Undo swap two characters.
226  STATE_SWAP3, // Swap two characters over three.
227  STATE_UNSWAP3, // Undo Swap two characters over three.
228  STATE_UNROT3L, // Undo rotate three characters left
229  STATE_UNROT3R, // Undo rotate three characters right
230  STATE_REP_INI, // Prepare for using REP items.
231  STATE_REP, // Use matching REP items from the .aff file.
232  STATE_REP_UNDO, // Undo a REP item replacement.
233  STATE_FINAL, // End of this node.
234 } state_T;
235 
236 // Struct to keep the state at each level in suggest_try_change().
237 typedef struct trystate_S {
238  state_T ts_state; // state at this level, STATE_
239  int ts_score; // score
240  idx_T ts_arridx; // index in tree array, start of node
241  short ts_curi; // index in list of child nodes
242  char_u ts_fidx; // index in fword[], case-folded bad word
243  char_u ts_fidxtry; // ts_fidx at which bytes may be changed
244  char_u ts_twordlen; // valid length of tword[]
245  char_u ts_prefixdepth; // stack depth for end of prefix or
246  // PFD_PREFIXTREE or PFD_NOPREFIX
247  char_u ts_flags; // TSF_ flags
248  char_u ts_tcharlen; // number of bytes in tword character
249  char_u ts_tcharidx; // current byte index in tword character
250  char_u ts_isdiff; // DIFF_ values
251  char_u ts_fcharstart; // index in fword where badword char started
252  char_u ts_prewordlen; // length of word in "preword[]"
253  char_u ts_splitoff; // index in "tword" after last split
254  char_u ts_splitfidx; // "ts_fidx" at word split
255  char_u ts_complen; // nr of compound words used
256  char_u ts_compsplit; // index for "compflags" where word was spit
257  char_u ts_save_badflags; // su_badflags saved here
258  char_u ts_delidx; // index in fword for char that was deleted,
259  // valid when "ts_flags" has TSF_DIDDEL
260 } trystate_T;
261 
262 // Use our own character-case definitions, because the current locale may
263 // differ from what the .spl file uses.
264 // These must not be called with negative number!
265 // Multi-byte implementation. For Unicode we can call utf_*(), but don't do
266 // that for ASCII, because we don't want to use 'casemap' here. Otherwise use
267 // the "w" library function for characters above 255.
268 #define SPELL_TOFOLD(c) ((c) >= 128 ? utf_fold(c) : (int)spelltab.st_fold[c])
269 
270 #define SPELL_TOUPPER(c) ((c) >= 128 ? mb_toupper(c) \
271  : (int)spelltab.st_upper[c])
272 
273 #define SPELL_ISUPPER(c) ((c) >= 128 ? mb_isupper(c) : spelltab.st_isu[c])
274 
275 // First language that is loaded, start of the linked list of loaded
276 // languages.
277 extern slang_T *first_lang;
278 
279 // file used for "zG" and "zW"
280 extern char_u *int_wordlist;
281 
282 extern spelltab_T spelltab;
283 extern int did_set_spelltab;
284 
285 extern char *e_format;
286 
287 // Values for "what" argument of spell_add_word()
288 typedef enum {
292 } SpellAddType;
293 
294 #endif // NVIM_SPELL_DEFS_H
trystate_S::ts_fidx
char_u ts_fidx
Definition: spell_defs.h:242
salitem_S::sm_lead_w
int * sm_lead_w
Definition: spell_defs.h:87
slang_S::sl_kbyts
char_u * sl_kbyts
Definition: spell_defs.h:124
slang_S::sl_sidxs
idx_T * sl_sidxs
Definition: spell_defs.h:175
salitem_S::sm_oneof_w
int * sm_oneof_w
Definition: spell_defs.h:88
slang_S::sl_pidxs
idx_T * sl_pidxs
Definition: spell_defs.h:127
slang_S::sl_nocompoundsugs
bool sl_nocompoundsugs
Definition: spell_defs.h:170
STATE_REP_UNDO
@ STATE_REP_UNDO
Definition: spell_defs.h:232
trystate_S::ts_tcharlen
char_u ts_tcharlen
Definition: spell_defs.h:248
trystate_S::ts_save_badflags
char_u ts_save_badflags
Definition: spell_defs.h:257
slang_S::sl_compmax
int sl_compmax
Definition: spell_defs.h:138
spelltab_T
Definition: spell_defs.h:205
STATE_UNROT3L
@ STATE_UNROT3L
Definition: spell_defs.h:228
types.h
STATE_INS_PREP
@ STATE_INS_PREP
Definition: spell_defs.h:222
salitem_S::sm_to_w
int * sm_to_w
Definition: spell_defs.h:89
slang_S::sl_pbyts
char_u * sl_pbyts
Definition: spell_defs.h:126
idx_T
int idx_T
Definition: spell_defs.h:21
salitem_S::sm_lead
char_u * sm_lead
Definition: spell_defs.h:82
STATE_SWAP3
@ STATE_SWAP3
Definition: spell_defs.h:226
STATE_INS
@ STATE_INS
Definition: spell_defs.h:223
salitem_S::sm_to
char_u * sm_to
Definition: spell_defs.h:86
slang_S::sl_repsal
garray_T sl_repsal
Definition: spell_defs.h:167
trystate_S::ts_delidx
char_u ts_delidx
Definition: spell_defs.h:258
slang_S::sl_sbyts
char_u * sl_sbyts
Definition: spell_defs.h:174
STATE_REP
@ STATE_REP
Definition: spell_defs.h:231
state_T
state_T
Definition: spell_defs.h:213
salitem_S::sm_leadlen
int sm_leadlen
Definition: spell_defs.h:83
did_set_spelltab
int did_set_spelltab
Definition: spell.c:289
salitem_S::sm_oneof
char_u * sm_oneof
Definition: spell_defs.h:84
slang_S::sl_fbyts_len
long sl_fbyts_len
Definition: spell_defs.h:122
langp_S::lp_replang
slang_T * lp_replang
Definition: spell_defs.h:191
hashtable_S
Definition: hashtab.h:63
regprog
Definition: regexp_defs.h:70
trystate_S::ts_arridx
idx_T ts_arridx
Definition: spell_defs.h:240
slang_S::sl_fname
char_u * sl_fname
Definition: spell_defs.h:118
spelltab
spelltab_T spelltab
Definition: spell.c:288
slang_S::sl_midword
char_u * sl_midword
Definition: spell_defs.h:134
slang_S::sl_nobreak
bool sl_nobreak
Definition: spell_defs.h:148
trystate_S::ts_score
int ts_score
Definition: spell_defs.h:239
trystate_S::ts_prewordlen
char_u ts_prewordlen
Definition: spell_defs.h:252
fromto_S::ft_to
char_u * ft_to
Definition: spell_defs.h:75
slang_S::sl_info
char_u * sl_info
Definition: spell_defs.h:129
trystate_S::ts_flags
char_u ts_flags
Definition: spell_defs.h:247
slang_S::sl_rep
garray_T sl_rep
Definition: spell_defs.h:155
growarray
Definition: garray.h:12
slang_S
Definition: spell_defs.h:115
slang_S::sl_map_hash
hashtab_T sl_map_hash
Definition: spell_defs.h:181
trystate_S::ts_complen
char_u ts_complen
Definition: spell_defs.h:255
langp_S::lp_slang
slang_T * lp_slang
Definition: spell_defs.h:189
salfirst_T
int salfirst_T
Definition: spell_defs.h:92
trystate_S::ts_splitoff
char_u ts_splitoff
Definition: spell_defs.h:253
slang_S::sl_repsal_first
int16_t sl_repsal_first[256]
Definition: spell_defs.h:168
STATE_DEL
@ STATE_DEL
Definition: spell_defs.h:221
salitem_T
struct salitem_S salitem_T
STATE_UNROT3R
@ STATE_UNROT3R
Definition: spell_defs.h:229
trystate_S::ts_isdiff
char_u ts_isdiff
Definition: spell_defs.h:250
slang_S::sl_add
bool sl_add
Definition: spell_defs.h:119
slang_S::sl_wordcount
hashtab_T sl_wordcount
Definition: spell_defs.h:136
trystate_S::ts_fcharstart
char_u ts_fcharstart
Definition: spell_defs.h:251
slang_S::sl_rem_accents
bool sl_rem_accents
Definition: spell_defs.h:163
SPELL_ADD_RARE
@ SPELL_ADD_RARE
Definition: spell_defs.h:291
slang_S::sl_prefprog
regprog_T ** sl_prefprog
Definition: spell_defs.h:153
slang_S::sl_sugtime
time_t sl_sugtime
Definition: spell_defs.h:173
slang_S::sl_rep_first
int16_t sl_rep_first[256]
Definition: spell_defs.h:156
slang_S::sl_map_array
int sl_map_array[256]
Definition: spell_defs.h:182
slang_S::sl_sounddone
hashtab_T sl_sounddone
Definition: spell_defs.h:183
slang_S::sl_kidxs
idx_T * sl_kidxs
Definition: spell_defs.h:125
SpellAddType
SpellAddType
Definition: spell_defs.h:288
slang_S::sl_syllable
char_u * sl_syllable
Definition: spell_defs.h:149
regexp_defs.h
slang_S::sl_comprules
char_u * sl_comprules
Definition: spell_defs.h:145
slang_S::sl_collapse
bool sl_collapse
Definition: spell_defs.h:162
fromto_T
struct fromto_S fromto_T
slang_S::sl_sofo
bool sl_sofo
Definition: spell_defs.h:164
STATE_UNSWAP3
@ STATE_UNSWAP3
Definition: spell_defs.h:227
salitem_S::sm_rules
char_u * sm_rules
Definition: spell_defs.h:85
langp_S::lp_sallang
slang_T * lp_sallang
Definition: spell_defs.h:190
slang_S::sl_compprog
regprog_T * sl_compprog
Definition: spell_defs.h:143
slang_S::sl_sal
garray_T sl_sal
Definition: spell_defs.h:158
slang_S::sl_compoptions
int sl_compoptions
Definition: spell_defs.h:141
fromto_S::ft_from
char_u * ft_from
Definition: spell_defs.h:74
slang_S::sl_prefixcnt
int sl_prefixcnt
Definition: spell_defs.h:152
slang_S::sl_compstartflags
char_u * sl_compstartflags
Definition: spell_defs.h:146
slang_S::sl_fidxs
idx_T * sl_fidxs
Definition: spell_defs.h:123
trystate_S::ts_fidxtry
char_u ts_fidxtry
Definition: spell_defs.h:243
SPELL_ADD_BAD
@ SPELL_ADD_BAD
Definition: spell_defs.h:290
slang_S::sl_sal_first
salfirst_T sl_sal_first[256]
Definition: spell_defs.h:159
STATE_ENDNUL
@ STATE_ENDNUL
Definition: spell_defs.h:219
STATE_SWAP
@ STATE_SWAP
Definition: spell_defs.h:224
trystate_T
struct trystate_S trystate_T
STATE_NOPREFIX
@ STATE_NOPREFIX
Definition: spell_defs.h:217
langp_T
struct langp_S langp_T
slang_S::sl_compallflags
char_u * sl_compallflags
Definition: spell_defs.h:147
slang_S::sl_regions
char_u sl_regions[MAXREGIONS *2+1]
Definition: spell_defs.h:131
char_u
unsigned char char_u
Definition: types.h:12
int_wordlist
char_u * int_wordlist
Definition: spell.c:136
langp_S::lp_region
int lp_region
Definition: spell_defs.h:192
garray.h
slang_S::sl_name
char_u * sl_name
Definition: spell_defs.h:117
file_buffer
Definition: buffer_defs.h:516
STATE_REP_INI
@ STATE_REP_INI
Definition: spell_defs.h:230
STATE_FINAL
@ STATE_FINAL
Definition: spell_defs.h:233
langp_S
Definition: spell_defs.h:188
slang_S::sl_next
slang_T * sl_next
Definition: spell_defs.h:116
slang_S::sl_fbyts
char_u * sl_fbyts
Definition: spell_defs.h:121
slang_S::sl_sugbuf
buf_T * sl_sugbuf
Definition: spell_defs.h:176
trystate_S::ts_curi
short ts_curi
Definition: spell_defs.h:241
buffer_defs.h
trystate_S::ts_compsplit
char_u ts_compsplit
Definition: spell_defs.h:256
fromto_S
Definition: spell_defs.h:73
slang_S::sl_has_map
bool sl_has_map
Definition: spell_defs.h:180
e_format
char * e_format
Definition: spell.c:331
slang_S::sl_comppat
garray_T sl_comppat
Definition: spell_defs.h:142
trystate_S::ts_twordlen
char_u ts_twordlen
Definition: spell_defs.h:244
slang_S::sl_nosplitsugs
bool sl_nosplitsugs
Definition: spell_defs.h:169
STATE_PLAIN
@ STATE_PLAIN
Definition: spell_defs.h:220
trystate_S::ts_prefixdepth
char_u ts_prefixdepth
Definition: spell_defs.h:245
salitem_S
Definition: spell_defs.h:81
SPELL_ADD_GOOD
@ SPELL_ADD_GOOD
Definition: spell_defs.h:289
slang_S::sl_sugloaded
bool sl_sugloaded
Definition: spell_defs.h:177
trystate_S
Definition: spell_defs.h:237
slang_S::sl_compsylmax
int sl_compsylmax
Definition: spell_defs.h:140
trystate_S::ts_splitfidx
char_u ts_splitfidx
Definition: spell_defs.h:254
STATE_START
@ STATE_START
Definition: spell_defs.h:214
slang_S::sl_compminlen
int sl_compminlen
Definition: spell_defs.h:139
MAXREGIONS
#define MAXREGIONS
Definition: spell_defs.h:17
trystate_S::ts_tcharidx
char_u ts_tcharidx
Definition: spell_defs.h:249
slang_S::sl_followup
bool sl_followup
Definition: spell_defs.h:161
first_lang
slang_T * first_lang
Definition: spell.c:133
STATE_UNSWAP
@ STATE_UNSWAP
Definition: spell_defs.h:225
trystate_S::ts_state
state_T ts_state
Definition: spell_defs.h:238
STATE_SPLITUNDO
@ STATE_SPLITUNDO
Definition: spell_defs.h:218
slang_S::sl_syl_items
garray_T sl_syl_items
Definition: spell_defs.h:150