1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Tsearch2 functionality migrates to core. The bulk of this work is by

Oleg Bartunov and Teodor Sigaev, but I did a lot of editorializing,
so anything that's broken is probably my fault.

Documentation is nonexistent as yet, but let's land the patch so we can
get some portability testing done.
This commit is contained in:
Tom Lane
2007-08-21 01:11:32 +00:00
parent 4e94d1f952
commit 140d4ebcb4
200 changed files with 54388 additions and 147 deletions

View File

@ -0,0 +1,144 @@
#-------------------------------------------------------------------------
#
# Makefile for src/backend/snowball
#
# $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.1 2007/08/21 01:11:15 tgl Exp $
#
#-------------------------------------------------------------------------
subdir = src/backend/snowball
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -I$(top_srcdir)/src/include/snowball \
-I$(top_srcdir)/src/include/snowball/libstemmer $(CPPFLAGS)
OBJS= dict_snowball.o api.o utilities.o \
stem_ISO_8859_1_danish.o \
stem_ISO_8859_1_dutch.o \
stem_ISO_8859_1_english.o \
stem_ISO_8859_1_finnish.o \
stem_ISO_8859_1_french.o \
stem_ISO_8859_1_german.o \
stem_ISO_8859_1_hungarian.o \
stem_ISO_8859_1_italian.o \
stem_ISO_8859_1_norwegian.o \
stem_ISO_8859_1_porter.o \
stem_ISO_8859_1_portuguese.o \
stem_ISO_8859_1_spanish.o \
stem_ISO_8859_1_swedish.o \
stem_ISO_8859_2_romanian.o \
stem_KOI8_R_russian.o \
stem_UTF_8_danish.o \
stem_UTF_8_dutch.o \
stem_UTF_8_english.o \
stem_UTF_8_finnish.o \
stem_UTF_8_french.o \
stem_UTF_8_german.o \
stem_UTF_8_hungarian.o \
stem_UTF_8_italian.o \
stem_UTF_8_norwegian.o \
stem_UTF_8_porter.o \
stem_UTF_8_portuguese.o \
stem_UTF_8_romanian.o \
stem_UTF_8_russian.o \
stem_UTF_8_spanish.o \
stem_UTF_8_swedish.o \
stem_UTF_8_turkish.o
# second column is name of latin dictionary, if different
LANGUAGES= \
danish danish \
dutch dutch \
english english \
finnish finnish \
french french \
german german \
hungarian hungarian \
italian italian \
norwegian norwegian \
portuguese portuguese \
romanian romanian \
russian english \
spanish spanish \
swedish swedish \
turkish turkish \
SQLSCRIPT= snowball_create.sql
DICTDIR=tsearch_data
ifdef VPATH
override VPATH := $(srcdir)/libstemmer:$(VPATH)
else
VPATH = $(srcdir)/libstemmer
endif
SHLIB_LINK := $(BE_DLLLIBS)
NAME := dict_snowball
SO_MAJOR_VERSION := 0
SO_MINOR_VERSION := 0
rpath =
all: all-shared-lib $(SQLSCRIPT)
include $(top_srcdir)/src/Makefile.shlib
$(SQLSCRIPT): Makefile snowball_func.sql.in snowball.sql.in
ifeq ($(enable_shared), yes)
echo '-- Language-specific snowball dictionaries' > $@
cat $(srcdir)/snowball_func.sql.in >> $@
@set $(LANGUAGES) ; \
while [ "$$#" -gt 0 ] ; \
do \
lang=$$1; shift; \
if [ -s $(srcdir)/stopwords/$${lang}.stop ] ; then \
stop=", StopWords=$${lang}" ; \
else \
stop=""; \
fi; \
nonlatdictname=$$lang; \
latdictname=$$1; shift; \
cat $(srcdir)/snowball.sql.in | \
sed -e "s#_DICTNAME_#$$lang#g" | \
sed -e "s#_CFGNAME_#$$lang#g" | \
sed -e "s#_LATDICTNAME_#$$latdictname#g" | \
sed -e "s#_NONLATDICTNAME_#$$nonlatdictname#g" | \
sed -e "s#_STOPWORDS_#$$stop#g" ; \
done >> $@
else
echo "-- No language-specific snowball dictionaries, for lack of shared library support" > $@
endif
install: all installdirs
ifeq ($(enable_shared), yes)
$(INSTALL_SHLIB) $(shlib) '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
endif
$(INSTALL_DATA) $(SQLSCRIPT) '$(DESTDIR)$(datadir)'
@set $(LANGUAGES) ; \
while [ "$$#" -gt 0 ] ; \
do \
lang=$$1; shift; shift; \
if [ -s $(srcdir)/stopwords/$${lang}.stop ] ; then \
$(INSTALL_DATA) $(srcdir)/stopwords/$${lang}.stop '$(DESTDIR)$(datadir)/$(DICTDIR)' ; \
fi \
done
installdirs:
$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)' '$(DESTDIR)$(datadir)' '$(DESTDIR)$(datadir)/$(DICTDIR)'
uninstall:
rm -f '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
rm -f '$(DESTDIR)$(datadir)/$(SQLSCRIPT)'
@set $(LANGUAGES) ; \
while [ "$$#" -gt 0 ] ; \
do \
lang=$$1; shift; shift; \
if [ -s $(srcdir)/stopwords/$${lang}.stop ] ; then \
rm -f '$(DESTDIR)$(datadir)/$(DICTDIR)/'$${lang}.stop ; \
fi \
done
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS) $(SQLSCRIPT)

View File

@ -0,0 +1,47 @@
Snowball-based stemming
-----------------------
This module uses the word stemming code developed by the Snowball project,
http://snowball.tartarus.org/
which is released by them under a BSD-style license.
The files under src/backend/snowball/libstemmer/ and
src/include/snowball/libstemmer/ are taken directly from their libstemmer_c
distribution, with only some minor adjustments of file inclusions. Note
that most of these files are in fact derived files, not master source.
The master sources are in the Snowball language, and are available along
with the Snowball-to-C compiler from the Snowball project. We choose to
include the derived files in the PostgreSQL distribution because most
installations will not have the Snowball compiler available.
To update the PostgreSQL sources from a new Snowball libstemmer_c
distribution:
1. Copy the *.c files in libstemmer_c/src_c/ to src/backend/snowball/libstemmer
with replacement of "../runtime/header.h" by "header.h", for example
for f in libstemmer_c/src_c/*.c
do
sed 's|\.\./runtime/header\.h|header.h|' $f >libstemmer/`basename $f`
done
(Alternatively, if you rebuild the stemmer files from the master Snowball
sources, just omit "-r ../runtime" from the Snowball compiler switches.)
2. Copy the *.c files in libstemmer_c/runtime/ to
src/backend/snowball/libstemmer, and edit them to remove direct inclusions
of system headers such as <stdio.h> --- they should only include "header.h".
(This removal avoids portability problems on some platforms where <stdio.h>
is sensitive to largefile compilation options.)
3. Copy the *.h files in libstemmer_c/src_c/ and libstemmer_c/runtime/
to src/include/snowball/libstemmer. At this writing the header files
do not require any changes.
4. Check whether any stemmer modules have been added or removed. If so, edit
the OBJS list in Makefile, the list of #include's in dict_snowball.c, and the
stemmer_modules[] table in dict_snowball.c.
5. The various stopword files in stopwords/ must be downloaded
individually from pages on the snowball.tartarus.org website.
Be careful that these files must be stored in UTF-8 encoding.

View File

@ -0,0 +1,326 @@
/*-------------------------------------------------------------------------
*
* dict_snowball.c
* Snowball dictionary
*
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/snowball/dict_snowball.c,v 1.1 2007/08/21 01:11:16 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "fmgr.h"
#include "tsearch/ts_locale.h"
#include "tsearch/ts_public.h"
#include "tsearch/ts_utils.h"
#include "utils/builtins.h"
/* Some platforms define MAXINT and/or MININT, causing conflicts */
#ifdef MAXINT
#undef MAXINT
#endif
#ifdef MININT
#undef MININT
#endif
/* Now we can include the original Snowball header.h */
#include "snowball/libstemmer/header.h"
#include "snowball/libstemmer/stem_ISO_8859_1_danish.h"
#include "snowball/libstemmer/stem_ISO_8859_1_dutch.h"
#include "snowball/libstemmer/stem_ISO_8859_1_english.h"
#include "snowball/libstemmer/stem_ISO_8859_1_finnish.h"
#include "snowball/libstemmer/stem_ISO_8859_1_french.h"
#include "snowball/libstemmer/stem_ISO_8859_1_german.h"
#include "snowball/libstemmer/stem_ISO_8859_1_hungarian.h"
#include "snowball/libstemmer/stem_ISO_8859_1_italian.h"
#include "snowball/libstemmer/stem_ISO_8859_1_norwegian.h"
#include "snowball/libstemmer/stem_ISO_8859_1_porter.h"
#include "snowball/libstemmer/stem_ISO_8859_1_portuguese.h"
#include "snowball/libstemmer/stem_ISO_8859_1_spanish.h"
#include "snowball/libstemmer/stem_ISO_8859_1_swedish.h"
#include "snowball/libstemmer/stem_ISO_8859_2_romanian.h"
#include "snowball/libstemmer/stem_KOI8_R_russian.h"
#include "snowball/libstemmer/stem_UTF_8_danish.h"
#include "snowball/libstemmer/stem_UTF_8_dutch.h"
#include "snowball/libstemmer/stem_UTF_8_english.h"
#include "snowball/libstemmer/stem_UTF_8_finnish.h"
#include "snowball/libstemmer/stem_UTF_8_french.h"
#include "snowball/libstemmer/stem_UTF_8_german.h"
#include "snowball/libstemmer/stem_UTF_8_hungarian.h"
#include "snowball/libstemmer/stem_UTF_8_italian.h"
#include "snowball/libstemmer/stem_UTF_8_norwegian.h"
#include "snowball/libstemmer/stem_UTF_8_porter.h"
#include "snowball/libstemmer/stem_UTF_8_portuguese.h"
#include "snowball/libstemmer/stem_UTF_8_romanian.h"
#include "snowball/libstemmer/stem_UTF_8_russian.h"
#include "snowball/libstemmer/stem_UTF_8_spanish.h"
#include "snowball/libstemmer/stem_UTF_8_swedish.h"
#include "snowball/libstemmer/stem_UTF_8_turkish.h"
PG_MODULE_MAGIC;
PG_FUNCTION_INFO_V1(dsnowball_init);
Datum dsnowball_init(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(dsnowball_lexize);
Datum dsnowball_lexize(PG_FUNCTION_ARGS);
/* List of supported modules */
typedef struct stemmer_module
{
const char *name;
pg_enc enc;
struct SN_env *(*create) (void);
void (*close) (struct SN_env *);
int (*stem) (struct SN_env *);
} stemmer_module;
static const stemmer_module stemmer_modules[] =
{
/*
* Stemmers list from Snowball distribution
*/
{"danish", PG_LATIN1, danish_ISO_8859_1_create_env, danish_ISO_8859_1_close_env, danish_ISO_8859_1_stem},
{"dutch", PG_LATIN1, dutch_ISO_8859_1_create_env, dutch_ISO_8859_1_close_env, dutch_ISO_8859_1_stem},
{"english", PG_LATIN1, english_ISO_8859_1_create_env, english_ISO_8859_1_close_env, english_ISO_8859_1_stem},
{"finnish", PG_LATIN1, finnish_ISO_8859_1_create_env, finnish_ISO_8859_1_close_env, finnish_ISO_8859_1_stem},
{"french", PG_LATIN1, french_ISO_8859_1_create_env, french_ISO_8859_1_close_env, french_ISO_8859_1_stem},
{"german", PG_LATIN1, german_ISO_8859_1_create_env, german_ISO_8859_1_close_env, german_ISO_8859_1_stem},
{"hungarian", PG_LATIN1, hungarian_ISO_8859_1_create_env, hungarian_ISO_8859_1_close_env, hungarian_ISO_8859_1_stem},
{"italian", PG_LATIN1, italian_ISO_8859_1_create_env, italian_ISO_8859_1_close_env, italian_ISO_8859_1_stem},
{"norwegian", PG_LATIN1, norwegian_ISO_8859_1_create_env, norwegian_ISO_8859_1_close_env, norwegian_ISO_8859_1_stem},
{"porter", PG_LATIN1, porter_ISO_8859_1_create_env, porter_ISO_8859_1_close_env, porter_ISO_8859_1_stem},
{"portuguese", PG_LATIN1, portuguese_ISO_8859_1_create_env, portuguese_ISO_8859_1_close_env, portuguese_ISO_8859_1_stem},
{"spanish", PG_LATIN1, spanish_ISO_8859_1_create_env, spanish_ISO_8859_1_close_env, spanish_ISO_8859_1_stem},
{"swedish", PG_LATIN1, swedish_ISO_8859_1_create_env, swedish_ISO_8859_1_close_env, swedish_ISO_8859_1_stem},
{"romanian", PG_LATIN2, romanian_ISO_8859_2_create_env, romanian_ISO_8859_2_close_env, romanian_ISO_8859_2_stem},
{"russian", PG_KOI8R, russian_KOI8_R_create_env, russian_KOI8_R_close_env, russian_KOI8_R_stem},
{"danish", PG_UTF8, danish_UTF_8_create_env, danish_UTF_8_close_env, danish_UTF_8_stem},
{"dutch", PG_UTF8, dutch_UTF_8_create_env, dutch_UTF_8_close_env, dutch_UTF_8_stem},
{"english", PG_UTF8, english_UTF_8_create_env, english_UTF_8_close_env, english_UTF_8_stem},
{"finnish", PG_UTF8, finnish_UTF_8_create_env, finnish_UTF_8_close_env, finnish_UTF_8_stem},
{"french", PG_UTF8, french_UTF_8_create_env, french_UTF_8_close_env, french_UTF_8_stem},
{"german", PG_UTF8, german_UTF_8_create_env, german_UTF_8_close_env, german_UTF_8_stem},
{"hungarian", PG_UTF8, hungarian_UTF_8_create_env, hungarian_UTF_8_close_env, hungarian_UTF_8_stem},
{"italian", PG_UTF8, italian_UTF_8_create_env, italian_UTF_8_close_env, italian_UTF_8_stem},
{"norwegian", PG_UTF8, norwegian_UTF_8_create_env, norwegian_UTF_8_close_env, norwegian_UTF_8_stem},
{"porter", PG_UTF8, porter_UTF_8_create_env, porter_UTF_8_close_env, porter_UTF_8_stem},
{"portuguese", PG_UTF8, portuguese_UTF_8_create_env, portuguese_UTF_8_close_env, portuguese_UTF_8_stem},
{"romanian", PG_UTF8, romanian_UTF_8_create_env, romanian_UTF_8_close_env, romanian_UTF_8_stem},
{"russian", PG_UTF8, russian_UTF_8_create_env, russian_UTF_8_close_env, russian_UTF_8_stem},
{"spanish", PG_UTF8, spanish_UTF_8_create_env, spanish_UTF_8_close_env, spanish_UTF_8_stem},
{"swedish", PG_UTF8, swedish_UTF_8_create_env, swedish_UTF_8_close_env, swedish_UTF_8_stem},
{"turkish", PG_UTF8, turkish_UTF_8_create_env, turkish_UTF_8_close_env, turkish_UTF_8_stem},
/*
* Stemmer with PG_SQL_ASCII encoding should be valid for any server
* encoding
*/
{"english", PG_SQL_ASCII, english_ISO_8859_1_create_env, english_ISO_8859_1_close_env, english_ISO_8859_1_stem},
{NULL, 0, NULL, NULL, NULL} /* list end marker */
};
typedef struct DictSnowball
{
struct SN_env *z;
StopList stoplist;
bool needrecode; /* needs recoding before/after call stem */
int (*stem) (struct SN_env * z);
/*
* snowball saves alloced memory between calls, so we should run it in our
* private memory context. Note, init function is executed in long lived
* context, so we just remember CurrentMemoryContext
*/
MemoryContext dictCtx;
} DictSnowball;
static void
locate_stem_module(DictSnowball * d, char *lang)
{
const stemmer_module *m;
/*
* First, try to find exact match of stemmer module. Stemmer with
* PG_SQL_ASCII encoding is treated as working with any server encoding
*/
for (m = stemmer_modules; m->name; m++)
{
if ((m->enc == PG_SQL_ASCII || m->enc == GetDatabaseEncoding()) &&
pg_strcasecmp(m->name, lang) == 0)
{
d->stem = m->stem;
d->z = m->create();
d->needrecode = false;
return;
}
}
/*
* Second, try to find stemmer for needed language for UTF8 encoding.
*/
for (m = stemmer_modules; m->name; m++)
{
if (m->enc == PG_UTF8 && pg_strcasecmp(m->name, lang) == 0)
{
d->stem = m->stem;
d->z = m->create();
d->needrecode = true;
return;
}
}
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
errmsg("no Snowball stemmer available for language \"%s\" and encoding \"%s\"",
lang, GetDatabaseEncodingName())));
}
Datum
dsnowball_init(PG_FUNCTION_ARGS)
{
text *in;
DictSnowball *d;
Map *cfg,
*pcfg;
bool stoploaded = false;
/* init functions must defend against NULLs for themselves */
if (PG_ARGISNULL(0) || PG_GETARG_POINTER(0) == NULL)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("NULL config not allowed for Snowball")));
in = PG_GETARG_TEXT_P(0);
d = (DictSnowball *) palloc0(sizeof(DictSnowball));
d->stoplist.wordop = recode_and_lowerstr;
parse_keyvalpairs(in, &cfg);
pcfg = cfg;
PG_FREE_IF_COPY(in, 0);
while (pcfg && pcfg->key)
{
if (pg_strcasecmp("StopWords", pcfg->key) == 0)
{
if (stoploaded)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("multiple StopWords parameters")));
readstoplist(pcfg->value, &d->stoplist);
sortstoplist(&d->stoplist);
stoploaded = true;
}
else if (pg_strcasecmp("Language", pcfg->key) == 0)
{
if (d->stem)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("multiple Language parameters")));
locate_stem_module(d, pcfg->value);
}
else
{
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("unrecognized Snowball parameter: \"%s\"",
pcfg->key)));
}
pfree(pcfg->key);
pfree(pcfg->value);
pcfg++;
}
pfree(cfg);
if (!d->stem)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("missing Language parameter")));
d->dictCtx = CurrentMemoryContext;
PG_RETURN_POINTER(d);
}
Datum
dsnowball_lexize(PG_FUNCTION_ARGS)
{
DictSnowball *d = (DictSnowball *) PG_GETARG_POINTER(0);
char *in = (char *) PG_GETARG_POINTER(1);
int32 len = PG_GETARG_INT32(2);
char *txt = lowerstr_with_len(in, len);
TSLexeme *res = palloc0(sizeof(TSLexeme) * 2);
if (*txt == '\0' || searchstoplist(&(d->stoplist), txt))
{
pfree(txt);
}
else
{
MemoryContext saveCtx;
/*
* recode to utf8 if stemmer is utf8 and doesn't match server encoding
*/
if (d->needrecode)
{
char *recoded;
recoded = (char *) pg_do_encoding_conversion((unsigned char *) txt,
strlen(txt),
GetDatabaseEncoding(),
PG_UTF8);
if (recoded == NULL)
elog(ERROR, "encoding conversion failed");
if (recoded != txt)
{
pfree(txt);
txt = recoded;
}
}
/* see comment about d->dictCtx */
saveCtx = MemoryContextSwitchTo(d->dictCtx);
SN_set_current(d->z, strlen(txt), (symbol *) txt);
d->stem(d->z);
MemoryContextSwitchTo(saveCtx);
if (d->z->p && d->z->l)
{
txt = repalloc(txt, d->z->l + 1);
memcpy(txt, d->z->p, d->z->l);
txt[d->z->l] = '\0';
}
/* back recode if needed */
if (d->needrecode)
{
char *recoded;
recoded = (char *) pg_do_encoding_conversion((unsigned char *) txt,
strlen(txt),
PG_UTF8,
GetDatabaseEncoding());
if (recoded == NULL)
elog(ERROR, "encoding conversion failed");
if (recoded != txt)
{
pfree(txt);
txt = recoded;
}
}
res->lexeme = txt;
}
PG_RETURN_POINTER(res);
}

View File

@ -0,0 +1,64 @@
#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;
}

View File

@ -0,0 +1,337 @@
/* 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); }

View File

@ -0,0 +1,624 @@
/* 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); }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,762 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int finnish_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_tidy(struct SN_env * z);
static int r_other_endings(struct SN_env * z);
static int r_t_plural(struct SN_env * z);
static int r_i_plural(struct SN_env * z);
static int r_case_ending(struct SN_env * z);
static int r_VI(struct SN_env * z);
static int r_LONG(struct SN_env * z);
static int r_possessive(struct SN_env * z);
static int r_particle_etc(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * finnish_ISO_8859_1_create_env(void);
extern void finnish_ISO_8859_1_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[2] = { 'p', 'a' };
static const symbol s_0_1[3] = { 's', 't', 'i' };
static const symbol s_0_2[4] = { 'k', 'a', 'a', 'n' };
static const symbol s_0_3[3] = { 'h', 'a', 'n' };
static const symbol s_0_4[3] = { 'k', 'i', 'n' };
static const symbol s_0_5[3] = { 'h', 0xE4, 'n' };
static const symbol s_0_6[4] = { 'k', 0xE4, 0xE4, 'n' };
static const symbol s_0_7[2] = { 'k', 'o' };
static const symbol s_0_8[2] = { 'p', 0xE4 };
static const symbol s_0_9[2] = { 'k', 0xF6 };
static const struct among a_0[10] =
{
/* 0 */ { 2, s_0_0, -1, 1, 0},
/* 1 */ { 3, s_0_1, -1, 2, 0},
/* 2 */ { 4, s_0_2, -1, 1, 0},
/* 3 */ { 3, s_0_3, -1, 1, 0},
/* 4 */ { 3, s_0_4, -1, 1, 0},
/* 5 */ { 3, s_0_5, -1, 1, 0},
/* 6 */ { 4, s_0_6, -1, 1, 0},
/* 7 */ { 2, s_0_7, -1, 1, 0},
/* 8 */ { 2, s_0_8, -1, 1, 0},
/* 9 */ { 2, s_0_9, -1, 1, 0}
};
static const symbol s_1_0[3] = { 'l', 'l', 'a' };
static const symbol s_1_1[2] = { 'n', 'a' };
static const symbol s_1_2[3] = { 's', 's', 'a' };
static const symbol s_1_3[2] = { 't', 'a' };
static const symbol s_1_4[3] = { 'l', 't', 'a' };
static const symbol s_1_5[3] = { 's', 't', 'a' };
static const struct among a_1[6] =
{
/* 0 */ { 3, s_1_0, -1, -1, 0},
/* 1 */ { 2, s_1_1, -1, -1, 0},
/* 2 */ { 3, s_1_2, -1, -1, 0},
/* 3 */ { 2, s_1_3, -1, -1, 0},
/* 4 */ { 3, s_1_4, 3, -1, 0},
/* 5 */ { 3, s_1_5, 3, -1, 0}
};
static const symbol s_2_0[3] = { 'l', 'l', 0xE4 };
static const symbol s_2_1[2] = { 'n', 0xE4 };
static const symbol s_2_2[3] = { 's', 's', 0xE4 };
static const symbol s_2_3[2] = { 't', 0xE4 };
static const symbol s_2_4[3] = { 'l', 't', 0xE4 };
static const symbol s_2_5[3] = { 's', 't', 0xE4 };
static const struct among a_2[6] =
{
/* 0 */ { 3, s_2_0, -1, -1, 0},
/* 1 */ { 2, s_2_1, -1, -1, 0},
/* 2 */ { 3, s_2_2, -1, -1, 0},
/* 3 */ { 2, s_2_3, -1, -1, 0},
/* 4 */ { 3, s_2_4, 3, -1, 0},
/* 5 */ { 3, s_2_5, 3, -1, 0}
};
static const symbol s_3_0[3] = { 'l', 'l', 'e' };
static const symbol s_3_1[3] = { 'i', 'n', 'e' };
static const struct among a_3[2] =
{
/* 0 */ { 3, s_3_0, -1, -1, 0},
/* 1 */ { 3, s_3_1, -1, -1, 0}
};
static const symbol s_4_0[3] = { 'n', 's', 'a' };
static const symbol s_4_1[3] = { 'm', 'm', 'e' };
static const symbol s_4_2[3] = { 'n', 'n', 'e' };
static const symbol s_4_3[2] = { 'n', 'i' };
static const symbol s_4_4[2] = { 's', 'i' };
static const symbol s_4_5[2] = { 'a', 'n' };
static const symbol s_4_6[2] = { 'e', 'n' };
static const symbol s_4_7[2] = { 0xE4, 'n' };
static const symbol s_4_8[3] = { 'n', 's', 0xE4 };
static const struct among a_4[9] =
{
/* 0 */ { 3, s_4_0, -1, 3, 0},
/* 1 */ { 3, s_4_1, -1, 3, 0},
/* 2 */ { 3, s_4_2, -1, 3, 0},
/* 3 */ { 2, s_4_3, -1, 2, 0},
/* 4 */ { 2, s_4_4, -1, 1, 0},
/* 5 */ { 2, s_4_5, -1, 4, 0},
/* 6 */ { 2, s_4_6, -1, 6, 0},
/* 7 */ { 2, s_4_7, -1, 5, 0},
/* 8 */ { 3, s_4_8, -1, 3, 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] = { 'i', 'i' };
static const symbol s_5_3[2] = { 'o', 'o' };
static const symbol s_5_4[2] = { 'u', 'u' };
static const symbol s_5_5[2] = { 0xE4, 0xE4 };
static const symbol s_5_6[2] = { 0xF6, 0xF6 };
static const struct among a_5[7] =
{
/* 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},
/* 4 */ { 2, s_5_4, -1, -1, 0},
/* 5 */ { 2, s_5_5, -1, -1, 0},
/* 6 */ { 2, s_5_6, -1, -1, 0}
};
static const symbol s_6_0[1] = { 'a' };
static const symbol s_6_1[3] = { 'l', 'l', 'a' };
static const symbol s_6_2[2] = { 'n', 'a' };
static const symbol s_6_3[3] = { 's', 's', 'a' };
static const symbol s_6_4[2] = { 't', 'a' };
static const symbol s_6_5[3] = { 'l', 't', 'a' };
static const symbol s_6_6[3] = { 's', 't', 'a' };
static const symbol s_6_7[3] = { 't', 't', 'a' };
static const symbol s_6_8[3] = { 'l', 'l', 'e' };
static const symbol s_6_9[3] = { 'i', 'n', 'e' };
static const symbol s_6_10[3] = { 'k', 's', 'i' };
static const symbol s_6_11[1] = { 'n' };
static const symbol s_6_12[3] = { 'h', 'a', 'n' };
static const symbol s_6_13[3] = { 'd', 'e', 'n' };
static const symbol s_6_14[4] = { 's', 'e', 'e', 'n' };
static const symbol s_6_15[3] = { 'h', 'e', 'n' };
static const symbol s_6_16[4] = { 't', 't', 'e', 'n' };
static const symbol s_6_17[3] = { 'h', 'i', 'n' };
static const symbol s_6_18[4] = { 's', 'i', 'i', 'n' };
static const symbol s_6_19[3] = { 'h', 'o', 'n' };
static const symbol s_6_20[3] = { 'h', 0xE4, 'n' };
static const symbol s_6_21[3] = { 'h', 0xF6, 'n' };
static const symbol s_6_22[1] = { 0xE4 };
static const symbol s_6_23[3] = { 'l', 'l', 0xE4 };
static const symbol s_6_24[2] = { 'n', 0xE4 };
static const symbol s_6_25[3] = { 's', 's', 0xE4 };
static const symbol s_6_26[2] = { 't', 0xE4 };
static const symbol s_6_27[3] = { 'l', 't', 0xE4 };
static const symbol s_6_28[3] = { 's', 't', 0xE4 };
static const symbol s_6_29[3] = { 't', 't', 0xE4 };
static const struct among a_6[30] =
{
/* 0 */ { 1, s_6_0, -1, 8, 0},
/* 1 */ { 3, s_6_1, 0, -1, 0},
/* 2 */ { 2, s_6_2, 0, -1, 0},
/* 3 */ { 3, s_6_3, 0, -1, 0},
/* 4 */ { 2, s_6_4, 0, -1, 0},
/* 5 */ { 3, s_6_5, 4, -1, 0},
/* 6 */ { 3, s_6_6, 4, -1, 0},
/* 7 */ { 3, s_6_7, 4, 9, 0},
/* 8 */ { 3, s_6_8, -1, -1, 0},
/* 9 */ { 3, s_6_9, -1, -1, 0},
/* 10 */ { 3, s_6_10, -1, -1, 0},
/* 11 */ { 1, s_6_11, -1, 7, 0},
/* 12 */ { 3, s_6_12, 11, 1, 0},
/* 13 */ { 3, s_6_13, 11, -1, r_VI},
/* 14 */ { 4, s_6_14, 11, -1, r_LONG},
/* 15 */ { 3, s_6_15, 11, 2, 0},
/* 16 */ { 4, s_6_16, 11, -1, r_VI},
/* 17 */ { 3, s_6_17, 11, 3, 0},
/* 18 */ { 4, s_6_18, 11, -1, r_VI},
/* 19 */ { 3, s_6_19, 11, 4, 0},
/* 20 */ { 3, s_6_20, 11, 5, 0},
/* 21 */ { 3, s_6_21, 11, 6, 0},
/* 22 */ { 1, s_6_22, -1, 8, 0},
/* 23 */ { 3, s_6_23, 22, -1, 0},
/* 24 */ { 2, s_6_24, 22, -1, 0},
/* 25 */ { 3, s_6_25, 22, -1, 0},
/* 26 */ { 2, s_6_26, 22, -1, 0},
/* 27 */ { 3, s_6_27, 26, -1, 0},
/* 28 */ { 3, s_6_28, 26, -1, 0},
/* 29 */ { 3, s_6_29, 26, 9, 0}
};
static const symbol s_7_0[3] = { 'e', 'j', 'a' };
static const symbol s_7_1[3] = { 'm', 'm', 'a' };
static const symbol s_7_2[4] = { 'i', 'm', 'm', 'a' };
static const symbol s_7_3[3] = { 'm', 'p', 'a' };
static const symbol s_7_4[4] = { 'i', 'm', 'p', 'a' };
static const symbol s_7_5[3] = { 'm', 'm', 'i' };
static const symbol s_7_6[4] = { 'i', 'm', 'm', 'i' };
static const symbol s_7_7[3] = { 'm', 'p', 'i' };
static const symbol s_7_8[4] = { 'i', 'm', 'p', 'i' };
static const symbol s_7_9[3] = { 'e', 'j', 0xE4 };
static const symbol s_7_10[3] = { 'm', 'm', 0xE4 };
static const symbol s_7_11[4] = { 'i', 'm', 'm', 0xE4 };
static const symbol s_7_12[3] = { 'm', 'p', 0xE4 };
static const symbol s_7_13[4] = { 'i', 'm', 'p', 0xE4 };
static const struct among a_7[14] =
{
/* 0 */ { 3, s_7_0, -1, -1, 0},
/* 1 */ { 3, s_7_1, -1, 1, 0},
/* 2 */ { 4, s_7_2, 1, -1, 0},
/* 3 */ { 3, s_7_3, -1, 1, 0},
/* 4 */ { 4, s_7_4, 3, -1, 0},
/* 5 */ { 3, s_7_5, -1, 1, 0},
/* 6 */ { 4, s_7_6, 5, -1, 0},
/* 7 */ { 3, s_7_7, -1, 1, 0},
/* 8 */ { 4, s_7_8, 7, -1, 0},
/* 9 */ { 3, s_7_9, -1, -1, 0},
/* 10 */ { 3, s_7_10, -1, 1, 0},
/* 11 */ { 4, s_7_11, 10, -1, 0},
/* 12 */ { 3, s_7_12, -1, 1, 0},
/* 13 */ { 4, s_7_13, 12, -1, 0}
};
static const symbol s_8_0[1] = { 'i' };
static const symbol s_8_1[1] = { 'j' };
static const struct among a_8[2] =
{
/* 0 */ { 1, s_8_0, -1, -1, 0},
/* 1 */ { 1, s_8_1, -1, -1, 0}
};
static const symbol s_9_0[3] = { 'm', 'm', 'a' };
static const symbol s_9_1[4] = { 'i', 'm', 'm', 'a' };
static const struct among a_9[2] =
{
/* 0 */ { 3, s_9_0, -1, 1, 0},
/* 1 */ { 4, s_9_1, 0, -1, 0}
};
static const unsigned char g_AEI[] = { 17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8 };
static const unsigned char g_V1[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
static const unsigned char g_V2[] = { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
static const unsigned char g_particle_end[] = { 17, 97, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
static const symbol s_0[] = { 'k' };
static const symbol s_1[] = { 'k', 's', 'e' };
static const symbol s_2[] = { 'k', 's', 'i' };
static const symbol s_3[] = { 'i' };
static const symbol s_4[] = { 'a' };
static const symbol s_5[] = { 'e' };
static const symbol s_6[] = { 'i' };
static const symbol s_7[] = { 'o' };
static const symbol s_8[] = { 0xE4 };
static const symbol s_9[] = { 0xF6 };
static const symbol s_10[] = { 'i', 'e' };
static const symbol s_11[] = { 'e' };
static const symbol s_12[] = { 'p', 'o' };
static const symbol s_13[] = { 't' };
static const symbol s_14[] = { 'p', 'o' };
static const symbol s_15[] = { 'j' };
static const symbol s_16[] = { 'o' };
static const symbol s_17[] = { 'u' };
static const symbol s_18[] = { 'o' };
static const symbol s_19[] = { 'j' };
static int r_mark_regions(struct SN_env * z) {
z->I[0] = z->l;
z->I[1] = z->l;
if (out_grouping(z, g_V1, 97, 246, 1) < 0) return 0; /* goto */ /* grouping V1, line 46 */
{ /* gopast */ /* non V1, line 46 */
int ret = in_grouping(z, g_V1, 97, 246, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[0] = z->c; /* setmark p1, line 46 */
if (out_grouping(z, g_V1, 97, 246, 1) < 0) return 0; /* goto */ /* grouping V1, line 47 */
{ /* gopast */ /* non V1, line 47 */
int ret = in_grouping(z, g_V1, 97, 246, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[1] = z->c; /* setmark p2, line 47 */
return 1;
}
static int r_R2(struct SN_env * z) {
if (!(z->I[1] <= z->c)) return 0;
return 1;
}
static int r_particle_etc(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 55 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 55 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 55 */
among_var = find_among_b(z, a_0, 10); /* substring, line 55 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 55 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
if (in_grouping_b(z, g_particle_end, 97, 246, 0)) return 0;
break;
case 2:
{ int ret = r_R2(z);
if (ret == 0) return 0; /* call R2, line 64 */
if (ret < 0) return ret;
}
break;
}
{ int ret = slice_del(z); /* delete, line 66 */
if (ret < 0) return ret;
}
return 1;
}
static int r_possessive(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 69 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 69 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 69 */
among_var = find_among_b(z, a_4, 9); /* substring, line 69 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 69 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int m2 = z->l - z->c; (void)m2; /* not, line 72 */
if (!(eq_s_b(z, 1, s_0))) goto lab0;
return 0;
lab0:
z->c = z->l - m2;
}
{ int ret = slice_del(z); /* delete, line 72 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z); /* delete, line 74 */
if (ret < 0) return ret;
}
z->ket = z->c; /* [, line 74 */
if (!(eq_s_b(z, 3, s_1))) return 0;
z->bra = z->c; /* ], line 74 */
{ int ret = slice_from_s(z, 3, s_2); /* <-, line 74 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z); /* delete, line 78 */
if (ret < 0) return ret;
}
break;
case 4:
if (z->c - 1 <= z->lb || z->p[z->c - 1] != 97) return 0;
if (!(find_among_b(z, a_1, 6))) return 0; /* among, line 81 */
{ int ret = slice_del(z); /* delete, line 81 */
if (ret < 0) return ret;
}
break;
case 5:
if (z->c - 1 <= z->lb || z->p[z->c - 1] != 228) return 0;
if (!(find_among_b(z, a_2, 6))) return 0; /* among, line 83 */
{ int ret = slice_del(z); /* delete, line 84 */
if (ret < 0) return ret;
}
break;
case 6:
if (z->c - 2 <= z->lb || z->p[z->c - 1] != 101) return 0;
if (!(find_among_b(z, a_3, 2))) return 0; /* among, line 86 */
{ int ret = slice_del(z); /* delete, line 86 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_LONG(struct SN_env * z) {
if (!(find_among_b(z, a_5, 7))) return 0; /* among, line 91 */
return 1;
}
static int r_VI(struct SN_env * z) {
if (!(eq_s_b(z, 1, s_3))) return 0;
if (in_grouping_b(z, g_V2, 97, 246, 0)) return 0;
return 1;
}
static int r_case_ending(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 96 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 96 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 96 */
among_var = find_among_b(z, a_6, 30); /* substring, line 96 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 96 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
if (!(eq_s_b(z, 1, s_4))) return 0;
break;
case 2:
if (!(eq_s_b(z, 1, s_5))) return 0;
break;
case 3:
if (!(eq_s_b(z, 1, s_6))) return 0;
break;
case 4:
if (!(eq_s_b(z, 1, s_7))) return 0;
break;
case 5:
if (!(eq_s_b(z, 1, s_8))) return 0;
break;
case 6:
if (!(eq_s_b(z, 1, s_9))) return 0;
break;
case 7:
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
{ int m2 = z->l - z->c; (void)m2; /* and, line 113 */
{ int m3 = z->l - z->c; (void)m3; /* or, line 112 */
{ int ret = r_LONG(z);
if (ret == 0) goto lab2; /* call LONG, line 111 */
if (ret < 0) return ret;
}
goto lab1;
lab2:
z->c = z->l - m3;
if (!(eq_s_b(z, 2, s_10))) { z->c = z->l - m_keep; goto lab0; }
}
lab1:
z->c = z->l - m2;
if (z->c <= z->lb) { z->c = z->l - m_keep; goto lab0; }
z->c--; /* next, line 113 */
}
z->bra = z->c; /* ], line 113 */
lab0:
;
}
break;
case 8:
if (in_grouping_b(z, g_V1, 97, 246, 0)) return 0;
if (out_grouping_b(z, g_V1, 97, 246, 0)) return 0;
break;
case 9:
if (!(eq_s_b(z, 1, s_11))) return 0;
break;
}
{ int ret = slice_del(z); /* delete, line 138 */
if (ret < 0) return ret;
}
z->B[0] = 1; /* set ending_removed, line 139 */
return 1;
}
static int r_other_endings(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 142 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[1]) return 0;
z->c = z->I[1]; /* tomark, line 142 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 142 */
among_var = find_among_b(z, a_7, 14); /* substring, line 142 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 142 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int m2 = z->l - z->c; (void)m2; /* not, line 146 */
if (!(eq_s_b(z, 2, s_12))) goto lab0;
return 0;
lab0:
z->c = z->l - m2;
}
break;
}
{ int ret = slice_del(z); /* delete, line 151 */
if (ret < 0) return ret;
}
return 1;
}
static int r_i_plural(struct SN_env * z) {
{ int mlimit; /* setlimit, line 154 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 154 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 154 */
if (z->c <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 106)) { z->lb = mlimit; return 0; }
if (!(find_among_b(z, a_8, 2))) { z->lb = mlimit; return 0; } /* substring, line 154 */
z->bra = z->c; /* ], line 154 */
z->lb = mlimit;
}
{ int ret = slice_del(z); /* delete, line 158 */
if (ret < 0) return ret;
}
return 1;
}
static int r_t_plural(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 161 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 161 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 162 */
if (!(eq_s_b(z, 1, s_13))) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 162 */
{ int m_test = z->l - z->c; /* test, line 162 */
if (in_grouping_b(z, g_V1, 97, 246, 0)) { z->lb = mlimit; return 0; }
z->c = z->l - m_test;
}
{ int ret = slice_del(z); /* delete, line 163 */
if (ret < 0) return ret;
}
z->lb = mlimit;
}
{ int mlimit; /* setlimit, line 165 */
int m2 = z->l - z->c; (void)m2;
if (z->c < z->I[1]) return 0;
z->c = z->I[1]; /* tomark, line 165 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m2;
z->ket = z->c; /* [, line 165 */
if (z->c - 2 <= z->lb || z->p[z->c - 1] != 97) { z->lb = mlimit; return 0; }
among_var = find_among_b(z, a_9, 2); /* substring, line 165 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 165 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int m3 = z->l - z->c; (void)m3; /* not, line 167 */
if (!(eq_s_b(z, 2, s_14))) goto lab0;
return 0;
lab0:
z->c = z->l - m3;
}
break;
}
{ int ret = slice_del(z); /* delete, line 170 */
if (ret < 0) return ret;
}
return 1;
}
static int r_tidy(struct SN_env * z) {
{ int mlimit; /* setlimit, line 173 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 173 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
{ int m2 = z->l - z->c; (void)m2; /* do, line 174 */
{ int m3 = z->l - z->c; (void)m3; /* and, line 174 */
{ int ret = r_LONG(z);
if (ret == 0) goto lab0; /* call LONG, line 174 */
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->ket = z->c; /* [, line 174 */
if (z->c <= z->lb) goto lab0;
z->c--; /* next, line 174 */
z->bra = z->c; /* ], line 174 */
{ int ret = slice_del(z); /* delete, line 174 */
if (ret < 0) return ret;
}
}
lab0:
z->c = z->l - m2;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 175 */
z->ket = z->c; /* [, line 175 */
if (in_grouping_b(z, g_AEI, 97, 228, 0)) goto lab1;
z->bra = z->c; /* ], line 175 */
if (out_grouping_b(z, g_V1, 97, 246, 0)) goto lab1;
{ int ret = slice_del(z); /* delete, line 175 */
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m4;
}
{ int m5 = z->l - z->c; (void)m5; /* do, line 176 */
z->ket = z->c; /* [, line 176 */
if (!(eq_s_b(z, 1, s_15))) goto lab2;
z->bra = z->c; /* ], line 176 */
{ int m6 = z->l - z->c; (void)m6; /* or, line 176 */
if (!(eq_s_b(z, 1, s_16))) goto lab4;
goto lab3;
lab4:
z->c = z->l - m6;
if (!(eq_s_b(z, 1, s_17))) goto lab2;
}
lab3:
{ int ret = slice_del(z); /* delete, line 176 */
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m5;
}
{ int m7 = z->l - z->c; (void)m7; /* do, line 177 */
z->ket = z->c; /* [, line 177 */
if (!(eq_s_b(z, 1, s_18))) goto lab5;
z->bra = z->c; /* ], line 177 */
if (!(eq_s_b(z, 1, s_19))) goto lab5;
{ int ret = slice_del(z); /* delete, line 177 */
if (ret < 0) return ret;
}
lab5:
z->c = z->l - m7;
}
z->lb = mlimit;
}
if (in_grouping_b(z, g_V1, 97, 246, 1) < 0) return 0; /* goto */ /* non V1, line 179 */
z->ket = z->c; /* [, line 179 */
if (z->c <= z->lb) return 0;
z->c--; /* next, line 179 */
z->bra = z->c; /* ], line 179 */
z->S[0] = slice_to(z, z->S[0]); /* -> x, line 179 */
if (z->S[0] == 0) return -1; /* -> x, line 179 */
if (!(eq_v_b(z, z->S[0]))) return 0; /* name x, line 179 */
{ int ret = slice_del(z); /* delete, line 179 */
if (ret < 0) return ret;
}
return 1;
}
extern int finnish_ISO_8859_1_stem(struct SN_env * z) {
{ int c1 = z->c; /* do, line 185 */
{ int ret = r_mark_regions(z);
if (ret == 0) goto lab0; /* call mark_regions, line 185 */
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->B[0] = 0; /* unset ending_removed, line 186 */
z->lb = z->c; z->c = z->l; /* backwards, line 187 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 188 */
{ int ret = r_particle_etc(z);
if (ret == 0) goto lab1; /* call particle_etc, line 188 */
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 189 */
{ int ret = r_possessive(z);
if (ret == 0) goto lab2; /* call possessive, line 189 */
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 190 */
{ int ret = r_case_ending(z);
if (ret == 0) goto lab3; /* call case_ending, line 190 */
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
{ int m5 = z->l - z->c; (void)m5; /* do, line 191 */
{ int ret = r_other_endings(z);
if (ret == 0) goto lab4; /* call other_endings, line 191 */
if (ret < 0) return ret;
}
lab4:
z->c = z->l - m5;
}
{ int m6 = z->l - z->c; (void)m6; /* or, line 192 */
if (!(z->B[0])) goto lab6; /* Boolean test ending_removed, line 192 */
{ int m7 = z->l - z->c; (void)m7; /* do, line 192 */
{ int ret = r_i_plural(z);
if (ret == 0) goto lab7; /* call i_plural, line 192 */
if (ret < 0) return ret;
}
lab7:
z->c = z->l - m7;
}
goto lab5;
lab6:
z->c = z->l - m6;
{ int m8 = z->l - z->c; (void)m8; /* do, line 192 */
{ int ret = r_t_plural(z);
if (ret == 0) goto lab8; /* call t_plural, line 192 */
if (ret < 0) return ret;
}
lab8:
z->c = z->l - m8;
}
}
lab5:
{ int m9 = z->l - z->c; (void)m9; /* do, line 193 */
{ int ret = r_tidy(z);
if (ret == 0) goto lab9; /* call tidy, line 193 */
if (ret < 0) return ret;
}
lab9:
z->c = z->l - m9;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * finnish_ISO_8859_1_create_env(void) { return SN_create_env(1, 2, 1); }
extern void finnish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 1); }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,503 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int german_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_standard_suffix(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_postlude(struct SN_env * z);
static int r_prelude(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * german_ISO_8859_1_create_env(void);
extern void german_ISO_8859_1_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_1[1] = { 'U' };
static const symbol s_0_2[1] = { 'Y' };
static const symbol s_0_3[1] = { 0xE4 };
static const symbol s_0_4[1] = { 0xF6 };
static const symbol s_0_5[1] = { 0xFC };
static const struct among a_0[6] =
{
/* 0 */ { 0, 0, -1, 6, 0},
/* 1 */ { 1, s_0_1, 0, 2, 0},
/* 2 */ { 1, s_0_2, 0, 1, 0},
/* 3 */ { 1, s_0_3, 0, 3, 0},
/* 4 */ { 1, s_0_4, 0, 4, 0},
/* 5 */ { 1, s_0_5, 0, 5, 0}
};
static const symbol s_1_0[1] = { 'e' };
static const symbol s_1_1[2] = { 'e', 'm' };
static const symbol s_1_2[2] = { 'e', 'n' };
static const symbol s_1_3[3] = { 'e', 'r', 'n' };
static const symbol s_1_4[2] = { 'e', 'r' };
static const symbol s_1_5[1] = { 's' };
static const symbol s_1_6[2] = { 'e', 's' };
static const struct among a_1[7] =
{
/* 0 */ { 1, s_1_0, -1, 1, 0},
/* 1 */ { 2, s_1_1, -1, 1, 0},
/* 2 */ { 2, s_1_2, -1, 1, 0},
/* 3 */ { 3, s_1_3, -1, 1, 0},
/* 4 */ { 2, s_1_4, -1, 1, 0},
/* 5 */ { 1, s_1_5, -1, 2, 0},
/* 6 */ { 2, s_1_6, 5, 1, 0}
};
static const symbol s_2_0[2] = { 'e', 'n' };
static const symbol s_2_1[2] = { 'e', 'r' };
static const symbol s_2_2[2] = { 's', 't' };
static const symbol s_2_3[3] = { 'e', 's', 't' };
static const struct among a_2[4] =
{
/* 0 */ { 2, s_2_0, -1, 1, 0},
/* 1 */ { 2, s_2_1, -1, 1, 0},
/* 2 */ { 2, s_2_2, -1, 2, 0},
/* 3 */ { 3, s_2_3, 2, 1, 0}
};
static const symbol s_3_0[2] = { 'i', 'g' };
static const symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };
static const struct among a_3[2] =
{
/* 0 */ { 2, s_3_0, -1, 1, 0},
/* 1 */ { 4, s_3_1, -1, 1, 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] = { 'u', 'n', 'g' };
static const symbol s_4_3[4] = { 'l', 'i', 'c', 'h' };
static const symbol s_4_4[4] = { 'i', 's', 'c', 'h' };
static const symbol s_4_5[2] = { 'i', 'k' };
static const symbol s_4_6[4] = { 'h', 'e', 'i', 't' };
static const symbol s_4_7[4] = { 'k', 'e', 'i', 't' };
static const struct among a_4[8] =
{
/* 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, 2, 0},
/* 5 */ { 2, s_4_5, -1, 2, 0},
/* 6 */ { 4, s_4_6, -1, 3, 0},
/* 7 */ { 4, s_4_7, -1, 4, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
static const unsigned char g_s_ending[] = { 117, 30, 5 };
static const unsigned char g_st_ending[] = { 117, 30, 4 };
static const symbol s_0[] = { 0xDF };
static const symbol s_1[] = { 's', 's' };
static const symbol s_2[] = { 'u' };
static const symbol s_3[] = { 'U' };
static const symbol s_4[] = { 'y' };
static const symbol s_5[] = { 'Y' };
static const symbol s_6[] = { 'y' };
static const symbol s_7[] = { 'u' };
static const symbol s_8[] = { 'a' };
static const symbol s_9[] = { 'o' };
static const symbol s_10[] = { 'u' };
static const symbol s_11[] = { 'i', 'g' };
static const symbol s_12[] = { 'e' };
static const symbol s_13[] = { 'e' };
static const symbol s_14[] = { 'e', 'r' };
static const symbol s_15[] = { 'e', 'n' };
static int r_prelude(struct SN_env * z) {
{ int c_test = z->c; /* test, line 30 */
while(1) { /* repeat, line 30 */
int c1 = z->c;
{ int c2 = z->c; /* or, line 33 */
z->bra = z->c; /* [, line 32 */
if (!(eq_s(z, 1, s_0))) goto lab2;
z->ket = z->c; /* ], line 32 */
{ int ret = slice_from_s(z, 2, s_1); /* <-, line 32 */
if (ret < 0) return ret;
}
goto lab1;
lab2:
z->c = c2;
if (z->c >= z->l) goto lab0;
z->c++; /* next, line 33 */
}
lab1:
continue;
lab0:
z->c = c1;
break;
}
z->c = c_test;
}
while(1) { /* repeat, line 36 */
int c3 = z->c;
while(1) { /* goto, line 36 */
int c4 = z->c;
if (in_grouping(z, g_v, 97, 252, 0)) goto lab4;
z->bra = z->c; /* [, line 37 */
{ int c5 = z->c; /* or, line 37 */
if (!(eq_s(z, 1, s_2))) goto lab6;
z->ket = z->c; /* ], line 37 */
if (in_grouping(z, g_v, 97, 252, 0)) goto lab6;
{ int ret = slice_from_s(z, 1, s_3); /* <-, line 37 */
if (ret < 0) return ret;
}
goto lab5;
lab6:
z->c = c5;
if (!(eq_s(z, 1, s_4))) goto lab4;
z->ket = z->c; /* ], line 38 */
if (in_grouping(z, g_v, 97, 252, 0)) goto lab4;
{ int ret = slice_from_s(z, 1, s_5); /* <-, line 38 */
if (ret < 0) return ret;
}
}
lab5:
z->c = c4;
break;
lab4:
z->c = c4;
if (z->c >= z->l) goto lab3;
z->c++; /* goto, line 36 */
}
continue;
lab3:
z->c = c3;
break;
}
return 1;
}
static int r_mark_regions(struct SN_env * z) {
z->I[0] = z->l;
z->I[1] = z->l;
{ int c_test = z->c; /* test, line 47 */
{ int ret = z->c + 3;
if (0 > ret || ret > z->l) return 0;
z->c = ret; /* hop, line 47 */
}
z->I[2] = z->c; /* setmark x, line 47 */
z->c = c_test;
}
{ /* gopast */ /* grouping v, line 49 */
int ret = out_grouping(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
{ /* gopast */ /* non v, line 49 */
int ret = in_grouping(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[0] = z->c; /* setmark p1, line 49 */
/* try, line 50 */
if (!(z->I[0] < z->I[2])) goto lab0;
z->I[0] = z->I[2];
lab0:
{ /* gopast */ /* grouping v, line 51 */
int ret = out_grouping(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
{ /* gopast */ /* non v, line 51 */
int ret = in_grouping(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[1] = z->c; /* setmark p2, line 51 */
return 1;
}
static int r_postlude(struct SN_env * z) {
int among_var;
while(1) { /* repeat, line 55 */
int c1 = z->c;
z->bra = z->c; /* [, line 57 */
among_var = find_among(z, a_0, 6); /* substring, line 57 */
if (!(among_var)) goto lab0;
z->ket = z->c; /* ], line 57 */
switch(among_var) {
case 0: goto lab0;
case 1:
{ int ret = slice_from_s(z, 1, s_6); /* <-, line 58 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 1, s_7); /* <-, line 59 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 1, s_8); /* <-, line 60 */
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 1, s_9); /* <-, line 61 */
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = slice_from_s(z, 1, s_10); /* <-, line 62 */
if (ret < 0) return ret;
}
break;
case 6:
if (z->c >= z->l) goto lab0;
z->c++; /* next, line 63 */
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_standard_suffix(struct SN_env * z) {
int among_var;
{ int m1 = z->l - z->c; (void)m1; /* do, line 74 */
z->ket = z->c; /* [, line 75 */
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
among_var = find_among_b(z, a_1, 7); /* substring, line 75 */
if (!(among_var)) goto lab0;
z->bra = z->c; /* ], line 75 */
{ int ret = r_R1(z);
if (ret == 0) goto lab0; /* call R1, line 75 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: goto lab0;
case 1:
{ int ret = slice_del(z); /* delete, line 77 */
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b(z, g_s_ending, 98, 116, 0)) goto lab0;
{ int ret = slice_del(z); /* delete, line 80 */
if (ret < 0) return ret;
}
break;
}
lab0:
z->c = z->l - m1;
}
{ int m2 = z->l - z->c; (void)m2; /* do, line 84 */
z->ket = z->c; /* [, line 85 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab1;
among_var = find_among_b(z, a_2, 4); /* substring, line 85 */
if (!(among_var)) goto lab1;
z->bra = z->c; /* ], line 85 */
{ int ret = r_R1(z);
if (ret == 0) goto lab1; /* call R1, line 85 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: goto lab1;
case 1:
{ int ret = slice_del(z); /* delete, line 87 */
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b(z, g_st_ending, 98, 116, 0)) goto lab1;
{ int ret = z->c - 3;
if (z->lb > ret || ret > z->l) goto lab1;
z->c = ret; /* hop, line 90 */
}
{ int ret = slice_del(z); /* delete, line 90 */
if (ret < 0) return ret;
}
break;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 94 */
z->ket = z->c; /* [, line 95 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
among_var = find_among_b(z, a_4, 8); /* substring, line 95 */
if (!(among_var)) goto lab2;
z->bra = z->c; /* ], line 95 */
{ int ret = r_R2(z);
if (ret == 0) goto lab2; /* call R2, line 95 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: goto lab2;
case 1:
{ int ret = slice_del(z); /* delete, line 97 */
if (ret < 0) return ret;
}
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 98 */
z->ket = z->c; /* [, line 98 */
if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m_keep; goto lab3; }
z->bra = z->c; /* ], line 98 */
{ int m4 = z->l - z->c; (void)m4; /* not, line 98 */
if (!(eq_s_b(z, 1, s_12))) goto lab4;
{ z->c = z->l - m_keep; goto lab3; }
lab4:
z->c = z->l - m4;
}
{ int ret = r_R2(z);
if (ret == 0) { z->c = z->l - m_keep; goto lab3; } /* call R2, line 98 */
if (ret < 0) return ret;
}
{ int ret = slice_del(z); /* delete, line 98 */
if (ret < 0) return ret;
}
lab3:
;
}
break;
case 2:
{ int m5 = z->l - z->c; (void)m5; /* not, line 101 */
if (!(eq_s_b(z, 1, s_13))) goto lab5;
goto lab2;
lab5:
z->c = z->l - m5;
}
{ int ret = slice_del(z); /* delete, line 101 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z); /* delete, line 104 */
if (ret < 0) return ret;
}
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 105 */
z->ket = z->c; /* [, line 106 */
{ int m6 = z->l - z->c; (void)m6; /* or, line 106 */
if (!(eq_s_b(z, 2, s_14))) goto lab8;
goto lab7;
lab8:
z->c = z->l - m6;
if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m_keep; goto lab6; }
}
lab7:
z->bra = z->c; /* ], line 106 */
{ int ret = r_R1(z);
if (ret == 0) { z->c = z->l - m_keep; goto lab6; } /* call R1, line 106 */
if (ret < 0) return ret;
}
{ int ret = slice_del(z); /* delete, line 106 */
if (ret < 0) return ret;
}
lab6:
;
}
break;
case 4:
{ int ret = slice_del(z); /* delete, line 110 */
if (ret < 0) return ret;
}
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
z->ket = z->c; /* [, line 112 */
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - m_keep; goto lab9; }
among_var = find_among_b(z, a_3, 2); /* substring, line 112 */
if (!(among_var)) { z->c = z->l - m_keep; goto lab9; }
z->bra = z->c; /* ], line 112 */
{ int ret = r_R2(z);
if (ret == 0) { z->c = z->l - m_keep; goto lab9; } /* call R2, line 112 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: { z->c = z->l - m_keep; goto lab9; }
case 1:
{ int ret = slice_del(z); /* delete, line 114 */
if (ret < 0) return ret;
}
break;
}
lab9:
;
}
break;
}
lab2:
z->c = z->l - m3;
}
return 1;
}
extern int german_ISO_8859_1_stem(struct SN_env * z) {
{ int c1 = z->c; /* do, line 125 */
{ int ret = r_prelude(z);
if (ret == 0) goto lab0; /* call prelude, line 125 */
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
{ int c2 = z->c; /* do, line 126 */
{ int ret = r_mark_regions(z);
if (ret == 0) goto lab1; /* call mark_regions, line 126 */
if (ret < 0) return ret;
}
lab1:
z->c = c2;
}
z->lb = z->c; z->c = z->l; /* backwards, line 127 */
{ int m3 = z->l - z->c; (void)m3; /* do, line 128 */
{ int ret = r_standard_suffix(z);
if (ret == 0) goto lab2; /* call standard_suffix, line 128 */
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
z->c = z->lb;
{ int c4 = z->c; /* do, line 129 */
{ int ret = r_postlude(z);
if (ret == 0) goto lab3; /* call postlude, line 129 */
if (ret < 0) return ret;
}
lab3:
z->c = c4;
}
return 1;
}
extern struct SN_env * german_ISO_8859_1_create_env(void) { return SN_create_env(0, 3, 0); }
extern void german_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,297 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int norwegian_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
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 * norwegian_ISO_8859_1_create_env(void);
extern void norwegian_ISO_8859_1_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[1] = { 'a' };
static const symbol s_0_1[1] = { 'e' };
static const symbol s_0_2[3] = { 'e', 'd', 'e' };
static const symbol s_0_3[4] = { 'a', 'n', 'd', 'e' };
static const symbol s_0_4[4] = { 'e', 'n', 'd', 'e' };
static const symbol s_0_5[3] = { 'a', 'n', 'e' };
static const symbol s_0_6[3] = { 'e', 'n', 'e' };
static const symbol s_0_7[6] = { 'h', 'e', 't', 'e', 'n', 'e' };
static const symbol s_0_8[4] = { 'e', 'r', 't', 'e' };
static const symbol s_0_9[2] = { 'e', 'n' };
static const symbol s_0_10[5] = { 'h', 'e', 't', 'e', 'n' };
static const symbol s_0_11[2] = { 'a', 'r' };
static const symbol s_0_12[2] = { 'e', 'r' };
static const symbol s_0_13[5] = { 'h', 'e', 't', 'e', 'r' };
static const symbol s_0_14[1] = { 's' };
static const symbol s_0_15[2] = { 'a', 's' };
static const symbol s_0_16[2] = { 'e', 's' };
static const symbol s_0_17[4] = { 'e', 'd', 'e', 's' };
static const symbol s_0_18[5] = { 'e', 'n', 'd', 'e', 's' };
static const symbol s_0_19[4] = { 'e', 'n', 'e', 's' };
static const symbol s_0_20[7] = { 'h', 'e', 't', 'e', 'n', 'e', 's' };
static const symbol s_0_21[3] = { 'e', 'n', 's' };
static const symbol s_0_22[6] = { 'h', 'e', 't', 'e', 'n', 's' };
static const symbol s_0_23[3] = { 'e', 'r', 's' };
static const symbol s_0_24[3] = { 'e', 't', 's' };
static const symbol s_0_25[2] = { 'e', 't' };
static const symbol s_0_26[3] = { 'h', 'e', 't' };
static const symbol s_0_27[3] = { 'e', 'r', 't' };
static const symbol s_0_28[3] = { 'a', 's', 't' };
static const struct among a_0[29] =
{
/* 0 */ { 1, s_0_0, -1, 1, 0},
/* 1 */ { 1, s_0_1, -1, 1, 0},
/* 2 */ { 3, s_0_2, 1, 1, 0},
/* 3 */ { 4, s_0_3, 1, 1, 0},
/* 4 */ { 4, s_0_4, 1, 1, 0},
/* 5 */ { 3, s_0_5, 1, 1, 0},
/* 6 */ { 3, s_0_6, 1, 1, 0},
/* 7 */ { 6, s_0_7, 6, 1, 0},
/* 8 */ { 4, s_0_8, 1, 3, 0},
/* 9 */ { 2, s_0_9, -1, 1, 0},
/* 10 */ { 5, s_0_10, 9, 1, 0},
/* 11 */ { 2, s_0_11, -1, 1, 0},
/* 12 */ { 2, s_0_12, -1, 1, 0},
/* 13 */ { 5, s_0_13, 12, 1, 0},
/* 14 */ { 1, s_0_14, -1, 2, 0},
/* 15 */ { 2, s_0_15, 14, 1, 0},
/* 16 */ { 2, s_0_16, 14, 1, 0},
/* 17 */ { 4, s_0_17, 16, 1, 0},
/* 18 */ { 5, s_0_18, 16, 1, 0},
/* 19 */ { 4, s_0_19, 16, 1, 0},
/* 20 */ { 7, s_0_20, 19, 1, 0},
/* 21 */ { 3, s_0_21, 14, 1, 0},
/* 22 */ { 6, s_0_22, 21, 1, 0},
/* 23 */ { 3, s_0_23, 14, 1, 0},
/* 24 */ { 3, s_0_24, 14, 1, 0},
/* 25 */ { 2, s_0_25, -1, 1, 0},
/* 26 */ { 3, s_0_26, 25, 1, 0},
/* 27 */ { 3, s_0_27, -1, 3, 0},
/* 28 */ { 3, s_0_28, -1, 1, 0}
};
static const symbol s_1_0[2] = { 'd', 't' };
static const symbol s_1_1[2] = { 'v', 't' };
static const struct among a_1[2] =
{
/* 0 */ { 2, s_1_0, -1, -1, 0},
/* 1 */ { 2, s_1_1, -1, -1, 0}
};
static const symbol s_2_0[3] = { 'l', 'e', 'g' };
static const symbol s_2_1[4] = { 'e', 'l', 'e', 'g' };
static const symbol s_2_2[2] = { 'i', 'g' };
static const symbol s_2_3[3] = { 'e', 'i', 'g' };
static const symbol s_2_4[3] = { 'l', 'i', 'g' };
static const symbol s_2_5[4] = { 'e', 'l', 'i', 'g' };
static const symbol s_2_6[3] = { 'e', 'l', 's' };
static const symbol s_2_7[3] = { 'l', 'o', 'v' };
static const symbol s_2_8[4] = { 'e', 'l', 'o', 'v' };
static const symbol s_2_9[4] = { 's', 'l', 'o', 'v' };
static const symbol s_2_10[7] = { 'h', 'e', 't', 's', 'l', 'o', 'v' };
static const struct among a_2[11] =
{
/* 0 */ { 3, s_2_0, -1, 1, 0},
/* 1 */ { 4, s_2_1, 0, 1, 0},
/* 2 */ { 2, s_2_2, -1, 1, 0},
/* 3 */ { 3, s_2_3, 2, 1, 0},
/* 4 */ { 3, s_2_4, 2, 1, 0},
/* 5 */ { 4, s_2_5, 4, 1, 0},
/* 6 */ { 3, s_2_6, -1, 1, 0},
/* 7 */ { 3, s_2_7, -1, 1, 0},
/* 8 */ { 4, s_2_8, 7, 1, 0},
/* 9 */ { 4, s_2_9, 7, 1, 0},
/* 10 */ { 7, s_2_10, 9, 1, 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[] = { 119, 125, 149, 1 };
static const symbol s_0[] = { 'k' };
static const symbol s_1[] = { 'e', 'r' };
static int r_mark_regions(struct SN_env * z) {
z->I[0] = z->l;
{ int c_test = z->c; /* test, line 30 */
{ int ret = z->c + 3;
if (0 > ret || ret > z->l) return 0;
z->c = ret; /* hop, line 30 */
}
z->I[1] = z->c; /* setmark x, line 30 */
z->c = c_test;
}
if (out_grouping(z, g_v, 97, 248, 1) < 0) return 0; /* goto */ /* grouping v, line 31 */
{ /* gopast */ /* non v, line 31 */
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 31 */
/* try, line 32 */
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 38 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 38 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 38 */
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851426 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
among_var = find_among_b(z, a_0, 29); /* substring, line 38 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 38 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 44 */
if (ret < 0) return ret;
}
break;
case 2:
{ int m2 = z->l - z->c; (void)m2; /* or, line 46 */
if (in_grouping_b(z, g_s_ending, 98, 122, 0)) goto lab1;
goto lab0;
lab1:
z->c = z->l - m2;
if (!(eq_s_b(z, 1, s_0))) return 0;
if (out_grouping_b(z, g_v, 97, 248, 0)) return 0;
}
lab0:
{ int ret = slice_del(z); /* delete, line 46 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 2, s_1); /* <-, line 48 */
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 53 */
{ int mlimit; /* setlimit, line 54 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 54 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 54 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] != 116) { z->lb = mlimit; return 0; }
if (!(find_among_b(z, a_1, 2))) { z->lb = mlimit; return 0; } /* substring, line 54 */
z->bra = z->c; /* ], line 54 */
z->lb = mlimit;
}
z->c = z->l - m_test;
}
if (z->c <= z->lb) return 0;
z->c--; /* next, line 59 */
z->bra = z->c; /* ], line 59 */
{ int ret = slice_del(z); /* delete, line 59 */
if (ret < 0) return ret;
}
return 1;
}
static int r_other_suffix(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 63 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 63 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 63 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((4718720 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
among_var = find_among_b(z, a_2, 11); /* substring, line 63 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 63 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 67 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
extern int norwegian_ISO_8859_1_stem(struct SN_env * z) {
{ int c1 = z->c; /* do, line 74 */
{ int ret = r_mark_regions(z);
if (ret == 0) goto lab0; /* call mark_regions, line 74 */
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->lb = z->c; z->c = z->l; /* backwards, line 75 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 76 */
{ int ret = r_main_suffix(z);
if (ret == 0) goto lab1; /* call main_suffix, line 76 */
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 77 */
{ int ret = r_consonant_pair(z);
if (ret == 0) goto lab2; /* call consonant_pair, line 77 */
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 78 */
{ int ret = r_other_suffix(z);
if (ret == 0) goto lab3; /* call other_suffix, line 78 */
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * norwegian_ISO_8859_1_create_env(void) { return SN_create_env(0, 2, 0); }
extern void norwegian_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }

View File

@ -0,0 +1,749 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int porter_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_Step_5b(struct SN_env * z);
static int r_Step_5a(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);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * porter_ISO_8859_1_create_env(void);
extern void porter_ISO_8859_1_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[1] = { 's' };
static const symbol s_0_1[3] = { 'i', 'e', 's' };
static const symbol s_0_2[4] = { 's', 's', 'e', 's' };
static const symbol s_0_3[2] = { 's', 's' };
static const struct among a_0[4] =
{
/* 0 */ { 1, s_0_0, -1, 3, 0},
/* 1 */ { 3, s_0_1, 0, 2, 0},
/* 2 */ { 4, s_0_2, 0, 1, 0},
/* 3 */ { 2, s_0_3, 0, -1, 0}
};
static const symbol s_1_1[2] = { 'b', 'b' };
static const symbol s_1_2[2] = { 'd', 'd' };
static const symbol s_1_3[2] = { 'f', 'f' };
static const symbol s_1_4[2] = { 'g', 'g' };
static const symbol s_1_5[2] = { 'b', 'l' };
static const symbol s_1_6[2] = { 'm', 'm' };
static const symbol s_1_7[2] = { 'n', 'n' };
static const symbol s_1_8[2] = { 'p', 'p' };
static const symbol s_1_9[2] = { 'r', 'r' };
static const symbol s_1_10[2] = { 'a', 't' };
static const symbol s_1_11[2] = { 't', 't' };
static const symbol s_1_12[2] = { 'i', 'z' };
static const struct among a_1[13] =
{
/* 0 */ { 0, 0, -1, 3, 0},
/* 1 */ { 2, s_1_1, 0, 2, 0},
/* 2 */ { 2, s_1_2, 0, 2, 0},
/* 3 */ { 2, s_1_3, 0, 2, 0},
/* 4 */ { 2, s_1_4, 0, 2, 0},
/* 5 */ { 2, s_1_5, 0, 1, 0},
/* 6 */ { 2, s_1_6, 0, 2, 0},
/* 7 */ { 2, s_1_7, 0, 2, 0},
/* 8 */ { 2, s_1_8, 0, 2, 0},
/* 9 */ { 2, s_1_9, 0, 2, 0},
/* 10 */ { 2, s_1_10, 0, 1, 0},
/* 11 */ { 2, s_1_11, 0, 2, 0},
/* 12 */ { 2, s_1_12, 0, 1, 0}
};
static const symbol s_2_0[2] = { 'e', 'd' };
static const symbol s_2_1[3] = { 'e', 'e', 'd' };
static const symbol s_2_2[3] = { 'i', 'n', 'g' };
static const struct among a_2[3] =
{
/* 0 */ { 2, s_2_0, -1, 2, 0},
/* 1 */ { 3, s_2_1, 0, 1, 0},
/* 2 */ { 3, s_2_2, -1, 2, 0}
};
static const symbol s_3_0[4] = { 'a', 'n', 'c', 'i' };
static const symbol s_3_1[4] = { 'e', 'n', 'c', 'i' };
static const symbol s_3_2[4] = { 'a', 'b', 'l', 'i' };
static const symbol s_3_3[3] = { 'e', 'l', 'i' };
static const symbol s_3_4[4] = { 'a', 'l', 'l', 'i' };
static const symbol s_3_5[5] = { 'o', 'u', 's', 'l', 'i' };
static const symbol s_3_6[5] = { 'e', 'n', 't', 'l', 'i' };
static const symbol s_3_7[5] = { 'a', 'l', 'i', 't', 'i' };
static const symbol s_3_8[6] = { 'b', 'i', 'l', 'i', 't', 'i' };
static const symbol s_3_9[5] = { 'i', 'v', 'i', 't', 'i' };
static const symbol s_3_10[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
static const symbol s_3_11[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
static const symbol s_3_12[5] = { 'a', 'l', 'i', 's', 'm' };
static const symbol s_3_13[5] = { 'a', 't', 'i', 'o', 'n' };
static const symbol s_3_14[7] = { 'i', 'z', 'a', 't', 'i', 'o', 'n' };
static const symbol s_3_15[4] = { 'i', 'z', 'e', 'r' };
static const symbol s_3_16[4] = { 'a', 't', 'o', 'r' };
static const symbol s_3_17[7] = { 'i', 'v', 'e', 'n', 'e', 's', 's' };
static const symbol s_3_18[7] = { 'f', 'u', 'l', 'n', 'e', 's', 's' };
static const symbol s_3_19[7] = { 'o', 'u', 's', 'n', 'e', 's', 's' };
static const struct among a_3[20] =
{
/* 0 */ { 4, s_3_0, -1, 3, 0},
/* 1 */ { 4, s_3_1, -1, 2, 0},
/* 2 */ { 4, s_3_2, -1, 4, 0},
/* 3 */ { 3, s_3_3, -1, 6, 0},
/* 4 */ { 4, s_3_4, -1, 9, 0},
/* 5 */ { 5, s_3_5, -1, 12, 0},
/* 6 */ { 5, s_3_6, -1, 5, 0},
/* 7 */ { 5, s_3_7, -1, 10, 0},
/* 8 */ { 6, s_3_8, -1, 14, 0},
/* 9 */ { 5, s_3_9, -1, 13, 0},
/* 10 */ { 6, s_3_10, -1, 1, 0},
/* 11 */ { 7, s_3_11, 10, 8, 0},
/* 12 */ { 5, s_3_12, -1, 10, 0},
/* 13 */ { 5, s_3_13, -1, 8, 0},
/* 14 */ { 7, s_3_14, 13, 7, 0},
/* 15 */ { 4, s_3_15, -1, 7, 0},
/* 16 */ { 4, s_3_16, -1, 8, 0},
/* 17 */ { 7, s_3_17, -1, 13, 0},
/* 18 */ { 7, s_3_18, -1, 11, 0},
/* 19 */ { 7, s_3_19, -1, 12, 0}
};
static const symbol s_4_0[5] = { 'i', 'c', 'a', 't', 'e' };
static const symbol s_4_1[5] = { 'a', 't', 'i', 'v', 'e' };
static const symbol s_4_2[5] = { 'a', 'l', 'i', 'z', 'e' };
static const symbol s_4_3[5] = { 'i', 'c', 'i', 't', 'i' };
static const symbol s_4_4[4] = { 'i', 'c', 'a', 'l' };
static const symbol s_4_5[3] = { 'f', 'u', 'l' };
static const symbol s_4_6[4] = { 'n', 'e', 's', 's' };
static const struct among a_4[7] =
{
/* 0 */ { 5, s_4_0, -1, 2, 0},
/* 1 */ { 5, s_4_1, -1, 3, 0},
/* 2 */ { 5, s_4_2, -1, 1, 0},
/* 3 */ { 5, s_4_3, -1, 2, 0},
/* 4 */ { 4, s_4_4, -1, 2, 0},
/* 5 */ { 3, s_4_5, -1, 3, 0},
/* 6 */ { 4, s_4_6, -1, 3, 0}
};
static const symbol s_5_0[2] = { 'i', 'c' };
static const symbol s_5_1[4] = { 'a', 'n', 'c', 'e' };
static const symbol s_5_2[4] = { 'e', 'n', 'c', 'e' };
static const symbol s_5_3[4] = { 'a', 'b', 'l', 'e' };
static const symbol s_5_4[4] = { 'i', 'b', 'l', 'e' };
static const symbol s_5_5[3] = { 'a', 't', 'e' };
static const symbol s_5_6[3] = { 'i', 'v', 'e' };
static const symbol s_5_7[3] = { 'i', 'z', 'e' };
static const symbol s_5_8[3] = { 'i', 't', 'i' };
static const symbol s_5_9[2] = { 'a', 'l' };
static const symbol s_5_10[3] = { 'i', 's', 'm' };
static const symbol s_5_11[3] = { 'i', 'o', 'n' };
static const symbol s_5_12[2] = { 'e', 'r' };
static const symbol s_5_13[3] = { 'o', 'u', 's' };
static const symbol s_5_14[3] = { 'a', 'n', 't' };
static const symbol s_5_15[3] = { 'e', 'n', 't' };
static const symbol s_5_16[4] = { 'm', 'e', 'n', 't' };
static const symbol s_5_17[5] = { 'e', 'm', 'e', 'n', 't' };
static const symbol s_5_18[2] = { 'o', 'u' };
static const struct among a_5[19] =
{
/* 0 */ { 2, s_5_0, -1, 1, 0},
/* 1 */ { 4, s_5_1, -1, 1, 0},
/* 2 */ { 4, s_5_2, -1, 1, 0},
/* 3 */ { 4, s_5_3, -1, 1, 0},
/* 4 */ { 4, s_5_4, -1, 1, 0},
/* 5 */ { 3, s_5_5, -1, 1, 0},
/* 6 */ { 3, s_5_6, -1, 1, 0},
/* 7 */ { 3, s_5_7, -1, 1, 0},
/* 8 */ { 3, s_5_8, -1, 1, 0},
/* 9 */ { 2, s_5_9, -1, 1, 0},
/* 10 */ { 3, s_5_10, -1, 1, 0},
/* 11 */ { 3, s_5_11, -1, 2, 0},
/* 12 */ { 2, s_5_12, -1, 1, 0},
/* 13 */ { 3, s_5_13, -1, 1, 0},
/* 14 */ { 3, s_5_14, -1, 1, 0},
/* 15 */ { 3, s_5_15, -1, 1, 0},
/* 16 */ { 4, s_5_16, 15, 1, 0},
/* 17 */ { 5, s_5_17, 16, 1, 0},
/* 18 */ { 2, s_5_18, -1, 1, 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 symbol s_0[] = { 's', 's' };
static const symbol s_1[] = { 'i' };
static const symbol s_2[] = { 'e', 'e' };
static const symbol s_3[] = { 'e' };
static const symbol s_4[] = { 'e' };
static const symbol s_5[] = { 'y' };
static const symbol s_6[] = { 'Y' };
static const symbol s_7[] = { 'i' };
static const symbol s_8[] = { 't', 'i', 'o', 'n' };
static const symbol s_9[] = { 'e', 'n', 'c', 'e' };
static const symbol s_10[] = { 'a', 'n', 'c', 'e' };
static const symbol s_11[] = { 'a', 'b', 'l', 'e' };
static const symbol s_12[] = { 'e', 'n', 't' };
static const symbol s_13[] = { 'e' };
static const symbol s_14[] = { 'i', 'z', 'e' };
static const symbol s_15[] = { 'a', 't', 'e' };
static const symbol s_16[] = { 'a', 'l' };
static const symbol s_17[] = { 'a', 'l' };
static const symbol s_18[] = { 'f', 'u', 'l' };
static const symbol s_19[] = { 'o', 'u', 's' };
static const symbol s_20[] = { 'i', 'v', 'e' };
static const symbol s_21[] = { 'b', 'l', 'e' };
static const symbol s_22[] = { 'a', 'l' };
static const symbol s_23[] = { 'i', 'c' };
static const symbol s_24[] = { 's' };
static const symbol s_25[] = { 't' };
static const symbol s_26[] = { 'e' };
static const symbol s_27[] = { 'l' };
static const symbol s_28[] = { 'l' };
static const symbol s_29[] = { 'y' };
static const symbol s_30[] = { 'Y' };
static const symbol s_31[] = { 'y' };
static const symbol s_32[] = { 'Y' };
static const symbol s_33[] = { 'Y' };
static const symbol s_34[] = { 'y' };
static int r_shortv(struct SN_env * z) {
if (out_grouping_b(z, g_v_WXY, 89, 121, 0)) return 0;
if (in_grouping_b(z, g_v, 97, 121, 0)) return 0;
if (out_grouping_b(z, g_v, 97, 121, 0)) return 0;
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_Step_1a(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 25 */
if (z->c <= z->lb || z->p[z->c - 1] != 115) return 0;
among_var = find_among_b(z, a_0, 4); /* substring, line 25 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 25 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_from_s(z, 2, s_0); /* <-, line 26 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 1, s_1); /* <-, line 27 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z); /* delete, line 29 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_Step_1b(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 34 */
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 103)) return 0;
among_var = find_among_b(z, a_2, 3); /* substring, line 34 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 34 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = r_R1(z);
if (ret == 0) return 0; /* call R1, line 35 */
if (ret < 0) return ret;
}
{ int ret = slice_from_s(z, 2, s_2); /* <-, line 35 */
if (ret < 0) return ret;
}
break;
case 2:
{ int m_test = z->l - z->c; /* test, line 38 */
{ /* gopast */ /* grouping v, line 38 */
int ret = out_grouping_b(z, g_v, 97, 121, 1);
if (ret < 0) return 0;
z->c -= ret;
}
z->c = z->l - m_test;
}
{ int ret = slice_del(z); /* delete, line 38 */
if (ret < 0) return ret;
}
{ int m_test = z->l - z->c; /* test, line 39 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((68514004 >> (z->p[z->c - 1] & 0x1f)) & 1)) among_var = 3; else
among_var = find_among_b(z, a_1, 13); /* substring, line 39 */
if (!(among_var)) return 0;
z->c = z->l - m_test;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int c_keep = z->c;
int ret = insert_s(z, z->c, z->c, 1, s_3); /* <+, line 41 */
z->c = c_keep;
if (ret < 0) return ret;
}
break;
case 2:
z->ket = z->c; /* [, line 44 */
if (z->c <= z->lb) return 0;
z->c--; /* next, line 44 */
z->bra = z->c; /* ], line 44 */
{ int ret = slice_del(z); /* delete, line 44 */
if (ret < 0) return ret;
}
break;
case 3:
if (z->c != z->I[0]) return 0; /* atmark, line 45 */
{ int m_test = z->l - z->c; /* test, line 45 */
{ int ret = r_shortv(z);
if (ret == 0) return 0; /* call shortv, line 45 */
if (ret < 0) return ret;
}
z->c = z->l - m_test;
}
{ int c_keep = z->c;
int ret = insert_s(z, z->c, z->c, 1, s_4); /* <+, line 45 */
z->c = c_keep;
if (ret < 0) return ret;
}
break;
}
break;
}
return 1;
}
static int r_Step_1c(struct SN_env * z) {
z->ket = z->c; /* [, line 52 */
{ int m1 = z->l - z->c; (void)m1; /* or, line 52 */
if (!(eq_s_b(z, 1, s_5))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m1;
if (!(eq_s_b(z, 1, s_6))) return 0;
}
lab0:
z->bra = z->c; /* ], line 52 */
{ /* gopast */ /* grouping v, line 53 */
int ret = out_grouping_b(z, g_v, 97, 121, 1);
if (ret < 0) return 0;
z->c -= ret;
}
{ int ret = slice_from_s(z, 1, s_7); /* <-, line 54 */
if (ret < 0) return ret;
}
return 1;
}
static int r_Step_2(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 58 */
if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((815616 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_3, 20); /* substring, line 58 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 58 */
{ int ret = r_R1(z);
if (ret == 0) return 0; /* call R1, line 58 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_from_s(z, 4, s_8); /* <-, line 59 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 4, s_9); /* <-, line 60 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 4, s_10); /* <-, line 61 */
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 4, s_11); /* <-, line 62 */
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = slice_from_s(z, 3, s_12); /* <-, line 63 */
if (ret < 0) return ret;
}
break;
case 6:
{ int ret = slice_from_s(z, 1, s_13); /* <-, line 64 */
if (ret < 0) return ret;
}
break;
case 7:
{ int ret = slice_from_s(z, 3, s_14); /* <-, line 66 */
if (ret < 0) return ret;
}
break;
case 8:
{ int ret = slice_from_s(z, 3, s_15); /* <-, line 68 */
if (ret < 0) return ret;
}
break;
case 9:
{ int ret = slice_from_s(z, 2, s_16); /* <-, line 69 */
if (ret < 0) return ret;
}
break;
case 10:
{ int ret = slice_from_s(z, 2, s_17); /* <-, line 71 */
if (ret < 0) return ret;
}
break;
case 11:
{ int ret = slice_from_s(z, 3, s_18); /* <-, line 72 */
if (ret < 0) return ret;
}
break;
case 12:
{ int ret = slice_from_s(z, 3, s_19); /* <-, line 74 */
if (ret < 0) return ret;
}
break;
case 13:
{ int ret = slice_from_s(z, 3, s_20); /* <-, line 76 */
if (ret < 0) return ret;
}
break;
case 14:
{ int ret = slice_from_s(z, 3, s_21); /* <-, line 77 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_Step_3(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 82 */
if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((528928 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_4, 7); /* substring, line 82 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 82 */
{ int ret = r_R1(z);
if (ret == 0) return 0; /* call R1, line 82 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_from_s(z, 2, s_22); /* <-, line 83 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 2, s_23); /* <-, line 85 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z); /* delete, line 87 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_Step_4(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 92 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((3961384 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_5, 19); /* substring, line 92 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 92 */
{ int ret = r_R2(z);
if (ret == 0) return 0; /* call R2, line 92 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 95 */
if (ret < 0) return ret;
}
break;
case 2:
{ int m1 = z->l - z->c; (void)m1; /* or, line 96 */
if (!(eq_s_b(z, 1, s_24))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m1;
if (!(eq_s_b(z, 1, s_25))) return 0;
}
lab0:
{ int ret = slice_del(z); /* delete, line 96 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_Step_5a(struct SN_env * z) {
z->ket = z->c; /* [, line 101 */
if (!(eq_s_b(z, 1, s_26))) return 0;
z->bra = z->c; /* ], line 101 */
{ int m1 = z->l - z->c; (void)m1; /* or, line 102 */
{ int ret = r_R2(z);
if (ret == 0) goto lab1; /* call R2, line 102 */
if (ret < 0) return ret;
}
goto lab0;
lab1:
z->c = z->l - m1;
{ int ret = r_R1(z);
if (ret == 0) return 0; /* call R1, line 102 */
if (ret < 0) return ret;
}
{ int m2 = z->l - z->c; (void)m2; /* not, line 102 */
{ int ret = r_shortv(z);
if (ret == 0) goto lab2; /* call shortv, line 102 */
if (ret < 0) return ret;
}
return 0;
lab2:
z->c = z->l - m2;
}
}
lab0:
{ int ret = slice_del(z); /* delete, line 103 */
if (ret < 0) return ret;
}
return 1;
}
static int r_Step_5b(struct SN_env * z) {
z->ket = z->c; /* [, line 107 */
if (!(eq_s_b(z, 1, s_27))) return 0;
z->bra = z->c; /* ], line 107 */
{ int ret = r_R2(z);
if (ret == 0) return 0; /* call R2, line 108 */
if (ret < 0) return ret;
}
if (!(eq_s_b(z, 1, s_28))) return 0;
{ int ret = slice_del(z); /* delete, line 109 */
if (ret < 0) return ret;
}
return 1;
}
extern int porter_ISO_8859_1_stem(struct SN_env * z) {
z->B[0] = 0; /* unset Y_found, line 115 */
{ int c1 = z->c; /* do, line 116 */
z->bra = z->c; /* [, line 116 */
if (!(eq_s(z, 1, s_29))) goto lab0;
z->ket = z->c; /* ], line 116 */
{ int ret = slice_from_s(z, 1, s_30); /* <-, line 116 */
if (ret < 0) return ret;
}
z->B[0] = 1; /* set Y_found, line 116 */
lab0:
z->c = c1;
}
{ int c2 = z->c; /* do, line 117 */
while(1) { /* repeat, line 117 */
int c3 = z->c;
while(1) { /* goto, line 117 */
int c4 = z->c;
if (in_grouping(z, g_v, 97, 121, 0)) goto lab3;
z->bra = z->c; /* [, line 117 */
if (!(eq_s(z, 1, s_31))) goto lab3;
z->ket = z->c; /* ], line 117 */
z->c = c4;
break;
lab3:
z->c = c4;
if (z->c >= z->l) goto lab2;
z->c++; /* goto, line 117 */
}
{ int ret = slice_from_s(z, 1, s_32); /* <-, line 117 */
if (ret < 0) return ret;
}
z->B[0] = 1; /* set Y_found, line 117 */
continue;
lab2:
z->c = c3;
break;
}
z->c = c2;
}
z->I[0] = z->l;
z->I[1] = z->l;
{ int c5 = z->c; /* do, line 121 */
{ /* gopast */ /* grouping v, line 122 */
int ret = out_grouping(z, g_v, 97, 121, 1);
if (ret < 0) goto lab4;
z->c += ret;
}
{ /* gopast */ /* non v, line 122 */
int ret = in_grouping(z, g_v, 97, 121, 1);
if (ret < 0) goto lab4;
z->c += ret;
}
z->I[0] = z->c; /* setmark p1, line 122 */
{ /* gopast */ /* grouping v, line 123 */
int ret = out_grouping(z, g_v, 97, 121, 1);
if (ret < 0) goto lab4;
z->c += ret;
}
{ /* gopast */ /* non v, line 123 */
int ret = in_grouping(z, g_v, 97, 121, 1);
if (ret < 0) goto lab4;
z->c += ret;
}
z->I[1] = z->c; /* setmark p2, line 123 */
lab4:
z->c = c5;
}
z->lb = z->c; z->c = z->l; /* backwards, line 126 */
{ int m6 = z->l - z->c; (void)m6; /* do, line 127 */
{ int ret = r_Step_1a(z);
if (ret == 0) goto lab5; /* call Step_1a, line 127 */
if (ret < 0) return ret;
}
lab5:
z->c = z->l - m6;
}
{ int m7 = z->l - z->c; (void)m7; /* do, line 128 */
{ int ret = r_Step_1b(z);
if (ret == 0) goto lab6; /* call Step_1b, line 128 */
if (ret < 0) return ret;
}
lab6:
z->c = z->l - m7;
}
{ int m8 = z->l - z->c; (void)m8; /* do, line 129 */
{ int ret = r_Step_1c(z);
if (ret == 0) goto lab7; /* call Step_1c, line 129 */
if (ret < 0) return ret;
}
lab7:
z->c = z->l - m8;
}
{ int m9 = z->l - z->c; (void)m9; /* do, line 130 */
{ int ret = r_Step_2(z);
if (ret == 0) goto lab8; /* call Step_2, line 130 */
if (ret < 0) return ret;
}
lab8:
z->c = z->l - m9;
}
{ int m10 = z->l - z->c; (void)m10; /* do, line 131 */
{ int ret = r_Step_3(z);
if (ret == 0) goto lab9; /* call Step_3, line 131 */
if (ret < 0) return ret;
}
lab9:
z->c = z->l - m10;
}
{ int m11 = z->l - z->c; (void)m11; /* do, line 132 */
{ int ret = r_Step_4(z);
if (ret == 0) goto lab10; /* call Step_4, line 132 */
if (ret < 0) return ret;
}
lab10:
z->c = z->l - m11;
}
{ int m12 = z->l - z->c; (void)m12; /* do, line 133 */
{ int ret = r_Step_5a(z);
if (ret == 0) goto lab11; /* call Step_5a, line 133 */
if (ret < 0) return ret;
}
lab11:
z->c = z->l - m12;
}
{ int m13 = z->l - z->c; (void)m13; /* do, line 134 */
{ int ret = r_Step_5b(z);
if (ret == 0) goto lab12; /* call Step_5b, line 134 */
if (ret < 0) return ret;
}
lab12:
z->c = z->l - m13;
}
z->c = z->lb;
{ int c14 = z->c; /* do, line 137 */
if (!(z->B[0])) goto lab13; /* Boolean test Y_found, line 137 */
while(1) { /* repeat, line 137 */
int c15 = z->c;
while(1) { /* goto, line 137 */
int c16 = z->c;
z->bra = z->c; /* [, line 137 */
if (!(eq_s(z, 1, s_33))) goto lab15;
z->ket = z->c; /* ], line 137 */
z->c = c16;
break;
lab15:
z->c = c16;
if (z->c >= z->l) goto lab14;
z->c++; /* goto, line 137 */
}
{ int ret = slice_from_s(z, 1, s_34); /* <-, line 137 */
if (ret < 0) return ret;
}
continue;
lab14:
z->c = c15;
break;
}
lab13:
z->c = c14;
}
return 1;
}
extern struct SN_env * porter_ISO_8859_1_create_env(void) { return SN_create_env(0, 2, 1); }
extern void porter_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,307 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int swedish_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
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 * swedish_ISO_8859_1_create_env(void);
extern void swedish_ISO_8859_1_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[1] = { 'a' };
static const symbol s_0_1[4] = { 'a', 'r', 'n', 'a' };
static const symbol s_0_2[4] = { 'e', 'r', 'n', 'a' };
static const symbol s_0_3[7] = { 'h', 'e', 't', 'e', 'r', 'n', 'a' };
static const symbol s_0_4[4] = { 'o', 'r', 'n', 'a' };
static const symbol s_0_5[2] = { 'a', 'd' };
static const symbol s_0_6[1] = { 'e' };
static const symbol s_0_7[3] = { 'a', 'd', 'e' };
static const symbol s_0_8[4] = { 'a', 'n', 'd', 'e' };
static const symbol s_0_9[4] = { 'a', 'r', 'n', 'e' };
static const symbol s_0_10[3] = { 'a', 'r', 'e' };
static const symbol s_0_11[4] = { 'a', 's', 't', 'e' };
static const symbol s_0_12[2] = { 'e', 'n' };
static const symbol s_0_13[5] = { 'a', 'n', 'd', 'e', 'n' };
static const symbol s_0_14[4] = { 'a', 'r', 'e', 'n' };
static const symbol s_0_15[5] = { 'h', 'e', 't', 'e', 'n' };
static const symbol s_0_16[3] = { 'e', 'r', 'n' };
static const symbol s_0_17[2] = { 'a', 'r' };
static const symbol s_0_18[2] = { 'e', 'r' };
static const symbol s_0_19[5] = { 'h', 'e', 't', 'e', 'r' };
static const symbol s_0_20[2] = { 'o', 'r' };
static const symbol s_0_21[1] = { 's' };
static const symbol s_0_22[2] = { 'a', 's' };
static const symbol s_0_23[5] = { 'a', 'r', 'n', 'a', 's' };
static const symbol s_0_24[5] = { 'e', 'r', 'n', 'a', 's' };
static const symbol s_0_25[5] = { 'o', 'r', 'n', 'a', 's' };
static const symbol s_0_26[2] = { 'e', 's' };
static const symbol s_0_27[4] = { 'a', 'd', 'e', 's' };
static const symbol s_0_28[5] = { 'a', 'n', 'd', 'e', 's' };
static const symbol s_0_29[3] = { 'e', 'n', 's' };
static const symbol s_0_30[5] = { 'a', 'r', 'e', 'n', 's' };
static const symbol s_0_31[6] = { 'h', 'e', 't', 'e', 'n', 's' };
static const symbol s_0_32[4] = { 'e', 'r', 'n', 's' };
static const symbol s_0_33[2] = { 'a', 't' };
static const symbol s_0_34[5] = { 'a', 'n', 'd', 'e', 't' };
static const symbol s_0_35[3] = { 'h', 'e', 't' };
static const symbol s_0_36[3] = { 'a', 's', 't' };
static const struct among a_0[37] =
{
/* 0 */ { 1, s_0_0, -1, 1, 0},
/* 1 */ { 4, s_0_1, 0, 1, 0},
/* 2 */ { 4, s_0_2, 0, 1, 0},
/* 3 */ { 7, s_0_3, 2, 1, 0},
/* 4 */ { 4, s_0_4, 0, 1, 0},
/* 5 */ { 2, s_0_5, -1, 1, 0},
/* 6 */ { 1, s_0_6, -1, 1, 0},
/* 7 */ { 3, s_0_7, 6, 1, 0},
/* 8 */ { 4, s_0_8, 6, 1, 0},
/* 9 */ { 4, s_0_9, 6, 1, 0},
/* 10 */ { 3, s_0_10, 6, 1, 0},
/* 11 */ { 4, s_0_11, 6, 1, 0},
/* 12 */ { 2, s_0_12, -1, 1, 0},
/* 13 */ { 5, s_0_13, 12, 1, 0},
/* 14 */ { 4, s_0_14, 12, 1, 0},
/* 15 */ { 5, s_0_15, 12, 1, 0},
/* 16 */ { 3, s_0_16, -1, 1, 0},
/* 17 */ { 2, s_0_17, -1, 1, 0},
/* 18 */ { 2, s_0_18, -1, 1, 0},
/* 19 */ { 5, s_0_19, 18, 1, 0},
/* 20 */ { 2, s_0_20, -1, 1, 0},
/* 21 */ { 1, s_0_21, -1, 2, 0},
/* 22 */ { 2, s_0_22, 21, 1, 0},
/* 23 */ { 5, s_0_23, 22, 1, 0},
/* 24 */ { 5, s_0_24, 22, 1, 0},
/* 25 */ { 5, s_0_25, 22, 1, 0},
/* 26 */ { 2, s_0_26, 21, 1, 0},
/* 27 */ { 4, s_0_27, 26, 1, 0},
/* 28 */ { 5, s_0_28, 26, 1, 0},
/* 29 */ { 3, s_0_29, 21, 1, 0},
/* 30 */ { 5, s_0_30, 29, 1, 0},
/* 31 */ { 6, s_0_31, 29, 1, 0},
/* 32 */ { 4, s_0_32, 21, 1, 0},
/* 33 */ { 2, s_0_33, -1, 1, 0},
/* 34 */ { 5, s_0_34, -1, 1, 0},
/* 35 */ { 3, s_0_35, -1, 1, 0},
/* 36 */ { 3, s_0_36, -1, 1, 0}
};
static const symbol s_1_0[2] = { 'd', 'd' };
static const symbol s_1_1[2] = { 'g', 'd' };
static const symbol s_1_2[2] = { 'n', 'n' };
static const symbol s_1_3[2] = { 'd', 't' };
static const symbol s_1_4[2] = { 'g', 't' };
static const symbol s_1_5[2] = { 'k', 't' };
static const symbol s_1_6[2] = { 't', 't' };
static const struct among a_1[7] =
{
/* 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},
/* 4 */ { 2, s_1_4, -1, -1, 0},
/* 5 */ { 2, s_1_5, -1, -1, 0},
/* 6 */ { 2, s_1_6, -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[3] = { 'e', 'l', 's' };
static const symbol s_2_3[5] = { 'f', 'u', 'l', 'l', 't' };
static const symbol s_2_4[4] = { 'l', 0xF6, '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 */ { 3, s_2_2, -1, 1, 0},
/* 3 */ { 5, s_2_3, -1, 3, 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, 24, 0, 32 };
static const unsigned char g_s_ending[] = { 119, 127, 149 };
static const symbol s_0[] = { 'l', 0xF6, 's' };
static const symbol s_1[] = { 'f', 'u', 'l', 'l' };
static int r_mark_regions(struct SN_env * z) {
z->I[0] = z->l;
{ int c_test = z->c; /* test, line 29 */
{ int ret = z->c + 3;
if (0 > ret || ret > z->l) return 0;
z->c = ret; /* hop, line 29 */
}
z->I[1] = z->c; /* setmark x, line 29 */
z->c = c_test;
}
if (out_grouping(z, g_v, 97, 246, 1) < 0) return 0; /* goto */ /* grouping v, line 30 */
{ /* gopast */ /* non v, line 30 */
int ret = in_grouping(z, g_v, 97, 246, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[0] = z->c; /* setmark p1, line 30 */
/* try, line 31 */
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 37 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 37 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 37 */
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851442 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
among_var = find_among_b(z, a_0, 37); /* substring, line 37 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 37 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 44 */
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b(z, g_s_ending, 98, 121, 0)) return 0;
{ int ret = slice_del(z); /* delete, line 46 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_consonant_pair(struct SN_env * z) {
{ int mlimit; /* setlimit, line 50 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 50 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
{ int m2 = z->l - z->c; (void)m2; /* and, line 52 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1064976 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
if (!(find_among_b(z, a_1, 7))) { z->lb = mlimit; return 0; } /* among, line 51 */
z->c = z->l - m2;
z->ket = z->c; /* [, line 52 */
if (z->c <= z->lb) { z->lb = mlimit; return 0; }
z->c--; /* next, line 52 */
z->bra = z->c; /* ], line 52 */
{ int ret = slice_del(z); /* delete, line 52 */
if (ret < 0) return ret;
}
}
z->lb = mlimit;
}
return 1;
}
static int r_other_suffix(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 55 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 55 */
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] >> 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 56 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 56 */
switch(among_var) {
case 0: { z->lb = mlimit; return 0; }
case 1:
{ int ret = slice_del(z); /* delete, line 57 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 3, s_0); /* <-, line 58 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 4, s_1); /* <-, line 59 */
if (ret < 0) return ret;
}
break;
}
z->lb = mlimit;
}
return 1;
}
extern int swedish_ISO_8859_1_stem(struct SN_env * z) {
{ int c1 = z->c; /* do, line 66 */
{ int ret = r_mark_regions(z);
if (ret == 0) goto lab0; /* call mark_regions, line 66 */
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->lb = z->c; z->c = z->l; /* backwards, line 67 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 68 */
{ int ret = r_main_suffix(z);
if (ret == 0) goto lab1; /* call main_suffix, line 68 */
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 69 */
{ int ret = r_consonant_pair(z);
if (ret == 0) goto lab2; /* call consonant_pair, line 69 */
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 70 */
{ int ret = r_other_suffix(z);
if (ret == 0) goto lab3; /* call other_suffix, line 70 */
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * swedish_ISO_8859_1_create_env(void) { return SN_create_env(0, 2, 0); }
extern void swedish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }

View File

@ -0,0 +1,998 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int romanian_ISO_8859_2_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_vowel_suffix(struct SN_env * z);
static int r_verb_suffix(struct SN_env * z);
static int r_combo_suffix(struct SN_env * z);
static int r_standard_suffix(struct SN_env * z);
static int r_step_0(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_R1(struct SN_env * z);
static int r_RV(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 * romanian_ISO_8859_2_create_env(void);
extern void romanian_ISO_8859_2_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_1[1] = { 'I' };
static const symbol s_0_2[1] = { 'U' };
static const struct among a_0[3] =
{
/* 0 */ { 0, 0, -1, 3, 0},
/* 1 */ { 1, s_0_1, 0, 1, 0},
/* 2 */ { 1, s_0_2, 0, 2, 0}
};
static const symbol s_1_0[2] = { 'e', 'a' };
static const symbol s_1_1[4] = { 'a', 0xFE, 'i', 'a' };
static const symbol s_1_2[3] = { 'a', 'u', 'a' };
static const symbol s_1_3[3] = { 'i', 'u', 'a' };
static const symbol s_1_4[4] = { 'a', 0xFE, 'i', 'e' };
static const symbol s_1_5[3] = { 'e', 'l', 'e' };
static const symbol s_1_6[3] = { 'i', 'l', 'e' };
static const symbol s_1_7[4] = { 'i', 'i', 'l', 'e' };
static const symbol s_1_8[3] = { 'i', 'e', 'i' };
static const symbol s_1_9[4] = { 'a', 't', 'e', 'i' };
static const symbol s_1_10[2] = { 'i', 'i' };
static const symbol s_1_11[4] = { 'u', 'l', 'u', 'i' };
static const symbol s_1_12[2] = { 'u', 'l' };
static const symbol s_1_13[4] = { 'e', 'l', 'o', 'r' };
static const symbol s_1_14[4] = { 'i', 'l', 'o', 'r' };
static const symbol s_1_15[5] = { 'i', 'i', 'l', 'o', 'r' };
static const struct among a_1[16] =
{
/* 0 */ { 2, s_1_0, -1, 3, 0},
/* 1 */ { 4, s_1_1, -1, 7, 0},
/* 2 */ { 3, s_1_2, -1, 2, 0},
/* 3 */ { 3, s_1_3, -1, 4, 0},
/* 4 */ { 4, s_1_4, -1, 7, 0},
/* 5 */ { 3, s_1_5, -1, 3, 0},
/* 6 */ { 3, s_1_6, -1, 5, 0},
/* 7 */ { 4, s_1_7, 6, 4, 0},
/* 8 */ { 3, s_1_8, -1, 4, 0},
/* 9 */ { 4, s_1_9, -1, 6, 0},
/* 10 */ { 2, s_1_10, -1, 4, 0},
/* 11 */ { 4, s_1_11, -1, 1, 0},
/* 12 */ { 2, s_1_12, -1, 1, 0},
/* 13 */ { 4, s_1_13, -1, 3, 0},
/* 14 */ { 4, s_1_14, -1, 4, 0},
/* 15 */ { 5, s_1_15, 14, 4, 0}
};
static const symbol s_2_0[5] = { 'i', 'c', 'a', 'l', 'a' };
static const symbol s_2_1[5] = { 'i', 'c', 'i', 'v', 'a' };
static const symbol s_2_2[5] = { 'a', 't', 'i', 'v', 'a' };
static const symbol s_2_3[5] = { 'i', 't', 'i', 'v', 'a' };
static const symbol s_2_4[5] = { 'i', 'c', 'a', 'l', 'e' };
static const symbol s_2_5[6] = { 'a', 0xFE, 'i', 'u', 'n', 'e' };
static const symbol s_2_6[6] = { 'i', 0xFE, 'i', 'u', 'n', 'e' };
static const symbol s_2_7[6] = { 'a', 't', 'o', 'a', 'r', 'e' };
static const symbol s_2_8[6] = { 'i', 't', 'o', 'a', 'r', 'e' };
static const symbol s_2_9[6] = { 0xE3, 't', 'o', 'a', 'r', 'e' };
static const symbol s_2_10[7] = { 'i', 'c', 'i', 't', 'a', 't', 'e' };
static const symbol s_2_11[9] = { 'a', 'b', 'i', 'l', 'i', 't', 'a', 't', 'e' };
static const symbol s_2_12[9] = { 'i', 'b', 'i', 'l', 'i', 't', 'a', 't', 'e' };
static const symbol s_2_13[7] = { 'i', 'v', 'i', 't', 'a', 't', 'e' };
static const symbol s_2_14[5] = { 'i', 'c', 'i', 'v', 'e' };
static const symbol s_2_15[5] = { 'a', 't', 'i', 'v', 'e' };
static const symbol s_2_16[5] = { 'i', 't', 'i', 'v', 'e' };
static const symbol s_2_17[5] = { 'i', 'c', 'a', 'l', 'i' };
static const symbol s_2_18[5] = { 'a', 't', 'o', 'r', 'i' };
static const symbol s_2_19[7] = { 'i', 'c', 'a', 't', 'o', 'r', 'i' };
static const symbol s_2_20[5] = { 'i', 't', 'o', 'r', 'i' };
static const symbol s_2_21[5] = { 0xE3, 't', 'o', 'r', 'i' };
static const symbol s_2_22[7] = { 'i', 'c', 'i', 't', 'a', 't', 'i' };
static const symbol s_2_23[9] = { 'a', 'b', 'i', 'l', 'i', 't', 'a', 't', 'i' };
static const symbol s_2_24[7] = { 'i', 'v', 'i', 't', 'a', 't', 'i' };
static const symbol s_2_25[5] = { 'i', 'c', 'i', 'v', 'i' };
static const symbol s_2_26[5] = { 'a', 't', 'i', 'v', 'i' };
static const symbol s_2_27[5] = { 'i', 't', 'i', 'v', 'i' };
static const symbol s_2_28[6] = { 'i', 'c', 'i', 't', 0xE3, 'i' };
static const symbol s_2_29[8] = { 'a', 'b', 'i', 'l', 'i', 't', 0xE3, 'i' };
static const symbol s_2_30[6] = { 'i', 'v', 'i', 't', 0xE3, 'i' };
static const symbol s_2_31[7] = { 'i', 'c', 'i', 't', 0xE3, 0xFE, 'i' };
static const symbol s_2_32[9] = { 'a', 'b', 'i', 'l', 'i', 't', 0xE3, 0xFE, 'i' };
static const symbol s_2_33[7] = { 'i', 'v', 'i', 't', 0xE3, 0xFE, 'i' };
static const symbol s_2_34[4] = { 'i', 'c', 'a', 'l' };
static const symbol s_2_35[4] = { 'a', 't', 'o', 'r' };
static const symbol s_2_36[6] = { 'i', 'c', 'a', 't', 'o', 'r' };
static const symbol s_2_37[4] = { 'i', 't', 'o', 'r' };
static const symbol s_2_38[4] = { 0xE3, 't', 'o', 'r' };
static const symbol s_2_39[4] = { 'i', 'c', 'i', 'v' };
static const symbol s_2_40[4] = { 'a', 't', 'i', 'v' };
static const symbol s_2_41[4] = { 'i', 't', 'i', 'v' };
static const symbol s_2_42[5] = { 'i', 'c', 'a', 'l', 0xE3 };
static const symbol s_2_43[5] = { 'i', 'c', 'i', 'v', 0xE3 };
static const symbol s_2_44[5] = { 'a', 't', 'i', 'v', 0xE3 };
static const symbol s_2_45[5] = { 'i', 't', 'i', 'v', 0xE3 };
static const struct among a_2[46] =
{
/* 0 */ { 5, s_2_0, -1, 4, 0},
/* 1 */ { 5, s_2_1, -1, 4, 0},
/* 2 */ { 5, s_2_2, -1, 5, 0},
/* 3 */ { 5, s_2_3, -1, 6, 0},
/* 4 */ { 5, s_2_4, -1, 4, 0},
/* 5 */ { 6, s_2_5, -1, 5, 0},
/* 6 */ { 6, s_2_6, -1, 6, 0},
/* 7 */ { 6, s_2_7, -1, 5, 0},
/* 8 */ { 6, s_2_8, -1, 6, 0},
/* 9 */ { 6, s_2_9, -1, 5, 0},
/* 10 */ { 7, s_2_10, -1, 4, 0},
/* 11 */ { 9, s_2_11, -1, 1, 0},
/* 12 */ { 9, s_2_12, -1, 2, 0},
/* 13 */ { 7, s_2_13, -1, 3, 0},
/* 14 */ { 5, s_2_14, -1, 4, 0},
/* 15 */ { 5, s_2_15, -1, 5, 0},
/* 16 */ { 5, s_2_16, -1, 6, 0},
/* 17 */ { 5, s_2_17, -1, 4, 0},
/* 18 */ { 5, s_2_18, -1, 5, 0},
/* 19 */ { 7, s_2_19, 18, 4, 0},
/* 20 */ { 5, s_2_20, -1, 6, 0},
/* 21 */ { 5, s_2_21, -1, 5, 0},
/* 22 */ { 7, s_2_22, -1, 4, 0},
/* 23 */ { 9, s_2_23, -1, 1, 0},
/* 24 */ { 7, s_2_24, -1, 3, 0},
/* 25 */ { 5, s_2_25, -1, 4, 0},
/* 26 */ { 5, s_2_26, -1, 5, 0},
/* 27 */ { 5, s_2_27, -1, 6, 0},
/* 28 */ { 6, s_2_28, -1, 4, 0},
/* 29 */ { 8, s_2_29, -1, 1, 0},
/* 30 */ { 6, s_2_30, -1, 3, 0},
/* 31 */ { 7, s_2_31, -1, 4, 0},
/* 32 */ { 9, s_2_32, -1, 1, 0},
/* 33 */ { 7, s_2_33, -1, 3, 0},
/* 34 */ { 4, s_2_34, -1, 4, 0},
/* 35 */ { 4, s_2_35, -1, 5, 0},
/* 36 */ { 6, s_2_36, 35, 4, 0},
/* 37 */ { 4, s_2_37, -1, 6, 0},
/* 38 */ { 4, s_2_38, -1, 5, 0},
/* 39 */ { 4, s_2_39, -1, 4, 0},
/* 40 */ { 4, s_2_40, -1, 5, 0},
/* 41 */ { 4, s_2_41, -1, 6, 0},
/* 42 */ { 5, s_2_42, -1, 4, 0},
/* 43 */ { 5, s_2_43, -1, 4, 0},
/* 44 */ { 5, s_2_44, -1, 5, 0},
/* 45 */ { 5, s_2_45, -1, 6, 0}
};
static const symbol s_3_0[3] = { 'i', 'c', 'a' };
static const symbol s_3_1[5] = { 'a', 'b', 'i', 'l', 'a' };
static const symbol s_3_2[5] = { 'i', 'b', 'i', 'l', 'a' };
static const symbol s_3_3[4] = { 'o', 'a', 's', 'a' };
static const symbol s_3_4[3] = { 'a', 't', 'a' };
static const symbol s_3_5[3] = { 'i', 't', 'a' };
static const symbol s_3_6[4] = { 'a', 'n', 't', 'a' };
static const symbol s_3_7[4] = { 'i', 's', 't', 'a' };
static const symbol s_3_8[3] = { 'u', 't', 'a' };
static const symbol s_3_9[3] = { 'i', 'v', 'a' };
static const symbol s_3_10[2] = { 'i', 'c' };
static const symbol s_3_11[3] = { 'i', 'c', 'e' };
static const symbol s_3_12[5] = { 'a', 'b', 'i', 'l', 'e' };
static const symbol s_3_13[5] = { 'i', 'b', 'i', 'l', 'e' };
static const symbol s_3_14[4] = { 'i', 's', 'm', 'e' };
static const symbol s_3_15[4] = { 'i', 'u', 'n', 'e' };
static const symbol s_3_16[4] = { 'o', 'a', 's', 'e' };
static const symbol s_3_17[3] = { 'a', 't', 'e' };
static const symbol s_3_18[5] = { 'i', 't', 'a', 't', 'e' };
static const symbol s_3_19[3] = { 'i', 't', 'e' };
static const symbol s_3_20[4] = { 'a', 'n', 't', 'e' };
static const symbol s_3_21[4] = { 'i', 's', 't', 'e' };
static const symbol s_3_22[3] = { 'u', 't', 'e' };
static const symbol s_3_23[3] = { 'i', 'v', 'e' };
static const symbol s_3_24[3] = { 'i', 'c', 'i' };
static const symbol s_3_25[5] = { 'a', 'b', 'i', 'l', 'i' };
static const symbol s_3_26[5] = { 'i', 'b', 'i', 'l', 'i' };
static const symbol s_3_27[4] = { 'i', 'u', 'n', 'i' };
static const symbol s_3_28[5] = { 'a', 't', 'o', 'r', 'i' };
static const symbol s_3_29[3] = { 'o', 's', 'i' };
static const symbol s_3_30[3] = { 'a', 't', 'i' };
static const symbol s_3_31[5] = { 'i', 't', 'a', 't', 'i' };
static const symbol s_3_32[3] = { 'i', 't', 'i' };
static const symbol s_3_33[4] = { 'a', 'n', 't', 'i' };
static const symbol s_3_34[4] = { 'i', 's', 't', 'i' };
static const symbol s_3_35[3] = { 'u', 't', 'i' };
static const symbol s_3_36[4] = { 'i', 0xBA, 't', 'i' };
static const symbol s_3_37[3] = { 'i', 'v', 'i' };
static const symbol s_3_38[3] = { 'o', 0xBA, 'i' };
static const symbol s_3_39[4] = { 'i', 't', 0xE3, 'i' };
static const symbol s_3_40[5] = { 'i', 't', 0xE3, 0xFE, 'i' };
static const symbol s_3_41[4] = { 'a', 'b', 'i', 'l' };
static const symbol s_3_42[4] = { 'i', 'b', 'i', 'l' };
static const symbol s_3_43[3] = { 'i', 's', 'm' };
static const symbol s_3_44[4] = { 'a', 't', 'o', 'r' };
static const symbol s_3_45[2] = { 'o', 's' };
static const symbol s_3_46[2] = { 'a', 't' };
static const symbol s_3_47[2] = { 'i', 't' };
static const symbol s_3_48[3] = { 'a', 'n', 't' };
static const symbol s_3_49[3] = { 'i', 's', 't' };
static const symbol s_3_50[2] = { 'u', 't' };
static const symbol s_3_51[2] = { 'i', 'v' };
static const symbol s_3_52[3] = { 'i', 'c', 0xE3 };
static const symbol s_3_53[5] = { 'a', 'b', 'i', 'l', 0xE3 };
static const symbol s_3_54[5] = { 'i', 'b', 'i', 'l', 0xE3 };
static const symbol s_3_55[4] = { 'o', 'a', 's', 0xE3 };
static const symbol s_3_56[3] = { 'a', 't', 0xE3 };
static const symbol s_3_57[3] = { 'i', 't', 0xE3 };
static const symbol s_3_58[4] = { 'a', 'n', 't', 0xE3 };
static const symbol s_3_59[4] = { 'i', 's', 't', 0xE3 };
static const symbol s_3_60[3] = { 'u', 't', 0xE3 };
static const symbol s_3_61[3] = { 'i', 'v', 0xE3 };
static const struct among a_3[62] =
{
/* 0 */ { 3, s_3_0, -1, 1, 0},
/* 1 */ { 5, s_3_1, -1, 1, 0},
/* 2 */ { 5, s_3_2, -1, 1, 0},
/* 3 */ { 4, s_3_3, -1, 1, 0},
/* 4 */ { 3, s_3_4, -1, 1, 0},
/* 5 */ { 3, s_3_5, -1, 1, 0},
/* 6 */ { 4, s_3_6, -1, 1, 0},
/* 7 */ { 4, s_3_7, -1, 3, 0},
/* 8 */ { 3, s_3_8, -1, 1, 0},
/* 9 */ { 3, s_3_9, -1, 1, 0},
/* 10 */ { 2, s_3_10, -1, 1, 0},
/* 11 */ { 3, s_3_11, -1, 1, 0},
/* 12 */ { 5, s_3_12, -1, 1, 0},
/* 13 */ { 5, s_3_13, -1, 1, 0},
/* 14 */ { 4, s_3_14, -1, 3, 0},
/* 15 */ { 4, s_3_15, -1, 2, 0},
/* 16 */ { 4, s_3_16, -1, 1, 0},
/* 17 */ { 3, s_3_17, -1, 1, 0},
/* 18 */ { 5, s_3_18, 17, 1, 0},
/* 19 */ { 3, s_3_19, -1, 1, 0},
/* 20 */ { 4, s_3_20, -1, 1, 0},
/* 21 */ { 4, s_3_21, -1, 3, 0},
/* 22 */ { 3, s_3_22, -1, 1, 0},
/* 23 */ { 3, s_3_23, -1, 1, 0},
/* 24 */ { 3, s_3_24, -1, 1, 0},
/* 25 */ { 5, s_3_25, -1, 1, 0},
/* 26 */ { 5, s_3_26, -1, 1, 0},
/* 27 */ { 4, s_3_27, -1, 2, 0},
/* 28 */ { 5, s_3_28, -1, 1, 0},
/* 29 */ { 3, s_3_29, -1, 1, 0},
/* 30 */ { 3, s_3_30, -1, 1, 0},
/* 31 */ { 5, s_3_31, 30, 1, 0},
/* 32 */ { 3, s_3_32, -1, 1, 0},
/* 33 */ { 4, s_3_33, -1, 1, 0},
/* 34 */ { 4, s_3_34, -1, 3, 0},
/* 35 */ { 3, s_3_35, -1, 1, 0},
/* 36 */ { 4, s_3_36, -1, 3, 0},
/* 37 */ { 3, s_3_37, -1, 1, 0},
/* 38 */ { 3, s_3_38, -1, 1, 0},
/* 39 */ { 4, s_3_39, -1, 1, 0},
/* 40 */ { 5, s_3_40, -1, 1, 0},
/* 41 */ { 4, s_3_41, -1, 1, 0},
/* 42 */ { 4, s_3_42, -1, 1, 0},
/* 43 */ { 3, s_3_43, -1, 3, 0},
/* 44 */ { 4, s_3_44, -1, 1, 0},
/* 45 */ { 2, s_3_45, -1, 1, 0},
/* 46 */ { 2, s_3_46, -1, 1, 0},
/* 47 */ { 2, s_3_47, -1, 1, 0},
/* 48 */ { 3, s_3_48, -1, 1, 0},
/* 49 */ { 3, s_3_49, -1, 3, 0},
/* 50 */ { 2, s_3_50, -1, 1, 0},
/* 51 */ { 2, s_3_51, -1, 1, 0},
/* 52 */ { 3, s_3_52, -1, 1, 0},
/* 53 */ { 5, s_3_53, -1, 1, 0},
/* 54 */ { 5, s_3_54, -1, 1, 0},
/* 55 */ { 4, s_3_55, -1, 1, 0},
/* 56 */ { 3, s_3_56, -1, 1, 0},
/* 57 */ { 3, s_3_57, -1, 1, 0},
/* 58 */ { 4, s_3_58, -1, 1, 0},
/* 59 */ { 4, s_3_59, -1, 3, 0},
/* 60 */ { 3, s_3_60, -1, 1, 0},
/* 61 */ { 3, s_3_61, -1, 1, 0}
};
static const symbol s_4_0[2] = { 'e', 'a' };
static const symbol s_4_1[2] = { 'i', 'a' };
static const symbol s_4_2[3] = { 'e', 's', 'c' };
static const symbol s_4_3[3] = { 0xE3, 's', 'c' };
static const symbol s_4_4[3] = { 'i', 'n', 'd' };
static const symbol s_4_5[3] = { 0xE2, 'n', 'd' };
static const symbol s_4_6[3] = { 'a', 'r', 'e' };
static const symbol s_4_7[3] = { 'e', 'r', 'e' };
static const symbol s_4_8[3] = { 'i', 'r', 'e' };
static const symbol s_4_9[3] = { 0xE2, 'r', 'e' };
static const symbol s_4_10[2] = { 's', 'e' };
static const symbol s_4_11[3] = { 'a', 's', 'e' };
static const symbol s_4_12[4] = { 's', 'e', 's', 'e' };
static const symbol s_4_13[3] = { 'i', 's', 'e' };
static const symbol s_4_14[3] = { 'u', 's', 'e' };
static const symbol s_4_15[3] = { 0xE2, 's', 'e' };
static const symbol s_4_16[4] = { 'e', 0xBA, 't', 'e' };
static const symbol s_4_17[4] = { 0xE3, 0xBA, 't', 'e' };
static const symbol s_4_18[3] = { 'e', 'z', 'e' };
static const symbol s_4_19[2] = { 'a', 'i' };
static const symbol s_4_20[3] = { 'e', 'a', 'i' };
static const symbol s_4_21[3] = { 'i', 'a', 'i' };
static const symbol s_4_22[3] = { 's', 'e', 'i' };
static const symbol s_4_23[4] = { 'e', 0xBA, 't', 'i' };
static const symbol s_4_24[4] = { 0xE3, 0xBA, 't', 'i' };
static const symbol s_4_25[2] = { 'u', 'i' };
static const symbol s_4_26[3] = { 'e', 'z', 'i' };
static const symbol s_4_27[3] = { 'a', 0xBA, 'i' };
static const symbol s_4_28[4] = { 's', 'e', 0xBA, 'i' };
static const symbol s_4_29[5] = { 'a', 's', 'e', 0xBA, 'i' };
static const symbol s_4_30[6] = { 's', 'e', 's', 'e', 0xBA, 'i' };
static const symbol s_4_31[5] = { 'i', 's', 'e', 0xBA, 'i' };
static const symbol s_4_32[5] = { 'u', 's', 'e', 0xBA, 'i' };
static const symbol s_4_33[5] = { 0xE2, 's', 'e', 0xBA, 'i' };
static const symbol s_4_34[3] = { 'i', 0xBA, 'i' };
static const symbol s_4_35[3] = { 'u', 0xBA, 'i' };
static const symbol s_4_36[3] = { 0xE2, 0xBA, 'i' };
static const symbol s_4_37[2] = { 0xE2, 'i' };
static const symbol s_4_38[3] = { 'a', 0xFE, 'i' };
static const symbol s_4_39[4] = { 'e', 'a', 0xFE, 'i' };
static const symbol s_4_40[4] = { 'i', 'a', 0xFE, 'i' };
static const symbol s_4_41[3] = { 'e', 0xFE, 'i' };
static const symbol s_4_42[3] = { 'i', 0xFE, 'i' };
static const symbol s_4_43[3] = { 0xE2, 0xFE, 'i' };
static const symbol s_4_44[5] = { 'a', 'r', 0xE3, 0xFE, 'i' };
static const symbol s_4_45[6] = { 's', 'e', 'r', 0xE3, 0xFE, 'i' };
static const symbol s_4_46[7] = { 'a', 's', 'e', 'r', 0xE3, 0xFE, 'i' };
static const symbol s_4_47[8] = { 's', 'e', 's', 'e', 'r', 0xE3, 0xFE, 'i' };
static const symbol s_4_48[7] = { 'i', 's', 'e', 'r', 0xE3, 0xFE, 'i' };
static const symbol s_4_49[7] = { 'u', 's', 'e', 'r', 0xE3, 0xFE, 'i' };
static const symbol s_4_50[7] = { 0xE2, 's', 'e', 'r', 0xE3, 0xFE, 'i' };
static const symbol s_4_51[5] = { 'i', 'r', 0xE3, 0xFE, 'i' };
static const symbol s_4_52[5] = { 'u', 'r', 0xE3, 0xFE, 'i' };
static const symbol s_4_53[5] = { 0xE2, 'r', 0xE3, 0xFE, 'i' };
static const symbol s_4_54[2] = { 'a', 'm' };
static const symbol s_4_55[3] = { 'e', 'a', 'm' };
static const symbol s_4_56[3] = { 'i', 'a', 'm' };
static const symbol s_4_57[2] = { 'e', 'm' };
static const symbol s_4_58[4] = { 'a', 's', 'e', 'm' };
static const symbol s_4_59[5] = { 's', 'e', 's', 'e', 'm' };
static const symbol s_4_60[4] = { 'i', 's', 'e', 'm' };
static const symbol s_4_61[4] = { 'u', 's', 'e', 'm' };
static const symbol s_4_62[4] = { 0xE2, 's', 'e', 'm' };
static const symbol s_4_63[2] = { 'i', 'm' };
static const symbol s_4_64[2] = { 0xE2, 'm' };
static const symbol s_4_65[2] = { 0xE3, 'm' };
static const symbol s_4_66[4] = { 'a', 'r', 0xE3, 'm' };
static const symbol s_4_67[5] = { 's', 'e', 'r', 0xE3, 'm' };
static const symbol s_4_68[6] = { 'a', 's', 'e', 'r', 0xE3, 'm' };
static const symbol s_4_69[7] = { 's', 'e', 's', 'e', 'r', 0xE3, 'm' };
static const symbol s_4_70[6] = { 'i', 's', 'e', 'r', 0xE3, 'm' };
static const symbol s_4_71[6] = { 'u', 's', 'e', 'r', 0xE3, 'm' };
static const symbol s_4_72[6] = { 0xE2, 's', 'e', 'r', 0xE3, 'm' };
static const symbol s_4_73[4] = { 'i', 'r', 0xE3, 'm' };
static const symbol s_4_74[4] = { 'u', 'r', 0xE3, 'm' };
static const symbol s_4_75[4] = { 0xE2, 'r', 0xE3, 'm' };
static const symbol s_4_76[2] = { 'a', 'u' };
static const symbol s_4_77[3] = { 'e', 'a', 'u' };
static const symbol s_4_78[3] = { 'i', 'a', 'u' };
static const symbol s_4_79[4] = { 'i', 'n', 'd', 'u' };
static const symbol s_4_80[4] = { 0xE2, 'n', 'd', 'u' };
static const symbol s_4_81[2] = { 'e', 'z' };
static const symbol s_4_82[5] = { 'e', 'a', 's', 'c', 0xE3 };
static const symbol s_4_83[3] = { 'a', 'r', 0xE3 };
static const symbol s_4_84[4] = { 's', 'e', 'r', 0xE3 };
static const symbol s_4_85[5] = { 'a', 's', 'e', 'r', 0xE3 };
static const symbol s_4_86[6] = { 's', 'e', 's', 'e', 'r', 0xE3 };
static const symbol s_4_87[5] = { 'i', 's', 'e', 'r', 0xE3 };
static const symbol s_4_88[5] = { 'u', 's', 'e', 'r', 0xE3 };
static const symbol s_4_89[5] = { 0xE2, 's', 'e', 'r', 0xE3 };
static const symbol s_4_90[3] = { 'i', 'r', 0xE3 };
static const symbol s_4_91[3] = { 'u', 'r', 0xE3 };
static const symbol s_4_92[3] = { 0xE2, 'r', 0xE3 };
static const symbol s_4_93[4] = { 'e', 'a', 'z', 0xE3 };
static const struct among a_4[94] =
{
/* 0 */ { 2, s_4_0, -1, 1, 0},
/* 1 */ { 2, s_4_1, -1, 1, 0},
/* 2 */ { 3, s_4_2, -1, 1, 0},
/* 3 */ { 3, s_4_3, -1, 1, 0},
/* 4 */ { 3, s_4_4, -1, 1, 0},
/* 5 */ { 3, s_4_5, -1, 1, 0},
/* 6 */ { 3, s_4_6, -1, 1, 0},
/* 7 */ { 3, s_4_7, -1, 1, 0},
/* 8 */ { 3, s_4_8, -1, 1, 0},
/* 9 */ { 3, s_4_9, -1, 1, 0},
/* 10 */ { 2, s_4_10, -1, 2, 0},
/* 11 */ { 3, s_4_11, 10, 1, 0},
/* 12 */ { 4, s_4_12, 10, 2, 0},
/* 13 */ { 3, s_4_13, 10, 1, 0},
/* 14 */ { 3, s_4_14, 10, 1, 0},
/* 15 */ { 3, s_4_15, 10, 1, 0},
/* 16 */ { 4, s_4_16, -1, 1, 0},
/* 17 */ { 4, s_4_17, -1, 1, 0},
/* 18 */ { 3, s_4_18, -1, 1, 0},
/* 19 */ { 2, s_4_19, -1, 1, 0},
/* 20 */ { 3, s_4_20, 19, 1, 0},
/* 21 */ { 3, s_4_21, 19, 1, 0},
/* 22 */ { 3, s_4_22, -1, 2, 0},
/* 23 */ { 4, s_4_23, -1, 1, 0},
/* 24 */ { 4, s_4_24, -1, 1, 0},
/* 25 */ { 2, s_4_25, -1, 1, 0},
/* 26 */ { 3, s_4_26, -1, 1, 0},
/* 27 */ { 3, s_4_27, -1, 1, 0},
/* 28 */ { 4, s_4_28, -1, 2, 0},
/* 29 */ { 5, s_4_29, 28, 1, 0},
/* 30 */ { 6, s_4_30, 28, 2, 0},
/* 31 */ { 5, s_4_31, 28, 1, 0},
/* 32 */ { 5, s_4_32, 28, 1, 0},
/* 33 */ { 5, s_4_33, 28, 1, 0},
/* 34 */ { 3, s_4_34, -1, 1, 0},
/* 35 */ { 3, s_4_35, -1, 1, 0},
/* 36 */ { 3, s_4_36, -1, 1, 0},
/* 37 */ { 2, s_4_37, -1, 1, 0},
/* 38 */ { 3, s_4_38, -1, 2, 0},
/* 39 */ { 4, s_4_39, 38, 1, 0},
/* 40 */ { 4, s_4_40, 38, 1, 0},
/* 41 */ { 3, s_4_41, -1, 2, 0},
/* 42 */ { 3, s_4_42, -1, 2, 0},
/* 43 */ { 3, s_4_43, -1, 2, 0},
/* 44 */ { 5, s_4_44, -1, 1, 0},
/* 45 */ { 6, s_4_45, -1, 2, 0},
/* 46 */ { 7, s_4_46, 45, 1, 0},
/* 47 */ { 8, s_4_47, 45, 2, 0},
/* 48 */ { 7, s_4_48, 45, 1, 0},
/* 49 */ { 7, s_4_49, 45, 1, 0},
/* 50 */ { 7, s_4_50, 45, 1, 0},
/* 51 */ { 5, s_4_51, -1, 1, 0},
/* 52 */ { 5, s_4_52, -1, 1, 0},
/* 53 */ { 5, s_4_53, -1, 1, 0},
/* 54 */ { 2, s_4_54, -1, 1, 0},
/* 55 */ { 3, s_4_55, 54, 1, 0},
/* 56 */ { 3, s_4_56, 54, 1, 0},
/* 57 */ { 2, s_4_57, -1, 2, 0},
/* 58 */ { 4, s_4_58, 57, 1, 0},
/* 59 */ { 5, s_4_59, 57, 2, 0},
/* 60 */ { 4, s_4_60, 57, 1, 0},
/* 61 */ { 4, s_4_61, 57, 1, 0},
/* 62 */ { 4, s_4_62, 57, 1, 0},
/* 63 */ { 2, s_4_63, -1, 2, 0},
/* 64 */ { 2, s_4_64, -1, 2, 0},
/* 65 */ { 2, s_4_65, -1, 2, 0},
/* 66 */ { 4, s_4_66, 65, 1, 0},
/* 67 */ { 5, s_4_67, 65, 2, 0},
/* 68 */ { 6, s_4_68, 67, 1, 0},
/* 69 */ { 7, s_4_69, 67, 2, 0},
/* 70 */ { 6, s_4_70, 67, 1, 0},
/* 71 */ { 6, s_4_71, 67, 1, 0},
/* 72 */ { 6, s_4_72, 67, 1, 0},
/* 73 */ { 4, s_4_73, 65, 1, 0},
/* 74 */ { 4, s_4_74, 65, 1, 0},
/* 75 */ { 4, s_4_75, 65, 1, 0},
/* 76 */ { 2, s_4_76, -1, 1, 0},
/* 77 */ { 3, s_4_77, 76, 1, 0},
/* 78 */ { 3, s_4_78, 76, 1, 0},
/* 79 */ { 4, s_4_79, -1, 1, 0},
/* 80 */ { 4, s_4_80, -1, 1, 0},
/* 81 */ { 2, s_4_81, -1, 1, 0},
/* 82 */ { 5, s_4_82, -1, 1, 0},
/* 83 */ { 3, s_4_83, -1, 1, 0},
/* 84 */ { 4, s_4_84, -1, 2, 0},
/* 85 */ { 5, s_4_85, 84, 1, 0},
/* 86 */ { 6, s_4_86, 84, 2, 0},
/* 87 */ { 5, s_4_87, 84, 1, 0},
/* 88 */ { 5, s_4_88, 84, 1, 0},
/* 89 */ { 5, s_4_89, 84, 1, 0},
/* 90 */ { 3, s_4_90, -1, 1, 0},
/* 91 */ { 3, s_4_91, -1, 1, 0},
/* 92 */ { 3, s_4_92, -1, 1, 0},
/* 93 */ { 4, s_4_93, -1, 1, 0}
};
static const symbol s_5_0[1] = { 'a' };
static const symbol s_5_1[1] = { 'e' };
static const symbol s_5_2[2] = { 'i', 'e' };
static const symbol s_5_3[1] = { 'i' };
static const symbol s_5_4[1] = { 0xE3 };
static const struct among a_5[5] =
{
/* 0 */ { 1, s_5_0, -1, 1, 0},
/* 1 */ { 1, s_5_1, -1, 1, 0},
/* 2 */ { 2, s_5_2, 1, 1, 0},
/* 3 */ { 1, s_5_3, -1, 1, 0},
/* 4 */ { 1, s_5_4, -1, 1, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 32 };
static const symbol s_0[] = { 'u' };
static const symbol s_1[] = { 'U' };
static const symbol s_2[] = { 'i' };
static const symbol s_3[] = { 'I' };
static const symbol s_4[] = { 'i' };
static const symbol s_5[] = { 'u' };
static const symbol s_6[] = { 'a' };
static const symbol s_7[] = { 'e' };
static const symbol s_8[] = { 'i' };
static const symbol s_9[] = { 'a', 'b' };
static const symbol s_10[] = { 'i' };
static const symbol s_11[] = { 'a', 't' };
static const symbol s_12[] = { 'a', 0xFE, 'i' };
static const symbol s_13[] = { 'a', 'b', 'i', 'l' };
static const symbol s_14[] = { 'i', 'b', 'i', 'l' };
static const symbol s_15[] = { 'i', 'v' };
static const symbol s_16[] = { 'i', 'c' };
static const symbol s_17[] = { 'a', 't' };
static const symbol s_18[] = { 'i', 't' };
static const symbol s_19[] = { 0xFE };
static const symbol s_20[] = { 't' };
static const symbol s_21[] = { 'i', 's', 't' };
static const symbol s_22[] = { 'u' };
static int r_prelude(struct SN_env * z) {
while(1) { /* repeat, line 32 */
int c1 = z->c;
while(1) { /* goto, line 32 */
int c2 = z->c;
if (in_grouping(z, g_v, 97, 238, 0)) goto lab1;
z->bra = z->c; /* [, line 33 */
{ int c3 = z->c; /* or, line 33 */
if (!(eq_s(z, 1, s_0))) goto lab3;
z->ket = z->c; /* ], line 33 */
if (in_grouping(z, g_v, 97, 238, 0)) goto lab3;
{ int ret = slice_from_s(z, 1, s_1); /* <-, line 33 */
if (ret < 0) return ret;
}
goto lab2;
lab3:
z->c = c3;
if (!(eq_s(z, 1, s_2))) goto lab1;
z->ket = z->c; /* ], line 34 */
if (in_grouping(z, g_v, 97, 238, 0)) goto lab1;
{ int ret = slice_from_s(z, 1, s_3); /* <-, line 34 */
if (ret < 0) return ret;
}
}
lab2:
z->c = c2;
break;
lab1:
z->c = c2;
if (z->c >= z->l) goto lab0;
z->c++; /* goto, line 32 */
}
continue;
lab0:
z->c = c1;
break;
}
return 1;
}
static int r_mark_regions(struct SN_env * z) {
z->I[0] = z->l;
z->I[1] = z->l;
z->I[2] = z->l;
{ int c1 = z->c; /* do, line 44 */
{ int c2 = z->c; /* or, line 46 */
if (in_grouping(z, g_v, 97, 238, 0)) goto lab2;
{ int c3 = z->c; /* or, line 45 */
if (out_grouping(z, g_v, 97, 238, 0)) goto lab4;
{ /* gopast */ /* grouping v, line 45 */
int ret = out_grouping(z, g_v, 97, 238, 1);
if (ret < 0) goto lab4;
z->c += ret;
}
goto lab3;
lab4:
z->c = c3;
if (in_grouping(z, g_v, 97, 238, 0)) goto lab2;
{ /* gopast */ /* non v, line 45 */
int ret = in_grouping(z, g_v, 97, 238, 1);
if (ret < 0) goto lab2;
z->c += ret;
}
}
lab3:
goto lab1;
lab2:
z->c = c2;
if (out_grouping(z, g_v, 97, 238, 0)) goto lab0;
{ int c4 = z->c; /* or, line 47 */
if (out_grouping(z, g_v, 97, 238, 0)) goto lab6;
{ /* gopast */ /* grouping v, line 47 */
int ret = out_grouping(z, g_v, 97, 238, 1);
if (ret < 0) goto lab6;
z->c += ret;
}
goto lab5;
lab6:
z->c = c4;
if (in_grouping(z, g_v, 97, 238, 0)) goto lab0;
if (z->c >= z->l) goto lab0;
z->c++; /* next, line 47 */
}
lab5:
;
}
lab1:
z->I[0] = z->c; /* setmark pV, line 48 */
lab0:
z->c = c1;
}
{ int c5 = z->c; /* do, line 50 */
{ /* gopast */ /* grouping v, line 51 */
int ret = out_grouping(z, g_v, 97, 238, 1);
if (ret < 0) goto lab7;
z->c += ret;
}
{ /* gopast */ /* non v, line 51 */
int ret = in_grouping(z, g_v, 97, 238, 1);
if (ret < 0) goto lab7;
z->c += ret;
}
z->I[1] = z->c; /* setmark p1, line 51 */
{ /* gopast */ /* grouping v, line 52 */
int ret = out_grouping(z, g_v, 97, 238, 1);
if (ret < 0) goto lab7;
z->c += ret;
}
{ /* gopast */ /* non v, line 52 */
int ret = in_grouping(z, g_v, 97, 238, 1);
if (ret < 0) goto lab7;
z->c += ret;
}
z->I[2] = z->c; /* setmark p2, line 52 */
lab7:
z->c = c5;
}
return 1;
}
static int r_postlude(struct SN_env * z) {
int among_var;
while(1) { /* repeat, line 56 */
int c1 = z->c;
z->bra = z->c; /* [, line 58 */
if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 85)) among_var = 3; else
among_var = find_among(z, a_0, 3); /* substring, line 58 */
if (!(among_var)) goto lab0;
z->ket = z->c; /* ], line 58 */
switch(among_var) {
case 0: goto lab0;
case 1:
{ int ret = slice_from_s(z, 1, s_4); /* <-, line 59 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 1, s_5); /* <-, line 60 */
if (ret < 0) return ret;
}
break;
case 3:
if (z->c >= z->l) goto lab0;
z->c++; /* next, line 61 */
break;
}
continue;
lab0:
z->c = c1;
break;
}
return 1;
}
static int r_RV(struct SN_env * z) {
if (!(z->I[0] <= z->c)) return 0;
return 1;
}
static int r_R1(struct SN_env * z) {
if (!(z->I[1] <= z->c)) return 0;
return 1;
}
static int r_R2(struct SN_env * z) {
if (!(z->I[2] <= z->c)) return 0;
return 1;
}
static int r_step_0(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 73 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((266786 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_1, 16); /* substring, line 73 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 73 */
{ int ret = r_R1(z);
if (ret == 0) return 0; /* call R1, line 73 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 75 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 1, s_6); /* <-, line 77 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 1, s_7); /* <-, line 79 */
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 1, s_8); /* <-, line 81 */
if (ret < 0) return ret;
}
break;
case 5:
{ int m1 = z->l - z->c; (void)m1; /* not, line 83 */
if (!(eq_s_b(z, 2, s_9))) goto lab0;
return 0;
lab0:
z->c = z->l - m1;
}
{ int ret = slice_from_s(z, 1, s_10); /* <-, line 83 */
if (ret < 0) return ret;
}
break;
case 6:
{ int ret = slice_from_s(z, 2, s_11); /* <-, line 85 */
if (ret < 0) return ret;
}
break;
case 7:
{ int ret = slice_from_s(z, 3, s_12); /* <-, line 87 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_combo_suffix(struct SN_env * z) {
int among_var;
{ int m_test = z->l - z->c; /* test, line 91 */
z->ket = z->c; /* [, line 92 */
among_var = find_among_b(z, a_2, 46); /* substring, line 92 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 92 */
{ int ret = r_R1(z);
if (ret == 0) return 0; /* call R1, line 92 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_from_s(z, 4, s_13); /* <-, line 101 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 4, s_14); /* <-, line 104 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 2, s_15); /* <-, line 107 */
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 2, s_16); /* <-, line 113 */
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = slice_from_s(z, 2, s_17); /* <-, line 118 */
if (ret < 0) return ret;
}
break;
case 6:
{ int ret = slice_from_s(z, 2, s_18); /* <-, line 122 */
if (ret < 0) return ret;
}
break;
}
z->B[0] = 1; /* set standard_suffix_removed, line 125 */
z->c = z->l - m_test;
}
return 1;
}
static int r_standard_suffix(struct SN_env * z) {
int among_var;
z->B[0] = 0; /* unset standard_suffix_removed, line 130 */
while(1) { /* repeat, line 131 */
int m1 = z->l - z->c; (void)m1;
{ int ret = r_combo_suffix(z);
if (ret == 0) goto lab0; /* call combo_suffix, line 131 */
if (ret < 0) return ret;
}
continue;
lab0:
z->c = z->l - m1;
break;
}
z->ket = z->c; /* [, line 132 */
among_var = find_among_b(z, a_3, 62); /* substring, line 132 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 132 */
{ int ret = r_R2(z);
if (ret == 0) return 0; /* call R2, line 132 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 149 */
if (ret < 0) return ret;
}
break;
case 2:
if (!(eq_s_b(z, 1, s_19))) return 0;
z->bra = z->c; /* ], line 152 */
{ int ret = slice_from_s(z, 1, s_20); /* <-, line 152 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 3, s_21); /* <-, line 156 */
if (ret < 0) return ret;
}
break;
}
z->B[0] = 1; /* set standard_suffix_removed, line 160 */
return 1;
}
static int r_verb_suffix(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 164 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 164 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 165 */
among_var = find_among_b(z, a_4, 94); /* substring, line 165 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 165 */
switch(among_var) {
case 0: { z->lb = mlimit; return 0; }
case 1:
{ int m2 = z->l - z->c; (void)m2; /* or, line 200 */
if (out_grouping_b(z, g_v, 97, 238, 0)) goto lab1;
goto lab0;
lab1:
z->c = z->l - m2;
if (!(eq_s_b(z, 1, s_22))) { z->lb = mlimit; return 0; }
}
lab0:
{ int ret = slice_del(z); /* delete, line 200 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z); /* delete, line 214 */
if (ret < 0) return ret;
}
break;
}
z->lb = mlimit;
}
return 1;
}
static int r_vowel_suffix(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 219 */
among_var = find_among_b(z, a_5, 5); /* substring, line 219 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 219 */
{ int ret = r_RV(z);
if (ret == 0) return 0; /* call RV, line 219 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 220 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
extern int romanian_ISO_8859_2_stem(struct SN_env * z) {
{ int c1 = z->c; /* do, line 226 */
{ int ret = r_prelude(z);
if (ret == 0) goto lab0; /* call prelude, line 226 */
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
{ int c2 = z->c; /* do, line 227 */
{ int ret = r_mark_regions(z);
if (ret == 0) goto lab1; /* call mark_regions, line 227 */
if (ret < 0) return ret;
}
lab1:
z->c = c2;
}
z->lb = z->c; z->c = z->l; /* backwards, line 228 */
{ int m3 = z->l - z->c; (void)m3; /* do, line 229 */
{ int ret = r_step_0(z);
if (ret == 0) goto lab2; /* call step_0, line 229 */
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 230 */
{ int ret = r_standard_suffix(z);
if (ret == 0) goto lab3; /* call standard_suffix, line 230 */
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
{ int m5 = z->l - z->c; (void)m5; /* do, line 231 */
{ int m6 = z->l - z->c; (void)m6; /* or, line 231 */
if (!(z->B[0])) goto lab6; /* Boolean test standard_suffix_removed, line 231 */
goto lab5;
lab6:
z->c = z->l - m6;
{ int ret = r_verb_suffix(z);
if (ret == 0) goto lab4; /* call verb_suffix, line 231 */
if (ret < 0) return ret;
}
}
lab5:
lab4:
z->c = z->l - m5;
}
{ int m7 = z->l - z->c; (void)m7; /* do, line 232 */
{ int ret = r_vowel_suffix(z);
if (ret == 0) goto lab7; /* call vowel_suffix, line 232 */
if (ret < 0) return ret;
}
lab7:
z->c = z->l - m7;
}
z->c = z->lb;
{ int c8 = z->c; /* do, line 234 */
{ int ret = r_postlude(z);
if (ret == 0) goto lab8; /* call postlude, line 234 */
if (ret < 0) return ret;
}
lab8:
z->c = c8;
}
return 1;
}
extern struct SN_env * romanian_ISO_8859_2_create_env(void) { return SN_create_env(0, 3, 1); }
extern void romanian_ISO_8859_2_close_env(struct SN_env * z) { SN_close_env(z, 0); }

View File

@ -0,0 +1,700 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int russian_KOI8_R_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_tidy_up(struct SN_env * z);
static int r_derivational(struct SN_env * z);
static int r_noun(struct SN_env * z);
static int r_verb(struct SN_env * z);
static int r_reflexive(struct SN_env * z);
static int r_adjectival(struct SN_env * z);
static int r_adjective(struct SN_env * z);
static int r_perfective_gerund(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * russian_KOI8_R_create_env(void);
extern void russian_KOI8_R_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[3] = { 0xD7, 0xDB, 0xC9 };
static const symbol s_0_1[4] = { 0xC9, 0xD7, 0xDB, 0xC9 };
static const symbol s_0_2[4] = { 0xD9, 0xD7, 0xDB, 0xC9 };
static const symbol s_0_3[1] = { 0xD7 };
static const symbol s_0_4[2] = { 0xC9, 0xD7 };
static const symbol s_0_5[2] = { 0xD9, 0xD7 };
static const symbol s_0_6[5] = { 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
static const symbol s_0_7[6] = { 0xC9, 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
static const symbol s_0_8[6] = { 0xD9, 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
static const struct among a_0[9] =
{
/* 0 */ { 3, s_0_0, -1, 1, 0},
/* 1 */ { 4, s_0_1, 0, 2, 0},
/* 2 */ { 4, s_0_2, 0, 2, 0},
/* 3 */ { 1, s_0_3, -1, 1, 0},
/* 4 */ { 2, s_0_4, 3, 2, 0},
/* 5 */ { 2, s_0_5, 3, 2, 0},
/* 6 */ { 5, s_0_6, -1, 1, 0},
/* 7 */ { 6, s_0_7, 6, 2, 0},
/* 8 */ { 6, s_0_8, 6, 2, 0}
};
static const symbol s_1_0[2] = { 0xC0, 0xC0 };
static const symbol s_1_1[2] = { 0xC5, 0xC0 };
static const symbol s_1_2[2] = { 0xCF, 0xC0 };
static const symbol s_1_3[2] = { 0xD5, 0xC0 };
static const symbol s_1_4[2] = { 0xC5, 0xC5 };
static const symbol s_1_5[2] = { 0xC9, 0xC5 };
static const symbol s_1_6[2] = { 0xCF, 0xC5 };
static const symbol s_1_7[2] = { 0xD9, 0xC5 };
static const symbol s_1_8[2] = { 0xC9, 0xC8 };
static const symbol s_1_9[2] = { 0xD9, 0xC8 };
static const symbol s_1_10[3] = { 0xC9, 0xCD, 0xC9 };
static const symbol s_1_11[3] = { 0xD9, 0xCD, 0xC9 };
static const symbol s_1_12[2] = { 0xC5, 0xCA };
static const symbol s_1_13[2] = { 0xC9, 0xCA };
static const symbol s_1_14[2] = { 0xCF, 0xCA };
static const symbol s_1_15[2] = { 0xD9, 0xCA };
static const symbol s_1_16[2] = { 0xC5, 0xCD };
static const symbol s_1_17[2] = { 0xC9, 0xCD };
static const symbol s_1_18[2] = { 0xCF, 0xCD };
static const symbol s_1_19[2] = { 0xD9, 0xCD };
static const symbol s_1_20[3] = { 0xC5, 0xC7, 0xCF };
static const symbol s_1_21[3] = { 0xCF, 0xC7, 0xCF };
static const symbol s_1_22[2] = { 0xC1, 0xD1 };
static const symbol s_1_23[2] = { 0xD1, 0xD1 };
static const symbol s_1_24[3] = { 0xC5, 0xCD, 0xD5 };
static const symbol s_1_25[3] = { 0xCF, 0xCD, 0xD5 };
static const struct among a_1[26] =
{
/* 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},
/* 4 */ { 2, s_1_4, -1, 1, 0},
/* 5 */ { 2, s_1_5, -1, 1, 0},
/* 6 */ { 2, s_1_6, -1, 1, 0},
/* 7 */ { 2, s_1_7, -1, 1, 0},
/* 8 */ { 2, s_1_8, -1, 1, 0},
/* 9 */ { 2, s_1_9, -1, 1, 0},
/* 10 */ { 3, s_1_10, -1, 1, 0},
/* 11 */ { 3, s_1_11, -1, 1, 0},
/* 12 */ { 2, s_1_12, -1, 1, 0},
/* 13 */ { 2, s_1_13, -1, 1, 0},
/* 14 */ { 2, s_1_14, -1, 1, 0},
/* 15 */ { 2, s_1_15, -1, 1, 0},
/* 16 */ { 2, s_1_16, -1, 1, 0},
/* 17 */ { 2, s_1_17, -1, 1, 0},
/* 18 */ { 2, s_1_18, -1, 1, 0},
/* 19 */ { 2, s_1_19, -1, 1, 0},
/* 20 */ { 3, s_1_20, -1, 1, 0},
/* 21 */ { 3, s_1_21, -1, 1, 0},
/* 22 */ { 2, s_1_22, -1, 1, 0},
/* 23 */ { 2, s_1_23, -1, 1, 0},
/* 24 */ { 3, s_1_24, -1, 1, 0},
/* 25 */ { 3, s_1_25, -1, 1, 0}
};
static const symbol s_2_0[2] = { 0xC5, 0xCD };
static const symbol s_2_1[2] = { 0xCE, 0xCE };
static const symbol s_2_2[2] = { 0xD7, 0xDB };
static const symbol s_2_3[3] = { 0xC9, 0xD7, 0xDB };
static const symbol s_2_4[3] = { 0xD9, 0xD7, 0xDB };
static const symbol s_2_5[1] = { 0xDD };
static const symbol s_2_6[2] = { 0xC0, 0xDD };
static const symbol s_2_7[3] = { 0xD5, 0xC0, 0xDD };
static const struct among a_2[8] =
{
/* 0 */ { 2, s_2_0, -1, 1, 0},
/* 1 */ { 2, s_2_1, -1, 1, 0},
/* 2 */ { 2, s_2_2, -1, 1, 0},
/* 3 */ { 3, s_2_3, 2, 2, 0},
/* 4 */ { 3, s_2_4, 2, 2, 0},
/* 5 */ { 1, s_2_5, -1, 1, 0},
/* 6 */ { 2, s_2_6, 5, 1, 0},
/* 7 */ { 3, s_2_7, 6, 2, 0}
};
static const symbol s_3_0[2] = { 0xD3, 0xD1 };
static const symbol s_3_1[2] = { 0xD3, 0xD8 };
static const struct among a_3[2] =
{
/* 0 */ { 2, s_3_0, -1, 1, 0},
/* 1 */ { 2, s_3_1, -1, 1, 0}
};
static const symbol s_4_0[1] = { 0xC0 };
static const symbol s_4_1[2] = { 0xD5, 0xC0 };
static const symbol s_4_2[2] = { 0xCC, 0xC1 };
static const symbol s_4_3[3] = { 0xC9, 0xCC, 0xC1 };
static const symbol s_4_4[3] = { 0xD9, 0xCC, 0xC1 };
static const symbol s_4_5[2] = { 0xCE, 0xC1 };
static const symbol s_4_6[3] = { 0xC5, 0xCE, 0xC1 };
static const symbol s_4_7[3] = { 0xC5, 0xD4, 0xC5 };
static const symbol s_4_8[3] = { 0xC9, 0xD4, 0xC5 };
static const symbol s_4_9[3] = { 0xCA, 0xD4, 0xC5 };
static const symbol s_4_10[4] = { 0xC5, 0xCA, 0xD4, 0xC5 };
static const symbol s_4_11[4] = { 0xD5, 0xCA, 0xD4, 0xC5 };
static const symbol s_4_12[2] = { 0xCC, 0xC9 };
static const symbol s_4_13[3] = { 0xC9, 0xCC, 0xC9 };
static const symbol s_4_14[3] = { 0xD9, 0xCC, 0xC9 };
static const symbol s_4_15[1] = { 0xCA };
static const symbol s_4_16[2] = { 0xC5, 0xCA };
static const symbol s_4_17[2] = { 0xD5, 0xCA };
static const symbol s_4_18[1] = { 0xCC };
static const symbol s_4_19[2] = { 0xC9, 0xCC };
static const symbol s_4_20[2] = { 0xD9, 0xCC };
static const symbol s_4_21[2] = { 0xC5, 0xCD };
static const symbol s_4_22[2] = { 0xC9, 0xCD };
static const symbol s_4_23[2] = { 0xD9, 0xCD };
static const symbol s_4_24[1] = { 0xCE };
static const symbol s_4_25[2] = { 0xC5, 0xCE };
static const symbol s_4_26[2] = { 0xCC, 0xCF };
static const symbol s_4_27[3] = { 0xC9, 0xCC, 0xCF };
static const symbol s_4_28[3] = { 0xD9, 0xCC, 0xCF };
static const symbol s_4_29[2] = { 0xCE, 0xCF };
static const symbol s_4_30[3] = { 0xC5, 0xCE, 0xCF };
static const symbol s_4_31[3] = { 0xCE, 0xCE, 0xCF };
static const symbol s_4_32[2] = { 0xC0, 0xD4 };
static const symbol s_4_33[3] = { 0xD5, 0xC0, 0xD4 };
static const symbol s_4_34[2] = { 0xC5, 0xD4 };
static const symbol s_4_35[3] = { 0xD5, 0xC5, 0xD4 };
static const symbol s_4_36[2] = { 0xC9, 0xD4 };
static const symbol s_4_37[2] = { 0xD1, 0xD4 };
static const symbol s_4_38[2] = { 0xD9, 0xD4 };
static const symbol s_4_39[2] = { 0xD4, 0xD8 };
static const symbol s_4_40[3] = { 0xC9, 0xD4, 0xD8 };
static const symbol s_4_41[3] = { 0xD9, 0xD4, 0xD8 };
static const symbol s_4_42[3] = { 0xC5, 0xDB, 0xD8 };
static const symbol s_4_43[3] = { 0xC9, 0xDB, 0xD8 };
static const symbol s_4_44[2] = { 0xCE, 0xD9 };
static const symbol s_4_45[3] = { 0xC5, 0xCE, 0xD9 };
static const struct among a_4[46] =
{
/* 0 */ { 1, s_4_0, -1, 2, 0},
/* 1 */ { 2, s_4_1, 0, 2, 0},
/* 2 */ { 2, s_4_2, -1, 1, 0},
/* 3 */ { 3, s_4_3, 2, 2, 0},
/* 4 */ { 3, s_4_4, 2, 2, 0},
/* 5 */ { 2, s_4_5, -1, 1, 0},
/* 6 */ { 3, s_4_6, 5, 2, 0},
/* 7 */ { 3, s_4_7, -1, 1, 0},
/* 8 */ { 3, s_4_8, -1, 2, 0},
/* 9 */ { 3, s_4_9, -1, 1, 0},
/* 10 */ { 4, s_4_10, 9, 2, 0},
/* 11 */ { 4, s_4_11, 9, 2, 0},
/* 12 */ { 2, s_4_12, -1, 1, 0},
/* 13 */ { 3, s_4_13, 12, 2, 0},
/* 14 */ { 3, s_4_14, 12, 2, 0},
/* 15 */ { 1, s_4_15, -1, 1, 0},
/* 16 */ { 2, s_4_16, 15, 2, 0},
/* 17 */ { 2, s_4_17, 15, 2, 0},
/* 18 */ { 1, s_4_18, -1, 1, 0},
/* 19 */ { 2, s_4_19, 18, 2, 0},
/* 20 */ { 2, s_4_20, 18, 2, 0},
/* 21 */ { 2, s_4_21, -1, 1, 0},
/* 22 */ { 2, s_4_22, -1, 2, 0},
/* 23 */ { 2, s_4_23, -1, 2, 0},
/* 24 */ { 1, s_4_24, -1, 1, 0},
/* 25 */ { 2, s_4_25, 24, 2, 0},
/* 26 */ { 2, s_4_26, -1, 1, 0},
/* 27 */ { 3, s_4_27, 26, 2, 0},
/* 28 */ { 3, s_4_28, 26, 2, 0},
/* 29 */ { 2, s_4_29, -1, 1, 0},
/* 30 */ { 3, s_4_30, 29, 2, 0},
/* 31 */ { 3, s_4_31, 29, 1, 0},
/* 32 */ { 2, s_4_32, -1, 1, 0},
/* 33 */ { 3, s_4_33, 32, 2, 0},
/* 34 */ { 2, s_4_34, -1, 1, 0},
/* 35 */ { 3, s_4_35, 34, 2, 0},
/* 36 */ { 2, s_4_36, -1, 2, 0},
/* 37 */ { 2, s_4_37, -1, 2, 0},
/* 38 */ { 2, s_4_38, -1, 2, 0},
/* 39 */ { 2, s_4_39, -1, 1, 0},
/* 40 */ { 3, s_4_40, 39, 2, 0},
/* 41 */ { 3, s_4_41, 39, 2, 0},
/* 42 */ { 3, s_4_42, -1, 1, 0},
/* 43 */ { 3, s_4_43, -1, 2, 0},
/* 44 */ { 2, s_4_44, -1, 1, 0},
/* 45 */ { 3, s_4_45, 44, 2, 0}
};
static const symbol s_5_0[1] = { 0xC0 };
static const symbol s_5_1[2] = { 0xC9, 0xC0 };
static const symbol s_5_2[2] = { 0xD8, 0xC0 };
static const symbol s_5_3[1] = { 0xC1 };
static const symbol s_5_4[1] = { 0xC5 };
static const symbol s_5_5[2] = { 0xC9, 0xC5 };
static const symbol s_5_6[2] = { 0xD8, 0xC5 };
static const symbol s_5_7[2] = { 0xC1, 0xC8 };
static const symbol s_5_8[2] = { 0xD1, 0xC8 };
static const symbol s_5_9[3] = { 0xC9, 0xD1, 0xC8 };
static const symbol s_5_10[1] = { 0xC9 };
static const symbol s_5_11[2] = { 0xC5, 0xC9 };
static const symbol s_5_12[2] = { 0xC9, 0xC9 };
static const symbol s_5_13[3] = { 0xC1, 0xCD, 0xC9 };
static const symbol s_5_14[3] = { 0xD1, 0xCD, 0xC9 };
static const symbol s_5_15[4] = { 0xC9, 0xD1, 0xCD, 0xC9 };
static const symbol s_5_16[1] = { 0xCA };
static const symbol s_5_17[2] = { 0xC5, 0xCA };
static const symbol s_5_18[3] = { 0xC9, 0xC5, 0xCA };
static const symbol s_5_19[2] = { 0xC9, 0xCA };
static const symbol s_5_20[2] = { 0xCF, 0xCA };
static const symbol s_5_21[2] = { 0xC1, 0xCD };
static const symbol s_5_22[2] = { 0xC5, 0xCD };
static const symbol s_5_23[3] = { 0xC9, 0xC5, 0xCD };
static const symbol s_5_24[2] = { 0xCF, 0xCD };
static const symbol s_5_25[2] = { 0xD1, 0xCD };
static const symbol s_5_26[3] = { 0xC9, 0xD1, 0xCD };
static const symbol s_5_27[1] = { 0xCF };
static const symbol s_5_28[1] = { 0xD1 };
static const symbol s_5_29[2] = { 0xC9, 0xD1 };
static const symbol s_5_30[2] = { 0xD8, 0xD1 };
static const symbol s_5_31[1] = { 0xD5 };
static const symbol s_5_32[2] = { 0xC5, 0xD7 };
static const symbol s_5_33[2] = { 0xCF, 0xD7 };
static const symbol s_5_34[1] = { 0xD8 };
static const symbol s_5_35[1] = { 0xD9 };
static const struct among a_5[36] =
{
/* 0 */ { 1, s_5_0, -1, 1, 0},
/* 1 */ { 2, s_5_1, 0, 1, 0},
/* 2 */ { 2, s_5_2, 0, 1, 0},
/* 3 */ { 1, s_5_3, -1, 1, 0},
/* 4 */ { 1, s_5_4, -1, 1, 0},
/* 5 */ { 2, s_5_5, 4, 1, 0},
/* 6 */ { 2, s_5_6, 4, 1, 0},
/* 7 */ { 2, s_5_7, -1, 1, 0},
/* 8 */ { 2, s_5_8, -1, 1, 0},
/* 9 */ { 3, s_5_9, 8, 1, 0},
/* 10 */ { 1, s_5_10, -1, 1, 0},
/* 11 */ { 2, s_5_11, 10, 1, 0},
/* 12 */ { 2, s_5_12, 10, 1, 0},
/* 13 */ { 3, s_5_13, 10, 1, 0},
/* 14 */ { 3, s_5_14, 10, 1, 0},
/* 15 */ { 4, s_5_15, 14, 1, 0},
/* 16 */ { 1, s_5_16, -1, 1, 0},
/* 17 */ { 2, s_5_17, 16, 1, 0},
/* 18 */ { 3, s_5_18, 17, 1, 0},
/* 19 */ { 2, s_5_19, 16, 1, 0},
/* 20 */ { 2, s_5_20, 16, 1, 0},
/* 21 */ { 2, s_5_21, -1, 1, 0},
/* 22 */ { 2, s_5_22, -1, 1, 0},
/* 23 */ { 3, s_5_23, 22, 1, 0},
/* 24 */ { 2, s_5_24, -1, 1, 0},
/* 25 */ { 2, s_5_25, -1, 1, 0},
/* 26 */ { 3, s_5_26, 25, 1, 0},
/* 27 */ { 1, s_5_27, -1, 1, 0},
/* 28 */ { 1, s_5_28, -1, 1, 0},
/* 29 */ { 2, s_5_29, 28, 1, 0},
/* 30 */ { 2, s_5_30, 28, 1, 0},
/* 31 */ { 1, s_5_31, -1, 1, 0},
/* 32 */ { 2, s_5_32, -1, 1, 0},
/* 33 */ { 2, s_5_33, -1, 1, 0},
/* 34 */ { 1, s_5_34, -1, 1, 0},
/* 35 */ { 1, s_5_35, -1, 1, 0}
};
static const symbol s_6_0[3] = { 0xCF, 0xD3, 0xD4 };
static const symbol s_6_1[4] = { 0xCF, 0xD3, 0xD4, 0xD8 };
static const struct among a_6[2] =
{
/* 0 */ { 3, s_6_0, -1, 1, 0},
/* 1 */ { 4, s_6_1, -1, 1, 0}
};
static const symbol s_7_0[4] = { 0xC5, 0xCA, 0xDB, 0xC5 };
static const symbol s_7_1[1] = { 0xCE };
static const symbol s_7_2[1] = { 0xD8 };
static const symbol s_7_3[3] = { 0xC5, 0xCA, 0xDB };
static const struct among a_7[4] =
{
/* 0 */ { 4, s_7_0, -1, 1, 0},
/* 1 */ { 1, s_7_1, -1, 2, 0},
/* 2 */ { 1, s_7_2, -1, 3, 0},
/* 3 */ { 3, s_7_3, -1, 1, 0}
};
static const unsigned char g_v[] = { 35, 130, 34, 18 };
static const symbol s_0[] = { 0xC1 };
static const symbol s_1[] = { 0xD1 };
static const symbol s_2[] = { 0xC1 };
static const symbol s_3[] = { 0xD1 };
static const symbol s_4[] = { 0xC1 };
static const symbol s_5[] = { 0xD1 };
static const symbol s_6[] = { 0xCE };
static const symbol s_7[] = { 0xCE };
static const symbol s_8[] = { 0xCE };
static const symbol s_9[] = { 0xC9 };
static int r_mark_regions(struct SN_env * z) {
z->I[0] = z->l;
z->I[1] = z->l;
{ int c1 = z->c; /* do, line 63 */
{ /* gopast */ /* grouping v, line 64 */
int ret = out_grouping(z, g_v, 192, 220, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[0] = z->c; /* setmark pV, line 64 */
{ /* gopast */ /* non v, line 64 */
int ret = in_grouping(z, g_v, 192, 220, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
{ /* gopast */ /* grouping v, line 65 */
int ret = out_grouping(z, g_v, 192, 220, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
{ /* gopast */ /* non v, line 65 */
int ret = in_grouping(z, g_v, 192, 220, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[1] = z->c; /* setmark p2, line 65 */
lab0:
z->c = c1;
}
return 1;
}
static int r_R2(struct SN_env * z) {
if (!(z->I[1] <= z->c)) return 0;
return 1;
}
static int r_perfective_gerund(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 74 */
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((25166336 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_0, 9); /* substring, line 74 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 74 */
switch(among_var) {
case 0: return 0;
case 1:
{ int m1 = z->l - z->c; (void)m1; /* or, line 78 */
if (!(eq_s_b(z, 1, s_0))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m1;
if (!(eq_s_b(z, 1, s_1))) return 0;
}
lab0:
{ int ret = slice_del(z); /* delete, line 78 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z); /* delete, line 85 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_adjective(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 90 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((2271009 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_1, 26); /* substring, line 90 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 90 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 99 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_adjectival(struct SN_env * z) {
int among_var;
{ int ret = r_adjective(z);
if (ret == 0) return 0; /* call adjective, line 104 */
if (ret < 0) return ret;
}
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
z->ket = z->c; /* [, line 112 */
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((671113216 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->c = z->l - m_keep; goto lab0; }
among_var = find_among_b(z, a_2, 8); /* substring, line 112 */
if (!(among_var)) { z->c = z->l - m_keep; goto lab0; }
z->bra = z->c; /* ], line 112 */
switch(among_var) {
case 0: { z->c = z->l - m_keep; goto lab0; }
case 1:
{ int m1 = z->l - z->c; (void)m1; /* or, line 117 */
if (!(eq_s_b(z, 1, s_2))) goto lab2;
goto lab1;
lab2:
z->c = z->l - m1;
if (!(eq_s_b(z, 1, s_3))) { z->c = z->l - m_keep; goto lab0; }
}
lab1:
{ int ret = slice_del(z); /* delete, line 117 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z); /* delete, line 124 */
if (ret < 0) return ret;
}
break;
}
lab0:
;
}
return 1;
}
static int r_reflexive(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 131 */
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 209 && z->p[z->c - 1] != 216)) return 0;
among_var = find_among_b(z, a_3, 2); /* substring, line 131 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 131 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 134 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_verb(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 139 */
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((51443235 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_4, 46); /* substring, line 139 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 139 */
switch(among_var) {
case 0: return 0;
case 1:
{ int m1 = z->l - z->c; (void)m1; /* or, line 145 */
if (!(eq_s_b(z, 1, s_4))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m1;
if (!(eq_s_b(z, 1, s_5))) return 0;
}
lab0:
{ int ret = slice_del(z); /* delete, line 145 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z); /* delete, line 153 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_noun(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 162 */
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((60991267 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_5, 36); /* substring, line 162 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 162 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 169 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_derivational(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 178 */
if (z->c - 2 <= z->lb || (z->p[z->c - 1] != 212 && z->p[z->c - 1] != 216)) return 0;
among_var = find_among_b(z, a_6, 2); /* substring, line 178 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 178 */
{ int ret = r_R2(z);
if (ret == 0) return 0; /* call R2, line 178 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 181 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_tidy_up(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 186 */
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((151011360 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_7, 4); /* substring, line 186 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 186 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 190 */
if (ret < 0) return ret;
}
z->ket = z->c; /* [, line 191 */
if (!(eq_s_b(z, 1, s_6))) return 0;
z->bra = z->c; /* ], line 191 */
if (!(eq_s_b(z, 1, s_7))) return 0;
{ int ret = slice_del(z); /* delete, line 191 */
if (ret < 0) return ret;
}
break;
case 2:
if (!(eq_s_b(z, 1, s_8))) return 0;
{ int ret = slice_del(z); /* delete, line 194 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z); /* delete, line 196 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
extern int russian_KOI8_R_stem(struct SN_env * z) {
{ int c1 = z->c; /* do, line 203 */
{ int ret = r_mark_regions(z);
if (ret == 0) goto lab0; /* call mark_regions, line 203 */
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->lb = z->c; z->c = z->l; /* backwards, line 204 */
{ int mlimit; /* setlimit, line 204 */
int m2 = z->l - z->c; (void)m2;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 204 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m2;
{ int m3 = z->l - z->c; (void)m3; /* do, line 205 */
{ int m4 = z->l - z->c; (void)m4; /* or, line 206 */
{ int ret = r_perfective_gerund(z);
if (ret == 0) goto lab3; /* call perfective_gerund, line 206 */
if (ret < 0) return ret;
}
goto lab2;
lab3:
z->c = z->l - m4;
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 207 */
{ int ret = r_reflexive(z);
if (ret == 0) { z->c = z->l - m_keep; goto lab4; } /* call reflexive, line 207 */
if (ret < 0) return ret;
}
lab4:
;
}
{ int m5 = z->l - z->c; (void)m5; /* or, line 208 */
{ int ret = r_adjectival(z);
if (ret == 0) goto lab6; /* call adjectival, line 208 */
if (ret < 0) return ret;
}
goto lab5;
lab6:
z->c = z->l - m5;
{ int ret = r_verb(z);
if (ret == 0) goto lab7; /* call verb, line 208 */
if (ret < 0) return ret;
}
goto lab5;
lab7:
z->c = z->l - m5;
{ int ret = r_noun(z);
if (ret == 0) goto lab1; /* call noun, line 208 */
if (ret < 0) return ret;
}
}
lab5:
;
}
lab2:
lab1:
z->c = z->l - m3;
}
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 211 */
z->ket = z->c; /* [, line 211 */
if (!(eq_s_b(z, 1, s_9))) { z->c = z->l - m_keep; goto lab8; }
z->bra = z->c; /* ], line 211 */
{ int ret = slice_del(z); /* delete, line 211 */
if (ret < 0) return ret;
}
lab8:
;
}
{ int m6 = z->l - z->c; (void)m6; /* do, line 214 */
{ int ret = r_derivational(z);
if (ret == 0) goto lab9; /* call derivational, line 214 */
if (ret < 0) return ret;
}
lab9:
z->c = z->l - m6;
}
{ int m7 = z->l - z->c; (void)m7; /* do, line 215 */
{ int ret = r_tidy_up(z);
if (ret == 0) goto lab10; /* call tidy_up, line 215 */
if (ret < 0) return ret;
}
lab10:
z->c = z->l - m7;
}
z->lb = mlimit;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * russian_KOI8_R_create_env(void) { return SN_create_env(0, 2, 0); }
extern void russian_KOI8_R_close_env(struct SN_env * z) { SN_close_env(z, 0); }

View File

@ -0,0 +1,339 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int danish_UTF_8_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_UTF_8_create_env(void);
extern void danish_UTF_8_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[5] = { 'l', 0xC3, 0xB8, '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 */ { 5, 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', 0xC3, 0xB8, '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 = skip_utf8(z->p, z->c, 0, z->l, + 3);
if (ret < 0) return 0;
z->c = ret; /* hop, line 33 */
}
z->I[1] = z->c; /* setmark x, line 33 */
z->c = c_test;
}
if (out_grouping_U(z, g_v, 97, 248, 1) < 0) return 0; /* goto */ /* grouping v, line 34 */
{ /* gopast */ /* non v, line 34 */
int ret = in_grouping_U(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_U(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;
}
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
if (ret < 0) return 0;
z->c = ret; /* 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, 4, 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_U(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_UTF_8_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_UTF_8_create_env(void) { return SN_create_env(1, 2, 0); }
extern void danish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 1); }

View File

@ -0,0 +1,634 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int dutch_UTF_8_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_UTF_8_create_env(void);
extern void dutch_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_1[2] = { 0xC3, 0xA1 };
static const symbol s_0_2[2] = { 0xC3, 0xA4 };
static const symbol s_0_3[2] = { 0xC3, 0xA9 };
static const symbol s_0_4[2] = { 0xC3, 0xAB };
static const symbol s_0_5[2] = { 0xC3, 0xAD };
static const symbol s_0_6[2] = { 0xC3, 0xAF };
static const symbol s_0_7[2] = { 0xC3, 0xB3 };
static const symbol s_0_8[2] = { 0xC3, 0xB6 };
static const symbol s_0_9[2] = { 0xC3, 0xBA };
static const symbol s_0_10[2] = { 0xC3, 0xBC };
static const struct among a_0[11] =
{
/* 0 */ { 0, 0, -1, 6, 0},
/* 1 */ { 2, s_0_1, 0, 1, 0},
/* 2 */ { 2, s_0_2, 0, 1, 0},
/* 3 */ { 2, s_0_3, 0, 2, 0},
/* 4 */ { 2, s_0_4, 0, 2, 0},
/* 5 */ { 2, s_0_5, 0, 3, 0},
/* 6 */ { 2, s_0_6, 0, 3, 0},
/* 7 */ { 2, s_0_7, 0, 4, 0},
/* 8 */ { 2, s_0_8, 0, 4, 0},
/* 9 */ { 2, s_0_9, 0, 5, 0},
/* 10 */ { 2, 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 + 1 >= z->l || z->p[z->c + 1] >> 5 != 5 || !((340306450 >> (z->p[z->c + 1] & 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:
{ int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
if (ret < 0) goto lab0;
z->c = ret; /* 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_U(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_U(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;
{ int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
if (ret < 0) goto lab2;
z->c = ret; /* 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_U(z, g_v, 97, 232, 1);
if (ret < 0) return 0;
z->c += ret;
}
{ /* gopast */ /* non v, line 69 */
int ret = in_grouping_U(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_U(z, g_v, 97, 232, 1);
if (ret < 0) return 0;
z->c += ret;
}
{ /* gopast */ /* non v, line 71 */
int ret = in_grouping_U(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:
{ int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
if (ret < 0) goto lab0;
z->c = ret; /* 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 */
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
if (ret < 0) return 0;
z->c = ret; /* 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_U(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_U(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_U(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_U(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_U(z, g_v, 97, 232, 0)) goto lab9;
z->c = z->l - m_test;
}
z->ket = z->c; /* [, line 152 */
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
if (ret < 0) goto lab9;
z->c = ret; /* 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_UTF_8_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_UTF_8_create_env(void) { return SN_create_env(0, 2, 1); }
extern void dutch_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,768 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int finnish_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_tidy(struct SN_env * z);
static int r_other_endings(struct SN_env * z);
static int r_t_plural(struct SN_env * z);
static int r_i_plural(struct SN_env * z);
static int r_case_ending(struct SN_env * z);
static int r_VI(struct SN_env * z);
static int r_LONG(struct SN_env * z);
static int r_possessive(struct SN_env * z);
static int r_particle_etc(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * finnish_UTF_8_create_env(void);
extern void finnish_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[2] = { 'p', 'a' };
static const symbol s_0_1[3] = { 's', 't', 'i' };
static const symbol s_0_2[4] = { 'k', 'a', 'a', 'n' };
static const symbol s_0_3[3] = { 'h', 'a', 'n' };
static const symbol s_0_4[3] = { 'k', 'i', 'n' };
static const symbol s_0_5[4] = { 'h', 0xC3, 0xA4, 'n' };
static const symbol s_0_6[6] = { 'k', 0xC3, 0xA4, 0xC3, 0xA4, 'n' };
static const symbol s_0_7[2] = { 'k', 'o' };
static const symbol s_0_8[3] = { 'p', 0xC3, 0xA4 };
static const symbol s_0_9[3] = { 'k', 0xC3, 0xB6 };
static const struct among a_0[10] =
{
/* 0 */ { 2, s_0_0, -1, 1, 0},
/* 1 */ { 3, s_0_1, -1, 2, 0},
/* 2 */ { 4, s_0_2, -1, 1, 0},
/* 3 */ { 3, s_0_3, -1, 1, 0},
/* 4 */ { 3, s_0_4, -1, 1, 0},
/* 5 */ { 4, s_0_5, -1, 1, 0},
/* 6 */ { 6, s_0_6, -1, 1, 0},
/* 7 */ { 2, s_0_7, -1, 1, 0},
/* 8 */ { 3, s_0_8, -1, 1, 0},
/* 9 */ { 3, s_0_9, -1, 1, 0}
};
static const symbol s_1_0[3] = { 'l', 'l', 'a' };
static const symbol s_1_1[2] = { 'n', 'a' };
static const symbol s_1_2[3] = { 's', 's', 'a' };
static const symbol s_1_3[2] = { 't', 'a' };
static const symbol s_1_4[3] = { 'l', 't', 'a' };
static const symbol s_1_5[3] = { 's', 't', 'a' };
static const struct among a_1[6] =
{
/* 0 */ { 3, s_1_0, -1, -1, 0},
/* 1 */ { 2, s_1_1, -1, -1, 0},
/* 2 */ { 3, s_1_2, -1, -1, 0},
/* 3 */ { 2, s_1_3, -1, -1, 0},
/* 4 */ { 3, s_1_4, 3, -1, 0},
/* 5 */ { 3, s_1_5, 3, -1, 0}
};
static const symbol s_2_0[4] = { 'l', 'l', 0xC3, 0xA4 };
static const symbol s_2_1[3] = { 'n', 0xC3, 0xA4 };
static const symbol s_2_2[4] = { 's', 's', 0xC3, 0xA4 };
static const symbol s_2_3[3] = { 't', 0xC3, 0xA4 };
static const symbol s_2_4[4] = { 'l', 't', 0xC3, 0xA4 };
static const symbol s_2_5[4] = { 's', 't', 0xC3, 0xA4 };
static const struct among a_2[6] =
{
/* 0 */ { 4, s_2_0, -1, -1, 0},
/* 1 */ { 3, s_2_1, -1, -1, 0},
/* 2 */ { 4, s_2_2, -1, -1, 0},
/* 3 */ { 3, s_2_3, -1, -1, 0},
/* 4 */ { 4, s_2_4, 3, -1, 0},
/* 5 */ { 4, s_2_5, 3, -1, 0}
};
static const symbol s_3_0[3] = { 'l', 'l', 'e' };
static const symbol s_3_1[3] = { 'i', 'n', 'e' };
static const struct among a_3[2] =
{
/* 0 */ { 3, s_3_0, -1, -1, 0},
/* 1 */ { 3, s_3_1, -1, -1, 0}
};
static const symbol s_4_0[3] = { 'n', 's', 'a' };
static const symbol s_4_1[3] = { 'm', 'm', 'e' };
static const symbol s_4_2[3] = { 'n', 'n', 'e' };
static const symbol s_4_3[2] = { 'n', 'i' };
static const symbol s_4_4[2] = { 's', 'i' };
static const symbol s_4_5[2] = { 'a', 'n' };
static const symbol s_4_6[2] = { 'e', 'n' };
static const symbol s_4_7[3] = { 0xC3, 0xA4, 'n' };
static const symbol s_4_8[4] = { 'n', 's', 0xC3, 0xA4 };
static const struct among a_4[9] =
{
/* 0 */ { 3, s_4_0, -1, 3, 0},
/* 1 */ { 3, s_4_1, -1, 3, 0},
/* 2 */ { 3, s_4_2, -1, 3, 0},
/* 3 */ { 2, s_4_3, -1, 2, 0},
/* 4 */ { 2, s_4_4, -1, 1, 0},
/* 5 */ { 2, s_4_5, -1, 4, 0},
/* 6 */ { 2, s_4_6, -1, 6, 0},
/* 7 */ { 3, s_4_7, -1, 5, 0},
/* 8 */ { 4, s_4_8, -1, 3, 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] = { 'i', 'i' };
static const symbol s_5_3[2] = { 'o', 'o' };
static const symbol s_5_4[2] = { 'u', 'u' };
static const symbol s_5_5[4] = { 0xC3, 0xA4, 0xC3, 0xA4 };
static const symbol s_5_6[4] = { 0xC3, 0xB6, 0xC3, 0xB6 };
static const struct among a_5[7] =
{
/* 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},
/* 4 */ { 2, s_5_4, -1, -1, 0},
/* 5 */ { 4, s_5_5, -1, -1, 0},
/* 6 */ { 4, s_5_6, -1, -1, 0}
};
static const symbol s_6_0[1] = { 'a' };
static const symbol s_6_1[3] = { 'l', 'l', 'a' };
static const symbol s_6_2[2] = { 'n', 'a' };
static const symbol s_6_3[3] = { 's', 's', 'a' };
static const symbol s_6_4[2] = { 't', 'a' };
static const symbol s_6_5[3] = { 'l', 't', 'a' };
static const symbol s_6_6[3] = { 's', 't', 'a' };
static const symbol s_6_7[3] = { 't', 't', 'a' };
static const symbol s_6_8[3] = { 'l', 'l', 'e' };
static const symbol s_6_9[3] = { 'i', 'n', 'e' };
static const symbol s_6_10[3] = { 'k', 's', 'i' };
static const symbol s_6_11[1] = { 'n' };
static const symbol s_6_12[3] = { 'h', 'a', 'n' };
static const symbol s_6_13[3] = { 'd', 'e', 'n' };
static const symbol s_6_14[4] = { 's', 'e', 'e', 'n' };
static const symbol s_6_15[3] = { 'h', 'e', 'n' };
static const symbol s_6_16[4] = { 't', 't', 'e', 'n' };
static const symbol s_6_17[3] = { 'h', 'i', 'n' };
static const symbol s_6_18[4] = { 's', 'i', 'i', 'n' };
static const symbol s_6_19[3] = { 'h', 'o', 'n' };
static const symbol s_6_20[4] = { 'h', 0xC3, 0xA4, 'n' };
static const symbol s_6_21[4] = { 'h', 0xC3, 0xB6, 'n' };
static const symbol s_6_22[2] = { 0xC3, 0xA4 };
static const symbol s_6_23[4] = { 'l', 'l', 0xC3, 0xA4 };
static const symbol s_6_24[3] = { 'n', 0xC3, 0xA4 };
static const symbol s_6_25[4] = { 's', 's', 0xC3, 0xA4 };
static const symbol s_6_26[3] = { 't', 0xC3, 0xA4 };
static const symbol s_6_27[4] = { 'l', 't', 0xC3, 0xA4 };
static const symbol s_6_28[4] = { 's', 't', 0xC3, 0xA4 };
static const symbol s_6_29[4] = { 't', 't', 0xC3, 0xA4 };
static const struct among a_6[30] =
{
/* 0 */ { 1, s_6_0, -1, 8, 0},
/* 1 */ { 3, s_6_1, 0, -1, 0},
/* 2 */ { 2, s_6_2, 0, -1, 0},
/* 3 */ { 3, s_6_3, 0, -1, 0},
/* 4 */ { 2, s_6_4, 0, -1, 0},
/* 5 */ { 3, s_6_5, 4, -1, 0},
/* 6 */ { 3, s_6_6, 4, -1, 0},
/* 7 */ { 3, s_6_7, 4, 9, 0},
/* 8 */ { 3, s_6_8, -1, -1, 0},
/* 9 */ { 3, s_6_9, -1, -1, 0},
/* 10 */ { 3, s_6_10, -1, -1, 0},
/* 11 */ { 1, s_6_11, -1, 7, 0},
/* 12 */ { 3, s_6_12, 11, 1, 0},
/* 13 */ { 3, s_6_13, 11, -1, r_VI},
/* 14 */ { 4, s_6_14, 11, -1, r_LONG},
/* 15 */ { 3, s_6_15, 11, 2, 0},
/* 16 */ { 4, s_6_16, 11, -1, r_VI},
/* 17 */ { 3, s_6_17, 11, 3, 0},
/* 18 */ { 4, s_6_18, 11, -1, r_VI},
/* 19 */ { 3, s_6_19, 11, 4, 0},
/* 20 */ { 4, s_6_20, 11, 5, 0},
/* 21 */ { 4, s_6_21, 11, 6, 0},
/* 22 */ { 2, s_6_22, -1, 8, 0},
/* 23 */ { 4, s_6_23, 22, -1, 0},
/* 24 */ { 3, s_6_24, 22, -1, 0},
/* 25 */ { 4, s_6_25, 22, -1, 0},
/* 26 */ { 3, s_6_26, 22, -1, 0},
/* 27 */ { 4, s_6_27, 26, -1, 0},
/* 28 */ { 4, s_6_28, 26, -1, 0},
/* 29 */ { 4, s_6_29, 26, 9, 0}
};
static const symbol s_7_0[3] = { 'e', 'j', 'a' };
static const symbol s_7_1[3] = { 'm', 'm', 'a' };
static const symbol s_7_2[4] = { 'i', 'm', 'm', 'a' };
static const symbol s_7_3[3] = { 'm', 'p', 'a' };
static const symbol s_7_4[4] = { 'i', 'm', 'p', 'a' };
static const symbol s_7_5[3] = { 'm', 'm', 'i' };
static const symbol s_7_6[4] = { 'i', 'm', 'm', 'i' };
static const symbol s_7_7[3] = { 'm', 'p', 'i' };
static const symbol s_7_8[4] = { 'i', 'm', 'p', 'i' };
static const symbol s_7_9[4] = { 'e', 'j', 0xC3, 0xA4 };
static const symbol s_7_10[4] = { 'm', 'm', 0xC3, 0xA4 };
static const symbol s_7_11[5] = { 'i', 'm', 'm', 0xC3, 0xA4 };
static const symbol s_7_12[4] = { 'm', 'p', 0xC3, 0xA4 };
static const symbol s_7_13[5] = { 'i', 'm', 'p', 0xC3, 0xA4 };
static const struct among a_7[14] =
{
/* 0 */ { 3, s_7_0, -1, -1, 0},
/* 1 */ { 3, s_7_1, -1, 1, 0},
/* 2 */ { 4, s_7_2, 1, -1, 0},
/* 3 */ { 3, s_7_3, -1, 1, 0},
/* 4 */ { 4, s_7_4, 3, -1, 0},
/* 5 */ { 3, s_7_5, -1, 1, 0},
/* 6 */ { 4, s_7_6, 5, -1, 0},
/* 7 */ { 3, s_7_7, -1, 1, 0},
/* 8 */ { 4, s_7_8, 7, -1, 0},
/* 9 */ { 4, s_7_9, -1, -1, 0},
/* 10 */ { 4, s_7_10, -1, 1, 0},
/* 11 */ { 5, s_7_11, 10, -1, 0},
/* 12 */ { 4, s_7_12, -1, 1, 0},
/* 13 */ { 5, s_7_13, 12, -1, 0}
};
static const symbol s_8_0[1] = { 'i' };
static const symbol s_8_1[1] = { 'j' };
static const struct among a_8[2] =
{
/* 0 */ { 1, s_8_0, -1, -1, 0},
/* 1 */ { 1, s_8_1, -1, -1, 0}
};
static const symbol s_9_0[3] = { 'm', 'm', 'a' };
static const symbol s_9_1[4] = { 'i', 'm', 'm', 'a' };
static const struct among a_9[2] =
{
/* 0 */ { 3, s_9_0, -1, 1, 0},
/* 1 */ { 4, s_9_1, 0, -1, 0}
};
static const unsigned char g_AEI[] = { 17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8 };
static const unsigned char g_V1[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
static const unsigned char g_V2[] = { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
static const unsigned char g_particle_end[] = { 17, 97, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
static const symbol s_0[] = { 'k' };
static const symbol s_1[] = { 'k', 's', 'e' };
static const symbol s_2[] = { 'k', 's', 'i' };
static const symbol s_3[] = { 'i' };
static const symbol s_4[] = { 'a' };
static const symbol s_5[] = { 'e' };
static const symbol s_6[] = { 'i' };
static const symbol s_7[] = { 'o' };
static const symbol s_8[] = { 0xC3, 0xA4 };
static const symbol s_9[] = { 0xC3, 0xB6 };
static const symbol s_10[] = { 'i', 'e' };
static const symbol s_11[] = { 'e' };
static const symbol s_12[] = { 'p', 'o' };
static const symbol s_13[] = { 't' };
static const symbol s_14[] = { 'p', 'o' };
static const symbol s_15[] = { 'j' };
static const symbol s_16[] = { 'o' };
static const symbol s_17[] = { 'u' };
static const symbol s_18[] = { 'o' };
static const symbol s_19[] = { 'j' };
static int r_mark_regions(struct SN_env * z) {
z->I[0] = z->l;
z->I[1] = z->l;
if (out_grouping_U(z, g_V1, 97, 246, 1) < 0) return 0; /* goto */ /* grouping V1, line 46 */
{ /* gopast */ /* non V1, line 46 */
int ret = in_grouping_U(z, g_V1, 97, 246, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[0] = z->c; /* setmark p1, line 46 */
if (out_grouping_U(z, g_V1, 97, 246, 1) < 0) return 0; /* goto */ /* grouping V1, line 47 */
{ /* gopast */ /* non V1, line 47 */
int ret = in_grouping_U(z, g_V1, 97, 246, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[1] = z->c; /* setmark p2, line 47 */
return 1;
}
static int r_R2(struct SN_env * z) {
if (!(z->I[1] <= z->c)) return 0;
return 1;
}
static int r_particle_etc(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 55 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 55 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 55 */
among_var = find_among_b(z, a_0, 10); /* substring, line 55 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 55 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
if (in_grouping_b_U(z, g_particle_end, 97, 246, 0)) return 0;
break;
case 2:
{ int ret = r_R2(z);
if (ret == 0) return 0; /* call R2, line 64 */
if (ret < 0) return ret;
}
break;
}
{ int ret = slice_del(z); /* delete, line 66 */
if (ret < 0) return ret;
}
return 1;
}
static int r_possessive(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 69 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 69 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 69 */
among_var = find_among_b(z, a_4, 9); /* substring, line 69 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 69 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int m2 = z->l - z->c; (void)m2; /* not, line 72 */
if (!(eq_s_b(z, 1, s_0))) goto lab0;
return 0;
lab0:
z->c = z->l - m2;
}
{ int ret = slice_del(z); /* delete, line 72 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z); /* delete, line 74 */
if (ret < 0) return ret;
}
z->ket = z->c; /* [, line 74 */
if (!(eq_s_b(z, 3, s_1))) return 0;
z->bra = z->c; /* ], line 74 */
{ int ret = slice_from_s(z, 3, s_2); /* <-, line 74 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z); /* delete, line 78 */
if (ret < 0) return ret;
}
break;
case 4:
if (z->c - 1 <= z->lb || z->p[z->c - 1] != 97) return 0;
if (!(find_among_b(z, a_1, 6))) return 0; /* among, line 81 */
{ int ret = slice_del(z); /* delete, line 81 */
if (ret < 0) return ret;
}
break;
case 5:
if (z->c - 2 <= z->lb || z->p[z->c - 1] != 164) return 0;
if (!(find_among_b(z, a_2, 6))) return 0; /* among, line 83 */
{ int ret = slice_del(z); /* delete, line 84 */
if (ret < 0) return ret;
}
break;
case 6:
if (z->c - 2 <= z->lb || z->p[z->c - 1] != 101) return 0;
if (!(find_among_b(z, a_3, 2))) return 0; /* among, line 86 */
{ int ret = slice_del(z); /* delete, line 86 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_LONG(struct SN_env * z) {
if (!(find_among_b(z, a_5, 7))) return 0; /* among, line 91 */
return 1;
}
static int r_VI(struct SN_env * z) {
if (!(eq_s_b(z, 1, s_3))) return 0;
if (in_grouping_b_U(z, g_V2, 97, 246, 0)) return 0;
return 1;
}
static int r_case_ending(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 96 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 96 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 96 */
among_var = find_among_b(z, a_6, 30); /* substring, line 96 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 96 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
if (!(eq_s_b(z, 1, s_4))) return 0;
break;
case 2:
if (!(eq_s_b(z, 1, s_5))) return 0;
break;
case 3:
if (!(eq_s_b(z, 1, s_6))) return 0;
break;
case 4:
if (!(eq_s_b(z, 1, s_7))) return 0;
break;
case 5:
if (!(eq_s_b(z, 2, s_8))) return 0;
break;
case 6:
if (!(eq_s_b(z, 2, s_9))) return 0;
break;
case 7:
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
{ int m2 = z->l - z->c; (void)m2; /* and, line 113 */
{ int m3 = z->l - z->c; (void)m3; /* or, line 112 */
{ int ret = r_LONG(z);
if (ret == 0) goto lab2; /* call LONG, line 111 */
if (ret < 0) return ret;
}
goto lab1;
lab2:
z->c = z->l - m3;
if (!(eq_s_b(z, 2, s_10))) { z->c = z->l - m_keep; goto lab0; }
}
lab1:
z->c = z->l - m2;
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
if (ret < 0) { z->c = z->l - m_keep; goto lab0; }
z->c = ret; /* next, line 113 */
}
}
z->bra = z->c; /* ], line 113 */
lab0:
;
}
break;
case 8:
if (in_grouping_b_U(z, g_V1, 97, 246, 0)) return 0;
if (out_grouping_b_U(z, g_V1, 97, 246, 0)) return 0;
break;
case 9:
if (!(eq_s_b(z, 1, s_11))) return 0;
break;
}
{ int ret = slice_del(z); /* delete, line 138 */
if (ret < 0) return ret;
}
z->B[0] = 1; /* set ending_removed, line 139 */
return 1;
}
static int r_other_endings(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 142 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[1]) return 0;
z->c = z->I[1]; /* tomark, line 142 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 142 */
among_var = find_among_b(z, a_7, 14); /* substring, line 142 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 142 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int m2 = z->l - z->c; (void)m2; /* not, line 146 */
if (!(eq_s_b(z, 2, s_12))) goto lab0;
return 0;
lab0:
z->c = z->l - m2;
}
break;
}
{ int ret = slice_del(z); /* delete, line 151 */
if (ret < 0) return ret;
}
return 1;
}
static int r_i_plural(struct SN_env * z) {
{ int mlimit; /* setlimit, line 154 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 154 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 154 */
if (z->c <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 106)) { z->lb = mlimit; return 0; }
if (!(find_among_b(z, a_8, 2))) { z->lb = mlimit; return 0; } /* substring, line 154 */
z->bra = z->c; /* ], line 154 */
z->lb = mlimit;
}
{ int ret = slice_del(z); /* delete, line 158 */
if (ret < 0) return ret;
}
return 1;
}
static int r_t_plural(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 161 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 161 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 162 */
if (!(eq_s_b(z, 1, s_13))) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 162 */
{ int m_test = z->l - z->c; /* test, line 162 */
if (in_grouping_b_U(z, g_V1, 97, 246, 0)) { z->lb = mlimit; return 0; }
z->c = z->l - m_test;
}
{ int ret = slice_del(z); /* delete, line 163 */
if (ret < 0) return ret;
}
z->lb = mlimit;
}
{ int mlimit; /* setlimit, line 165 */
int m2 = z->l - z->c; (void)m2;
if (z->c < z->I[1]) return 0;
z->c = z->I[1]; /* tomark, line 165 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m2;
z->ket = z->c; /* [, line 165 */
if (z->c - 2 <= z->lb || z->p[z->c - 1] != 97) { z->lb = mlimit; return 0; }
among_var = find_among_b(z, a_9, 2); /* substring, line 165 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 165 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int m3 = z->l - z->c; (void)m3; /* not, line 167 */
if (!(eq_s_b(z, 2, s_14))) goto lab0;
return 0;
lab0:
z->c = z->l - m3;
}
break;
}
{ int ret = slice_del(z); /* delete, line 170 */
if (ret < 0) return ret;
}
return 1;
}
static int r_tidy(struct SN_env * z) {
{ int mlimit; /* setlimit, line 173 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 173 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
{ int m2 = z->l - z->c; (void)m2; /* do, line 174 */
{ int m3 = z->l - z->c; (void)m3; /* and, line 174 */
{ int ret = r_LONG(z);
if (ret == 0) goto lab0; /* call LONG, line 174 */
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->ket = z->c; /* [, line 174 */
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
if (ret < 0) goto lab0;
z->c = ret; /* next, line 174 */
}
z->bra = z->c; /* ], line 174 */
{ int ret = slice_del(z); /* delete, line 174 */
if (ret < 0) return ret;
}
}
lab0:
z->c = z->l - m2;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 175 */
z->ket = z->c; /* [, line 175 */
if (in_grouping_b_U(z, g_AEI, 97, 228, 0)) goto lab1;
z->bra = z->c; /* ], line 175 */
if (out_grouping_b_U(z, g_V1, 97, 246, 0)) goto lab1;
{ int ret = slice_del(z); /* delete, line 175 */
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m4;
}
{ int m5 = z->l - z->c; (void)m5; /* do, line 176 */
z->ket = z->c; /* [, line 176 */
if (!(eq_s_b(z, 1, s_15))) goto lab2;
z->bra = z->c; /* ], line 176 */
{ int m6 = z->l - z->c; (void)m6; /* or, line 176 */
if (!(eq_s_b(z, 1, s_16))) goto lab4;
goto lab3;
lab4:
z->c = z->l - m6;
if (!(eq_s_b(z, 1, s_17))) goto lab2;
}
lab3:
{ int ret = slice_del(z); /* delete, line 176 */
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m5;
}
{ int m7 = z->l - z->c; (void)m7; /* do, line 177 */
z->ket = z->c; /* [, line 177 */
if (!(eq_s_b(z, 1, s_18))) goto lab5;
z->bra = z->c; /* ], line 177 */
if (!(eq_s_b(z, 1, s_19))) goto lab5;
{ int ret = slice_del(z); /* delete, line 177 */
if (ret < 0) return ret;
}
lab5:
z->c = z->l - m7;
}
z->lb = mlimit;
}
if (in_grouping_b_U(z, g_V1, 97, 246, 1) < 0) return 0; /* goto */ /* non V1, line 179 */
z->ket = z->c; /* [, line 179 */
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
if (ret < 0) return 0;
z->c = ret; /* next, line 179 */
}
z->bra = z->c; /* ], line 179 */
z->S[0] = slice_to(z, z->S[0]); /* -> x, line 179 */
if (z->S[0] == 0) return -1; /* -> x, line 179 */
if (!(eq_v_b(z, z->S[0]))) return 0; /* name x, line 179 */
{ int ret = slice_del(z); /* delete, line 179 */
if (ret < 0) return ret;
}
return 1;
}
extern int finnish_UTF_8_stem(struct SN_env * z) {
{ int c1 = z->c; /* do, line 185 */
{ int ret = r_mark_regions(z);
if (ret == 0) goto lab0; /* call mark_regions, line 185 */
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->B[0] = 0; /* unset ending_removed, line 186 */
z->lb = z->c; z->c = z->l; /* backwards, line 187 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 188 */
{ int ret = r_particle_etc(z);
if (ret == 0) goto lab1; /* call particle_etc, line 188 */
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 189 */
{ int ret = r_possessive(z);
if (ret == 0) goto lab2; /* call possessive, line 189 */
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 190 */
{ int ret = r_case_ending(z);
if (ret == 0) goto lab3; /* call case_ending, line 190 */
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
{ int m5 = z->l - z->c; (void)m5; /* do, line 191 */
{ int ret = r_other_endings(z);
if (ret == 0) goto lab4; /* call other_endings, line 191 */
if (ret < 0) return ret;
}
lab4:
z->c = z->l - m5;
}
{ int m6 = z->l - z->c; (void)m6; /* or, line 192 */
if (!(z->B[0])) goto lab6; /* Boolean test ending_removed, line 192 */
{ int m7 = z->l - z->c; (void)m7; /* do, line 192 */
{ int ret = r_i_plural(z);
if (ret == 0) goto lab7; /* call i_plural, line 192 */
if (ret < 0) return ret;
}
lab7:
z->c = z->l - m7;
}
goto lab5;
lab6:
z->c = z->l - m6;
{ int m8 = z->l - z->c; (void)m8; /* do, line 192 */
{ int ret = r_t_plural(z);
if (ret == 0) goto lab8; /* call t_plural, line 192 */
if (ret < 0) return ret;
}
lab8:
z->c = z->l - m8;
}
}
lab5:
{ int m9 = z->l - z->c; (void)m9; /* do, line 193 */
{ int ret = r_tidy(z);
if (ret == 0) goto lab9; /* call tidy, line 193 */
if (ret < 0) return ret;
}
lab9:
z->c = z->l - m9;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * finnish_UTF_8_create_env(void) { return SN_create_env(1, 2, 1); }
extern void finnish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 1); }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,509 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int german_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_standard_suffix(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_postlude(struct SN_env * z);
static int r_prelude(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * german_UTF_8_create_env(void);
extern void german_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_1[1] = { 'U' };
static const symbol s_0_2[1] = { 'Y' };
static const symbol s_0_3[2] = { 0xC3, 0xA4 };
static const symbol s_0_4[2] = { 0xC3, 0xB6 };
static const symbol s_0_5[2] = { 0xC3, 0xBC };
static const struct among a_0[6] =
{
/* 0 */ { 0, 0, -1, 6, 0},
/* 1 */ { 1, s_0_1, 0, 2, 0},
/* 2 */ { 1, s_0_2, 0, 1, 0},
/* 3 */ { 2, s_0_3, 0, 3, 0},
/* 4 */ { 2, s_0_4, 0, 4, 0},
/* 5 */ { 2, s_0_5, 0, 5, 0}
};
static const symbol s_1_0[1] = { 'e' };
static const symbol s_1_1[2] = { 'e', 'm' };
static const symbol s_1_2[2] = { 'e', 'n' };
static const symbol s_1_3[3] = { 'e', 'r', 'n' };
static const symbol s_1_4[2] = { 'e', 'r' };
static const symbol s_1_5[1] = { 's' };
static const symbol s_1_6[2] = { 'e', 's' };
static const struct among a_1[7] =
{
/* 0 */ { 1, s_1_0, -1, 1, 0},
/* 1 */ { 2, s_1_1, -1, 1, 0},
/* 2 */ { 2, s_1_2, -1, 1, 0},
/* 3 */ { 3, s_1_3, -1, 1, 0},
/* 4 */ { 2, s_1_4, -1, 1, 0},
/* 5 */ { 1, s_1_5, -1, 2, 0},
/* 6 */ { 2, s_1_6, 5, 1, 0}
};
static const symbol s_2_0[2] = { 'e', 'n' };
static const symbol s_2_1[2] = { 'e', 'r' };
static const symbol s_2_2[2] = { 's', 't' };
static const symbol s_2_3[3] = { 'e', 's', 't' };
static const struct among a_2[4] =
{
/* 0 */ { 2, s_2_0, -1, 1, 0},
/* 1 */ { 2, s_2_1, -1, 1, 0},
/* 2 */ { 2, s_2_2, -1, 2, 0},
/* 3 */ { 3, s_2_3, 2, 1, 0}
};
static const symbol s_3_0[2] = { 'i', 'g' };
static const symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };
static const struct among a_3[2] =
{
/* 0 */ { 2, s_3_0, -1, 1, 0},
/* 1 */ { 4, s_3_1, -1, 1, 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] = { 'u', 'n', 'g' };
static const symbol s_4_3[4] = { 'l', 'i', 'c', 'h' };
static const symbol s_4_4[4] = { 'i', 's', 'c', 'h' };
static const symbol s_4_5[2] = { 'i', 'k' };
static const symbol s_4_6[4] = { 'h', 'e', 'i', 't' };
static const symbol s_4_7[4] = { 'k', 'e', 'i', 't' };
static const struct among a_4[8] =
{
/* 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, 2, 0},
/* 5 */ { 2, s_4_5, -1, 2, 0},
/* 6 */ { 4, s_4_6, -1, 3, 0},
/* 7 */ { 4, s_4_7, -1, 4, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
static const unsigned char g_s_ending[] = { 117, 30, 5 };
static const unsigned char g_st_ending[] = { 117, 30, 4 };
static const symbol s_0[] = { 0xC3, 0x9F };
static const symbol s_1[] = { 's', 's' };
static const symbol s_2[] = { 'u' };
static const symbol s_3[] = { 'U' };
static const symbol s_4[] = { 'y' };
static const symbol s_5[] = { 'Y' };
static const symbol s_6[] = { 'y' };
static const symbol s_7[] = { 'u' };
static const symbol s_8[] = { 'a' };
static const symbol s_9[] = { 'o' };
static const symbol s_10[] = { 'u' };
static const symbol s_11[] = { 'i', 'g' };
static const symbol s_12[] = { 'e' };
static const symbol s_13[] = { 'e' };
static const symbol s_14[] = { 'e', 'r' };
static const symbol s_15[] = { 'e', 'n' };
static int r_prelude(struct SN_env * z) {
{ int c_test = z->c; /* test, line 30 */
while(1) { /* repeat, line 30 */
int c1 = z->c;
{ int c2 = z->c; /* or, line 33 */
z->bra = z->c; /* [, line 32 */
if (!(eq_s(z, 2, s_0))) goto lab2;
z->ket = z->c; /* ], line 32 */
{ int ret = slice_from_s(z, 2, s_1); /* <-, line 32 */
if (ret < 0) return ret;
}
goto lab1;
lab2:
z->c = c2;
{ int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
if (ret < 0) goto lab0;
z->c = ret; /* next, line 33 */
}
}
lab1:
continue;
lab0:
z->c = c1;
break;
}
z->c = c_test;
}
while(1) { /* repeat, line 36 */
int c3 = z->c;
while(1) { /* goto, line 36 */
int c4 = z->c;
if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
z->bra = z->c; /* [, line 37 */
{ int c5 = z->c; /* or, line 37 */
if (!(eq_s(z, 1, s_2))) goto lab6;
z->ket = z->c; /* ], line 37 */
if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab6;
{ int ret = slice_from_s(z, 1, s_3); /* <-, line 37 */
if (ret < 0) return ret;
}
goto lab5;
lab6:
z->c = c5;
if (!(eq_s(z, 1, s_4))) goto lab4;
z->ket = z->c; /* ], line 38 */
if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
{ int ret = slice_from_s(z, 1, s_5); /* <-, line 38 */
if (ret < 0) return ret;
}
}
lab5:
z->c = c4;
break;
lab4:
z->c = c4;
{ int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
if (ret < 0) goto lab3;
z->c = ret; /* goto, line 36 */
}
}
continue;
lab3:
z->c = c3;
break;
}
return 1;
}
static int r_mark_regions(struct SN_env * z) {
z->I[0] = z->l;
z->I[1] = z->l;
{ int c_test = z->c; /* test, line 47 */
{ int ret = skip_utf8(z->p, z->c, 0, z->l, + 3);
if (ret < 0) return 0;
z->c = ret; /* hop, line 47 */
}
z->I[2] = z->c; /* setmark x, line 47 */
z->c = c_test;
}
{ /* gopast */ /* grouping v, line 49 */
int ret = out_grouping_U(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
{ /* gopast */ /* non v, line 49 */
int ret = in_grouping_U(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[0] = z->c; /* setmark p1, line 49 */
/* try, line 50 */
if (!(z->I[0] < z->I[2])) goto lab0;
z->I[0] = z->I[2];
lab0:
{ /* gopast */ /* grouping v, line 51 */
int ret = out_grouping_U(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
{ /* gopast */ /* non v, line 51 */
int ret = in_grouping_U(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[1] = z->c; /* setmark p2, line 51 */
return 1;
}
static int r_postlude(struct SN_env * z) {
int among_var;
while(1) { /* repeat, line 55 */
int c1 = z->c;
z->bra = z->c; /* [, line 57 */
among_var = find_among(z, a_0, 6); /* substring, line 57 */
if (!(among_var)) goto lab0;
z->ket = z->c; /* ], line 57 */
switch(among_var) {
case 0: goto lab0;
case 1:
{ int ret = slice_from_s(z, 1, s_6); /* <-, line 58 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 1, s_7); /* <-, line 59 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 1, s_8); /* <-, line 60 */
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 1, s_9); /* <-, line 61 */
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = slice_from_s(z, 1, s_10); /* <-, line 62 */
if (ret < 0) return ret;
}
break;
case 6:
{ int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
if (ret < 0) goto lab0;
z->c = ret; /* next, line 63 */
}
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_standard_suffix(struct SN_env * z) {
int among_var;
{ int m1 = z->l - z->c; (void)m1; /* do, line 74 */
z->ket = z->c; /* [, line 75 */
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
among_var = find_among_b(z, a_1, 7); /* substring, line 75 */
if (!(among_var)) goto lab0;
z->bra = z->c; /* ], line 75 */
{ int ret = r_R1(z);
if (ret == 0) goto lab0; /* call R1, line 75 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: goto lab0;
case 1:
{ int ret = slice_del(z); /* delete, line 77 */
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b_U(z, g_s_ending, 98, 116, 0)) goto lab0;
{ int ret = slice_del(z); /* delete, line 80 */
if (ret < 0) return ret;
}
break;
}
lab0:
z->c = z->l - m1;
}
{ int m2 = z->l - z->c; (void)m2; /* do, line 84 */
z->ket = z->c; /* [, line 85 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab1;
among_var = find_among_b(z, a_2, 4); /* substring, line 85 */
if (!(among_var)) goto lab1;
z->bra = z->c; /* ], line 85 */
{ int ret = r_R1(z);
if (ret == 0) goto lab1; /* call R1, line 85 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: goto lab1;
case 1:
{ int ret = slice_del(z); /* delete, line 87 */
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b_U(z, g_st_ending, 98, 116, 0)) goto lab1;
{ int ret = skip_utf8(z->p, z->c, z->lb, z->l, - 3);
if (ret < 0) goto lab1;
z->c = ret; /* hop, line 90 */
}
{ int ret = slice_del(z); /* delete, line 90 */
if (ret < 0) return ret;
}
break;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 94 */
z->ket = z->c; /* [, line 95 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
among_var = find_among_b(z, a_4, 8); /* substring, line 95 */
if (!(among_var)) goto lab2;
z->bra = z->c; /* ], line 95 */
{ int ret = r_R2(z);
if (ret == 0) goto lab2; /* call R2, line 95 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: goto lab2;
case 1:
{ int ret = slice_del(z); /* delete, line 97 */
if (ret < 0) return ret;
}
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 98 */
z->ket = z->c; /* [, line 98 */
if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m_keep; goto lab3; }
z->bra = z->c; /* ], line 98 */
{ int m4 = z->l - z->c; (void)m4; /* not, line 98 */
if (!(eq_s_b(z, 1, s_12))) goto lab4;
{ z->c = z->l - m_keep; goto lab3; }
lab4:
z->c = z->l - m4;
}
{ int ret = r_R2(z);
if (ret == 0) { z->c = z->l - m_keep; goto lab3; } /* call R2, line 98 */
if (ret < 0) return ret;
}
{ int ret = slice_del(z); /* delete, line 98 */
if (ret < 0) return ret;
}
lab3:
;
}
break;
case 2:
{ int m5 = z->l - z->c; (void)m5; /* not, line 101 */
if (!(eq_s_b(z, 1, s_13))) goto lab5;
goto lab2;
lab5:
z->c = z->l - m5;
}
{ int ret = slice_del(z); /* delete, line 101 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z); /* delete, line 104 */
if (ret < 0) return ret;
}
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 105 */
z->ket = z->c; /* [, line 106 */
{ int m6 = z->l - z->c; (void)m6; /* or, line 106 */
if (!(eq_s_b(z, 2, s_14))) goto lab8;
goto lab7;
lab8:
z->c = z->l - m6;
if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m_keep; goto lab6; }
}
lab7:
z->bra = z->c; /* ], line 106 */
{ int ret = r_R1(z);
if (ret == 0) { z->c = z->l - m_keep; goto lab6; } /* call R1, line 106 */
if (ret < 0) return ret;
}
{ int ret = slice_del(z); /* delete, line 106 */
if (ret < 0) return ret;
}
lab6:
;
}
break;
case 4:
{ int ret = slice_del(z); /* delete, line 110 */
if (ret < 0) return ret;
}
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
z->ket = z->c; /* [, line 112 */
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - m_keep; goto lab9; }
among_var = find_among_b(z, a_3, 2); /* substring, line 112 */
if (!(among_var)) { z->c = z->l - m_keep; goto lab9; }
z->bra = z->c; /* ], line 112 */
{ int ret = r_R2(z);
if (ret == 0) { z->c = z->l - m_keep; goto lab9; } /* call R2, line 112 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: { z->c = z->l - m_keep; goto lab9; }
case 1:
{ int ret = slice_del(z); /* delete, line 114 */
if (ret < 0) return ret;
}
break;
}
lab9:
;
}
break;
}
lab2:
z->c = z->l - m3;
}
return 1;
}
extern int german_UTF_8_stem(struct SN_env * z) {
{ int c1 = z->c; /* do, line 125 */
{ int ret = r_prelude(z);
if (ret == 0) goto lab0; /* call prelude, line 125 */
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
{ int c2 = z->c; /* do, line 126 */
{ int ret = r_mark_regions(z);
if (ret == 0) goto lab1; /* call mark_regions, line 126 */
if (ret < 0) return ret;
}
lab1:
z->c = c2;
}
z->lb = z->c; z->c = z->l; /* backwards, line 127 */
{ int m3 = z->l - z->c; (void)m3; /* do, line 128 */
{ int ret = r_standard_suffix(z);
if (ret == 0) goto lab2; /* call standard_suffix, line 128 */
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
z->c = z->lb;
{ int c4 = z->c; /* do, line 129 */
{ int ret = r_postlude(z);
if (ret == 0) goto lab3; /* call postlude, line 129 */
if (ret < 0) return ret;
}
lab3:
z->c = c4;
}
return 1;
}
extern struct SN_env * german_UTF_8_create_env(void) { return SN_create_env(0, 3, 0); }
extern void german_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,299 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int norwegian_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
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 * norwegian_UTF_8_create_env(void);
extern void norwegian_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[1] = { 'a' };
static const symbol s_0_1[1] = { 'e' };
static const symbol s_0_2[3] = { 'e', 'd', 'e' };
static const symbol s_0_3[4] = { 'a', 'n', 'd', 'e' };
static const symbol s_0_4[4] = { 'e', 'n', 'd', 'e' };
static const symbol s_0_5[3] = { 'a', 'n', 'e' };
static const symbol s_0_6[3] = { 'e', 'n', 'e' };
static const symbol s_0_7[6] = { 'h', 'e', 't', 'e', 'n', 'e' };
static const symbol s_0_8[4] = { 'e', 'r', 't', 'e' };
static const symbol s_0_9[2] = { 'e', 'n' };
static const symbol s_0_10[5] = { 'h', 'e', 't', 'e', 'n' };
static const symbol s_0_11[2] = { 'a', 'r' };
static const symbol s_0_12[2] = { 'e', 'r' };
static const symbol s_0_13[5] = { 'h', 'e', 't', 'e', 'r' };
static const symbol s_0_14[1] = { 's' };
static const symbol s_0_15[2] = { 'a', 's' };
static const symbol s_0_16[2] = { 'e', 's' };
static const symbol s_0_17[4] = { 'e', 'd', 'e', 's' };
static const symbol s_0_18[5] = { 'e', 'n', 'd', 'e', 's' };
static const symbol s_0_19[4] = { 'e', 'n', 'e', 's' };
static const symbol s_0_20[7] = { 'h', 'e', 't', 'e', 'n', 'e', 's' };
static const symbol s_0_21[3] = { 'e', 'n', 's' };
static const symbol s_0_22[6] = { 'h', 'e', 't', 'e', 'n', 's' };
static const symbol s_0_23[3] = { 'e', 'r', 's' };
static const symbol s_0_24[3] = { 'e', 't', 's' };
static const symbol s_0_25[2] = { 'e', 't' };
static const symbol s_0_26[3] = { 'h', 'e', 't' };
static const symbol s_0_27[3] = { 'e', 'r', 't' };
static const symbol s_0_28[3] = { 'a', 's', 't' };
static const struct among a_0[29] =
{
/* 0 */ { 1, s_0_0, -1, 1, 0},
/* 1 */ { 1, s_0_1, -1, 1, 0},
/* 2 */ { 3, s_0_2, 1, 1, 0},
/* 3 */ { 4, s_0_3, 1, 1, 0},
/* 4 */ { 4, s_0_4, 1, 1, 0},
/* 5 */ { 3, s_0_5, 1, 1, 0},
/* 6 */ { 3, s_0_6, 1, 1, 0},
/* 7 */ { 6, s_0_7, 6, 1, 0},
/* 8 */ { 4, s_0_8, 1, 3, 0},
/* 9 */ { 2, s_0_9, -1, 1, 0},
/* 10 */ { 5, s_0_10, 9, 1, 0},
/* 11 */ { 2, s_0_11, -1, 1, 0},
/* 12 */ { 2, s_0_12, -1, 1, 0},
/* 13 */ { 5, s_0_13, 12, 1, 0},
/* 14 */ { 1, s_0_14, -1, 2, 0},
/* 15 */ { 2, s_0_15, 14, 1, 0},
/* 16 */ { 2, s_0_16, 14, 1, 0},
/* 17 */ { 4, s_0_17, 16, 1, 0},
/* 18 */ { 5, s_0_18, 16, 1, 0},
/* 19 */ { 4, s_0_19, 16, 1, 0},
/* 20 */ { 7, s_0_20, 19, 1, 0},
/* 21 */ { 3, s_0_21, 14, 1, 0},
/* 22 */ { 6, s_0_22, 21, 1, 0},
/* 23 */ { 3, s_0_23, 14, 1, 0},
/* 24 */ { 3, s_0_24, 14, 1, 0},
/* 25 */ { 2, s_0_25, -1, 1, 0},
/* 26 */ { 3, s_0_26, 25, 1, 0},
/* 27 */ { 3, s_0_27, -1, 3, 0},
/* 28 */ { 3, s_0_28, -1, 1, 0}
};
static const symbol s_1_0[2] = { 'd', 't' };
static const symbol s_1_1[2] = { 'v', 't' };
static const struct among a_1[2] =
{
/* 0 */ { 2, s_1_0, -1, -1, 0},
/* 1 */ { 2, s_1_1, -1, -1, 0}
};
static const symbol s_2_0[3] = { 'l', 'e', 'g' };
static const symbol s_2_1[4] = { 'e', 'l', 'e', 'g' };
static const symbol s_2_2[2] = { 'i', 'g' };
static const symbol s_2_3[3] = { 'e', 'i', 'g' };
static const symbol s_2_4[3] = { 'l', 'i', 'g' };
static const symbol s_2_5[4] = { 'e', 'l', 'i', 'g' };
static const symbol s_2_6[3] = { 'e', 'l', 's' };
static const symbol s_2_7[3] = { 'l', 'o', 'v' };
static const symbol s_2_8[4] = { 'e', 'l', 'o', 'v' };
static const symbol s_2_9[4] = { 's', 'l', 'o', 'v' };
static const symbol s_2_10[7] = { 'h', 'e', 't', 's', 'l', 'o', 'v' };
static const struct among a_2[11] =
{
/* 0 */ { 3, s_2_0, -1, 1, 0},
/* 1 */ { 4, s_2_1, 0, 1, 0},
/* 2 */ { 2, s_2_2, -1, 1, 0},
/* 3 */ { 3, s_2_3, 2, 1, 0},
/* 4 */ { 3, s_2_4, 2, 1, 0},
/* 5 */ { 4, s_2_5, 4, 1, 0},
/* 6 */ { 3, s_2_6, -1, 1, 0},
/* 7 */ { 3, s_2_7, -1, 1, 0},
/* 8 */ { 4, s_2_8, 7, 1, 0},
/* 9 */ { 4, s_2_9, 7, 1, 0},
/* 10 */ { 7, s_2_10, 9, 1, 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[] = { 119, 125, 149, 1 };
static const symbol s_0[] = { 'k' };
static const symbol s_1[] = { 'e', 'r' };
static int r_mark_regions(struct SN_env * z) {
z->I[0] = z->l;
{ int c_test = z->c; /* test, line 30 */
{ int ret = skip_utf8(z->p, z->c, 0, z->l, + 3);
if (ret < 0) return 0;
z->c = ret; /* hop, line 30 */
}
z->I[1] = z->c; /* setmark x, line 30 */
z->c = c_test;
}
if (out_grouping_U(z, g_v, 97, 248, 1) < 0) return 0; /* goto */ /* grouping v, line 31 */
{ /* gopast */ /* non v, line 31 */
int ret = in_grouping_U(z, g_v, 97, 248, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[0] = z->c; /* setmark p1, line 31 */
/* try, line 32 */
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 38 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 38 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 38 */
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851426 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
among_var = find_among_b(z, a_0, 29); /* substring, line 38 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 38 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 44 */
if (ret < 0) return ret;
}
break;
case 2:
{ int m2 = z->l - z->c; (void)m2; /* or, line 46 */
if (in_grouping_b_U(z, g_s_ending, 98, 122, 0)) goto lab1;
goto lab0;
lab1:
z->c = z->l - m2;
if (!(eq_s_b(z, 1, s_0))) return 0;
if (out_grouping_b_U(z, g_v, 97, 248, 0)) return 0;
}
lab0:
{ int ret = slice_del(z); /* delete, line 46 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 2, s_1); /* <-, line 48 */
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 53 */
{ int mlimit; /* setlimit, line 54 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 54 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 54 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] != 116) { z->lb = mlimit; return 0; }
if (!(find_among_b(z, a_1, 2))) { z->lb = mlimit; return 0; } /* substring, line 54 */
z->bra = z->c; /* ], line 54 */
z->lb = mlimit;
}
z->c = z->l - m_test;
}
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
if (ret < 0) return 0;
z->c = ret; /* next, line 59 */
}
z->bra = z->c; /* ], line 59 */
{ int ret = slice_del(z); /* delete, line 59 */
if (ret < 0) return ret;
}
return 1;
}
static int r_other_suffix(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 63 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 63 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 63 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((4718720 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
among_var = find_among_b(z, a_2, 11); /* substring, line 63 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 63 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 67 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
extern int norwegian_UTF_8_stem(struct SN_env * z) {
{ int c1 = z->c; /* do, line 74 */
{ int ret = r_mark_regions(z);
if (ret == 0) goto lab0; /* call mark_regions, line 74 */
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->lb = z->c; z->c = z->l; /* backwards, line 75 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 76 */
{ int ret = r_main_suffix(z);
if (ret == 0) goto lab1; /* call main_suffix, line 76 */
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 77 */
{ int ret = r_consonant_pair(z);
if (ret == 0) goto lab2; /* call consonant_pair, line 77 */
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 78 */
{ int ret = r_other_suffix(z);
if (ret == 0) goto lab3; /* call other_suffix, line 78 */
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * norwegian_UTF_8_create_env(void) { return SN_create_env(0, 2, 0); }
extern void norwegian_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }

View File

@ -0,0 +1,755 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int porter_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_Step_5b(struct SN_env * z);
static int r_Step_5a(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);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * porter_UTF_8_create_env(void);
extern void porter_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[1] = { 's' };
static const symbol s_0_1[3] = { 'i', 'e', 's' };
static const symbol s_0_2[4] = { 's', 's', 'e', 's' };
static const symbol s_0_3[2] = { 's', 's' };
static const struct among a_0[4] =
{
/* 0 */ { 1, s_0_0, -1, 3, 0},
/* 1 */ { 3, s_0_1, 0, 2, 0},
/* 2 */ { 4, s_0_2, 0, 1, 0},
/* 3 */ { 2, s_0_3, 0, -1, 0}
};
static const symbol s_1_1[2] = { 'b', 'b' };
static const symbol s_1_2[2] = { 'd', 'd' };
static const symbol s_1_3[2] = { 'f', 'f' };
static const symbol s_1_4[2] = { 'g', 'g' };
static const symbol s_1_5[2] = { 'b', 'l' };
static const symbol s_1_6[2] = { 'm', 'm' };
static const symbol s_1_7[2] = { 'n', 'n' };
static const symbol s_1_8[2] = { 'p', 'p' };
static const symbol s_1_9[2] = { 'r', 'r' };
static const symbol s_1_10[2] = { 'a', 't' };
static const symbol s_1_11[2] = { 't', 't' };
static const symbol s_1_12[2] = { 'i', 'z' };
static const struct among a_1[13] =
{
/* 0 */ { 0, 0, -1, 3, 0},
/* 1 */ { 2, s_1_1, 0, 2, 0},
/* 2 */ { 2, s_1_2, 0, 2, 0},
/* 3 */ { 2, s_1_3, 0, 2, 0},
/* 4 */ { 2, s_1_4, 0, 2, 0},
/* 5 */ { 2, s_1_5, 0, 1, 0},
/* 6 */ { 2, s_1_6, 0, 2, 0},
/* 7 */ { 2, s_1_7, 0, 2, 0},
/* 8 */ { 2, s_1_8, 0, 2, 0},
/* 9 */ { 2, s_1_9, 0, 2, 0},
/* 10 */ { 2, s_1_10, 0, 1, 0},
/* 11 */ { 2, s_1_11, 0, 2, 0},
/* 12 */ { 2, s_1_12, 0, 1, 0}
};
static const symbol s_2_0[2] = { 'e', 'd' };
static const symbol s_2_1[3] = { 'e', 'e', 'd' };
static const symbol s_2_2[3] = { 'i', 'n', 'g' };
static const struct among a_2[3] =
{
/* 0 */ { 2, s_2_0, -1, 2, 0},
/* 1 */ { 3, s_2_1, 0, 1, 0},
/* 2 */ { 3, s_2_2, -1, 2, 0}
};
static const symbol s_3_0[4] = { 'a', 'n', 'c', 'i' };
static const symbol s_3_1[4] = { 'e', 'n', 'c', 'i' };
static const symbol s_3_2[4] = { 'a', 'b', 'l', 'i' };
static const symbol s_3_3[3] = { 'e', 'l', 'i' };
static const symbol s_3_4[4] = { 'a', 'l', 'l', 'i' };
static const symbol s_3_5[5] = { 'o', 'u', 's', 'l', 'i' };
static const symbol s_3_6[5] = { 'e', 'n', 't', 'l', 'i' };
static const symbol s_3_7[5] = { 'a', 'l', 'i', 't', 'i' };
static const symbol s_3_8[6] = { 'b', 'i', 'l', 'i', 't', 'i' };
static const symbol s_3_9[5] = { 'i', 'v', 'i', 't', 'i' };
static const symbol s_3_10[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
static const symbol s_3_11[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
static const symbol s_3_12[5] = { 'a', 'l', 'i', 's', 'm' };
static const symbol s_3_13[5] = { 'a', 't', 'i', 'o', 'n' };
static const symbol s_3_14[7] = { 'i', 'z', 'a', 't', 'i', 'o', 'n' };
static const symbol s_3_15[4] = { 'i', 'z', 'e', 'r' };
static const symbol s_3_16[4] = { 'a', 't', 'o', 'r' };
static const symbol s_3_17[7] = { 'i', 'v', 'e', 'n', 'e', 's', 's' };
static const symbol s_3_18[7] = { 'f', 'u', 'l', 'n', 'e', 's', 's' };
static const symbol s_3_19[7] = { 'o', 'u', 's', 'n', 'e', 's', 's' };
static const struct among a_3[20] =
{
/* 0 */ { 4, s_3_0, -1, 3, 0},
/* 1 */ { 4, s_3_1, -1, 2, 0},
/* 2 */ { 4, s_3_2, -1, 4, 0},
/* 3 */ { 3, s_3_3, -1, 6, 0},
/* 4 */ { 4, s_3_4, -1, 9, 0},
/* 5 */ { 5, s_3_5, -1, 12, 0},
/* 6 */ { 5, s_3_6, -1, 5, 0},
/* 7 */ { 5, s_3_7, -1, 10, 0},
/* 8 */ { 6, s_3_8, -1, 14, 0},
/* 9 */ { 5, s_3_9, -1, 13, 0},
/* 10 */ { 6, s_3_10, -1, 1, 0},
/* 11 */ { 7, s_3_11, 10, 8, 0},
/* 12 */ { 5, s_3_12, -1, 10, 0},
/* 13 */ { 5, s_3_13, -1, 8, 0},
/* 14 */ { 7, s_3_14, 13, 7, 0},
/* 15 */ { 4, s_3_15, -1, 7, 0},
/* 16 */ { 4, s_3_16, -1, 8, 0},
/* 17 */ { 7, s_3_17, -1, 13, 0},
/* 18 */ { 7, s_3_18, -1, 11, 0},
/* 19 */ { 7, s_3_19, -1, 12, 0}
};
static const symbol s_4_0[5] = { 'i', 'c', 'a', 't', 'e' };
static const symbol s_4_1[5] = { 'a', 't', 'i', 'v', 'e' };
static const symbol s_4_2[5] = { 'a', 'l', 'i', 'z', 'e' };
static const symbol s_4_3[5] = { 'i', 'c', 'i', 't', 'i' };
static const symbol s_4_4[4] = { 'i', 'c', 'a', 'l' };
static const symbol s_4_5[3] = { 'f', 'u', 'l' };
static const symbol s_4_6[4] = { 'n', 'e', 's', 's' };
static const struct among a_4[7] =
{
/* 0 */ { 5, s_4_0, -1, 2, 0},
/* 1 */ { 5, s_4_1, -1, 3, 0},
/* 2 */ { 5, s_4_2, -1, 1, 0},
/* 3 */ { 5, s_4_3, -1, 2, 0},
/* 4 */ { 4, s_4_4, -1, 2, 0},
/* 5 */ { 3, s_4_5, -1, 3, 0},
/* 6 */ { 4, s_4_6, -1, 3, 0}
};
static const symbol s_5_0[2] = { 'i', 'c' };
static const symbol s_5_1[4] = { 'a', 'n', 'c', 'e' };
static const symbol s_5_2[4] = { 'e', 'n', 'c', 'e' };
static const symbol s_5_3[4] = { 'a', 'b', 'l', 'e' };
static const symbol s_5_4[4] = { 'i', 'b', 'l', 'e' };
static const symbol s_5_5[3] = { 'a', 't', 'e' };
static const symbol s_5_6[3] = { 'i', 'v', 'e' };
static const symbol s_5_7[3] = { 'i', 'z', 'e' };
static const symbol s_5_8[3] = { 'i', 't', 'i' };
static const symbol s_5_9[2] = { 'a', 'l' };
static const symbol s_5_10[3] = { 'i', 's', 'm' };
static const symbol s_5_11[3] = { 'i', 'o', 'n' };
static const symbol s_5_12[2] = { 'e', 'r' };
static const symbol s_5_13[3] = { 'o', 'u', 's' };
static const symbol s_5_14[3] = { 'a', 'n', 't' };
static const symbol s_5_15[3] = { 'e', 'n', 't' };
static const symbol s_5_16[4] = { 'm', 'e', 'n', 't' };
static const symbol s_5_17[5] = { 'e', 'm', 'e', 'n', 't' };
static const symbol s_5_18[2] = { 'o', 'u' };
static const struct among a_5[19] =
{
/* 0 */ { 2, s_5_0, -1, 1, 0},
/* 1 */ { 4, s_5_1, -1, 1, 0},
/* 2 */ { 4, s_5_2, -1, 1, 0},
/* 3 */ { 4, s_5_3, -1, 1, 0},
/* 4 */ { 4, s_5_4, -1, 1, 0},
/* 5 */ { 3, s_5_5, -1, 1, 0},
/* 6 */ { 3, s_5_6, -1, 1, 0},
/* 7 */ { 3, s_5_7, -1, 1, 0},
/* 8 */ { 3, s_5_8, -1, 1, 0},
/* 9 */ { 2, s_5_9, -1, 1, 0},
/* 10 */ { 3, s_5_10, -1, 1, 0},
/* 11 */ { 3, s_5_11, -1, 2, 0},
/* 12 */ { 2, s_5_12, -1, 1, 0},
/* 13 */ { 3, s_5_13, -1, 1, 0},
/* 14 */ { 3, s_5_14, -1, 1, 0},
/* 15 */ { 3, s_5_15, -1, 1, 0},
/* 16 */ { 4, s_5_16, 15, 1, 0},
/* 17 */ { 5, s_5_17, 16, 1, 0},
/* 18 */ { 2, s_5_18, -1, 1, 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 symbol s_0[] = { 's', 's' };
static const symbol s_1[] = { 'i' };
static const symbol s_2[] = { 'e', 'e' };
static const symbol s_3[] = { 'e' };
static const symbol s_4[] = { 'e' };
static const symbol s_5[] = { 'y' };
static const symbol s_6[] = { 'Y' };
static const symbol s_7[] = { 'i' };
static const symbol s_8[] = { 't', 'i', 'o', 'n' };
static const symbol s_9[] = { 'e', 'n', 'c', 'e' };
static const symbol s_10[] = { 'a', 'n', 'c', 'e' };
static const symbol s_11[] = { 'a', 'b', 'l', 'e' };
static const symbol s_12[] = { 'e', 'n', 't' };
static const symbol s_13[] = { 'e' };
static const symbol s_14[] = { 'i', 'z', 'e' };
static const symbol s_15[] = { 'a', 't', 'e' };
static const symbol s_16[] = { 'a', 'l' };
static const symbol s_17[] = { 'a', 'l' };
static const symbol s_18[] = { 'f', 'u', 'l' };
static const symbol s_19[] = { 'o', 'u', 's' };
static const symbol s_20[] = { 'i', 'v', 'e' };
static const symbol s_21[] = { 'b', 'l', 'e' };
static const symbol s_22[] = { 'a', 'l' };
static const symbol s_23[] = { 'i', 'c' };
static const symbol s_24[] = { 's' };
static const symbol s_25[] = { 't' };
static const symbol s_26[] = { 'e' };
static const symbol s_27[] = { 'l' };
static const symbol s_28[] = { 'l' };
static const symbol s_29[] = { 'y' };
static const symbol s_30[] = { 'Y' };
static const symbol s_31[] = { 'y' };
static const symbol s_32[] = { 'Y' };
static const symbol s_33[] = { 'Y' };
static const symbol s_34[] = { 'y' };
static int r_shortv(struct SN_env * z) {
if (out_grouping_b_U(z, g_v_WXY, 89, 121, 0)) return 0;
if (in_grouping_b_U(z, g_v, 97, 121, 0)) return 0;
if (out_grouping_b_U(z, g_v, 97, 121, 0)) return 0;
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_Step_1a(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 25 */
if (z->c <= z->lb || z->p[z->c - 1] != 115) return 0;
among_var = find_among_b(z, a_0, 4); /* substring, line 25 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 25 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_from_s(z, 2, s_0); /* <-, line 26 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 1, s_1); /* <-, line 27 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z); /* delete, line 29 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_Step_1b(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 34 */
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 103)) return 0;
among_var = find_among_b(z, a_2, 3); /* substring, line 34 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 34 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = r_R1(z);
if (ret == 0) return 0; /* call R1, line 35 */
if (ret < 0) return ret;
}
{ int ret = slice_from_s(z, 2, s_2); /* <-, line 35 */
if (ret < 0) return ret;
}
break;
case 2:
{ int m_test = z->l - z->c; /* test, line 38 */
{ /* gopast */ /* grouping v, line 38 */
int ret = out_grouping_b_U(z, g_v, 97, 121, 1);
if (ret < 0) return 0;
z->c -= ret;
}
z->c = z->l - m_test;
}
{ int ret = slice_del(z); /* delete, line 38 */
if (ret < 0) return ret;
}
{ int m_test = z->l - z->c; /* test, line 39 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((68514004 >> (z->p[z->c - 1] & 0x1f)) & 1)) among_var = 3; else
among_var = find_among_b(z, a_1, 13); /* substring, line 39 */
if (!(among_var)) return 0;
z->c = z->l - m_test;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int c_keep = z->c;
int ret = insert_s(z, z->c, z->c, 1, s_3); /* <+, line 41 */
z->c = c_keep;
if (ret < 0) return ret;
}
break;
case 2:
z->ket = z->c; /* [, line 44 */
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
if (ret < 0) return 0;
z->c = ret; /* next, line 44 */
}
z->bra = z->c; /* ], line 44 */
{ int ret = slice_del(z); /* delete, line 44 */
if (ret < 0) return ret;
}
break;
case 3:
if (z->c != z->I[0]) return 0; /* atmark, line 45 */
{ int m_test = z->l - z->c; /* test, line 45 */
{ int ret = r_shortv(z);
if (ret == 0) return 0; /* call shortv, line 45 */
if (ret < 0) return ret;
}
z->c = z->l - m_test;
}
{ int c_keep = z->c;
int ret = insert_s(z, z->c, z->c, 1, s_4); /* <+, line 45 */
z->c = c_keep;
if (ret < 0) return ret;
}
break;
}
break;
}
return 1;
}
static int r_Step_1c(struct SN_env * z) {
z->ket = z->c; /* [, line 52 */
{ int m1 = z->l - z->c; (void)m1; /* or, line 52 */
if (!(eq_s_b(z, 1, s_5))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m1;
if (!(eq_s_b(z, 1, s_6))) return 0;
}
lab0:
z->bra = z->c; /* ], line 52 */
{ /* gopast */ /* grouping v, line 53 */
int ret = out_grouping_b_U(z, g_v, 97, 121, 1);
if (ret < 0) return 0;
z->c -= ret;
}
{ int ret = slice_from_s(z, 1, s_7); /* <-, line 54 */
if (ret < 0) return ret;
}
return 1;
}
static int r_Step_2(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 58 */
if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((815616 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_3, 20); /* substring, line 58 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 58 */
{ int ret = r_R1(z);
if (ret == 0) return 0; /* call R1, line 58 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_from_s(z, 4, s_8); /* <-, line 59 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 4, s_9); /* <-, line 60 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 4, s_10); /* <-, line 61 */
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 4, s_11); /* <-, line 62 */
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = slice_from_s(z, 3, s_12); /* <-, line 63 */
if (ret < 0) return ret;
}
break;
case 6:
{ int ret = slice_from_s(z, 1, s_13); /* <-, line 64 */
if (ret < 0) return ret;
}
break;
case 7:
{ int ret = slice_from_s(z, 3, s_14); /* <-, line 66 */
if (ret < 0) return ret;
}
break;
case 8:
{ int ret = slice_from_s(z, 3, s_15); /* <-, line 68 */
if (ret < 0) return ret;
}
break;
case 9:
{ int ret = slice_from_s(z, 2, s_16); /* <-, line 69 */
if (ret < 0) return ret;
}
break;
case 10:
{ int ret = slice_from_s(z, 2, s_17); /* <-, line 71 */
if (ret < 0) return ret;
}
break;
case 11:
{ int ret = slice_from_s(z, 3, s_18); /* <-, line 72 */
if (ret < 0) return ret;
}
break;
case 12:
{ int ret = slice_from_s(z, 3, s_19); /* <-, line 74 */
if (ret < 0) return ret;
}
break;
case 13:
{ int ret = slice_from_s(z, 3, s_20); /* <-, line 76 */
if (ret < 0) return ret;
}
break;
case 14:
{ int ret = slice_from_s(z, 3, s_21); /* <-, line 77 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_Step_3(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 82 */
if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((528928 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_4, 7); /* substring, line 82 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 82 */
{ int ret = r_R1(z);
if (ret == 0) return 0; /* call R1, line 82 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_from_s(z, 2, s_22); /* <-, line 83 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 2, s_23); /* <-, line 85 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z); /* delete, line 87 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_Step_4(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 92 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((3961384 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_5, 19); /* substring, line 92 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 92 */
{ int ret = r_R2(z);
if (ret == 0) return 0; /* call R2, line 92 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 95 */
if (ret < 0) return ret;
}
break;
case 2:
{ int m1 = z->l - z->c; (void)m1; /* or, line 96 */
if (!(eq_s_b(z, 1, s_24))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m1;
if (!(eq_s_b(z, 1, s_25))) return 0;
}
lab0:
{ int ret = slice_del(z); /* delete, line 96 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_Step_5a(struct SN_env * z) {
z->ket = z->c; /* [, line 101 */
if (!(eq_s_b(z, 1, s_26))) return 0;
z->bra = z->c; /* ], line 101 */
{ int m1 = z->l - z->c; (void)m1; /* or, line 102 */
{ int ret = r_R2(z);
if (ret == 0) goto lab1; /* call R2, line 102 */
if (ret < 0) return ret;
}
goto lab0;
lab1:
z->c = z->l - m1;
{ int ret = r_R1(z);
if (ret == 0) return 0; /* call R1, line 102 */
if (ret < 0) return ret;
}
{ int m2 = z->l - z->c; (void)m2; /* not, line 102 */
{ int ret = r_shortv(z);
if (ret == 0) goto lab2; /* call shortv, line 102 */
if (ret < 0) return ret;
}
return 0;
lab2:
z->c = z->l - m2;
}
}
lab0:
{ int ret = slice_del(z); /* delete, line 103 */
if (ret < 0) return ret;
}
return 1;
}
static int r_Step_5b(struct SN_env * z) {
z->ket = z->c; /* [, line 107 */
if (!(eq_s_b(z, 1, s_27))) return 0;
z->bra = z->c; /* ], line 107 */
{ int ret = r_R2(z);
if (ret == 0) return 0; /* call R2, line 108 */
if (ret < 0) return ret;
}
if (!(eq_s_b(z, 1, s_28))) return 0;
{ int ret = slice_del(z); /* delete, line 109 */
if (ret < 0) return ret;
}
return 1;
}
extern int porter_UTF_8_stem(struct SN_env * z) {
z->B[0] = 0; /* unset Y_found, line 115 */
{ int c1 = z->c; /* do, line 116 */
z->bra = z->c; /* [, line 116 */
if (!(eq_s(z, 1, s_29))) goto lab0;
z->ket = z->c; /* ], line 116 */
{ int ret = slice_from_s(z, 1, s_30); /* <-, line 116 */
if (ret < 0) return ret;
}
z->B[0] = 1; /* set Y_found, line 116 */
lab0:
z->c = c1;
}
{ int c2 = z->c; /* do, line 117 */
while(1) { /* repeat, line 117 */
int c3 = z->c;
while(1) { /* goto, line 117 */
int c4 = z->c;
if (in_grouping_U(z, g_v, 97, 121, 0)) goto lab3;
z->bra = z->c; /* [, line 117 */
if (!(eq_s(z, 1, s_31))) goto lab3;
z->ket = z->c; /* ], line 117 */
z->c = c4;
break;
lab3:
z->c = c4;
{ int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
if (ret < 0) goto lab2;
z->c = ret; /* goto, line 117 */
}
}
{ int ret = slice_from_s(z, 1, s_32); /* <-, line 117 */
if (ret < 0) return ret;
}
z->B[0] = 1; /* set Y_found, line 117 */
continue;
lab2:
z->c = c3;
break;
}
z->c = c2;
}
z->I[0] = z->l;
z->I[1] = z->l;
{ int c5 = z->c; /* do, line 121 */
{ /* gopast */ /* grouping v, line 122 */
int ret = out_grouping_U(z, g_v, 97, 121, 1);
if (ret < 0) goto lab4;
z->c += ret;
}
{ /* gopast */ /* non v, line 122 */
int ret = in_grouping_U(z, g_v, 97, 121, 1);
if (ret < 0) goto lab4;
z->c += ret;
}
z->I[0] = z->c; /* setmark p1, line 122 */
{ /* gopast */ /* grouping v, line 123 */
int ret = out_grouping_U(z, g_v, 97, 121, 1);
if (ret < 0) goto lab4;
z->c += ret;
}
{ /* gopast */ /* non v, line 123 */
int ret = in_grouping_U(z, g_v, 97, 121, 1);
if (ret < 0) goto lab4;
z->c += ret;
}
z->I[1] = z->c; /* setmark p2, line 123 */
lab4:
z->c = c5;
}
z->lb = z->c; z->c = z->l; /* backwards, line 126 */
{ int m6 = z->l - z->c; (void)m6; /* do, line 127 */
{ int ret = r_Step_1a(z);
if (ret == 0) goto lab5; /* call Step_1a, line 127 */
if (ret < 0) return ret;
}
lab5:
z->c = z->l - m6;
}
{ int m7 = z->l - z->c; (void)m7; /* do, line 128 */
{ int ret = r_Step_1b(z);
if (ret == 0) goto lab6; /* call Step_1b, line 128 */
if (ret < 0) return ret;
}
lab6:
z->c = z->l - m7;
}
{ int m8 = z->l - z->c; (void)m8; /* do, line 129 */
{ int ret = r_Step_1c(z);
if (ret == 0) goto lab7; /* call Step_1c, line 129 */
if (ret < 0) return ret;
}
lab7:
z->c = z->l - m8;
}
{ int m9 = z->l - z->c; (void)m9; /* do, line 130 */
{ int ret = r_Step_2(z);
if (ret == 0) goto lab8; /* call Step_2, line 130 */
if (ret < 0) return ret;
}
lab8:
z->c = z->l - m9;
}
{ int m10 = z->l - z->c; (void)m10; /* do, line 131 */
{ int ret = r_Step_3(z);
if (ret == 0) goto lab9; /* call Step_3, line 131 */
if (ret < 0) return ret;
}
lab9:
z->c = z->l - m10;
}
{ int m11 = z->l - z->c; (void)m11; /* do, line 132 */
{ int ret = r_Step_4(z);
if (ret == 0) goto lab10; /* call Step_4, line 132 */
if (ret < 0) return ret;
}
lab10:
z->c = z->l - m11;
}
{ int m12 = z->l - z->c; (void)m12; /* do, line 133 */
{ int ret = r_Step_5a(z);
if (ret == 0) goto lab11; /* call Step_5a, line 133 */
if (ret < 0) return ret;
}
lab11:
z->c = z->l - m12;
}
{ int m13 = z->l - z->c; (void)m13; /* do, line 134 */
{ int ret = r_Step_5b(z);
if (ret == 0) goto lab12; /* call Step_5b, line 134 */
if (ret < 0) return ret;
}
lab12:
z->c = z->l - m13;
}
z->c = z->lb;
{ int c14 = z->c; /* do, line 137 */
if (!(z->B[0])) goto lab13; /* Boolean test Y_found, line 137 */
while(1) { /* repeat, line 137 */
int c15 = z->c;
while(1) { /* goto, line 137 */
int c16 = z->c;
z->bra = z->c; /* [, line 137 */
if (!(eq_s(z, 1, s_33))) goto lab15;
z->ket = z->c; /* ], line 137 */
z->c = c16;
break;
lab15:
z->c = c16;
{ int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
if (ret < 0) goto lab14;
z->c = ret; /* goto, line 137 */
}
}
{ int ret = slice_from_s(z, 1, s_34); /* <-, line 137 */
if (ret < 0) return ret;
}
continue;
lab14:
z->c = c15;
break;
}
lab13:
z->c = c14;
}
return 1;
}
extern struct SN_env * porter_UTF_8_create_env(void) { return SN_create_env(0, 2, 1); }
extern void porter_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,694 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int russian_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_tidy_up(struct SN_env * z);
static int r_derivational(struct SN_env * z);
static int r_noun(struct SN_env * z);
static int r_verb(struct SN_env * z);
static int r_reflexive(struct SN_env * z);
static int r_adjectival(struct SN_env * z);
static int r_adjective(struct SN_env * z);
static int r_perfective_gerund(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * russian_UTF_8_create_env(void);
extern void russian_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[10] = { 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8, 0xD1, 0x81, 0xD1, 0x8C };
static const symbol s_0_1[12] = { 0xD1, 0x8B, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8, 0xD1, 0x81, 0xD1, 0x8C };
static const symbol s_0_2[12] = { 0xD0, 0xB8, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8, 0xD1, 0x81, 0xD1, 0x8C };
static const symbol s_0_3[2] = { 0xD0, 0xB2 };
static const symbol s_0_4[4] = { 0xD1, 0x8B, 0xD0, 0xB2 };
static const symbol s_0_5[4] = { 0xD0, 0xB8, 0xD0, 0xB2 };
static const symbol s_0_6[6] = { 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8 };
static const symbol s_0_7[8] = { 0xD1, 0x8B, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8 };
static const symbol s_0_8[8] = { 0xD0, 0xB8, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8 };
static const struct among a_0[9] =
{
/* 0 */ { 10, s_0_0, -1, 1, 0},
/* 1 */ { 12, s_0_1, 0, 2, 0},
/* 2 */ { 12, s_0_2, 0, 2, 0},
/* 3 */ { 2, s_0_3, -1, 1, 0},
/* 4 */ { 4, s_0_4, 3, 2, 0},
/* 5 */ { 4, s_0_5, 3, 2, 0},
/* 6 */ { 6, s_0_6, -1, 1, 0},
/* 7 */ { 8, s_0_7, 6, 2, 0},
/* 8 */ { 8, s_0_8, 6, 2, 0}
};
static const symbol s_1_0[6] = { 0xD0, 0xB5, 0xD0, 0xBC, 0xD1, 0x83 };
static const symbol s_1_1[6] = { 0xD0, 0xBE, 0xD0, 0xBC, 0xD1, 0x83 };
static const symbol s_1_2[4] = { 0xD1, 0x8B, 0xD1, 0x85 };
static const symbol s_1_3[4] = { 0xD0, 0xB8, 0xD1, 0x85 };
static const symbol s_1_4[4] = { 0xD1, 0x83, 0xD1, 0x8E };
static const symbol s_1_5[4] = { 0xD1, 0x8E, 0xD1, 0x8E };
static const symbol s_1_6[4] = { 0xD0, 0xB5, 0xD1, 0x8E };
static const symbol s_1_7[4] = { 0xD0, 0xBE, 0xD1, 0x8E };
static const symbol s_1_8[4] = { 0xD1, 0x8F, 0xD1, 0x8F };
static const symbol s_1_9[4] = { 0xD0, 0xB0, 0xD1, 0x8F };
static const symbol s_1_10[4] = { 0xD1, 0x8B, 0xD0, 0xB5 };
static const symbol s_1_11[4] = { 0xD0, 0xB5, 0xD0, 0xB5 };
static const symbol s_1_12[4] = { 0xD0, 0xB8, 0xD0, 0xB5 };
static const symbol s_1_13[4] = { 0xD0, 0xBE, 0xD0, 0xB5 };
static const symbol s_1_14[6] = { 0xD1, 0x8B, 0xD0, 0xBC, 0xD0, 0xB8 };
static const symbol s_1_15[6] = { 0xD0, 0xB8, 0xD0, 0xBC, 0xD0, 0xB8 };
static const symbol s_1_16[4] = { 0xD1, 0x8B, 0xD0, 0xB9 };
static const symbol s_1_17[4] = { 0xD0, 0xB5, 0xD0, 0xB9 };
static const symbol s_1_18[4] = { 0xD0, 0xB8, 0xD0, 0xB9 };
static const symbol s_1_19[4] = { 0xD0, 0xBE, 0xD0, 0xB9 };
static const symbol s_1_20[4] = { 0xD1, 0x8B, 0xD0, 0xBC };
static const symbol s_1_21[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
static const symbol s_1_22[4] = { 0xD0, 0xB8, 0xD0, 0xBC };
static const symbol s_1_23[4] = { 0xD0, 0xBE, 0xD0, 0xBC };
static const symbol s_1_24[6] = { 0xD0, 0xB5, 0xD0, 0xB3, 0xD0, 0xBE };
static const symbol s_1_25[6] = { 0xD0, 0xBE, 0xD0, 0xB3, 0xD0, 0xBE };
static const struct among a_1[26] =
{
/* 0 */ { 6, s_1_0, -1, 1, 0},
/* 1 */ { 6, s_1_1, -1, 1, 0},
/* 2 */ { 4, s_1_2, -1, 1, 0},
/* 3 */ { 4, s_1_3, -1, 1, 0},
/* 4 */ { 4, s_1_4, -1, 1, 0},
/* 5 */ { 4, s_1_5, -1, 1, 0},
/* 6 */ { 4, s_1_6, -1, 1, 0},
/* 7 */ { 4, s_1_7, -1, 1, 0},
/* 8 */ { 4, s_1_8, -1, 1, 0},
/* 9 */ { 4, s_1_9, -1, 1, 0},
/* 10 */ { 4, s_1_10, -1, 1, 0},
/* 11 */ { 4, s_1_11, -1, 1, 0},
/* 12 */ { 4, s_1_12, -1, 1, 0},
/* 13 */ { 4, s_1_13, -1, 1, 0},
/* 14 */ { 6, s_1_14, -1, 1, 0},
/* 15 */ { 6, s_1_15, -1, 1, 0},
/* 16 */ { 4, s_1_16, -1, 1, 0},
/* 17 */ { 4, s_1_17, -1, 1, 0},
/* 18 */ { 4, s_1_18, -1, 1, 0},
/* 19 */ { 4, s_1_19, -1, 1, 0},
/* 20 */ { 4, s_1_20, -1, 1, 0},
/* 21 */ { 4, s_1_21, -1, 1, 0},
/* 22 */ { 4, s_1_22, -1, 1, 0},
/* 23 */ { 4, s_1_23, -1, 1, 0},
/* 24 */ { 6, s_1_24, -1, 1, 0},
/* 25 */ { 6, s_1_25, -1, 1, 0}
};
static const symbol s_2_0[4] = { 0xD0, 0xB2, 0xD1, 0x88 };
static const symbol s_2_1[6] = { 0xD1, 0x8B, 0xD0, 0xB2, 0xD1, 0x88 };
static const symbol s_2_2[6] = { 0xD0, 0xB8, 0xD0, 0xB2, 0xD1, 0x88 };
static const symbol s_2_3[2] = { 0xD1, 0x89 };
static const symbol s_2_4[4] = { 0xD1, 0x8E, 0xD1, 0x89 };
static const symbol s_2_5[6] = { 0xD1, 0x83, 0xD1, 0x8E, 0xD1, 0x89 };
static const symbol s_2_6[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
static const symbol s_2_7[4] = { 0xD0, 0xBD, 0xD0, 0xBD };
static const struct among a_2[8] =
{
/* 0 */ { 4, s_2_0, -1, 1, 0},
/* 1 */ { 6, s_2_1, 0, 2, 0},
/* 2 */ { 6, s_2_2, 0, 2, 0},
/* 3 */ { 2, s_2_3, -1, 1, 0},
/* 4 */ { 4, s_2_4, 3, 1, 0},
/* 5 */ { 6, s_2_5, 4, 2, 0},
/* 6 */ { 4, s_2_6, -1, 1, 0},
/* 7 */ { 4, s_2_7, -1, 1, 0}
};
static const symbol s_3_0[4] = { 0xD1, 0x81, 0xD1, 0x8C };
static const symbol s_3_1[4] = { 0xD1, 0x81, 0xD1, 0x8F };
static const struct among a_3[2] =
{
/* 0 */ { 4, s_3_0, -1, 1, 0},
/* 1 */ { 4, s_3_1, -1, 1, 0}
};
static const symbol s_4_0[4] = { 0xD1, 0x8B, 0xD1, 0x82 };
static const symbol s_4_1[4] = { 0xD1, 0x8E, 0xD1, 0x82 };
static const symbol s_4_2[6] = { 0xD1, 0x83, 0xD1, 0x8E, 0xD1, 0x82 };
static const symbol s_4_3[4] = { 0xD1, 0x8F, 0xD1, 0x82 };
static const symbol s_4_4[4] = { 0xD0, 0xB5, 0xD1, 0x82 };
static const symbol s_4_5[6] = { 0xD1, 0x83, 0xD0, 0xB5, 0xD1, 0x82 };
static const symbol s_4_6[4] = { 0xD0, 0xB8, 0xD1, 0x82 };
static const symbol s_4_7[4] = { 0xD0, 0xBD, 0xD1, 0x8B };
static const symbol s_4_8[6] = { 0xD0, 0xB5, 0xD0, 0xBD, 0xD1, 0x8B };
static const symbol s_4_9[4] = { 0xD1, 0x82, 0xD1, 0x8C };
static const symbol s_4_10[6] = { 0xD1, 0x8B, 0xD1, 0x82, 0xD1, 0x8C };
static const symbol s_4_11[6] = { 0xD0, 0xB8, 0xD1, 0x82, 0xD1, 0x8C };
static const symbol s_4_12[6] = { 0xD0, 0xB5, 0xD1, 0x88, 0xD1, 0x8C };
static const symbol s_4_13[6] = { 0xD0, 0xB8, 0xD1, 0x88, 0xD1, 0x8C };
static const symbol s_4_14[2] = { 0xD1, 0x8E };
static const symbol s_4_15[4] = { 0xD1, 0x83, 0xD1, 0x8E };
static const symbol s_4_16[4] = { 0xD0, 0xBB, 0xD0, 0xB0 };
static const symbol s_4_17[6] = { 0xD1, 0x8B, 0xD0, 0xBB, 0xD0, 0xB0 };
static const symbol s_4_18[6] = { 0xD0, 0xB8, 0xD0, 0xBB, 0xD0, 0xB0 };
static const symbol s_4_19[4] = { 0xD0, 0xBD, 0xD0, 0xB0 };
static const symbol s_4_20[6] = { 0xD0, 0xB5, 0xD0, 0xBD, 0xD0, 0xB0 };
static const symbol s_4_21[6] = { 0xD0, 0xB5, 0xD1, 0x82, 0xD0, 0xB5 };
static const symbol s_4_22[6] = { 0xD0, 0xB8, 0xD1, 0x82, 0xD0, 0xB5 };
static const symbol s_4_23[6] = { 0xD0, 0xB9, 0xD1, 0x82, 0xD0, 0xB5 };
static const symbol s_4_24[8] = { 0xD1, 0x83, 0xD0, 0xB9, 0xD1, 0x82, 0xD0, 0xB5 };
static const symbol s_4_25[8] = { 0xD0, 0xB5, 0xD0, 0xB9, 0xD1, 0x82, 0xD0, 0xB5 };
static const symbol s_4_26[4] = { 0xD0, 0xBB, 0xD0, 0xB8 };
static const symbol s_4_27[6] = { 0xD1, 0x8B, 0xD0, 0xBB, 0xD0, 0xB8 };
static const symbol s_4_28[6] = { 0xD0, 0xB8, 0xD0, 0xBB, 0xD0, 0xB8 };
static const symbol s_4_29[2] = { 0xD0, 0xB9 };
static const symbol s_4_30[4] = { 0xD1, 0x83, 0xD0, 0xB9 };
static const symbol s_4_31[4] = { 0xD0, 0xB5, 0xD0, 0xB9 };
static const symbol s_4_32[2] = { 0xD0, 0xBB };
static const symbol s_4_33[4] = { 0xD1, 0x8B, 0xD0, 0xBB };
static const symbol s_4_34[4] = { 0xD0, 0xB8, 0xD0, 0xBB };
static const symbol s_4_35[4] = { 0xD1, 0x8B, 0xD0, 0xBC };
static const symbol s_4_36[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
static const symbol s_4_37[4] = { 0xD0, 0xB8, 0xD0, 0xBC };
static const symbol s_4_38[2] = { 0xD0, 0xBD };
static const symbol s_4_39[4] = { 0xD0, 0xB5, 0xD0, 0xBD };
static const symbol s_4_40[4] = { 0xD0, 0xBB, 0xD0, 0xBE };
static const symbol s_4_41[6] = { 0xD1, 0x8B, 0xD0, 0xBB, 0xD0, 0xBE };
static const symbol s_4_42[6] = { 0xD0, 0xB8, 0xD0, 0xBB, 0xD0, 0xBE };
static const symbol s_4_43[4] = { 0xD0, 0xBD, 0xD0, 0xBE };
static const symbol s_4_44[6] = { 0xD0, 0xB5, 0xD0, 0xBD, 0xD0, 0xBE };
static const symbol s_4_45[6] = { 0xD0, 0xBD, 0xD0, 0xBD, 0xD0, 0xBE };
static const struct among a_4[46] =
{
/* 0 */ { 4, s_4_0, -1, 2, 0},
/* 1 */ { 4, s_4_1, -1, 1, 0},
/* 2 */ { 6, s_4_2, 1, 2, 0},
/* 3 */ { 4, s_4_3, -1, 2, 0},
/* 4 */ { 4, s_4_4, -1, 1, 0},
/* 5 */ { 6, s_4_5, 4, 2, 0},
/* 6 */ { 4, s_4_6, -1, 2, 0},
/* 7 */ { 4, s_4_7, -1, 1, 0},
/* 8 */ { 6, s_4_8, 7, 2, 0},
/* 9 */ { 4, s_4_9, -1, 1, 0},
/* 10 */ { 6, s_4_10, 9, 2, 0},
/* 11 */ { 6, s_4_11, 9, 2, 0},
/* 12 */ { 6, s_4_12, -1, 1, 0},
/* 13 */ { 6, s_4_13, -1, 2, 0},
/* 14 */ { 2, s_4_14, -1, 2, 0},
/* 15 */ { 4, s_4_15, 14, 2, 0},
/* 16 */ { 4, s_4_16, -1, 1, 0},
/* 17 */ { 6, s_4_17, 16, 2, 0},
/* 18 */ { 6, s_4_18, 16, 2, 0},
/* 19 */ { 4, s_4_19, -1, 1, 0},
/* 20 */ { 6, s_4_20, 19, 2, 0},
/* 21 */ { 6, s_4_21, -1, 1, 0},
/* 22 */ { 6, s_4_22, -1, 2, 0},
/* 23 */ { 6, s_4_23, -1, 1, 0},
/* 24 */ { 8, s_4_24, 23, 2, 0},
/* 25 */ { 8, s_4_25, 23, 2, 0},
/* 26 */ { 4, s_4_26, -1, 1, 0},
/* 27 */ { 6, s_4_27, 26, 2, 0},
/* 28 */ { 6, s_4_28, 26, 2, 0},
/* 29 */ { 2, s_4_29, -1, 1, 0},
/* 30 */ { 4, s_4_30, 29, 2, 0},
/* 31 */ { 4, s_4_31, 29, 2, 0},
/* 32 */ { 2, s_4_32, -1, 1, 0},
/* 33 */ { 4, s_4_33, 32, 2, 0},
/* 34 */ { 4, s_4_34, 32, 2, 0},
/* 35 */ { 4, s_4_35, -1, 2, 0},
/* 36 */ { 4, s_4_36, -1, 1, 0},
/* 37 */ { 4, s_4_37, -1, 2, 0},
/* 38 */ { 2, s_4_38, -1, 1, 0},
/* 39 */ { 4, s_4_39, 38, 2, 0},
/* 40 */ { 4, s_4_40, -1, 1, 0},
/* 41 */ { 6, s_4_41, 40, 2, 0},
/* 42 */ { 6, s_4_42, 40, 2, 0},
/* 43 */ { 4, s_4_43, -1, 1, 0},
/* 44 */ { 6, s_4_44, 43, 2, 0},
/* 45 */ { 6, s_4_45, 43, 1, 0}
};
static const symbol s_5_0[2] = { 0xD1, 0x83 };
static const symbol s_5_1[4] = { 0xD1, 0x8F, 0xD1, 0x85 };
static const symbol s_5_2[6] = { 0xD0, 0xB8, 0xD1, 0x8F, 0xD1, 0x85 };
static const symbol s_5_3[4] = { 0xD0, 0xB0, 0xD1, 0x85 };
static const symbol s_5_4[2] = { 0xD1, 0x8B };
static const symbol s_5_5[2] = { 0xD1, 0x8C };
static const symbol s_5_6[2] = { 0xD1, 0x8E };
static const symbol s_5_7[4] = { 0xD1, 0x8C, 0xD1, 0x8E };
static const symbol s_5_8[4] = { 0xD0, 0xB8, 0xD1, 0x8E };
static const symbol s_5_9[2] = { 0xD1, 0x8F };
static const symbol s_5_10[4] = { 0xD1, 0x8C, 0xD1, 0x8F };
static const symbol s_5_11[4] = { 0xD0, 0xB8, 0xD1, 0x8F };
static const symbol s_5_12[2] = { 0xD0, 0xB0 };
static const symbol s_5_13[4] = { 0xD0, 0xB5, 0xD0, 0xB2 };
static const symbol s_5_14[4] = { 0xD0, 0xBE, 0xD0, 0xB2 };
static const symbol s_5_15[2] = { 0xD0, 0xB5 };
static const symbol s_5_16[4] = { 0xD1, 0x8C, 0xD0, 0xB5 };
static const symbol s_5_17[4] = { 0xD0, 0xB8, 0xD0, 0xB5 };
static const symbol s_5_18[2] = { 0xD0, 0xB8 };
static const symbol s_5_19[4] = { 0xD0, 0xB5, 0xD0, 0xB8 };
static const symbol s_5_20[4] = { 0xD0, 0xB8, 0xD0, 0xB8 };
static const symbol s_5_21[6] = { 0xD1, 0x8F, 0xD0, 0xBC, 0xD0, 0xB8 };
static const symbol s_5_22[8] = { 0xD0, 0xB8, 0xD1, 0x8F, 0xD0, 0xBC, 0xD0, 0xB8 };
static const symbol s_5_23[6] = { 0xD0, 0xB0, 0xD0, 0xBC, 0xD0, 0xB8 };
static const symbol s_5_24[2] = { 0xD0, 0xB9 };
static const symbol s_5_25[4] = { 0xD0, 0xB5, 0xD0, 0xB9 };
static const symbol s_5_26[6] = { 0xD0, 0xB8, 0xD0, 0xB5, 0xD0, 0xB9 };
static const symbol s_5_27[4] = { 0xD0, 0xB8, 0xD0, 0xB9 };
static const symbol s_5_28[4] = { 0xD0, 0xBE, 0xD0, 0xB9 };
static const symbol s_5_29[4] = { 0xD1, 0x8F, 0xD0, 0xBC };
static const symbol s_5_30[6] = { 0xD0, 0xB8, 0xD1, 0x8F, 0xD0, 0xBC };
static const symbol s_5_31[4] = { 0xD0, 0xB0, 0xD0, 0xBC };
static const symbol s_5_32[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
static const symbol s_5_33[6] = { 0xD0, 0xB8, 0xD0, 0xB5, 0xD0, 0xBC };
static const symbol s_5_34[4] = { 0xD0, 0xBE, 0xD0, 0xBC };
static const symbol s_5_35[2] = { 0xD0, 0xBE };
static const struct among a_5[36] =
{
/* 0 */ { 2, s_5_0, -1, 1, 0},
/* 1 */ { 4, s_5_1, -1, 1, 0},
/* 2 */ { 6, s_5_2, 1, 1, 0},
/* 3 */ { 4, s_5_3, -1, 1, 0},
/* 4 */ { 2, s_5_4, -1, 1, 0},
/* 5 */ { 2, s_5_5, -1, 1, 0},
/* 6 */ { 2, s_5_6, -1, 1, 0},
/* 7 */ { 4, s_5_7, 6, 1, 0},
/* 8 */ { 4, s_5_8, 6, 1, 0},
/* 9 */ { 2, s_5_9, -1, 1, 0},
/* 10 */ { 4, s_5_10, 9, 1, 0},
/* 11 */ { 4, s_5_11, 9, 1, 0},
/* 12 */ { 2, s_5_12, -1, 1, 0},
/* 13 */ { 4, s_5_13, -1, 1, 0},
/* 14 */ { 4, s_5_14, -1, 1, 0},
/* 15 */ { 2, s_5_15, -1, 1, 0},
/* 16 */ { 4, s_5_16, 15, 1, 0},
/* 17 */ { 4, s_5_17, 15, 1, 0},
/* 18 */ { 2, s_5_18, -1, 1, 0},
/* 19 */ { 4, s_5_19, 18, 1, 0},
/* 20 */ { 4, s_5_20, 18, 1, 0},
/* 21 */ { 6, s_5_21, 18, 1, 0},
/* 22 */ { 8, s_5_22, 21, 1, 0},
/* 23 */ { 6, s_5_23, 18, 1, 0},
/* 24 */ { 2, s_5_24, -1, 1, 0},
/* 25 */ { 4, s_5_25, 24, 1, 0},
/* 26 */ { 6, s_5_26, 25, 1, 0},
/* 27 */ { 4, s_5_27, 24, 1, 0},
/* 28 */ { 4, s_5_28, 24, 1, 0},
/* 29 */ { 4, s_5_29, -1, 1, 0},
/* 30 */ { 6, s_5_30, 29, 1, 0},
/* 31 */ { 4, s_5_31, -1, 1, 0},
/* 32 */ { 4, s_5_32, -1, 1, 0},
/* 33 */ { 6, s_5_33, 32, 1, 0},
/* 34 */ { 4, s_5_34, -1, 1, 0},
/* 35 */ { 2, s_5_35, -1, 1, 0}
};
static const symbol s_6_0[6] = { 0xD0, 0xBE, 0xD1, 0x81, 0xD1, 0x82 };
static const symbol s_6_1[8] = { 0xD0, 0xBE, 0xD1, 0x81, 0xD1, 0x82, 0xD1, 0x8C };
static const struct among a_6[2] =
{
/* 0 */ { 6, s_6_0, -1, 1, 0},
/* 1 */ { 8, s_6_1, -1, 1, 0}
};
static const symbol s_7_0[6] = { 0xD0, 0xB5, 0xD0, 0xB9, 0xD1, 0x88 };
static const symbol s_7_1[2] = { 0xD1, 0x8C };
static const symbol s_7_2[8] = { 0xD0, 0xB5, 0xD0, 0xB9, 0xD1, 0x88, 0xD0, 0xB5 };
static const symbol s_7_3[2] = { 0xD0, 0xBD };
static const struct among a_7[4] =
{
/* 0 */ { 6, s_7_0, -1, 1, 0},
/* 1 */ { 2, s_7_1, -1, 3, 0},
/* 2 */ { 8, s_7_2, -1, 1, 0},
/* 3 */ { 2, s_7_3, -1, 2, 0}
};
static const unsigned char g_v[] = { 33, 65, 8, 232 };
static const symbol s_0[] = { 0xD0, 0xB0 };
static const symbol s_1[] = { 0xD1, 0x8F };
static const symbol s_2[] = { 0xD0, 0xB0 };
static const symbol s_3[] = { 0xD1, 0x8F };
static const symbol s_4[] = { 0xD0, 0xB0 };
static const symbol s_5[] = { 0xD1, 0x8F };
static const symbol s_6[] = { 0xD0, 0xBD };
static const symbol s_7[] = { 0xD0, 0xBD };
static const symbol s_8[] = { 0xD0, 0xBD };
static const symbol s_9[] = { 0xD0, 0xB8 };
static int r_mark_regions(struct SN_env * z) {
z->I[0] = z->l;
z->I[1] = z->l;
{ int c1 = z->c; /* do, line 61 */
{ /* gopast */ /* grouping v, line 62 */
int ret = out_grouping_U(z, g_v, 1072, 1103, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[0] = z->c; /* setmark pV, line 62 */
{ /* gopast */ /* non v, line 62 */
int ret = in_grouping_U(z, g_v, 1072, 1103, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
{ /* gopast */ /* grouping v, line 63 */
int ret = out_grouping_U(z, g_v, 1072, 1103, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
{ /* gopast */ /* non v, line 63 */
int ret = in_grouping_U(z, g_v, 1072, 1103, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[1] = z->c; /* setmark p2, line 63 */
lab0:
z->c = c1;
}
return 1;
}
static int r_R2(struct SN_env * z) {
if (!(z->I[1] <= z->c)) return 0;
return 1;
}
static int r_perfective_gerund(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 72 */
among_var = find_among_b(z, a_0, 9); /* substring, line 72 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 72 */
switch(among_var) {
case 0: return 0;
case 1:
{ int m1 = z->l - z->c; (void)m1; /* or, line 76 */
if (!(eq_s_b(z, 2, s_0))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m1;
if (!(eq_s_b(z, 2, s_1))) return 0;
}
lab0:
{ int ret = slice_del(z); /* delete, line 76 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z); /* delete, line 83 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_adjective(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 88 */
among_var = find_among_b(z, a_1, 26); /* substring, line 88 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 88 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 97 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_adjectival(struct SN_env * z) {
int among_var;
{ int ret = r_adjective(z);
if (ret == 0) return 0; /* call adjective, line 102 */
if (ret < 0) return ret;
}
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 109 */
z->ket = z->c; /* [, line 110 */
among_var = find_among_b(z, a_2, 8); /* substring, line 110 */
if (!(among_var)) { z->c = z->l - m_keep; goto lab0; }
z->bra = z->c; /* ], line 110 */
switch(among_var) {
case 0: { z->c = z->l - m_keep; goto lab0; }
case 1:
{ int m1 = z->l - z->c; (void)m1; /* or, line 115 */
if (!(eq_s_b(z, 2, s_2))) goto lab2;
goto lab1;
lab2:
z->c = z->l - m1;
if (!(eq_s_b(z, 2, s_3))) { z->c = z->l - m_keep; goto lab0; }
}
lab1:
{ int ret = slice_del(z); /* delete, line 115 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z); /* delete, line 122 */
if (ret < 0) return ret;
}
break;
}
lab0:
;
}
return 1;
}
static int r_reflexive(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 129 */
if (z->c - 3 <= z->lb || (z->p[z->c - 1] != 140 && z->p[z->c - 1] != 143)) return 0;
among_var = find_among_b(z, a_3, 2); /* substring, line 129 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 129 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 132 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_verb(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 137 */
among_var = find_among_b(z, a_4, 46); /* substring, line 137 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 137 */
switch(among_var) {
case 0: return 0;
case 1:
{ int m1 = z->l - z->c; (void)m1; /* or, line 143 */
if (!(eq_s_b(z, 2, s_4))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m1;
if (!(eq_s_b(z, 2, s_5))) return 0;
}
lab0:
{ int ret = slice_del(z); /* delete, line 143 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z); /* delete, line 151 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_noun(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 160 */
among_var = find_among_b(z, a_5, 36); /* substring, line 160 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 160 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 167 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_derivational(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 176 */
if (z->c - 5 <= z->lb || (z->p[z->c - 1] != 130 && z->p[z->c - 1] != 140)) return 0;
among_var = find_among_b(z, a_6, 2); /* substring, line 176 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 176 */
{ int ret = r_R2(z);
if (ret == 0) return 0; /* call R2, line 176 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 179 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_tidy_up(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 184 */
among_var = find_among_b(z, a_7, 4); /* substring, line 184 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 184 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 188 */
if (ret < 0) return ret;
}
z->ket = z->c; /* [, line 189 */
if (!(eq_s_b(z, 2, s_6))) return 0;
z->bra = z->c; /* ], line 189 */
if (!(eq_s_b(z, 2, s_7))) return 0;
{ int ret = slice_del(z); /* delete, line 189 */
if (ret < 0) return ret;
}
break;
case 2:
if (!(eq_s_b(z, 2, s_8))) return 0;
{ int ret = slice_del(z); /* delete, line 192 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z); /* delete, line 194 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
extern int russian_UTF_8_stem(struct SN_env * z) {
{ int c1 = z->c; /* do, line 201 */
{ int ret = r_mark_regions(z);
if (ret == 0) goto lab0; /* call mark_regions, line 201 */
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->lb = z->c; z->c = z->l; /* backwards, line 202 */
{ int mlimit; /* setlimit, line 202 */
int m2 = z->l - z->c; (void)m2;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 202 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m2;
{ int m3 = z->l - z->c; (void)m3; /* do, line 203 */
{ int m4 = z->l - z->c; (void)m4; /* or, line 204 */
{ int ret = r_perfective_gerund(z);
if (ret == 0) goto lab3; /* call perfective_gerund, line 204 */
if (ret < 0) return ret;
}
goto lab2;
lab3:
z->c = z->l - m4;
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 205 */
{ int ret = r_reflexive(z);
if (ret == 0) { z->c = z->l - m_keep; goto lab4; } /* call reflexive, line 205 */
if (ret < 0) return ret;
}
lab4:
;
}
{ int m5 = z->l - z->c; (void)m5; /* or, line 206 */
{ int ret = r_adjectival(z);
if (ret == 0) goto lab6; /* call adjectival, line 206 */
if (ret < 0) return ret;
}
goto lab5;
lab6:
z->c = z->l - m5;
{ int ret = r_verb(z);
if (ret == 0) goto lab7; /* call verb, line 206 */
if (ret < 0) return ret;
}
goto lab5;
lab7:
z->c = z->l - m5;
{ int ret = r_noun(z);
if (ret == 0) goto lab1; /* call noun, line 206 */
if (ret < 0) return ret;
}
}
lab5:
;
}
lab2:
lab1:
z->c = z->l - m3;
}
{ int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 209 */
z->ket = z->c; /* [, line 209 */
if (!(eq_s_b(z, 2, s_9))) { z->c = z->l - m_keep; goto lab8; }
z->bra = z->c; /* ], line 209 */
{ int ret = slice_del(z); /* delete, line 209 */
if (ret < 0) return ret;
}
lab8:
;
}
{ int m6 = z->l - z->c; (void)m6; /* do, line 212 */
{ int ret = r_derivational(z);
if (ret == 0) goto lab9; /* call derivational, line 212 */
if (ret < 0) return ret;
}
lab9:
z->c = z->l - m6;
}
{ int m7 = z->l - z->c; (void)m7; /* do, line 213 */
{ int ret = r_tidy_up(z);
if (ret == 0) goto lab10; /* call tidy_up, line 213 */
if (ret < 0) return ret;
}
lab10:
z->c = z->l - m7;
}
z->lb = mlimit;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * russian_UTF_8_create_env(void) { return SN_create_env(0, 2, 0); }
extern void russian_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,309 @@
/* This file was generated automatically by the Snowball to ANSI C compiler */
#include "header.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int swedish_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
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 * swedish_UTF_8_create_env(void);
extern void swedish_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[1] = { 'a' };
static const symbol s_0_1[4] = { 'a', 'r', 'n', 'a' };
static const symbol s_0_2[4] = { 'e', 'r', 'n', 'a' };
static const symbol s_0_3[7] = { 'h', 'e', 't', 'e', 'r', 'n', 'a' };
static const symbol s_0_4[4] = { 'o', 'r', 'n', 'a' };
static const symbol s_0_5[2] = { 'a', 'd' };
static const symbol s_0_6[1] = { 'e' };
static const symbol s_0_7[3] = { 'a', 'd', 'e' };
static const symbol s_0_8[4] = { 'a', 'n', 'd', 'e' };
static const symbol s_0_9[4] = { 'a', 'r', 'n', 'e' };
static const symbol s_0_10[3] = { 'a', 'r', 'e' };
static const symbol s_0_11[4] = { 'a', 's', 't', 'e' };
static const symbol s_0_12[2] = { 'e', 'n' };
static const symbol s_0_13[5] = { 'a', 'n', 'd', 'e', 'n' };
static const symbol s_0_14[4] = { 'a', 'r', 'e', 'n' };
static const symbol s_0_15[5] = { 'h', 'e', 't', 'e', 'n' };
static const symbol s_0_16[3] = { 'e', 'r', 'n' };
static const symbol s_0_17[2] = { 'a', 'r' };
static const symbol s_0_18[2] = { 'e', 'r' };
static const symbol s_0_19[5] = { 'h', 'e', 't', 'e', 'r' };
static const symbol s_0_20[2] = { 'o', 'r' };
static const symbol s_0_21[1] = { 's' };
static const symbol s_0_22[2] = { 'a', 's' };
static const symbol s_0_23[5] = { 'a', 'r', 'n', 'a', 's' };
static const symbol s_0_24[5] = { 'e', 'r', 'n', 'a', 's' };
static const symbol s_0_25[5] = { 'o', 'r', 'n', 'a', 's' };
static const symbol s_0_26[2] = { 'e', 's' };
static const symbol s_0_27[4] = { 'a', 'd', 'e', 's' };
static const symbol s_0_28[5] = { 'a', 'n', 'd', 'e', 's' };
static const symbol s_0_29[3] = { 'e', 'n', 's' };
static const symbol s_0_30[5] = { 'a', 'r', 'e', 'n', 's' };
static const symbol s_0_31[6] = { 'h', 'e', 't', 'e', 'n', 's' };
static const symbol s_0_32[4] = { 'e', 'r', 'n', 's' };
static const symbol s_0_33[2] = { 'a', 't' };
static const symbol s_0_34[5] = { 'a', 'n', 'd', 'e', 't' };
static const symbol s_0_35[3] = { 'h', 'e', 't' };
static const symbol s_0_36[3] = { 'a', 's', 't' };
static const struct among a_0[37] =
{
/* 0 */ { 1, s_0_0, -1, 1, 0},
/* 1 */ { 4, s_0_1, 0, 1, 0},
/* 2 */ { 4, s_0_2, 0, 1, 0},
/* 3 */ { 7, s_0_3, 2, 1, 0},
/* 4 */ { 4, s_0_4, 0, 1, 0},
/* 5 */ { 2, s_0_5, -1, 1, 0},
/* 6 */ { 1, s_0_6, -1, 1, 0},
/* 7 */ { 3, s_0_7, 6, 1, 0},
/* 8 */ { 4, s_0_8, 6, 1, 0},
/* 9 */ { 4, s_0_9, 6, 1, 0},
/* 10 */ { 3, s_0_10, 6, 1, 0},
/* 11 */ { 4, s_0_11, 6, 1, 0},
/* 12 */ { 2, s_0_12, -1, 1, 0},
/* 13 */ { 5, s_0_13, 12, 1, 0},
/* 14 */ { 4, s_0_14, 12, 1, 0},
/* 15 */ { 5, s_0_15, 12, 1, 0},
/* 16 */ { 3, s_0_16, -1, 1, 0},
/* 17 */ { 2, s_0_17, -1, 1, 0},
/* 18 */ { 2, s_0_18, -1, 1, 0},
/* 19 */ { 5, s_0_19, 18, 1, 0},
/* 20 */ { 2, s_0_20, -1, 1, 0},
/* 21 */ { 1, s_0_21, -1, 2, 0},
/* 22 */ { 2, s_0_22, 21, 1, 0},
/* 23 */ { 5, s_0_23, 22, 1, 0},
/* 24 */ { 5, s_0_24, 22, 1, 0},
/* 25 */ { 5, s_0_25, 22, 1, 0},
/* 26 */ { 2, s_0_26, 21, 1, 0},
/* 27 */ { 4, s_0_27, 26, 1, 0},
/* 28 */ { 5, s_0_28, 26, 1, 0},
/* 29 */ { 3, s_0_29, 21, 1, 0},
/* 30 */ { 5, s_0_30, 29, 1, 0},
/* 31 */ { 6, s_0_31, 29, 1, 0},
/* 32 */ { 4, s_0_32, 21, 1, 0},
/* 33 */ { 2, s_0_33, -1, 1, 0},
/* 34 */ { 5, s_0_34, -1, 1, 0},
/* 35 */ { 3, s_0_35, -1, 1, 0},
/* 36 */ { 3, s_0_36, -1, 1, 0}
};
static const symbol s_1_0[2] = { 'd', 'd' };
static const symbol s_1_1[2] = { 'g', 'd' };
static const symbol s_1_2[2] = { 'n', 'n' };
static const symbol s_1_3[2] = { 'd', 't' };
static const symbol s_1_4[2] = { 'g', 't' };
static const symbol s_1_5[2] = { 'k', 't' };
static const symbol s_1_6[2] = { 't', 't' };
static const struct among a_1[7] =
{
/* 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},
/* 4 */ { 2, s_1_4, -1, -1, 0},
/* 5 */ { 2, s_1_5, -1, -1, 0},
/* 6 */ { 2, s_1_6, -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[3] = { 'e', 'l', 's' };
static const symbol s_2_3[5] = { 'f', 'u', 'l', 'l', 't' };
static const symbol s_2_4[5] = { 'l', 0xC3, 0xB6, '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 */ { 3, s_2_2, -1, 1, 0},
/* 3 */ { 5, s_2_3, -1, 3, 0},
/* 4 */ { 5, 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, 24, 0, 32 };
static const unsigned char g_s_ending[] = { 119, 127, 149 };
static const symbol s_0[] = { 'l', 0xC3, 0xB6, 's' };
static const symbol s_1[] = { 'f', 'u', 'l', 'l' };
static int r_mark_regions(struct SN_env * z) {
z->I[0] = z->l;
{ int c_test = z->c; /* test, line 29 */
{ int ret = skip_utf8(z->p, z->c, 0, z->l, + 3);
if (ret < 0) return 0;
z->c = ret; /* hop, line 29 */
}
z->I[1] = z->c; /* setmark x, line 29 */
z->c = c_test;
}
if (out_grouping_U(z, g_v, 97, 246, 1) < 0) return 0; /* goto */ /* grouping v, line 30 */
{ /* gopast */ /* non v, line 30 */
int ret = in_grouping_U(z, g_v, 97, 246, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[0] = z->c; /* setmark p1, line 30 */
/* try, line 31 */
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 37 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 37 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 37 */
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851442 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
among_var = find_among_b(z, a_0, 37); /* substring, line 37 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 37 */
z->lb = mlimit;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_del(z); /* delete, line 44 */
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b_U(z, g_s_ending, 98, 121, 0)) return 0;
{ int ret = slice_del(z); /* delete, line 46 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
static int r_consonant_pair(struct SN_env * z) {
{ int mlimit; /* setlimit, line 50 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 50 */
mlimit = z->lb; z->lb = z->c;
z->c = z->l - m1;
{ int m2 = z->l - z->c; (void)m2; /* and, line 52 */
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1064976 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
if (!(find_among_b(z, a_1, 7))) { z->lb = mlimit; return 0; } /* among, line 51 */
z->c = z->l - m2;
z->ket = z->c; /* [, line 52 */
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
if (ret < 0) { z->lb = mlimit; return 0; }
z->c = ret; /* next, line 52 */
}
z->bra = z->c; /* ], line 52 */
{ int ret = slice_del(z); /* delete, line 52 */
if (ret < 0) return ret;
}
}
z->lb = mlimit;
}
return 1;
}
static int r_other_suffix(struct SN_env * z) {
int among_var;
{ int mlimit; /* setlimit, line 55 */
int m1 = z->l - z->c; (void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 55 */
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] >> 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 56 */
if (!(among_var)) { z->lb = mlimit; return 0; }
z->bra = z->c; /* ], line 56 */
switch(among_var) {
case 0: { z->lb = mlimit; return 0; }
case 1:
{ int ret = slice_del(z); /* delete, line 57 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 4, s_0); /* <-, line 58 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 4, s_1); /* <-, line 59 */
if (ret < 0) return ret;
}
break;
}
z->lb = mlimit;
}
return 1;
}
extern int swedish_UTF_8_stem(struct SN_env * z) {
{ int c1 = z->c; /* do, line 66 */
{ int ret = r_mark_regions(z);
if (ret == 0) goto lab0; /* call mark_regions, line 66 */
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->lb = z->c; z->c = z->l; /* backwards, line 67 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 68 */
{ int ret = r_main_suffix(z);
if (ret == 0) goto lab1; /* call main_suffix, line 68 */
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 69 */
{ int ret = r_consonant_pair(z);
if (ret == 0) goto lab2; /* call consonant_pair, line 69 */
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 70 */
{ int ret = r_other_suffix(z);
if (ret == 0) goto lab3; /* call other_suffix, line 70 */
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * swedish_UTF_8_create_env(void) { return SN_create_env(0, 2, 0); }
extern void swedish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,473 @@
#include "header.h"
#define unless(C) if(!(C))
#define CREATE_SIZE 1
extern symbol * create_s(void) {
symbol * p;
void * mem = malloc(HEAD + (CREATE_SIZE + 1) * sizeof(symbol));
if (mem == NULL) return NULL;
p = (symbol *) (HEAD + (char *) mem);
CAPACITY(p) = CREATE_SIZE;
SET_SIZE(p, CREATE_SIZE);
return p;
}
extern void lose_s(symbol * p) {
if (p == NULL) return;
free((char *) p - HEAD);
}
/*
new_p = skip_utf8(p, c, lb, l, n); skips n characters forwards from p + c
if n +ve, or n characters backwards from p + c - 1 if n -ve. new_p is the new
position, or 0 on failure.
-- used to implement hop and next in the utf8 case.
*/
extern int skip_utf8(const symbol * p, int c, int lb, int l, int n) {
int b;
if (n >= 0) {
for (; n > 0; n--) {
if (c >= l) return -1;
b = p[c++];
if (b >= 0xC0) { /* 1100 0000 */
while (c < l) {
b = p[c];
if (b >= 0xC0 || b < 0x80) break;
/* break unless b is 10------ */
c++;
}
}
}
} else {
for (; n < 0; n++) {
if (c <= lb) return -1;
b = p[--c];
if (b >= 0x80) { /* 1000 0000 */
while (c > lb) {
b = p[c];
if (b >= 0xC0) break; /* 1100 0000 */
c--;
}
}
}
}
return c;
}
/* Code for character groupings: utf8 cases */
static int get_utf8(const symbol * p, int c, int l, int * slot) {
int b0, b1;
if (c >= l) return 0;
b0 = p[c++];
if (b0 < 0xC0 || c == l) { /* 1100 0000 */
* slot = b0; return 1;
}
b1 = p[c++];
if (b0 < 0xE0 || c == l) { /* 1110 0000 */
* slot = (b0 & 0x1F) << 6 | (b1 & 0x3F); return 2;
}
* slot = (b0 & 0xF) << 12 | (b1 & 0x3F) << 6 | (p[c] & 0x3F); return 3;
}
static int get_b_utf8(const symbol * p, int c, int lb, int * slot) {
int b0, b1;
if (c <= lb) return 0;
b0 = p[--c];
if (b0 < 0x80 || c == lb) { /* 1000 0000 */
* slot = b0; return 1;
}
b1 = p[--c];
if (b1 >= 0xC0 || c == lb) { /* 1100 0000 */
* slot = (b1 & 0x1F) << 6 | (b0 & 0x3F); return 2;
}
* slot = (p[c] & 0xF) << 12 | (b1 & 0x3F) << 6 | (b0 & 0x3F); return 3;
}
extern int in_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat) {
do {
int ch;
int w = get_utf8(z->p, z->c, z->l, & ch);
unless (w) return -1;
if (ch > max || (ch -= min) < 0 || (s[ch >> 3] & (0X1 << (ch & 0X7))) == 0)
return w;
z->c += w;
} while (repeat);
return 0;
}
extern int in_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat) {
do {
int ch;
int w = get_b_utf8(z->p, z->c, z->lb, & ch);
unless (w) return -1;
if (ch > max || (ch -= min) < 0 || (s[ch >> 3] & (0X1 << (ch & 0X7))) == 0)
return w;
z->c -= w;
} while (repeat);
return 0;
}
extern int out_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat) {
do {
int ch;
int w = get_utf8(z->p, z->c, z->l, & ch);
unless (w) return -1;
unless (ch > max || (ch -= min) < 0 || (s[ch >> 3] & (0X1 << (ch & 0X7))) == 0)
return w;
z->c += w;
} while (repeat);
return 0;
}
extern int out_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat) {
do {
int ch;
int w = get_b_utf8(z->p, z->c, z->lb, & ch);
unless (w) return -1;
unless (ch > max || (ch -= min) < 0 || (s[ch >> 3] & (0X1 << (ch & 0X7))) == 0)
return w;
z->c -= w;
} while (repeat);
return 0;
}
/* Code for character groupings: non-utf8 cases */
extern int in_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat) {
do {
int ch;
if (z->c >= z->l) return -1;
ch = z->p[z->c];
if (ch > max || (ch -= min) < 0 || (s[ch >> 3] & (0X1 << (ch & 0X7))) == 0)
return 1;
z->c++;
} while (repeat);
return 0;
}
extern int in_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat) {
do {
int ch;
if (z->c <= z->lb) return -1;
ch = z->p[z->c - 1];
if (ch > max || (ch -= min) < 0 || (s[ch >> 3] & (0X1 << (ch & 0X7))) == 0)
return 1;
z->c--;
} while (repeat);
return 0;
}
extern int out_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat) {
do {
int ch;
if (z->c >= z->l) return -1;
ch = z->p[z->c];
unless (ch > max || (ch -= min) < 0 || (s[ch >> 3] & (0X1 << (ch & 0X7))) == 0)
return 1;
z->c++;
} while (repeat);
return 0;
}
extern int out_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat) {
do {
int ch;
if (z->c <= z->lb) return -1;
ch = z->p[z->c - 1];
unless (ch > max || (ch -= min) < 0 || (s[ch >> 3] & (0X1 << (ch & 0X7))) == 0)
return 1;
z->c--;
} while (repeat);
return 0;
}
extern int eq_s(struct SN_env * z, int s_size, const symbol * s) {
if (z->l - z->c < s_size || memcmp(z->p + z->c, s, s_size * sizeof(symbol)) != 0) return 0;
z->c += s_size; return 1;
}
extern int eq_s_b(struct SN_env * z, int s_size, const symbol * s) {
if (z->c - z->lb < s_size || memcmp(z->p + z->c - s_size, s, s_size * sizeof(symbol)) != 0) return 0;
z->c -= s_size; return 1;
}
extern int eq_v(struct SN_env * z, const symbol * p) {
return eq_s(z, SIZE(p), p);
}
extern int eq_v_b(struct SN_env * z, const symbol * p) {
return eq_s_b(z, SIZE(p), p);
}
extern int find_among(struct SN_env * z, const struct among * v, int v_size) {
int i = 0;
int j = v_size;
int c = z->c; int l = z->l;
symbol * q = z->p + c;
const struct among * w;
int common_i = 0;
int common_j = 0;
int first_key_inspected = 0;
while(1) {
int k = i + ((j - i) >> 1);
int diff = 0;
int common = common_i < common_j ? common_i : common_j; /* smaller */
w = v + k;
{
int i2; for (i2 = common; i2 < w->s_size; i2++) {
if (c + common == l) { diff = -1; break; }
diff = q[common] - w->s[i2];
if (diff != 0) break;
common++;
}
}
if (diff < 0) { j = k; common_j = common; }
else { i = k; common_i = common; }
if (j - i <= 1) {
if (i > 0) break; /* v->s has been inspected */
if (j == i) break; /* only one item in v */
/* - but now we need to go round once more to get
v->s inspected. This looks messy, but is actually
the optimal approach. */
if (first_key_inspected) break;
first_key_inspected = 1;
}
}
while(1) {
w = v + i;
if (common_i >= w->s_size) {
z->c = c + w->s_size;
if (w->function == 0) return w->result;
{
int res = w->function(z);
z->c = c + w->s_size;
if (res) return w->result;
}
}
i = w->substring_i;
if (i < 0) return 0;
}
}
/* find_among_b is for backwards processing. Same comments apply */
extern int find_among_b(struct SN_env * z, const struct among * v, int v_size) {
int i = 0;
int j = v_size;
int c = z->c; int lb = z->lb;
symbol * q = z->p + c - 1;
const struct among * w;
int common_i = 0;
int common_j = 0;
int first_key_inspected = 0;
while(1) {
int k = i + ((j - i) >> 1);
int diff = 0;
int common = common_i < common_j ? common_i : common_j;
w = v + k;
{
int i2; for (i2 = w->s_size - 1 - common; i2 >= 0; i2--) {
if (c - common == lb) { diff = -1; break; }
diff = q[- common] - w->s[i2];
if (diff != 0) break;
common++;
}
}
if (diff < 0) { j = k; common_j = common; }
else { i = k; common_i = common; }
if (j - i <= 1) {
if (i > 0) break;
if (j == i) break;
if (first_key_inspected) break;
first_key_inspected = 1;
}
}
while(1) {
w = v + i;
if (common_i >= w->s_size) {
z->c = c - w->s_size;
if (w->function == 0) return w->result;
{
int res = w->function(z);
z->c = c - w->s_size;
if (res) return w->result;
}
}
i = w->substring_i;
if (i < 0) return 0;
}
}
/* Increase the size of the buffer pointed to by p to at least n symbols.
* If insufficient memory, returns NULL and frees the old buffer.
*/
static symbol * increase_size(symbol * p, int n) {
symbol * q;
int new_size = n + 20;
void * mem = realloc((char *) p - HEAD,
HEAD + (new_size + 1) * sizeof(symbol));
if (mem == NULL) {
lose_s(p);
return NULL;
}
q = (symbol *) (HEAD + (char *)mem);
CAPACITY(q) = new_size;
return q;
}
/* to replace symbols between c_bra and c_ket in z->p by the
s_size symbols at s.
Returns 0 on success, -1 on error.
Also, frees z->p (and sets it to NULL) on error.
*/
extern int replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const symbol * s, int * adjptr)
{
int adjustment;
int len;
if (z->p == NULL) {
z->p = create_s();
if (z->p == NULL) return -1;
}
adjustment = s_size - (c_ket - c_bra);
len = SIZE(z->p);
if (adjustment != 0) {
if (adjustment + len > CAPACITY(z->p)) {
z->p = increase_size(z->p, adjustment + len);
if (z->p == NULL) return -1;
}
memmove(z->p + c_ket + adjustment,
z->p + c_ket,
(len - c_ket) * sizeof(symbol));
SET_SIZE(z->p, adjustment + len);
z->l += adjustment;
if (z->c >= c_ket)
z->c += adjustment;
else
if (z->c > c_bra)
z->c = c_bra;
}
unless (s_size == 0) memmove(z->p + c_bra, s, s_size * sizeof(symbol));
if (adjptr != NULL)
*adjptr = adjustment;
return 0;
}
static int slice_check(struct SN_env * z) {
if (z->bra < 0 ||
z->bra > z->ket ||
z->ket > z->l ||
z->p == NULL ||
z->l > SIZE(z->p)) /* this line could be removed */
{
#if 0
fprintf(stderr, "faulty slice operation:\n");
debug(z, -1, 0);
#endif
return -1;
}
return 0;
}
extern int slice_from_s(struct SN_env * z, int s_size, const symbol * s) {
if (slice_check(z)) return -1;
return replace_s(z, z->bra, z->ket, s_size, s, NULL);
}
extern int slice_from_v(struct SN_env * z, const symbol * p) {
return slice_from_s(z, SIZE(p), p);
}
extern int slice_del(struct SN_env * z) {
return slice_from_s(z, 0, 0);
}
extern int insert_s(struct SN_env * z, int bra, int ket, int s_size, const symbol * s) {
int adjustment;
if (replace_s(z, bra, ket, s_size, s, &adjustment))
return -1;
if (bra <= z->bra) z->bra += adjustment;
if (bra <= z->ket) z->ket += adjustment;
return 0;
}
extern int insert_v(struct SN_env * z, int bra, int ket, const symbol * p) {
int adjustment;
if (replace_s(z, bra, ket, SIZE(p), p, &adjustment))
return -1;
if (bra <= z->bra) z->bra += adjustment;
if (bra <= z->ket) z->ket += adjustment;
return 0;
}
extern symbol * slice_to(struct SN_env * z, symbol * p) {
if (slice_check(z)) {
lose_s(p);
return NULL;
}
{
int len = z->ket - z->bra;
if (CAPACITY(p) < len) {
p = increase_size(p, len);
if (p == NULL)
return NULL;
}
memmove(p, z->p + z->bra, len * sizeof(symbol));
SET_SIZE(p, len);
}
return p;
}
extern symbol * assign_to(struct SN_env * z, symbol * p) {
int len = z->l;
if (CAPACITY(p) < len) {
p = increase_size(p, len);
if (p == NULL)
return NULL;
}
memmove(p, z->p, len * sizeof(symbol));
SET_SIZE(p, len);
return p;
}
#if 0
extern void debug(struct SN_env * z, int number, int line_count) {
int i;
int limit = SIZE(z->p);
/*if (number >= 0) printf("%3d (line %4d): '", number, line_count);*/
if (number >= 0) printf("%3d (line %4d): [%d]'", number, line_count,limit);
for (i = 0; i <= limit; i++) {
if (z->lb == i) printf("{");
if (z->bra == i) printf("[");
if (z->c == i) printf("|");
if (z->ket == i) printf("]");
if (z->l == i) printf("}");
if (i < limit)
{ int ch = z->p[i];
if (ch == 0) ch = '#';
printf("%c", ch);
}
}
printf("'\n");
}
#endif

View File

@ -0,0 +1,26 @@
-- $PostgreSQL: pgsql/src/backend/snowball/snowball.sql.in,v 1.1 2007/08/21 01:11:16 tgl Exp $$
-- text search configuration for _CFGNAME_ language
CREATE TEXT SEARCH DICTIONARY _DICTNAME_
(TEMPLATE = snowball,
OPTION = 'Language=_DICTNAME__STOPWORDS_');
COMMENT ON TEXT SEARCH DICTIONARY _DICTNAME_ IS 'Snowball stemmer for _DICTNAME_ language';
CREATE TEXT SEARCH CONFIGURATION _CFGNAME_
(PARSER = default);
COMMENT ON TEXT SEARCH CONFIGURATION _CFGNAME_ IS 'Configuration for _CFGNAME_ language';
ALTER TEXT SEARCH CONFIGURATION _CFGNAME_ ADD MAPPING
FOR email, url, host, sfloat, version, uri, file, float, int, uint
WITH simple;
ALTER TEXT SEARCH CONFIGURATION _CFGNAME_ ADD MAPPING
FOR lhword, lpart_hword, lword
WITH _LATDICTNAME_;
ALTER TEXT SEARCH CONFIGURATION _CFGNAME_ ADD MAPPING
FOR hword, nlhword, nlpart_hword, nlword, word, part_hword
WITH _NONLATDICTNAME_;

View File

@ -0,0 +1,18 @@
-- $PostgreSQL: pgsql/src/backend/snowball/snowball_func.sql.in,v 1.1 2007/08/21 01:11:16 tgl Exp $$
SET search_path = pg_catalog;
CREATE FUNCTION dsnowball_init(INTERNAL)
RETURNS INTERNAL AS '$libdir/dict_snowball', 'dsnowball_init'
LANGUAGE C STRICT;
CREATE FUNCTION dsnowball_lexize(INTERNAL, INTERNAL, INTERNAL, INTERNAL)
RETURNS INTERNAL AS '$libdir/dict_snowball', 'dsnowball_lexize'
LANGUAGE C STRICT;
CREATE TEXT SEARCH TEMPLATE snowball
(INIT = dsnowball_init,
LEXIZE = dsnowball_lexize);
COMMENT ON TEXT SEARCH TEMPLATE snowball IS 'Snowball stemmer';

View File

@ -0,0 +1,94 @@
og
i
jeg
det
at
en
den
til
er
som
de
med
han
af
for
ikke
der
var
mig
sig
men
et
har
om
vi
min
havde
ham
hun
nu
over
da
fra
du
ud
sin
dem
os
op
man
hans
hvor
eller
hvad
skal
selv
her
alle
vil
blev
kunne
ind
når
være
dog
noget
ville
jo
deres
efter
ned
skulle
denne
end
dette
mit
også
under
have
dig
anden
hende
mine
alt
meget
sit
sine
vor
mod
disse
hvis
din
nogle
hos
blive
mange
ad
bliver
hendes
været
thi
jer
sådan

View File

@ -0,0 +1,101 @@
de
en
van
ik
te
dat
die
in
een
hij
het
niet
zijn
is
was
op
aan
met
als
voor
had
er
maar
om
hem
dan
zou
of
wat
mijn
men
dit
zo
door
over
ze
zich
bij
ook
tot
je
mij
uit
der
daar
haar
naar
heb
hoe
heeft
hebben
deze
u
want
nog
zal
me
zij
nu
ge
geen
omdat
iets
worden
toch
al
waren
veel
meer
doen
toen
moet
ben
zonder
kan
hun
dus
alles
onder
ja
eens
hier
wie
werd
altijd
doch
wordt
wezen
kunnen
ons
zelf
tegen
na
reeds
wil
kon
niets
uw
iemand
geweest
andere

View File

@ -0,0 +1,128 @@
i
me
my
myself
we
our
ours
ourselves
you
your
yours
yourself
yourselves
he
him
his
himself
she
her
hers
herself
it
its
itself
they
them
their
theirs
themselves
what
which
who
whom
this
that
these
those
am
is
are
was
were
be
been
being
have
has
had
having
do
does
did
doing
a
an
the
and
but
if
or
because
as
until
while
of
at
by
for
with
about
against
between
into
through
during
before
after
above
below
to
from
up
down
in
out
on
off
over
under
again
further
then
once
here
there
when
where
why
how
all
any
both
each
few
more
most
other
some
such
no
nor
not
only
own
same
so
than
too
very
s
t
can
will
just
don
should
now

View File

@ -0,0 +1,235 @@
olla
olen
olet
on
olemme
olette
ovat
ole
oli
olisi
olisit
olisin
olisimme
olisitte
olisivat
olit
olin
olimme
olitte
olivat
ollut
olleet
en
et
ei
emme
ette
eivät
minä
minun
minut
minua
minussa
minusta
minuun
minulla
minulta
minulle
sinä
sinun
sinut
sinua
sinussa
sinusta
sinuun
sinulla
sinulta
sinulle
hän
hänen
hänet
häntä
hänessä
hänestä
häneen
hänellä
häneltä
hänelle
me
meidän
meidät
meitä
meissä
meistä
meihin
meillä
meiltä
meille
te
teidän
teidät
teitä
teissä
teistä
teihin
teillä
teiltä
teille
he
heidän
heidät
heitä
heissä
heistä
heihin
heillä
heiltä
heille
tämä
tämän
tätä
tässä
tästä
tähän
tallä
tältä
tälle
tänä
täksi
tuo
tuon
tuotä
tuossa
tuosta
tuohon
tuolla
tuolta
tuolle
tuona
tuoksi
se
sen
sitä
siinä
siitä
siihen
sillä
siltä
sille
sinä
siksi
nämä
näiden
näitä
näissä
näistä
näihin
näillä
näiltä
näille
näinä
näiksi
nuo
noiden
noita
noissa
noista
noihin
noilla
noilta
noille
noina
noiksi
ne
niiden
niitä
niissä
niistä
niihin
niillä
niiltä
niille
niinä
niiksi
kuka
kenen
kenet
ketä
kenessä
kenestä
keneen
kenellä
keneltä
kenelle
kenenä
keneksi
ketkä
keiden
ketkä
keitä
keissä
keistä
keihin
keillä
keiltä
keille
keinä
keiksi
mikä
minkä
minkä
mitä
missä
mistä
mihin
millä
miltä
mille
minä
miksi
mitkä
joka
jonka
jota
jossa
josta
johon
jolla
jolta
jolle
jona
joksi
jotka
joiden
joita
joissa
joista
joihin
joilla
joilta
joille
joina
joiksi
että
ja
jos
koska
kuin
mutta
niin
sekä
sillä
tai
vaan
vai
vaikka
kanssa
mukaan
noin
poikki
yli
kun
niin
nyt
itse

View File

@ -0,0 +1,155 @@
au
aux
avec
ce
ces
dans
de
des
du
elle
en
et
eux
il
je
la
le
leur
lui
ma
mais
me
même
mes
moi
mon
ne
nos
notre
nous
on
ou
par
pas
pour
qu
que
qui
sa
se
ses
son
sur
ta
te
tes
toi
ton
tu
un
une
vos
votre
vous
c
d
j
l
à
m
n
s
t
y
été
étée
étées
étés
étant
étante
étants
étantes
suis
es
est
sommes
êtes
sont
serai
seras
sera
serons
serez
seront
serais
serait
serions
seriez
seraient
étais
était
étions
étiez
étaient
fus
fut
fûmes
fûtes
furent
sois
soit
soyons
soyez
soient
fusse
fusses
fût
fussions
fussiez
fussent
ayant
ayante
ayantes
ayants
eu
eue
eues
eus
ai
as
avons
avez
ont
aurai
auras
aura
aurons
aurez
auront
aurais
aurait
aurions
auriez
auraient
avais
avait
avions
aviez
avaient
eut
eûmes
eûtes
eurent
aie
aies
ait
ayons
ayez
aient
eusse
eusses
eût
eussions
eussiez
eussent

View File

@ -0,0 +1,231 @@
aber
alle
allem
allen
aller
alles
als
also
am
an
ander
andere
anderem
anderen
anderer
anderes
anderm
andern
anderr
anders
auch
auf
aus
bei
bin
bis
bist
da
damit
dann
der
den
des
dem
die
das
daß
derselbe
derselben
denselben
desselben
demselben
dieselbe
dieselben
dasselbe
dazu
dein
deine
deinem
deinen
deiner
deines
denn
derer
dessen
dich
dir
du
dies
diese
diesem
diesen
dieser
dieses
doch
dort
durch
ein
eine
einem
einen
einer
eines
einig
einige
einigem
einigen
einiger
einiges
einmal
er
ihn
ihm
es
etwas
euer
eure
eurem
euren
eurer
eures
für
gegen
gewesen
hab
habe
haben
hat
hatte
hatten
hier
hin
hinter
ich
mich
mir
ihr
ihre
ihrem
ihren
ihrer
ihres
euch
im
in
indem
ins
ist
jede
jedem
jeden
jeder
jedes
jene
jenem
jenen
jener
jenes
jetzt
kann
kein
keine
keinem
keinen
keiner
keines
können
könnte
machen
man
manche
manchem
manchen
mancher
manches
mein
meine
meinem
meinen
meiner
meines
mit
muss
musste
nach
nicht
nichts
noch
nun
nur
ob
oder
ohne
sehr
sein
seine
seinem
seinen
seiner
seines
selbst
sich
sie
ihnen
sind
so
solche
solchem
solchen
solcher
solches
soll
sollte
sondern
sonst
über
um
und
uns
unse
unsem
unsen
unser
unses
unter
viel
vom
von
vor
während
war
waren
warst
was
weg
weil
weiter
welche
welchem
welchen
welcher
welches
wenn
werde
werden
wie
wieder
will
wir
wird
wirst
wo
wollen
wollte
würde
würden
zu
zum
zur
zwar
zwischen

View File

@ -0,0 +1,199 @@
a
ahogy
ahol
aki
akik
akkor
alatt
által
általában
amely
amelyek
amelyekben
amelyeket
amelyet
amelynek
ami
amit
amolyan
amíg
amikor
át
abban
ahhoz
annak
arra
arról
az
azok
azon
azt
azzal
azért
aztán
azután
azonban
bár
be
belül
benne
cikk
cikkek
cikkeket
csak
de
e
eddig
egész
egy
egyes
egyetlen
egyéb
egyik
egyre
ekkor
el
elég
ellen
elõ
elõször
elõtt
elsõ
én
éppen
ebben
ehhez
emilyen
ennek
erre
ez
ezt
ezek
ezen
ezzel
ezért
és
fel
felé
hanem
hiszen
hogy
hogyan
igen
így
illetve
ill.
ill
ilyen
ilyenkor
ison
ismét
itt
jól
jobban
kell
kellett
keresztül
keressünk
ki
kívül
között
közül
legalább
lehet
lehetett
legyen
lenne
lenni
lesz
lett
maga
magát
majd
majd
már
más
másik
meg
még
mellett
mert
mely
melyek
mi
mit
míg
miért
milyen
mikor
minden
mindent
mindenki
mindig
mint
mintha
mivel
most
nagy
nagyobb
nagyon
ne
néha
nekem
neki
nem
néhány
nélkül
nincs
olyan
ott
össze
õ
õk
õket
pedig
persze
s
saját
sem
semmi
sok
sokat
sokkal
számára
szemben
szerint
szinte
talán
tehát
teljes
tovább
továbbá
több
úgy
ugyanis
új
újabb
újra
után
utána
utolsó
vagy
vagyis
valaki
valami
valamint
való
vagyok
van
vannak
volt
voltam
voltak
voltunk
vissza
vele
viszont
volna

View File

@ -0,0 +1,279 @@
ad
al
allo
ai
agli
all
agl
alla
alle
con
col
coi
da
dal
dallo
dai
dagli
dall
dagl
dalla
dalle
di
del
dello
dei
degli
dell
degl
della
delle
in
nel
nello
nei
negli
nell
negl
nella
nelle
su
sul
sullo
sui
sugli
sull
sugl
sulla
sulle
per
tra
contro
io
tu
lui
lei
noi
voi
loro
mio
mia
miei
mie
tuo
tua
tuoi
tue
suo
sua
suoi
sue
nostro
nostra
nostri
nostre
vostro
vostra
vostri
vostre
mi
ti
ci
vi
lo
la
li
le
gli
ne
il
un
uno
una
ma
ed
se
perché
anche
come
dov
dove
che
chi
cui
non
più
quale
quanto
quanti
quanta
quante
quello
quelli
quella
quelle
questo
questi
questa
queste
si
tutto
tutti
a
c
e
i
l
o
ho
hai
ha
abbiamo
avete
hanno
abbia
abbiate
abbiano
avrò
avrai
avrà
avremo
avrete
avranno
avrei
avresti
avrebbe
avremmo
avreste
avrebbero
avevo
avevi
aveva
avevamo
avevate
avevano
ebbi
avesti
ebbe
avemmo
aveste
ebbero
avessi
avesse
avessimo
avessero
avendo
avuto
avuta
avuti
avute
sono
sei
è
siamo
siete
sia
siate
siano
sarò
sarai
sarà
saremo
sarete
saranno
sarei
saresti
sarebbe
saremmo
sareste
sarebbero
ero
eri
era
eravamo
eravate
erano
fui
fosti
fu
fummo
foste
furono
fossi
fosse
fossimo
fossero
essendo
faccio
fai
facciamo
fanno
faccia
facciate
facciano
farò
farai
farà
faremo
farete
faranno
farei
faresti
farebbe
faremmo
fareste
farebbero
facevo
facevi
faceva
facevamo
facevate
facevano
feci
facesti
fece
facemmo
faceste
fecero
facessi
facesse
facessimo
facessero
facendo
sto
stai
sta
stiamo
stanno
stia
stiate
stiano
starò
starai
starà
staremo
starete
staranno
starei
staresti
starebbe
staremmo
stareste
starebbero
stavo
stavi
stava
stavamo
stavate
stavano
stetti
stesti
stette
stemmo
steste
stettero
stessi
stesse
stessimo
stessero
stando

View File

@ -0,0 +1,176 @@
og
i
jeg
det
at
en
et
den
til
er
som
de
med
han
av
ikke
ikkje
der
var
meg
seg
men
ett
har
om
vi
min
mitt
ha
hadde
hun
over
da
ved
fra
du
ut
sin
dem
oss
opp
man
kan
hans
hvor
eller
hva
skal
selv
sjøl
her
alle
vil
bli
ble
blei
blitt
kunne
inn
når
være
kom
noen
noe
ville
dere
som
deres
kun
ja
etter
ned
skulle
denne
for
deg
si
sine
sitt
mot
å
meget
hvorfor
dette
disse
uten
hvordan
ingen
din
ditt
blir
samme
hvilken
hvilke
sånn
inni
mellom
vår
hver
hvem
vors
hvis
både
bare
enn
fordi
før
mange
også
slik
vært
være
båe
begge
siden
dykk
dykkar
dei
deira
deires
deim
di
eg
ein
eit
eitt
elles
honom
hjå
ho
hoe
henne
hennar
hennes
hoss
hossen
ikkje
ingi
inkje
korleis
korso
kva
kvar
kvarhelst
kven
kvi
kvifor
me
medan
mi
mine
mykje
no
nokon
noka
nokor
noko
nokre
si
sia
sidan
so
somt
somme
um
upp
vere
vore
verte
vort
varte
vart

View File

@ -0,0 +1,203 @@
de
a
o
que
e
do
da
em
um
para
com
não
uma
os
no
se
na
por
mais
as
dos
como
mas
ao
ele
das
à
seu
sua
ou
quando
muito
nos
eu
também
pelo
pela
até
isso
ela
entre
depois
sem
mesmo
aos
seus
quem
nas
me
esse
eles
você
essa
num
nem
suas
meu
às
minha
numa
pelos
elas
qual
nós
lhe
deles
essas
esses
pelas
este
dele
tu
te
vocês
vos
lhes
meus
minhas
teu
tua
teus
tuas
nosso
nossa
nossos
nossas
dela
delas
esta
estes
estas
aquele
aquela
aqueles
aquelas
isto
aquilo
estou
está
estamos
estão
estive
esteve
estivemos
estiveram
estava
estávamos
estavam
estivera
estivéramos
esteja
estejamos
estejam
estivesse
estivéssemos
estivessem
estiver
estivermos
estiverem
hei
havemos
hão
houve
houvemos
houveram
houvera
houvéramos
haja
hajamos
hajam
houvesse
houvéssemos
houvessem
houver
houvermos
houverem
houverei
houverá
houveremos
houverão
houveria
houveríamos
houveriam
sou
somos
são
era
éramos
eram
fui
foi
fomos
foram
fora
fôramos
seja
sejamos
sejam
fosse
fôssemos
fossem
for
formos
forem
serei
será
seremos
serão
seria
seríamos
seriam
tenho
tem
temos
tém
tinha
tínhamos
tinham
tive
teve
tivemos
tiveram
tivera
tivéramos
tenha
tenhamos
tenham
tivesse
tivéssemos
tivessem
tiver
tivermos
tiverem
terei
terá
teremos
terão
teria
teríamos
teriam

View File

@ -0,0 +1,151 @@
и
в
во
не
что
он
на
я
с
со
как
а
то
все
она
так
его
но
да
ты
к
у
же
вы
за
бы
по
только
ее
мне
было
вот
от
меня
еще
нет
о
из
ему
теперь
когда
даже
ну
вдруг
ли
если
уже
или
ни
быть
был
него
до
вас
нибудь
опять
уж
вам
ведь
там
потом
себя
ничего
ей
может
они
тут
где
есть
надо
ней
для
мы
тебя
их
чем
была
сам
чтоб
без
будто
чего
раз
тоже
себе
под
будет
ж
тогда
кто
этот
того
потому
этого
какой
совсем
ним
здесь
этом
один
почти
мой
тем
чтобы
нее
сейчас
были
куда
зачем
всех
никогда
можно
при
наконец
два
об
другой
хоть
после
над
больше
тот
через
эти
нас
про
всего
них
какая
много
разве
три
эту
моя
впрочем
хорошо
свою
этой
перед
иногда
лучше
чуть
том
нельзя
такой
им
более
всегда
конечно
всю
между

View File

@ -0,0 +1,313 @@
de
la
que
el
en
y
a
los
del
se
las
por
un
para
con
no
una
su
al
lo
como
más
pero
sus
le
ya
o
este
porque
esta
entre
cuando
muy
sin
sobre
también
me
hasta
hay
donde
quien
desde
todo
nos
durante
todos
uno
les
ni
contra
otros
ese
eso
ante
ellos
e
esto
antes
algunos
qué
unos
yo
otro
otras
otra
él
tanto
esa
estos
mucho
quienes
nada
muchos
cual
poco
ella
estar
estas
algunas
algo
nosotros
mi
mis
te
ti
tu
tus
ellas
nosotras
vosostros
vosostras
os
mío
mía
míos
mías
tuyo
tuya
tuyos
tuyas
suyo
suya
suyos
suyas
nuestro
nuestra
nuestros
nuestras
vuestro
vuestra
vuestros
vuestras
esos
esas
estoy
estás
está
estamos
estáis
están
esté
estés
estemos
estéis
estén
estaré
estarás
estará
estaremos
estaréis
estarán
estaría
estarías
estaríamos
estaríais
estarían
estaba
estabas
estábamos
estabais
estaban
estuve
estuviste
estuvo
estuvimos
estuvisteis
estuvieron
estuviera
estuvieras
estuviéramos
estuvierais
estuvieran
estuviese
estuvieses
estuviésemos
estuvieseis
estuviesen
estando
estado
estada
estados
estadas
estad
he
has
ha
hemos
habéis
han
haya
hayas
hayamos
hayáis
hayan
habré
habrás
habrá
habremos
habréis
habrán
habría
habrías
habríamos
habríais
habrían
había
habías
habíamos
habíais
habían
hube
hubiste
hubo
hubimos
hubisteis
hubieron
hubiera
hubieras
hubiéramos
hubierais
hubieran
hubiese
hubieses
hubiésemos
hubieseis
hubiesen
habiendo
habido
habida
habidos
habidas
soy
eres
es
somos
sois
son
sea
seas
seamos
seáis
sean
seré
serás
será
seremos
seréis
serán
sería
serías
seríamos
seríais
serían
era
eras
éramos
erais
eran
fui
fuiste
fue
fuimos
fuisteis
fueron
fuera
fueras
fuéramos
fuerais
fueran
fuese
fueses
fuésemos
fueseis
fuesen
sintiendo
sentido
sentida
sentidos
sentidas
siente
sentid
tengo
tienes
tiene
tenemos
tenéis
tienen
tenga
tengas
tengamos
tengáis
tengan
tendré
tendrás
tendrá
tendremos
tendréis
tendrán
tendría
tendrías
tendríamos
tendríais
tendrían
tenía
tenías
teníamos
teníais
tenían
tuve
tuviste
tuvo
tuvimos
tuvisteis
tuvieron
tuviera
tuvieras
tuviéramos
tuvierais
tuvieran
tuviese
tuvieses
tuviésemos
tuvieseis
tuviesen
teniendo
tenido
tenida
tenidos
tenidas
tened

View File

@ -0,0 +1,114 @@
och
det
att
i
en
jag
hon
som
han
den
med
var
sig
för
till
är
men
ett
om
hade
de
av
icke
mig
du
henne
sin
nu
har
inte
hans
honom
skulle
hennes
där
min
man
ej
vid
kunde
något
från
ut
när
efter
upp
vi
dem
vara
vad
över
än
dig
kan
sina
här
ha
mot
alla
under
någon
eller
allt
mycket
sedan
ju
denna
själv
detta
åt
utan
varit
hur
ingen
mitt
ni
bli
blev
oss
din
dessa
några
deras
blir
mina
samma
vilken
er
sådan
vår
blivit
dess
inom
mellan
sådant
varför
varje
vilka
ditt
vem
vilket
sitta
sådana
vart
dina
vars
vårt
våra
ert
era
vilkas