Commits

Miki Tebeka committed 5f22ef8

flat structure

Comments (0)

Files changed (72)

+
+#include <stdlib.h> /* for calloc, free */
+#include "header.h"
+
+extern struct SN_env * SN_create_env(int S_size, int I_size, int B_size)
+{
+    struct SN_env * z = (struct SN_env *) calloc(1, sizeof(struct SN_env));
+    if (z == NULL) return NULL;
+    z->p = create_s();
+    if (z->p == NULL) goto error;
+    if (S_size)
+    {
+        int i;
+        z->S = (symbol * *) calloc(S_size, sizeof(symbol *));
+        if (z->S == NULL) goto error;
+
+        for (i = 0; i < S_size; i++)
+        {
+            z->S[i] = create_s();
+            if (z->S[i] == NULL) goto error;
+        }
+    }
+
+    if (I_size)
+    {
+        z->I = (int *) calloc(I_size, sizeof(int));
+        if (z->I == NULL) goto error;
+    }
+
+    if (B_size)
+    {
+        z->B = (unsigned char *) calloc(B_size, sizeof(unsigned char));
+        if (z->B == NULL) goto error;
+    }
+
+    return z;
+error:
+    SN_close_env(z, S_size);
+    return NULL;
+}
+
+extern void SN_close_env(struct SN_env * z, int S_size)
+{
+    if (z == NULL) return;
+    if (S_size)
+    {
+        int i;
+        for (i = 0; i < S_size; i++)
+        {
+            lose_s(z->S[i]);
+        }
+        free(z->S);
+    }
+    free(z->I);
+    free(z->B);
+    if (z->p) lose_s(z->p);
+    free(z);
+}
+
+extern int SN_set_current(struct SN_env * z, int size, const symbol * s)
+{
+    int err = replace_s(z, 0, z->l, size, s, NULL);
+    z->c = 0;
+    return err;
+}
+
+
+typedef unsigned char symbol;
+
+/* Or replace 'char' above with 'short' for 16 bit characters.
+
+   More precisely, replace 'char' with whatever type guarantees the
+   character width you need. Note however that sizeof(symbol) should divide
+   HEAD, defined in header.h as 2*sizeof(int), without remainder, otherwise
+   there is an alignment problem. In the unlikely event of a problem here,
+   consult Martin Porter.
+
+*/
+
+struct SN_env {
+    symbol * p;
+    int c; int l; int lb; int bra; int ket;
+    symbol * * S;
+    int * I;
+    unsigned char * B;
+};
+
+extern struct SN_env * SN_create_env(int S_size, int I_size, int B_size);
+extern void SN_close_env(struct SN_env * z, int S_size);
+
+extern int SN_set_current(struct SN_env * z, int size, const symbol * s);
+
+#!/bin/bash
+# Fetch snowball sources
+
+curl -LO http://snowball.tartarus.org/dist/libstemmer_c.tgz
+tar -xzf libstemmer_c.tgz
+find libstemmer_c -name '*.[ch]' -exec cp {} . \;
+rm stemwords.c libstemmer_utf8.c # example and duplicate
+rm -rf libstemmer_c libstemmer_c.tgz
+sed -i 's|include "../[a-z_]\+/|include "|' *.{c,h}
+
+#include <limits.h>
+
+#include "api.h"
+
+#define MAXINT INT_MAX
+#define MININT INT_MIN
+
+#define HEAD 2*sizeof(int)
+
+#define SIZE(p)        ((int *)(p))[-1]
+#define SET_SIZE(p, n) ((int *)(p))[-1] = n
+#define CAPACITY(p)    ((int *)(p))[-2]
+
+struct among
+{   int s_size;     /* number of chars in string */
+    const symbol * s;       /* search string */
+    int substring_i;/* index to longest matching substring */
+    int result;     /* result of the lookup */
+    int (* function)(struct SN_env *);
+};
+
+extern symbol * create_s(void);
+extern void lose_s(symbol * p);
+
+extern int skip_utf8(const symbol * p, int c, int lb, int l, int n);
+
+extern int in_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
+extern int in_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
+extern int out_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
+extern int out_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
+
+extern int in_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
+extern int in_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
+extern int out_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
+extern int out_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
+
+extern int eq_s(struct SN_env * z, int s_size, const symbol * s);
+extern int eq_s_b(struct SN_env * z, int s_size, const symbol * s);
+extern int eq_v(struct SN_env * z, const symbol * p);
+extern int eq_v_b(struct SN_env * z, const symbol * p);
+
+extern int find_among(struct SN_env * z, const struct among * v, int v_size);
+extern int find_among_b(struct SN_env * z, const struct among * v, int v_size);
+
+extern int replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const symbol * s, int * adjustment);
+extern int slice_from_s(struct SN_env * z, int s_size, const symbol * s);
+extern int slice_from_v(struct SN_env * z, const symbol * p);
+extern int slice_del(struct SN_env * z);
+
+extern int insert_s(struct SN_env * z, int bra, int ket, int s_size, const symbol * s);
+extern int insert_v(struct SN_env * z, int bra, int ket, const symbol * p);
+
+extern symbol * slice_to(struct SN_env * z, symbol * p);
+extern symbol * assign_to(struct SN_env * z, symbol * p);
+
+extern void debug(struct SN_env * z, int number, int line_count);
+
+
+#include <stdlib.h>
+#include <string.h>
+#include "libstemmer.h"
+#include "api.h"
+#include "modules.h"
+
+struct sb_stemmer {
+    struct SN_env * (*create)(void);
+    void (*close)(struct SN_env *);
+    int (*stem)(struct SN_env *);
+
+    struct SN_env * env;
+};
+
+extern const char **
+sb_stemmer_list(void)
+{
+    return algorithm_names;
+}
+
+static stemmer_encoding_t
+sb_getenc(const char * charenc)
+{
+    struct stemmer_encoding * encoding;
+    if (charenc == NULL) return ENC_UTF_8;
+    for (encoding = encodings; encoding->name != 0; encoding++) {
+	if (strcmp(encoding->name, charenc) == 0) break;
+    }
+    if (encoding->name == NULL) return ENC_UNKNOWN;
+    return encoding->enc;
+}
+
+extern struct sb_stemmer *
+sb_stemmer_new(const char * algorithm, const char * charenc)
+{
+    stemmer_encoding_t enc;
+    struct stemmer_modules * module;
+    struct sb_stemmer * stemmer;
+
+    enc = sb_getenc(charenc);
+    if (enc == ENC_UNKNOWN) return NULL;
+
+    for (module = modules; module->name != 0; module++) {
+	if (strcmp(module->name, algorithm) == 0 && module->enc == enc) break;
+    }
+    if (module->name == NULL) return NULL;
+    
+    stemmer = (struct sb_stemmer *) malloc(sizeof(struct sb_stemmer));
+    if (stemmer == NULL) return NULL;
+
+    stemmer->create = module->create;
+    stemmer->close = module->close;
+    stemmer->stem = module->stem;
+
+    stemmer->env = stemmer->create();
+    if (stemmer->env == NULL)
+    {
+        sb_stemmer_delete(stemmer);
+        return NULL;
+    }
+
+    return stemmer;
+}
+
+void
+sb_stemmer_delete(struct sb_stemmer * stemmer)
+{
+    if (stemmer == 0) return;
+    if (stemmer->close == 0) return;
+    stemmer->close(stemmer->env);
+    stemmer->close = 0;
+    free(stemmer);
+}
+
+const sb_symbol *
+sb_stemmer_stem(struct sb_stemmer * stemmer, const sb_symbol * word, int size)
+{
+    int ret;
+    if (SN_set_current(stemmer->env, size, (const symbol *)(word)))
+    {
+        stemmer->env->l = 0;
+        return NULL;
+    }
+    ret = stemmer->stem(stemmer->env);
+    if (ret < 0) return NULL;
+    stemmer->env->p[stemmer->env->l] = 0;
+    return (const sb_symbol *)(stemmer->env->p);
+}
+
+int
+sb_stemmer_length(struct sb_stemmer * stemmer)
+{
+    return stemmer->env->l;
+}
+
+/* Make header file work when included from C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct sb_stemmer;
+typedef unsigned char sb_symbol;
+
+/* FIXME - should be able to get a version number for each stemming
+ * algorithm (which will be incremented each time the output changes). */
+
+/** Returns an array of the names of the available stemming algorithms.
+ *  Note that these are the canonical names - aliases (ie, other names for
+ *  the same algorithm) will not be included in the list.
+ *  The list is terminated with a null pointer.
+ *
+ *  The list must not be modified in any way.
+ */
+const char ** sb_stemmer_list(void);
+
+/** Create a new stemmer object, using the specified algorithm, for the
+ *  specified character encoding.
+ *
+ *  All algorithms will usually be available in UTF-8, but may also be
+ *  available in other character encodings.
+ *
+ *  @param algorithm The algorithm name.  This is either the english
+ *  name of the algorithm, or the 2 or 3 letter ISO 639 codes for the
+ *  language.  Note that case is significant in this parameter - the
+ *  value should be supplied in lower case.
+ *
+ *  @param charenc The character encoding.  NULL may be passed as
+ *  this value, in which case UTF-8 encoding will be assumed. Otherwise,
+ *  the argument may be one of "UTF_8", "ISO_8859_1" (ie, Latin 1),
+ *  "CP850" (ie, MS-DOS Latin 1) or "KOI8_R" (Russian).  Note that
+ *  case is significant in this parameter.
+ *
+ *  @return NULL if the specified algorithm is not recognised, or the
+ *  algorithm is not available for the requested encoding.  Otherwise,
+ *  returns a pointer to a newly created stemmer for the requested algorithm.
+ *  The returned pointer must be deleted by calling sb_stemmer_delete().
+ *
+ *  @note NULL will also be returned if an out of memory error occurs.
+ */
+struct sb_stemmer * sb_stemmer_new(const char * algorithm, const char * charenc);
+
+/** Delete a stemmer object.
+ *
+ *  This frees all resources allocated for the stemmer.  After calling
+ *  this function, the supplied stemmer may no longer be used in any way.
+ *
+ *  It is safe to pass a null pointer to this function - this will have
+ *  no effect.
+ */
+void                sb_stemmer_delete(struct sb_stemmer * stemmer);
+
+/** Stem a word.
+ *
+ *  The return value is owned by the stemmer - it must not be freed or
+ *  modified, and it will become invalid when the stemmer is called again,
+ *  or if the stemmer is freed.
+ *
+ *  The length of the return value can be obtained using sb_stemmer_length().
+ *
+ *  If an out-of-memory error occurs, this will return NULL.
+ */
+const sb_symbol *   sb_stemmer_stem(struct sb_stemmer * stemmer,
+				    const sb_symbol * word, int size);
+
+/** Get the length of the result of the last stemmed word.
+ *  This should not be called before sb_stemmer_stem() has been called.
+ */
+int                 sb_stemmer_length(struct sb_stemmer * stemmer);
+
+#ifdef __cplusplus
+}
+#endif
+
+/* libstemmer/modules.h: List of stemming modules.
+ *
+ * This file is generated by mkmodules.pl from a list of module names.
+ * Do not edit manually.
+ *
+ * Modules included by this file are: danish, dutch, english, finnish, french,
+ * german, hungarian, italian, norwegian, porter, portuguese, romanian,
+ * russian, spanish, swedish, turkish
+ */
+
+#include "stem_ISO_8859_1_danish.h"
+#include "stem_UTF_8_danish.h"
+#include "stem_ISO_8859_1_dutch.h"
+#include "stem_UTF_8_dutch.h"
+#include "stem_ISO_8859_1_english.h"
+#include "stem_UTF_8_english.h"
+#include "stem_ISO_8859_1_finnish.h"
+#include "stem_UTF_8_finnish.h"
+#include "stem_ISO_8859_1_french.h"
+#include "stem_UTF_8_french.h"
+#include "stem_ISO_8859_1_german.h"
+#include "stem_UTF_8_german.h"
+#include "stem_ISO_8859_1_hungarian.h"
+#include "stem_UTF_8_hungarian.h"
+#include "stem_ISO_8859_1_italian.h"
+#include "stem_UTF_8_italian.h"
+#include "stem_ISO_8859_1_norwegian.h"
+#include "stem_UTF_8_norwegian.h"
+#include "stem_ISO_8859_1_porter.h"
+#include "stem_UTF_8_porter.h"
+#include "stem_ISO_8859_1_portuguese.h"
+#include "stem_UTF_8_portuguese.h"
+#include "stem_ISO_8859_2_romanian.h"
+#include "stem_UTF_8_romanian.h"
+#include "stem_KOI8_R_russian.h"
+#include "stem_UTF_8_russian.h"
+#include "stem_ISO_8859_1_spanish.h"
+#include "stem_UTF_8_spanish.h"
+#include "stem_ISO_8859_1_swedish.h"
+#include "stem_UTF_8_swedish.h"
+#include "stem_UTF_8_turkish.h"
+
+typedef enum {
+  ENC_UNKNOWN=0,
+  ENC_ISO_8859_1,
+  ENC_ISO_8859_2,
+  ENC_KOI8_R,
+  ENC_UTF_8
+} stemmer_encoding_t;
+
+struct stemmer_encoding {
+  const char * name;
+  stemmer_encoding_t enc;
+};
+static struct stemmer_encoding encodings[] = {
+  {"ISO_8859_1", ENC_ISO_8859_1},
+  {"ISO_8859_2", ENC_ISO_8859_2},
+  {"KOI8_R", ENC_KOI8_R},
+  {"UTF_8", ENC_UTF_8},
+  {0,ENC_UNKNOWN}
+};
+
+struct stemmer_modules {
+  const char * name;
+  stemmer_encoding_t enc; 
+  struct SN_env * (*create)(void);
+  void (*close)(struct SN_env *);
+  int (*stem)(struct SN_env *);
+};
+static struct stemmer_modules modules[] = {
+  {"da", ENC_ISO_8859_1, danish_ISO_8859_1_create_env, danish_ISO_8859_1_close_env, danish_ISO_8859_1_stem},
+  {"da", ENC_UTF_8, danish_UTF_8_create_env, danish_UTF_8_close_env, danish_UTF_8_stem},
+  {"dan", ENC_ISO_8859_1, danish_ISO_8859_1_create_env, danish_ISO_8859_1_close_env, danish_ISO_8859_1_stem},
+  {"dan", ENC_UTF_8, danish_UTF_8_create_env, danish_UTF_8_close_env, danish_UTF_8_stem},
+  {"danish", ENC_ISO_8859_1, danish_ISO_8859_1_create_env, danish_ISO_8859_1_close_env, danish_ISO_8859_1_stem},
+  {"danish", ENC_UTF_8, danish_UTF_8_create_env, danish_UTF_8_close_env, danish_UTF_8_stem},
+  {"de", ENC_ISO_8859_1, german_ISO_8859_1_create_env, german_ISO_8859_1_close_env, german_ISO_8859_1_stem},
+  {"de", ENC_UTF_8, german_UTF_8_create_env, german_UTF_8_close_env, german_UTF_8_stem},
+  {"deu", ENC_ISO_8859_1, german_ISO_8859_1_create_env, german_ISO_8859_1_close_env, german_ISO_8859_1_stem},
+  {"deu", ENC_UTF_8, german_UTF_8_create_env, german_UTF_8_close_env, german_UTF_8_stem},
+  {"dut", ENC_ISO_8859_1, dutch_ISO_8859_1_create_env, dutch_ISO_8859_1_close_env, dutch_ISO_8859_1_stem},
+  {"dut", ENC_UTF_8, dutch_UTF_8_create_env, dutch_UTF_8_close_env, dutch_UTF_8_stem},
+  {"dutch", ENC_ISO_8859_1, dutch_ISO_8859_1_create_env, dutch_ISO_8859_1_close_env, dutch_ISO_8859_1_stem},
+  {"dutch", ENC_UTF_8, dutch_UTF_8_create_env, dutch_UTF_8_close_env, dutch_UTF_8_stem},
+  {"en", ENC_ISO_8859_1, english_ISO_8859_1_create_env, english_ISO_8859_1_close_env, english_ISO_8859_1_stem},
+  {"en", ENC_UTF_8, english_UTF_8_create_env, english_UTF_8_close_env, english_UTF_8_stem},
+  {"eng", ENC_ISO_8859_1, english_ISO_8859_1_create_env, english_ISO_8859_1_close_env, english_ISO_8859_1_stem},
+  {"eng", ENC_UTF_8, english_UTF_8_create_env, english_UTF_8_close_env, english_UTF_8_stem},
+  {"english", ENC_ISO_8859_1, english_ISO_8859_1_create_env, english_ISO_8859_1_close_env, english_ISO_8859_1_stem},
+  {"english", ENC_UTF_8, english_UTF_8_create_env, english_UTF_8_close_env, english_UTF_8_stem},
+  {"es", ENC_ISO_8859_1, spanish_ISO_8859_1_create_env, spanish_ISO_8859_1_close_env, spanish_ISO_8859_1_stem},
+  {"es", ENC_UTF_8, spanish_UTF_8_create_env, spanish_UTF_8_close_env, spanish_UTF_8_stem},
+  {"esl", ENC_ISO_8859_1, spanish_ISO_8859_1_create_env, spanish_ISO_8859_1_close_env, spanish_ISO_8859_1_stem},
+  {"esl", ENC_UTF_8, spanish_UTF_8_create_env, spanish_UTF_8_close_env, spanish_UTF_8_stem},
+  {"fi", ENC_ISO_8859_1, finnish_ISO_8859_1_create_env, finnish_ISO_8859_1_close_env, finnish_ISO_8859_1_stem},
+  {"fi", ENC_UTF_8, finnish_UTF_8_create_env, finnish_UTF_8_close_env, finnish_UTF_8_stem},
+  {"fin", ENC_ISO_8859_1, finnish_ISO_8859_1_create_env, finnish_ISO_8859_1_close_env, finnish_ISO_8859_1_stem},
+  {"fin", ENC_UTF_8, finnish_UTF_8_create_env, finnish_UTF_8_close_env, finnish_UTF_8_stem},
+  {"finnish", ENC_ISO_8859_1, finnish_ISO_8859_1_create_env, finnish_ISO_8859_1_close_env, finnish_ISO_8859_1_stem},
+  {"finnish", ENC_UTF_8, finnish_UTF_8_create_env, finnish_UTF_8_close_env, finnish_UTF_8_stem},
+  {"fr", ENC_ISO_8859_1, french_ISO_8859_1_create_env, french_ISO_8859_1_close_env, french_ISO_8859_1_stem},
+  {"fr", ENC_UTF_8, french_UTF_8_create_env, french_UTF_8_close_env, french_UTF_8_stem},
+  {"fra", ENC_ISO_8859_1, french_ISO_8859_1_create_env, french_ISO_8859_1_close_env, french_ISO_8859_1_stem},
+  {"fra", ENC_UTF_8, french_UTF_8_create_env, french_UTF_8_close_env, french_UTF_8_stem},
+  {"fre", ENC_ISO_8859_1, french_ISO_8859_1_create_env, french_ISO_8859_1_close_env, french_ISO_8859_1_stem},
+  {"fre", ENC_UTF_8, french_UTF_8_create_env, french_UTF_8_close_env, french_UTF_8_stem},
+  {"french", ENC_ISO_8859_1, french_ISO_8859_1_create_env, french_ISO_8859_1_close_env, french_ISO_8859_1_stem},
+  {"french", ENC_UTF_8, french_UTF_8_create_env, french_UTF_8_close_env, french_UTF_8_stem},
+  {"ger", ENC_ISO_8859_1, german_ISO_8859_1_create_env, german_ISO_8859_1_close_env, german_ISO_8859_1_stem},
+  {"ger", ENC_UTF_8, german_UTF_8_create_env, german_UTF_8_close_env, german_UTF_8_stem},
+  {"german", ENC_ISO_8859_1, german_ISO_8859_1_create_env, german_ISO_8859_1_close_env, german_ISO_8859_1_stem},
+  {"german", ENC_UTF_8, german_UTF_8_create_env, german_UTF_8_close_env, german_UTF_8_stem},
+  {"hu", ENC_ISO_8859_1, hungarian_ISO_8859_1_create_env, hungarian_ISO_8859_1_close_env, hungarian_ISO_8859_1_stem},
+  {"hu", ENC_UTF_8, hungarian_UTF_8_create_env, hungarian_UTF_8_close_env, hungarian_UTF_8_stem},
+  {"hun", ENC_ISO_8859_1, hungarian_ISO_8859_1_create_env, hungarian_ISO_8859_1_close_env, hungarian_ISO_8859_1_stem},
+  {"hun", ENC_UTF_8, hungarian_UTF_8_create_env, hungarian_UTF_8_close_env, hungarian_UTF_8_stem},
+  {"hungarian", ENC_ISO_8859_1, hungarian_ISO_8859_1_create_env, hungarian_ISO_8859_1_close_env, hungarian_ISO_8859_1_stem},
+  {"hungarian", ENC_UTF_8, hungarian_UTF_8_create_env, hungarian_UTF_8_close_env, hungarian_UTF_8_stem},
+  {"it", ENC_ISO_8859_1, italian_ISO_8859_1_create_env, italian_ISO_8859_1_close_env, italian_ISO_8859_1_stem},
+  {"it", ENC_UTF_8, italian_UTF_8_create_env, italian_UTF_8_close_env, italian_UTF_8_stem},
+  {"ita", ENC_ISO_8859_1, italian_ISO_8859_1_create_env, italian_ISO_8859_1_close_env, italian_ISO_8859_1_stem},
+  {"ita", ENC_UTF_8, italian_UTF_8_create_env, italian_UTF_8_close_env, italian_UTF_8_stem},
+  {"italian", ENC_ISO_8859_1, italian_ISO_8859_1_create_env, italian_ISO_8859_1_close_env, italian_ISO_8859_1_stem},
+  {"italian", ENC_UTF_8, italian_UTF_8_create_env, italian_UTF_8_close_env, italian_UTF_8_stem},
+  {"nl", ENC_ISO_8859_1, dutch_ISO_8859_1_create_env, dutch_ISO_8859_1_close_env, dutch_ISO_8859_1_stem},
+  {"nl", ENC_UTF_8, dutch_UTF_8_create_env, dutch_UTF_8_close_env, dutch_UTF_8_stem},
+  {"nld", ENC_ISO_8859_1, dutch_ISO_8859_1_create_env, dutch_ISO_8859_1_close_env, dutch_ISO_8859_1_stem},
+  {"nld", ENC_UTF_8, dutch_UTF_8_create_env, dutch_UTF_8_close_env, dutch_UTF_8_stem},
+  {"no", ENC_ISO_8859_1, norwegian_ISO_8859_1_create_env, norwegian_ISO_8859_1_close_env, norwegian_ISO_8859_1_stem},
+  {"no", ENC_UTF_8, norwegian_UTF_8_create_env, norwegian_UTF_8_close_env, norwegian_UTF_8_stem},
+  {"nor", ENC_ISO_8859_1, norwegian_ISO_8859_1_create_env, norwegian_ISO_8859_1_close_env, norwegian_ISO_8859_1_stem},
+  {"nor", ENC_UTF_8, norwegian_UTF_8_create_env, norwegian_UTF_8_close_env, norwegian_UTF_8_stem},
+  {"norwegian", ENC_ISO_8859_1, norwegian_ISO_8859_1_create_env, norwegian_ISO_8859_1_close_env, norwegian_ISO_8859_1_stem},
+  {"norwegian", ENC_UTF_8, norwegian_UTF_8_create_env, norwegian_UTF_8_close_env, norwegian_UTF_8_stem},
+  {"por", ENC_ISO_8859_1, portuguese_ISO_8859_1_create_env, portuguese_ISO_8859_1_close_env, portuguese_ISO_8859_1_stem},
+  {"por", ENC_UTF_8, portuguese_UTF_8_create_env, portuguese_UTF_8_close_env, portuguese_UTF_8_stem},
+  {"porter", ENC_ISO_8859_1, porter_ISO_8859_1_create_env, porter_ISO_8859_1_close_env, porter_ISO_8859_1_stem},
+  {"porter", ENC_UTF_8, porter_UTF_8_create_env, porter_UTF_8_close_env, porter_UTF_8_stem},
+  {"portuguese", ENC_ISO_8859_1, portuguese_ISO_8859_1_create_env, portuguese_ISO_8859_1_close_env, portuguese_ISO_8859_1_stem},
+  {"portuguese", ENC_UTF_8, portuguese_UTF_8_create_env, portuguese_UTF_8_close_env, portuguese_UTF_8_stem},
+  {"pt", ENC_ISO_8859_1, portuguese_ISO_8859_1_create_env, portuguese_ISO_8859_1_close_env, portuguese_ISO_8859_1_stem},
+  {"pt", ENC_UTF_8, portuguese_UTF_8_create_env, portuguese_UTF_8_close_env, portuguese_UTF_8_stem},
+  {"ro", ENC_ISO_8859_2, romanian_ISO_8859_2_create_env, romanian_ISO_8859_2_close_env, romanian_ISO_8859_2_stem},
+  {"ro", ENC_UTF_8, romanian_UTF_8_create_env, romanian_UTF_8_close_env, romanian_UTF_8_stem},
+  {"romanian", ENC_ISO_8859_2, romanian_ISO_8859_2_create_env, romanian_ISO_8859_2_close_env, romanian_ISO_8859_2_stem},
+  {"romanian", ENC_UTF_8, romanian_UTF_8_create_env, romanian_UTF_8_close_env, romanian_UTF_8_stem},
+  {"ron", ENC_ISO_8859_2, romanian_ISO_8859_2_create_env, romanian_ISO_8859_2_close_env, romanian_ISO_8859_2_stem},
+  {"ron", ENC_UTF_8, romanian_UTF_8_create_env, romanian_UTF_8_close_env, romanian_UTF_8_stem},
+  {"ru", ENC_KOI8_R, russian_KOI8_R_create_env, russian_KOI8_R_close_env, russian_KOI8_R_stem},
+  {"ru", ENC_UTF_8, russian_UTF_8_create_env, russian_UTF_8_close_env, russian_UTF_8_stem},
+  {"rum", ENC_ISO_8859_2, romanian_ISO_8859_2_create_env, romanian_ISO_8859_2_close_env, romanian_ISO_8859_2_stem},
+  {"rum", ENC_UTF_8, romanian_UTF_8_create_env, romanian_UTF_8_close_env, romanian_UTF_8_stem},
+  {"rus", ENC_KOI8_R, russian_KOI8_R_create_env, russian_KOI8_R_close_env, russian_KOI8_R_stem},
+  {"rus", ENC_UTF_8, russian_UTF_8_create_env, russian_UTF_8_close_env, russian_UTF_8_stem},
+  {"russian", ENC_KOI8_R, russian_KOI8_R_create_env, russian_KOI8_R_close_env, russian_KOI8_R_stem},
+  {"russian", ENC_UTF_8, russian_UTF_8_create_env, russian_UTF_8_close_env, russian_UTF_8_stem},
+  {"spa", ENC_ISO_8859_1, spanish_ISO_8859_1_create_env, spanish_ISO_8859_1_close_env, spanish_ISO_8859_1_stem},
+  {"spa", ENC_UTF_8, spanish_UTF_8_create_env, spanish_UTF_8_close_env, spanish_UTF_8_stem},
+  {"spanish", ENC_ISO_8859_1, spanish_ISO_8859_1_create_env, spanish_ISO_8859_1_close_env, spanish_ISO_8859_1_stem},
+  {"spanish", ENC_UTF_8, spanish_UTF_8_create_env, spanish_UTF_8_close_env, spanish_UTF_8_stem},
+  {"sv", ENC_ISO_8859_1, swedish_ISO_8859_1_create_env, swedish_ISO_8859_1_close_env, swedish_ISO_8859_1_stem},
+  {"sv", ENC_UTF_8, swedish_UTF_8_create_env, swedish_UTF_8_close_env, swedish_UTF_8_stem},
+  {"swe", ENC_ISO_8859_1, swedish_ISO_8859_1_create_env, swedish_ISO_8859_1_close_env, swedish_ISO_8859_1_stem},
+  {"swe", ENC_UTF_8, swedish_UTF_8_create_env, swedish_UTF_8_close_env, swedish_UTF_8_stem},
+  {"swedish", ENC_ISO_8859_1, swedish_ISO_8859_1_create_env, swedish_ISO_8859_1_close_env, swedish_ISO_8859_1_stem},
+  {"swedish", ENC_UTF_8, swedish_UTF_8_create_env, swedish_UTF_8_close_env, swedish_UTF_8_stem},
+  {"tr", ENC_UTF_8, turkish_UTF_8_create_env, turkish_UTF_8_close_env, turkish_UTF_8_stem},
+  {"tur", ENC_UTF_8, turkish_UTF_8_create_env, turkish_UTF_8_close_env, turkish_UTF_8_stem},
+  {"turkish", ENC_UTF_8, turkish_UTF_8_create_env, turkish_UTF_8_close_env, turkish_UTF_8_stem},
+  {0,ENC_UNKNOWN,0,0,0}
+};
+static const char * algorithm_names[] = {
+  "danish", 
+  "dutch", 
+  "english", 
+  "finnish", 
+  "french", 
+  "german", 
+  "hungarian", 
+  "italian", 
+  "norwegian", 
+  "porter", 
+  "portuguese", 
+  "romanian", 
+  "russian", 
+  "spanish", 
+  "swedish", 
+  "turkish", 
+  0
+};
+/* libstemmer/modules_utf8.h: List of stemming modules.
+ *
+ * This file is generated by mkmodules.pl from a list of module names.
+ * Do not edit manually.
+ *
+ * Modules included by this file are: danish, dutch, english, finnish, french,
+ * german, hungarian, italian, norwegian, porter, portuguese, romanian,
+ * russian, spanish, swedish, turkish
+ */
+
+#include "stem_UTF_8_danish.h"
+#include "stem_UTF_8_dutch.h"
+#include "stem_UTF_8_english.h"
+#include "stem_UTF_8_finnish.h"
+#include "stem_UTF_8_french.h"
+#include "stem_UTF_8_german.h"
+#include "stem_UTF_8_hungarian.h"
+#include "stem_UTF_8_italian.h"
+#include "stem_UTF_8_norwegian.h"
+#include "stem_UTF_8_porter.h"
+#include "stem_UTF_8_portuguese.h"
+#include "stem_UTF_8_romanian.h"
+#include "stem_UTF_8_russian.h"
+#include "stem_UTF_8_spanish.h"
+#include "stem_UTF_8_swedish.h"
+#include "stem_UTF_8_turkish.h"
+
+typedef enum {
+  ENC_UNKNOWN=0,
+  ENC_UTF_8
+} stemmer_encoding_t;
+
+struct stemmer_encoding {
+  const char * name;
+  stemmer_encoding_t enc;
+};
+static struct stemmer_encoding encodings[] = {
+  {"UTF_8", ENC_UTF_8},
+  {0,ENC_UNKNOWN}
+};
+
+struct stemmer_modules {
+  const char * name;
+  stemmer_encoding_t enc; 
+  struct SN_env * (*create)(void);
+  void (*close)(struct SN_env *);
+  int (*stem)(struct SN_env *);
+};
+static struct stemmer_modules modules[] = {
+  {"da", ENC_UTF_8, danish_UTF_8_create_env, danish_UTF_8_close_env, danish_UTF_8_stem},
+  {"dan", ENC_UTF_8, danish_UTF_8_create_env, danish_UTF_8_close_env, danish_UTF_8_stem},
+  {"danish", ENC_UTF_8, danish_UTF_8_create_env, danish_UTF_8_close_env, danish_UTF_8_stem},
+  {"de", ENC_UTF_8, german_UTF_8_create_env, german_UTF_8_close_env, german_UTF_8_stem},
+  {"deu", ENC_UTF_8, german_UTF_8_create_env, german_UTF_8_close_env, german_UTF_8_stem},
+  {"dut", ENC_UTF_8, dutch_UTF_8_create_env, dutch_UTF_8_close_env, dutch_UTF_8_stem},
+  {"dutch", ENC_UTF_8, dutch_UTF_8_create_env, dutch_UTF_8_close_env, dutch_UTF_8_stem},
+  {"en", ENC_UTF_8, english_UTF_8_create_env, english_UTF_8_close_env, english_UTF_8_stem},
+  {"eng", ENC_UTF_8, english_UTF_8_create_env, english_UTF_8_close_env, english_UTF_8_stem},
+  {"english", ENC_UTF_8, english_UTF_8_create_env, english_UTF_8_close_env, english_UTF_8_stem},
+  {"es", ENC_UTF_8, spanish_UTF_8_create_env, spanish_UTF_8_close_env, spanish_UTF_8_stem},
+  {"esl", ENC_UTF_8, spanish_UTF_8_create_env, spanish_UTF_8_close_env, spanish_UTF_8_stem},
+  {"fi", ENC_UTF_8, finnish_UTF_8_create_env, finnish_UTF_8_close_env, finnish_UTF_8_stem},
+  {"fin", ENC_UTF_8, finnish_UTF_8_create_env, finnish_UTF_8_close_env, finnish_UTF_8_stem},
+  {"finnish", ENC_UTF_8, finnish_UTF_8_create_env, finnish_UTF_8_close_env, finnish_UTF_8_stem},
+  {"fr", ENC_UTF_8, french_UTF_8_create_env, french_UTF_8_close_env, french_UTF_8_stem},
+  {"fra", ENC_UTF_8, french_UTF_8_create_env, french_UTF_8_close_env, french_UTF_8_stem},
+  {"fre", ENC_UTF_8, french_UTF_8_create_env, french_UTF_8_close_env, french_UTF_8_stem},
+  {"french", ENC_UTF_8, french_UTF_8_create_env, french_UTF_8_close_env, french_UTF_8_stem},
+  {"ger", ENC_UTF_8, german_UTF_8_create_env, german_UTF_8_close_env, german_UTF_8_stem},
+  {"german", ENC_UTF_8, german_UTF_8_create_env, german_UTF_8_close_env, german_UTF_8_stem},
+  {"hu", ENC_UTF_8, hungarian_UTF_8_create_env, hungarian_UTF_8_close_env, hungarian_UTF_8_stem},
+  {"hun", ENC_UTF_8, hungarian_UTF_8_create_env, hungarian_UTF_8_close_env, hungarian_UTF_8_stem},
+  {"hungarian", ENC_UTF_8, hungarian_UTF_8_create_env, hungarian_UTF_8_close_env, hungarian_UTF_8_stem},
+  {"it", ENC_UTF_8, italian_UTF_8_create_env, italian_UTF_8_close_env, italian_UTF_8_stem},
+  {"ita", ENC_UTF_8, italian_UTF_8_create_env, italian_UTF_8_close_env, italian_UTF_8_stem},
+  {"italian", ENC_UTF_8, italian_UTF_8_create_env, italian_UTF_8_close_env, italian_UTF_8_stem},
+  {"nl", ENC_UTF_8, dutch_UTF_8_create_env, dutch_UTF_8_close_env, dutch_UTF_8_stem},
+  {"nld", ENC_UTF_8, dutch_UTF_8_create_env, dutch_UTF_8_close_env, dutch_UTF_8_stem},
+  {"no", ENC_UTF_8, norwegian_UTF_8_create_env, norwegian_UTF_8_close_env, norwegian_UTF_8_stem},
+  {"nor", ENC_UTF_8, norwegian_UTF_8_create_env, norwegian_UTF_8_close_env, norwegian_UTF_8_stem},
+  {"norwegian", ENC_UTF_8, norwegian_UTF_8_create_env, norwegian_UTF_8_close_env, norwegian_UTF_8_stem},
+  {"por", ENC_UTF_8, portuguese_UTF_8_create_env, portuguese_UTF_8_close_env, portuguese_UTF_8_stem},
+  {"porter", ENC_UTF_8, porter_UTF_8_create_env, porter_UTF_8_close_env, porter_UTF_8_stem},
+  {"portuguese", ENC_UTF_8, portuguese_UTF_8_create_env, portuguese_UTF_8_close_env, portuguese_UTF_8_stem},
+  {"pt", ENC_UTF_8, portuguese_UTF_8_create_env, portuguese_UTF_8_close_env, portuguese_UTF_8_stem},
+  {"ro", ENC_UTF_8, romanian_UTF_8_create_env, romanian_UTF_8_close_env, romanian_UTF_8_stem},
+  {"romanian", ENC_UTF_8, romanian_UTF_8_create_env, romanian_UTF_8_close_env, romanian_UTF_8_stem},
+  {"ron", ENC_UTF_8, romanian_UTF_8_create_env, romanian_UTF_8_close_env, romanian_UTF_8_stem},
+  {"ru", ENC_UTF_8, russian_UTF_8_create_env, russian_UTF_8_close_env, russian_UTF_8_stem},
+  {"rum", ENC_UTF_8, romanian_UTF_8_create_env, romanian_UTF_8_close_env, romanian_UTF_8_stem},
+  {"rus", ENC_UTF_8, russian_UTF_8_create_env, russian_UTF_8_close_env, russian_UTF_8_stem},
+  {"russian", ENC_UTF_8, russian_UTF_8_create_env, russian_UTF_8_close_env, russian_UTF_8_stem},
+  {"spa", ENC_UTF_8, spanish_UTF_8_create_env, spanish_UTF_8_close_env, spanish_UTF_8_stem},
+  {"spanish", ENC_UTF_8, spanish_UTF_8_create_env, spanish_UTF_8_close_env, spanish_UTF_8_stem},
+  {"sv", ENC_UTF_8, swedish_UTF_8_create_env, swedish_UTF_8_close_env, swedish_UTF_8_stem},
+  {"swe", ENC_UTF_8, swedish_UTF_8_create_env, swedish_UTF_8_close_env, swedish_UTF_8_stem},
+  {"swedish", ENC_UTF_8, swedish_UTF_8_create_env, swedish_UTF_8_close_env, swedish_UTF_8_stem},
+  {"tr", ENC_UTF_8, turkish_UTF_8_create_env, turkish_UTF_8_close_env, turkish_UTF_8_stem},
+  {"tur", ENC_UTF_8, turkish_UTF_8_create_env, turkish_UTF_8_close_env, turkish_UTF_8_stem},
+  {"turkish", ENC_UTF_8, turkish_UTF_8_create_env, turkish_UTF_8_close_env, turkish_UTF_8_stem},
+  {0,ENC_UNKNOWN,0,0,0}
+};
+static const char * algorithm_names[] = {
+  "danish", 
+  "dutch", 
+  "english", 
+  "finnish", 
+  "french", 
+  "german", 
+  "hungarian", 
+  "italian", 
+  "norwegian", 
+  "porter", 
+  "portuguese", 
+  "romanian", 
+  "russian", 
+  "spanish", 
+  "swedish", 
+  "turkish", 
+  0
+};
 
 // FIXME: Currently cgo does not find the source files in libstemmer_c/
 
-// #include "libstemmer_c/include/libstemmer.h"
+// #include "libstemmer.h"
 import "C"
 /*
 type Stemmer struct {

stem_ISO_8859_1_danish.c

+
+/* This file was generated automatically by the Snowball to ANSI C compiler */
+
+#include "header.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern int danish_ISO_8859_1_stem(struct SN_env * z);
+#ifdef __cplusplus
+}
+#endif
+static int r_undouble(struct SN_env * z);
+static int r_other_suffix(struct SN_env * z);
+static int r_consonant_pair(struct SN_env * z);
+static int r_main_suffix(struct SN_env * z);
+static int r_mark_regions(struct SN_env * z);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern struct SN_env * danish_ISO_8859_1_create_env(void);
+extern void danish_ISO_8859_1_close_env(struct SN_env * z);
+
+
+#ifdef __cplusplus
+}
+#endif
+static const symbol s_0_0[3] = { 'h', 'e', 'd' };
+static const symbol s_0_1[5] = { 'e', 't', 'h', 'e', 'd' };
+static const symbol s_0_2[4] = { 'e', 'r', 'e', 'd' };
+static const symbol s_0_3[1] = { 'e' };
+static const symbol s_0_4[5] = { 'e', 'r', 'e', 'd', 'e' };
+static const symbol s_0_5[4] = { 'e', 'n', 'd', 'e' };
+static const symbol s_0_6[6] = { 'e', 'r', 'e', 'n', 'd', 'e' };
+static const symbol s_0_7[3] = { 'e', 'n', 'e' };
+static const symbol s_0_8[4] = { 'e', 'r', 'n', 'e' };
+static const symbol s_0_9[3] = { 'e', 'r', 'e' };
+static const symbol s_0_10[2] = { 'e', 'n' };
+static const symbol s_0_11[5] = { 'h', 'e', 'd', 'e', 'n' };
+static const symbol s_0_12[4] = { 'e', 'r', 'e', 'n' };
+static const symbol s_0_13[2] = { 'e', 'r' };
+static const symbol s_0_14[5] = { 'h', 'e', 'd', 'e', 'r' };
+static const symbol s_0_15[4] = { 'e', 'r', 'e', 'r' };
+static const symbol s_0_16[1] = { 's' };
+static const symbol s_0_17[4] = { 'h', 'e', 'd', 's' };
+static const symbol s_0_18[2] = { 'e', 's' };
+static const symbol s_0_19[5] = { 'e', 'n', 'd', 'e', 's' };
+static const symbol s_0_20[7] = { 'e', 'r', 'e', 'n', 'd', 'e', 's' };
+static const symbol s_0_21[4] = { 'e', 'n', 'e', 's' };
+static const symbol s_0_22[5] = { 'e', 'r', 'n', 'e', 's' };
+static const symbol s_0_23[4] = { 'e', 'r', 'e', 's' };
+static const symbol s_0_24[3] = { 'e', 'n', 's' };
+static const symbol s_0_25[6] = { 'h', 'e', 'd', 'e', 'n', 's' };
+static const symbol s_0_26[5] = { 'e', 'r', 'e', 'n', 's' };
+static const symbol s_0_27[3] = { 'e', 'r', 's' };
+static const symbol s_0_28[3] = { 'e', 't', 's' };
+static const symbol s_0_29[5] = { 'e', 'r', 'e', 't', 's' };
+static const symbol s_0_30[2] = { 'e', 't' };
+static const symbol s_0_31[4] = { 'e', 'r', 'e', 't' };
+
+static const struct among a_0[32] =
+{
+/*  0 */ { 3, s_0_0, -1, 1, 0},
+/*  1 */ { 5, s_0_1, 0, 1, 0},
+/*  2 */ { 4, s_0_2, -1, 1, 0},
+/*  3 */ { 1, s_0_3, -1, 1, 0},
+/*  4 */ { 5, s_0_4, 3, 1, 0},
+/*  5 */ { 4, s_0_5, 3, 1, 0},
+/*  6 */ { 6, s_0_6, 5, 1, 0},
+/*  7 */ { 3, s_0_7, 3, 1, 0},
+/*  8 */ { 4, s_0_8, 3, 1, 0},
+/*  9 */ { 3, s_0_9, 3, 1, 0},
+/* 10 */ { 2, s_0_10, -1, 1, 0},
+/* 11 */ { 5, s_0_11, 10, 1, 0},
+/* 12 */ { 4, s_0_12, 10, 1, 0},
+/* 13 */ { 2, s_0_13, -1, 1, 0},
+/* 14 */ { 5, s_0_14, 13, 1, 0},
+/* 15 */ { 4, s_0_15, 13, 1, 0},
+/* 16 */ { 1, s_0_16, -1, 2, 0},
+/* 17 */ { 4, s_0_17, 16, 1, 0},
+/* 18 */ { 2, s_0_18, 16, 1, 0},
+/* 19 */ { 5, s_0_19, 18, 1, 0},
+/* 20 */ { 7, s_0_20, 19, 1, 0},
+/* 21 */ { 4, s_0_21, 18, 1, 0},
+/* 22 */ { 5, s_0_22, 18, 1, 0},
+/* 23 */ { 4, s_0_23, 18, 1, 0},
+/* 24 */ { 3, s_0_24, 16, 1, 0},
+/* 25 */ { 6, s_0_25, 24, 1, 0},
+/* 26 */ { 5, s_0_26, 24, 1, 0},
+/* 27 */ { 3, s_0_27, 16, 1, 0},
+/* 28 */ { 3, s_0_28, 16, 1, 0},
+/* 29 */ { 5, s_0_29, 28, 1, 0},
+/* 30 */ { 2, s_0_30, -1, 1, 0},
+/* 31 */ { 4, s_0_31, 30, 1, 0}
+};
+
+static const symbol s_1_0[2] = { 'g', 'd' };
+static const symbol s_1_1[2] = { 'd', 't' };
+static const symbol s_1_2[2] = { 'g', 't' };
+static const symbol s_1_3[2] = { 'k', 't' };
+
+static const struct among a_1[4] =
+{
+/*  0 */ { 2, s_1_0, -1, -1, 0},
+/*  1 */ { 2, s_1_1, -1, -1, 0},
+/*  2 */ { 2, s_1_2, -1, -1, 0},
+/*  3 */ { 2, s_1_3, -1, -1, 0}
+};
+
+static const symbol s_2_0[2] = { 'i', 'g' };
+static const symbol s_2_1[3] = { 'l', 'i', 'g' };
+static const symbol s_2_2[4] = { 'e', 'l', 'i', 'g' };
+static const symbol s_2_3[3] = { 'e', 'l', 's' };
+static const symbol s_2_4[4] = { 'l', 0xF8, 's', 't' };
+
+static const struct among a_2[5] =
+{
+/*  0 */ { 2, s_2_0, -1, 1, 0},
+/*  1 */ { 3, s_2_1, 0, 1, 0},
+/*  2 */ { 4, s_2_2, 1, 1, 0},
+/*  3 */ { 3, s_2_3, -1, 1, 0},
+/*  4 */ { 4, s_2_4, -1, 2, 0}
+};
+
+static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128 };
+
+static const unsigned char g_s_ending[] = { 239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 };
+
+static const symbol s_0[] = { 's', 't' };
+static const symbol s_1[] = { 'i', 'g' };
+static const symbol s_2[] = { 'l', 0xF8, 's' };
+
+static int r_mark_regions(struct SN_env * z) {
+    z->I[0] = z->l;
+    {   int c_test = z->c; /* test, line 33 */
+        {   int ret = z->c + 3;
+            if (0 > ret || ret > z->l) return 0;
+            z->c = ret; /* hop, line 33 */
+        }
+        z->I[1] = z->c; /* setmark x, line 33 */
+        z->c = c_test;
+    }
+    if (out_grouping(z, g_v, 97, 248, 1) < 0) return 0; /* goto */ /* grouping v, line 34 */
+    {    /* gopast */ /* non v, line 34 */
+        int ret = in_grouping(z, g_v, 97, 248, 1);
+        if (ret < 0) return 0;
+        z->c += ret;
+    }
+    z->I[0] = z->c; /* setmark p1, line 34 */
+     /* try, line 35 */
+    if (!(z->I[0] < z->I[1])) goto lab0;
+    z->I[0] = z->I[1];
+lab0:
+    return 1;
+}
+
+static int r_main_suffix(struct SN_env * z) {
+    int among_var;
+    {   int mlimit; /* setlimit, line 41 */
+        int m1 = z->l - z->c; (void)m1;
+        if (z->c < z->I[0]) return 0;
+        z->c = z->I[0]; /* tomark, line 41 */
+        mlimit = z->lb; z->lb = z->c;
+        z->c = z->l - m1;
+        z->ket = z->c; /* [, line 41 */
+        if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851440 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
+        among_var = find_among_b(z, a_0, 32); /* substring, line 41 */
+        if (!(among_var)) { z->lb = mlimit; return 0; }
+        z->bra = z->c; /* ], line 41 */
+        z->lb = mlimit;
+    }
+    switch(among_var) {
+        case 0: return 0;
+        case 1:
+            {   int ret = slice_del(z); /* delete, line 48 */
+                if (ret < 0) return ret;
+            }
+            break;
+        case 2:
+            if (in_grouping_b(z, g_s_ending, 97, 229, 0)) return 0;
+            {   int ret = slice_del(z); /* delete, line 50 */
+                if (ret < 0) return ret;
+            }
+            break;
+    }
+    return 1;
+}
+
+static int r_consonant_pair(struct SN_env * z) {
+    {   int m_test = z->l - z->c; /* test, line 55 */
+        {   int mlimit; /* setlimit, line 56 */
+            int m1 = z->l - z->c; (void)m1;
+            if (z->c < z->I[0]) return 0;
+            z->c = z->I[0]; /* tomark, line 56 */
+            mlimit = z->lb; z->lb = z->c;
+            z->c = z->l - m1;
+            z->ket = z->c; /* [, line 56 */
+            if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = mlimit; return 0; }
+            if (!(find_among_b(z, a_1, 4))) { z->lb = mlimit; return 0; } /* substring, line 56 */
+            z->bra = z->c; /* ], line 56 */
+            z->lb = mlimit;
+        }
+        z->c = z->l - m_test;
+    }
+    if (z->c <= z->lb) return 0;
+    z->c--; /* next, line 62 */
+    z->bra = z->c; /* ], line 62 */
+    {   int ret = slice_del(z); /* delete, line 62 */
+        if (ret < 0) return ret;
+    }
+    return 1;
+}
+
+static int r_other_suffix(struct SN_env * z) {
+    int among_var;
+    {   int m1 = z->l - z->c; (void)m1; /* do, line 66 */
+        z->ket = z->c; /* [, line 66 */
+        if (!(eq_s_b(z, 2, s_0))) goto lab0;
+        z->bra = z->c; /* ], line 66 */
+        if (!(eq_s_b(z, 2, s_1))) goto lab0;
+        {   int ret = slice_del(z); /* delete, line 66 */
+            if (ret < 0) return ret;
+        }
+    lab0:
+        z->c = z->l - m1;
+    }
+    {   int mlimit; /* setlimit, line 67 */
+        int m2 = z->l - z->c; (void)m2;
+        if (z->c < z->I[0]) return 0;
+        z->c = z->I[0]; /* tomark, line 67 */
+        mlimit = z->lb; z->lb = z->c;
+        z->c = z->l - m2;
+        z->ket = z->c; /* [, line 67 */
+        if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
+        among_var = find_among_b(z, a_2, 5); /* substring, line 67 */
+        if (!(among_var)) { z->lb = mlimit; return 0; }
+        z->bra = z->c; /* ], line 67 */
+        z->lb = mlimit;
+    }
+    switch(among_var) {
+        case 0: return 0;
+        case 1:
+            {   int ret = slice_del(z); /* delete, line 70 */
+                if (ret < 0) return ret;
+            }
+            {   int m3 = z->l - z->c; (void)m3; /* do, line 70 */
+                {   int ret = r_consonant_pair(z);
+                    if (ret == 0) goto lab1; /* call consonant_pair, line 70 */
+                    if (ret < 0) return ret;
+                }
+            lab1:
+                z->c = z->l - m3;
+            }
+            break;
+        case 2:
+            {   int ret = slice_from_s(z, 3, s_2); /* <-, line 72 */
+                if (ret < 0) return ret;
+            }
+            break;
+    }
+    return 1;
+}
+
+static int r_undouble(struct SN_env * z) {
+    {   int mlimit; /* setlimit, line 76 */
+        int m1 = z->l - z->c; (void)m1;
+        if (z->c < z->I[0]) return 0;
+        z->c = z->I[0]; /* tomark, line 76 */
+        mlimit = z->lb; z->lb = z->c;
+        z->c = z->l - m1;
+        z->ket = z->c; /* [, line 76 */
+        if (out_grouping_b(z, g_v, 97, 248, 0)) { z->lb = mlimit; return 0; }
+        z->bra = z->c; /* ], line 76 */
+        z->S[0] = slice_to(z, z->S[0]); /* -> ch, line 76 */
+        if (z->S[0] == 0) return -1; /* -> ch, line 76 */
+        z->lb = mlimit;
+    }
+    if (!(eq_v_b(z, z->S[0]))) return 0; /* name ch, line 77 */
+    {   int ret = slice_del(z); /* delete, line 78 */
+        if (ret < 0) return ret;
+    }
+    return 1;
+}
+
+extern int danish_ISO_8859_1_stem(struct SN_env * z) {
+    {   int c1 = z->c; /* do, line 84 */
+        {   int ret = r_mark_regions(z);
+            if (ret == 0) goto lab0; /* call mark_regions, line 84 */
+            if (ret < 0) return ret;
+        }
+    lab0:
+        z->c = c1;
+    }
+    z->lb = z->c; z->c = z->l; /* backwards, line 85 */
+
+    {   int m2 = z->l - z->c; (void)m2; /* do, line 86 */
+        {   int ret = r_main_suffix(z);
+            if (ret == 0) goto lab1; /* call main_suffix, line 86 */
+            if (ret < 0) return ret;
+        }
+    lab1:
+        z->c = z->l - m2;
+    }
+    {   int m3 = z->l - z->c; (void)m3; /* do, line 87 */
+        {   int ret = r_consonant_pair(z);
+            if (ret == 0) goto lab2; /* call consonant_pair, line 87 */
+            if (ret < 0) return ret;
+        }
+    lab2:
+        z->c = z->l - m3;
+    }
+    {   int m4 = z->l - z->c; (void)m4; /* do, line 88 */
+        {   int ret = r_other_suffix(z);
+            if (ret == 0) goto lab3; /* call other_suffix, line 88 */
+            if (ret < 0) return ret;
+        }
+    lab3:
+        z->c = z->l - m4;
+    }
+    {   int m5 = z->l - z->c; (void)m5; /* do, line 89 */
+        {   int ret = r_undouble(z);
+            if (ret == 0) goto lab4; /* call undouble, line 89 */
+            if (ret < 0) return ret;
+        }
+    lab4:
+        z->c = z->l - m5;
+    }
+    z->c = z->lb;
+    return 1;
+}
+
+extern struct SN_env * danish_ISO_8859_1_create_env(void) { return SN_create_env(1, 2, 0); }
+
+extern void danish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 1); }
+

stem_ISO_8859_1_danish.h

+
+/* This file was generated automatically by the Snowball to ANSI C compiler */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern struct SN_env * danish_ISO_8859_1_create_env(void);
+extern void danish_ISO_8859_1_close_env(struct SN_env * z);
+
+extern int danish_ISO_8859_1_stem(struct SN_env * z);
+
+#ifdef __cplusplus
+}
+#endif
+

stem_ISO_8859_1_dutch.c

+
+/* This file was generated automatically by the Snowball to ANSI C compiler */
+
+#include "header.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern int dutch_ISO_8859_1_stem(struct SN_env * z);
+#ifdef __cplusplus
+}
+#endif
+static int r_standard_suffix(struct SN_env * z);
+static int r_undouble(struct SN_env * z);
+static int r_R2(struct SN_env * z);
+static int r_R1(struct SN_env * z);
+static int r_mark_regions(struct SN_env * z);
+static int r_en_ending(struct SN_env * z);
+static int r_e_ending(struct SN_env * z);
+static int r_postlude(struct SN_env * z);
+static int r_prelude(struct SN_env * z);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern struct SN_env * dutch_ISO_8859_1_create_env(void);
+extern void dutch_ISO_8859_1_close_env(struct SN_env * z);
+
+
+#ifdef __cplusplus
+}
+#endif
+static const symbol s_0_1[1] = { 0xE1 };
+static const symbol s_0_2[1] = { 0xE4 };
+static const symbol s_0_3[1] = { 0xE9 };
+static const symbol s_0_4[1] = { 0xEB };
+static const symbol s_0_5[1] = { 0xED };
+static const symbol s_0_6[1] = { 0xEF };
+static const symbol s_0_7[1] = { 0xF3 };
+static const symbol s_0_8[1] = { 0xF6 };
+static const symbol s_0_9[1] = { 0xFA };
+static const symbol s_0_10[1] = { 0xFC };
+
+static const struct among a_0[11] =
+{
+/*  0 */ { 0, 0, -1, 6, 0},
+/*  1 */ { 1, s_0_1, 0, 1, 0},
+/*  2 */ { 1, s_0_2, 0, 1, 0},
+/*  3 */ { 1, s_0_3, 0, 2, 0},
+/*  4 */ { 1, s_0_4, 0, 2, 0},
+/*  5 */ { 1, s_0_5, 0, 3, 0},
+/*  6 */ { 1, s_0_6, 0, 3, 0},
+/*  7 */ { 1, s_0_7, 0, 4, 0},
+/*  8 */ { 1, s_0_8, 0, 4, 0},
+/*  9 */ { 1, s_0_9, 0, 5, 0},
+/* 10 */ { 1, s_0_10, 0, 5, 0}
+};
+
+static const symbol s_1_1[1] = { 'I' };
+static const symbol s_1_2[1] = { 'Y' };
+
+static const struct among a_1[3] =
+{
+/*  0 */ { 0, 0, -1, 3, 0},
+/*  1 */ { 1, s_1_1, 0, 2, 0},
+/*  2 */ { 1, s_1_2, 0, 1, 0}
+};
+
+static const symbol s_2_0[2] = { 'd', 'd' };
+static const symbol s_2_1[2] = { 'k', 'k' };
+static const symbol s_2_2[2] = { 't', 't' };
+
+static const struct among a_2[3] =
+{
+/*  0 */ { 2, s_2_0, -1, -1, 0},
+/*  1 */ { 2, s_2_1, -1, -1, 0},
+/*  2 */ { 2, s_2_2, -1, -1, 0}
+};
+
+static const symbol s_3_0[3] = { 'e', 'n', 'e' };
+static const symbol s_3_1[2] = { 's', 'e' };
+static const symbol s_3_2[2] = { 'e', 'n' };
+static const symbol s_3_3[5] = { 'h', 'e', 'd', 'e', 'n' };
+static const symbol s_3_4[1] = { 's' };
+
+static const struct among a_3[5] =
+{
+/*  0 */ { 3, s_3_0, -1, 2, 0},
+/*  1 */ { 2, s_3_1, -1, 3, 0},
+/*  2 */ { 2, s_3_2, -1, 2, 0},
+/*  3 */ { 5, s_3_3, 2, 1, 0},
+/*  4 */ { 1, s_3_4, -1, 3, 0}
+};
+
+static const symbol s_4_0[3] = { 'e', 'n', 'd' };
+static const symbol s_4_1[2] = { 'i', 'g' };
+static const symbol s_4_2[3] = { 'i', 'n', 'g' };
+static const symbol s_4_3[4] = { 'l', 'i', 'j', 'k' };
+static const symbol s_4_4[4] = { 'b', 'a', 'a', 'r' };
+static const symbol s_4_5[3] = { 'b', 'a', 'r' };
+
+static const struct among a_4[6] =
+{
+/*  0 */ { 3, s_4_0, -1, 1, 0},
+/*  1 */ { 2, s_4_1, -1, 2, 0},
+/*  2 */ { 3, s_4_2, -1, 1, 0},
+/*  3 */ { 4, s_4_3, -1, 3, 0},
+/*  4 */ { 4, s_4_4, -1, 4, 0},
+/*  5 */ { 3, s_4_5, -1, 5, 0}
+};
+
+static const symbol s_5_0[2] = { 'a', 'a' };
+static const symbol s_5_1[2] = { 'e', 'e' };
+static const symbol s_5_2[2] = { 'o', 'o' };
+static const symbol s_5_3[2] = { 'u', 'u' };
+
+static const struct among a_5[4] =
+{
+/*  0 */ { 2, s_5_0, -1, -1, 0},
+/*  1 */ { 2, s_5_1, -1, -1, 0},
+/*  2 */ { 2, s_5_2, -1, -1, 0},
+/*  3 */ { 2, s_5_3, -1, -1, 0}
+};
+
+static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
+
+static const unsigned char g_v_I[] = { 1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
+
+static const unsigned char g_v_j[] = { 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
+
+static const symbol s_0[] = { 'a' };
+static const symbol s_1[] = { 'e' };
+static const symbol s_2[] = { 'i' };
+static const symbol s_3[] = { 'o' };
+static const symbol s_4[] = { 'u' };
+static const symbol s_5[] = { 'y' };
+static const symbol s_6[] = { 'Y' };
+static const symbol s_7[] = { 'i' };
+static const symbol s_8[] = { 'I' };
+static const symbol s_9[] = { 'y' };
+static const symbol s_10[] = { 'Y' };
+static const symbol s_11[] = { 'y' };
+static const symbol s_12[] = { 'i' };
+static const symbol s_13[] = { 'e' };
+static const symbol s_14[] = { 'g', 'e', 'm' };
+static const symbol s_15[] = { 'h', 'e', 'i', 'd' };
+static const symbol s_16[] = { 'h', 'e', 'i', 'd' };
+static const symbol s_17[] = { 'c' };
+static const symbol s_18[] = { 'e', 'n' };
+static const symbol s_19[] = { 'i', 'g' };
+static const symbol s_20[] = { 'e' };
+static const symbol s_21[] = { 'e' };
+
+static int r_prelude(struct SN_env * z) {
+    int among_var;
+    {   int c_test = z->c; /* test, line 42 */
+        while(1) { /* repeat, line 42 */
+            int c1 = z->c;
+            z->bra = z->c; /* [, line 43 */
+            if (z->c >= z->l || z->p[z->c + 0] >> 5 != 7 || !((340306450 >> (z->p[z->c + 0] & 0x1f)) & 1)) among_var = 6; else
+            among_var = find_among(z, a_0, 11); /* substring, line 43 */
+            if (!(among_var)) goto lab0;
+            z->ket = z->c; /* ], line 43 */
+            switch(among_var) {
+                case 0: goto lab0;
+                case 1:
+                    {   int ret = slice_from_s(z, 1, s_0); /* <-, line 45 */
+                        if (ret < 0) return ret;
+                    }
+                    break;
+                case 2:
+                    {   int ret = slice_from_s(z, 1, s_1); /* <-, line 47 */
+                        if (ret < 0) return ret;
+                    }
+                    break;
+                case 3:
+                    {   int ret = slice_from_s(z, 1, s_2); /* <-, line 49 */
+                        if (ret < 0) return ret;
+                    }
+                    break;
+                case 4:
+                    {   int ret = slice_from_s(z, 1, s_3); /* <-, line 51 */
+                        if (ret < 0) return ret;
+                    }
+                    break;
+                case 5:
+                    {   int ret = slice_from_s(z, 1, s_4); /* <-, line 53 */
+                        if (ret < 0) return ret;
+                    }
+                    break;
+                case 6:
+                    if (z->c >= z->l) goto lab0;
+                    z->c++; /* next, line 54 */
+                    break;
+            }
+            continue;
+        lab0:
+            z->c = c1;
+            break;
+        }
+        z->c = c_test;
+    }
+    {   int c_keep = z->c; /* try, line 57 */
+        z->bra = z->c; /* [, line 57 */
+        if (!(eq_s(z, 1, s_5))) { z->c = c_keep; goto lab1; }
+        z->ket = z->c; /* ], line 57 */
+        {   int ret = slice_from_s(z, 1, s_6); /* <-, line 57 */
+            if (ret < 0) return ret;
+        }
+    lab1:
+        ;
+    }
+    while(1) { /* repeat, line 58 */
+        int c2 = z->c;
+        while(1) { /* goto, line 58 */
+            int c3 = z->c;
+            if (in_grouping(z, g_v, 97, 232, 0)) goto lab3;
+            z->bra = z->c; /* [, line 59 */
+            {   int c4 = z->c; /* or, line 59 */
+                if (!(eq_s(z, 1, s_7))) goto lab5;
+                z->ket = z->c; /* ], line 59 */
+                if (in_grouping(z, g_v, 97, 232, 0)) goto lab5;
+                {   int ret = slice_from_s(z, 1, s_8); /* <-, line 59 */
+                    if (ret < 0) return ret;
+                }
+                goto lab4;
+            lab5:
+                z->c = c4;
+                if (!(eq_s(z, 1, s_9))) goto lab3;
+                z->ket = z->c; /* ], line 60 */
+                {   int ret = slice_from_s(z, 1, s_10); /* <-, line 60 */
+                    if (ret < 0) return ret;
+                }
+            }
+        lab4:
+            z->c = c3;
+            break;
+        lab3:
+            z->c = c3;
+            if (z->c >= z->l) goto lab2;
+            z->c++; /* goto, line 58 */
+        }
+        continue;
+    lab2:
+        z->c = c2;
+        break;
+    }
+    return 1;
+}
+
+static int r_mark_regions(struct SN_env * z) {
+    z->I[0] = z->l;
+    z->I[1] = z->l;
+    {    /* gopast */ /* grouping v, line 69 */
+        int ret = out_grouping(z, g_v, 97, 232, 1);
+        if (ret < 0) return 0;
+        z->c += ret;
+    }
+    {    /* gopast */ /* non v, line 69 */
+        int ret = in_grouping(z, g_v, 97, 232, 1);
+        if (ret < 0) return 0;
+        z->c += ret;
+    }
+    z->I[0] = z->c; /* setmark p1, line 69 */
+     /* try, line 70 */
+    if (!(z->I[0] < 3)) goto lab0;
+    z->I[0] = 3;
+lab0:
+    {    /* gopast */ /* grouping v, line 71 */
+        int ret = out_grouping(z, g_v, 97, 232, 1);
+        if (ret < 0) return 0;
+        z->c += ret;
+    }
+    {    /* gopast */ /* non v, line 71 */
+        int ret = in_grouping(z, g_v, 97, 232, 1);
+        if (ret < 0) return 0;
+        z->c += ret;
+    }
+    z->I[1] = z->c; /* setmark p2, line 71 */
+    return 1;
+}
+
+static int r_postlude(struct SN_env * z) {
+    int among_var;
+    while(1) { /* repeat, line 75 */
+        int c1 = z->c;
+        z->bra = z->c; /* [, line 77 */
+        if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 89)) among_var = 3; else
+        among_var = find_among(z, a_1, 3); /* substring, line 77 */
+        if (!(among_var)) goto lab0;
+        z->ket = z->c; /* ], line 77 */
+        switch(among_var) {
+            case 0: goto lab0;
+            case 1:
+                {   int ret = slice_from_s(z, 1, s_11); /* <-, line 78 */
+                    if (ret < 0) return ret;
+                }
+                break;
+            case 2:
+                {   int ret = slice_from_s(z, 1, s_12); /* <-, line 79 */
+                    if (ret < 0) return ret;
+                }
+                break;
+            case 3:
+                if (z->c >= z->l) goto lab0;
+                z->c++; /* next, line 80 */
+                break;
+        }
+        continue;
+    lab0:
+        z->c = c1;
+        break;
+    }
+    return 1;
+}
+
+static int r_R1(struct SN_env * z) {
+    if (!(z->I[0] <= z->c)) return 0;
+    return 1;
+}
+
+static int r_R2(struct SN_env * z) {
+    if (!(z->I[1] <= z->c)) return 0;
+    return 1;
+}
+
+static int r_undouble(struct SN_env * z) {
+    {   int m_test = z->l - z->c; /* test, line 91 */
+        if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1050640 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
+        if (!(find_among_b(z, a_2, 3))) return 0; /* among, line 91 */
+        z->c = z->l - m_test;
+    }
+    z->ket = z->c; /* [, line 91 */
+    if (z->c <= z->lb) return 0;
+    z->c--; /* next, line 91 */
+    z->bra = z->c; /* ], line 91 */
+    {   int ret = slice_del(z); /* delete, line 91 */
+        if (ret < 0) return ret;
+    }
+    return 1;
+}
+
+static int r_e_ending(struct SN_env * z) {
+    z->B[0] = 0; /* unset e_found, line 95 */
+    z->ket = z->c; /* [, line 96 */
+    if (!(eq_s_b(z, 1, s_13))) return 0;
+    z->bra = z->c; /* ], line 96 */
+    {   int ret = r_R1(z);
+        if (ret == 0) return 0; /* call R1, line 96 */
+        if (ret < 0) return ret;
+    }
+    {   int m_test = z->l - z->c; /* test, line 96 */
+        if (out_grouping_b(z, g_v, 97, 232, 0)) return 0;
+        z->c = z->l - m_test;
+    }
+    {   int ret = slice_del(z); /* delete, line 96 */
+        if (ret < 0) return ret;
+    }
+    z->B[0] = 1; /* set e_found, line 97 */
+    {   int ret = r_undouble(z);
+        if (ret == 0) return 0; /* call undouble, line 98 */
+        if (ret < 0) return ret;
+    }
+    return 1;
+}
+
+static int r_en_ending(struct SN_env * z) {
+    {   int ret = r_R1(z);
+        if (ret == 0) return 0; /* call R1, line 102 */
+        if (ret < 0) return ret;
+    }
+    {   int m1 = z->l - z->c; (void)m1; /* and, line 102 */
+        if (out_grouping_b(z, g_v, 97, 232, 0)) return 0;
+        z->c = z->l - m1;
+        {   int m2 = z->l - z->c; (void)m2; /* not, line 102 */
+            if (!(eq_s_b(z, 3, s_14))) goto lab0;
+            return 0;
+        lab0:
+            z->c = z->l - m2;
+        }
+    }
+    {   int ret = slice_del(z); /* delete, line 102 */
+        if (ret < 0) return ret;
+    }
+    {   int ret = r_undouble(z);
+        if (ret == 0) return 0; /* call undouble, line 103 */
+        if (ret < 0) return ret;
+    }
+    return 1;
+}
+
+static int r_standard_suffix(struct SN_env * z) {
+    int among_var;
+    {   int m1 = z->l - z->c; (void)m1; /* do, line 107 */
+        z->ket = z->c; /* [, line 108 */
+        if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((540704 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
+        among_var = find_among_b(z, a_3, 5); /* substring, line 108 */
+        if (!(among_var)) goto lab0;
+        z->bra = z->c; /* ], line 108 */
+        switch(among_var) {
+            case 0: goto lab0;
+            case 1:
+                {   int ret = r_R1(z);
+                    if (ret == 0) goto lab0; /* call R1, line 110 */
+                    if (ret < 0) return ret;
+                }
+                {   int ret = slice_from_s(z, 4, s_15); /* <-, line 110 */
+                    if (ret < 0) return ret;
+                }
+                break;
+            case 2:
+                {   int ret = r_en_ending(z);
+                    if (ret == 0) goto lab0; /* call en_ending, line 113 */
+                    if (ret < 0) return ret;
+                }
+                break;
+            case 3:
+                {   int ret = r_R1(z);
+                    if (ret == 0) goto lab0; /* call R1, line 116 */
+                    if (ret < 0) return ret;
+                }
+                if (out_grouping_b(z, g_v_j, 97, 232, 0)) goto lab0;
+                {   int ret = slice_del(z); /* delete, line 116 */
+                    if (ret < 0) return ret;
+                }
+                break;
+        }
+    lab0:
+        z->c = z->l - m1;
+    }
+    {   int m2 = z->l - z->c; (void)m2; /* do, line 120 */
+        {   int ret = r_e_ending(z);
+            if (ret == 0) goto lab1; /* call e_ending, line 120 */
+            if (ret < 0) return ret;
+        }
+    lab1:
+        z->c = z->l - m2;
+    }
+    {   int m3 = z->l - z->c; (void)m3; /* do, line 122 */
+        z->ket = z->c; /* [, line 122 */
+        if (!(eq_s_b(z, 4, s_16))) goto lab2;
+        z->bra = z->c; /* ], line 122 */
+        {   int ret = r_R2(z);
+            if (ret == 0) goto lab2; /* call R2, line 122 */
+            if (ret < 0) return ret;
+        }
+        {   int m4 = z->l - z->c; (void)m4; /* not, line 122 */
+            if (!(eq_s_b(z, 1, s_17))) goto lab3;
+            goto lab2;
+        lab3:
+            z->c = z->l - m4;
+        }
+        {   int ret = slice_del(z); /* delete, line 122 */
+            if (ret < 0) return ret;
+        }
+        z->ket = z->c; /* [, line 123 */
+        if (!(eq_s_b(z, 2, s_18))) goto lab2;
+        z->bra = z->c; /* ], line 123 */
+        {   int ret = r_en_ending(z);
+            if (ret == 0) goto lab2; /* call en_ending, line 123 */
+            if (ret < 0) return ret;
+        }
+    lab2:
+        z->c = z->l - m3;
+    }
+    {   int m5 = z->l - z->c; (void)m5; /* do, line 126 */
+        z->ket = z->c; /* [, line 127 */
+        if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab4;
+        among_var = find_among_b(z, a_4, 6); /* substring, line 127 */
+        if (!(among_var)) goto lab4;
+        z->bra = z->c; /* ], line 127 */
+        switch(among_var) {
+            case 0: goto lab4;
+            case 1:
+                {   int ret = r_R2(z);
+                    if (ret == 0) goto lab4; /* call R2, line 129 */
+                    if (ret < 0) return ret;
+                }
+                {   int ret = slice_del(z); /* delete, line 129 */
+                    if (ret < 0) return ret;
+                }
+                {   int m6 = z->l - z->c; (void)m6; /* or, line 130 */
+                    z->ket = z->c; /* [, line 130 */
+                    if (!(eq_s_b(z, 2, s_19))) goto lab6;
+                    z->bra = z->c; /* ], line 130 */
+                    {   int ret = r_R2(z);
+                        if (ret == 0) goto lab6; /* call R2, line 130 */
+                        if (ret < 0) return ret;
+                    }
+                    {   int m7 = z->l - z->c; (void)m7; /* not, line 130 */
+                        if (!(eq_s_b(z, 1, s_20))) goto lab7;
+                        goto lab6;
+                    lab7:
+                        z->c = z->l - m7;
+                    }
+                    {   int ret = slice_del(z); /* delete, line 130 */
+                        if (ret < 0) return ret;
+                    }
+                    goto lab5;
+                lab6:
+                    z->c = z->l - m6;
+                    {   int ret = r_undouble(z);
+                        if (ret == 0) goto lab4; /* call undouble, line 130 */
+                        if (ret < 0) return ret;
+                    }
+                }
+            lab5:
+                break;
+            case 2:
+                {   int ret = r_R2(z);
+                    if (ret == 0) goto lab4; /* call R2, line 133 */
+                    if (ret < 0) return ret;
+                }
+                {   int m8 = z->l - z->c; (void)m8; /* not, line 133 */
+                    if (!(eq_s_b(z, 1, s_21))) goto lab8;
+                    goto lab4;
+                lab8:
+                    z->c = z->l - m8;
+                }
+                {   int ret = slice_del(z); /* delete, line 133 */
+                    if (ret < 0) return ret;
+                }
+                break;
+            case 3:
+                {   int ret = r_R2(z);
+                    if (ret == 0) goto lab4; /* call R2, line 136 */
+                    if (ret < 0) return ret;
+                }
+                {   int ret = slice_del(z); /* delete, line 136 */
+                    if (ret < 0) return ret;
+                }
+                {   int ret = r_e_ending(z);
+                    if (ret == 0) goto lab4; /* call e_ending, line 136 */
+                    if (ret < 0) return ret;
+                }
+                break;
+            case 4:
+                {   int ret = r_R2(z);
+                    if (ret == 0) goto lab4; /* call R2, line 139 */
+                    if (ret < 0) return ret;
+                }
+                {   int ret = slice_del(z); /* delete, line 139 */
+                    if (ret < 0) return ret;
+                }
+                break;
+            case 5:
+                {   int ret = r_R2(z);
+                    if (ret == 0) goto lab4; /* call R2, line 142 */
+                    if (ret < 0) return ret;
+                }
+                if (!(z->B[0])) goto lab4; /* Boolean test e_found, line 142 */
+                {   int ret = slice_del(z); /* delete, line 142 */
+                    if (ret < 0) return ret;
+                }
+                break;
+        }
+    lab4:
+        z->c = z->l - m5;
+    }
+    {   int m9 = z->l - z->c; (void)m9; /* do, line 146 */
+        if (out_grouping_b(z, g_v_I, 73, 232, 0)) goto lab9;
+        {   int m_test = z->l - z->c; /* test, line 148 */
+            if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab9;
+            if (!(find_among_b(z, a_5, 4))) goto lab9; /* among, line 149 */
+            if (out_grouping_b(z, g_v, 97, 232, 0)) goto lab9;
+            z->c = z->l - m_test;
+        }
+        z->ket = z->c; /* [, line 152 */
+        if (z->c <= z->lb) goto lab9;
+        z->c--; /* next, line 152 */
+        z->bra = z->c; /* ], line 152 */
+        {   int ret = slice_del(z); /* delete, line 152 */
+            if (ret < 0) return ret;
+        }
+    lab9:
+        z->c = z->l - m9;
+    }
+    return 1;
+}
+
+extern int dutch_ISO_8859_1_stem(struct SN_env * z) {
+    {   int c1 = z->c; /* do, line 159 */
+        {   int ret = r_prelude(z);
+            if (ret == 0) goto lab0; /* call prelude, line 159 */
+            if (ret < 0) return ret;
+        }
+    lab0:
+        z->c = c1;
+    }
+    {   int c2 = z->c; /* do, line 160 */
+        {   int ret = r_mark_regions(z);
+            if (ret == 0) goto lab1; /* call mark_regions, line 160 */
+            if (ret < 0) return ret;
+        }
+    lab1:
+        z->c = c2;
+    }
+    z->lb = z->c; z->c = z->l; /* backwards, line 161 */
+
+    {   int m3 = z->l - z->c; (void)m3; /* do, line 162 */
+        {   int ret = r_standard_suffix(z);
+            if (ret == 0) goto lab2; /* call standard_suffix, line 162 */
+            if (ret < 0) return ret;
+        }
+    lab2:
+        z->c = z->l - m3;
+    }
+    z->c = z->lb;
+    {   int c4 = z->c; /* do, line 163 */
+        {   int ret = r_postlude(z);
+            if (ret == 0) goto lab3; /* call postlude, line 163 */
+            if (ret < 0) return ret;
+        }
+    lab3:
+        z->c = c4;
+    }
+    return 1;
+}
+
+extern struct SN_env * dutch_ISO_8859_1_create_env(void) { return SN_create_env(0, 2, 1); }
+
+extern void dutch_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
+

stem_ISO_8859_1_dutch.h

+
+/* This file was generated automatically by the Snowball to ANSI C compiler */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern struct SN_env * dutch_ISO_8859_1_create_env(void);
+extern void dutch_ISO_8859_1_close_env(struct SN_env * z);
+
+extern int dutch_ISO_8859_1_stem(struct SN_env * z);
+
+#ifdef __cplusplus
+}
+#endif
+

stem_ISO_8859_1_english.c

+
+/* This file was generated automatically by the Snowball to ANSI C compiler */
+
+#include "header.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern int english_ISO_8859_1_stem(struct SN_env * z);
+#ifdef __cplusplus
+}
+#endif
+static int r_exception2(struct SN_env * z);
+static int r_exception1(struct SN_env * z);
+static int r_Step_5(struct SN_env * z);
+static int r_Step_4(struct SN_env * z);
+static int r_Step_3(struct SN_env * z);
+static int r_Step_2(struct SN_env * z);
+static int r_Step_1c(struct SN_env * z);
+static int r_Step_1b(struct SN_env * z);
+static int r_Step_1a(struct SN_env * z);
+static int r_R2(struct SN_env * z);
+static int r_R1(struct SN_env * z);
+static int r_shortv(struct SN_env * z);
+static int r_mark_regions(struct SN_env * z);
+static int r_postlude(struct SN_env * z);
+static int r_prelude(struct SN_env * z);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern struct SN_env * english_ISO_8859_1_create_env(void);
+extern void english_ISO_8859_1_close_env(struct SN_env * z);
+
+
+#ifdef __cplusplus
+}
+#endif
+static const symbol s_0_0[5] = { 'a', 'r', 's', 'e', 'n' };
+static const symbol s_0_1[6] = { 'c', 'o', 'm', 'm', 'u', 'n' };
+static const symbol s_0_2[5] = { 'g', 'e', 'n', 'e', 'r' };
+
+static const struct among a_0[3] =
+{
+/*  0 */ { 5, s_0_0, -1, -1, 0},
+/*  1 */ { 6, s_0_1, -1, -1, 0},
+/*  2 */ { 5, s_0_2, -1, -1, 0}
+};
+
+static const symbol s_1_0[1] = { '\'' };
+static const symbol s_1_1[3] = { '\'', 's', '\'' };
+static const symbol s_1_2[2] = { '\'', 's' };
+
+static const struct among a_1[3] =
+{
+/*  0 */ { 1, s_1_0, -1, 1, 0},
+/*  1 */ { 3, s_1_1, 0, 1, 0},
+/*  2 */ { 2, s_1_2, -1, 1, 0}
+};
+
+static const symbol s_2_0[3] = { 'i', 'e', 'd' };
+static const symbol s_2_1[1] = { 's' };
+static const symbol s_2_2[3] = { 'i', 'e', 's' };
+static const symbol s_2_3[4] = { 's', 's', 'e', 's' };
+static const symbol s_2_4[2] = { 's', 's' };
+static const symbol s_2_5[2] = { 'u', 's' };
+
+static const struct among a_2[6] =
+{
+/*  0 */ { 3, s_2_0, -1, 2, 0},
+/*  1 */ { 1, s_2_1, -1, 3, 0},
+/*  2 */ { 3, s_2_2, 1, 2, 0},
+/*  3 */ { 4, s_2_3, 1, 1, 0},
+/*  4 */ { 2, s_2_4, 1, -1, 0},
+/*  5 */ { 2, s_2_5, 1, -1, 0}
+};
+
+static const symbol s_3_1[2] = { 'b', 'b' };
+static const symbol s_3_2[2] = { 'd', 'd' };
+static const symbol s_3_3[2] = { 'f', 'f' };
+static const symbol s_3_4[2] = { 'g', 'g' };
+static const symbol s_3_5[2] = { 'b', 'l' };
+static const symbol s_3_6[2] = { 'm', 'm' };
+static const symbol s_3_7[2] = { 'n', 'n' };
+static const symbol s_3_8[2] = { 'p', 'p' };
+static const symbol s_3_9[2] = { 'r', 'r' };
+static const symbol s_3_10[2] = { 'a', 't' };
+static const symbol s_3_11[2] = { 't', 't' };
+static const symbol s_3_12[2] = { 'i', 'z' };
+
+static const struct among a_3[13] =
+{
+/*  0 */ { 0, 0, -1, 3, 0},
+/*  1 */ { 2, s_3_1, 0, 2, 0},
+/*  2 */ { 2, s_3_2, 0, 2, 0},
+/*  3 */ { 2, s_3_3, 0, 2, 0},
+/*  4 */ { 2, s_3_4, 0, 2, 0},
+/*  5 */ { 2, s_3_5, 0, 1, 0},
+/*  6 */ { 2, s_3_6, 0, 2, 0},
+/*  7 */ { 2, s_3_7, 0, 2, 0},
+/*  8 */ { 2, s_3_8, 0, 2, 0},
+/*  9 */ { 2, s_3_9, 0, 2, 0},
+/* 10 */ { 2, s_3_10, 0, 1, 0},
+/* 11 */ { 2, s_3_11, 0, 2, 0},
+/* 12 */ { 2, s_3_12, 0, 1, 0}
+};
+
+static const symbol s_4_0[2] = { 'e', 'd' };
+static const symbol s_4_1[3] = { 'e', 'e', 'd' };
+static const symbol s_4_2[3] = { 'i', 'n', 'g' };
+static const symbol s_4_3[4] = { 'e', 'd', 'l', 'y' };
+static const symbol s_4_4[5] = { 'e', 'e', 'd', 'l', 'y' };
+static const symbol s_4_5[5] = { 'i', 'n', 'g', 'l', 'y' };
+
+static const struct among a_4[6] =
+{
+/*  0 */ { 2, s_4_0, -1, 2, 0},
+/*  1 */ { 3, s_4_1, 0, 1, 0},
+/*  2 */ { 3, s_4_2, -1, 2, 0},
+/*  3 */ { 4, s_4_3, -1, 2, 0},
+/*  4 */ { 5, s_4_4, 3, 1, 0},
+/*  5 */ { 5, s_4_5, -1, 2, 0}
+};
+
+static const symbol s_5_0[4] = { 'a', 'n', 'c', 'i' };
+static const symbol s_5_1[4] = { 'e', 'n', 'c', 'i' };
+static const symbol s_5_2[3] = { 'o', 'g', 'i' };
+static const symbol s_5_3[2] = { 'l', 'i' };
+static const symbol s_5_4[3] = { 'b', 'l', 'i' };
+static const symbol s_5_5[4] = { 'a', 'b', 'l', 'i' };
+static const symbol s_5_6[4] = { 'a', 'l', 'l', 'i' };
+static const symbol s_5_7[5] = { 'f', 'u', 'l', 'l', 'i' };
+static const symbol s_5_8[6] = { 'l', 'e', 's', 's', 'l', 'i' };
+static const symbol s_5_9[5] = { 'o', 'u', 's', 'l', 'i' };
+static const symbol s_5_10[5] = { 'e', 'n', 't', 'l', 'i' };
+static const symbol s_5_11[5] = { 'a', 'l', 'i', 't', 'i' };
+static const symbol s_5_12[6] = { 'b', 'i', 'l', 'i', 't', 'i' };
+static const symbol s_5_13[5] = { 'i', 'v', 'i', 't', 'i' };
+static const symbol s_5_14[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
+static const symbol s_5_15[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
+static const symbol s_5_16[5] = { 'a', 'l', 'i', 's', 'm' };
+static const symbol s_5_17[5] = { 'a', 't', 'i', 'o', 'n' };
+static const symbol s_5_18[7] = { 'i', 'z', 'a', 't', 'i', 'o', 'n' };
+static const symbol s_5_19[4] = { 'i', 'z', 'e', 'r' };
+static const symbol s_5_20[4] = { 'a', 't', 'o', 'r' };
+static const symbol s_5_21[7] = { 'i', 'v', 'e', 'n', 'e', 's', 's' };
+static const symbol s_5_22[7] = { 'f', 'u', 'l', 'n', 'e', 's', 's' };
+static const symbol s_5_23[7] = { 'o', 'u', 's', 'n', 'e', 's', 's' };
+
+static const struct among a_5[24] =
+{
+/*  0 */ { 4, s_5_0, -1, 3, 0},
+/*  1 */ { 4, s_5_1, -1, 2, 0},
+/*  2 */ { 3, s_5_2, -1, 13, 0},
+/*  3 */ { 2, s_5_3, -1, 16, 0},
+/*  4 */ { 3, s_5_4, 3, 12, 0},
+/*  5 */ { 4, s_5_5, 4, 4, 0},
+/*  6 */ { 4, s_5_6, 3, 8, 0},
+/*  7 */ { 5, s_5_7, 3, 14, 0},
+/*  8 */ { 6, s_5_8, 3, 15, 0},
+/*  9 */ { 5, s_5_9, 3, 10, 0},
+/* 10 */ { 5, s_5_10, 3, 5, 0},
+/* 11 */ { 5, s_5_11, -1, 8, 0},
+/* 12 */ { 6, s_5_12, -1, 12, 0},
+/* 13 */ { 5, s_5_13, -1, 11, 0},
+/* 14 */ { 6, s_5_14, -1, 1, 0},
+/* 15 */ { 7, s_5_15, 14, 7, 0},
+/* 16 */ { 5, s_5_16, -1, 8, 0},
+/* 17 */ { 5, s_5_17, -1, 7, 0},
+/* 18 */ { 7, s_5_18, 17, 6, 0},
+/* 19 */ { 4, s_5_19, -1, 6, 0},
+/* 20 */ { 4, s_5_20, -1, 7, 0},
+/* 21 */ { 7, s_5_21, -1, 11, 0},
+/* 22 */ { 7, s_5_22, -1, 9, 0},
+/* 23 */ { 7, s_5_23, -1, 10, 0}
+};
+
+static const symbol s_6_0[5] = { 'i', 'c', 'a', 't', 'e' };
+static const symbol s_6_1[5] = { 'a', 't', 'i', 'v', 'e' };
+static const symbol s_6_2[5] = { 'a', 'l', 'i', 'z', 'e' };
+static const symbol s_6_3[5] = { 'i', 'c', 'i', 't', 'i' };
+static const symbol s_6_4[4] = { 'i', 'c', 'a', 'l' };
+static const symbol s_6_5[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
+static const symbol s_6_6[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
+static const symbol s_6_7[3] = { 'f', 'u', 'l' };
+static const symbol s_6_8[4] = { 'n', 'e', 's', 's' };
+
+static const struct among a_6[9] =
+{
+/*  0 */ { 5, s_6_0, -1, 4, 0},
+/*  1 */ { 5, s_6_1, -1, 6, 0},
+/*  2 */ { 5, s_6_2, -1, 3, 0},
+/*  3 */ { 5, s_6_3, -1, 4, 0},
+/*  4 */ { 4, s_6_4, -1, 4, 0},
+/*  5 */ { 6, s_6_5, -1, 1, 0},
+/*  6 */ { 7, s_6_6, 5, 2, 0},
+/*  7 */ { 3, s_6_7, -1, 5, 0},
+/*  8 */ { 4, s_6_8, -1, 5, 0}
+};
+
+static const symbol s_7_0[2] = { 'i', 'c' };
+static const symbol s_7_1[4] = { 'a', 'n', 'c', 'e' };
+static const symbol s_7_2[4] = { 'e', 'n', 'c', 'e' };
+static const symbol s_7_3[4] = { 'a', 'b', 'l', 'e' };
+static const symbol s_7_4[4] = { 'i', 'b', 'l', 'e' };
+static const symbol s_7_5[3] = { 'a', 't', 'e' };
+static const symbol s_7_6[3] = { 'i', 'v', 'e' };
+static const symbol s_7_7[3] = { 'i', 'z', 'e' };
+static const symbol s_7_8[3] = { 'i', 't', 'i' };
+static const symbol s_7_9[2] = { 'a', 'l' };
+static const symbol s_7_10[3] = { 'i', 's', 'm' };
+static const symbol s_7_11[3] = { 'i', 'o', 'n' };
+static const symbol s_7_12[2] = { 'e', 'r' };
+static const symbol s_7_13[3] = { 'o', 'u', 's' };
+static const symbol s_7_14[3] = { 'a', 'n', 't' };
+static const symbol s_7_15[3] = { 'e', 'n', 't' };
+static const symbol s_7_16[4] = { 'm', 'e', 'n', 't' };
+static const symbol s_7_17[5] = { 'e', 'm', 'e', 'n', 't' };
+
+static const struct among a_7[18] =
+{
+/*  0 */ { 2, s_7_0, -1, 1, 0},
+/*  1 */ { 4, s_7_1, -1, 1, 0},
+/*  2 */ { 4, s_7_2, -1, 1, 0},
+/*  3 */ { 4, s_7_3, -1, 1, 0},
+/*  4 */ { 4, s_7_4, -1, 1, 0},
+/*  5 */ { 3, s_7_5, -1, 1, 0},
+/*  6 */ { 3, s_7_6, -1, 1, 0},
+/*  7 */ { 3, s_7_7, -1, 1, 0},
+/*  8 */ { 3, s_7_8, -1, 1, 0},
+/*  9 */ { 2, s_7_9, -1, 1, 0},
+/* 10 */ { 3, s_7_10, -1, 1, 0},
+/* 11 */ { 3, s_7_11, -1, 2, 0},
+/* 12 */ { 2, s_7_12, -1, 1, 0},
+/* 13 */ { 3, s_7_13, -1, 1, 0},
+/* 14 */ { 3, s_7_14, -1, 1, 0},
+/* 15 */ { 3, s_7_15, -1, 1, 0},
+/* 16 */ { 4, s_7_16, 15, 1, 0},
+/* 17 */ { 5, s_7_17, 16, 1, 0}
+};
+
+static const symbol s_8_0[1] = { 'e' };
+static const symbol s_8_1[1] = { 'l' };
+
+static const struct among a_8[2] =
+{
+/*  0 */ { 1, s_8_0, -1, 1, 0},
+/*  1 */ { 1, s_8_1, -1, 2, 0}
+};
+
+static const symbol s_9_0[7] = { 's', 'u', 'c', 'c', 'e', 'e', 'd' };
+static const symbol s_9_1[7] = { 'p', 'r', 'o', 'c', 'e', 'e', 'd' };
+static const symbol s_9_2[6] = { 'e', 'x', 'c', 'e', 'e', 'd' };
+static const symbol s_9_3[7] = { 'c', 'a', 'n', 'n', 'i', 'n', 'g' };
+static const symbol s_9_4[6] = { 'i', 'n', 'n', 'i', 'n', 'g' };
+static const symbol s_9_5[7] = { 'e', 'a', 'r', 'r', 'i', 'n', 'g' };
+static const symbol s_9_6[7] = { 'h', 'e', 'r', 'r', 'i', 'n', 'g' };
+static const symbol s_9_7[6] = { 'o', 'u', 't', 'i', 'n', 'g' };
+
+static const struct among a_9[8] =
+{
+/*  0 */ { 7, s_9_0, -1, -1, 0},
+/*  1 */ { 7, s_9_1, -1, -1, 0},
+/*  2 */ { 6, s_9_2, -1, -1, 0},
+/*  3 */ { 7, s_9_3, -1, -1, 0},
+/*  4 */ { 6, s_9_4, -1, -1, 0},
+/*  5 */ { 7, s_9_5, -1, -1, 0},
+/*  6 */ { 7, s_9_6, -1, -1, 0},
+/*  7 */ { 6, s_9_7, -1, -1, 0}
+};
+
+static const symbol s_10_0[5] = { 'a', 'n', 'd', 'e', 's' };
+static const symbol s_10_1[5] = { 'a', 't', 'l', 'a', 's' };
+static const symbol s_10_2[4] = { 'b', 'i', 'a', 's' };
+static const symbol s_10_3[6] = { 'c', 'o', 's', 'm', 'o', 's' };
+static const symbol s_10_4[5] = { 'd', 'y', 'i', 'n', 'g' };
+static const symbol s_10_5[5] = { 'e', 'a', 'r', 'l', 'y' };
+static const symbol s_10_6[6] = { 'g', 'e', 'n', 't', 'l', 'y' };
+static const symbol s_10_7[4] = { 'h', 'o', 'w', 'e' };
+static const symbol s_10_8[4] = { 'i', 'd', 'l', 'y' };
+static const symbol s_10_9[5] = { 'l', 'y', 'i', 'n', 'g' };
+static const symbol s_10_10[4] = { 'n', 'e', 'w', 's' };
+static const symbol s_10_11[4] = { 'o', 'n', 'l', 'y' };
+static const symbol s_10_12[6] = { 's', 'i', 'n', 'g', 'l', 'y' };
+static const symbol s_10_13[5] = { 's', 'k', 'i', 'e', 's' };
+static const symbol s_10_14[4] = { 's', 'k', 'i', 's' };
+static const symbol s_10_15[3] = { 's', 'k', 'y' };
+static const symbol s_10_16[5] = { 't', 'y', 'i', 'n', 'g' };
+static const symbol s_10_17[4] = { 'u', 'g', 'l', 'y' };
+
+static const struct among a_10[18] =
+{
+/*  0 */ { 5, s_10_0, -1, -1, 0},
+/*  1 */ { 5, s_10_1, -1, -1, 0},
+/*  2 */ { 4, s_10_2, -1, -1, 0},
+/*  3 */ { 6, s_10_3, -1, -1, 0},
+/*  4 */ { 5, s_10_4, -1, 3, 0},
+/*  5 */ { 5, s_10_5, -1, 9, 0},
+/*  6 */ { 6, s_10_6, -1, 7, 0},
+/*  7 */ { 4, s_10_7, -1, -1, 0},
+/*  8 */ { 4, s_10_8, -1, 6, 0},
+/*  9 */ { 5, s_10_9, -1, 4, 0},
+/* 10 */ { 4, s_10_10, -1, -1, 0},
+/* 11 */ { 4, s_10_11, -1, 10, 0},
+/* 12 */ { 6, s_10_12, -1, 11, 0},
+/* 13 */ { 5, s_10_13, -1, 2, 0},
+/* 14 */ { 4, s_10_14, -1, 1, 0},
+/* 15 */ { 3, s_10_15, -1, -1, 0},
+/* 16 */ { 5, s_10_16, -1, 5, 0},
+/* 17 */ { 4, s_10_17, -1, 8, 0}
+};
+
+static const unsigned char g_v[] = { 17, 65, 16, 1 };
+
+static const unsigned char g_v_WXY[] = { 1, 17, 65, 208, 1 };
+
+static const unsigned char g_valid_LI[] = { 55, 141, 2 };
+
+static const symbol s_0[] = { '\'' };
+static const symbol s_1[] = { 'y' };
+static const symbol s_2[] = { 'Y' };
+static const symbol s_3[] = { 'y' };
+static const symbol s_4[] = { 'Y' };
+static const symbol s_5[] = { 's', 's' };
+static const symbol s_6[] = { 'i' };
+static const symbol s_7[] = { 'i', 'e' };
+static const symbol s_8[] = { 'e', 'e' };
+static const symbol s_9[] = { 'e' };
+static const symbol s_10[] = { 'e' };
+static const symbol s_11[] = { 'y' };
+static const symbol s_12[] = { 'Y' };
+static const symbol s_13[] = { 'i' };
+static const symbol s_14[] = { 't', 'i', 'o', 'n' };
+static const symbol s_15[] = { 'e', 'n', 'c', 'e' };
+static const symbol s_16[] = { 'a', 'n', 'c', 'e' };
+static const symbol s_17[] = { 'a', 'b', 'l', 'e' };
+static const symbol s_18[] = { 'e', 'n', 't' };
+static const symbol s_19[] = { 'i', 'z', 'e' };
+static const symbol s_20[] = { 'a', 't', 'e' };
+static const symbol s_21[] = { 'a', 'l' };
+static const symbol s_22[] = { 'f', 'u', 'l' };
+static const symbol s_23[] = { 'o', 'u', 's' };
+static const symbol s_24[] = { 'i', 'v', 'e' };
+static const symbol s_25[] = { 'b', 'l', 'e' };
+static const symbol s_26[] = { 'l' };
+static const symbol s_27[] = { 'o', 'g' };
+static const symbol s_28[] = { 'f', 'u', 'l' };
+static const symbol s_29[] = { 'l', 'e', 's', 's' };
+static const symbol s_30[] = { 't', 'i', 'o', 'n' };
+static const symbol s_31[] = { 'a', 't', 'e' };
+static const symbol s_32[] = { 'a', 'l' };
+static const symbol s_33[] = { 'i', 'c' };
+static const symbol s_34[] = { 's' };
+static const symbol s_35[] = { 't' };
+static const symbol s_36[] = { 'l' };
+static const symbol s_37[] = { 's', 'k', 'i' };
+static const symbol s_38[] = { 's', 'k', 'y' };
+static const symbol s_39[] = { 'd', 'i', 'e' };
+static const symbol s_40[] = { 'l', 'i', 'e' };
+static const symbol s_41[] = { 't', 'i', 'e' };
+static const symbol s_42[] = { 'i', 'd', 'l' };
+static const symbol s_43[] = { 'g', 'e', 'n', 't', 'l' };
+static const symbol s_44[] = { 'u', 'g', 'l', 'i' };
+static const symbol s_45[] = { 'e', 'a', 'r', 'l', 'i' };
+static const symbol s_46[] = { 'o', 'n', 'l', 'i' };
+static const symbol s_47[] = { 's', 'i', 'n', 'g', 'l' };
+static const symbol s_48[] = { 'Y' };