summaryrefslogtreecommitdiff
path: root/Build/source/texk/gregorio/gregorio-src/src
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/gregorio/gregorio-src/src')
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/Makefile.am142
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/bool.h30
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/characters.c1329
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/characters.h89
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/config.h36
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/dump/dump.c546
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/encode_utf8strings.c75
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/enum_generator.h80
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-elements-determination.c337
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-glyphs-determination.c1303
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination-l.c15127
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination.l1503
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.c2987
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.h721
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.c3178
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.h202
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.c659
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.h64
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l430
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.y1124
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-write.c1171
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc.h86
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c721
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c1750
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-write.c4539
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex.h151
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/messages.c172
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/messages.h90
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/plugins.h40
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/sha1.c346
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/sha1.h85
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/struct.c1609
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/struct.h984
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/struct_iter.h191
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/support.c282
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/support.h76
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/unicode.c174
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/unicode.h69
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/utf8strings.h36
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/utf8strings.h.in36
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c2166
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.h714
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.c1610
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.h90
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.h28
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l95
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.y146
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.c447
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.h52
49 files changed, 47918 insertions, 0 deletions
diff --git a/Build/source/texk/gregorio/gregorio-src/src/Makefile.am b/Build/source/texk/gregorio/gregorio-src/src/Makefile.am
new file mode 100644
index 00000000000..9728a64c205
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/Makefile.am
@@ -0,0 +1,142 @@
+# Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+#
+# This file is part of Gregorio.
+#
+# Gregorio is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Gregorio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/gabc -I$(top_srcdir)/src/dump -I$(top_srcdir)/src/gregoriotex
+AM_CFLAGS = $(KPSE_CFLAGS)
+LDADD = $(KPSE_LIBS)
+
+bin_PROGRAMS = gregorio$(GREGORIO_EXE_SUFFIX)
+gregorio__GREGORIO_EXE_SUFFIX__SOURCES = \
+ gregorio-utils.c characters.c characters.h messages.c messages.h struct.c \
+ struct.h struct_iter.h enum_generator.h unicode.c unicode.h sha1.c sha1.h \
+ support.c support.h config.h bool.h plugins.h utf8strings.h dump/dump.c \
+ gregoriotex/gregoriotex-write.c gregoriotex/gregoriotex-position.c \
+ gregoriotex/gregoriotex.h
+
+@MK@ifneq ($(wildcard ../.git),)
+@MK@ _tag_ = $(shell git describe --exact-match HEAD 2>/dev/null)
+@MK@ ifeq ($(_tag_),)
+@MK@ DEFS += -DBRANCH_VERSION='"$(shell git rev-parse --abbrev-ref HEAD)-$(shell git rev-parse --short HEAD)-$(shell git rev-list HEAD --count)"'
+@MK@ endif
+@MK@else
+@MK@ ifneq ($(wildcard ../.hg/git),)
+@MK@ _gitnode_ = $(shell hg log --template='{gitnode}' -r .)
+@MK@ ifeq ($(_gitnode_),)
+@MK@ DEFS += -DBRANCH_VERSION='"$(shell hg log --template='{activebookmark}-hg:{manifest}' -r .)"'
+@MK@ else
+@MK@ _tag_ = $(shell git --git-dir=../.hg/git describe --exact-match '$(_gitnode_)' 2>/dev/null)
+@MK@ ifeq ($(_tag_),)
+@MK@ DEFS += -DBRANCH_VERSION='"$(shell hg log --template='{activebookmark}' -r .)-$(shell git --git-dir=../.hg/git rev-parse --short '$(_gitnode_)')-$(shell git --git-dir=../.hg/git rev-list '$(_gitnode_)' --count)"'
+@MK@ endif
+@MK@ endif
+@MK@ endif
+@MK@endif
+
+# gabc files
+gregorio__GREGORIO_EXE_SUFFIX__SOURCES += \
+ gabc/gabc-elements-determination.c gabc/gabc-write.c \
+ gabc/gabc-glyphs-determination.c gabc/gabc.h \
+ gabc/gabc-score-determination.h gabc/gabc-score-determination.c \
+ gabc/gabc-score-determination-y.h gabc/gabc-score-determination-y.c \
+ gabc/gabc-score-determination-l.h gabc/gabc-score-determination-l.c \
+ gabc/gabc-notes-determination-l.c vowel/vowel.h vowel/vowel.c \
+ vowel/vowel-rules.h vowel/vowel-rules-l.h vowel/vowel-rules-l.c \
+ vowel/vowel-rules-y.h vowel/vowel-rules-y.c
+
+EXTRA_DIST = encode_utf8strings.c utf8strings.h.in utf8strings.h \
+ gabc/gabc-notes-determination.l gabc/gabc-notes-determination-l.c \
+ gabc/gabc-score-determination.h gabc/gabc-score-determination.y \
+ gabc/gabc-score-determination-y.h \
+ gabc/gabc-score-determination-y.c gabc/gabc-score-determination.l \
+ gabc/gabc-score-determination-l.h \
+ gabc/gabc-score-determination-l.c vowel/vowel-rules.l \
+ vowel/vowel-rules-l.h vowel/vowel-rules-l.c vowel/vowel-rules.y \
+ vowel/vowel-rules-y.h vowel/vowel-rules-y.c
+
+if HAVE_RC
+# Windows resources (see windows/README.md)
+gregorio-resources.o: ../windows/gregorio-resources.rc ../windows/gregorio.ico
+ $(RC) $(RCFLAGS) $< -o $@
+
+gregorio__GREGORIO_EXE_SUFFIX__SOURCES += ../windows/gregorio-resources.rc ../windows/gregorio.ico
+LDADD += gregorio-resources.o
+endif
+
+gabc/gabc-score-determination-y.c: gabc/gabc-score-determination.y
+ $(YACC) -v -d -p "gabc_score_determination_" -o $@ $<
+gabc/gabc-score-determination-y.h: gabc/gabc-score-determination-y.c
+ ## Recover from the removal of gabc/gabc-score-determination-y.h, see
+ ## https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html
+ @if test -f $@; then :; else \
+ rm -f gabc/gabc-score-determination-y.c; \
+ $(MAKE) $(AM_MAKEFLAGS) gabc/gabc-score-determination-y.c; \
+ fi
+
+gabc/gabc-score-determination-l.c: gabc/gabc-score-determination.l
+ $(LEX) -o $@ --header-file=gabc/gabc-score-determination-l.h $<
+gabc/gabc-score-determination-l.h: gabc/gabc-score-determination-l.c
+ ## Recover from the removal of gabc/gabc-score-determination-l.h, see
+ ## https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html
+ @if test -f $@; then :; else \
+ rm -f gabc/gabc-score-determination-l.c; \
+ $(MAKE) $(AM_MAKEFLAGS) gabc/gabc-score-determination-l.c; \
+ fi
+
+gabc/gabc-notes-determination-l.c: gabc/gabc-notes-determination.l
+ $(LEX) -o $@ $<
+
+vowel/vowel-rules-y.c: vowel/vowel-rules.y
+ $(YACC) -v -d -o $@ $<
+vowel/vowel-rules-y.h: vowel/vowel-rules-y.c
+ ## Recover from the removal of vowel/vowel-rules-y.h, see
+ ## https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html
+ @if test -f $@; then :; else \
+ rm -f vowel/vowel-rules-y.c; \
+ $(MAKE) $(AM_MAKEFLAGS) vowel/vowel-rules-y.c; \
+ fi
+
+vowel/vowel-rules-l.c: vowel/vowel-rules.l
+ $(LEX) -o $@ --header-file=vowel/vowel-rules-l.h $<
+vowel/vowel-rules-l.h: vowel/vowel-rules-l.c
+ ## Recover from the removal of vowel/vowel-rules-l.h, see
+ ## https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html
+ @if test -f $@; then :; else \
+ rm -f vowel/vowel-rules-l.c; \
+ $(MAKE) $(AM_MAKEFLAGS) vowel/vowel-rules-l.c; \
+ fi
+
+utf8strings.h: utf8strings.h.in
+ $(MAKE) $(AM_MAKEFLAGS) encode_utf8strings${EXEEXT}
+ ./encode_utf8strings${EXEEXT} $< $@
+
+encode_utf8strings${EXEEXT}: encode_utf8strings.c
+ $(CC) -o $@ $<
+
+clean-local:
+ find . -name '*.gcno' -print | xargs rm -f --
+ find . -name '*.gcda' -print | xargs rm -f --
+
+BUILT_SOURCES = utf8strings.h gabc/gabc-notes-determination-l.c \
+ gabc/gabc-score-determination-l.c \
+ gabc/gabc-score-determination-l.h \
+ gabc/gabc-score-determination-y.c \
+ gabc/gabc-score-determination-y.h vowel/vowel-rules-l.c \
+ vowel/vowel-rules-l.h vowel/vowel-rules-y.c \
+ vowel/vowel-rules-y.h
+
+CLEANFILES = encode_utf8strings${EXEEXT}
+MAINTAINERCLEANFILES = $(BUILT_SOURCES)
diff --git a/Build/source/texk/gregorio/gregorio-src/src/bool.h b/Build/source/texk/gregorio/gregorio-src/src/bool.h
new file mode 100644
index 00000000000..8857fde759f
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/bool.h
@@ -0,0 +1,30 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header provides a minimum of C11-like bool functionality.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef BOOL_H
+#define BOOL_H
+
+typedef unsigned int bool;
+#define true 1
+#define false 0
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/characters.c b/Build/source/texk/gregorio/gregorio-src/src/characters.c
new file mode 100644
index 00000000000..6caa92677fb
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/characters.c
@@ -0,0 +1,1329 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX.
+ * This file contains functions that deal with lyrics and styles.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file
+ * @brief This file contains almost all the gregorio_character manipulation things.
+ *
+ * @warning The code is very spaghetti, but I don't really think I can do it another way with the chosen representation of styles, and the fact that everything must be xml-compliant and tex-compliant...
+ * So this file is basically very hard to maintain. Moreover, it has not been very well coded, so it is even harder to maintain...
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <sys/stat.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "characters.h"
+#include "messages.h"
+#include "support.h"
+#include "utf8strings.h"
+#include "vowel/vowel.h"
+
+#define VOWEL_FILE "gregorio-vowels.dat"
+
+static bool read_vowel_rules(char *const lang) {
+ char *language = lang;
+ rulefile_parse_status status = RFPS_NOT_FOUND;
+ char **filenames, *filename, **p;
+ const char *description;
+ int tries;
+
+ gregorio_kpse_find_or_else(filenames, VOWEL_FILE, return false);
+
+ gregorio_vowel_tables_init();
+ /* only need to try twice; if it's not resolved by then, there is an alias
+ * loop */
+ for (tries = 0; tries < 2; ++tries) {
+ for (p = filenames; status != RFPS_FOUND && (filename = *p); ++p) {
+ /* read and parse the file */
+ gregorio_messagef("read_rules", VERBOSITY_INFO, 0,
+ _("Looking for %s in %s"), language, filename);
+ gregorio_vowel_tables_load(filename, &language, &status);
+ switch (status) {
+ case RFPS_FOUND:
+ description = "Found";
+ break;
+ case RFPS_ALIASED:
+ description = "Aliased to";
+ break;
+ default:
+ description = "Could not find";
+ break;
+ }
+ gregorio_messagef("read_rules", VERBOSITY_INFO, 0, _("%s %s in %s"),
+ description, language, filename);
+ }
+ if (status != RFPS_ALIASED) {
+ /* if it's not aliased, there's no reason to scan again */
+ break;
+ }
+ }
+ if (status == RFPS_ALIASED) {
+ gregorio_messagef("read_rules", VERBOSITY_WARNING, 0,
+ _("Unable to resolve alias for %s"), lang);
+ }
+
+ /* free the allocated memory */
+ for (p = filenames; *p; ++p) {
+ free(*p);
+ }
+ free(filenames);
+ if (language != lang) {
+ free(language);
+ }
+
+ return status == RFPS_FOUND;
+}
+
+void gregorio_set_centering_language(char *const language)
+{
+ if (!read_vowel_rules(language)) {
+ if (strcmp(language, "Latin") != 0 && strcmp(language, "latin") != 0 && strcmp(language, "la") != 0 && strcmp(language, "lat") != 0) {
+ gregorio_messagef("gregorio_set_centering_language",
+ VERBOSITY_WARNING, 0, _("unable to read vowel files for "
+ "%s; defaulting to Latin rules"), language);
+ }
+
+ gregorio_vowel_tables_init();
+ gregorio_vowel_table_add(DEFAULT_VOWELS);
+ gregorio_prefix_table_add("i");
+ gregorio_prefix_table_add("I");
+ gregorio_prefix_table_add("u");
+ gregorio_prefix_table_add("U");
+ }
+}
+
+static __inline const gregorio_character *skip_verbatim_or_special(
+ const gregorio_character *ch)
+{
+ /* skip past verbatim and special characters */
+ if (ch->cos.s.type == ST_T_BEGIN && (ch->cos.s.style == ST_VERBATIM
+ || ch->cos.s.style == ST_SPECIAL_CHAR)) {
+ if (ch->next_character) {
+ ch = ch->next_character;
+ }
+ while (ch->next_character && ch->is_character) {
+ ch = ch->next_character;
+ }
+ }
+ return ch;
+}
+
+static __inline bool handle_elision(const gregorio_character *const ch,
+ bool *in_elision)
+{
+ if (ch->cos.s.style != ST_ELISION) {
+ return false;
+ }
+
+ switch (ch->cos.s.type) {
+ case ST_T_BEGIN:
+ *in_elision = true;
+ break;
+
+ case ST_T_END:
+ *in_elision = false;
+ break;
+
+ case ST_T_NOTHING:
+ /* not reachable unless there's a programming error */
+ assert(false); /* LCOV_EXCL_LINE */
+ break;
+ }
+ return true;
+}
+
+static __inline int for_each_centerable_character(
+ const gregorio_character *const character,
+ void (*capture)(grewchar *, int, grewchar), grewchar *buffer)
+{
+ int count;
+ const gregorio_character *ch;
+ bool in_elision = false;
+
+ for (count = 0, ch = character; ch; ch = ch->next_character) {
+ if (ch->is_character) {
+ if (!in_elision) {
+ if (capture) {
+ capture(buffer, count, ch->cos.character);
+ }
+ ++count;
+ }
+ } else {
+ if (ch->cos.s.style == ST_PROTRUSION_FACTOR) {
+ /* if there is a protrusion, we will always encounter the
+ * protrusion factor first */
+ break;
+ }
+ if (ch->cos.s.type == ST_T_BEGIN && ch->cos.s.style == ST_ELISION) {
+ /* put in a special character at the beginning of an elision
+ * that represents the elision */
+ if (capture) {
+ capture(buffer, count, GREVOWEL_ELISION_MARK);
+ }
+ ++count;
+ }
+ if (!handle_elision(ch, &in_elision)) {
+ ch = skip_verbatim_or_special(ch);
+ }
+ }
+ }
+ return count;
+}
+
+/* this function assumes subject is sized correctly */
+static void capture_subject(grewchar *const subject, const int count,
+ const grewchar character)
+{
+ subject[count] = character;
+}
+
+static void determine_center(gregorio_character *character, int *start,
+ int *end)
+{
+ const int count = for_each_centerable_character(character, NULL, NULL);
+ grewchar *subject;
+
+ if (count == 0) {
+ return;
+ }
+
+ subject = (grewchar *)gregorio_malloc((count + 1) * sizeof(grewchar));
+ for_each_centerable_character(character, capture_subject, subject);
+ subject[count] = (grewchar)0;
+
+ *start = *end = -1;
+ gregorio_find_vowel_group(subject, start, end);
+
+ free(subject);
+}
+
+static bool go_to_end_initial(gregorio_character **param_character)
+{
+ bool has_initial = false;
+ gregorio_character *current_character = *param_character;
+ if (!current_character) {
+ return false;
+ }
+ gregorio_go_to_first_character_c(&current_character);
+ /* skip past any initial */
+ if (!current_character->is_character
+ && current_character->cos.s.type == ST_T_BEGIN
+ && current_character->cos.s.style == ST_INITIAL) {
+ has_initial = true;
+ while (current_character) {
+ if (!current_character->is_character
+ && current_character->cos.s.type == ST_T_END
+ && current_character->cos.s.style == ST_INITIAL) {
+ break;
+ }
+ current_character = current_character->next_character;
+ }
+ }
+ (*param_character) = current_character;
+ return has_initial;
+}
+
+/*
+ * The push function pushes a style in the stack, and updates first_style to
+ * this element.
+ */
+
+static void style_push(det_style **current_style, grestyle_style style)
+{
+ det_style *element;
+ gregorio_assert(current_style, style_push, "current_style may not be NULL",
+ return);
+ element = (det_style *) gregorio_malloc(sizeof(det_style));
+ element->style = style;
+ element->previous_style = NULL;
+ element->next_style = (*current_style);
+ if (*current_style) {
+ (*current_style)->previous_style = element;
+ }
+ (*current_style) = element;
+}
+
+/*
+ * Pop deletes an style in the stack (the style to delete is the parameter)
+ */
+
+static void style_pop(det_style **first_style, det_style *element)
+{
+ gregorio_assert(element && first_style && *first_style, style_pop,
+ "invalid arguments", return);
+ if (element->previous_style) {
+ assert(*first_style != element);
+ element->previous_style->next_style = element->next_style;
+ if (element->next_style) {
+ element->next_style->previous_style = element->previous_style;
+ }
+ } else {
+ if (element->next_style) {
+ element->next_style->previous_style = NULL;
+ (*first_style) = element->next_style;
+ } else {
+ (*first_style) = NULL;
+ }
+ }
+ free(element);
+}
+
+/*
+ * free_styles just frees the stack.
+ */
+
+static void free_styles(det_style **first_style)
+{
+ det_style *current_style;
+ gregorio_not_null(first_style, free_styles, return);
+ current_style = (*first_style);
+ while (current_style) {
+ current_style = current_style->next_style;
+ free((*first_style));
+ (*first_style) = current_style;
+ }
+}
+
+
+/*
+ * inline function that will be used for verbatim and special-characters in the
+ *
+ * next function, it calls function with a grewchar * which is the verbatim or
+ * special-character. It places current_character to the character next to the
+ * end of the verbatim or special_char charachters.
+ */
+static __inline void verb_or_sp(const gregorio_character **ptr_character,
+ const grestyle_style style, FILE *const f,
+ void (*const function) (FILE *, const grewchar *))
+{
+ int i, j;
+ grewchar *text;
+ const gregorio_character *current_character;
+ const gregorio_character *begin_character;
+
+ i = 0;
+ j = 0;
+
+ current_character = (*ptr_character)->next_character;
+ begin_character = current_character;
+ while (current_character) {
+ if (current_character->cos.s.type == ST_T_END
+ && current_character->cos.s.style == style) {
+ break;
+ } else {
+ if (current_character->is_character) {
+ i++;
+ }
+ current_character = current_character->next_character;
+ }
+ }
+ if (i == 0) {
+ *ptr_character = current_character;
+ return;
+ }
+ text = (grewchar *) gregorio_malloc((i + 1) * sizeof(grewchar));
+ current_character = begin_character;
+ while (j < i) {
+ if (current_character->is_character) {
+ text[j] = current_character->cos.character;
+ j++;
+ }
+ current_character = current_character->next_character;
+ }
+ text[i] = 0;
+ function(f, text);
+ free(text);
+
+ *ptr_character = current_character;
+}
+
+/**
+ * This function is made to simplify the output modules : they just have to
+ * declare some simple functions (what to do when meeting a beginning of style,
+ * a character, etc.) and to call this function with pointer to these
+ * functions, and that will automatically write the good ouput. This function
+ * does not test at all the gregorio_character list, if it is wrong, then the
+ * ouput will be wrong. It is very simple to understand, even if it is a bit
+ * long.
+ *
+ * @warning The difficulty comes when we have to write the first syllable text,
+ * without the first letter.
+ * The behaviour can have some bugs in this case if the first syllable has some
+ * complex styles. It would be a bit stupid to do such a thing, but users are
+ * usually very creative when it comes to inventing twisted things...
+ */
+void gregorio_write_text(const gregorio_write_text_phase phase,
+ const gregorio_character *current_character, FILE *const f,
+ void (*const printverb) (FILE *, const grewchar *),
+ void (*const printchar) (FILE *, grewchar),
+ void (*const begin) (FILE *, grestyle_style),
+ void (*const end) (FILE *, grestyle_style),
+ void (*const printspchar) (FILE *, const grewchar *))
+{
+ gregorio_assert(current_character, gregorio_write_text,
+ "current_character may not be NULL", return);
+ while (current_character) {
+ if (current_character->is_character) {
+ printchar(f, current_character->cos.character);
+ } else {
+ if (current_character->cos.s.type == ST_T_BEGIN) {
+ switch (current_character->cos.s.style) {
+ case ST_VERBATIM:
+ verb_or_sp(&current_character, ST_VERBATIM, f, printverb);
+ break;
+ case ST_SPECIAL_CHAR:
+ verb_or_sp(&current_character, ST_SPECIAL_CHAR, f,
+ printspchar);
+ break;
+ case ST_INITIAL:
+ if (phase == WTP_FIRST_SYLLABLE) {
+ while (current_character) {
+ if (!current_character->is_character
+ && current_character->cos.s.type == ST_T_END
+ && current_character->cos.s.style ==
+ ST_INITIAL) {
+ break;
+ }
+ current_character =
+ current_character->next_character;
+ }
+ } else {
+ begin(f, ST_INITIAL);
+ }
+ break;
+ default:
+ begin(f, current_character->cos.s.style);
+ break;
+ }
+ } else { /* ST_T_END */
+ end(f, current_character->cos.s.style);
+ }
+ }
+
+ if (current_character) {
+ current_character = current_character->next_character;
+ }
+ }
+}
+
+void gregorio_write_first_letter_alignment_text(
+ const gregorio_write_text_phase phase,
+ const gregorio_character *current_character, FILE *const f,
+ void (*const printverb) (FILE *, const grewchar *),
+ void (*const printchar) (FILE *, grewchar),
+ void (*const begin) (FILE *, grestyle_style),
+ void (*const end) (FILE *, grestyle_style),
+ void (*const printspchar) (FILE *, const grewchar *))
+{
+ /* stack of styles to close and reopen */
+ det_style *first_style = NULL;
+ det_style *last_style = NULL;
+ int first_letter_open = (phase == WTP_FIRST_SYLLABLE)? 2 : 1;
+
+ gregorio_assert(current_character,
+ gregorio_write_first_letter_alignment_text,
+ "current_character may not be NULL", return);
+
+ /* go to the first character */
+ gregorio_go_to_first_character(&current_character);
+
+ if (phase != WTP_FIRST_SYLLABLE) {
+ begin(f, ST_SYLLABLE_INITIAL);
+ }
+
+ /* loop until there are no characters left */
+ for (; current_character;
+ current_character = current_character->next_character) {
+ bool close_first_letter = false;
+ /* found a real character */
+ if (current_character->is_character) {
+ printchar(f, current_character->cos.character);
+ close_first_letter = first_letter_open != 0;
+ } else switch (current_character->cos.s.type) {
+ case ST_T_NOTHING:
+ /* not reachable unless there's a programming error */
+ assert(false); /* LCOV_EXCL_LINE */
+ break;
+ case ST_T_BEGIN:
+ /* handle styles */
+ switch (current_character->cos.s.style) {
+ case ST_CENTER:
+ case ST_FORCED_CENTER:
+ case ST_INITIAL:
+ case ST_FIRST_SYLLABLE_INITIAL:
+ /* ignore */
+ break;
+ case ST_VERBATIM:
+ verb_or_sp(&current_character, ST_VERBATIM, f, printverb);
+ close_first_letter = first_letter_open != 0;
+ break;
+ case ST_SPECIAL_CHAR:
+ verb_or_sp(&current_character, ST_SPECIAL_CHAR, f, printspchar);
+ close_first_letter = first_letter_open != 0;
+ break;
+ case ST_FIRST_WORD:
+ case ST_FIRST_SYLLABLE:
+ if (phase == WTP_FIRST_SYLLABLE) {
+ break;
+ } /* else fall through */
+ default:
+ /* push the style onto the stack */
+ style_push(&first_style, current_character->cos.s.style);
+ begin(f, current_character->cos.s.style);
+ }
+ break;
+ case ST_T_END:
+ switch (current_character->cos.s.style) {
+ case ST_CENTER:
+ case ST_FORCED_CENTER:
+ case ST_FIRST_SYLLABLE_INITIAL:
+ /* ignore */
+ break;
+ case ST_INITIAL:
+ /* in the case where the initial is closed before the first
+ * letter */
+ close_first_letter = first_letter_open > 1;
+ break;
+ case ST_VERBATIM:
+ case ST_SPECIAL_CHAR:
+ /* not reachable unless there's a programming error */
+ assert(false); /* LCOV_EXCL_LINE */
+ break;
+ case ST_FIRST_WORD:
+ case ST_FIRST_SYLLABLE:
+ if (phase == WTP_FIRST_SYLLABLE) {
+ break;
+ } /* else fall through */
+ default:
+ /* pop the style from the stack */
+ assert(first_style);
+ assert(first_style->style
+ == current_character->cos.s.style);
+ style_pop(&first_style, first_style);
+ end(f, current_character->cos.s.style);
+ }
+ break;
+ }
+
+ while (close_first_letter || (!current_character->next_character
+ && first_letter_open > 0)) {
+ close_first_letter = false;
+ --first_letter_open;
+
+ /* close all the styles in the stack */
+ if (first_style) {
+ det_style *current_style;
+ /* these are immediately closed, so go past them */
+ while (first_style && current_character
+ && current_character->next_character
+ && !current_character->next_character->is_character
+ && current_character->next_character->cos.s.type
+ == ST_T_END
+ && current_character->next_character->cos.s.style
+ == first_style->style) {
+ current_character = current_character->next_character;
+ style_pop(&first_style, first_style);
+ end(f, current_character->cos.s.style);
+ }
+ for (current_style = first_style; current_style;
+ current_style = current_style->next_style) {
+ end(f, current_style->style);
+ last_style = current_style;
+ }
+ }
+
+ end(f, ST_SYLLABLE_INITIAL);
+
+ /* reopen all styles */
+ for (; last_style; last_style = last_style->previous_style) {
+ begin(f, last_style->style);
+ }
+ }
+ }
+
+ if (phase == WTP_FIRST_SYLLABLE) {
+ /* the only way this can happen is if the first syllable is empty,
+ * but if the first syllable is empty, this function will not be
+ * called */
+ gregorio_assert_only(!first_letter_open,
+ gregorio_write_first_letter_alignment_text,
+ "first_syllable was not closed properly");
+ }
+
+ free_styles(&first_style);
+}
+
+/*
+ * Here starts the code of the handling of text and styles.
+ *
+ * This part is not the easiest, in fact is is the most complicated. The reason
+ * is that I want to make something coherent in memory (easy to interprete),
+ * and to let the user type whatever he wants. This part was originally written
+ * for gabc, that's why it's always talking about it. But it could as well be
+ * used by other read plugins, to put things in order.
+ *
+ * Basically all the following lines of code are made for the last function,
+ * that will take a "user-written" gregorio_character list into a xml-compliant
+ * and tex-compliant list. It's more complicated than it seems...
+ *
+ * Functionalities: For example if the user types tt<i>ttt<b>ttt</i>tt I want
+ * it to be represented as tt<i>ttt<b>ttt</b></i><b>tt</b>. The fabulous thing
+ * is that it is xml-compliant. This part also determines the middle, for
+ * example pot will be interpreted as p{o}t. When I did that I also thought
+ * about TeX styles that needed things like {p}{o}{t}, so when the user types
+ * <i>pot</i>, it is interpreted as <i>p</i>{<i>o</i>}<i>t</i>.
+ *
+ * Internal structure: To do so we have a structure, det_style, that will help
+ * us : it is a stack (double chained list) of the styles that we have seen
+ * until now. When we encounter a <i>, we push the i style on the stack. If we
+ * encounter a </i> we suppress the i style from the stack. Let's take a more
+ * complex example: if we encounter <i><b></i>, the stack will be first null,
+ * then i then bi, and there we want to end i, but it is not the first style of
+ * the stack, so we close all the styles that we encounter before we encounter
+ * i (remember, this is for xml-compliance), so we insert a </b> before the
+ * </i>. But that's not all, we also write a <b> after the </i>, so that the b
+ * style continues. There our stack is just b. For center, we just close all
+ * the styles in the stack, insert a { and reopen all the styles in the stack.
+ *
+ * The structure used for character, styles, etc. is described in
+ * include/struct.h
+ *
+ * The functionment in this file is quite simple : we add all the characters
+ * that we see, even if they are incoherent, in the gregorio_character list,
+ * and then we call a very complex function that will build a stack of the
+ * style, determine the middle, make all xml-compliant, mow the lawn, etc.
+ *
+ * This code is *really* spaghetti, but I think it's a necessary pain.
+ *
+ */
+
+/*
+ *
+ * This function inserts a style before current_character, updating the double
+ * chained list.
+ *
+ */
+
+static void insert_style_before(unsigned char type,
+ unsigned char style, gregorio_character *current_character)
+{
+ gregorio_character *element =
+ (gregorio_character *) gregorio_malloc(sizeof(gregorio_character));
+ element->is_character = 0;
+ element->cos.s.type = type;
+ element->cos.s.style = style;
+ element->next_character = current_character;
+ if (current_character->previous_character) {
+ current_character->previous_character->next_character = element;
+ }
+ element->previous_character = current_character->previous_character;
+ current_character->previous_character = element;
+}
+
+/*
+ *
+ * This function puts a style after current_character, and updates
+ * current_character to the gregorio_character it created. It updates the
+ * double chained list. It does not touche to the det_styles list.
+ *
+ */
+
+static void insert_style_after(unsigned char type, unsigned char style,
+ gregorio_character **current_character)
+{
+ gregorio_character *element =
+ (gregorio_character *) gregorio_malloc(sizeof(gregorio_character));
+ element->is_character = 0;
+ element->cos.s.type = type;
+ element->cos.s.style = style;
+ element->next_character = (*current_character)->next_character;
+ if ((*current_character)->next_character) {
+ (*current_character)->next_character->previous_character = element;
+ }
+ element->previous_character = (*current_character);
+ (*current_character)->next_character = element;
+ (*current_character) = element;
+}
+
+#if 0
+static void insert_char_after(grewchar c,
+ gregorio_character **current_character)
+{
+ gregorio_character *element =
+ (gregorio_character *) gregorio_malloc(sizeof(gregorio_character));
+ element->is_character = 1;
+ element->cos.character = c;
+ element->next_character = (*current_character)->next_character;
+ if ((*current_character)->next_character) {
+ (*current_character)->next_character->previous_character = element;
+ }
+ element->previous_character = (*current_character);
+ (*current_character)->next_character = element;
+ (*current_character) = element;
+}
+#endif
+
+/*
+ *
+ * This function suppresses the character, updates the double chained
+ * list, and returns the character after, if there is one.
+ *
+ */
+
+static __inline gregorio_character *suppress_character(
+ gregorio_character *current_character)
+{
+ if (current_character) {
+ gregorio_character *thischaracter = current_character;
+ if (current_character->previous_character) {
+ current_character->previous_character->next_character =
+ current_character->next_character;
+ }
+ if (current_character->next_character) {
+ current_character->next_character->previous_character =
+ current_character->previous_character;
+ }
+ current_character = current_character->next_character;
+ free(thischaracter);
+ }
+ return current_character;
+}
+
+/*
+ *
+ * Then start the inline functions for the big function. the first one is the
+ * function we call when we close a style. The magic thing is that is will
+ * prevent things like a<i></i>{<i>b</b>: when the user types a<i>b</i>, if the
+ * middle is between a and b (...), it will interpret it as a{<i>b</i>.
+ *
+ */
+
+static __inline void close_style(gregorio_character *current_character,
+ det_style *current_style)
+{
+ /* we suppose that there is a previous_character, because there is a
+ * current_style
+ */
+ gregorio_assert(current_character && current_character->previous_character,
+ close_syllable, "have a style but no previous character", return);
+ if (!current_character->previous_character->is_character
+ && current_character->previous_character->cos.s.style ==
+ current_style->style) {
+ /* we do it this way rather than calling suppress_character on the
+ * previous character because the intent is more obvious to both the
+ * human reading it and to the clang static analyzer */
+ gregorio_character *tofree = current_character->previous_character;
+ if (tofree->previous_character) {
+ tofree->previous_character->next_character = current_character;
+ }
+ current_character->previous_character = tofree->previous_character;
+ free(tofree);
+ } else {
+ insert_style_before(ST_T_END, current_style->style, current_character);
+ }
+}
+
+/*
+ *
+ * next the function called when we have determined that we must end the center
+ * here : it closes all styles, adds a } and then reopens all styles.
+ *
+ */
+
+/* type is ST_CENTER or ST_FORCED_CENTER */
+static __inline void end_center(grestyle_style type,
+ gregorio_character *current_character, det_style **ptr_style)
+{
+ det_style *current_style;
+ current_style = *ptr_style;
+
+ while (current_style) {
+ close_style(current_character, current_style);
+ if (current_style->next_style) {
+ current_style = current_style->next_style;
+ } else {
+ break;
+ }
+ }
+ insert_style_before(ST_T_END, type, current_character);
+ while (current_style) {
+ insert_style_before(ST_T_BEGIN, current_style->style,
+ current_character);
+ if (current_style->previous_style) {
+ current_style = current_style->previous_style;
+ } else {
+ break;
+ }
+ }
+
+ *ptr_style = current_style;
+}
+
+/*
+ * about the same, but adding a {
+ */
+
+static __inline void begin_center(grestyle_style type,
+ gregorio_character *current_character, det_style **ptr_style)
+{
+ det_style *current_style;
+ current_style = *ptr_style;
+
+ while (current_style) {
+ close_style(current_character, current_style);
+ if (current_style->next_style) {
+ current_style = current_style->next_style;
+ } else {
+ break;
+ }
+ }
+ insert_style_before(ST_T_BEGIN, type, current_character);
+ while (current_style) {
+ insert_style_before(ST_T_BEGIN, current_style->style,
+ current_character);
+ if (current_style->previous_style) {
+ current_style = current_style->previous_style;
+ } else {
+ break;
+ }
+ }
+
+ *ptr_style = current_style;
+}
+
+/*
+ * THE big function. Very long, using a lot of long macros, etc. I hope you
+ * really want to understand it, 'cause it won't be easy.
+ *
+ * current character is a pointer to a gregorio_character. The
+ * gregorio_character double-chained list it is in will be totally reorganized
+ * so that it is xml compliant, and the function will update it to the first
+ * character of this brand new list.
+ *
+ * center_is_determined has the values present in characters.h.
+ *
+ * Another difficulty is the fact that we must consider characters in verbatim
+ * and special character styles like only one block, we can't say the center is
+ * in the middle of a verbatim block.
+ */
+
+void gregorio_rebuild_characters(gregorio_character **const param_character,
+ gregorio_center_determination center_is_determined, bool skip_initial)
+{
+ /* the current_character */
+ gregorio_character *current_character = *param_character;
+ gregorio_character *sentinel;
+ det_style *first_style = NULL;
+ /* determining the type of centering (forced or not) */
+ grestyle_style center_type = ST_NO_STYLE;
+ int start = -1, end = -1, index = -1;
+ bool in_elision = false;
+ det_style *current_style;
+ /* so, here we start: we go to the first_character */
+ if (skip_initial && go_to_end_initial(&current_character)) {
+ if (!current_character->next_character) {
+ /* nothing else to rebuild, but the initial needs to be ST_CENTER */
+ insert_style_after(ST_T_END, ST_CENTER, &current_character);
+ gregorio_go_to_first_character_c(&current_character);
+ insert_style_before(ST_T_BEGIN, ST_CENTER, current_character);
+ gregorio_go_to_first_character_c(&current_character);
+ (*param_character) = current_character;
+ return;
+ }
+ /* move to the character after the initial */
+ current_character = current_character->next_character;
+ } else {
+ if (current_character) {
+ gregorio_go_to_first_character_c(&current_character);
+ }
+ }
+ /* first we see if there is already a center determined */
+ if (center_is_determined == 0) {
+ center_type = ST_CENTER;
+ determine_center(current_character, &start, &end);
+ } else {
+ center_type = ST_FORCED_CENTER;
+ }
+ if (!current_character) {
+ return;
+ }
+ for (sentinel = current_character; sentinel->next_character;
+ sentinel = sentinel->next_character) {
+ /* just loop to get the last character */
+ }
+ /* put a sentinel at the end to aid in looping */
+ insert_style_after(ST_T_NOTHING, ST_SENTINEL, &sentinel);
+ /* we loop until there isn't any character */
+ while (current_character && current_character != sentinel) {
+ /* IMPORTANT: A continue inside this loop MUST put current_character on
+ * the next character to process */
+
+ /* the first part of the function deals with real characters (not
+ * styles) */
+ if (current_character->is_character) {
+ if (!in_elision) {
+ ++index;
+ if (!center_is_determined && index == start) {
+ /* the firstcase is if the user hasn't determined the
+ * middle, and we have only seen vowels so far (else
+ * center_is_determined would be DETERMINING_MIDDLE). The
+ * current_character is the first vowel, so we start the
+ * center here. */
+ begin_center(center_type, current_character, &first_style);
+ center_is_determined = CENTER_DETERMINING_MIDDLE;
+ } else if (center_is_determined == CENTER_DETERMINING_MIDDLE
+ && index == end) {
+ /* the case where the user has not determined the middle
+ * and we are in the middle section of the syllable, but
+ * there we encounter something that is not a vowel, so the
+ * center ends there. */
+ end_center(center_type, current_character, &first_style);
+ center_is_determined = CENTER_FULLY_DETERMINED;
+ } /* else it is just a normal character... we simply pass. */
+ }
+ } else {
+ const grestyle_style style = current_character->cos.s.style;
+ /* there starts the second part of the function that deals with the
+ * styles characters */
+ switch (current_character->cos.s.type) {
+ case ST_T_BEGIN:
+ /* the beginning of a style */
+
+ if (center_is_determined == CENTER_DETERMINING_MIDDLE
+ && index == end - 1) {
+ /* if we are determining the end of the center and we have
+ * a, ELISION, VERBATIM or SPECIAL_CHAR style, we end the
+ * center determination */
+ switch (style) {
+ case ST_VERBATIM:
+ case ST_SPECIAL_CHAR:
+ case ST_ELISION:
+ end_center(center_type, current_character, &first_style);
+ center_is_determined = CENTER_FULLY_DETERMINED;
+ break;
+
+ default:
+ /* something else; don't do anything */
+ break;
+ }
+ }
+
+ if (style == ST_ELISION) {
+ /* skip over the elision marker in the vowel determination
+ * buffer */
+ ++index;
+ }
+
+ switch (style) {
+ case ST_VERBATIM:
+ case ST_SPECIAL_CHAR:
+ /* Here we pass all the characters after a verbatim (or
+ * special char) beginning, until we find a style (begin or
+ * end) */
+ if (current_character->next_character) {
+ current_character = current_character->next_character;
+ }
+ while (current_character && current_character != sentinel
+ && current_character->is_character) {
+ current_character = current_character->next_character;
+ }
+ assert(current_character);
+ if (current_character != sentinel) {
+ gregorio_assert2(!current_character->is_character
+ && current_character->cos.s.type == ST_T_END
+ && current_character->cos.s.style == style,
+ gregorio_rebuild_characters, "mismatched %s",
+ grestyle_style_to_string(style), break);
+ }
+ break;
+
+ case ST_CENTER:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregorio_rebuild_characters,
+ "encountered unexpected begin ST_CENTER");
+ break;
+ /* LCOV_EXCL_STOP */
+
+ case ST_FORCED_CENTER:
+ begin_center(center_type, current_character, &first_style);
+ current_character = suppress_character(current_character);
+ continue;
+
+ default:
+ handle_elision(current_character, &in_elision);
+ /* it the beginning of a style, which is not center. We
+ * check if the style is not already in the stack. If it is
+ * the case, we suppress the character and pass */
+ for (current_style = first_style; current_style
+ && current_style->style != current_character->cos.s.style;
+ current_style = current_style->next_style) {
+ /* just loop */
+ }
+ if (current_style) {
+ /* repeated styles should already have been filtered out
+ * during parsing, so if this is hit, it's a programming
+ * error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregorio_rebuild_characters,
+ "encountered repeated style");
+ current_character = suppress_character(current_character);
+ continue;
+ /* LCOV_EXCL_STOP */
+ }
+ /* if it is something to add then we just push the style in the
+ * stack and continue. */
+ style_push(&first_style, current_character->cos.s.style);
+ break;
+ }
+ break;
+
+ case ST_T_END:
+ /* the beginning of a style */
+ switch(current_character->cos.s.style) {
+ case ST_VERBATIM:
+ case ST_SPECIAL_CHAR:
+ case ST_CENTER:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(gregorio_rebuild_characters,
+ "encountered unexpected end %s",
+ grestyle_style_to_string(
+ current_character->cos.s.style));
+ break;
+ /* LCOV_EXCL_STOP */
+
+ case ST_FORCED_CENTER:
+ end_center(center_type, current_character, &first_style);
+ current_character = suppress_character(current_character);
+ continue;
+
+ default:
+ handle_elision(current_character, &in_elision);
+ /* the case of the end of a style (the most complex).
+ * First, we have to see if the style is in the stack. If
+ * there is no stack, we just suppress and continue. */
+ if (!first_style) {
+ current_character = suppress_character(current_character);
+ continue;
+ }
+ /* so, we look if it is in the stack. If it is we put
+ * current_style to the style just before the style
+ * corresponding to the character that we are treating
+ * (still there ?) */
+ for (current_style = first_style; current_style
+ && current_style->style
+ != current_character->cos.s.style;
+ current_style = current_style->next_style) {
+ /* just loop */
+ }
+ if (current_style) {
+ det_style *this_style;
+ /* if there are styles before in the stack, we close
+ * them */
+ for (this_style = first_style;
+ this_style != current_style;
+ this_style = this_style->next_style) {
+ insert_style_before(ST_T_END, this_style->style,
+ current_character);
+ }
+ /* and then we reopen them */
+ for (this_style = this_style->previous_style;
+ this_style;
+ this_style = this_style->previous_style) {
+ insert_style_after(ST_T_BEGIN, this_style->style,
+ &current_character);
+ }
+ /* we delete the style in the stack */
+ style_pop(&first_style, current_style);
+ } else {
+ current_character = suppress_character(current_character);
+ continue;
+ }
+ }
+ break;
+
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregorio_rebuild_characters,
+ "unexpected style type");
+ }
+ /* LCOV_EXCL_STOP */
+ }
+ current_character = current_character->next_character;
+ }
+ /* destroy the sentinel */
+ current_character = sentinel->previous_character;
+ current_character->next_character = NULL;
+ free(sentinel);
+ /* we terminate all the styles that are still in the stack */
+ for (current_style = first_style; current_style;
+ current_style = current_style->next_style) {
+ insert_style_after(ST_T_END, current_style->style,
+ &current_character);
+ }
+ /* current_character is at the end of the list now, so if we havn't closed
+ * the center, we do it at the end. */
+ if (center_is_determined != CENTER_FULLY_DETERMINED) {
+ insert_style_after(ST_T_END, center_type, &current_character);
+ }
+ /* these three lines are for the case where the user didn't tell anything
+ * about the middle and there aren't any vowel in the syllable, so we
+ * begin the center before the first character (you can notice that there
+ * is no problem of style). */
+ if (!center_is_determined) {
+ if (skip_initial && go_to_end_initial(&current_character)) {
+ current_character = current_character->next_character;
+ } else {
+ gregorio_go_to_first_character_c(&current_character);
+ }
+ insert_style_before(ST_T_BEGIN, ST_CENTER, current_character);
+ }
+ /* well.. you're quite brave if you reach this comment. */
+ gregorio_go_to_first_character_c(&current_character);
+ (*param_character) = current_character;
+ free_styles(&first_style);
+}
+
+/**
+ * @brief This function will determine the behaviour of gregorio when it comes to the recognition of the initial.
+ *
+ * Basically it will take a gregorio_character list and return the same list, but with a style added : ST_INITIAL. This style will incidate the initial. The center will be placed at the second letter, unless there is a FORCED_CENTER somewhere.
+ * Finally all will be xml-compliant and tex-compliant when we call gregorio_rebuild_characters.
+ *
+ * If we note <> for the initial and {} for the center, here is what we want:
+ *
+ * @li \verbatim Po -> <P>{o} \endverbatim
+ * @li \verbatim {A}b -> <>{A}b \endverbatim
+ * @li \verbatim {}a -> <>{}a \endverbatim
+ * @li \verbatim Glo -> <G>{l}o \endverbatim
+ * @li \verbatim Gl{o} -> <G>l{o} \endverbatim
+ *
+ * @param param_character is a pointer to the (pointer to the) first character, it will be modified so that it points to the new first character.
+ */
+void gregorio_rebuild_first_syllable(gregorio_character **param_character,
+ bool separate_initial)
+{
+ /* the current_character */
+ gregorio_character *current_character = *param_character;
+ gregorio_character *first_character;
+ gregorio_character *start_of_special;
+ /* so, here we start: we go to the first_character */
+ gregorio_go_to_first_character_c(&current_character);
+ /* first we look at the styles to see if there is a FORCED_CENTER
+ * somewhere */
+ /* Note: we don't have to deal with ST_CENTER here because
+ * gregorio_rebuild_first_syllable is meant to be run **before**
+ * gregorio_rebuild_characters, which is what adds ST_CENTER */
+ gregorio_assert(param_character, gregorio_rebuild_first_syllable,
+ "param_character may not be NULL", return);
+ while (current_character) {
+ if (!current_character->is_character) {
+ if (current_character->cos.s.style == ST_FORCED_CENTER) {
+ /* we can break here, as there won't be forced center plus
+ * center */
+ break;
+ }
+ }
+ current_character = current_character->next_character;
+ }
+ current_character = *param_character;
+ gregorio_go_to_first_character_c(&current_character);
+ first_character = current_character;
+ /* now we are going to place the two INITIAL styles (begin and end) */
+ while (current_character) {
+ if (!current_character->is_character
+ && (current_character->cos.s.style == ST_FORCED_CENTER
+ || current_character->cos.s.style == ST_PROTRUSION_FACTOR)) {
+ /* we don't touch anything after a FORCED_CENTER, so we put an
+ * empty INITIAL style just before; we handle the weird case of
+ * a protrusion (manual or automatic) at the initial the same way
+ * (we need only check for PROTRUSION_FACTOR since that will come
+ * before PROTRUSION) */
+ current_character = first_character;
+ insert_style_before(ST_T_BEGIN, ST_INITIAL, current_character);
+ current_character = current_character->previous_character;
+ insert_style_after(ST_T_END, ST_INITIAL, &current_character);
+ break;
+ }
+ /* this if is a hack to make gregorio consider verbatim blocks and
+ * special chars like one block, not a sequence of letters */
+ if (!current_character->is_character
+ && current_character->cos.s.type == ST_T_BEGIN
+ && (current_character->cos.s.style == ST_VERBATIM
+ || current_character->cos.s.style == ST_SPECIAL_CHAR)) {
+ insert_style_before(ST_T_BEGIN, ST_INITIAL, current_character);
+ start_of_special = current_character->previous_character;
+ /* ... which is now the begin-initial style */
+
+ if (current_character->next_character) {
+ current_character = current_character->next_character;
+ }
+ while (current_character->next_character
+ && current_character->is_character) {
+ current_character = current_character->next_character;
+ }
+ insert_style_after(ST_T_END, ST_INITIAL, &current_character);
+ if (separate_initial && start_of_special->previous_character) {
+ /* we need to move the initial to the front */
+ start_of_special->previous_character->next_character =
+ current_character->next_character;
+ current_character->next_character->previous_character =
+ start_of_special->previous_character;
+ start_of_special->previous_character = NULL;
+ current_character->next_character = first_character;
+ first_character->previous_character = current_character;
+ }
+ break;
+ }
+ if (current_character->is_character) {
+ if (separate_initial && current_character->previous_character) {
+ /* we need to move the initial to the front */
+ current_character->previous_character->next_character =
+ current_character->next_character;
+ current_character->next_character->previous_character =
+ current_character->previous_character;
+ current_character->previous_character = NULL;
+ current_character->next_character = first_character;
+ first_character->previous_character = current_character;
+ }
+ insert_style_before(ST_T_BEGIN, ST_INITIAL, current_character);
+ insert_style_after(ST_T_END, ST_INITIAL, &current_character);
+ break;
+ }
+ current_character = current_character->next_character;
+ }
+ /* now apply the first syllable style */
+ current_character = *param_character;
+ if (separate_initial) {
+ if (go_to_end_initial(&current_character)) {
+ current_character = current_character->next_character;
+ }
+ } else {
+ gregorio_go_to_first_character_c(&current_character);
+ }
+ if (current_character) {
+ bool marked_syllable_initial = false;
+ insert_style_before(ST_T_BEGIN, ST_FIRST_SYLLABLE, current_character);
+ do {
+ if (!marked_syllable_initial && (current_character->is_character
+ || (current_character->cos.s.type == ST_T_BEGIN
+ && (current_character->cos.s.style == ST_VERBATIM
+ || current_character->cos.s.style
+ == ST_SPECIAL_CHAR
+ )
+ )
+ )) {
+ marked_syllable_initial = true;
+ insert_style_before(ST_T_BEGIN, ST_FIRST_SYLLABLE_INITIAL,
+ current_character);
+ if (!current_character->is_character) {
+ /* skip past the verbatim or special character */
+ if (current_character->next_character) {
+ current_character = current_character->next_character;
+ }
+ while (current_character->next_character
+ && current_character->is_character) {
+ current_character = current_character->next_character;
+ }
+ }
+ insert_style_after(ST_T_END, ST_FIRST_SYLLABLE_INITIAL,
+ &current_character);
+ }
+ if (!current_character->is_character) {
+ switch (current_character->cos.s.style) {
+ case ST_CENTER:
+ case ST_FORCED_CENTER:
+ insert_style_before(ST_T_END, ST_FIRST_SYLLABLE,
+ current_character);
+ insert_style_after(ST_T_BEGIN, ST_FIRST_SYLLABLE,
+ &current_character);
+ break;
+
+ case ST_PROTRUSION_FACTOR:
+ /* protrusion is not allowed to be the syllable initial;
+ * we only need to check PROTRUSION_FACTOR since that will
+ * come before PROTRUSION */
+ marked_syllable_initial = true;
+ break;
+
+ default:
+ break;
+ }
+ }
+ if (!current_character->next_character) {
+ insert_style_after(ST_T_END, ST_FIRST_SYLLABLE,
+ &current_character);
+ }
+ current_character = current_character->next_character;
+ } while (current_character);
+ }
+
+ current_character = *param_character;
+ gregorio_go_to_first_character_c(&current_character);
+ (*param_character) = current_character;
+}
+
+void gregorio_set_first_word(gregorio_character **const character)
+{
+ gregorio_character *ch = *character;
+ if (go_to_end_initial(&ch)) {
+ ch = ch->next_character;
+ }
+ if (ch) {
+ bool started_style = false;
+ while (ch) {
+ if (!ch->is_character
+ && (ch->cos.s.style == ST_CENTER
+ || ch->cos.s.style == ST_FORCED_CENTER)) {
+ if (started_style) {
+ started_style = false;
+ insert_style_before(ST_T_END, ST_FIRST_WORD, ch);
+ }
+ } else if (!started_style) {
+ started_style = true;
+ insert_style_before(ST_T_BEGIN, ST_FIRST_WORD, ch);
+ }
+
+ if (!ch->next_character && started_style) {
+ insert_style_after(ST_T_END, ST_FIRST_WORD, &ch);
+ }
+
+ ch = ch->next_character;
+ }
+ }
+ /* else there are no more characters here */
+
+ if (*character) {
+ gregorio_go_to_first_character_c(character);
+ }
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/characters.h b/Build/source/texk/gregorio/gregorio-src/src/characters.h
new file mode 100644
index 00000000000..33f40616d44
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/characters.h
@@ -0,0 +1,89 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes the lyric handling data structures and entry points.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CHARACTERS_H
+#define CHARACTERS_H
+
+#include "bool.h"
+#include "struct.h"
+
+/*
+ *
+ * The three next defines are the possible values of center_is_determined.
+ *
+ * CENTER_NOT_DETERMINED means that the plugin has encountered no { nor } (in
+ * the gabc syntax). CENTER_HALF_DETERMINED means that the plugin has
+ * encountered a { but no }, and we will try to determine a middle starting
+ * after the {. CENTER_FULLY_DETERMINED means that lex has encountered a { and
+ * a }, so we won't determine the middle, it is considered done.
+ * CENTER_DETERMINING_MIDDLE is used internally in the big function to know
+ * where we are in the middle determination.
+ *
+ */
+
+typedef enum gregorio_center_determination {
+ CENTER_NOT_DETERMINED = 0,
+ CENTER_HALF_DETERMINED,
+ CENTER_FULLY_DETERMINED,
+ CENTER_DETERMINING_MIDDLE
+} gregorio_center_determination;
+
+/* this is a temporary structure that will be used for style determination */
+
+typedef struct det_style {
+ grestyle_style style;
+ struct det_style *previous_style;
+ struct det_style *next_style;
+} det_style;
+
+typedef enum gregorio_write_text_phase {
+ WTP_NORMAL,
+ WTP_FIRST_SYLLABLE
+} gregorio_write_text_phase;
+
+void gregorio_write_text(gregorio_write_text_phase phase,
+ const gregorio_character *current_character, FILE *f,
+ void (*printverb) (FILE *, const grewchar *),
+ void (*printchar) (FILE *, grewchar),
+ void (*begin) (FILE *, grestyle_style),
+ void (*end) (FILE *, grestyle_style),
+ void (*printspchar) (FILE *, const grewchar *));
+
+void gregorio_write_first_letter_alignment_text(gregorio_write_text_phase phase,
+ const gregorio_character *current_character, FILE *f,
+ void (*printverb) (FILE *, const grewchar *),
+ void (*printchar) (FILE *, grewchar),
+ void (*begin) (FILE *, grestyle_style),
+ void (*end) (FILE *, grestyle_style),
+ void (*printspchar) (FILE *, const grewchar *));
+
+void gregorio_set_centering_language(char *language);
+
+void gregorio_rebuild_characters(gregorio_character **param_character,
+ gregorio_center_determination center_is_determined, bool skip_initial);
+
+void gregorio_rebuild_first_syllable(gregorio_character **param_character,
+ bool separate_initial);
+
+void gregorio_set_first_word(gregorio_character **character);
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/config.h b/Build/source/texk/gregorio/gregorio-src/src/config.h
new file mode 100644
index 00000000000..259c4ca0c3a
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/config.h
@@ -0,0 +1,36 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header wraps the generated config_.h to provide version macros.
+ *
+ * Gregorio configuration headers.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_.h"
+
+#ifdef BRANCH_VERSION
+#define GREGORIO_VERSION VERSION "-" BRANCH_VERSION
+#else
+#define GREGORIO_VERSION VERSION
+#endif
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/dump/dump.c b/Build/source/texk/gregorio/gregorio-src/src/dump/dump.c
new file mode 100644
index 00000000000..5f604b9ba3d
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/dump/dump.c
@@ -0,0 +1,546 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX.
+ * This file provides functions to dump out Gregorio structures.
+ *
+ * Copyright (C) 2007-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "plugins.h"
+#include "support.h"
+
+static const char *dump_style_to_string(grestyle_style style)
+{
+ static char buf[50];
+
+ gregorio_snprintf(buf, sizeof buf, "%16s", grestyle_style_to_string(style));
+ return buf;
+}
+
+void dump_write_characters(FILE *const f,
+ const gregorio_character * current_character)
+{
+ while (current_character) {
+ fprintf(f,
+ "---------------------------------------------------------------------\n");
+ if (current_character->is_character) {
+ fprintf(f, " character ");
+ gregorio_print_unichar(f, current_character->cos.character);
+ fprintf(f, "\n");
+ } else {
+ switch (current_character->cos.s.type) {
+ case ST_T_BEGIN:
+ fprintf(f, " beginning of style %s\n",
+ dump_style_to_string(current_character->cos.s.style));
+ break;
+ case ST_T_END:
+ fprintf(f, " end of style %s\n",
+ dump_style_to_string(current_character->cos.s.style));
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(f, " !! IMPROPER STYLE !! %s\n",
+ dump_style_to_string(current_character->cos.s.style));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ }
+ current_character = current_character->next_character;
+ }
+}
+
+static const char *dump_bool(bool value) {
+ return value? "true" : "false";
+}
+
+static const char *dump_pitch(const char height, const char highest_pitch) {
+ static char buf[20];
+ if (height >= LOWEST_PITCH && height <= highest_pitch) {
+ char pitch = height + 'a' - LOWEST_PITCH;
+ if (pitch == 'o') {
+ pitch = 'p';
+ }
+ gregorio_snprintf(buf, 20, "%c", pitch);
+ } else {
+ /* not reachable unless there's a programming error */
+ gregorio_snprintf(buf, 20, "?%d", height); /* LCOV_EXCL_LINE */
+ }
+ return buf;
+}
+
+static void dump_hepisema_adjustment(FILE *const f, const gregorio_note *note,
+ const gregorio_sign_orientation orientation, const char *const which) {
+ unsigned short index = note->he_adjustment_index[orientation];
+ if (index) {
+ gregorio_hepisema_adjustment *adj = gregorio_get_hepisema_adjustment(
+ index);
+ fprintf(f, " %s hepisema group %d\n", which, index);
+ fprintf(f, " %s hep. vbasepos %d (%s)\n", which,
+ adj->vbasepos,
+ gregorio_hepisema_vbasepos_to_string(adj->vbasepos));
+ if (adj->nudge) {
+ fprintf(f, " %s hepisema nudge %s\n", which, adj->nudge);
+ }
+ }
+}
+
+void dump_write_score(FILE *f, gregorio_score *score)
+{
+ gregorio_voice_info *voice_info = score->first_voice_info;
+ int i;
+ int annotation_num;
+ gregorio_syllable *syllable;
+ gregorio_header *header;
+
+ gregorio_assert(f, dump_write_score, "call with NULL file", return);
+
+ fprintf(f,
+ "=====================================================================\n"
+ " SCORE INFOS\n"
+ "=====================================================================\n");
+ if (score->number_of_voices) {
+ fprintf(f, " number_of_voices %d\n",
+ score->number_of_voices);
+ }
+ if (score->name) {
+ fprintf(f, " name %s\n", score->name);
+ }
+ if (score->gabc_copyright) {
+ fprintf(f, " gabc_copyright %s\n", score->gabc_copyright);
+ }
+ if (score->score_copyright) {
+ fprintf(f, " score_copyright %s\n", score->score_copyright);
+ }
+ if (score->author) {
+ fprintf(f, " author %s\n", score->author);
+ }
+ if (score->mode) {
+ fprintf(f, " mode %s\n", score->mode);
+ }
+ if (score->mode_modifier) {
+ fprintf(f, " mode_modifier %s\n", score->mode_modifier);
+ }
+ if (score->mode_differentia) {
+ fprintf(f, " mode_differentia %s\n", score->mode_differentia);
+ }
+ if (score->staff_lines != 4) {
+ fprintf(f, " staff_lines %d\n", (int)score->staff_lines);
+ }
+ if (score->nabc_lines) {
+ fprintf(f, " nabc_lines %d\n", (int)score->nabc_lines);
+ }
+ if (score->legacy_oriscus_orientation) {
+ fprintf(f, " oriscus-orientation legacy\n");
+ }
+ fprintf(f, "\n\n"
+ "=====================================================================\n"
+ " HEADERS\n"
+ "=====================================================================\n");
+ for (header = score->headers; header; header = header->next) {
+ fprintf(f, " %-25s %s\n", header->name, header->value);
+ }
+ fprintf(f, "\n\n"
+ "=====================================================================\n"
+ " VOICES INFOS\n"
+ "=====================================================================\n");
+ for (i = 0; i < score->number_of_voices; i++) {
+ fprintf(f, " Voice %d\n", i + 1);
+ if (voice_info->initial_clef.line) {
+ fprintf(f, " initial_key %d (%c%d)\n",
+ gregorio_calculate_new_key(voice_info->initial_clef),
+ gregorio_clef_to_char(voice_info->initial_clef.clef),
+ voice_info->initial_clef.line);
+ if (voice_info->initial_clef.flatted) {
+ fprintf(f, " flatted_key true\n");
+ }
+ if (voice_info->initial_clef.secondary_line) {
+ fprintf(f, " secondary_clef %c%d\n",
+ gregorio_clef_to_char(
+ voice_info->initial_clef.secondary_clef),
+ voice_info->initial_clef.secondary_line);
+ if (voice_info->initial_clef.secondary_flatted) {
+ fprintf(f, " secondary_flatted_key true\n");
+ }
+ }
+ }
+ for (annotation_num = 0; annotation_num < MAX_ANNOTATIONS;
+ ++annotation_num) {
+ if (score->annotation[annotation_num]) {
+ fprintf(f, " annotation %s\n",
+ score->annotation[annotation_num]);
+ }
+ }
+ voice_info = voice_info->next_voice_info;
+ }
+ fprintf(f, "\n\n"
+ "=====================================================================\n"
+ " SCORE\n"
+ "=====================================================================\n");
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ gregorio_element *element;
+ fprintf(f, " type 0 (GRE_SYLLABLE)\n");
+ if (syllable->position) {
+ fprintf(f, " position %d (%s)\n",
+ syllable->position,
+ gregorio_word_position_to_string(syllable->position));
+ }
+ if (syllable->no_linebreak_area != NLBA_NORMAL) {
+ fprintf(f, " no line break area %s\n",
+ gregorio_nlba_to_string(syllable->no_linebreak_area));
+ }
+ if (syllable->euouae != EUOUAE_NORMAL) {
+ fprintf(f, " euouae %s\n",
+ gregorio_euouae_to_string(syllable->euouae));
+ }
+ if (syllable->clear) {
+ fprintf(f, " clear true\n");
+ }
+ if (syllable->text) {
+ if (syllable->translation) {
+ fprintf(f, "\n Text\n");
+ }
+ dump_write_characters(f, syllable->text);
+ }
+ if ((syllable->translation
+ && syllable->translation_type != TR_WITH_CENTER_END)
+ || syllable->translation_type == TR_WITH_CENTER_END) {
+ fprintf(f, "\n Translation type %s",
+ gregorio_tr_centering_to_string
+ (syllable->translation_type));
+ if (syllable->translation_type == TR_WITH_CENTER_END) {
+ fprintf(f, "\n");
+ }
+ }
+ if (syllable->translation) {
+ fprintf(f, "\n Translation\n");
+ dump_write_characters(f, syllable->translation);
+ }
+ if (syllable->abovelinestext) {
+ fprintf(f, "\n Abovelinestext\n %s", syllable->abovelinestext);
+ }
+ for (element = *syllable->elements; element; element = element->next) {
+ gregorio_glyph *glyph;
+ fprintf(f, "---------------------------------------------------------------------\n");
+ if (element->type) {
+ fprintf(f, " type %d (%s)\n",
+ element->type, gregorio_type_to_string(element->type));
+ }
+ switch (element->type) {
+ case GRE_CUSTOS:
+ if (element->u.misc.pitched.pitch) {
+ fprintf(f, " pitch %s\n",
+ dump_pitch(element->u.misc.pitched.pitch,
+ score->highest_pitch));
+ }
+ if (element->u.misc.pitched.force_pitch) {
+ fprintf(f, " force_pitch true\n");
+ }
+ break;
+ case GRE_SUPPRESS_CUSTOS:
+ /* not handling this would generate an error below */
+ break;
+ case GRE_SPACE:
+ if (element->u.misc.unpitched.info.space) {
+ char *factor = element->u.misc.unpitched.info.
+ ad_hoc_space_factor;
+ fprintf(f, " space %d (%s)%s%s\n",
+ element->u.misc.unpitched.info.space,
+ gregorio_space_to_string(
+ element->u.misc.unpitched.info.space),
+ factor? " x " : "", factor? factor : "");
+ }
+ break;
+ case GRE_TEXVERB_ELEMENT:
+ fprintf(f, " TeX string \"%s\"\n",
+ gregorio_texverb(element->texverb));
+ break;
+ case GRE_NLBA:
+ fprintf(f, " nlba %d (%s)\n",
+ element->u.misc.unpitched.info.nlba,
+ gregorio_nlba_to_string(element->u.misc.unpitched.info.
+ nlba));
+ break;
+ case GRE_ALT:
+ fprintf(f, " Above lines text \"%s\"\n",
+ gregorio_texverb(element->texverb));
+ break;
+ case GRE_BAR:
+ if (element->u.misc.unpitched.info.bar) {
+ fprintf(f, " bar %d (%s)\n",
+ element->u.misc.unpitched.info.bar,
+ gregorio_bar_to_string(element->u.misc.unpitched.
+ info.bar));
+ if (element->u.misc.unpitched.special_sign) {
+ fprintf(f, " special sign %d (%s)\n",
+ element->u.misc.unpitched.special_sign,
+ gregorio_sign_to_string(element->
+ u.misc.unpitched.special_sign));
+ }
+ }
+ break;
+ case GRE_CLEF:
+ if (element->u.misc.clef.line) {
+ fprintf(f, " clef %d (%c%d)\n",
+ gregorio_calculate_new_key(element->u.misc.clef),
+ gregorio_clef_to_char(element->u.misc.clef.clef),
+ element->u.misc.clef.line);
+ if (element->u.misc.clef.flatted) {
+ fprintf(f, " flatted_key true\n");
+ }
+ if (element->u.misc.clef.secondary_line) {
+ fprintf(f, " secondary_clef %c%d\n",
+ gregorio_clef_to_char(
+ element->u.misc.clef.secondary_clef),
+ element->u.misc.clef.secondary_line);
+ if (element->u.misc.clef.secondary_flatted) {
+ fprintf(f, " secondary_flatted_key true\n");
+ }
+ }
+ }
+ break;
+ case GRE_END_OF_LINE:
+ if (element->u.misc.unpitched.info.eol_ragged) {
+ fprintf(f, " ragged true\n");
+ }
+ if (element->u.misc.unpitched.info.eol_forces_custos) {
+ fprintf(f, " forces custos %s\n",
+ dump_bool(element
+ ->u.misc.unpitched.info.eol_forces_custos_on));
+ }
+ break;
+ case GRE_ELEMENT:
+ for (glyph = element->u.first_glyph; glyph;
+ glyph = glyph->next) {
+ gregorio_note *note;
+ fprintf(f, "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n");
+ if (glyph->type) {
+ fprintf(f, " type %d (%s)\n",
+ glyph->type, gregorio_type_to_string(glyph->
+ type));
+ }
+ switch (glyph->type) {
+ case GRE_TEXVERB_GLYPH:
+ fprintf(f, " TeX string \"%s\"\n",
+ gregorio_texverb(glyph->texverb));
+ break;
+
+ case GRE_SPACE:
+ fprintf(f, " space %d (%s)\n",
+ glyph->u.misc.unpitched.info.space,
+ gregorio_space_to_string(glyph->u.misc.
+ unpitched.info.space));
+ break;
+
+ case GRE_GLYPH:
+ fprintf(f, " glyph_type %d (%s)\n",
+ glyph->u.notes.glyph_type,
+ gregorio_glyph_type_to_string(glyph->u.notes.
+ glyph_type));
+ if (glyph->u.notes.is_cavum) {
+ fprintf(f, " is_cavum true\n");
+ }
+ if (glyph->u.notes.liquescentia) {
+ fprintf(f, " liquescentia %d (%s)\n",
+ glyph->u.notes.liquescentia,
+ gregorio_liquescentia_to_string(
+ glyph->u.notes.liquescentia));
+ }
+ break;
+
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(f, " !!! NOT ALLOWED !!! %s\n",
+ gregorio_type_to_string(glyph->type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ if (glyph->type == GRE_GLYPH) {
+ for (note = glyph->u.notes.first_note; note;
+ note = note->next) {
+ fprintf(f, "- - - - - - - - - - - - - - - - - - - - - - - \n");
+ if (note->type) {
+ fprintf(f, " type %d (%s)\n",
+ note->type,
+ gregorio_type_to_string(note->type));
+ }
+ switch (note->type) {
+ case GRE_NOTE:
+ if (note->u.note.pitch) {
+ fprintf(f, " pitch %s\n",
+ dump_pitch(note->u.note.pitch,
+ score->highest_pitch));
+ }
+ if (note->u.note.shape) {
+ fprintf(f, " shape %d (%s)\n",
+ note->u.note.shape,
+ gregorio_shape_to_string(
+ note->u.note.shape));
+ }
+ if (note->u.note.is_cavum) {
+ fprintf(f, " is_cavum true\n");
+ }
+ if (note->u.note.liquescentia) {
+ fprintf(f, " liquescentia %d (%s)\n",
+ note->u.note.liquescentia,
+ gregorio_liquescentia_to_string(
+ note->u.note.liquescentia));
+ }
+ break;
+
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(f, " !!! NOT ALLOWED !!! %s\n",
+ gregorio_type_to_string(note->type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ if (note->texverb) {
+ fprintf(f, " TeX string \"%s\"\n",
+ gregorio_texverb(note->texverb));
+ }
+ if (note->choral_sign) {
+ fprintf(f, " Choral Sign \"%s\"\n",
+ note->choral_sign);
+ }
+ if (note->signs) {
+ fprintf(f, " signs %d (%s)\n",
+ note->signs,
+ gregorio_sign_to_string(note->signs));
+ }
+ if (note->signs & _V_EPISEMA && note->v_episema_height) {
+ if (note->v_episema_height < note->u.note.pitch) {
+ fprintf(f, " v episema forced BELOW\n");
+ }
+ else {
+ fprintf(f, " v episema forced ABOVE\n");
+ }
+ }
+ if ((note->signs == _PUNCTUM_MORA
+ || note->signs == _V_EPISEMA_PUNCTUM_MORA)
+ && note->mora_vposition) {
+ fprintf(f, " mora vposition %s\n",
+ gregorio_vposition_to_string(note->
+ mora_vposition));
+ }
+ if (note->special_sign) {
+ fprintf(f, " special sign %d (%s)\n",
+ note->special_sign,
+ gregorio_sign_to_string(
+ note->special_sign));
+ }
+ if (note->h_episema_above == HEPISEMA_AUTO
+ && note->h_episema_below == HEPISEMA_AUTO) {
+ fprintf(f, " auto hepisema size %d (%s)\n",
+ note->h_episema_above_size,
+ grehepisema_size_to_string(note->
+ h_episema_above_size));
+ fprintf(f, " auto hepisema bridge %s\n",
+ dump_bool(note->h_episema_above_connect));
+ }
+ else {
+ if (note->h_episema_above == HEPISEMA_FORCED) {
+ fprintf(f, " above hepisema size %d (%s)\n",
+ note->h_episema_above_size,
+ grehepisema_size_to_string(note->
+ h_episema_above_size));
+ fprintf(f, " above hepisema bridge %s\n",
+ dump_bool(note->h_episema_above_connect));
+ }
+ if (note->h_episema_below == HEPISEMA_FORCED) {
+ fprintf(f, " below hepisema size %d (%s)\n",
+ note->h_episema_below_size,
+ grehepisema_size_to_string(note->
+ h_episema_below_size));
+ fprintf(f, " below hepisema bridge %s\n",
+ dump_bool(note->h_episema_below_connect));
+ }
+ }
+ dump_hepisema_adjustment(f, note, SO_OVER, "above");
+ dump_hepisema_adjustment(f, note, SO_UNDER,
+ "below");
+ switch (note->high_ledger_specificity) {
+ case LEDGER_SUPPOSED:
+ break;
+ case LEDGER_EXPLICIT:
+ fprintf(f, " explicit high line %s\n",
+ dump_bool(note->high_ledger_line));
+ break;
+ case LEDGER_DRAWN:
+ fprintf(f, " drawn high line %s\n",
+ dump_bool(note->high_ledger_line));
+ break;
+ case LEDGER_EXPLICITLY_DRAWN:
+ fprintf(f, " forced drawn high line %s\n",
+ dump_bool(note->high_ledger_line));
+ break;
+ }
+ switch (note->low_ledger_specificity) {
+ case LEDGER_SUPPOSED:
+ break;
+ case LEDGER_EXPLICIT:
+ fprintf(f, " explicit low line %s\n",
+ dump_bool(note->low_ledger_line));
+ break;
+ case LEDGER_DRAWN:
+ fprintf(f, " drawn low line %s\n",
+ dump_bool(note->low_ledger_line));
+ break;
+ case LEDGER_EXPLICITLY_DRAWN:
+ fprintf(f, " forced drawn low line %s\n",
+ dump_bool(note->low_ledger_line));
+ break;
+ }
+ }
+ }
+ }
+ break;
+
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(f, " !!! NOT ALLOWED !!! %s\n",
+ gregorio_type_to_string(element->type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ if (element->nabc_lines) {
+ fprintf(f, " nabc_lines %d\n",
+ (int)element->nabc_lines);
+ }
+ if (element->nabc_lines && element->nabc) {
+ for (i = 0; i < (int)element->nabc_lines; i++) {
+ if (element->nabc[i]) {
+ fprintf(f, " nabc_line %d \"%s\"\n",
+ (int)(i+1), element->nabc[i]);
+ }
+ }
+ }
+ }
+ fprintf(f, "=====================================================================\n");
+ }
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/encode_utf8strings.c b/Build/source/texk/gregorio/gregorio-src/src/encode_utf8strings.c
new file mode 100644
index 00000000000..d57c8d71054
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/encode_utf8strings.c
@@ -0,0 +1,75 @@
+/*
+ * Utility program to convert utf8strings.h.in into utf8strings.h
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+int main(int argc, char **argv)
+{
+ char buf[5];
+ FILE *input, *output;
+ int c;
+
+ if (argc != 3) {
+ fprintf(stderr, "Incorrect arguments\n");
+ return -1;
+ }
+
+ input = fopen(argv[1], "rb");
+ if (input == NULL) {
+ fprintf(stderr, "Error opening %s: %s\n", argv[1], strerror(errno));
+ return -1;
+ }
+
+ output = fopen(argv[2], "wb");
+ if (output == NULL) {
+ fprintf(stderr, "Error creating %s: %s\n", argv[2], strerror(errno));
+ return -1;
+ }
+
+ while ((c = fgetc(input)) != EOF) {
+ if (c & 0x80) {
+ snprintf(buf, sizeof(buf), "\\%03o", c);
+ if (fwrite(buf, sizeof(buf) - sizeof(char), 1, output) != 1) {
+ fprintf(stderr, "Error writing %s: %s\n", argv[2],
+ strerror(errno));
+ return -1;
+ }
+ } else {
+ if (fputc(c, output) != c) {
+ fprintf(stderr, "Error writing %s: %s\n", argv[2],
+ strerror(errno));
+ return -1;
+ }
+ }
+ }
+
+ if (fclose(output) != 0) {
+ fprintf(stderr, "Error closing %s: %s\n", argv[2], strerror(errno));
+ return -1;
+ }
+ if (fclose(input) != 0) {
+ fprintf(stderr, "Error closing %s: %s\n", argv[1], strerror(errno));
+ return -1;
+ }
+ return 0;
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/enum_generator.h b/Build/source/texk/gregorio/gregorio-src/src/enum_generator.h
new file mode 100644
index 00000000000..a2e4b03892e
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/enum_generator.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* These macros are used for generating enum code. This is based on the
+ * technique described in http://stackoverflow.com/a/202511
+ *
+ * Two of these macros are meant for use outside this set of macros:
+ *
+ * - ENUM declares the enum itself and a prototype for the function that
+ * returns the string value of the enum's numeric value. This is meant to be
+ * used from a header file.
+ * - ENUM_TO_STRING defines the function whose prototype was declared by ENUM.
+ * This is meant to be used from a code file.
+ *
+ * These two macros both take the following two arguments:
+ *
+ * - TYPE is the name to use for the enum.
+ * - DEF is the name of a macro that generates the bodies of the enum and the
+ * to-string function. DEF should take four arguments, in the following
+ * order (with suggested names):
+ * - A is a macro that generates an enum value with a specifiec numeric
+ * value. It takes two arguments, the name and the numeric value.
+ * - E is a macro that generates an enum value that has no specific numeric
+ * value. It takes one argument, the name.
+ * - X is a macro that generates the last enum value when it has a specific
+ * numeric value. It takes the same two arguments as A.
+ * - L is a macro that generates the last enum value when it has no specific
+ * numeric value. It takes the same argument as E.
+ *
+ * Note: If we were supporting C11, we could take empty macro arguments and
+ * would be able to get away with only two arguments to DEF.
+ */
+
+#ifndef ENUM_GENERATOR_H
+#define ENUM_GENERATOR_H
+
+/* for enum values */
+#define ENUM_VALUE(NAME,VALUE) NAME = VALUE,
+#define ENUM_ENTRY(NAME) NAME,
+#define ENUM_LAST_VALUE(NAME,VALUE) NAME = VALUE
+#define ENUM_LAST_ENTRY(NAME) NAME
+
+/* for enum case */
+#define ENUM_VALUE_CASE(NAME,VALUE) case NAME: return #NAME;
+#define ENUM_ENTRY_CASE(NAME) case NAME: return #NAME;
+
+/* enum declaration */
+#define ENUM(TYPE,DEF) \
+ typedef enum TYPE { \
+ DEF(ENUM_VALUE, ENUM_ENTRY, ENUM_LAST_VALUE, ENUM_LAST_ENTRY) \
+ } TYPE; \
+ const char *TYPE##_to_string(TYPE value)
+
+/* enum *_to_string function defintiion */
+#define ENUM_TO_STRING(TYPE,DEF) \
+ const char *TYPE##_to_string(TYPE value) \
+ { \
+ switch(value) { \
+ DEF(ENUM_VALUE_CASE, ENUM_ENTRY_CASE, ENUM_VALUE_CASE, ENUM_ENTRY_CASE) \
+ default: return gregorio_unknown(value); \
+ } \
+ }
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-elements-determination.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-elements-determination.c
new file mode 100644
index 00000000000..16ca2dfa60c
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-elements-determination.c
@@ -0,0 +1,337 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX.
+ * This file provides functions for determining elements from notes.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include "bool.h"
+#include "struct.h"
+#include "messages.h"
+
+#include "gabc.h"
+
+#define SINGLE_NOTE_GLYPH \
+ G_PUNCTUM: \
+ case G_VIRGA: \
+ case G_BIVIRGA: \
+ case G_TRIVIRGA: \
+ case G_VIRGA_REVERSA: \
+ case G_STROPHA: \
+ case G_STROPHA_AUCTA: \
+ case G_DISTROPHA: \
+ case G_DISTROPHA_AUCTA: \
+ case G_TRISTROPHA: \
+ case G_TRISTROPHA_AUCTA
+
+#define PUNCTA_INCLINATA_ASCENDENS_GLYPH \
+ G_2_PUNCTA_INCLINATA_ASCENDENS: \
+ case G_3_PUNCTA_INCLINATA_ASCENDENS: \
+ case G_4_PUNCTA_INCLINATA_ASCENDENS: \
+ case G_5_PUNCTA_INCLINATA_ASCENDENS
+
+#define PUNCTA_INCLINATA_DESCENDENS_GLYPH \
+ G_2_PUNCTA_INCLINATA_DESCENDENS: \
+ case G_3_PUNCTA_INCLINATA_DESCENDENS: \
+ case G_4_PUNCTA_INCLINATA_DESCENDENS: \
+ case G_5_PUNCTA_INCLINATA_DESCENDENS
+
+static __inline signed char glyph_note_ambitus(
+ const gregorio_glyph *const current_glyph,
+ const gregorio_glyph *const previous_glyph)
+{
+ return current_glyph->u.notes.first_note->u.note.pitch -
+ gregorio_glyph_last_note(previous_glyph)->u.note.pitch;
+}
+
+/*
+ *
+ * A function that will be called several times: it adds an element to the
+ * current element current_element: the current_element in the determination,
+ * it will be updated to the element that we will add first_glyph: the
+ * first_glyph of the element that we will add current_glyph: the last glyph
+ * that will be in the element
+ *
+ */
+
+static void close_element(gregorio_element **current_element,
+ gregorio_glyph **const first_glyph,
+ const gregorio_glyph *const current_glyph)
+{
+ gregorio_add_element(current_element, *first_glyph);
+ if (*first_glyph && (*first_glyph)->previous) {
+ (*first_glyph)->previous->next = NULL;
+ (*first_glyph)->previous = NULL;
+ }
+ *first_glyph = current_glyph->next;
+}
+
+/*
+ *
+ * inline function to automatically do two or three things
+ *
+ */
+static __inline void cut_before(gregorio_glyph *current_glyph,
+ gregorio_glyph **first_glyph,
+ gregorio_element **current_element)
+{
+ if (*first_glyph != current_glyph) {
+ close_element(current_element, first_glyph, current_glyph);
+ /* yes, this is changing value close_element sets for first_glyph */
+ *first_glyph = current_glyph;
+ }
+}
+
+/*
+ *
+ * The big function of the file, but rather simple I think.
+ *
+ */
+
+static gregorio_element *gabc_det_elements_from_glyphs(
+ gregorio_glyph *current_glyph)
+{
+ /* the last element we have successfully added to the list of elements */
+ gregorio_element *current_element = NULL;
+ /* the first element, that we will return at the end. We have to consider
+ * it because the gregorio_element struct does not have previous_element
+ * element. */
+ gregorio_element *first_element = NULL;
+ /* the first_glyph of the element that we are currently determining */
+ gregorio_glyph *first_glyph = current_glyph;
+ /* the last real (GRE_GLYPH) that we have processed */
+ gregorio_glyph *previous_glyph = NULL;
+ /* boolean necessary to determine some cases */
+ bool do_not_cut = false;
+ bool force_cut = false;
+
+ gregorio_not_null(current_glyph, gabc_det_elements_from_glyphs, return NULL);
+ /* first we go to the first glyph in the chained list of glyphs (maybe to
+ * suppress ?) */
+ gregorio_go_to_first_glyph(&current_glyph);
+
+ while (current_glyph) {
+ if (current_glyph->type != GRE_GLYPH) {
+ force_cut = false;
+ /* we must not cut after a glyph-level space */
+ if (current_glyph->type == GRE_SPACE) {
+ switch (current_glyph->u.misc.unpitched.info.space) {
+ case SP_ZERO_WIDTH:
+ case SP_HALF_SPACE:
+ case SP_INTERGLYPH_SPACE:
+ if (!current_glyph->next) {
+ close_element(&current_element, &first_glyph, current_glyph);
+ }
+ current_glyph = current_glyph->next;
+ do_not_cut = true;
+ continue;
+ default:
+ /* any other space should be handled normally */
+ break;
+ }
+ } else if (current_glyph->type == GRE_TEXVERB_GLYPH) {
+ /* we must not cut after a texverb */
+ if (!current_glyph->next) {
+ close_element(&current_element, &first_glyph, current_glyph);
+ }
+ current_glyph = current_glyph->next;
+ do_not_cut = true;
+ continue;
+ }
+ /* clef change or space or end of line */
+ cut_before(current_glyph, &first_glyph, &current_element);
+ /* if statement to make neumatic cuts not appear in elements, as
+ * there is always one between elements, unless the next element
+ * is a space */
+ if (current_glyph->type != GRE_SPACE
+ || current_glyph->u.misc.unpitched.info.space
+ != SP_NEUMATIC_CUT
+ || (current_glyph->next
+ && current_glyph->next->type == GRE_SPACE)) {
+ /* clef change or space other than neumatic cut */
+ if (!first_element) {
+ first_element = current_element;
+ }
+ gregorio_add_misc_element(&current_element, current_glyph->type,
+ &(current_glyph->u.misc),
+ current_glyph->texverb);
+ }
+ first_glyph = current_glyph->next;
+ previous_glyph = NULL;
+ current_glyph->texverb = 0;
+ gregorio_free_one_glyph(&current_glyph);
+ continue;
+ }
+
+ if (is_fused(current_glyph->u.notes.liquescentia)) {
+ do_not_cut = true;
+ } else if (force_cut) {
+ cut_before(current_glyph, &first_glyph, &current_element);
+ previous_glyph = NULL;
+ }
+ force_cut = false;
+
+ switch (current_glyph->u.notes.glyph_type) {
+ case PUNCTA_INCLINATA_ASCENDENS_GLYPH:
+ case G_PUNCTUM_INCLINATUM:
+ case G_ALTERATION:
+ if (!do_not_cut) {
+ cut_before(current_glyph, &first_glyph, &current_element);
+ do_not_cut = true;
+ }
+ break;
+
+ case G_STROPHA_AUCTA:
+ case G_STROPHA:
+ if (current_glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ force_cut = true;
+ }
+ /* fall through */
+ case PUNCTA_INCLINATA_DESCENDENS_GLYPH:
+ /* we don't cut before, so we don't do anything else */
+ if (do_not_cut) {
+ do_not_cut = false;
+ }
+ break;
+
+ default:
+ if (previous_glyph && previous_glyph->type == GRE_GLYPH
+ && !is_tail_liquescentia(
+ previous_glyph->u.notes.liquescentia)) {
+ bool break_early = false;
+ signed char ambitus;
+
+ switch (previous_glyph->u.notes.glyph_type) {
+ case SINGLE_NOTE_GLYPH:
+ /* we determine the last pitch */
+ ambitus = glyph_note_ambitus(current_glyph, previous_glyph);
+ if (ambitus == 0) {
+ do_not_cut = false;
+ break_early = true;
+ }
+ break;
+
+ case PUNCTA_INCLINATA_DESCENDENS_GLYPH:
+ case G_PUNCTUM_INCLINATUM:
+ switch (current_glyph->u.notes.glyph_type) {
+ case SINGLE_NOTE_GLYPH:
+ ambitus = glyph_note_ambitus(current_glyph, previous_glyph);
+ if (ambitus > -2 && ambitus < 2) {
+ do_not_cut = false;
+ break_early = true;
+ }
+ break;
+
+ default:
+ /* do nothing in particular */
+ break;
+ }
+ break;
+
+ case G_PODATUS:
+ if (current_glyph->u.notes.glyph_type == G_VIRGA) {
+ ambitus = glyph_note_ambitus(current_glyph, previous_glyph);
+ if (ambitus >= 0) {
+ do_not_cut = false;
+ break_early = true;
+ }
+ }
+ break;
+
+ default:
+ /* do nothing in particular */
+ break;
+ }
+
+ if (break_early) {
+ break;
+ }
+ }
+
+ if (do_not_cut) {
+ do_not_cut = false;
+ } else {
+ cut_before(current_glyph, &first_glyph, &current_element);
+ }
+ }
+
+ if (gregorio_glyph_last_note(current_glyph)->signs
+ & (_PUNCTUM_MORA | _AUCTUM_DUPLEX)) {
+ force_cut = true;
+ }
+
+ /* we must determine the first element, that we will return */
+ if (!first_element && current_element) {
+ first_element = current_element;
+ }
+ if (!current_glyph->next) {
+ close_element(&current_element, &first_glyph, current_glyph);
+ }
+
+ previous_glyph = current_glyph;
+ current_glyph = current_glyph->next;
+ } /* end of while */
+
+ /*
+ * we must determine the first element, that we will return
+ */
+ if (!first_element && current_element) {
+ first_element = current_element;
+ }
+ return first_element;
+}
+
+/*
+ *
+ * Two "hat" functions, they permit to have a good API. They amost don't do
+ * anything except calling the det_elements_from_glyphs.
+ *
+ * All those functions change the current_key, according to the possible new
+ * values (with key changes)
+ *
+ */
+
+static gregorio_element *gabc_det_elements_from_notes(
+ gregorio_note *current_note, int *current_key,
+ gregorio_shape *const punctum_inclinatum_orientation,
+ const gregorio_score *const score)
+{
+ gregorio_element *final = NULL;
+ gregorio_glyph *tmp = gabc_det_glyphs_from_notes(current_note, current_key,
+ punctum_inclinatum_orientation, score);
+ final = gabc_det_elements_from_glyphs(tmp);
+ return final;
+}
+
+gregorio_element *gabc_det_elements_from_string(char *const str,
+ int *const current_key, char *macros[10],
+ gregorio_scanner_location *const loc,
+ gregorio_shape *const punctum_inclinatum_orientation,
+ const gregorio_score *const score)
+{
+ gregorio_element *final;
+ gregorio_note *tmp;
+ tmp = gabc_det_notes_from_string(str, macros, loc, score);
+ final = gabc_det_elements_from_notes(tmp, current_key,
+ punctum_inclinatum_orientation, score);
+ return final;
+}
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-glyphs-determination.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-glyphs-determination.c
new file mode 100644
index 00000000000..094b79291fa
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-glyphs-determination.c
@@ -0,0 +1,1303 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file provides functions for determining glyphs from notes.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "messages.h"
+
+#include "gabc.h"
+
+static __inline gregorio_scanner_location *copy_note_location(
+ const gregorio_note *const note, gregorio_scanner_location *const loc)
+{
+ loc->first_line = note->src_line;
+ loc->first_column = note->src_column;
+ loc->first_offset = note->src_offset;
+ loc->last_line = note->src_line;
+ loc->last_column = note->src_column;
+ loc->last_offset = note->src_offset;
+ return loc;
+}
+
+static __inline bool is_normal_punctum(const gregorio_note *const note)
+{
+ return note->u.note.shape == S_PUNCTUM
+ && note->u.note.liquescentia != L_INITIO_DEBILIS;
+}
+
+static __inline bool is_punctum_inclinatum(const gregorio_shape shape,
+ const bool determined_only)
+{
+ switch (shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_STANS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ return true;
+ case S_PUNCTUM_INCLINATUM_UNDETERMINED:
+ return !determined_only;
+ default:
+ return false;
+ }
+}
+
+/****************************
+ *
+ * This function is the basis of all the determination of glyphs. The
+ * phylosophy of the function is to say : We have a glyph that we have
+ * determined, and we have the following note, can we "add" it to the
+ * glyph, or will it be the first note of another glyph ?
+ *
+ * current_glyph_type is the type of the current_glyph (current_glyph
+ * as meant in gabc_det_glyphs_from_notes). curent_pitch
+ * is the height of the note that we want to "add" to the glyph.
+ * last_pitch is the height of the last note of current_glyph. shape
+ * is the shape of the note we want to "add" to the glyph.
+ *
+ * The function returns a char, which meaning is explained below.
+ *
+ * end_of_glyph is a pointer to the result of the determination, here
+ * are the meanings :
+ *
+ * DET_NO_END: we have successfully added the note to the glyph, and
+ * we return the new type of the glyph. We may again add notes to the
+ * glyph.
+ *
+ * DET_END_OF_PREVIOUS: we have not been able to add the note to the
+ * glyph, so we will have to close the glyph.
+ *
+ * DET_END_OF_CURRENT: we have been able to add the note to the glyph,
+ * but we won't be able to add more notes to the glyph, we can close
+ * it. The new type is returned.
+ *
+ * DET_END_OF_BOTH: we haven't been able to add the note to the glyph,
+ * and we won't be able to add notes to the new glyph. This special
+ * case is quite rare, we use it for trivirga, tristropha, etc.
+ *
+ * When we encouter a S_QUADRATUM (or S_QUILISMA_QUADRATUM), we build
+ * a new glyph with the (temporary) shape G_PES_QUADRATUM_FIRST_PART
+ * (or G_PES_QUILISMA_QUADRATUM_FIRST_PART), and we wait for the next
+ * note.
+ *
+ ****************************/
+
+static char add_note_to_a_glyph(gregorio_glyph_type current_glyph_type,
+ char current_pitch, char last_pitch, gregorio_shape shape,
+ gregorio_liquescentia liquescentia,
+ gregorio_note *current_glyph_first_note,
+ gabc_determination *end_of_glyph,
+ gregorio_shape *punctum_inclinatum_orientation)
+{
+ #define this_note_starts_new_glyph { \
+ next_glyph_type = G_PUNCTUM; \
+ *end_of_glyph = DET_END_OF_PREVIOUS; \
+ }
+
+ /* next glyph type is the type of the glyph that will be returned (the
+ * new type of the glyph with the note added to it, or the type of the
+ * new glyph with the note alone. */
+ gregorio_glyph_type next_glyph_type = G_UNDETERMINED;
+
+ *end_of_glyph = DET_NO_END;
+
+ /* here we separate notes that would be logically in the same glyph
+ * but that are too far to be so */
+ if (last_pitch) {
+ if (current_pitch - last_pitch > MAX_AMBITUS
+ || current_pitch - last_pitch < -MAX_AMBITUS) {
+ current_glyph_type = G_UNDETERMINED;
+ }
+ }
+
+ switch (shape) {
+ case S_LINEA_PUNCTUM:
+ case S_LINEA:
+ next_glyph_type = G_PUNCTUM;
+ *end_of_glyph = DET_END_OF_BOTH;
+ break;
+ case S_FLAT:
+ case S_SHARP:
+ case S_NATURAL:
+ next_glyph_type = G_ALTERATION;
+ *end_of_glyph = DET_END_OF_BOTH;
+ break;
+ case S_PUNCTUM:
+ /*
+ * we determine here the shape of the thing if it is made of puncta
+ */
+ if (current_pitch == last_pitch) {
+ this_note_starts_new_glyph;
+ break;
+ }
+ switch (current_glyph_type) {
+ case G_PUNCTUM:
+ if (current_pitch > last_pitch) {
+ next_glyph_type = G_PODATUS;
+ } else {
+ next_glyph_type = G_FLEXA;
+ }
+ break;
+ case G_PODATUS:
+ if (current_pitch > last_pitch) {
+ if (is_normal_punctum(current_glyph_first_note)) {
+ next_glyph_type = G_SCANDICUS;
+ *end_of_glyph = DET_END_OF_CURRENT;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ } else {
+ next_glyph_type = G_TORCULUS;
+ }
+ break;
+ case G_PES_QUADRATUM_FIRST_PART:
+ if (current_pitch > last_pitch) {
+ next_glyph_type = G_PES_QUADRATUM;
+ *end_of_glyph = DET_END_OF_CURRENT;
+ } else {
+ next_glyph_type = G_FLEXA;
+ }
+ break;
+ case G_PES_QUILISMA_QUADRATUM_FIRST_PART:
+ if (current_pitch > last_pitch) {
+ next_glyph_type = G_PES_QUADRATUM;
+ *end_of_glyph = DET_END_OF_CURRENT;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ break;
+ case G_PES_ASCENDENS_ORISCUS:
+ case G_PES_DESCENDENS_ORISCUS:
+ if (current_pitch > last_pitch) {
+ next_glyph_type = G_SALICUS;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ break;
+ case G_SALICUS:
+ if (current_pitch < last_pitch) {
+ next_glyph_type = G_SALICUS_FLEXUS;
+ *end_of_glyph = DET_END_OF_CURRENT;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ break;
+ case G_FLEXA:
+ if (current_pitch > last_pitch) {
+ if (is_normal_punctum(current_glyph_first_note)) {
+ next_glyph_type = G_PORRECTUS;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ } else {
+ if (liquescentia & L_DEMINUTUS) {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_ANCUS;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ }
+ break;
+ case G_TORCULUS:
+ if (current_pitch > last_pitch) {
+ next_glyph_type = G_TORCULUS_RESUPINUS;
+ } else if (liquescentia == L_DEMINUTUS) {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_TORCULUS_LIQUESCENS;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ break;
+ case G_TORCULUS_RESUPINUS:
+ if (current_pitch > last_pitch) {
+ this_note_starts_new_glyph;
+ } else {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_TORCULUS_RESUPINUS_FLEXUS;
+ }
+ break;
+ case G_PORRECTUS:
+ if (current_pitch > last_pitch) {
+ this_note_starts_new_glyph;
+ } else {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_PORRECTUS_FLEXUS;
+ }
+ break;
+ default:
+ this_note_starts_new_glyph;
+ break;
+ }
+ break;
+ case S_ORISCUS_UNDETERMINED:
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_DEMINUTUS:
+ case S_QUILISMA:
+ this_note_starts_new_glyph;
+ break;
+ case S_VIRGA:
+ if (current_glyph_type == G_VIRGA && last_pitch == current_pitch) {
+ next_glyph_type = G_BIVIRGA;
+ } else {
+ if (current_glyph_type == G_BIVIRGA && last_pitch == current_pitch) {
+ next_glyph_type = G_TRIVIRGA;
+ } else {
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_VIRGA;
+ }
+ }
+ break;
+ case S_VIRGA_REVERSA:
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_VIRGA_REVERSA;
+ break;
+ case S_BIVIRGA:
+ if (current_glyph_type == G_VIRGA && last_pitch == current_pitch) {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_TRIVIRGA;
+ } else {
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_BIVIRGA;
+ }
+ break;
+ case S_TRIVIRGA:
+ *end_of_glyph = DET_END_OF_BOTH;
+ next_glyph_type = G_TRIVIRGA;
+ break;
+ case S_QUADRATUM:
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_PES_QUADRATUM_FIRST_PART;
+ break;
+ case S_QUILISMA_QUADRATUM:
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_PES_QUILISMA_QUADRATUM_FIRST_PART;
+ break;
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ if (current_glyph_type == G_PUNCTUM && last_pitch < current_pitch) {
+ next_glyph_type = G_PES_ASCENDENS_ORISCUS;
+ /* Therefore G_PES_ASCENDENS_ORISCUS might be fronting an
+ * undetermined oriscus scapus. This will be resolved during
+ * oriscus orientation determination */
+ } else {
+ this_note_starts_new_glyph;
+ }
+ break;
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ if (current_glyph_type == G_PUNCTUM && last_pitch < current_pitch) {
+ next_glyph_type = G_PES_DESCENDENS_ORISCUS;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ break;
+ case S_PUNCTUM_INCLINATUM_UNDETERMINED:
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_STANS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ /*
+ * Warning : this part of the code is specific to the
+ * declarations of the header file
+ */
+ if (current_glyph_type > G_PUNCTA_INCLINATA) {
+ /*
+ * meaning that the previous glyph is not a combination of puncta
+ * inclinata, see header file for details
+ */
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_PUNCTUM_INCLINATUM;
+ break;
+ }
+ if (current_pitch == last_pitch) {
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_PUNCTUM_INCLINATUM;
+ break;
+ }
+ if (is_punctum_inclinatum(shape, true)
+ && *punctum_inclinatum_orientation != shape
+ && *punctum_inclinatum_orientation
+ != S_PUNCTUM_INCLINATUM_UNDETERMINED) {
+ /* change of orientation ends the glyph */
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_PUNCTUM_INCLINATUM;
+ break;
+ }
+ switch (current_glyph_type) {
+ case G_PUNCTUM_INCLINATUM:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_2_PUNCTA_INCLINATA_ASCENDENS;
+ } else {
+ next_glyph_type = G_2_PUNCTA_INCLINATA_DESCENDENS;
+ }
+ break;
+ case G_2_PUNCTA_INCLINATA_ASCENDENS:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_3_PUNCTA_INCLINATA_ASCENDENS;
+ } else {
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ }
+ break;
+ case G_3_PUNCTA_INCLINATA_ASCENDENS:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_4_PUNCTA_INCLINATA_ASCENDENS;
+ } else {
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ }
+ break;
+ case G_4_PUNCTA_INCLINATA_ASCENDENS:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_5_PUNCTA_INCLINATA_ASCENDENS;
+ } else {
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ }
+ break;
+ case G_2_PUNCTA_INCLINATA_DESCENDENS:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ } else {
+ next_glyph_type = G_3_PUNCTA_INCLINATA_DESCENDENS;
+ }
+ break;
+ case G_3_PUNCTA_INCLINATA_DESCENDENS:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ } else {
+ next_glyph_type = G_4_PUNCTA_INCLINATA_DESCENDENS;
+ }
+ break;
+ case G_4_PUNCTA_INCLINATA_DESCENDENS:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ } else {
+ next_glyph_type = G_5_PUNCTA_INCLINATA_DESCENDENS;
+ }
+ break;
+ default:
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ break;
+ }
+ break;
+ case S_STROPHA:
+ if (last_pitch != current_pitch) {
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_STROPHA;
+ break;
+ }
+ switch (current_glyph_type) {
+ case G_STROPHA:
+ next_glyph_type = G_DISTROPHA;
+ break;
+ case G_DISTROPHA:
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_TRISTROPHA;
+ break;
+ default:
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_STROPHA;
+ break;
+ }
+ break;
+ case S_DISTROPHA:
+ if (last_pitch == current_pitch && current_glyph_type == G_STROPHA) {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_TRISTROPHA;
+ } else {
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_DISTROPHA;
+ }
+ break;
+ case S_TRISTROPHA:
+ *end_of_glyph = DET_END_OF_BOTH;
+ next_glyph_type = G_TRISTROPHA;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(add_note_to_a_glyph, "unexpected shape: %s",
+ gregorio_shape_to_string(shape));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ /* end of the main switch */
+
+ if (current_glyph_type == G_UNDETERMINED) {
+ /*
+ * means that this is the first glyph or that the previous glyph has
+ * already been added
+ */
+ if (*end_of_glyph == DET_END_OF_PREVIOUS) {
+ *end_of_glyph = DET_NO_END;
+ } else {
+ if (*end_of_glyph == DET_END_OF_BOTH) {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ }
+ }
+ }
+
+ /*
+ * WARNING : Ugly section of the code, just some kind of patch for it to work
+ * with fonts that can't handle large intervals.
+ */
+ /* here we separate notes that would be logically in the same glyph
+ * but that are too far to be so, we already said to the function that
+ * it was not the same glyph, there we must say that the previous
+ * glyph has ended. */
+ if (last_pitch) {
+ if (current_pitch - last_pitch > MAX_AMBITUS
+ || current_pitch - last_pitch < -MAX_AMBITUS) {
+ if (*end_of_glyph == DET_END_OF_CURRENT
+ || *end_of_glyph == DET_END_OF_BOTH) {
+ /* There is no current way for the code to end up here, but
+ * we'll leave it in because it's a good safety precaution in
+ * case something new is added in the future */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("Encountered the need to switch "
+ "DET_END_OF_CURRENT to DET_END_OF_BOTH because of "
+ "overly large ambitus"),
+ "add_note_to_a_glyph", VERBOSITY_WARNING,
+ __LINE__);
+ *end_of_glyph = DET_END_OF_BOTH;
+ } else {
+ /* LCOV_EXCL_STOP */
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ }
+ }
+ }
+
+ switch (shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_STANS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ *punctum_inclinatum_orientation = shape;
+ break;
+ case S_PUNCTUM_INCLINATUM_UNDETERMINED:
+ break;
+ default:
+ *punctum_inclinatum_orientation = S_PUNCTUM_INCLINATUM_UNDETERMINED;
+ break;
+ }
+
+ return next_glyph_type;
+}
+
+static bool is_cavum(gregorio_note *note, gregorio_note *last_note)
+{
+ bool is_cavum = false;
+ for (; note; note = note->next) {
+ if (note->type == GRE_NOTE) {
+ is_cavum = is_cavum || note->u.note.is_cavum;
+ }
+ /* don't look past the last note */
+ if (note == last_note) {
+ break;
+ }
+ }
+ return is_cavum;
+}
+
+/****************************
+ *
+ * First see the comments of
+ * gabc_det_glyphs_from_notes. This function is used when
+ * we have finished to determine a glyph. We have the last glyph that
+ * have been added: last_glyph. The glyph we want to add is given by
+ * glyph_type and liquescentia.
+ *
+ * The glyph we want to add goes from first_note to current_note, we
+ * isolate these notes from the notes that won't be in the glyph, and
+ * we add the glyph to the list_of_glyphs.
+ *
+****************************/
+
+static gregorio_note *close_normal_glyph(gregorio_glyph **last_glyph,
+ gregorio_glyph_type glyph_type, gregorio_note **first_note,
+ gregorio_liquescentia liquescentia, gregorio_note *current_note)
+{
+ gregorio_note *new_current_note = current_note;
+ gregorio_scanner_location loc;
+
+ /* patch to have good glyph type in the case where a glyph ends by a note
+ * with shape S_QUADRATUM */
+ if (glyph_type == G_PES_QUADRATUM_FIRST_PART
+ || glyph_type == G_PES_QUILISMA_QUADRATUM_FIRST_PART) {
+ glyph_type = G_PUNCTUM;
+ }
+
+ gregorio_add_glyph(last_glyph, glyph_type, *first_note, liquescentia,
+ is_cavum(*first_note, current_note));
+
+ if (current_note->next) {
+ current_note->next->previous = NULL;
+ *first_note = current_note->next;
+ current_note->next = NULL;
+ }
+ /* here we "patch" the structure for bivirga, tristropha, etc. */
+ /* the idea is not to have a S_BIVIRGA in the shape of the note (which is
+ * dirty) but rather a G_BIVIRGA in the glyph (which is the case now) and
+ * two virgas */
+
+ if (glyph_type == G_BIVIRGA || glyph_type == G_DISTROPHA
+ || glyph_type == G_TRIVIRGA || glyph_type == G_TRISTROPHA
+ || glyph_type == G_DISTROPHA_AUCTA
+ || glyph_type == G_TRISTROPHA_AUCTA) {
+ gregorio_go_to_first_note(&current_note);
+ while (current_note) {
+ /* a variable necessary for the patch for G_BIVIRGA & co. */
+ gregorio_note *added_notes = NULL;
+ gregorio_note *next_note = NULL;
+ if (current_note->type == GRE_NOTE) {
+ switch (current_note->u.note.shape) {
+ case S_TRIVIRGA:
+ gregorio_add_note(&added_notes, current_note->u.note.pitch,
+ S_VIRGA, _NO_SIGN, L_NO_LIQUESCENTIA, current_note,
+ copy_note_location(current_note, &loc));
+ /* fall through */
+ case S_BIVIRGA:
+ gregorio_add_note(&added_notes, current_note->u.note.pitch,
+ S_VIRGA, _NO_SIGN, L_NO_LIQUESCENTIA, current_note,
+ copy_note_location(current_note, &loc));
+ gregorio_add_note(&added_notes, current_note->u.note.pitch,
+ S_VIRGA, current_note->signs,
+ current_note->u.note.liquescentia, current_note,
+ copy_note_location(current_note, &loc));
+ break;
+ case S_TRISTROPHA:
+ gregorio_add_note(&added_notes, current_note->u.note.pitch,
+ S_STROPHA, _NO_SIGN, L_NO_LIQUESCENTIA,
+ current_note,
+ copy_note_location(current_note, &loc));
+ /* fall through */
+ case S_DISTROPHA:
+ gregorio_add_note(&added_notes, current_note->u.note.pitch,
+ S_STROPHA, _NO_SIGN, L_NO_LIQUESCENTIA,
+ current_note,
+ copy_note_location(current_note, &loc));
+ gregorio_add_note(&added_notes, current_note->u.note.pitch,
+ S_STROPHA, current_note->signs,
+ current_note->u.note.liquescentia, current_note,
+ copy_note_location(current_note, &loc));
+ break;
+ default:
+ break;
+ }
+ }
+ if (!added_notes) {
+ /* nothing added, but we must go on in case it's
+ * virga+bivirga = trivirga or stropa+bistropha = tristropha */
+ if (current_note->next) {
+ current_note = current_note->next;
+ continue;
+ } else {
+ break;
+ }
+ }
+ next_note = current_note->next;
+ /* now we have what we want, we set up the links and free the old
+ * note */
+ if (next_note) {
+ current_note->next->previous = added_notes;
+ added_notes->next = next_note;
+ }
+ if (current_note == new_current_note) {
+ new_current_note = added_notes;
+ }
+ gregorio_go_to_first_note(&added_notes);
+ if (current_note->previous) {
+ current_note->previous->next = added_notes;
+ added_notes->previous = current_note->previous;
+ }
+ /* Detaching current_note is not strictly necessary here because we
+ * are effectively plucking out added_notes into its own glyph;
+ * however, detaching the note is safer if this behavior changes in
+ * the future because gregorio_free_one_note nullifies surrounding
+ * pointers */
+ current_note->next = NULL;
+ current_note->previous = NULL;
+ gregorio_free_one_note(&current_note);
+ if (!next_note) {
+ current_note = added_notes;
+ break;
+ }
+ current_note = next_note;
+ }
+ gregorio_go_to_first_note(&current_note);
+ /* finally we set the just added glyph first_note to current_note */
+ (*last_glyph)->u.notes.first_note = current_note;
+ }
+ return new_current_note;
+}
+
+static gregorio_note *close_fused_glyph(gregorio_glyph **last_glyph,
+ gregorio_glyph_type glyph_type, gregorio_note **first_note,
+ gregorio_liquescentia liquescentia, gregorio_note *current_note)
+{
+ (*first_note)->u.note.liquescentia |= (liquescentia & L_FUSED);
+ return close_normal_glyph(last_glyph, glyph_type, first_note, liquescentia,
+ current_note);
+}
+
+static gregorio_note *next_non_texverb_note(gregorio_note *first_note,
+ gregorio_note *last_note)
+{
+ gregorio_not_null(first_note, gregorio_note, return NULL);
+
+ if (first_note == last_note) {
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_assert_only(first_note->type != GRE_TEXVERB_GLYPH,
+ next_non_texverb_note, "Unexpected texverb at start of iteration");
+ return first_note;
+ /* LCOV_EXCL_STOP */
+ }
+
+ for (first_note = first_note->next; first_note && first_note != last_note;
+ first_note = first_note->next) {
+ if (first_note->type != GRE_TEXVERB_GLYPH) {
+ return first_note;
+ }
+ }
+
+ gregorio_assert_only(!first_note || first_note->type != GRE_TEXVERB_GLYPH,
+ next_non_texverb_note, "Unexpected texverb at end of iteration");
+
+ return last_note;
+}
+
+static void add_intervening_texverbs(gregorio_glyph **last_glyph,
+ gregorio_note *first_note, gregorio_note *last_note)
+{
+ for ( ; first_note && first_note->type == GRE_TEXVERB_GLYPH; ) {
+ bool on_last_note = (first_note == last_note);
+
+ gregorio_add_unpitched_element_as_glyph(last_glyph, first_note->type,
+ &(first_note->u.other), _NO_SIGN, first_note->texverb);
+ first_note->texverb = 0;
+ gregorio_free_one_note(&first_note);
+
+ if (on_last_note) {
+ break;
+ }
+ }
+}
+
+static gregorio_note *close_fusion_glyph(gregorio_glyph **last_glyph,
+ gregorio_note **first_note, gregorio_liquescentia liquescentia,
+ gregorio_note *real_last_note,
+ gregorio_shape *const punctum_inclinatum_orientation)
+{
+ bool first = true;
+ gregorio_note *last_note, *texverb_tail;
+ gregorio_note *next;
+ int prev_shift = 0, shift, shift2;
+ gregorio_note *result;
+
+ gregorio_assert((*first_note)->type != GRE_TEXVERB_GLYPH,
+ close_fusion_glyph, "Unexpected texverb at start of fusion",
+ return real_last_note);
+
+ for (last_note = real_last_note;
+ last_note != *first_note && last_note->type == GRE_TEXVERB_GLYPH;
+ last_note = last_note->previous) {
+ /* skip over the trailing texverbs */
+ }
+ texverb_tail = (last_note == real_last_note)? NULL : last_note->next;
+
+ for (;;) {
+ bool processed = false;
+
+ /* fusion must work through glyph-level texverbs */
+ if ((*first_note)->type == GRE_TEXVERB_GLYPH) {
+ gregorio_add_unpitched_element_as_glyph(last_glyph,
+ (*first_note)->type, &((*first_note)->u.other), _NO_SIGN,
+ (*first_note)->texverb);
+ (*first_note)->texverb = 0;
+ gregorio_assert(*first_note != last_note,
+ close_fusion_glyph, "Unexpected texverb at end of fusion",
+ return last_note);
+ gregorio_free_one_note(first_note);
+ }
+
+ if (*first_note == last_note) {
+ close_fused_glyph(last_glyph, G_PUNCTUM, first_note,
+ liquescentia & ~TAIL_LIQUESCENTIA_MASK, last_note);
+ return last_note;
+ }
+
+ gregorio_assert((*first_note)->next, close_fusion_glyph,
+ "Unexpected single note during fusion", return last_note);
+
+ next = next_non_texverb_note(*first_note, last_note);
+
+ shift = next->u.note.pitch - (*first_note)->u.note.pitch;
+ if (shift != 0 && next == last_note) {
+ /* there are exactly two notes left, so we end fusion */
+ add_intervening_texverbs(last_glyph, (*first_note)->next, next);
+ result = close_fused_glyph(last_glyph,
+ shift < 0? G_FLEXA : G_PODATUS, first_note,
+ liquescentia, last_note);
+ if (texverb_tail) {
+ add_intervening_texverbs(last_glyph, texverb_tail,
+ real_last_note);
+ }
+ return result;
+ }
+ if (prev_shift >= 0 && shift < 0) {
+ /* check for a porrectus-like flexus */
+ gregorio_note *next_next = next_non_texverb_note(next, last_note);
+ gregorio_assert(next_next, close_fusion_glyph,
+ "Unexpected end of notes during fusion", return last_note);
+ shift2 = next_next->u.note.pitch - next->u.note.pitch;
+ if (shift2 > 0) {
+ if (next_next == last_note) {
+ /* there are exactly three notes left in a porrectus shape,
+ * so we end fusion */
+ add_intervening_texverbs(last_glyph, (*first_note)->next,
+ next);
+ add_intervening_texverbs(last_glyph, next->next, next_next);
+ result = close_fused_glyph(last_glyph,
+ G_PORRECTUS, first_note,
+ liquescentia, last_note);
+ add_intervening_texverbs(last_glyph, texverb_tail,
+ real_last_note);
+ return result;
+ }
+ /* found a porrectus-like flexus */
+ add_intervening_texverbs(last_glyph, *first_note, next);
+ close_fused_glyph(last_glyph,
+ shift < 0? G_FLEXA : G_PODATUS, first_note,
+ liquescentia & ~TAIL_LIQUESCENTIA_MASK, next);
+ prev_shift = shift2;
+ processed = true;
+ }
+ }
+
+ if (!processed) {
+ /* didn't find anything interesting, so fuse the single note */
+ gabc_determination ignored;
+ gregorio_glyph_type next_glyph_type =
+ add_note_to_a_glyph(G_UNDETERMINED,
+ (*first_note)->u.note.pitch, 0, (*first_note)->u.note.shape,
+ (*first_note)->u.note.liquescentia, *first_note, &ignored,
+ punctum_inclinatum_orientation);
+ close_fused_glyph(last_glyph, next_glyph_type, first_note,
+ liquescentia & ~TAIL_LIQUESCENTIA_MASK, *first_note);
+ prev_shift = shift;
+ }
+
+ if (first) {
+ first = false;
+ liquescentia = (liquescentia & TAIL_LIQUESCENTIA_MASK) | L_FUSED;
+ }
+ }
+}
+
+static gregorio_note *close_glyph(gregorio_glyph **last_glyph,
+ gregorio_glyph_type glyph_type, gregorio_note **first_note,
+ gregorio_liquescentia liquescentia, gregorio_note *current_note,
+ gregorio_shape *const punctum_inclinatum_orientation)
+{
+ /* special case for fusion when rarer shapes don't exist */
+ if (glyph_type == G_TORCULUS) {
+ switch ((*first_note)->u.note.shape) {
+ case S_ORISCUS_UNDETERMINED:
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ glyph_type = G_FUSED;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (glyph_type == G_FUSED) {
+ return close_fusion_glyph(last_glyph, first_note, liquescentia,
+ current_note, punctum_inclinatum_orientation);
+ } else {
+ return close_normal_glyph(last_glyph, glyph_type, first_note,
+ liquescentia, current_note);
+ }
+}
+
+/* a small function to automatically determine the pitch of a custo : it is
+ * the pitch of the next note, but we must take care of the clef changes, as
+ * custo are (normally and for now) only present before clef changes. */
+/* TODO: there may be a side effect with the flated keys... */
+
+static char gabc_determine_custo_pitch(gregorio_note *current_note,
+ int current_key, const gregorio_score *const score)
+{
+ int pitch_difference = 0;
+ int newkey;
+ for (; current_note; current_note = current_note->next) {
+ switch (current_note->type) {
+ case GRE_CLEF:
+ newkey = gregorio_calculate_new_key(current_note->u.clef);
+ pitch_difference = newkey - current_key;
+ break;
+
+ case GRE_NOTE:
+ pitch_difference =
+ (int) current_note->u.note.pitch - pitch_difference;
+ while (pitch_difference < LOWEST_PITCH) {
+ pitch_difference += 7;
+ }
+ while (pitch_difference > score->highest_pitch) {
+ pitch_difference -= 7;
+ }
+ assert(pitch_difference >= LOWEST_PITCH
+ && pitch_difference <= score->highest_pitch);
+ return (char) pitch_difference;
+
+ default:
+ break;
+ }
+ }
+ return DUMMY_PITCH;
+}
+
+/****************************
+ *
+ * Function called with a list of gregorio_notes as argument, this
+ * list is determined from gabc notation by the function
+ * gabc_det_notes_from_string.
+ *
+ * In this function we create a list of glyphs, by determining their
+ * type according to the sequence of notes (we look at their height,
+ * shape, etc.). Each glyph has a pointer gregorio_note *first_note
+ * that will be filled with the good note (and notes will be cut as
+ * explained in the comments on close_glyph function).
+ *
+ * Here is how it works :
+ * current_glyph is the glyph we are currently determining, that is to
+ * say a glyph whose type may change according to the note we will add
+ * to it.
+ * current_note is the note we are currently dealing with.
+ * Let's take an example, if the list of notes is ab, the first step
+ * (current_glyph: undetermined, current_note: a) will be to add a to
+ * nothing, that will give a glyph "punctum" containing only one note:
+ * a. In the second step (current_glyph: punctum, current_note: b) we
+ * transform the glyph in "pes".
+ * For special notes like a key change or something, we stop the
+ * determination of the current glyph, we delete the note and we add
+ * it as a glyph.
+ *
+ * When we determine the glyphs we can encounter the shapes
+ * S_QUADRATUM and S_QUILISMA_QUADRATUM, which means that the
+ * corresponding note is the first note of a pes quadratum (it can
+ * have the shape quilisma for very rare forms). But these shapes must
+ * not appear in the final form of the score, and we transform them
+ * respectively in punctum and quilisma (and the glyph type must be
+ * pes_quadratum, but it is done in add_note_to_a_glyph).
+ *
+****************************/
+
+/* this function updates current_key with the new values (with clef changes) */
+
+gregorio_glyph *gabc_det_glyphs_from_notes(gregorio_note *current_note,
+ int *current_key, gregorio_shape *const punctum_inclinatum_orientation,
+ const gregorio_score *const score)
+{
+ /* the first note of the current glyph, to be able to close it well:
+ * later we will cut the link (next_notes and previous_note) between
+ * this note and the previous one */
+ gregorio_note *current_glyph_first_note = current_note;
+
+ /* the last glyph we have totally determined. It is automatically
+ * updated by close_glyph(). */
+ gregorio_glyph *last_glyph = NULL;
+
+ /* type of the glyph we are currently determining */
+ gregorio_glyph_type current_glyph_type = G_UNDETERMINED;
+ gregorio_glyph_type next_glyph_type = G_UNDETERMINED;
+ char last_pitch = USELESS_VALUE;
+ gregorio_note *next_note = NULL;
+
+ /* determination of end of glyphs, see comments on
+ * add_note_to_a_glyph */
+ gabc_determination end_of_glyph = DET_NO_END;
+
+ /* a char representing the liquescentia of the current glyph */
+ gregorio_liquescentia liquescentia = L_NO_LIQUESCENTIA;
+ gregorio_liquescentia head_liquescentia;
+ bool autofuse = false, first_autofused_note = false;
+
+ gregorio_assert(current_note, gabc_det_glyphs_from_notes,
+ "current_note may not be NULL", return NULL);
+
+ gregorio_go_to_first_note(&current_note);
+
+ while (current_note) {
+ bool add = true;
+
+ next_note = current_note->next;
+ if (current_note->type != GRE_NOTE) {
+ gregorio_type type = current_note->type;
+ char pitch = USELESS_VALUE;
+ bool force = false;
+ gregorio_sign sign = _NO_SIGN;
+
+ if (current_glyph_type == G_FUSED
+ && (type == GRE_TEXVERB_GLYPH || type == GRE_TEXVERB_ELEMENT)) {
+ current_note = next_note;
+ continue;
+ }
+
+ if (current_glyph_type != G_UNDETERMINED) {
+ close_glyph(&last_glyph, next_glyph_type,
+ &current_glyph_first_note, liquescentia,
+ current_note->previous, punctum_inclinatum_orientation);
+ current_glyph_type = G_UNDETERMINED;
+ liquescentia = L_NO_LIQUESCENTIA;
+ }
+
+ switch (type) {
+ case GRE_CLEF:
+ pitch = current_note->u.note.pitch;
+ *current_key = gregorio_calculate_new_key(current_note->u.clef);
+ break;
+
+ case GRE_CUSTOS:
+ pitch = gabc_determine_custo_pitch(current_note->next,
+ *current_key, score);
+ break;
+
+ case GRE_MANUAL_CUSTOS:
+ pitch = current_note->u.note.pitch;
+ type = GRE_CUSTOS;
+ force = true;
+ break;
+
+ case GRE_BAR:
+ /* we calculate the signs of the bars */
+ if (current_note->signs == _V_EPISEMA) {
+ sign = _V_EPISEMA;
+ } else {
+ sign = current_note->special_sign;
+ }
+ if (current_note->h_episema_above) {
+ if (sign == _V_EPISEMA) {
+ sign = _V_EPISEMA_BAR_H_EPISEMA;
+ } else {
+ sign = _BAR_H_EPISEMA;
+ }
+ }
+ break;
+
+ case GRE_AUTOFUSE_START:
+ autofuse = true;
+ first_autofused_note = true;
+ add = false;
+ break;
+
+ case GRE_AUTOFUSE_END:
+ autofuse = false;
+ add = false;
+ break;
+
+ default:
+ /* do nothing */
+ break;
+ }
+
+ if (add) {
+ if (pitch == USELESS_VALUE) {
+ gregorio_add_unpitched_element_as_glyph(&last_glyph, type,
+ &(current_note->u.other), sign,
+ current_note->texverb);
+ } else if (type == GRE_CLEF) {
+ gregorio_add_clef_as_glyph(&last_glyph,
+ current_note->u.clef, current_note->texverb);
+ } else {
+ gregorio_add_pitched_element_as_glyph(&last_glyph, type,
+ pitch, force, current_note->texverb);
+ }
+ }
+ current_glyph_first_note = current_note->next;
+ current_note->texverb = 0;
+ gregorio_free_one_note(&current_note);
+ last_pitch = USELESS_VALUE;
+ continue;
+ }
+
+ /* first we do what must be done with liquescentia */
+ head_liquescentia = current_note->u.note.liquescentia
+ & (L_INITIO_DEBILIS | L_FUSED);
+ if (head_liquescentia) {
+ /* initio debilis or fused */
+ if (current_glyph_type != G_UNDETERMINED) {
+ /* if it is not the first glyph */
+ close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note,
+ liquescentia, current_note->previous,
+ punctum_inclinatum_orientation);
+ current_glyph_type = G_UNDETERMINED;
+ }
+ liquescentia = head_liquescentia;
+ }
+
+ if (autofuse) {
+ if (current_glyph_first_note == current_note) {
+ if (first_autofused_note) {
+ first_autofused_note = false;
+ } else {
+ if (!(current_note->u.note.liquescentia & L_INITIO_DEBILIS)) {
+ current_note->u.note.liquescentia |= L_FUSED;
+ liquescentia |= L_FUSED;
+ }
+ }
+ } else {
+ /* only handle the multi-note case here; the single-note
+ * case will be added normally by the state machine */
+ if (is_tail_liquescentia(current_note->u.note.liquescentia)
+ && current_glyph_type > G_PUNCTA_INCLINATA) {
+ /* once we hit a liquescent, that's the end of a string of
+ * fused notes */
+ liquescentia |= current_note->u.note.liquescentia;
+ current_note = close_glyph(&last_glyph, G_FUSED,
+ &current_glyph_first_note, liquescentia,
+ current_note, punctum_inclinatum_orientation);
+ current_glyph_type = G_UNDETERMINED;
+ liquescentia = L_NO_LIQUESCENTIA;
+ add = false;
+ } else {
+ switch (current_note->u.note.shape) {
+ case S_PUNCTUM:
+ case S_ORISCUS_UNDETERMINED:
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ case S_QUILISMA:
+ case S_QUADRATUM:
+ case S_QUILISMA_QUADRATUM:
+ /* these are fusible */
+ if (current_glyph_type <= G_PUNCTA_INCLINATA
+ || current_note->u.note.shape != S_PUNCTUM) {
+ /* if we had some puncta inclinata, then end them */
+ /* if the current shape is not a punctum, start a
+ * new shape */
+ close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note,
+ liquescentia, current_note->previous,
+ punctum_inclinatum_orientation);
+ if (!(current_note->u.note.liquescentia
+ & L_INITIO_DEBILIS)) {
+ current_note->u.note.liquescentia |= L_FUSED;
+ liquescentia |= L_FUSED;
+ }
+ }
+ next_glyph_type = current_glyph_type = G_FUSED;
+ add = false;
+ break;
+
+ default:
+ /* not fusible; will be added normally by the state
+ * machine */
+ break;
+ }
+ }
+ }
+ }
+
+ if (add) {
+ next_glyph_type = add_note_to_a_glyph(current_glyph_type,
+ current_note->u.note.pitch, last_pitch,
+ current_note->u.note.shape,
+ current_note->u.note.liquescentia,
+ current_glyph_first_note, &end_of_glyph,
+ punctum_inclinatum_orientation);
+ }
+
+ /* patch to have good shapes in the special cases of pes quadratum and
+ * pes quilisma quadratum. */
+ switch (current_note->u.note.shape) {
+ case S_QUADRATUM:
+ current_note->u.note.shape = S_PUNCTUM;
+ break;
+
+ case S_QUILISMA_QUADRATUM:
+ current_note->u.note.shape = S_QUILISMA;
+ break;
+
+ default:
+ /* do nothing */
+ break;
+ }
+
+ if (add) {
+ /* see comments on add_note_to_a_glyph for the meaning of
+ * end_of_glyph */
+ switch (end_of_glyph) {
+ case DET_NO_END:
+ current_glyph_type = next_glyph_type;
+ /*
+ * we deal with liquescentia
+ */
+ if (is_tail_liquescentia(current_note->u.note.liquescentia)) {
+ /* special cases of oriscus descendens, treated like normal
+ * oriscus in some cases. */
+ if (score->legacy_oriscus_orientation) {
+ if (current_note->u.note.shape == S_ORISCUS_DESCENDENS
+ && current_note->next
+ && current_note->next->type == GRE_NOTE
+ && current_note->next->u.note.pitch <
+ current_note->u.note.pitch) {
+ last_pitch = current_note->u.note.pitch;
+ current_note->u.note.shape = S_ORISCUS_ASCENDENS;
+ current_note->u.note.liquescentia =
+ L_NO_LIQUESCENTIA;
+ current_note = next_note;
+ continue;
+ }
+ }
+ /* special cases of the punctum inclinatum deminutus and
+ * auctus */
+ if (is_punctum_inclinatum(current_note->u.note.shape, false)) {
+ if (current_note->u.note.liquescentia == L_DEMINUTUS) {
+ current_note->u.note.shape =
+ S_PUNCTUM_INCLINATUM_DEMINUTUS;
+ }
+ if (current_note->u.note.liquescentia
+ == L_AUCTUS_DESCENDENS
+ || current_note->u.note.liquescentia
+ == L_AUCTUS_ASCENDENS) {
+ current_note->u.note.shape =
+ S_PUNCTUM_INCLINATUM_AUCTUS;
+ }
+
+ if (current_note->next
+ && current_note->next->type == GRE_NOTE
+ && is_punctum_inclinatum(
+ current_note->next->u.note.shape, false)
+ && current_note->next->u.note.liquescentia
+ == L_DEMINUTUS) {
+ last_pitch = current_note->u.note.pitch;
+ current_note = next_note;
+ continue;
+ }
+ }
+ liquescentia |= current_note->u.note.liquescentia;
+ /* once again, only works with the good values in the header
+ * file */
+ current_note = close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note, liquescentia,
+ current_note, punctum_inclinatum_orientation);
+ current_glyph_type = G_UNDETERMINED;
+ liquescentia = L_NO_LIQUESCENTIA;
+ }
+ break;
+ case DET_END_OF_PREVIOUS:
+ if (current_note->previous)
+ {
+ /* we don't want to close previous glyph twice */
+ close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note, liquescentia,
+ current_note->previous,
+ punctum_inclinatum_orientation);
+ }
+ current_glyph_type = next_glyph_type;
+ liquescentia = L_NO_LIQUESCENTIA;
+ last_pitch = USELESS_VALUE;
+ /* we deal with liquescentia */
+ if (is_tail_liquescentia(current_note->u.note.liquescentia))
+ /* not an initio debilis, because we considered it in the first
+ * part... */
+ {
+ /* special cases of the punctum inclinatum deminutus and
+ * auctus */
+ if (is_punctum_inclinatum(current_note->u.note.shape, false)) {
+ if (current_note->u.note.liquescentia == L_DEMINUTUS) {
+ current_note->u.note.shape =
+ S_PUNCTUM_INCLINATUM_DEMINUTUS;
+ }
+ if (current_note->u.note.liquescentia ==
+ L_AUCTUS_DESCENDENS
+ || current_note->u.note.liquescentia ==
+ L_AUCTUS_ASCENDENS) {
+ current_note->u.note.shape =
+ S_PUNCTUM_INCLINATUM_AUCTUS;
+ }
+ if (current_note->next
+ && current_note->next->type == GRE_NOTE
+ && is_punctum_inclinatum(
+ current_note->next->u.note.shape, false)
+ && current_note->next->u.note.liquescentia ==
+ L_DEMINUTUS) {
+ current_note = next_note;
+ continue;
+ }
+ }
+ current_note = close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note,
+ current_note->u.note.liquescentia, current_note,
+ punctum_inclinatum_orientation);
+ current_glyph_type = G_UNDETERMINED;
+ }
+ break;
+ case DET_END_OF_CURRENT:
+ liquescentia += current_note->u.note.liquescentia;
+ /* once again, only works with the good values in the header file */
+ current_note = close_glyph(&last_glyph, next_glyph_type,
+ &current_glyph_first_note, liquescentia, current_note,
+ punctum_inclinatum_orientation);
+ current_glyph_type = G_UNDETERMINED;
+ liquescentia = L_NO_LIQUESCENTIA;
+ break;
+ case DET_END_OF_BOTH:
+ if (current_note->previous)
+ {
+ /* we don't want to close previous glyph twice */
+ close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note, liquescentia,
+ current_note->previous,
+ punctum_inclinatum_orientation);
+ }
+ current_glyph_type = G_UNDETERMINED;
+ liquescentia = L_NO_LIQUESCENTIA;
+ current_note = close_glyph(&last_glyph, next_glyph_type,
+ &current_glyph_first_note,
+ current_note->u.note.liquescentia, current_note,
+ punctum_inclinatum_orientation);
+ break;
+ }
+ }
+
+ if (!next_note && current_glyph_type != G_UNDETERMINED) {
+ /* we must end the determination here */
+ current_note = close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note, liquescentia, current_note,
+ punctum_inclinatum_orientation);
+ }
+
+ last_pitch = current_note->u.note.pitch;
+ current_note = next_note;
+ }
+ /* end of while */
+
+ gregorio_go_to_first_glyph(&last_glyph);
+ return last_glyph;
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination-l.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination-l.c
new file mode 100644
index 00000000000..482c7f06dd0
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination-l.c
@@ -0,0 +1,15127 @@
+#line 1 "gabc/gabc-notes-determination-l.c"
+
+#line 3 "gabc/gabc-notes-determination-l.c"
+
+#define YY_INT_ALIGNED long int
+
+/* A lexical scanner generated by flex */
+
+#define yy_create_buffer gabc_notes_determination__create_buffer
+#define yy_delete_buffer gabc_notes_determination__delete_buffer
+#define yy_scan_buffer gabc_notes_determination__scan_buffer
+#define yy_scan_string gabc_notes_determination__scan_string
+#define yy_scan_bytes gabc_notes_determination__scan_bytes
+#define yy_init_buffer gabc_notes_determination__init_buffer
+#define yy_flush_buffer gabc_notes_determination__flush_buffer
+#define yy_load_buffer_state gabc_notes_determination__load_buffer_state
+#define yy_switch_to_buffer gabc_notes_determination__switch_to_buffer
+#define yypush_buffer_state gabc_notes_determination_push_buffer_state
+#define yypop_buffer_state gabc_notes_determination_pop_buffer_state
+#define yyensure_buffer_stack gabc_notes_determination_ensure_buffer_stack
+#define yy_flex_debug gabc_notes_determination__flex_debug
+#define yyin gabc_notes_determination_in
+#define yyleng gabc_notes_determination_leng
+#define yylex gabc_notes_determination_lex
+#define yylineno gabc_notes_determination_lineno
+#define yyout gabc_notes_determination_out
+#define yyrestart gabc_notes_determination_restart
+#define yytext gabc_notes_determination_text
+#define yywrap gabc_notes_determination_wrap
+#define yyalloc gabc_notes_determination_alloc
+#define yyrealloc gabc_notes_determination_realloc
+#define yyfree gabc_notes_determination_free
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+#ifdef yy_create_buffer
+#define gabc_notes_determination__create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer gabc_notes_determination__create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define gabc_notes_determination__delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer gabc_notes_determination__delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define gabc_notes_determination__scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer gabc_notes_determination__scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define gabc_notes_determination__scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string gabc_notes_determination__scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define gabc_notes_determination__scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes gabc_notes_determination__scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define gabc_notes_determination__init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer gabc_notes_determination__init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define gabc_notes_determination__flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer gabc_notes_determination__flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define gabc_notes_determination__load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state gabc_notes_determination__load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define gabc_notes_determination__switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer gabc_notes_determination__switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define gabc_notes_determination_push_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state gabc_notes_determination_push_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define gabc_notes_determination_pop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state gabc_notes_determination_pop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define gabc_notes_determination_ensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack gabc_notes_determination_ensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define gabc_notes_determination_lex_ALREADY_DEFINED
+#else
+#define yylex gabc_notes_determination_lex
+#endif
+
+#ifdef yyrestart
+#define gabc_notes_determination_restart_ALREADY_DEFINED
+#else
+#define yyrestart gabc_notes_determination_restart
+#endif
+
+#ifdef yylex_init
+#define gabc_notes_determination_lex_init_ALREADY_DEFINED
+#else
+#define yylex_init gabc_notes_determination_lex_init
+#endif
+
+#ifdef yylex_init_extra
+#define gabc_notes_determination_lex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra gabc_notes_determination_lex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define gabc_notes_determination_lex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy gabc_notes_determination_lex_destroy
+#endif
+
+#ifdef yyget_debug
+#define gabc_notes_determination_get_debug_ALREADY_DEFINED
+#else
+#define yyget_debug gabc_notes_determination_get_debug
+#endif
+
+#ifdef yyset_debug
+#define gabc_notes_determination_set_debug_ALREADY_DEFINED
+#else
+#define yyset_debug gabc_notes_determination_set_debug
+#endif
+
+#ifdef yyget_extra
+#define gabc_notes_determination_get_extra_ALREADY_DEFINED
+#else
+#define yyget_extra gabc_notes_determination_get_extra
+#endif
+
+#ifdef yyset_extra
+#define gabc_notes_determination_set_extra_ALREADY_DEFINED
+#else
+#define yyset_extra gabc_notes_determination_set_extra
+#endif
+
+#ifdef yyget_in
+#define gabc_notes_determination_get_in_ALREADY_DEFINED
+#else
+#define yyget_in gabc_notes_determination_get_in
+#endif
+
+#ifdef yyset_in
+#define gabc_notes_determination_set_in_ALREADY_DEFINED
+#else
+#define yyset_in gabc_notes_determination_set_in
+#endif
+
+#ifdef yyget_out
+#define gabc_notes_determination_get_out_ALREADY_DEFINED
+#else
+#define yyget_out gabc_notes_determination_get_out
+#endif
+
+#ifdef yyset_out
+#define gabc_notes_determination_set_out_ALREADY_DEFINED
+#else
+#define yyset_out gabc_notes_determination_set_out
+#endif
+
+#ifdef yyget_leng
+#define gabc_notes_determination_get_leng_ALREADY_DEFINED
+#else
+#define yyget_leng gabc_notes_determination_get_leng
+#endif
+
+#ifdef yyget_text
+#define gabc_notes_determination_get_text_ALREADY_DEFINED
+#else
+#define yyget_text gabc_notes_determination_get_text
+#endif
+
+#ifdef yyget_lineno
+#define gabc_notes_determination_get_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno gabc_notes_determination_get_lineno
+#endif
+
+#ifdef yyset_lineno
+#define gabc_notes_determination_set_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno gabc_notes_determination_set_lineno
+#endif
+
+#ifdef yywrap
+#define gabc_notes_determination_wrap_ALREADY_DEFINED
+#else
+#define yywrap gabc_notes_determination_wrap
+#endif
+
+#ifdef yyalloc
+#define gabc_notes_determination_alloc_ALREADY_DEFINED
+#else
+#define yyalloc gabc_notes_determination_alloc
+#endif
+
+#ifdef yyrealloc
+#define gabc_notes_determination_realloc_ALREADY_DEFINED
+#else
+#define yyrealloc gabc_notes_determination_realloc
+#endif
+
+#ifdef yyfree
+#define gabc_notes_determination_free_ALREADY_DEFINED
+#else
+#define yyfree gabc_notes_determination_free
+#endif
+
+#ifdef yytext
+#define gabc_notes_determination_text_ALREADY_DEFINED
+#else
+#define yytext gabc_notes_determination_text
+#endif
+
+#ifdef yyleng
+#define gabc_notes_determination_leng_ALREADY_DEFINED
+#else
+#define yyleng gabc_notes_determination_leng
+#endif
+
+#ifdef yyin
+#define gabc_notes_determination_in_ALREADY_DEFINED
+#else
+#define yyin gabc_notes_determination_in
+#endif
+
+#ifdef yyout
+#define gabc_notes_determination_out_ALREADY_DEFINED
+#else
+#define yyout gabc_notes_determination_out
+#endif
+
+#ifdef yy_flex_debug
+#define gabc_notes_determination__flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug gabc_notes_determination__flex_debug
+#endif
+
+#ifdef yylineno
+#define gabc_notes_determination_lineno_ALREADY_DEFINED
+#else
+#define yylineno gabc_notes_determination_lineno
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* begin standard C++ headers. */
+
+/* TODO: this is always defined, so inline it */
+#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
+#else
+#define yynoreturn
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
+ */
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern int yyleng;
+
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ #define YY_LESS_LINENO(n)
+ #define YY_LINENO_REWIND_TO(ptr)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
+ YY_RESTORE_YY_MORE_OFFSET \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+#define unput(c) yyunput( c, (yytext_ptr) )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ int yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = NULL;
+static int yy_init = 0; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
+
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+
+#define yy_new_buffer yy_create_buffer
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ }
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){\
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ }
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+#define gabc_notes_determination_wrap() (/*CONSTCOND*/1)
+#define YY_SKIP_YYWRAP
+typedef flex_uint8_t YY_CHAR;
+
+FILE *yyin = NULL, *yyout = NULL;
+
+typedef int yy_state_type;
+
+extern int yylineno;
+int yylineno = 1;
+
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
+
+static const flex_int32_t yy_nxt[][256] =
+ {
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0
+ },
+
+ {
+ 39, 40, 40, 40, 40, 40, 40, 40, 40, 41,
+ 41, 40, 40, 41, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 42, 43, 40, 44, 40, 45, 40, 46,
+
+ 40, 40, 40, 40, 47, 48, 49, 50, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 51, 52,
+ 53, 54, 55, 40, 56, 57, 57, 57, 57, 57,
+ 57, 57, 57, 57, 57, 57, 57, 57, 57, 58,
+ 57, 40, 59, 40, 40, 40, 60, 61, 40, 40,
+ 62, 63, 40, 64, 65, 66, 67, 68, 68, 69,
+ 68, 68, 69, 68, 68, 68, 68, 68, 68, 68,
+ 68, 70, 68, 71, 72, 73, 40, 40, 74, 75,
+ 76, 77, 78, 79, 40, 80, 81, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40
+ },
+
+ {
+ 39, 40, 40, 40, 40, 40, 40, 40, 40, 41,
+ 41, 40, 40, 41, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 42, 43, 40, 44, 40, 45, 40, 46,
+ 40, 40, 40, 40, 47, 48, 49, 50, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 51, 52,
+ 53, 54, 55, 40, 56, 57, 57, 57, 57, 57,
+ 57, 57, 57, 57, 57, 57, 57, 57, 57, 58,
+
+ 57, 40, 59, 40, 40, 40, 60, 61, 40, 40,
+ 62, 63, 40, 64, 65, 66, 67, 68, 68, 69,
+ 68, 68, 69, 68, 68, 68, 68, 68, 68, 68,
+ 68, 70, 68, 71, 72, 73, 40, 40, 74, 75,
+ 76, 77, 78, 79, 40, 80, 81, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40
+ },
+
+ {
+ 39, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 83, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82
+ },
+
+ {
+ 39, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 83, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82
+
+ },
+
+ {
+ 39, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 83, 84, 84, 84, 84, 84, 84,
+
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84
+ },
+
+ {
+ 39, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 83, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84
+ },
+
+ {
+ 39, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 83, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85
+ },
+
+ {
+ 39, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 83, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85
+ },
+
+ {
+ 39, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 83, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86
+
+ },
+
+ {
+ 39, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 83, 86, 86, 86, 86, 86, 86,
+
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86
+ },
+
+ {
+ 39, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 83, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87
+ },
+
+ {
+ 39, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 83, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87
+ },
+
+ {
+ 39, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 83, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88
+ },
+
+ {
+ 39, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 83, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88
+
+ },
+
+ {
+ 39, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 90, 89, 89, 90, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89
+ },
+
+ {
+ 39, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 90, 89, 89, 90, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89
+ },
+
+ {
+ 39, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 83, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91
+ },
+
+ {
+ 39, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 83, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91
+ },
+
+ {
+ 39, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 83, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92
+
+ },
+
+ {
+ 39, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 83, 92, 92, 92, 92, 92, 92,
+
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92
+ },
+
+ {
+ 39, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 83, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93
+ },
+
+ {
+ 39, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 83, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93
+ },
+
+ {
+ 39, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 83, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94
+ },
+
+ {
+ 39, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 83, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94
+
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 96, 97, 95, 98, 98,
+ 98, 98, 98, 98, 98, 98, 98, 98, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 83, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 96, 97, 95, 98, 98,
+ 98, 98, 98, 98, 98, 98, 98, 98, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 83, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 99, 100, 95, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 83, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 99, 100, 95, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 83, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 95,
+
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 95, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102
+
+ },
+
+ {
+ 39, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 95,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 95, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 103,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 104, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 103,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 104, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 95,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+
+ 105, 105, 105, 95, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105
+ },
+
+ {
+ 39, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 95,
+
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 95, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105
+
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 106,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 107, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 106,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 107, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 83, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 83, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39
+
+ },
+
+ {
+ 39, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40
+ },
+
+ {
+ 39, -41, -41, -41, -41, -41, -41, -41, -41, 108,
+ 108, -41, -41, 108, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41
+ },
+
+ {
+ 39, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42
+ },
+
+ {
+ 39, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 110, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 111, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109
+ },
+
+ {
+ 39, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44
+
+ },
+
+ {
+ 39, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45
+ },
+
+ {
+ 39, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+
+ -46, -46, -46, -46, -46, -46, -46, -46, 112, 112,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46
+ },
+
+ {
+ 39, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, 113, 114,
+ 114, 114, 114, 114, 114, 114, 114, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47
+ },
+
+ {
+ 39, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, -48,
+ 115, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, 116, 116, 116,
+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
+ 116, -48, 116, -48, -48, -48, -48, -48, -48, -48,
+
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48
+ },
+
+ {
+ 39, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, 117, 117,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49
+
+ },
+
+ {
+ 39, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, 118, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, 119, 120, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, 121, -50, -50, -50, -50, -50, -50, -50, -50,
+
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50
+ },
+
+ {
+ 39, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, 122, -51,
+ -51, -51, -51, 123, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51
+ },
+
+ {
+ 39, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, 114,
+ 114, 114, 114, 114, 114, 114, 114, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52
+ },
+
+ {
+ 39, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, 124, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ 125, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53
+ },
+
+ {
+ 39, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54
+
+ },
+
+ {
+ 39, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55
+ },
+
+ {
+ 39, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, 126, 126, 126, 126, 126,
+ 126, 126, 126, 126, 126, 126, 126, 126, 126, -56,
+ 126, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, 127, -56, -56, -56, -56, -56, 128, 128, 129,
+ 128, 128, 129, 128, 128, 128, 128, 128, 128, 128,
+ 128, -56, 128, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56
+ },
+
+ {
+ 39, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, 130, 130,
+ 130, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+
+ -57, -57, -57, -57, -57, -57, 131, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, 132, -57, -57, 133, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57
+ },
+
+ {
+ 39, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, 134, 135,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58
+ },
+
+ {
+ 39, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59
+
+ },
+
+ {
+ 39, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60
+ },
+
+ {
+ 39, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61
+ },
+
+ {
+ 39, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, 136, -62, 137, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62
+ },
+
+ {
+ 39, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, 138, -63, -63, -63, -63, -63, 139, -63, 140,
+ -63, 141, -63, 142, 143, -63, -63, -63, 144, -63,
+ 145, 146, -63, -63, -63, -63, -63, 147, -63, -63,
+
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63
+ },
+
+ {
+ 39, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, 148, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64
+
+ },
+
+ {
+ 39, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, 149, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65
+ },
+
+ {
+ 39, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+
+ -66, -66, -66, -66, -66, -66, -66, -66, 150, 150,
+ 150, 150, 150, 150, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66
+ },
+
+ {
+ 39, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, 151, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67
+ },
+
+ {
+ 39, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, 152, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, 131, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, 132, -68, -68, 133, -68,
+
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68
+ },
+
+ {
+ 39, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, 152, -69, -69, -69, -69, -69, 153,
+ 153, 153, 153, 153, -69, -69, -69, -69, -69, -69,
+
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, 131, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, 154, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, 132, -69, -69, 133, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69
+
+ },
+
+ {
+ 39, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, 155, 156,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70
+ },
+
+ {
+ 39, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71
+ },
+
+ {
+ 39, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, 157, 158,
+ 159, 160, 161, 162, 163, 164, 165, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72
+ },
+
+ {
+ 39, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73
+ },
+
+ {
+ 39, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74
+
+ },
+
+ {
+ 39, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75
+ },
+
+ {
+ 39, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76
+ },
+
+ {
+ 39, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77
+ },
+
+ {
+ 39, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, 166, -78, 167, -78, -78, 168, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78
+ },
+
+ {
+ 39, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79
+
+ },
+
+ {
+ 39, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80
+ },
+
+ {
+ 39, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81
+ },
+
+ {
+ 39, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, -82, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169
+ },
+
+ {
+ 39, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83
+ },
+
+ {
+ 39, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, -84, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170
+
+ },
+
+ {
+ 39, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, -85, 171, 171, 171, 171, 171, 171,
+
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171
+ },
+
+ {
+ 39, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, -86, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172
+ },
+
+ {
+ 39, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, -87, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173
+ },
+
+ {
+ 39, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, -88, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174
+ },
+
+ {
+ 39, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ -89, 175, 175, -89, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175
+
+ },
+
+ {
+ 39, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ 176, -90, -90, 176, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90
+ },
+
+ {
+ 39, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, -91, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177
+ },
+
+ {
+ 39, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, -92, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178
+ },
+
+ {
+ 39, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, -93, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179
+ },
+
+ {
+ 39, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, -94, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180
+
+ },
+
+ {
+ 39, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95
+ },
+
+ {
+ 39, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+
+ -96, -96, -96, -96, -96, -96, 181, -96, 182, 182,
+ 182, 182, 182, 182, 182, 182, 182, 182, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96
+ },
+
+ {
+ 39, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, 183, 183,
+ 183, 183, 183, 183, 183, 183, 183, 183, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97
+ },
+
+ {
+ 39, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, 184, -98, 182, 182,
+ 182, 182, 182, 182, 182, 182, 182, 182, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, 185, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98
+ },
+
+ {
+ 39, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, 186, -99, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, -99, -99,
+
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99
+
+ },
+
+ {
+ 39, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, 188, 188,
+ 188, 188, 188, 188, 188, 188, 188, 188, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100
+ },
+
+ {
+ 39, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+
+ -101, -101, -101, -101, -101, -101, 189, -101, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, 190, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101
+ },
+
+ {
+ 39, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, -102,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, -102, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191
+ },
+
+ {
+ 39, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, -103, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192
+ },
+
+ {
+ 39, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, -104, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193
+
+ },
+
+ {
+ 39, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, -105,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, -105, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194
+ },
+
+ {
+ 39, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, -106, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195
+ },
+
+ {
+ 39, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, -107, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196
+ },
+
+ {
+ 39, -108, -108, -108, -108, -108, -108, -108, -108, 108,
+ 108, -108, -108, 108, -108, -108, -108, -108, -108, -108,
+
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108
+ },
+
+ {
+ 39, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109
+
+ },
+
+ {
+ 39, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110
+ },
+
+ {
+ 39, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, 118, -111, -111, -111, -111, -111, -111,
+
+ -111, -111, -111, -111, -111, -111, -111, 197, 120, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, 198, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111
+ },
+
+ {
+ 39, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112
+ },
+
+ {
+ 39, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113
+ },
+
+ {
+ 39, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114
+
+ },
+
+ {
+ 39, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, 199, 199,
+ 199, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115
+ },
+
+ {
+ 39, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116
+ },
+
+ {
+ 39, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117
+ },
+
+ {
+ 39, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118
+ },
+
+ {
+ 39, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, 200, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119
+
+ },
+
+ {
+ 39, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120
+ },
+
+ {
+ 39, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121
+ },
+
+ {
+ 39, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122
+ },
+
+ {
+ 39, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123
+ },
+
+ {
+ 39, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ 201, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124
+
+ },
+
+ {
+ 39, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+
+ -125, -125, -125, -125, -125, -125, -125, -125, 202, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125
+ },
+
+ {
+ 39, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+
+ -126, -126, -126, -126, -126, -126, -126, -126, 203, 203,
+ 203, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126
+ },
+
+ {
+ 39, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127
+ },
+
+ {
+ 39, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128
+ },
+
+ {
+ 39, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, 204,
+ 204, 204, 204, 204, -129, -129, -129, -129, -129, -129,
+
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, 205, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129
+
+ },
+
+ {
+ 39, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130
+ },
+
+ {
+ 39, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, 206, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131
+ },
+
+ {
+ 39, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, 207, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132
+ },
+
+ {
+ 39, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, 208, -133,
+
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133
+ },
+
+ {
+ 39, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134
+
+ },
+
+ {
+ 39, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135
+ },
+
+ {
+ 39, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136
+ },
+
+ {
+ 39, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137
+ },
+
+ {
+ 39, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138
+ },
+
+ {
+ 39, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, 209, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139
+
+ },
+
+ {
+ 39, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ 210, -140, -140, -140, -140, 211, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140
+ },
+
+ {
+ 39, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, 212,
+ -141, -141, -141, -141, -141, -141, -141, -141, 213, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141
+ },
+
+ {
+ 39, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, 214,
+ -142, -142, -142, -142, -142, -142, -142, -142, 215, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142
+ },
+
+ {
+ 39, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, 216, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143
+ },
+
+ {
+ 39, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, 217, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144
+
+ },
+
+ {
+ 39, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, 218,
+ -145, 219, -145, -145, -145, -145, -145, -145, 220, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145
+ },
+
+ {
+ 39, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, 221, 222,
+ -146, -146, -146, -146, 223, -146, -146, -146, 224, -146,
+ -146, -146, -146, -146, -146, 225, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146
+ },
+
+ {
+ 39, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, 226, -147,
+ -147, -147, -147, -147, 223, -147, -147, -147, 227, -147,
+ -147, -147, -147, -147, -147, 225, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147
+ },
+
+ {
+ 39, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148
+ },
+
+ {
+ 39, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149
+
+ },
+
+ {
+ 39, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, 150, 150,
+ 150, 150, 150, 150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150
+ },
+
+ {
+ 39, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151
+ },
+
+ {
+ 39, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152
+ },
+
+ {
+ 39, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153
+ },
+
+ {
+ 39, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, 228,
+ 228, 228, 228, 228, -154, -154, -154, -154, -154, -154,
+
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154
+
+ },
+
+ {
+ 39, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155
+ },
+
+ {
+ 39, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156
+ },
+
+ {
+ 39, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157
+ },
+
+ {
+ 39, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158
+ },
+
+ {
+ 39, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159
+
+ },
+
+ {
+ 39, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160
+ },
+
+ {
+ 39, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161
+ },
+
+ {
+ 39, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162
+ },
+
+ {
+ 39, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163
+ },
+
+ {
+ 39, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164
+
+ },
+
+ {
+ 39, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165
+ },
+
+ {
+ 39, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166
+ },
+
+ {
+ 39, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167
+ },
+
+ {
+ 39, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168
+ },
+
+ {
+ 39, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, -169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169
+
+ },
+
+ {
+ 39, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, -170, 170, 170, 170, 170, 170, 170,
+
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170
+ },
+
+ {
+ 39, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, -171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171
+ },
+
+ {
+ 39, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, -172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172
+ },
+
+ {
+ 39, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, -173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173
+ },
+
+ {
+ 39, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, -174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174
+
+ },
+
+ {
+ 39, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ -175, 175, 175, -175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175
+ },
+
+ {
+ 39, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ 176, -176, -176, 176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176
+ },
+
+ {
+ 39, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, -177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177
+ },
+
+ {
+ 39, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, -178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178
+ },
+
+ {
+ 39, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, -179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179
+
+ },
+
+ {
+ 39, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, -180, 180, 180, 180, 180, 180, 180,
+
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180
+ },
+
+ {
+ 39, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+
+ -181, -181, -181, -181, -181, -181, -181, -181, 183, 183,
+ 183, 183, 183, 183, 183, 183, 183, 183, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181
+ },
+
+ {
+ 39, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, 184, -182, 182, 182,
+ 182, 182, 182, 182, 182, 182, 182, 182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, 185, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182
+ },
+
+ {
+ 39, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, 183, 183,
+ 183, 183, 183, 183, 183, 183, 183, 183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, 185, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183
+ },
+
+ {
+ 39, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, 229, 229,
+ 229, 229, 229, 229, 229, 229, 229, 229, -184, -184,
+
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, 185, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184
+
+ },
+
+ {
+ 39, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185
+ },
+
+ {
+ 39, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+
+ -186, -186, -186, -186, -186, -186, -186, -186, 188, 188,
+ 188, 188, 188, 188, 188, 188, 188, 188, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186
+ },
+
+ {
+ 39, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, 189, -187, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, 190, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187
+ },
+
+ {
+ 39, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, 188, 188,
+ 188, 188, 188, 188, 188, 188, 188, 188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, 190, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188
+ },
+
+ {
+ 39, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, 230, 230,
+ 230, 230, 230, 230, 230, 230, 230, 230, -189, -189,
+
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, 190, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189
+
+ },
+
+ {
+ 39, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190
+ },
+
+ {
+ 39, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, -191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, -191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191
+ },
+
+ {
+ 39, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, -192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192
+ },
+
+ {
+ 39, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, -193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193
+ },
+
+ {
+ 39, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, -194,
+
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, -194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194
+
+ },
+
+ {
+ 39, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, -195, 195, 195, 195, 195, 195, 195,
+
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195
+ },
+
+ {
+ 39, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, -196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196
+ },
+
+ {
+ 39, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, 231, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197
+ },
+
+ {
+ 39, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198
+ },
+
+ {
+ 39, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199
+
+ },
+
+ {
+ 39, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200
+ },
+
+ {
+ 39, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, 232, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201
+ },
+
+ {
+ 39, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, 233, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202
+ },
+
+ {
+ 39, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203
+ },
+
+ {
+ 39, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204
+
+ },
+
+ {
+ 39, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, 234,
+ 234, 234, 234, 234, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205
+ },
+
+ {
+ 39, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, 235, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206
+ },
+
+ {
+ 39, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ 236, -207, 236, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, 237, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207
+ },
+
+ {
+ 39, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, 238, -208,
+
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208
+ },
+
+ {
+ 39, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, 239, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209
+
+ },
+
+ {
+ 39, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, 240, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210
+ },
+
+ {
+ 39, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, 241, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211
+ },
+
+ {
+ 39, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212
+ },
+
+ {
+ 39, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, 243, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213
+ },
+
+ {
+ 39, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, 244,
+ 244, 244, 244, 244, 244, 244, 244, 244, -214, -214,
+
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214
+
+ },
+
+ {
+ 39, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, 245, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215
+ },
+
+ {
+ 39, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, 246, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216
+ },
+
+ {
+ 39, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, 247, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217
+ },
+
+ {
+ 39, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218
+ },
+
+ {
+ 39, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, 249,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219
+
+ },
+
+ {
+ 39, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, 250, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220
+ },
+
+ {
+ 39, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, 251, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221
+ },
+
+ {
+ 39, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, 252, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222
+ },
+
+ {
+ 39, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, 253, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+
+ -223, -223, -223, 254, -223, 255, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223
+ },
+
+ {
+ 39, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, 256, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224
+
+ },
+
+ {
+ 39, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+
+ -225, -225, -225, -225, -225, -225, -225, -225, 257, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225
+ },
+
+ {
+ 39, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, 258, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226
+ },
+
+ {
+ 39, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, 259, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227
+ },
+
+ {
+ 39, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228
+ },
+
+ {
+ 39, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, 229, 229,
+ 229, 229, 229, 229, 229, 229, 229, 229, -229, -229,
+
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, 185, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229
+
+ },
+
+ {
+ 39, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, 230, 230,
+ 230, 230, 230, 230, 230, 230, 230, 230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, 190, -230, -230, -230, -230, -230, -230,
+
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230
+ },
+
+ {
+ 39, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231
+ },
+
+ {
+ 39, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, 260, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232
+ },
+
+ {
+ 39, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, 261, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233
+ },
+
+ {
+ 39, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234
+
+ },
+
+ {
+ 39, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235
+ },
+
+ {
+ 39, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236
+ },
+
+ {
+ 39, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ 262, -237, 262, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237
+ },
+
+ {
+ 39, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238
+ },
+
+ {
+ 39, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, 263, -239,
+
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, 264,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239
+
+ },
+
+ {
+ 39, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240
+ },
+
+ {
+ 39, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241
+ },
+
+ {
+ 39, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, 265, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242
+ },
+
+ {
+ 39, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243
+ },
+
+ {
+ 39, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, 266, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244
+
+ },
+
+ {
+ 39, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245
+ },
+
+ {
+ 39, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+
+ -246, -246, -246, -246, -246, -246, -246, -246, 267, 268,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246
+ },
+
+ {
+ 39, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, 269, 270,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247
+ },
+
+ {
+ 39, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, 271, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248
+ },
+
+ {
+ 39, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, 272, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249
+
+ },
+
+ {
+ 39, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250
+ },
+
+ {
+ 39, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+
+ -251, -251, -251, -251, -251, -251, -251, -251, 273, 273,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251
+ },
+
+ {
+ 39, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, 274, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, 275, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252
+ },
+
+ {
+ 39, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, 276, -253, 276, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, 277, -253, -253, -253, 277, 277,
+ -253, 278, -253, -253, -253, -253, -253, 278, -253, -253,
+
+ -253, -253, -253, 254, -253, 255, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253
+ },
+
+ {
+ 39, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, 279, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254
+
+ },
+
+ {
+ 39, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, 280, -255, -255, -255, -255, -255, -255,
+
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255
+ },
+
+ {
+ 39, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, 281, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256
+ },
+
+ {
+ 39, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, 282, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257
+ },
+
+ {
+ 39, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, 283, 283,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258
+ },
+
+ {
+ 39, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, 284, -259,
+
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259
+
+ },
+
+ {
+ 39, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, 285, -260, -260,
+
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260
+ },
+
+ {
+ 39, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, 286, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261
+ },
+
+ {
+ 39, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262
+ },
+
+ {
+ 39, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263
+ },
+
+ {
+ 39, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, 287,
+ 287, 287, 287, 287, 287, 287, 287, 287, -264, -264,
+
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264
+
+ },
+
+ {
+ 39, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265
+ },
+
+ {
+ 39, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266
+ },
+
+ {
+ 39, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, 288, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267
+ },
+
+ {
+ 39, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, 289, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268
+ },
+
+ {
+ 39, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, 290, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269
+
+ },
+
+ {
+ 39, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, 291, -270, -270, -270, -270, -270, -270,
+
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270
+ },
+
+ {
+ 39, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271
+ },
+
+ {
+ 39, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, 292, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272
+ },
+
+ {
+ 39, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, 293,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+
+ -273, -273, -273, 294, -273, 295, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273
+ },
+
+ {
+ 39, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, 296, 296,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274
+
+ },
+
+ {
+ 39, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, 297, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275
+ },
+
+ {
+ 39, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, -276, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, -276, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298
+ },
+
+ {
+ 39, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, 276, -277, 276, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, 279, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, 254, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277
+ },
+
+ {
+ 39, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, 277, -278, -278, -278, 277, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278
+ },
+
+ {
+ 39, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279
+
+ },
+
+ {
+ 39, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280
+ },
+
+ {
+ 39, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+
+ -281, -281, -281, -281, -281, -281, -281, -281, 299, 300,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, 301, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281
+ },
+
+ {
+ 39, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, 302, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282
+ },
+
+ {
+ 39, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, 303,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+
+ -283, -283, -283, 304, -283, 305, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283
+ },
+
+ {
+ 39, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, 306, 307,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, 308, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284
+
+ },
+
+ {
+ 39, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, 309, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285
+ },
+
+ {
+ 39, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286
+ },
+
+ {
+ 39, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, 310, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287
+ },
+
+ {
+ 39, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288
+ },
+
+ {
+ 39, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289
+
+ },
+
+ {
+ 39, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290
+ },
+
+ {
+ 39, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291
+ },
+
+ {
+ 39, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, 311, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292
+ },
+
+ {
+ 39, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293
+ },
+
+ {
+ 39, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, 312, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294
+
+ },
+
+ {
+ 39, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, 313, -295, -295, -295, -295, -295, -295,
+
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295
+ },
+
+ {
+ 39, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, 314,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, 315, -296, 316, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296
+ },
+
+ {
+ 39, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, 317, 317,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297
+ },
+
+ {
+ 39, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 279, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 298, 298, 318, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298
+ },
+
+ {
+ 39, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, 319, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299
+
+ },
+
+ {
+ 39, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, 320, -300, -300, -300, -300, -300, -300,
+
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300
+ },
+
+ {
+ 39, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, 321, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301
+ },
+
+ {
+ 39, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, 322, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302
+ },
+
+ {
+ 39, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303
+ },
+
+ {
+ 39, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, 323, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304
+
+ },
+
+ {
+ 39, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, 324, -305, -305, -305, -305, -305, -305,
+
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305
+ },
+
+ {
+ 39, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, 325, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306
+ },
+
+ {
+ 39, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, 326, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307
+ },
+
+ {
+ 39, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, 327, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308
+ },
+
+ {
+ 39, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309
+
+ },
+
+ {
+ 39, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310
+ },
+
+ {
+ 39, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, 328, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311
+ },
+
+ {
+ 39, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312
+ },
+
+ {
+ 39, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313
+ },
+
+ {
+ 39, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314
+
+ },
+
+ {
+ 39, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, 329, -315, -315, -315, -315, -315, -315,
+
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315
+ },
+
+ {
+ 39, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, 330, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316
+ },
+
+ {
+ 39, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, 331,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, 332, -317, 333, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317
+ },
+
+ {
+ 39, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, 279, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318
+ },
+
+ {
+ 39, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319
+
+ },
+
+ {
+ 39, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320
+ },
+
+ {
+ 39, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321
+ },
+
+ {
+ 39, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, 334, 334,
+ 334, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322
+ },
+
+ {
+ 39, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323
+ },
+
+ {
+ 39, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324
+
+ },
+
+ {
+ 39, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325
+ },
+
+ {
+ 39, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326
+ },
+
+ {
+ 39, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327
+ },
+
+ {
+ 39, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, 335, -328, -328, -328, -328,
+
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328
+ },
+
+ {
+ 39, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329
+
+ },
+
+ {
+ 39, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330
+ },
+
+ {
+ 39, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331
+ },
+
+ {
+ 39, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, 336, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332
+ },
+
+ {
+ 39, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, 337, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333
+ },
+
+ {
+ 39, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, 338,
+
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, 339, -334, 340, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334
+
+ },
+
+ {
+ 39, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, 341, -335, -335, -335, -335, -335, -335,
+
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335
+ },
+
+ {
+ 39, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336
+ },
+
+ {
+ 39, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337
+ },
+
+ {
+ 39, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, -338, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342
+ },
+
+ {
+ 39, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, 343, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339
+
+ },
+
+ {
+ 39, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, 344, -340, -340, -340, -340, -340, -340,
+
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340
+ },
+
+ {
+ 39, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341
+ },
+
+ {
+ 39, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 345, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342
+ },
+
+ {
+ 39, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343
+ },
+
+ {
+ 39, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344
+
+ },
+
+ {
+ 39, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, -345, 346, 346, 346, 346, 346, 346,
+
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346
+ },
+
+ {
+ 39, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 347, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346
+ },
+
+ {
+ 39, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347
+ },
+
+ } ;
+
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ (yytext_ptr) = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
+ *yy_cp = '\0'; \
+ (yy_c_buf_p) = yy_cp;
+#define YY_NUM_RULES 156
+#define YY_END_OF_BUFFER 157
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static const flex_int32_t yy_accept[348] =
+ { 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 157, 155,
+ 69, 112, 155, 105, 1, 133, 86, 155, 135, 109,
+ 90, 89, 138, 118, 137, 155, 130, 143, 94, 149,
+ 147, 75, 155, 29, 84, 134, 82, 127, 127, 140,
+ 139, 93, 150, 148, 146, 104, 106, 72, 66, 67,
+ 136, 36, 58, 37, 38, 34, 35, 39, 3, 2,
+ 30, 31, 32, 33, 156, 156, 156, 156, 156, 156,
+
+ 156, 48, 156, 156, 55, 156, 156, 69, 117, 116,
+ 113, 133, 87, 88, 131, 128, 135, 108, 111, 107,
+ 40, 91, 92, 0, 0, 132, 28, 129, 129, 130,
+ 0, 0, 0, 144, 145, 76, 77, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 65, 85, 134,
+ 83, 68, 78, 0, 141, 142, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 73, 74, 71, 36, 37,
+ 38, 34, 35, 39, 3, 2, 30, 31, 32, 33,
+ 0, 0, 0, 0, 41, 0, 0, 0, 0, 43,
+ 48, 49, 50, 55, 56, 57, 115, 42, 131, 110,
+
+ 0, 0, 132, 80, 0, 121, 123, 119, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 79, 0, 0,
+ 114, 0, 0, 81, 122, 124, 125, 120, 0, 5,
+ 4, 0, 24, 0, 23, 0, 0, 0, 0, 22,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 126, 25, 0, 20, 19, 0, 0, 0, 0,
+ 18, 0, 0, 0, 0, 0, 0, 0, 62, 63,
+ 47, 0, 0, 54, 0, 26, 0, 152, 151, 154,
+ 153, 0, 6, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 7, 0, 0, 0, 0, 0, 27, 21,
+ 0, 10, 14, 8, 0, 0, 0, 0, 45, 44,
+ 46, 0, 11, 15, 52, 51, 53, 0, 12, 16,
+ 9, 0, 0, 0, 0, 13, 17, 0, 0, 0,
+ 70, 0, 60, 61, 0, 0, 59
+ } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+static const yy_state_type yy_NUL_trans[348] =
+ { 0,
+ 40, 40, 82, 82, 84, 84, 85, 85, 86, 86,
+ 87, 87, 88, 88, 89, 89, 91, 91, 92, 92,
+ 93, 93, 94, 94, 95, 95, 95, 95, 102, 102,
+ 95, 95, 105, 105, 95, 95, 95, 95, 0, 0,
+ 0, 0, 109, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 169, 0, 170, 171, 172, 173, 174, 175, 0,
+ 177, 178, 179, 180, 0, 0, 0, 0, 0, 0,
+
+ 0, 191, 192, 193, 194, 195, 196, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 169, 170,
+ 171, 172, 173, 174, 175, 0, 177, 178, 179, 180,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 191, 192, 193, 194, 195, 196, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 298, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 298, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 342, 0, 0,
+ 0, 342, 0, 0, 346, 346, 0
+ } ;
+
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "gabc/gabc-notes-determination.l"
+#line 2 "gabc/gabc-notes-determination.l"
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the note parser.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <ctype.h> /* for tolower */
+#include "bool.h"
+#include "struct.h"
+#include "messages.h"
+#include "support.h"
+
+#include "gabc.h"
+
+#define YY_NO_INPUT
+
+#define YY_USER_ACTION gabc_update_location(&notes_lloc, \
+ gabc_notes_determination_text, gabc_notes_determination_leng);
+
+static gregorio_scanner_location notes_lloc;
+static gregorio_note *current_note;
+static char char_for_brace;
+static unsigned int nbof_isolated_episema;
+static char *notesmacros[10];
+static char tempstr[256];
+static unsigned short overbrace_var = 0, underbrace_var = 0;
+static const char *overbrace_var_kind;
+static int before_ledger_type;
+static char *before_ledger_length = NULL;
+static unsigned short ledger_var[2] = { 0, 0 };
+static unsigned char staff_lines;
+static signed char highest_pitch;
+static signed char high_ledger_line_pitch;
+static bool legacy_oriscus_orientation;
+static unsigned short he_adjustment_index[2] = { 0, 0 };
+static signed char bracket_low_pitch, bracket_high_pitch;
+static unsigned short left_bracket_texverb = 0;
+
+#define LEDGER(WHICH, SPECIFICITY, VALUE) \
+ if (LEDGER_##SPECIFICITY > current_note->WHICH##_ledger_specificity) { \
+ current_note->WHICH##_ledger_line = VALUE; \
+ current_note->WHICH##_ledger_specificity = LEDGER_##SPECIFICITY; \
+ }
+
+typedef struct slur_info {
+ unsigned short var;
+ char shift;
+ gregorio_note *start;
+} slur_info;
+
+static slur_info slur[2] = { { 0, '\0', NULL }, { 0, '\0', NULL } };
+
+static __inline gregorio_sign_orientation letter_to_sign_orientation(
+ const char letter) {
+ switch (letter) {
+ case 'u': /* "u"under */
+ return SO_UNDER;
+ case 'o': /* "o"ver */
+ return SO_OVER;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(letter_to_sign_orientation,
+ "invalid sign orientation letter: %c", letter);
+ return SO_OVER;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline int letter_to_pitch_adjustment(const char letter) {
+ switch (letter_to_sign_orientation(letter)) {
+ case SO_OVER:
+ return 1;
+ case SO_UNDER:
+ return -1;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(letter_to_pitch_adjustment,
+ "invalid sign orientation letter: %c", letter);
+ return 0;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline signed char pitch_letter_to_height(const char pitch) {
+ char result = pitch - 'a' + LOWEST_PITCH;
+ if (pitch == 'p') {
+ --result;
+ }
+ if (result > highest_pitch) {
+ gregorio_messagef("pitch_letter_to_height", VERBOSITY_ERROR, 0,
+ _("invalid pitch for %u lines: %c"), (unsigned int)staff_lines,
+ pitch);
+ }
+ if (left_bracket_texverb) {
+ if (result < bracket_low_pitch) {
+ bracket_low_pitch = result;
+ }
+ if (result > bracket_high_pitch) {
+ bracket_high_pitch = result;
+ }
+ }
+ return result;
+}
+
+static gregorio_shape punctum_inclinatum(const char orientation)
+{
+ switch (orientation) {
+ case '0':
+ return S_PUNCTUM_INCLINATUM_DESCENDENS;
+
+ case '2':
+ return S_PUNCTUM_INCLINATUM_STANS;
+
+ case '1':
+ return S_PUNCTUM_INCLINATUM_ASCENDENS;
+ }
+
+ return S_PUNCTUM_INCLINATUM_UNDETERMINED;
+}
+
+static __inline void lex_add_note(int i, gregorio_shape shape, char signs,
+ char liquescentia)
+{
+ signed char height = pitch_letter_to_height(tolower(
+ (unsigned char)gabc_notes_determination_text[i]));
+
+ nbof_isolated_episema = 0;
+ gregorio_add_note(&current_note, height, shape, signs, liquescentia, NULL,
+ &notes_lloc);
+ current_note->he_adjustment_index[SO_OVER] = he_adjustment_index[SO_OVER];
+ current_note->he_adjustment_index[SO_UNDER] = he_adjustment_index[SO_UNDER];
+
+ if (height >= high_ledger_line_pitch) {
+ LEDGER(high, DRAWN, true);
+ } else if (ledger_var[SO_OVER]) {
+ LEDGER(high, EXPLICIT, true);
+ }
+
+ if (height <= LOW_LEDGER_LINE_PITCH) {
+ LEDGER(low, DRAWN, true);
+ } else if (ledger_var[SO_UNDER]) {
+ LEDGER(low, EXPLICIT, true);
+ }
+}
+
+static __inline void add_bar_as_note(gregorio_bar bar)
+{
+ nbof_isolated_episema = 0;
+ gregorio_add_bar_as_note(&current_note, bar, &notes_lloc);
+}
+
+static __inline void error(void)
+{
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("undefined macro used: m%d"),
+ gabc_notes_determination_text[3] - '0');
+}
+
+static void add_h_episema(void)
+{
+ grehepisema_size size = H_NORMAL;
+ gregorio_vposition vposition = VPOS_AUTO;
+ bool disable_bridge = false;
+
+ char *ptr = gabc_notes_determination_text;
+ char current;
+ /* first character is the underscore */
+ while ((current = *(++ptr))) {
+ switch(current) {
+ case '0':
+ vposition = VPOS_BELOW;
+ break;
+ case '1':
+ vposition = VPOS_ABOVE;
+ break;
+ case '2':
+ disable_bridge = true;
+ break;
+ case '3':
+ size = H_SMALL_LEFT;
+ break;
+ case '4':
+ size = H_SMALL_CENTRE;
+ break;
+ case '5':
+ size = H_SMALL_RIGHT;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(gabc_notes_determination,
+ "unrecognized horizontal episema modifier: %c", current);
+ break;
+ /* LCOV_EXCL_STOP */
+ };
+ }
+
+ gregorio_add_h_episema(current_note, size, vposition, disable_bridge,
+ &nbof_isolated_episema);
+}
+
+static void add_sign(gregorio_sign sign)
+{
+ gregorio_vposition vposition = VPOS_AUTO;
+ switch(gabc_notes_determination_text[1]) {
+ case '0':
+ vposition = VPOS_BELOW;
+ break;
+ case '1':
+ vposition = VPOS_ABOVE;
+ break;
+ }
+ gregorio_add_sign(current_note, sign, vposition);
+}
+
+static void save_before_ledger(const char *const before_ledger)
+{
+ if (strcmp(before_ledger, "0") == 0) {
+ before_ledger_type = 0;
+ before_ledger_length = "";
+ } else if (strcmp(before_ledger, "1") == 0) {
+ before_ledger_type = 1;
+ before_ledger_length = "";
+ } else {
+ before_ledger_type = 2;
+ before_ledger_length = gregorio_strdup(before_ledger);
+ }
+}
+
+static void add_static_ledger(const gregorio_sign_orientation type,
+ const char *length) {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreDrawAdditionalLine{%d}{%s}{%d}{%s}{0}{}",
+ type, length + 1, before_ledger_type, before_ledger_length);
+
+ if (before_ledger_type == 2) {
+ free(before_ledger_length);
+ before_ledger_length = NULL;
+ }
+
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+}
+
+static __inline const char *over_or_under(
+ const gregorio_sign_orientation type) {
+ switch (type) {
+ case SO_OVER:
+ return "over";
+ case SO_UNDER:
+ return "under";
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(over_or_under, "invalid ledger type %d", type);
+ return "";
+ /* LCOV_EXCL_STOP */
+}
+
+static void add_variable_ledger(const gregorio_sign_orientation type,
+ const char *after_ledger)
+{
+ if (ledger_var[type]) {
+ const char *const typename = over_or_under(type);
+ gregorio_messagef("add_variable_ledger", VERBOSITY_ERROR, 0,
+ _("variable %s-staff ledger line without termination of "
+ "previous %s-staff ledger line"), typename, typename);
+ } else {
+ int after_ledger_type;
+ const char *after_ledger_length;
+
+ ++after_ledger;
+
+ if (strcmp(after_ledger, "0") == 0) {
+ after_ledger_type = 0;
+ after_ledger_length = "";
+ } else if (strcmp(after_ledger, "1") == 0) {
+ after_ledger_type = 1;
+ after_ledger_length = "";
+ } else {
+ after_ledger_type = 2;
+ after_ledger_length = after_ledger;
+ }
+
+ ledger_var[type] = ++tex_position_id;
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{0}{1}"
+ "\\GreDrawAdditionalLine{%d}{\\GreVarBraceLength{%hu}}"
+ "{%d}{%s}{%d}{%s}",
+ ledger_var[type], type, ledger_var[type], before_ledger_type,
+ before_ledger_length, after_ledger_type, after_ledger_length);
+
+ if (before_ledger_type == 2) {
+ free(before_ledger_length);
+ before_ledger_length = NULL;
+ }
+
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ }
+}
+
+static void end_variable_ledger(const gregorio_sign_orientation type)
+{
+ if (!ledger_var[type]) {
+ const char *const typename = over_or_under(type);
+ gregorio_messagef("end_variable_ledger", VERBOSITY_ERROR, 0,
+ _("variable %s-staff ledger line termination without variable "
+ "%s-staff ledger line start"), typename, typename);
+ } else {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{0}{2}", ledger_var[type]);
+ ledger_var[type] = 0;
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ }
+}
+
+static __inline int parse_clef_line(char line)
+{
+ line -= '0';
+ if (line < 0 || line > staff_lines) {
+ gregorio_messagef("parse_clef_line", VERBOSITY_ERROR, 0,
+ _("invalid clef line for %u lines: %d"),
+ (unsigned int)staff_lines, (int)line);
+ return 1;
+ }
+ return line;
+}
+
+static __inline gregorio_bar parse_dominican_bar(char bar)
+{
+ bar -= '0';
+ if (bar < 1 || bar > (2 * (staff_lines - 1))) {
+ gregorio_messagef("parse_dominican_line", VERBOSITY_ERROR, 0,
+ _("invalid Dominican bar for %u lines: ;%d"),
+ (unsigned int)staff_lines, (int)bar);
+ }
+
+ switch (bar) {
+ case 1:
+ return B_DIVISIO_MINOR_D1;
+ case 2:
+ return B_DIVISIO_MINOR_D2;
+ case 3:
+ return B_DIVISIO_MINOR_D3;
+ case 4:
+ return B_DIVISIO_MINOR_D4;
+ case 5:
+ return B_DIVISIO_MINOR_D5;
+ case 6:
+ return B_DIVISIO_MINOR_D6;
+ case 7:
+ return B_DIVISIO_MINOR_D7;
+ case 8:
+ return B_DIVISIO_MINOR_D8;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(check_dominican_line, "invalid dominican bar: %d", (int)bar);
+ return B_NO_BAR;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline gregorio_clef letter_to_clef(char letter)
+{
+ switch (letter) {
+ case 'c':
+ return CLEF_C;
+ case 'f':
+ return CLEF_F;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(letter_to_clef, "invalid clef: %c", letter);
+ return CLEF_C;
+ /* LCOV_EXCL_STOP */
+}
+
+/* this assertion should only fail if the lex rules are incorrect */
+static __inline void slur_assert(char *fn, bool test) {
+ if (!test) {
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("invalid slur text"), fn, VERBOSITY_FATAL, 0);
+ exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static char *parse_slur_shift(char *shift)
+{
+ char *c;
+
+ c = strchr(gabc_notes_determination_text, ':');
+ slur_assert("parse_slur_shift", c != NULL);
+ slur_assert("parse_slur_shift", *(++c) != '\0');
+ *shift = *c;
+ return c;
+}
+
+static void parse_slur(void)
+{
+ const int direction = letter_to_pitch_adjustment(
+ gabc_notes_determination_text[1]);
+ char shift, *width, *height, *end;
+
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(
+ _("cannot add a slur to something that is not a note"),
+ "parse_slur", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ end = parse_slur_shift(&shift);
+ width = strchr(end, ';');
+ slur_assert("parse_slur", width != NULL);
+ height = strchr(++width, ',');
+ slur_assert("parse_slur", height != NULL);
+ *height = '\0';
+ end = strchr(++height, ']');
+ slur_assert("parse_slur", end != NULL);
+ *end = '\0';
+
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreSlur{%d}{%d}{%c}{%s}{%s}{}",
+ current_note->u.note.pitch + direction, direction, shift, width,
+ height);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+}
+
+static void start_var_slur(void)
+{
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(
+ _("cannot add a slur to something that is not a note"),
+ "start_var_slur", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (slur[index].var) {
+ gregorio_messagef("start_var_slur", VERBOSITY_ERROR, 0,
+ _("variable %s-note slur without termination of previous slur"),
+ over_or_under(index));
+ return;
+ }
+
+ slur[index].var = ++tex_position_id;
+ parse_slur_shift(&(slur[index].shift));
+ slur[index].start = current_note;
+}
+
+static void end_var_slur(void)
+{
+ const int direction = letter_to_pitch_adjustment(
+ gabc_notes_determination_text[1]);
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+ char shift;
+
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(
+ _("cannot add a slur to something that is not a note"),
+ "end_var_slur", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (!slur[index].var || !slur[index].shift || !slur[index].start) {
+ gregorio_messagef("end_var_slur", VERBOSITY_ERROR, 0,
+ _("variable %s-note slur end without start"),
+ over_or_under(index));
+ return;
+ }
+
+ parse_slur_shift(&shift);
+
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%c}{1}"
+ "\\GreSlur{%d}{%d}{%c}{\\GreVarBraceLength{%hu}}{}{%d}",
+ slur[index].var, slur[index].shift,
+ slur[index].start->u.note.pitch + direction, direction,
+ slur[index].shift, slur[index].var,
+ current_note->u.note.pitch + direction);
+ gregorio_add_texverb_to_note(slur[index].start, gregorio_strdup(tempstr));
+
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%c}{2}", slur[index].var, shift);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+
+
+ slur[index].var = 0;
+ slur[index].shift = '\0';
+ slur[index].start = NULL;
+}
+
+static void left_bracket(void)
+{
+ if (left_bracket_texverb) {
+ gregorio_message(
+ _("cannot add a left bracket before closing the previous one"),
+ "left_bracket", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ /* when setting the left bracket, temporarily store the point-and-click
+ * information in the texverb */
+ if (notes_lloc.generate_point_and_click) {
+ gregorio_snprintf(tempstr, sizeof tempstr, "%u:%u:%u",
+ notes_lloc.first_line, notes_lloc.first_offset,
+ notes_lloc.first_column + 1);
+ } else {
+ tempstr[0] = '\0';
+ }
+ left_bracket_texverb = gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(tempstr), GRE_TEXVERB_GLYPH, &notes_lloc);
+ bracket_low_pitch = MAX_PITCH;
+ bracket_high_pitch = LOWEST_PITCH;
+}
+
+static void right_bracket(void)
+{
+ if (!left_bracket_texverb) {
+ gregorio_message(
+ _("cannot add a right bracket without a matching left bracket"),
+ "right_bracket", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (bracket_high_pitch < bracket_low_pitch) {
+ gregorio_message(
+ _("cannot add brackets without notes between them"),
+ "right_bracket", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ gregorio_snprintf(tempstr, sizeof tempstr, "\\GreBracket{0}{%d}{%d}{%s}",
+ bracket_low_pitch, bracket_high_pitch,
+ gregorio_texverb(left_bracket_texverb));
+ gregorio_change_texverb(left_bracket_texverb, gregorio_strdup(tempstr));
+
+ if (notes_lloc.generate_point_and_click) {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreBracket{1}{%d}{%d}{%u:%u:%u}", bracket_low_pitch,
+ bracket_high_pitch, notes_lloc.first_line,
+ notes_lloc.first_offset, notes_lloc.first_column + 1);
+ } else {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreBracket{1}{%d}{%d}{}", bracket_low_pitch,
+ bracket_high_pitch);
+ }
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+
+ left_bracket_texverb = 0;
+}
+
+static void parse_hepisema_adjustment(void)
+{
+ /* See https://github.com/gregorio-project/gregorio/issues/872
+ *
+ * [xh:yzw]
+ *
+ * - x is o(ver) or u(under)
+ * - y is optional and is
+ * - l for low in the space (chooses ol or ul depending on x)
+ * - m for middle of the space
+ * - h for high in the space (chooses oh or uh depending on x)
+ * - ol for low in the space as if the episema were over the note
+ * - oh for high in the space as if the episema were over the note
+ * - ul for low in the space as if the episema were under the note
+ * - uh for high in the space as if the episema were under the note
+ * - z is an optional nudge and must start with + or -
+ * - w is optional and may be { to start a range or } to end a range.
+ *
+ * at least one of y, z, or w must be provided
+ * if y and z are omitted, the : may be omitted
+ * y and z are not permitted when w is }
+ */
+
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+ gregorio_sign_orientation det_index = index;
+ char *ch = gabc_notes_determination_text + 3;
+ gregorio_hepisema_vbasepos vbasepos = HVB_AUTO;
+ char *nudge = NULL;
+ char save;
+ short hepisema_adjustment_id;
+
+ if (he_adjustment_index[index]) {
+ gregorio_messagef("parse_hepisema_adustment", VERBOSITY_ERROR, 0,
+ _("horizontal %s-episema adjustment start before ending the "
+ "previous adjustment"), over_or_under(index));
+ return;
+ }
+
+ if (*ch == ':') {
+ ++ch;
+ if (*ch == 'm') {
+ vbasepos = HVB_MIDDLE;
+ } else {
+ switch (*ch) {
+ case 'o':
+ ++ch;
+ det_index = SO_OVER;
+ break;
+ case 'u':
+ ++ch;
+ det_index = SO_UNDER;
+ break;
+ }
+
+ switch (*ch) {
+ case 'l':
+ switch (det_index) {
+ case SO_OVER:
+ vbasepos = HVB_O_LOW;
+ break;
+ case SO_UNDER:
+ vbasepos = HVB_U_LOW;
+ break;
+ }
+ break;
+ case 'h':
+ switch (det_index) {
+ case SO_OVER:
+ vbasepos = HVB_O_HIGH;
+ break;
+ case SO_UNDER:
+ vbasepos = HVB_U_HIGH;
+ break;
+ }
+ break;
+ }
+ }
+ if (vbasepos) {
+ ++ch;
+ }
+ if (*ch == '+' || *ch == '-') {
+ nudge = ch;
+ do {
+ ++ch;
+ } while (*ch && *ch != '{' && *ch != ']');
+ save = *ch;
+ *ch = '\0';
+ nudge = gregorio_strdup(nudge);
+ *ch = save;
+ }
+ }
+
+ hepisema_adjustment_id = gregorio_add_hepisema_adjustment(vbasepos, nudge);
+
+ if (*ch == '{') {
+ he_adjustment_index[index] = hepisema_adjustment_id;
+ } else {
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(_("cannot add a horizontal episema adjustment to "
+ "something that is not a note"),
+ "parse_hepisema_adjustment", VERBOSITY_ERROR, 0);
+ return;
+ }
+ current_note->he_adjustment_index[index] = hepisema_adjustment_id;
+ }
+}
+
+static void end_hepisema_adjustment(void)
+{
+ /* [xh:}]
+ * - x indicates l(ow) or h(igh) episema
+ * - : is optional
+ */
+
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+
+ if (!he_adjustment_index[index]) {
+ gregorio_messagef("end_hepisema_adustment", VERBOSITY_ERROR, 0,
+ _("horizontal %s-episema adjustment end with no matching "
+ "start"), over_or_under(index));
+ return;
+ }
+
+ he_adjustment_index[index] = 0;
+}
+
+void gabc_det_notes_finish(void)
+{
+ gregorio_sign_orientation orientation;
+ if (overbrace_var) {
+ gregorio_message(_("unclosed variable over-staff brace"),
+ "gabc_det_notes_finish", VERBOSITY_ERROR, 0);
+ overbrace_var = 0;
+ }
+ if (underbrace_var) {
+ gregorio_message(_("unclosed variable under-staff brace"),
+ "gabc_det_notes_finish", VERBOSITY_ERROR, 0);
+ underbrace_var = 0;
+ }
+ for (orientation = SO_OVER; orientation <= SO_UNDER; ++orientation) {
+ const char *name = over_or_under(orientation);
+ if (ledger_var[orientation]) {
+ gregorio_messagef("gabc_det_notes_finish", VERBOSITY_ERROR, 0,
+ _("unclosed variable %s-staff ledger line"), name);
+ ledger_var[orientation] = 0;
+ }
+ if (slur[orientation].var) {
+ gregorio_messagef("gabc_det_notes_finish", VERBOSITY_ERROR, 0,
+ _("unclosed variable %s-note slur"), name);
+ slur[orientation].var = 0;
+ slur[orientation].shift = '\0';
+ slur[orientation].start = NULL;
+ }
+ if (he_adjustment_index[orientation]) {
+ gregorio_messagef("gabc_det_notes_finish", VERBOSITY_ERROR, 0,
+ _("unclosed horizontal %s-episema adjustment"),
+ over_or_under(orientation));
+ ledger_var[orientation] = 0;
+ }
+ }
+ if (left_bracket_texverb) {
+ gregorio_message(_("unclosed left bracket"),
+ "gabc_det_notes_finish", VERBOSITY_ERROR, 0);
+ left_bracket_texverb = 0;
+ }
+}
+
+#line 12472 "gabc/gabc-notes-determination-l.c"
+
+#line 12474 "gabc/gabc-notes-determination-l.c"
+
+#define INITIAL 0
+#define texverbnote 1
+#define texverbglyph 2
+#define texverbelement 3
+#define choralsign 4
+#define choralnabc 5
+#define alt 6
+#define comments 7
+#define overbrace 8
+#define underbrace 9
+#define overcurlybrace 10
+#define overcurlyaccentusbrace 11
+#define space 12
+#define nbspace 13
+#define overledger 14
+#define overledger2 15
+#define underledger 16
+#define underledger2 17
+#define endledger 18
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals ( void );
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy ( void );
+
+int yyget_debug ( void );
+
+void yyset_debug ( int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra ( void );
+
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in ( void );
+
+void yyset_in ( FILE * _in_str );
+
+FILE *yyget_out ( void );
+
+void yyset_out ( FILE * _out_str );
+
+ int yyget_leng ( void );
+
+char *yyget_text ( void );
+
+int yyget_lineno ( void );
+
+void yyset_lineno ( int _line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap ( void );
+#else
+extern int yywrap ( void );
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy ( char *, const char *, int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen ( const char * );
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput ( void );
+#else
+static int input ( void );
+#endif
+
+#endif
+
+ static int yy_start_stack_ptr = 0;
+ static int yy_start_stack_depth = 0;
+ static int *yy_start_stack = NULL;
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ { \
+ int c = '*'; \
+ int n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else \
+ { \
+ errno=0; \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(yyin); \
+ } \
+ }\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK /*LINTED*/break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+
+ if ( !(yy_init) )
+ {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_load_buffer_state( );
+ }
+
+ {
+#line 782 "gabc/gabc-notes-determination.l"
+
+#line 12713 "gabc/gabc-notes-determination-l.c"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = (yy_c_buf_p);
+
+ /* Support of yytext. */
+ *yy_cp = (yy_hold_char);
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = (yy_start);
+yy_match:
+ while ( (yy_current_state = yy_nxt[yy_current_state][ YY_SC_TO_UI(*yy_cp) ]) > 0 )
+ {
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+
+ ++yy_cp;
+ }
+
+ yy_current_state = -yy_current_state;
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+
+ YY_DO_BEFORE_ACTION;
+
+do_action: /* This label is used only to access EOF actions. */
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = (yy_hold_char);
+ yy_cp = (yy_last_accepting_cpos) + 1;
+ yy_current_state = (yy_last_accepting_state);
+ goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 783 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(comments);
+ }
+ YY_BREAK
+case 2:
+/* rule 2 can match eol */
+YY_RULE_SETUP
+#line 786 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(INITIAL);
+ }
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 789 "gabc/gabc-notes-determination.l"
+{
+ /* ignored */
+ }
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 792 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(choralsign);
+ }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 795 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(choralnabc);
+ }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 798 "gabc/gabc-notes-determination.l"
+{
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ BEGIN(overbrace);
+ }
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 802 "gabc/gabc-notes-determination.l"
+{
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ BEGIN(underbrace);
+ }
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 806 "gabc/gabc-notes-determination.l"
+{
+ char_for_brace = gabc_notes_determination_text[5]-'0';
+ BEGIN(overcurlybrace);
+ }
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 810 "gabc/gabc-notes-determination.l"
+{
+ char_for_brace = gabc_notes_determination_text[6]-'0';
+ BEGIN(overcurlyaccentusbrace);
+ }
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 814 "gabc/gabc-notes-determination.l"
+{
+ if (overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace without termination of "
+ "previous overbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ overbrace_var = ++tex_position_id;
+ overbrace_var_kind = "ob";
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreOverBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}",
+ overbrace_var, char_for_brace, overbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 830 "gabc/gabc-notes-determination.l"
+{
+ if (underbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable underbrace without termination of "
+ "previous underbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ underbrace_var = ++tex_position_id;
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreUnderBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}",
+ underbrace_var, char_for_brace, underbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 845 "gabc/gabc-notes-determination.l"
+{
+ if (overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace without termination of "
+ "previous overbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[5]-'0';
+ overbrace_var = ++tex_position_id;
+ overbrace_var_kind = "ocb";
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreOverCurlyBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}{0}",
+ overbrace_var, char_for_brace, overbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 861 "gabc/gabc-notes-determination.l"
+{
+ if (overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace without termination of "
+ "previous overbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[6]-'0';
+ overbrace_var = ++tex_position_id;
+ overbrace_var_kind = "ocba";
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreOverCurlyBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}{1}",
+ overbrace_var, char_for_brace, overbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 877 "gabc/gabc-notes-determination.l"
+{
+ if (!overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace termination without "
+ "variable overbrace start"));
+ } else if (strcmp (overbrace_var_kind, "ob")) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace started with %s "
+ "and terminated with ob"),
+ overbrace_var_kind);
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", overbrace_var,
+ char_for_brace);
+ overbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 896 "gabc/gabc-notes-determination.l"
+{
+ if (!underbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable underbrace termination without "
+ "variable underbrace start"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", underbrace_var,
+ char_for_brace);
+ underbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 910 "gabc/gabc-notes-determination.l"
+{
+ if (!overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace termination without "
+ "variable overbrace start"));
+ } else if (strcmp (overbrace_var_kind, "ocb")) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace started with %s "
+ "and terminated with ocb"),
+ overbrace_var_kind);
+ } else {
+ char_for_brace = gabc_notes_determination_text[5]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", overbrace_var,
+ char_for_brace);
+ overbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 929 "gabc/gabc-notes-determination.l"
+{
+ if (!overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace termination without "
+ "variable overbrace start"));
+ } else if (strcmp (overbrace_var_kind, "ocba")) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace started with %s "
+ "and terminated with ocba"),
+ overbrace_var_kind);
+ } else {
+ char_for_brace = gabc_notes_determination_text[6]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", overbrace_var,
+ char_for_brace);
+ overbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 948 "gabc/gabc-notes-determination.l"
+{
+ if (notesmacros[gabc_notes_determination_text[3]-'0']) {
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[3]-'0']));
+ } else error();
+ }
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 954 "gabc/gabc-notes-determination.l"
+{
+ if (notesmacros[gabc_notes_determination_text[3]-'0']) {
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[3]-'0']),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ } else error();
+ }
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 961 "gabc/gabc-notes-determination.l"
+{
+ if (notesmacros[gabc_notes_determination_text[3]-'0']) {
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[3]-'0']),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ } else error();
+ }
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 968 "gabc/gabc-notes-determination.l"
+{
+ if (notesmacros[gabc_notes_determination_text[5]-'0']) {
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[5]-'0']),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ } else error();
+ }
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 975 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(texverbnote);
+ }
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 978 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(texverbglyph);
+ }
+ YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 981 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(texverbelement);
+ }
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 984 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(alt);
+ }
+ YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 987 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_nlba_as_note(&current_note, NLBA_BEGINNING, &notes_lloc);
+ }
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 990 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_nlba_as_note(&current_note, NLBA_END, &notes_lloc);
+ }
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 993 "gabc/gabc-notes-determination.l"
+{
+ gregorio_start_autofuse(&current_note, &notes_lloc);
+ }
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 996 "gabc/gabc-notes-determination.l"
+{
+ gregorio_end_autofuse(&current_note, &notes_lloc);
+ }
+ YY_BREAK
+case 30:
+/* rule 30 can match eol */
+YY_RULE_SETUP
+#line 999 "gabc/gabc-notes-determination.l"
+{
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreOverBrace{%s}{0pt}{0pt}{%d}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ YY_BREAK
+case 31:
+/* rule 31 can match eol */
+YY_RULE_SETUP
+#line 1005 "gabc/gabc-notes-determination.l"
+{
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreUnderBrace{%s}{0pt}{0pt}{%d}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ YY_BREAK
+case 32:
+/* rule 32 can match eol */
+YY_RULE_SETUP
+#line 1011 "gabc/gabc-notes-determination.l"
+{
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreOverCurlyBrace{%s}{0pt}{0pt}{%d}{0}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ YY_BREAK
+case 33:
+/* rule 33 can match eol */
+YY_RULE_SETUP
+#line 1017 "gabc/gabc-notes-determination.l"
+{
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreOverCurlyBrace{%s}{0pt}{0pt}{%d}{1}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ YY_BREAK
+case 34:
+/* rule 34 can match eol */
+YY_RULE_SETUP
+#line 1023 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_cs_to_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text), false);
+ }
+ YY_BREAK
+case 35:
+/* rule 35 can match eol */
+YY_RULE_SETUP
+#line 1027 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_cs_to_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text), true);
+ }
+ YY_BREAK
+case 36:
+/* rule 36 can match eol */
+YY_RULE_SETUP
+#line 1031 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_texverb_to_note(current_note,
+ gregorio_strdup(gabc_notes_determination_text));
+ }
+ YY_BREAK
+case 37:
+/* rule 37 can match eol */
+YY_RULE_SETUP
+#line 1035 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ }
+ YY_BREAK
+case 38:
+/* rule 38 can match eol */
+YY_RULE_SETUP
+#line 1040 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ }
+ YY_BREAK
+case 39:
+/* rule 39 can match eol */
+YY_RULE_SETUP
+#line 1045 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text), GRE_ALT,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 1050 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(space);
+ }
+ YY_BREAK
+case 41:
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 1053 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_AD_HOC_SPACE,
+ gregorio_strdup(gabc_notes_determination_text), &notes_lloc);
+ }
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 1057 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(nbspace);
+ }
+ YY_BREAK
+case 43:
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 1060 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_AD_HOC_SPACE_NB,
+ gregorio_strdup(gabc_notes_determination_text), &notes_lloc);
+ }
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 1064 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(high, EXPLICITLY_DRAWN, true);
+ }
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 1067 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(high, EXPLICITLY_DRAWN, false);
+ }
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 1070 "gabc/gabc-notes-determination.l"
+{
+ end_variable_ledger(SO_OVER);
+ }
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 1073 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(overledger);
+ }
+ YY_BREAK
+case 48:
+/* rule 48 can match eol */
+YY_RULE_SETUP
+#line 1076 "gabc/gabc-notes-determination.l"
+{
+ save_before_ledger(gabc_notes_determination_text);
+ BEGIN(overledger2);
+ }
+ YY_BREAK
+case 49:
+/* rule 49 can match eol */
+YY_RULE_SETUP
+#line 1080 "gabc/gabc-notes-determination.l"
+{
+ add_static_ledger(SO_OVER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+ YY_BREAK
+case 50:
+/* rule 50 can match eol */
+YY_RULE_SETUP
+#line 1084 "gabc/gabc-notes-determination.l"
+{
+ add_variable_ledger(SO_OVER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+ YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 1088 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(low, EXPLICITLY_DRAWN, true);
+ }
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 1091 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(low, EXPLICITLY_DRAWN, false);
+ }
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 1094 "gabc/gabc-notes-determination.l"
+{
+ end_variable_ledger(SO_UNDER);
+ }
+ YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 1097 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(underledger);
+ }
+ YY_BREAK
+case 55:
+/* rule 55 can match eol */
+YY_RULE_SETUP
+#line 1100 "gabc/gabc-notes-determination.l"
+{
+ save_before_ledger(gabc_notes_determination_text);
+ BEGIN(underledger2);
+ }
+ YY_BREAK
+case 56:
+/* rule 56 can match eol */
+YY_RULE_SETUP
+#line 1104 "gabc/gabc-notes-determination.l"
+{
+ add_static_ledger(SO_UNDER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+ YY_BREAK
+case 57:
+/* rule 57 can match eol */
+YY_RULE_SETUP
+#line 1108 "gabc/gabc-notes-determination.l"
+{
+ add_variable_ledger(SO_UNDER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+ YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 1112 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(INITIAL);
+ }
+ YY_BREAK
+case 59:
+/* rule 59 can match eol */
+YY_RULE_SETUP
+#line 1115 "gabc/gabc-notes-determination.l"
+{
+ parse_slur();
+ }
+ YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 1118 "gabc/gabc-notes-determination.l"
+{
+ start_var_slur();
+ }
+ YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 1121 "gabc/gabc-notes-determination.l"
+{
+ end_var_slur();
+ }
+ YY_BREAK
+case 62:
+/* rule 62 can match eol */
+YY_RULE_SETUP
+#line 1128 "gabc/gabc-notes-determination.l"
+{
+ parse_hepisema_adjustment();
+ }
+ YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 1131 "gabc/gabc-notes-determination.l"
+{
+ end_hepisema_adjustment();
+ }
+ YY_BREAK
+case 64:
+YY_RULE_SETUP
+#line 1134 "gabc/gabc-notes-determination.l"
+{
+ left_bracket();
+ }
+ YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 1137 "gabc/gabc-notes-determination.l"
+{
+ right_bracket();
+ }
+ YY_BREAK
+case 66:
+YY_RULE_SETUP
+#line 1140 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup("\\hbox to 0pt{"), GRE_TEXVERB_ELEMENT,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 67:
+YY_RULE_SETUP
+#line 1145 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup("\\hss%\n}%\n\\GreNoBreak\\relax "),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ }
+ YY_BREAK
+case 68:
+YY_RULE_SETUP
+#line 1150 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_manual_custos_as_note(&current_note,
+ pitch_letter_to_height(gabc_notes_determination_text[0]),
+ &notes_lloc);
+ }
+ YY_BREAK
+case 69:
+/* rule 69 can match eol */
+YY_RULE_SETUP
+#line 1155 "gabc/gabc-notes-determination.l"
+/* ignore ends of line and tabs */;
+ YY_BREAK
+case 70:
+YY_RULE_SETUP
+#line 1156 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_suppress_custos_as_note(&current_note, &notes_lloc);
+ }
+ YY_BREAK
+case 71:
+YY_RULE_SETUP
+#line 1159 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_custos_as_note(&current_note, &notes_lloc);
+ }
+ YY_BREAK
+case 72:
+YY_RULE_SETUP
+#line 1162 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_end_of_line_as_note(&current_note, false, false, false,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 73:
+YY_RULE_SETUP
+#line 1166 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_end_of_line_as_note(&current_note, false, true, true,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 1170 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_end_of_line_as_note(&current_note, false, true, false,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 75:
+YY_RULE_SETUP
+#line 1174 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_end_of_line_as_note(&current_note, true, false, false,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 76:
+YY_RULE_SETUP
+#line 1178 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_end_of_line_as_note(&current_note, true, true, true,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 1182 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_end_of_line_as_note(&current_note, true, true, false,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 78:
+YY_RULE_SETUP
+#line 1186 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_clef_as_note(&current_note,
+ letter_to_clef(gabc_notes_determination_text[0]),
+ parse_clef_line(gabc_notes_determination_text[1]), false,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 79:
+YY_RULE_SETUP
+#line 1192 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_clef_as_note(&current_note,
+ letter_to_clef(gabc_notes_determination_text[0]),
+ parse_clef_line(gabc_notes_determination_text[2]), true,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 80:
+YY_RULE_SETUP
+#line 1198 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_secondary_clef_to_note(current_note,
+ letter_to_clef(gabc_notes_determination_text[1]),
+ parse_clef_line(gabc_notes_determination_text[2]), false);
+ }
+ YY_BREAK
+case 81:
+YY_RULE_SETUP
+#line 1203 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_secondary_clef_to_note(current_note,
+ letter_to_clef(gabc_notes_determination_text[1]),
+ parse_clef_line(gabc_notes_determination_text[3]), true);
+ }
+ YY_BREAK
+case 82:
+YY_RULE_SETUP
+#line 1208 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_VIRGULA);
+ }
+ YY_BREAK
+case 83:
+YY_RULE_SETUP
+#line 1211 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_VIRGULA_HIGH);
+ }
+ YY_BREAK
+case 84:
+YY_RULE_SETUP
+#line 1214 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MINIMIS);
+ }
+ YY_BREAK
+case 85:
+YY_RULE_SETUP
+#line 1217 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MINIMIS_HIGH);
+ }
+ YY_BREAK
+case 86:
+YY_RULE_SETUP
+#line 1220 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MINIMA);
+ }
+ YY_BREAK
+case 87:
+YY_RULE_SETUP
+#line 1223 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MINIMA_HIGH);
+ }
+ YY_BREAK
+case 88:
+YY_RULE_SETUP
+#line 1226 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(parse_dominican_bar(gabc_notes_determination_text[1]));
+ }
+ YY_BREAK
+case 89:
+YY_RULE_SETUP
+#line 1229 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MINOR);
+ }
+ YY_BREAK
+case 90:
+YY_RULE_SETUP
+#line 1232 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MAIOR);
+ }
+ YY_BREAK
+case 91:
+YY_RULE_SETUP
+#line 1235 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_FINALIS);
+ }
+ YY_BREAK
+case 92:
+YY_RULE_SETUP
+#line 1238 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MAIOR_DOTTED);
+ }
+ YY_BREAK
+case 93:
+YY_RULE_SETUP
+#line 1241 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_cavum(current_note);
+ }
+ YY_BREAK
+case 94:
+YY_RULE_SETUP
+#line 1244 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_LINEA_PUNCTUM,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 95:
+YY_RULE_SETUP
+#line 1248 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_LINEA_PUNCTUM,
+ legacy_oriscus_orientation);
+ gregorio_add_cavum(current_note);
+ }
+ YY_BREAK
+case 96:
+YY_RULE_SETUP
+#line 1253 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _ACCENTUS);
+ }
+ YY_BREAK
+case 97:
+YY_RULE_SETUP
+#line 1256 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _ACCENTUS_REVERSUS);
+ }
+ YY_BREAK
+case 98:
+YY_RULE_SETUP
+#line 1259 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _CIRCULUS);
+ }
+ YY_BREAK
+case 99:
+YY_RULE_SETUP
+#line 1262 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _SEMI_CIRCULUS);
+ }
+ YY_BREAK
+case 100:
+YY_RULE_SETUP
+#line 1265 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _SEMI_CIRCULUS_REVERSUS);
+ }
+ YY_BREAK
+case 101:
+YY_RULE_SETUP
+#line 1268 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _MUSICA_FICTA_FLAT);
+ }
+ YY_BREAK
+case 102:
+YY_RULE_SETUP
+#line 1271 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _MUSICA_FICTA_NATURAL);
+ }
+ YY_BREAK
+case 103:
+YY_RULE_SETUP
+#line 1274 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _MUSICA_FICTA_SHARP);
+ }
+ YY_BREAK
+case 104:
+YY_RULE_SETUP
+#line 1277 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_FLAT, legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 105:
+YY_RULE_SETUP
+#line 1280 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_SHARP,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 106:
+YY_RULE_SETUP
+#line 1284 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_NATURAL,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 107:
+YY_RULE_SETUP
+#line 1288 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_HALF_SPACE, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 108:
+YY_RULE_SETUP
+#line 1292 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_INTERGLYPH_SPACE, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 109:
+YY_RULE_SETUP
+#line 1296 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 110:
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 1300 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 111:
+YY_RULE_SETUP
+#line 1304 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_LARGER_SPACE, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 112:
+YY_RULE_SETUP
+#line 1308 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_GLYPH_SPACE, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 113:
+YY_RULE_SETUP
+#line 1312 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT_NB, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 114:
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 1316 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT_NB, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 115:
+YY_RULE_SETUP
+#line 1320 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_LARGER_SPACE_NB, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 116:
+YY_RULE_SETUP
+#line 1324 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_GLYPH_SPACE_NB, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 117:
+/* rule 117 can match eol */
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+YY_LINENO_REWIND_TO(yy_bp + 1);
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 1328 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_ZERO_WIDTH, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 118:
+YY_RULE_SETUP
+#line 1332 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_LINEA,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 119:
+YY_RULE_SETUP
+#line 1336 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_BIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 120:
+YY_RULE_SETUP
+#line 1339 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_TRIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 121:
+YY_RULE_SETUP
+#line 1342 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_BIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 122:
+YY_RULE_SETUP
+#line 1345 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_TRIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 123:
+YY_RULE_SETUP
+#line 1348 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_DISTROPHA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 124:
+YY_RULE_SETUP
+#line 1351 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_DISTROPHA, _NO_SIGN, L_AUCTUS_ASCENDENS);
+ }
+ YY_BREAK
+case 125:
+YY_RULE_SETUP
+#line 1354 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_TRISTROPHA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 126:
+YY_RULE_SETUP
+#line 1357 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_TRISTROPHA, _NO_SIGN, L_AUCTUS_ASCENDENS);
+ }
+ YY_BREAK
+case 127:
+YY_RULE_SETUP
+#line 1360 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_PUNCTUM, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 128:
+YY_RULE_SETUP
+#line 1363 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(1, S_PUNCTUM, _NO_SIGN, L_INITIO_DEBILIS);
+ }
+ YY_BREAK
+case 129:
+YY_RULE_SETUP
+#line 1366 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(1, S_PUNCTUM, _NO_SIGN, L_FUSED);
+ }
+ YY_BREAK
+case 130:
+YY_RULE_SETUP
+#line 1369 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, punctum_inclinatum(gabc_notes_determination_text[1]),
+ _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 131:
+YY_RULE_SETUP
+#line 1373 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(1, punctum_inclinatum(gabc_notes_determination_text[2]),
+ _NO_SIGN, L_INITIO_DEBILIS);
+ }
+ YY_BREAK
+case 132:
+YY_RULE_SETUP
+#line 1377 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(1, punctum_inclinatum(gabc_notes_determination_text[2]),
+ _NO_SIGN, L_FUSED);
+ }
+ YY_BREAK
+case 133:
+YY_RULE_SETUP
+#line 1381 "gabc/gabc-notes-determination.l"
+{
+ add_sign(_V_EPISEMA);
+ }
+ YY_BREAK
+case 134:
+YY_RULE_SETUP
+#line 1384 "gabc/gabc-notes-determination.l"
+{
+ add_h_episema();
+ }
+ YY_BREAK
+case 135:
+YY_RULE_SETUP
+#line 1387 "gabc/gabc-notes-determination.l"
+{
+ add_sign(_PUNCTUM_MORA);
+ }
+ YY_BREAK
+case 136:
+YY_RULE_SETUP
+#line 1390 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_tail_liquescentia(current_note, L_DEMINUTUS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 137:
+YY_RULE_SETUP
+#line 1394 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_tail_liquescentia(current_note, L_AUCTUS_DESCENDENS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 138:
+YY_RULE_SETUP
+#line 1398 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_tail_liquescentia(current_note, L_AUCTUS_ASCENDENS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 139:
+YY_RULE_SETUP
+#line 1402 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_QUADRATUM,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 140:
+YY_RULE_SETUP
+#line 1406 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_ORISCUS_UNDETERMINED,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 141:
+YY_RULE_SETUP
+#line 1410 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_ORISCUS_DESCENDENS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 142:
+YY_RULE_SETUP
+#line 1414 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_ORISCUS_ASCENDENS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 143:
+YY_RULE_SETUP
+#line 1418 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_ORISCUS_SCAPUS_UNDETERMINED,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 144:
+YY_RULE_SETUP
+#line 1422 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_ORISCUS_SCAPUS_DESCENDENS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 145:
+YY_RULE_SETUP
+#line 1426 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_ORISCUS_SCAPUS_ASCENDENS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 146:
+YY_RULE_SETUP
+#line 1430 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_QUILISMA,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 147:
+YY_RULE_SETUP
+#line 1434 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_QUILISMA_QUADRATUM,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 148:
+YY_RULE_SETUP
+#line 1438 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_VIRGA,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 149:
+YY_RULE_SETUP
+#line 1442 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_VIRGA_REVERSA,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 150:
+YY_RULE_SETUP
+#line 1446 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_STROPHA,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 151:
+YY_RULE_SETUP
+#line 1450 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(high, EXPLICIT, true);
+ }
+ YY_BREAK
+case 152:
+YY_RULE_SETUP
+#line 1453 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(high, EXPLICIT, false);
+ }
+ YY_BREAK
+case 153:
+YY_RULE_SETUP
+#line 1456 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(low, EXPLICIT, true);
+ }
+ YY_BREAK
+case 154:
+YY_RULE_SETUP
+#line 1459 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(low, EXPLICIT, false);
+ }
+ YY_BREAK
+case 155:
+/* rule 155 can match eol */
+YY_RULE_SETUP
+#line 1462 "gabc/gabc-notes-determination.l"
+{
+ gregorio_messagef("det_notes_from_string", VERBOSITY_ERROR, 0,
+ _("unrecognized character: \"%c\""),
+ gabc_notes_determination_text[0]);
+ }
+ YY_BREAK
+case 156:
+YY_RULE_SETUP
+#line 1468 "gabc/gabc-notes-determination.l"
+ECHO;
+ YY_BREAK
+#line 14101 "gabc/gabc-notes-determination-l.c"
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(texverbnote):
+case YY_STATE_EOF(texverbglyph):
+case YY_STATE_EOF(texverbelement):
+case YY_STATE_EOF(choralsign):
+case YY_STATE_EOF(choralnabc):
+case YY_STATE_EOF(alt):
+case YY_STATE_EOF(comments):
+case YY_STATE_EOF(overbrace):
+case YY_STATE_EOF(underbrace):
+case YY_STATE_EOF(overcurlybrace):
+case YY_STATE_EOF(overcurlyaccentusbrace):
+case YY_STATE_EOF(space):
+case YY_STATE_EOF(nbspace):
+case YY_STATE_EOF(overledger):
+case YY_STATE_EOF(overledger2):
+case YY_STATE_EOF(underledger):
+case YY_STATE_EOF(underledger2):
+case YY_STATE_EOF(endledger):
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between YY_CURRENT_BUFFER and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = (yy_c_buf_p);
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( yywrap( ) )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of user's declarations */
+} /* end of yylex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
+ int ret_val;
+
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+ else
+ {
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+
+ int yy_c_buf_p_offset =
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = NULL;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ if ( (yy_n_chars) == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
+ }
+
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+ static yy_state_type yy_get_previous_state (void)
+{
+ yy_state_type yy_current_state;
+ char *yy_cp;
+
+ yy_current_state = (yy_start);
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ {
+ if ( *yy_cp )
+ {
+ yy_current_state = yy_nxt[yy_current_state][YY_SC_TO_UI(*yy_cp)];
+ }
+ else
+ yy_current_state = yy_NUL_trans[yy_current_state];
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ }
+
+ return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
+
+ yy_current_state = yy_NUL_trans[yy_current_state];
+ yy_is_jam = (yy_current_state == 0);
+
+ if ( ! yy_is_jam )
+ {
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ }
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+#ifndef YY_NO_UNPUT
+
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+ static int yyinput (void)
+#else
+ static int input (void)
+#endif
+
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
+
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ /* This was really a NUL. */
+ *(yy_c_buf_p) = '\0';
+
+ else
+ { /* need more input */
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+ ++(yy_c_buf_p);
+
+ switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap( ) )
+ return 0;
+
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ (yy_hold_char) = *++(yy_c_buf_p);
+
+ return c;
+}
+#endif /* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void yyrestart (FILE * input_file )
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
+ return;
+
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ yy_load_buffer_state( );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void yy_load_buffer_state (void)
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
+ if ( ! b )
+ return;
+
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yyfree( (void *) b->yy_ch_buf );
+
+ yyfree( (void *) b );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+
+{
+ int oerrno = errno;
+
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+ void yy_flush_buffer (YY_BUFFER_STATE b )
+{
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == YY_CURRENT_BUFFER )
+ yy_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+ if (new_buffer == NULL)
+ return;
+
+ yyensure_buffer_stack();
+
+ /* This block is copied from yy_switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+void yypop_buffer_state (void)
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+ }
+}
+
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+ yy_size_t num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
+
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+{
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return NULL;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = NULL;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
+{
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
+{
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
+
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yynoreturn yy_fatal_error (const char* msg )
+{
+ fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
+
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
+
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
+
+/** Get the length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
+
+/** Get the current token.
+ *
+ */
+
+char *yyget_text (void)
+{
+ return yytext;
+}
+
+/** Set the current line number.
+ * @param _line_number line number
+ *
+ */
+void yyset_lineno (int _line_number )
+{
+
+ yylineno = _line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param _in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE * _in_str )
+{
+ yyin = _in_str ;
+}
+
+void yyset_out (FILE * _out_str )
+{
+ yyout = _out_str ;
+}
+
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
+
+void yyset_debug (int _bdebug )
+{
+ yy_flex_debug = _bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ (yy_buffer_stack) = NULL;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = NULL;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+ (yy_start_stack_ptr) = 0;
+ (yy_start_stack_depth) = 0;
+ (yy_start_stack) = NULL;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
+#else
+ yyin = NULL;
+ yyout = NULL;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ yy_delete_buffer( YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ yypop_buffer_state();
+ }
+
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+
+ /* Destroy the start condition stack. */
+ yyfree( (yy_start_stack) );
+ (yy_start_stack) = NULL;
+
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+
+ return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
+{
+
+ int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (const char * s )
+{
+ int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *yyalloc (yy_size_t size )
+{
+ return malloc(size);
+}
+
+void *yyrealloc (void * ptr, yy_size_t size )
+{
+
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return realloc(ptr, size);
+}
+
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 1468 "gabc/gabc-notes-determination.l"
+
+
+gregorio_note *gabc_det_notes_from_string(char *str, char *newmacros[10],
+ gregorio_scanner_location *loc, const gregorio_score *const score)
+{
+ int i;
+ YY_BUFFER_STATE buf;
+
+ notes_lloc.first_line = loc->first_line;
+ notes_lloc.first_column = loc->first_column;
+ notes_lloc.first_offset = loc->first_offset;
+ /* yes... I do mean to set values from loc->first_* */
+ notes_lloc.last_line = loc->first_line;
+ notes_lloc.last_column = loc->first_column;
+ notes_lloc.last_offset = loc->first_offset;
+ notes_lloc.generate_point_and_click = loc->generate_point_and_click;
+
+ staff_lines = score->staff_lines;
+ highest_pitch = score->highest_pitch;
+ high_ledger_line_pitch = score->high_ledger_line_pitch;
+ legacy_oriscus_orientation = score->legacy_oriscus_orientation;
+
+ /* a small optimization could uccur here: we could do it only once at the
+ * beginning of the score, not at each syllable */
+ for (i = 0; i < 10; i++) {
+ notesmacros[i] = newmacros[i];
+ }
+ nbof_isolated_episema = 0;
+ current_note = NULL;
+ buf = yy_scan_string(str);
+ yylex();
+ yy_flush_buffer(buf);
+ yy_delete_buffer(buf);
+ gregorio_go_to_first_note(&current_note);
+ return current_note;
+}
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination.l b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination.l
new file mode 100644
index 00000000000..d19e53f51ae
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination.l
@@ -0,0 +1,1503 @@
+%{
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the note parser.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <ctype.h> /* for tolower */
+#include "bool.h"
+#include "struct.h"
+#include "messages.h"
+#include "support.h"
+
+#include "gabc.h"
+
+#define YY_NO_INPUT
+
+#define YY_USER_ACTION gabc_update_location(&notes_lloc, \
+ gabc_notes_determination_text, gabc_notes_determination_leng);
+
+static gregorio_scanner_location notes_lloc;
+static gregorio_note *current_note;
+static char char_for_brace;
+static unsigned int nbof_isolated_episema;
+static char *notesmacros[10];
+static char tempstr[256];
+static unsigned short overbrace_var = 0, underbrace_var = 0;
+static const char *overbrace_var_kind;
+static int before_ledger_type;
+static char *before_ledger_length = NULL;
+static unsigned short ledger_var[2] = { 0, 0 };
+static unsigned char staff_lines;
+static signed char highest_pitch;
+static signed char high_ledger_line_pitch;
+static bool legacy_oriscus_orientation;
+static unsigned short he_adjustment_index[2] = { 0, 0 };
+static signed char bracket_low_pitch, bracket_high_pitch;
+static unsigned short left_bracket_texverb = 0;
+
+#define LEDGER(WHICH, SPECIFICITY, VALUE) \
+ if (LEDGER_##SPECIFICITY > current_note->WHICH##_ledger_specificity) { \
+ current_note->WHICH##_ledger_line = VALUE; \
+ current_note->WHICH##_ledger_specificity = LEDGER_##SPECIFICITY; \
+ }
+
+typedef struct slur_info {
+ unsigned short var;
+ char shift;
+ gregorio_note *start;
+} slur_info;
+
+static slur_info slur[2] = { { 0, '\0', NULL }, { 0, '\0', NULL } };
+
+static __inline gregorio_sign_orientation letter_to_sign_orientation(
+ const char letter) {
+ switch (letter) {
+ case 'u': /* "u"under */
+ return SO_UNDER;
+ case 'o': /* "o"ver */
+ return SO_OVER;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(letter_to_sign_orientation,
+ "invalid sign orientation letter: %c", letter);
+ return SO_OVER;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline int letter_to_pitch_adjustment(const char letter) {
+ switch (letter_to_sign_orientation(letter)) {
+ case SO_OVER:
+ return 1;
+ case SO_UNDER:
+ return -1;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(letter_to_pitch_adjustment,
+ "invalid sign orientation letter: %c", letter);
+ return 0;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline signed char pitch_letter_to_height(const char pitch) {
+ char result = pitch - 'a' + LOWEST_PITCH;
+ if (pitch == 'p') {
+ --result;
+ }
+ if (result > highest_pitch) {
+ gregorio_messagef("pitch_letter_to_height", VERBOSITY_ERROR, 0,
+ _("invalid pitch for %u lines: %c"), (unsigned int)staff_lines,
+ pitch);
+ }
+ if (left_bracket_texverb) {
+ if (result < bracket_low_pitch) {
+ bracket_low_pitch = result;
+ }
+ if (result > bracket_high_pitch) {
+ bracket_high_pitch = result;
+ }
+ }
+ return result;
+}
+
+static gregorio_shape punctum_inclinatum(const char orientation)
+{
+ switch (orientation) {
+ case '0':
+ return S_PUNCTUM_INCLINATUM_DESCENDENS;
+
+ case '2':
+ return S_PUNCTUM_INCLINATUM_STANS;
+
+ case '1':
+ return S_PUNCTUM_INCLINATUM_ASCENDENS;
+ }
+
+ return S_PUNCTUM_INCLINATUM_UNDETERMINED;
+}
+
+static __inline void lex_add_note(int i, gregorio_shape shape, char signs,
+ char liquescentia)
+{
+ signed char height = pitch_letter_to_height(tolower(
+ (unsigned char)gabc_notes_determination_text[i]));
+
+ nbof_isolated_episema = 0;
+ gregorio_add_note(&current_note, height, shape, signs, liquescentia, NULL,
+ &notes_lloc);
+ current_note->he_adjustment_index[SO_OVER] = he_adjustment_index[SO_OVER];
+ current_note->he_adjustment_index[SO_UNDER] = he_adjustment_index[SO_UNDER];
+
+ if (height >= high_ledger_line_pitch) {
+ LEDGER(high, DRAWN, true);
+ } else if (ledger_var[SO_OVER]) {
+ LEDGER(high, EXPLICIT, true);
+ }
+
+ if (height <= LOW_LEDGER_LINE_PITCH) {
+ LEDGER(low, DRAWN, true);
+ } else if (ledger_var[SO_UNDER]) {
+ LEDGER(low, EXPLICIT, true);
+ }
+}
+
+static __inline void add_bar_as_note(gregorio_bar bar)
+{
+ nbof_isolated_episema = 0;
+ gregorio_add_bar_as_note(&current_note, bar, &notes_lloc);
+}
+
+static __inline void error(void)
+{
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("undefined macro used: m%d"),
+ gabc_notes_determination_text[3] - '0');
+}
+
+static void add_h_episema(void)
+{
+ grehepisema_size size = H_NORMAL;
+ gregorio_vposition vposition = VPOS_AUTO;
+ bool disable_bridge = false;
+
+ char *ptr = gabc_notes_determination_text;
+ char current;
+ /* first character is the underscore */
+ while ((current = *(++ptr))) {
+ switch(current) {
+ case '0':
+ vposition = VPOS_BELOW;
+ break;
+ case '1':
+ vposition = VPOS_ABOVE;
+ break;
+ case '2':
+ disable_bridge = true;
+ break;
+ case '3':
+ size = H_SMALL_LEFT;
+ break;
+ case '4':
+ size = H_SMALL_CENTRE;
+ break;
+ case '5':
+ size = H_SMALL_RIGHT;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(gabc_notes_determination,
+ "unrecognized horizontal episema modifier: %c", current);
+ break;
+ /* LCOV_EXCL_STOP */
+ };
+ }
+
+ gregorio_add_h_episema(current_note, size, vposition, disable_bridge,
+ &nbof_isolated_episema);
+}
+
+static void add_sign(gregorio_sign sign)
+{
+ gregorio_vposition vposition = VPOS_AUTO;
+ switch(gabc_notes_determination_text[1]) {
+ case '0':
+ vposition = VPOS_BELOW;
+ break;
+ case '1':
+ vposition = VPOS_ABOVE;
+ break;
+ }
+ gregorio_add_sign(current_note, sign, vposition);
+}
+
+static void save_before_ledger(const char *const before_ledger)
+{
+ if (strcmp(before_ledger, "0") == 0) {
+ before_ledger_type = 0;
+ before_ledger_length = "";
+ } else if (strcmp(before_ledger, "1") == 0) {
+ before_ledger_type = 1;
+ before_ledger_length = "";
+ } else {
+ before_ledger_type = 2;
+ before_ledger_length = gregorio_strdup(before_ledger);
+ }
+}
+
+static void add_static_ledger(const gregorio_sign_orientation type,
+ const char *length) {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreDrawAdditionalLine{%d}{%s}{%d}{%s}{0}{}",
+ type, length + 1, before_ledger_type, before_ledger_length);
+
+ if (before_ledger_type == 2) {
+ free(before_ledger_length);
+ before_ledger_length = NULL;
+ }
+
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+}
+
+static __inline const char *over_or_under(
+ const gregorio_sign_orientation type) {
+ switch (type) {
+ case SO_OVER:
+ return "over";
+ case SO_UNDER:
+ return "under";
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(over_or_under, "invalid ledger type %d", type);
+ return "";
+ /* LCOV_EXCL_STOP */
+}
+
+static void add_variable_ledger(const gregorio_sign_orientation type,
+ const char *after_ledger)
+{
+ if (ledger_var[type]) {
+ const char *const typename = over_or_under(type);
+ gregorio_messagef("add_variable_ledger", VERBOSITY_ERROR, 0,
+ _("variable %s-staff ledger line without termination of "
+ "previous %s-staff ledger line"), typename, typename);
+ } else {
+ int after_ledger_type;
+ const char *after_ledger_length;
+
+ ++after_ledger;
+
+ if (strcmp(after_ledger, "0") == 0) {
+ after_ledger_type = 0;
+ after_ledger_length = "";
+ } else if (strcmp(after_ledger, "1") == 0) {
+ after_ledger_type = 1;
+ after_ledger_length = "";
+ } else {
+ after_ledger_type = 2;
+ after_ledger_length = after_ledger;
+ }
+
+ ledger_var[type] = ++tex_position_id;
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{0}{1}"
+ "\\GreDrawAdditionalLine{%d}{\\GreVarBraceLength{%hu}}"
+ "{%d}{%s}{%d}{%s}",
+ ledger_var[type], type, ledger_var[type], before_ledger_type,
+ before_ledger_length, after_ledger_type, after_ledger_length);
+
+ if (before_ledger_type == 2) {
+ free(before_ledger_length);
+ before_ledger_length = NULL;
+ }
+
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ }
+}
+
+static void end_variable_ledger(const gregorio_sign_orientation type)
+{
+ if (!ledger_var[type]) {
+ const char *const typename = over_or_under(type);
+ gregorio_messagef("end_variable_ledger", VERBOSITY_ERROR, 0,
+ _("variable %s-staff ledger line termination without variable "
+ "%s-staff ledger line start"), typename, typename);
+ } else {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{0}{2}", ledger_var[type]);
+ ledger_var[type] = 0;
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ }
+}
+
+static __inline int parse_clef_line(char line)
+{
+ line -= '0';
+ if (line < 0 || line > staff_lines) {
+ gregorio_messagef("parse_clef_line", VERBOSITY_ERROR, 0,
+ _("invalid clef line for %u lines: %d"),
+ (unsigned int)staff_lines, (int)line);
+ return 1;
+ }
+ return line;
+}
+
+static __inline gregorio_bar parse_dominican_bar(char bar)
+{
+ bar -= '0';
+ if (bar < 1 || bar > (2 * (staff_lines - 1))) {
+ gregorio_messagef("parse_dominican_line", VERBOSITY_ERROR, 0,
+ _("invalid Dominican bar for %u lines: ;%d"),
+ (unsigned int)staff_lines, (int)bar);
+ }
+
+ switch (bar) {
+ case 1:
+ return B_DIVISIO_MINOR_D1;
+ case 2:
+ return B_DIVISIO_MINOR_D2;
+ case 3:
+ return B_DIVISIO_MINOR_D3;
+ case 4:
+ return B_DIVISIO_MINOR_D4;
+ case 5:
+ return B_DIVISIO_MINOR_D5;
+ case 6:
+ return B_DIVISIO_MINOR_D6;
+ case 7:
+ return B_DIVISIO_MINOR_D7;
+ case 8:
+ return B_DIVISIO_MINOR_D8;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(check_dominican_line, "invalid dominican bar: %d", (int)bar);
+ return B_NO_BAR;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline gregorio_clef letter_to_clef(char letter)
+{
+ switch (letter) {
+ case 'c':
+ return CLEF_C;
+ case 'f':
+ return CLEF_F;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(letter_to_clef, "invalid clef: %c", letter);
+ return CLEF_C;
+ /* LCOV_EXCL_STOP */
+}
+
+/* this assertion should only fail if the lex rules are incorrect */
+static __inline void slur_assert(char *fn, bool test) {
+ if (!test) {
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("invalid slur text"), fn, VERBOSITY_FATAL, 0);
+ exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static char *parse_slur_shift(char *shift)
+{
+ char *c;
+
+ c = strchr(gabc_notes_determination_text, ':');
+ slur_assert("parse_slur_shift", c != NULL);
+ slur_assert("parse_slur_shift", *(++c) != '\0');
+ *shift = *c;
+ return c;
+}
+
+static void parse_slur(void)
+{
+ const int direction = letter_to_pitch_adjustment(
+ gabc_notes_determination_text[1]);
+ char shift, *width, *height, *end;
+
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(
+ _("cannot add a slur to something that is not a note"),
+ "parse_slur", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ end = parse_slur_shift(&shift);
+ width = strchr(end, ';');
+ slur_assert("parse_slur", width != NULL);
+ height = strchr(++width, ',');
+ slur_assert("parse_slur", height != NULL);
+ *height = '\0';
+ end = strchr(++height, ']');
+ slur_assert("parse_slur", end != NULL);
+ *end = '\0';
+
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreSlur{%d}{%d}{%c}{%s}{%s}{}",
+ current_note->u.note.pitch + direction, direction, shift, width,
+ height);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+}
+
+static void start_var_slur(void)
+{
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(
+ _("cannot add a slur to something that is not a note"),
+ "start_var_slur", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (slur[index].var) {
+ gregorio_messagef("start_var_slur", VERBOSITY_ERROR, 0,
+ _("variable %s-note slur without termination of previous slur"),
+ over_or_under(index));
+ return;
+ }
+
+ slur[index].var = ++tex_position_id;
+ parse_slur_shift(&(slur[index].shift));
+ slur[index].start = current_note;
+}
+
+static void end_var_slur(void)
+{
+ const int direction = letter_to_pitch_adjustment(
+ gabc_notes_determination_text[1]);
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+ char shift;
+
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(
+ _("cannot add a slur to something that is not a note"),
+ "end_var_slur", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (!slur[index].var || !slur[index].shift || !slur[index].start) {
+ gregorio_messagef("end_var_slur", VERBOSITY_ERROR, 0,
+ _("variable %s-note slur end without start"),
+ over_or_under(index));
+ return;
+ }
+
+ parse_slur_shift(&shift);
+
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%c}{1}"
+ "\\GreSlur{%d}{%d}{%c}{\\GreVarBraceLength{%hu}}{}{%d}",
+ slur[index].var, slur[index].shift,
+ slur[index].start->u.note.pitch + direction, direction,
+ slur[index].shift, slur[index].var,
+ current_note->u.note.pitch + direction);
+ gregorio_add_texverb_to_note(slur[index].start, gregorio_strdup(tempstr));
+
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%c}{2}", slur[index].var, shift);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+
+
+ slur[index].var = 0;
+ slur[index].shift = '\0';
+ slur[index].start = NULL;
+}
+
+static void left_bracket(void)
+{
+ if (left_bracket_texverb) {
+ gregorio_message(
+ _("cannot add a left bracket before closing the previous one"),
+ "left_bracket", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ /* when setting the left bracket, temporarily store the point-and-click
+ * information in the texverb */
+ if (notes_lloc.generate_point_and_click) {
+ gregorio_snprintf(tempstr, sizeof tempstr, "%u:%u:%u",
+ notes_lloc.first_line, notes_lloc.first_offset,
+ notes_lloc.first_column + 1);
+ } else {
+ tempstr[0] = '\0';
+ }
+ left_bracket_texverb = gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(tempstr), GRE_TEXVERB_GLYPH, &notes_lloc);
+ bracket_low_pitch = MAX_PITCH;
+ bracket_high_pitch = LOWEST_PITCH;
+}
+
+static void right_bracket(void)
+{
+ if (!left_bracket_texverb) {
+ gregorio_message(
+ _("cannot add a right bracket without a matching left bracket"),
+ "right_bracket", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (bracket_high_pitch < bracket_low_pitch) {
+ gregorio_message(
+ _("cannot add brackets without notes between them"),
+ "right_bracket", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ gregorio_snprintf(tempstr, sizeof tempstr, "\\GreBracket{0}{%d}{%d}{%s}",
+ bracket_low_pitch, bracket_high_pitch,
+ gregorio_texverb(left_bracket_texverb));
+ gregorio_change_texverb(left_bracket_texverb, gregorio_strdup(tempstr));
+
+ if (notes_lloc.generate_point_and_click) {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreBracket{1}{%d}{%d}{%u:%u:%u}", bracket_low_pitch,
+ bracket_high_pitch, notes_lloc.first_line,
+ notes_lloc.first_offset, notes_lloc.first_column + 1);
+ } else {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreBracket{1}{%d}{%d}{}", bracket_low_pitch,
+ bracket_high_pitch);
+ }
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+
+ left_bracket_texverb = 0;
+}
+
+static void parse_hepisema_adjustment(void)
+{
+ /* See https://github.com/gregorio-project/gregorio/issues/872
+ *
+ * [xh:yzw]
+ *
+ * - x is o(ver) or u(under)
+ * - y is optional and is
+ * - l for low in the space (chooses ol or ul depending on x)
+ * - m for middle of the space
+ * - h for high in the space (chooses oh or uh depending on x)
+ * - ol for low in the space as if the episema were over the note
+ * - oh for high in the space as if the episema were over the note
+ * - ul for low in the space as if the episema were under the note
+ * - uh for high in the space as if the episema were under the note
+ * - z is an optional nudge and must start with + or -
+ * - w is optional and may be { to start a range or } to end a range.
+ *
+ * at least one of y, z, or w must be provided
+ * if y and z are omitted, the : may be omitted
+ * y and z are not permitted when w is }
+ */
+
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+ gregorio_sign_orientation det_index = index;
+ char *ch = gabc_notes_determination_text + 3;
+ gregorio_hepisema_vbasepos vbasepos = HVB_AUTO;
+ char *nudge = NULL;
+ char save;
+ short hepisema_adjustment_id;
+
+ if (he_adjustment_index[index]) {
+ gregorio_messagef("parse_hepisema_adustment", VERBOSITY_ERROR, 0,
+ _("horizontal %s-episema adjustment start before ending the "
+ "previous adjustment"), over_or_under(index));
+ return;
+ }
+
+ if (*ch == ':') {
+ ++ch;
+ if (*ch == 'm') {
+ vbasepos = HVB_MIDDLE;
+ } else {
+ switch (*ch) {
+ case 'o':
+ ++ch;
+ det_index = SO_OVER;
+ break;
+ case 'u':
+ ++ch;
+ det_index = SO_UNDER;
+ break;
+ }
+
+ switch (*ch) {
+ case 'l':
+ switch (det_index) {
+ case SO_OVER:
+ vbasepos = HVB_O_LOW;
+ break;
+ case SO_UNDER:
+ vbasepos = HVB_U_LOW;
+ break;
+ }
+ break;
+ case 'h':
+ switch (det_index) {
+ case SO_OVER:
+ vbasepos = HVB_O_HIGH;
+ break;
+ case SO_UNDER:
+ vbasepos = HVB_U_HIGH;
+ break;
+ }
+ break;
+ }
+ }
+ if (vbasepos) {
+ ++ch;
+ }
+ if (*ch == '+' || *ch == '-') {
+ nudge = ch;
+ do {
+ ++ch;
+ } while (*ch && *ch != '{' && *ch != ']');
+ save = *ch;
+ *ch = '\0';
+ nudge = gregorio_strdup(nudge);
+ *ch = save;
+ }
+ }
+
+ hepisema_adjustment_id = gregorio_add_hepisema_adjustment(vbasepos, nudge);
+
+ if (*ch == '{') {
+ he_adjustment_index[index] = hepisema_adjustment_id;
+ } else {
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(_("cannot add a horizontal episema adjustment to "
+ "something that is not a note"),
+ "parse_hepisema_adjustment", VERBOSITY_ERROR, 0);
+ return;
+ }
+ current_note->he_adjustment_index[index] = hepisema_adjustment_id;
+ }
+}
+
+static void end_hepisema_adjustment(void)
+{
+ /* [xh:}]
+ * - x indicates l(ow) or h(igh) episema
+ * - : is optional
+ */
+
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+
+ if (!he_adjustment_index[index]) {
+ gregorio_messagef("end_hepisema_adustment", VERBOSITY_ERROR, 0,
+ _("horizontal %s-episema adjustment end with no matching "
+ "start"), over_or_under(index));
+ return;
+ }
+
+ he_adjustment_index[index] = 0;
+}
+
+void gabc_det_notes_finish(void)
+{
+ gregorio_sign_orientation orientation;
+ if (overbrace_var) {
+ gregorio_message(_("unclosed variable over-staff brace"),
+ "gabc_det_notes_finish", VERBOSITY_ERROR, 0);
+ overbrace_var = 0;
+ }
+ if (underbrace_var) {
+ gregorio_message(_("unclosed variable under-staff brace"),
+ "gabc_det_notes_finish", VERBOSITY_ERROR, 0);
+ underbrace_var = 0;
+ }
+ for (orientation = SO_OVER; orientation <= SO_UNDER; ++orientation) {
+ const char *name = over_or_under(orientation);
+ if (ledger_var[orientation]) {
+ gregorio_messagef("gabc_det_notes_finish", VERBOSITY_ERROR, 0,
+ _("unclosed variable %s-staff ledger line"), name);
+ ledger_var[orientation] = 0;
+ }
+ if (slur[orientation].var) {
+ gregorio_messagef("gabc_det_notes_finish", VERBOSITY_ERROR, 0,
+ _("unclosed variable %s-note slur"), name);
+ slur[orientation].var = 0;
+ slur[orientation].shift = '\0';
+ slur[orientation].start = NULL;
+ }
+ if (he_adjustment_index[orientation]) {
+ gregorio_messagef("gabc_det_notes_finish", VERBOSITY_ERROR, 0,
+ _("unclosed horizontal %s-episema adjustment"),
+ over_or_under(orientation));
+ ledger_var[orientation] = 0;
+ }
+ }
+ if (left_bracket_texverb) {
+ gregorio_message(_("unclosed left bracket"),
+ "gabc_det_notes_finish", VERBOSITY_ERROR, 0);
+ left_bracket_texverb = 0;
+ }
+}
+
+%}
+
+%option stack
+%option 8bit
+%option pointer
+%option nounput
+%option noyy_push_state
+%option noyy_pop_state
+%option noyy_top_state
+%option full
+%option noread
+%option nomain
+%option align
+%option noyylineno
+%option prefix="gabc_notes_determination_"
+%option noyywrap
+
+%x texverbnote
+%x texverbglyph
+%x texverbelement
+%x choralsign
+%x choralnabc
+%x alt
+%x comments
+%x overbrace
+%x underbrace
+%x overcurlybrace
+%x overcurlyaccentusbrace
+%x space
+%x nbspace
+%x overledger overledger2
+%x underledger underledger2
+%x endledger
+
+%%
+<INITIAL>\% {
+ BEGIN(comments);
+ }
+<comments>(\n|\r)+ {
+ BEGIN(INITIAL);
+ }
+<comments>[^\n\r]* {
+ /* ignored */
+ }
+<INITIAL>\[cs: {
+ BEGIN(choralsign);
+ }
+<INITIAL>\[cn: {
+ BEGIN(choralnabc);
+ }
+<INITIAL>\[ob:[01]; {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ BEGIN(overbrace);
+ }
+<INITIAL>\[ub:[01]; {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ BEGIN(underbrace);
+ }
+<INITIAL>\[ocb:[01]; {
+ char_for_brace = gabc_notes_determination_text[5]-'0';
+ BEGIN(overcurlybrace);
+ }
+<INITIAL>\[ocba:[01]; {
+ char_for_brace = gabc_notes_determination_text[6]-'0';
+ BEGIN(overcurlyaccentusbrace);
+ }
+<INITIAL>\[ob:[01]\{\] {
+ if (overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace without termination of "
+ "previous overbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ overbrace_var = ++tex_position_id;
+ overbrace_var_kind = "ob";
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreOverBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}",
+ overbrace_var, char_for_brace, overbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ub:[01]\{\] {
+ if (underbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable underbrace without termination of "
+ "previous underbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ underbrace_var = ++tex_position_id;
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreUnderBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}",
+ underbrace_var, char_for_brace, underbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ocb:[01]\{\] {
+ if (overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace without termination of "
+ "previous overbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[5]-'0';
+ overbrace_var = ++tex_position_id;
+ overbrace_var_kind = "ocb";
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreOverCurlyBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}{0}",
+ overbrace_var, char_for_brace, overbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ocba:[01]\{\] {
+ if (overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace without termination of "
+ "previous overbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[6]-'0';
+ overbrace_var = ++tex_position_id;
+ overbrace_var_kind = "ocba";
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreOverCurlyBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}{1}",
+ overbrace_var, char_for_brace, overbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ob:[01]\}\] {
+ if (!overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace termination without "
+ "variable overbrace start"));
+ } else if (strcmp (overbrace_var_kind, "ob")) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace started with %s "
+ "and terminated with ob"),
+ overbrace_var_kind);
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", overbrace_var,
+ char_for_brace);
+ overbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ub:[01]\}\] {
+ if (!underbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable underbrace termination without "
+ "variable underbrace start"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", underbrace_var,
+ char_for_brace);
+ underbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ocb:[01]\}\] {
+ if (!overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace termination without "
+ "variable overbrace start"));
+ } else if (strcmp (overbrace_var_kind, "ocb")) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace started with %s "
+ "and terminated with ocb"),
+ overbrace_var_kind);
+ } else {
+ char_for_brace = gabc_notes_determination_text[5]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", overbrace_var,
+ char_for_brace);
+ overbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ocba:[01]\}\] {
+ if (!overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace termination without "
+ "variable overbrace start"));
+ } else if (strcmp (overbrace_var_kind, "ocba")) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace started with %s "
+ "and terminated with ocba"),
+ overbrace_var_kind);
+ } else {
+ char_for_brace = gabc_notes_determination_text[6]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", overbrace_var,
+ char_for_brace);
+ overbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[nm[1-9]\] {
+ if (notesmacros[gabc_notes_determination_text[3]-'0']) {
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[3]-'0']));
+ } else error();
+ }
+<INITIAL>\[gm[1-9]\] {
+ if (notesmacros[gabc_notes_determination_text[3]-'0']) {
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[3]-'0']),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ } else error();
+ }
+<INITIAL>\[em[1-9]\] {
+ if (notesmacros[gabc_notes_determination_text[3]-'0']) {
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[3]-'0']),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ } else error();
+ }
+<INITIAL>\[altm[1-9]\] {
+ if (notesmacros[gabc_notes_determination_text[5]-'0']) {
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[5]-'0']),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ } else error();
+ }
+<INITIAL>\[nv: {
+ BEGIN(texverbnote);
+ }
+<INITIAL>\[gv: {
+ BEGIN(texverbglyph);
+ }
+<INITIAL>\[ev: {
+ BEGIN(texverbelement);
+ }
+<INITIAL>\[alt: {
+ BEGIN(alt);
+ }
+<INITIAL><nlba> {
+ gregorio_add_nlba_as_note(&current_note, NLBA_BEGINNING, &notes_lloc);
+ }
+<INITIAL><\/nlba> {
+ gregorio_add_nlba_as_note(&current_note, NLBA_END, &notes_lloc);
+ }
+<INITIAL>@\[ {
+ gregorio_start_autofuse(&current_note, &notes_lloc);
+ }
+<INITIAL>\] {
+ gregorio_end_autofuse(&current_note, &notes_lloc);
+ }
+<overbrace>[^\]]+ {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreOverBrace{%s}{0pt}{0pt}{%d}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+<underbrace>[^\]]+ {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreUnderBrace{%s}{0pt}{0pt}{%d}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+<overcurlybrace>[^\]]+ {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreOverCurlyBrace{%s}{0pt}{0pt}{%d}{0}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+<overcurlyaccentusbrace>[^\]]+ {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreOverCurlyBrace{%s}{0pt}{0pt}{%d}{1}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+<choralsign>[^\]]+ {
+ gregorio_add_cs_to_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text), false);
+ }
+<choralnabc>[^\]]+ {
+ gregorio_add_cs_to_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text), true);
+ }
+<texverbnote>[^\]]+ {
+ gregorio_add_texverb_to_note(current_note,
+ gregorio_strdup(gabc_notes_determination_text));
+ }
+<texverbglyph>[^\]]+ {
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ }
+<texverbelement>[^\]]+ {
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ }
+<alt>[^\]]+ {
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text), GRE_ALT,
+ &notes_lloc);
+ }
+<INITIAL>\/\[ {
+ BEGIN(space);
+ }
+<space>-?(\.[0-9]+|[0-9]+(\.[0-9]*)?)/\] {
+ gregorio_add_space_as_note(&current_note, SP_AD_HOC_SPACE,
+ gregorio_strdup(gabc_notes_determination_text), &notes_lloc);
+ }
+<INITIAL>!\/\[ {
+ BEGIN(nbspace);
+ }
+<nbspace>-?(\.[0-9]+|[0-9]+(\.[0-9]*)?)/\] {
+ gregorio_add_space_as_note(&current_note, SP_AD_HOC_SPACE_NB,
+ gregorio_strdup(gabc_notes_determination_text), &notes_lloc);
+ }
+<INITIAL>\[oll:1\] {
+ LEDGER(high, EXPLICITLY_DRAWN, true);
+ }
+<INITIAL>\[oll:0\] {
+ LEDGER(high, EXPLICITLY_DRAWN, false);
+ }
+<INITIAL>\[oll:\}\] {
+ end_variable_ledger(SO_OVER);
+ }
+<INITIAL>\[oll: {
+ BEGIN(overledger);
+ }
+<overledger>[^;{]+ {
+ save_before_ledger(gabc_notes_determination_text);
+ BEGIN(overledger2);
+ }
+<overledger2>;[^\]]+ {
+ add_static_ledger(SO_OVER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+<overledger2>\{[^\]]+ {
+ add_variable_ledger(SO_OVER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+<INITIAL>\[ull:1\] {
+ LEDGER(low, EXPLICITLY_DRAWN, true);
+ }
+<INITIAL>\[ull:0\] {
+ LEDGER(low, EXPLICITLY_DRAWN, false);
+ }
+<INITIAL>\[ull:\}\] {
+ end_variable_ledger(SO_UNDER);
+ }
+<INITIAL>\[ull: {
+ BEGIN(underledger);
+ }
+<underledger>[^;{]+ {
+ save_before_ledger(gabc_notes_determination_text);
+ BEGIN(underledger2);
+ }
+<underledger2>;[^\]]+ {
+ add_static_ledger(SO_UNDER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+<underledger2>\{[^\]]+ {
+ add_variable_ledger(SO_UNDER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+<texverbnote,texverbglyph,texverbelement,choralsign,choralnabc,alt,overcurlyaccentusbrace,overcurlybrace,overbrace,underbrace,space,nbspace,endledger>\] {
+ BEGIN(INITIAL);
+ }
+<INITIAL>\[[ou]slur:[012];[^,]+,[^\]]+\] {
+ parse_slur();
+ }
+<INITIAL>\[[ou]slur:[012]\{\] {
+ start_var_slur();
+ }
+<INITIAL>\[[ou]slur:[012]\}\] {
+ end_var_slur();
+ }
+<INITIAL>\[[ou]h(?x:
+ :(m|[ou]?[lh])\{?
+| :(m|[ou]?[lh])?[+-][^\]\{]+\{?
+| :?\{
+)\] {
+ parse_hepisema_adjustment();
+ }
+<INITIAL>\[[ou]h:?\}\] {
+ end_hepisema_adjustment();
+ }
+<INITIAL>\[\[ {
+ left_bracket();
+ }
+<INITIAL>\]\] {
+ right_bracket();
+ }
+\{ {
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup("\\hbox to 0pt{"), GRE_TEXVERB_ELEMENT,
+ &notes_lloc);
+ }
+\} {
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup("\\hss%\n}%\n\\GreNoBreak\\relax "),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ }
+[a-np]\+ {
+ gregorio_add_manual_custos_as_note(&current_note,
+ pitch_letter_to_height(gabc_notes_determination_text[0]),
+ &notes_lloc);
+ }
+[\t\r\n]+ /* ignore ends of line and tabs */;
+<INITIAL>\[nocustos\] {
+ gregorio_add_suppress_custos_as_note(&current_note, &notes_lloc);
+ }
+z0 {
+ gregorio_add_custos_as_note(&current_note, &notes_lloc);
+ }
+z {
+ gregorio_add_end_of_line_as_note(&current_note, false, false, false,
+ &notes_lloc);
+ }
+z\+ {
+ gregorio_add_end_of_line_as_note(&current_note, false, true, true,
+ &notes_lloc);
+ }
+z- {
+ gregorio_add_end_of_line_as_note(&current_note, false, true, false,
+ &notes_lloc);
+ }
+Z {
+ gregorio_add_end_of_line_as_note(&current_note, true, false, false,
+ &notes_lloc);
+ }
+Z\+ {
+ gregorio_add_end_of_line_as_note(&current_note, true, true, true,
+ &notes_lloc);
+ }
+Z- {
+ gregorio_add_end_of_line_as_note(&current_note, true, true, false,
+ &notes_lloc);
+ }
+[cf][1-5] {
+ gregorio_add_clef_as_note(&current_note,
+ letter_to_clef(gabc_notes_determination_text[0]),
+ parse_clef_line(gabc_notes_determination_text[1]), false,
+ &notes_lloc);
+ }
+[cf]b[1-5] {
+ gregorio_add_clef_as_note(&current_note,
+ letter_to_clef(gabc_notes_determination_text[0]),
+ parse_clef_line(gabc_notes_determination_text[2]), true,
+ &notes_lloc);
+ }
+@[cf][1-5] {
+ gregorio_add_secondary_clef_to_note(current_note,
+ letter_to_clef(gabc_notes_determination_text[1]),
+ parse_clef_line(gabc_notes_determination_text[2]), false);
+ }
+@[cf]b[1-5] {
+ gregorio_add_secondary_clef_to_note(current_note,
+ letter_to_clef(gabc_notes_determination_text[1]),
+ parse_clef_line(gabc_notes_determination_text[3]), true);
+ }
+` {
+ add_bar_as_note(B_VIRGULA);
+ }
+`0 {
+ add_bar_as_note(B_VIRGULA_HIGH);
+ }
+\^ {
+ add_bar_as_note(B_DIVISIO_MINIMIS);
+ }
+\^0 {
+ add_bar_as_note(B_DIVISIO_MINIMIS_HIGH);
+ }
+, {
+ add_bar_as_note(B_DIVISIO_MINIMA);
+ }
+,0 {
+ add_bar_as_note(B_DIVISIO_MINIMA_HIGH);
+ }
+[,;][1-8] {
+ add_bar_as_note(parse_dominican_bar(gabc_notes_determination_text[1]));
+ }
+; {
+ add_bar_as_note(B_DIVISIO_MINOR);
+ }
+: {
+ add_bar_as_note(B_DIVISIO_MAIOR);
+ }
+:: {
+ add_bar_as_note(B_DIVISIO_FINALIS);
+ }
+:\? {
+ add_bar_as_note(B_DIVISIO_MAIOR_DOTTED);
+ }
+r {
+ gregorio_add_cavum(current_note);
+ }
+R {
+ gregorio_change_shape(current_note, S_LINEA_PUNCTUM,
+ legacy_oriscus_orientation);
+ }
+r0 {
+ gregorio_change_shape(current_note, S_LINEA_PUNCTUM,
+ legacy_oriscus_orientation);
+ gregorio_add_cavum(current_note);
+ }
+r1 {
+ gregorio_add_special_sign(current_note, _ACCENTUS);
+ }
+r2 {
+ gregorio_add_special_sign(current_note, _ACCENTUS_REVERSUS);
+ }
+r3 {
+ gregorio_add_special_sign(current_note, _CIRCULUS);
+ }
+r4 {
+ gregorio_add_special_sign(current_note, _SEMI_CIRCULUS);
+ }
+r5 {
+ gregorio_add_special_sign(current_note, _SEMI_CIRCULUS_REVERSUS);
+ }
+r6 {
+ gregorio_add_special_sign(current_note, _MUSICA_FICTA_FLAT);
+ }
+r7 {
+ gregorio_add_special_sign(current_note, _MUSICA_FICTA_NATURAL);
+ }
+r8 {
+ gregorio_add_special_sign(current_note, _MUSICA_FICTA_SHARP);
+ }
+x {
+ gregorio_change_shape(current_note, S_FLAT, legacy_oriscus_orientation);
+ }
+# {
+ gregorio_change_shape(current_note, S_SHARP,
+ legacy_oriscus_orientation);
+ }
+y {
+ gregorio_change_shape(current_note, S_NATURAL,
+ legacy_oriscus_orientation);
+ }
+!?\/0 {
+ gregorio_add_space_as_note(&current_note, SP_HALF_SPACE, NULL,
+ &notes_lloc);
+ }
+!?\/! {
+ gregorio_add_space_as_note(&current_note, SP_INTERGLYPH_SPACE, NULL,
+ &notes_lloc);
+ }
+\/ {
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT, NULL,
+ &notes_lloc);
+ }
+\//\/\[ {
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT, NULL,
+ &notes_lloc);
+ }
+\/\/ {
+ gregorio_add_space_as_note(&current_note, SP_LARGER_SPACE, NULL,
+ &notes_lloc);
+ }
+\ {
+ gregorio_add_space_as_note(&current_note, SP_GLYPH_SPACE, NULL,
+ &notes_lloc);
+ }
+!\/ {
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT_NB, NULL,
+ &notes_lloc);
+ }
+!\//\/\[ {
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT_NB, NULL,
+ &notes_lloc);
+ }
+!\/\/ {
+ gregorio_add_space_as_note(&current_note, SP_LARGER_SPACE_NB, NULL,
+ &notes_lloc);
+ }
+!\ {
+ gregorio_add_space_as_note(&current_note, SP_GLYPH_SPACE_NB, NULL,
+ &notes_lloc);
+ }
+!/[^\/ ] {
+ gregorio_add_space_as_note(&current_note, SP_ZERO_WIDTH, NULL,
+ &notes_lloc);
+ }
+= {
+ gregorio_change_shape(current_note, S_LINEA,
+ legacy_oriscus_orientation);
+ }
+[a-npA-NP]vv {
+ lex_add_note(0, S_BIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+[a-npA-NP]vvv {
+ lex_add_note(0, S_TRIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+[a-npA-NP]VV {
+ lex_add_note(0, S_BIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+[a-npA-NP]VVV {
+ lex_add_note(0, S_TRIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+[a-npA-NP]ss {
+ lex_add_note(0, S_DISTROPHA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+[a-npA-NP]ss(\<|\>) {
+ lex_add_note(0, S_DISTROPHA, _NO_SIGN, L_AUCTUS_ASCENDENS);
+ }
+[a-npA-NP]sss {
+ lex_add_note(0, S_TRISTROPHA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+[a-npA-NP]sss(\<|\>) {
+ lex_add_note(0, S_TRISTROPHA, _NO_SIGN, L_AUCTUS_ASCENDENS);
+ }
+[a-np] {
+ lex_add_note(0, S_PUNCTUM, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+-[a-np] {
+ lex_add_note(1, S_PUNCTUM, _NO_SIGN, L_INITIO_DEBILIS);
+ }
+@[a-np] {
+ lex_add_note(1, S_PUNCTUM, _NO_SIGN, L_FUSED);
+ }
+[A-NP][012]? {
+ lex_add_note(0, punctum_inclinatum(gabc_notes_determination_text[1]),
+ _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+-[A-NP][012]? {
+ lex_add_note(1, punctum_inclinatum(gabc_notes_determination_text[2]),
+ _NO_SIGN, L_INITIO_DEBILIS);
+ }
+@[A-NP][012]? {
+ lex_add_note(1, punctum_inclinatum(gabc_notes_determination_text[2]),
+ _NO_SIGN, L_FUSED);
+ }
+\'[01]? {
+ add_sign(_V_EPISEMA);
+ }
+_[0-5]* {
+ add_h_episema();
+ }
+\.[01]? {
+ add_sign(_PUNCTUM_MORA);
+ }
+~ {
+ gregorio_add_tail_liquescentia(current_note, L_DEMINUTUS,
+ legacy_oriscus_orientation);
+ }
+> {
+ gregorio_add_tail_liquescentia(current_note, L_AUCTUS_DESCENDENS,
+ legacy_oriscus_orientation);
+ }
+\< {
+ gregorio_add_tail_liquescentia(current_note, L_AUCTUS_ASCENDENS,
+ legacy_oriscus_orientation);
+ }
+q {
+ gregorio_change_shape(current_note, S_QUADRATUM,
+ legacy_oriscus_orientation);
+ }
+o {
+ gregorio_change_shape(current_note, S_ORISCUS_UNDETERMINED,
+ legacy_oriscus_orientation);
+ }
+o0 {
+ gregorio_change_shape(current_note, S_ORISCUS_DESCENDENS,
+ legacy_oriscus_orientation);
+ }
+o1 {
+ gregorio_change_shape(current_note, S_ORISCUS_ASCENDENS,
+ legacy_oriscus_orientation);
+ }
+O {
+ gregorio_change_shape(current_note, S_ORISCUS_SCAPUS_UNDETERMINED,
+ legacy_oriscus_orientation);
+ }
+O0 {
+ gregorio_change_shape(current_note, S_ORISCUS_SCAPUS_DESCENDENS,
+ legacy_oriscus_orientation);
+ }
+O1 {
+ gregorio_change_shape(current_note, S_ORISCUS_SCAPUS_ASCENDENS,
+ legacy_oriscus_orientation);
+ }
+w {
+ gregorio_change_shape(current_note, S_QUILISMA,
+ legacy_oriscus_orientation);
+ }
+W {
+ gregorio_change_shape(current_note, S_QUILISMA_QUADRATUM,
+ legacy_oriscus_orientation);
+ }
+v {
+ gregorio_change_shape(current_note, S_VIRGA,
+ legacy_oriscus_orientation);
+ }
+V {
+ gregorio_change_shape(current_note, S_VIRGA_REVERSA,
+ legacy_oriscus_orientation);
+ }
+s {
+ gregorio_change_shape(current_note, S_STROPHA,
+ legacy_oriscus_orientation);
+ }
+\[hl:1\] {
+ LEDGER(high, EXPLICIT, true);
+ }
+\[hl:0\] {
+ LEDGER(high, EXPLICIT, false);
+ }
+\[ll:1\] {
+ LEDGER(low, EXPLICIT, true);
+ }
+\[ll:0\] {
+ LEDGER(low, EXPLICIT, false);
+ }
+.|\n {
+ gregorio_messagef("det_notes_from_string", VERBOSITY_ERROR, 0,
+ _("unrecognized character: \"%c\""),
+ gabc_notes_determination_text[0]);
+ }
+
+%%
+
+gregorio_note *gabc_det_notes_from_string(char *str, char *newmacros[10],
+ gregorio_scanner_location *loc, const gregorio_score *const score)
+{
+ int i;
+ YY_BUFFER_STATE buf;
+
+ notes_lloc.first_line = loc->first_line;
+ notes_lloc.first_column = loc->first_column;
+ notes_lloc.first_offset = loc->first_offset;
+ /* yes... I do mean to set values from loc->first_* */
+ notes_lloc.last_line = loc->first_line;
+ notes_lloc.last_column = loc->first_column;
+ notes_lloc.last_offset = loc->first_offset;
+ notes_lloc.generate_point_and_click = loc->generate_point_and_click;
+
+ staff_lines = score->staff_lines;
+ highest_pitch = score->highest_pitch;
+ high_ledger_line_pitch = score->high_ledger_line_pitch;
+ legacy_oriscus_orientation = score->legacy_oriscus_orientation;
+
+ /* a small optimization could uccur here: we could do it only once at the
+ * beginning of the score, not at each syllable */
+ for (i = 0; i < 10; i++) {
+ notesmacros[i] = newmacros[i];
+ }
+ nbof_isolated_episema = 0;
+ current_note = NULL;
+ buf = yy_scan_string(str);
+ yylex();
+ yy_flush_buffer(buf);
+ yy_delete_buffer(buf);
+ gregorio_go_to_first_note(&current_note);
+ return current_note;
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.c
new file mode 100644
index 00000000000..d25f0ee2d94
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.c
@@ -0,0 +1,2987 @@
+#line 1 "gabc/gabc-score-determination-l.c"
+
+#line 3 "gabc/gabc-score-determination-l.c"
+
+#define YY_INT_ALIGNED long int
+
+/* A lexical scanner generated by flex */
+
+#define yy_create_buffer gabc_score_determination__create_buffer
+#define yy_delete_buffer gabc_score_determination__delete_buffer
+#define yy_scan_buffer gabc_score_determination__scan_buffer
+#define yy_scan_string gabc_score_determination__scan_string
+#define yy_scan_bytes gabc_score_determination__scan_bytes
+#define yy_init_buffer gabc_score_determination__init_buffer
+#define yy_flush_buffer gabc_score_determination__flush_buffer
+#define yy_load_buffer_state gabc_score_determination__load_buffer_state
+#define yy_switch_to_buffer gabc_score_determination__switch_to_buffer
+#define yypush_buffer_state gabc_score_determination_push_buffer_state
+#define yypop_buffer_state gabc_score_determination_pop_buffer_state
+#define yyensure_buffer_stack gabc_score_determination_ensure_buffer_stack
+#define yy_flex_debug gabc_score_determination__flex_debug
+#define yyin gabc_score_determination_in
+#define yyleng gabc_score_determination_leng
+#define yylex gabc_score_determination_lex
+#define yylineno gabc_score_determination_lineno
+#define yyout gabc_score_determination_out
+#define yyrestart gabc_score_determination_restart
+#define yytext gabc_score_determination_text
+#define yywrap gabc_score_determination_wrap
+#define yyalloc gabc_score_determination_alloc
+#define yyrealloc gabc_score_determination_realloc
+#define yyfree gabc_score_determination_free
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+#ifdef yy_create_buffer
+#define gabc_score_determination__create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer gabc_score_determination__create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define gabc_score_determination__delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer gabc_score_determination__delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define gabc_score_determination__scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer gabc_score_determination__scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define gabc_score_determination__scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string gabc_score_determination__scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define gabc_score_determination__scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes gabc_score_determination__scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define gabc_score_determination__init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer gabc_score_determination__init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define gabc_score_determination__flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer gabc_score_determination__flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define gabc_score_determination__load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state gabc_score_determination__load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define gabc_score_determination__switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer gabc_score_determination__switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define gabc_score_determination_push_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state gabc_score_determination_push_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define gabc_score_determination_pop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state gabc_score_determination_pop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define gabc_score_determination_ensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack gabc_score_determination_ensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define gabc_score_determination_lex_ALREADY_DEFINED
+#else
+#define yylex gabc_score_determination_lex
+#endif
+
+#ifdef yyrestart
+#define gabc_score_determination_restart_ALREADY_DEFINED
+#else
+#define yyrestart gabc_score_determination_restart
+#endif
+
+#ifdef yylex_init
+#define gabc_score_determination_lex_init_ALREADY_DEFINED
+#else
+#define yylex_init gabc_score_determination_lex_init
+#endif
+
+#ifdef yylex_init_extra
+#define gabc_score_determination_lex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra gabc_score_determination_lex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define gabc_score_determination_lex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy gabc_score_determination_lex_destroy
+#endif
+
+#ifdef yyget_debug
+#define gabc_score_determination_get_debug_ALREADY_DEFINED
+#else
+#define yyget_debug gabc_score_determination_get_debug
+#endif
+
+#ifdef yyset_debug
+#define gabc_score_determination_set_debug_ALREADY_DEFINED
+#else
+#define yyset_debug gabc_score_determination_set_debug
+#endif
+
+#ifdef yyget_extra
+#define gabc_score_determination_get_extra_ALREADY_DEFINED
+#else
+#define yyget_extra gabc_score_determination_get_extra
+#endif
+
+#ifdef yyset_extra
+#define gabc_score_determination_set_extra_ALREADY_DEFINED
+#else
+#define yyset_extra gabc_score_determination_set_extra
+#endif
+
+#ifdef yyget_in
+#define gabc_score_determination_get_in_ALREADY_DEFINED
+#else
+#define yyget_in gabc_score_determination_get_in
+#endif
+
+#ifdef yyset_in
+#define gabc_score_determination_set_in_ALREADY_DEFINED
+#else
+#define yyset_in gabc_score_determination_set_in
+#endif
+
+#ifdef yyget_out
+#define gabc_score_determination_get_out_ALREADY_DEFINED
+#else
+#define yyget_out gabc_score_determination_get_out
+#endif
+
+#ifdef yyset_out
+#define gabc_score_determination_set_out_ALREADY_DEFINED
+#else
+#define yyset_out gabc_score_determination_set_out
+#endif
+
+#ifdef yyget_leng
+#define gabc_score_determination_get_leng_ALREADY_DEFINED
+#else
+#define yyget_leng gabc_score_determination_get_leng
+#endif
+
+#ifdef yyget_text
+#define gabc_score_determination_get_text_ALREADY_DEFINED
+#else
+#define yyget_text gabc_score_determination_get_text
+#endif
+
+#ifdef yyget_lineno
+#define gabc_score_determination_get_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno gabc_score_determination_get_lineno
+#endif
+
+#ifdef yyset_lineno
+#define gabc_score_determination_set_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno gabc_score_determination_set_lineno
+#endif
+
+#ifdef yywrap
+#define gabc_score_determination_wrap_ALREADY_DEFINED
+#else
+#define yywrap gabc_score_determination_wrap
+#endif
+
+#ifdef yyalloc
+#define gabc_score_determination_alloc_ALREADY_DEFINED
+#else
+#define yyalloc gabc_score_determination_alloc
+#endif
+
+#ifdef yyrealloc
+#define gabc_score_determination_realloc_ALREADY_DEFINED
+#else
+#define yyrealloc gabc_score_determination_realloc
+#endif
+
+#ifdef yyfree
+#define gabc_score_determination_free_ALREADY_DEFINED
+#else
+#define yyfree gabc_score_determination_free
+#endif
+
+#ifdef yytext
+#define gabc_score_determination_text_ALREADY_DEFINED
+#else
+#define yytext gabc_score_determination_text
+#endif
+
+#ifdef yyleng
+#define gabc_score_determination_leng_ALREADY_DEFINED
+#else
+#define yyleng gabc_score_determination_leng
+#endif
+
+#ifdef yyin
+#define gabc_score_determination_in_ALREADY_DEFINED
+#else
+#define yyin gabc_score_determination_in
+#endif
+
+#ifdef yyout
+#define gabc_score_determination_out_ALREADY_DEFINED
+#else
+#define yyout gabc_score_determination_out
+#endif
+
+#ifdef yy_flex_debug
+#define gabc_score_determination__flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug gabc_score_determination__flex_debug
+#endif
+
+#ifdef yylineno
+#define gabc_score_determination_lineno_ALREADY_DEFINED
+#else
+#define yylineno gabc_score_determination_lineno
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* begin standard C++ headers. */
+
+/* TODO: this is always defined, so inline it */
+#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
+#else
+#define yynoreturn
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
+ */
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern int yyleng;
+
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ #define YY_LESS_LINENO(n)
+ #define YY_LINENO_REWIND_TO(ptr)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
+ YY_RESTORE_YY_MORE_OFFSET \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+#define unput(c) yyunput( c, (yytext_ptr) )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ int yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = NULL;
+static int yy_init = 0; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
+
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+
+#define yy_new_buffer yy_create_buffer
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ }
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){\
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ }
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+#define gabc_score_determination_wrap() (/*CONSTCOND*/1)
+#define YY_SKIP_YYWRAP
+typedef flex_uint8_t YY_CHAR;
+
+FILE *yyin = NULL, *yyout = NULL;
+
+typedef int yy_state_type;
+
+extern int yylineno;
+int yylineno = 1;
+
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ (yytext_ptr) = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
+ *yy_cp = '\0'; \
+ (yy_c_buf_p) = yy_cp;
+#define YY_NUM_RULES 77
+#define YY_END_OF_BUFFER 78
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static const flex_int32_t yy_accept[309] =
+ { 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 78, 25, 76, 25, 23, 6, 23, 23,
+ 23, 23, 23, 23, 23, 23, 2, 2, 3, 3,
+ 1, 8, 9, 27, 26, 50, 71, 29, 28, 56,
+ 64, 65, 57, 58, 72, 74, 73, 49, 48, 77,
+ 77, 55, 56, 52, 51, 5, 4, 56, 77, 69,
+ 77, 77, 70, 0, 0, 23, 6, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 2, 1, 8,
+ 0, 7, 0, 27, 26, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,
+ 75, 49, 48, 0, 55, 0, 52, 51, 5, 4,
+ 0, 69, 69, 69, 0, 0, 70, 0, 24, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 40, 38, 0, 44, 0, 32, 0, 0, 0,
+ 0, 0, 0, 53, 63, 0, 0, 0, 23, 23,
+ 0, 23, 23, 14, 23, 11, 23, 23, 23, 41,
+ 39, 45, 0, 33, 0, 0, 0, 0, 0, 0,
+ 61, 0, 0, 0, 68, 67, 42, 46, 34, 36,
+
+ 0, 54, 0, 23, 23, 23, 0, 23, 0, 0,
+ 23, 23, 23, 62, 0, 43, 35, 37, 59, 0,
+ 0, 0, 68, 47, 0, 23, 18, 10, 23, 23,
+ 23, 23, 23, 23, 0, 0, 0, 0, 30, 60,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 31,
+ 0, 0, 66, 23, 23, 19, 23, 23, 23, 0,
+ 23, 23, 0, 23, 23, 23, 23, 23, 23, 23,
+ 23, 17, 23, 23, 23, 21, 23, 23, 23, 23,
+ 23, 23, 23, 23, 20, 23, 23, 23, 23, 23,
+ 23, 23, 15, 23, 23, 13, 23, 23, 23, 23,
+
+ 23, 12, 16, 23, 23, 23, 22, 0
+ } ;
+
+static const YY_CHAR yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 5, 1, 1, 6, 1, 7, 1, 1, 8,
+ 9, 1, 1, 10, 11, 12, 13, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 15, 16, 17,
+ 1, 18, 1, 1, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 20, 1, 21, 1, 19, 1, 22, 23, 24, 25,
+
+ 26, 27, 28, 29, 30, 19, 19, 31, 32, 33,
+ 34, 35, 19, 36, 37, 38, 39, 40, 19, 19,
+ 41, 19, 42, 43, 44, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 45, 1, 1, 1,
+ 46, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 47, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static const YY_CHAR yy_meta[48] =
+ { 0,
+ 1, 1, 2, 2, 1, 1, 3, 3, 4, 3,
+ 5, 3, 1, 6, 3, 7, 8, 1, 6, 3,
+ 3, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 9, 4, 9, 1, 1, 1
+ } ;
+
+static const flex_int32_t yy_base[326] =
+ { 0,
+ 0, 45, 707, 706, 90, 132, 41, 44, 71, 78,
+ 704, 703, 51, 53, 55, 57, 702, 701, 50, 51,
+ 65, 152, 717, 724, 724, 709, 704, 709, 75, 78,
+ 55, 74, 65, 101, 92, 107, 68, 76, 724, 706,
+ 79, 0, 156, 0, 164, 724, 724, 724, 724, 175,
+ 699, 724, 724, 724, 0, 179, 724, 0, 187, 698,
+ 724, 0, 697, 0, 113, 0, 126, 696, 694, 107,
+ 191, 214, 724, 134, 0, 696, 724, 140, 164, 135,
+ 200, 152, 139, 210, 176, 192, 209, 221, 182, 0,
+ 232, 236, 241, 0, 245, 249, 262, 675, 687, 237,
+
+ 168, 686, 672, 666, 232, 663, 669, 681, 677, 0,
+ 255, 0, 259, 660, 0, 656, 0, 262, 0, 266,
+ 673, 680, 679, 260, 276, 300, 724, 304, 272, 681,
+ 276, 98, 680, 266, 285, 271, 287, 301, 280, 303,
+ 304, 659, 671, 670, 298, 669, 655, 661, 646, 652,
+ 644, 724, 724, 655, 724, 662, 724, 656, 330, 660,
+ 659, 658, 657, 724, 724, 639, 655, 641, 282, 308,
+ 639, 659, 310, 658, 657, 656, 312, 314, 317, 724,
+ 724, 724, 648, 724, 642, 646, 645, 644, 643, 638,
+ 724, 637, 348, 352, 369, 724, 724, 724, 724, 724,
+
+ 633, 724, 604, 319, 347, 315, 615, 353, 335, 595,
+ 348, 608, 603, 724, 590, 724, 724, 724, 724, 575,
+ 589, 374, 386, 724, 507, 327, 510, 509, 313, 357,
+ 351, 335, 369, 371, 495, 487, 497, 391, 724, 724,
+ 373, 375, 386, 387, 390, 189, 503, 389, 391, 724,
+ 414, 426, 724, 400, 394, 500, 395, 396, 413, 476,
+ 402, 409, 443, 422, 414, 425, 427, 429, 432, 430,
+ 438, 498, 442, 441, 445, 495, 446, 447, 448, 451,
+ 452, 454, 456, 458, 491, 462, 459, 463, 470, 473,
+ 449, 475, 272, 478, 479, 260, 482, 483, 484, 485,
+
+ 486, 219, 160, 487, 489, 493, 122, 724, 526, 535,
+ 544, 553, 562, 571, 580, 589, 594, 600, 609, 615,
+ 624, 631, 640, 649, 67
+ } ;
+
+static const flex_int32_t yy_def[326] =
+ { 0,
+ 308, 1, 309, 309, 310, 310, 311, 311, 312, 312,
+ 313, 313, 314, 314, 315, 315, 313, 313, 316, 316,
+ 316, 316, 308, 308, 308, 308, 317, 308, 317, 317,
+ 317, 317, 317, 317, 317, 317, 308, 308, 308, 308,
+ 308, 318, 308, 319, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 320, 308, 308, 321, 308, 308,
+ 308, 322, 308, 323, 308, 324, 308, 308, 308, 308,
+ 308, 308, 308, 308, 325, 317, 308, 317, 317, 317,
+ 317, 317, 317, 317, 317, 317, 317, 308, 308, 318,
+ 308, 308, 308, 319, 308, 308, 308, 308, 308, 308,
+
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 320,
+ 308, 321, 308, 308, 322, 308, 323, 308, 324, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 325,
+ 317, 317, 317, 317, 317, 317, 317, 317, 317, 317,
+ 317, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 317, 317,
+ 325, 317, 317, 317, 317, 317, 317, 317, 317, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+
+ 308, 308, 308, 317, 317, 325, 325, 317, 325, 325,
+ 317, 317, 317, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 317, 317, 325, 325, 317,
+ 325, 325, 325, 317, 325, 325, 308, 308, 308, 308,
+ 317, 325, 317, 325, 325, 325, 317, 325, 325, 308,
+ 308, 308, 308, 317, 325, 317, 325, 325, 325, 325,
+ 325, 325, 308, 317, 325, 325, 325, 325, 325, 325,
+ 325, 317, 325, 325, 325, 325, 325, 325, 325, 325,
+ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325,
+ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325,
+
+ 325, 325, 325, 325, 325, 325, 325, 0, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308
+ } ;
+
+static const flex_int32_t yy_nxt[772] =
+ { 0,
+ 24, 24, 25, 24, 24, 24, 26, 24, 24, 24,
+ 24, 24, 24, 27, 28, 24, 24, 24, 27, 24,
+ 24, 29, 27, 27, 30, 27, 27, 31, 27, 27,
+ 32, 33, 34, 35, 27, 27, 36, 27, 27, 27,
+ 27, 24, 24, 24, 24, 24, 24, 37, 38, 56,
+ 39, 40, 56, 65, 65, 65, 65, 67, 67, 67,
+ 67, 69, 69, 70, 70, 75, 71, 71, 71, 71,
+ 88, 88, 130, 59, 59, 75, 81, 72, 88, 88,
+ 59, 59, 73, 57, 75, 75, 57, 60, 75, 41,
+ 41, 41, 45, 45, 60, 82, 46, 47, 83, 48,
+
+ 49, 48, 75, 80, 48, 48, 50, 78, 75, 51,
+ 52, 75, 61, 79, 61, 118, 118, 75, 123, 61,
+ 124, 61, 84, 89, 89, 89, 170, 85, 120, 120,
+ 86, 53, 75, 54, 45, 45, 129, 129, 46, 47,
+ 74, 48, 49, 48, 87, 75, 48, 48, 50, 75,
+ 75, 51, 52, 71, 71, 71, 71, 91, 92, 92,
+ 91, 133, 75, 136, 72, 95, 95, 95, 95, 73,
+ 75, 93, 131, 53, 75, 54, 96, 96, 96, 96,
+ 111, 111, 111, 111, 135, 155, 75, 97, 113, 113,
+ 113, 113, 125, 125, 125, 125, 98, 99, 100, 75,
+
+ 101, 132, 75, 126, 102, 139, 156, 103, 127, 104,
+ 75, 105, 106, 107, 108, 128, 128, 128, 128, 75,
+ 75, 259, 134, 88, 88, 140, 89, 89, 89, 75,
+ 141, 127, 137, 91, 92, 92, 91, 91, 92, 92,
+ 91, 138, 91, 92, 92, 91, 95, 95, 95, 95,
+ 96, 96, 96, 96, 153, 160, 111, 111, 111, 111,
+ 113, 113, 113, 113, 118, 118, 161, 154, 120, 120,
+ 75, 123, 142, 124, 129, 129, 75, 125, 125, 125,
+ 125, 75, 75, 104, 143, 144, 75, 145, 126, 172,
+ 75, 146, 75, 127, 147, 75, 174, 75, 148, 149,
+
+ 150, 128, 128, 128, 128, 128, 128, 128, 128, 169,
+ 175, 75, 173, 75, 75, 182, 177, 127, 75, 204,
+ 75, 127, 75, 75, 75, 75, 176, 75, 228, 75,
+ 179, 193, 193, 193, 193, 211, 183, 75, 178, 212,
+ 226, 205, 194, 213, 195, 75, 242, 196, 208, 193,
+ 193, 193, 193, 222, 222, 222, 222, 75, 75, 231,
+ 194, 75, 195, 75, 241, 196, 232, 75, 245, 196,
+ 223, 223, 223, 223, 230, 222, 222, 222, 222, 75,
+ 244, 75, 227, 75, 243, 75, 234, 223, 223, 223,
+ 223, 196, 251, 251, 251, 251, 75, 75, 246, 75,
+
+ 75, 75, 254, 252, 75, 75, 75, 247, 253, 255,
+ 75, 256, 75, 257, 258, 251, 251, 251, 251, 75,
+ 262, 266, 261, 75, 75, 267, 252, 263, 263, 263,
+ 263, 253, 75, 264, 265, 75, 270, 75, 268, 75,
+ 75, 271, 75, 253, 263, 263, 263, 263, 75, 273,
+ 274, 75, 75, 275, 272, 75, 75, 75, 75, 75,
+ 253, 75, 75, 279, 75, 276, 75, 277, 75, 75,
+ 278, 280, 75, 75, 282, 283, 281, 287, 286, 288,
+ 75, 289, 284, 75, 285, 75, 296, 290, 75, 75,
+ 291, 292, 75, 75, 75, 75, 75, 75, 293, 75,
+
+ 295, 75, 294, 75, 301, 75, 303, 299, 75, 269,
+ 75, 300, 297, 260, 250, 298, 305, 249, 248, 75,
+ 75, 302, 306, 304, 240, 307, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+ 66, 66, 66, 66, 66, 66, 66, 66, 66, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 76, 76,
+
+ 90, 90, 90, 90, 90, 90, 239, 90, 90, 94,
+ 238, 237, 94, 236, 94, 110, 110, 110, 235, 110,
+ 110, 110, 110, 110, 112, 233, 112, 112, 112, 112,
+ 112, 115, 115, 115, 115, 115, 115, 115, 229, 115,
+ 117, 225, 117, 117, 117, 117, 117, 117, 117, 119,
+ 224, 119, 119, 119, 119, 119, 119, 119, 221, 220,
+ 219, 218, 217, 216, 215, 214, 75, 210, 209, 207,
+ 206, 203, 202, 201, 200, 199, 198, 197, 192, 191,
+ 190, 189, 188, 187, 186, 185, 184, 181, 180, 154,
+ 171, 75, 122, 122, 168, 167, 166, 165, 164, 163,
+
+ 162, 159, 158, 157, 152, 151, 75, 122, 121, 116,
+ 114, 109, 74, 77, 75, 74, 308, 68, 68, 63,
+ 63, 43, 43, 23, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308
+ } ;
+
+static const flex_int32_t yy_chk[772] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 2, 2, 7,
+ 2, 2, 8, 13, 13, 14, 14, 15, 15, 16,
+ 16, 19, 20, 19, 20, 31, 21, 21, 21, 21,
+ 37, 37, 325, 9, 9, 33, 31, 21, 38, 38,
+ 10, 10, 21, 7, 32, 29, 8, 9, 30, 2,
+ 2, 2, 5, 5, 10, 32, 5, 5, 33, 5,
+
+ 5, 5, 35, 30, 5, 5, 5, 29, 132, 5,
+ 5, 34, 9, 29, 9, 65, 65, 36, 70, 10,
+ 70, 10, 34, 41, 41, 41, 132, 35, 67, 67,
+ 36, 5, 307, 5, 6, 6, 74, 74, 6, 6,
+ 74, 6, 6, 6, 36, 80, 6, 6, 6, 83,
+ 78, 6, 6, 22, 22, 22, 22, 43, 43, 43,
+ 43, 80, 82, 83, 22, 45, 45, 45, 45, 22,
+ 303, 43, 78, 6, 79, 6, 50, 50, 50, 50,
+ 56, 56, 56, 56, 82, 101, 85, 50, 59, 59,
+ 59, 59, 71, 71, 71, 71, 50, 50, 50, 246,
+
+ 50, 79, 86, 71, 50, 85, 101, 50, 71, 50,
+ 81, 50, 50, 50, 50, 72, 72, 72, 72, 87,
+ 84, 246, 81, 88, 88, 86, 89, 89, 89, 302,
+ 87, 72, 84, 91, 91, 91, 91, 92, 92, 92,
+ 92, 84, 93, 93, 93, 93, 95, 95, 95, 95,
+ 96, 96, 96, 96, 100, 105, 111, 111, 111, 111,
+ 113, 113, 113, 113, 118, 118, 105, 100, 120, 120,
+ 296, 124, 96, 124, 129, 129, 134, 125, 125, 125,
+ 125, 136, 293, 96, 97, 97, 131, 97, 125, 134,
+ 139, 97, 169, 125, 97, 135, 136, 137, 97, 97,
+
+ 97, 126, 126, 126, 126, 128, 128, 128, 128, 131,
+ 137, 138, 135, 140, 141, 145, 139, 126, 170, 169,
+ 173, 128, 177, 229, 178, 206, 138, 179, 206, 204,
+ 141, 159, 159, 159, 159, 177, 145, 226, 140, 178,
+ 204, 170, 159, 179, 159, 232, 229, 159, 173, 193,
+ 193, 193, 193, 194, 194, 194, 194, 205, 211, 209,
+ 193, 231, 193, 208, 226, 193, 209, 230, 232, 194,
+ 195, 195, 195, 195, 208, 222, 222, 222, 222, 233,
+ 231, 234, 205, 241, 230, 242, 211, 223, 223, 223,
+ 223, 222, 238, 238, 238, 238, 243, 244, 233, 248,
+
+ 245, 249, 241, 238, 255, 257, 258, 234, 238, 242,
+ 254, 243, 261, 244, 245, 251, 251, 251, 251, 262,
+ 249, 257, 248, 259, 265, 258, 251, 252, 252, 252,
+ 252, 251, 264, 254, 255, 266, 261, 267, 259, 268,
+ 270, 262, 269, 252, 263, 263, 263, 263, 271, 265,
+ 266, 274, 273, 267, 264, 275, 277, 278, 279, 291,
+ 263, 280, 281, 271, 282, 268, 283, 269, 284, 287,
+ 270, 273, 286, 288, 275, 277, 274, 281, 280, 282,
+ 289, 283, 278, 290, 279, 292, 291, 284, 294, 295,
+ 286, 287, 297, 298, 299, 300, 301, 304, 288, 305,
+
+ 290, 285, 289, 306, 298, 276, 300, 295, 272, 260,
+ 256, 297, 292, 247, 237, 294, 304, 236, 235, 228,
+ 227, 299, 305, 301, 225, 306, 309, 309, 309, 309,
+ 309, 309, 309, 309, 309, 310, 310, 310, 310, 310,
+ 310, 310, 310, 310, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 312, 312, 312, 312, 312, 312, 312,
+ 312, 312, 313, 313, 313, 313, 313, 313, 313, 313,
+ 313, 314, 314, 314, 314, 314, 314, 314, 314, 314,
+ 315, 315, 315, 315, 315, 315, 315, 315, 315, 316,
+ 316, 316, 316, 316, 316, 316, 316, 316, 317, 317,
+
+ 318, 318, 318, 318, 318, 318, 221, 318, 318, 319,
+ 220, 215, 319, 213, 319, 320, 320, 320, 212, 320,
+ 320, 320, 320, 320, 321, 210, 321, 321, 321, 321,
+ 321, 322, 322, 322, 322, 322, 322, 322, 207, 322,
+ 323, 203, 323, 323, 323, 323, 323, 323, 323, 324,
+ 201, 324, 324, 324, 324, 324, 324, 324, 192, 190,
+ 189, 188, 187, 186, 185, 183, 176, 175, 174, 172,
+ 171, 168, 167, 166, 163, 162, 161, 160, 158, 156,
+ 154, 151, 150, 149, 148, 147, 146, 144, 143, 142,
+ 133, 130, 123, 122, 121, 116, 114, 109, 108, 107,
+
+ 106, 104, 103, 102, 99, 98, 76, 69, 68, 63,
+ 60, 51, 40, 28, 27, 26, 23, 18, 17, 12,
+ 11, 4, 3, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308
+ } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "gabc/gabc-score-determination.l"
+#line 2 "gabc/gabc-score-determination.l"
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the score lexer.
+ *
+ * Gregorio score determination in gabc input.
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "struct.h"
+#include "messages.h"
+#include "bool.h"
+#include "support.h"
+
+#include "gabc.h"
+#include "gabc-score-determination.h"
+#include "gabc-score-determination-y.h"
+
+static bool eof_found = false;
+
+#define START_STYLE(STYLE) \
+ if (*styles & SB_ ## STYLE) { \
+ gregorio_messagef("gabc_score_determination_lex", VERBOSITY_ERROR, 0, \
+ _("style already started: %s"), gabc_score_determination_text); \
+ } else { \
+ *styles ^= SB_ ## STYLE; \
+ return STYLE ## _BEGIN; \
+ }
+
+#define END_STYLE(STYLE) \
+ if (*styles & SB_ ## STYLE) { \
+ *styles ^= SB_ ## STYLE; \
+ return STYLE ## _END; \
+ } else { \
+ gregorio_messagef("gabc_score_determination_lex", VERBOSITY_ERROR, 0, \
+ _("style not started: %s"), gabc_score_determination_text); \
+ }
+
+#define RETURN_CHARACTERS \
+ gabc_score_determination_lval.text = \
+ gregorio_strdup(gabc_score_determination_text); \
+ return CHARACTERS
+
+#define RETURN_SPACE \
+ gabc_score_determination_lval.text = gregorio_strdup(" "); \
+ return CHARACTERS
+
+#define YY_NO_INPUT
+
+#define YY_INPUT(buf,result,max_size) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) { \
+ int c = '*'; \
+ int n; \
+ for (n = 0; n < max_size \
+ && (c = getc(gabc_score_determination_in)) != EOF \
+ && c != '\n'; ++n ) { \
+ buf[n] = (char) c; \
+ } \
+ if (c == '\n') { \
+ buf[n++] = (char) c; \
+ } \
+ if (c == EOF && ferror(gabc_score_determination_in)) { \
+ YY_FATAL_ERROR("input in flex scanner failed"); \
+ } \
+ result = n; \
+ } else { \
+ errno=0; \
+ while ((result = fread(buf, 1, max_size, gabc_score_determination_in)) \
+ == 0 && ferror(gabc_score_determination_in)) { \
+ if (errno != EINTR) { \
+ YY_FATAL_ERROR("input in flex scanner failed"); \
+ break; \
+ } \
+ errno = 0; \
+ clearerr(gabc_score_determination_in); \
+ } \
+ } \
+ gabc_digest(buf, result)
+
+#define YY_USER_ACTION gabc_update_location(&gabc_score_determination_lloc, \
+ gabc_score_determination_text, gabc_score_determination_leng);
+
+#line 1079 "gabc/gabc-score-determination-l.c"
+
+/* The expression for attribute below is rather messy because we allow
+for (a) single-line values, ending with a semicolon at end of line or a
+double semicolon, (b) multi-line values, which end at a double
+semicolon. */
+#line 1085 "gabc/gabc-score-determination-l.c"
+
+#define INITIAL 0
+#define attribute 1
+#define score 2
+#define notes 3
+#define sp 4
+#define verb 5
+#define comments 6
+#define inicomments 7
+#define alt 8
+#define protrusion_value 9
+#define protrusion_end 10
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals ( void );
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy ( void );
+
+int yyget_debug ( void );
+
+void yyset_debug ( int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra ( void );
+
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in ( void );
+
+void yyset_in ( FILE * _in_str );
+
+FILE *yyget_out ( void );
+
+void yyset_out ( FILE * _out_str );
+
+ int yyget_leng ( void );
+
+char *yyget_text ( void );
+
+int yyget_lineno ( void );
+
+void yyset_lineno ( int _line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap ( void );
+#else
+extern int yywrap ( void );
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy ( char *, const char *, int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen ( const char * );
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput ( void );
+#else
+static int input ( void );
+#endif
+
+#endif
+
+ static int yy_start_stack_ptr = 0;
+ static int yy_start_stack_depth = 0;
+ static int *yy_start_stack = NULL;
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ { \
+ int c = '*'; \
+ int n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else \
+ { \
+ errno=0; \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(yyin); \
+ } \
+ }\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK /*LINTED*/break;
+#endif
+
+#define YY_RULE_SETUP \
+ if ( yyleng > 0 ) \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
+ (yytext[yyleng - 1] == '\n'); \
+ YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+
+ if ( !(yy_init) )
+ {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_load_buffer_state( );
+ }
+
+ {
+#line 136 "gabc/gabc-score-determination.l"
+
+#line 1319 "gabc/gabc-score-determination-l.c"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = (yy_c_buf_p);
+
+ /* Support of yytext. */
+ *yy_cp = (yy_hold_char);
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = (yy_start);
+ yy_current_state += YY_AT_BOL();
+yy_match:
+ do
+ {
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 309 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 724 );
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+ if ( yy_act == 0 )
+ { /* have to back up */
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ yy_act = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+do_action: /* This label is used only to access EOF actions. */
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = (yy_hold_char);
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 137 "gabc/gabc-score-determination.l"
+{
+ /* BOM written by a lot of windows softwares when they write UTF-8 */
+ }
+ YY_BREAK
+case 2:
+/* rule 2 can match eol */
+YY_RULE_SETUP
+#line 140 "gabc/gabc-score-determination.l"
+{
+ /* ignoring empty lines */
+ }
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 143 "gabc/gabc-score-determination.l"
+{
+ BEGIN(inicomments);
+ }
+ YY_BREAK
+case 4:
+/* rule 4 can match eol */
+YY_RULE_SETUP
+#line 146 "gabc/gabc-score-determination.l"
+{
+ BEGIN(INITIAL);
+ }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 149 "gabc/gabc-score-determination.l"
+{
+ /* ignored */
+ }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 152 "gabc/gabc-score-determination.l"
+{
+ BEGIN(attribute);
+ return COLON;
+ }
+ YY_BREAK
+case 7:
+/* rule 7 can match eol */
+YY_RULE_SETUP
+#line 156 "gabc/gabc-score-determination.l"
+{
+ BEGIN(INITIAL);
+ return SEMICOLON;
+ }
+ YY_BREAK
+case 8:
+/* rule 8 can match eol */
+YY_RULE_SETUP
+#line 160 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ATTRIBUTE;
+ }
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 165 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ATTRIBUTE;
+}
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 170 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.character = gabc_score_determination_text[5];
+ return DEF_MACRO;
+ }
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 174 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return NAME;
+ }
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 179 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return SCORE_COPYRIGHT;
+ }
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 184 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return GABC_COPYRIGHT;
+ }
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 189 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return MODE;
+ }
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 194 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return MODE_MODIFIER;
+ }
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 199 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return MODE_DIFFERENTIA;
+ }
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 204 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ANNOTATION;
+ }
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 209 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return AUTHOR;
+ }
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 214 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return LANGUAGE;
+ }
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 219 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return STAFF_LINES;
+ }
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 224 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return NABC_LINES;
+ }
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 229 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ORISCUS_ORIENTATION;
+ }
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 234 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return OTHER_HEADER;
+ }
+ YY_BREAK
+case 24:
+/* rule 24 can match eol */
+YY_RULE_SETUP
+#line 239 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return END_OF_DEFINITIONS;
+ }
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 243 "gabc/gabc-score-determination.l"
+{
+ gregorio_messagef("det_score", VERBOSITY_ERROR, 0,
+ _("unrecognized character: \"%c\" in definition part"),
+ gabc_score_determination_text[0]);
+ }
+ YY_BREAK
+case 26:
+/* rule 26 can match eol */
+YY_RULE_SETUP
+#line 248 "gabc/gabc-score-determination.l"
+{
+ RETURN_SPACE;
+ }
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 251 "gabc/gabc-score-determination.l"
+{
+ RETURN_CHARACTERS;
+ }
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 254 "gabc/gabc-score-determination.l"
+{
+ return HYPHEN;
+ }
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 257 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return PROTRUDING_PUNCTUATION;
+ }
+ YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 262 "gabc/gabc-score-determination.l"
+{
+ return NLBA_B;
+ }
+ YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 265 "gabc/gabc-score-determination.l"
+{
+ return NLBA_E;
+ }
+ YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 268 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(I);
+ }
+ YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 271 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(I);
+ }
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 274 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(TT);
+ }
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 277 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(TT);
+ }
+ YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 280 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(UL);
+ }
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 283 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(UL);
+ }
+ YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 286 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(C);
+ }
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 289 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(C);
+ }
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 292 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(B);
+ }
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 295 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(B);
+ }
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 298 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(SC);
+ }
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 301 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(SC);
+ }
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 304 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(ELISION);
+ }
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 307 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(ELISION);
+ }
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 310 "gabc/gabc-score-determination.l"
+{
+ BEGIN(sp);
+ return SP_BEGIN;
+ }
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 314 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return SP_END;
+ }
+ YY_BREAK
+case 48:
+/* rule 48 can match eol */
+YY_RULE_SETUP
+#line 318 "gabc/gabc-score-determination.l"
+{
+ RETURN_SPACE;
+ }
+ YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 321 "gabc/gabc-score-determination.l"
+{
+ RETURN_CHARACTERS;
+ }
+ YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 324 "gabc/gabc-score-determination.l"
+{
+ BEGIN(comments);
+ }
+ YY_BREAK
+case 51:
+/* rule 51 can match eol */
+YY_RULE_SETUP
+#line 327 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ }
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 330 "gabc/gabc-score-determination.l"
+{
+ /* ignored */
+ }
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 333 "gabc/gabc-score-determination.l"
+{
+ BEGIN(verb);
+ return VERB_BEGIN;
+ }
+ YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 337 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return VERB_END;
+ }
+ YY_BREAK
+case 55:
+/* rule 55 can match eol */
+YY_RULE_SETUP
+#line 341 "gabc/gabc-score-determination.l"
+{
+ RETURN_CHARACTERS;
+ }
+ YY_BREAK
+case 56:
+YY_RULE_SETUP
+#line 344 "gabc/gabc-score-determination.l"
+{
+ RETURN_CHARACTERS;
+ }
+ YY_BREAK
+case 57:
+YY_RULE_SETUP
+#line 347 "gabc/gabc-score-determination.l"
+{
+ return CENTER_BEGIN;
+ }
+ YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 350 "gabc/gabc-score-determination.l"
+{
+ return CENTER_END;
+ }
+ YY_BREAK
+case 59:
+YY_RULE_SETUP
+#line 353 "gabc/gabc-score-determination.l"
+{
+ BEGIN(alt);
+ return ALT_BEGIN;
+ }
+ YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 357 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return ALT_END;
+ }
+ YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 361 "gabc/gabc-score-determination.l"
+{
+ return EUOUAE_B;
+ }
+ YY_BREAK
+case 62:
+YY_RULE_SETUP
+#line 364 "gabc/gabc-score-determination.l"
+{
+ return EUOUAE_E;
+ }
+ YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 367 "gabc/gabc-score-determination.l"
+{
+ return TRANSLATION_CENTER_END;
+ }
+ YY_BREAK
+case 64:
+YY_RULE_SETUP
+#line 370 "gabc/gabc-score-determination.l"
+{
+ return TRANSLATION_BEGIN;
+ }
+ YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 373 "gabc/gabc-score-determination.l"
+{
+ return TRANSLATION_END;
+ }
+ YY_BREAK
+case 66:
+/* rule 66 can match eol */
+YY_RULE_SETUP
+#line 376 "gabc/gabc-score-determination.l"
+{
+ return CLEAR;
+ }
+ YY_BREAK
+case 67:
+/* rule 67 can match eol */
+YY_RULE_SETUP
+#line 379 "gabc/gabc-score-determination.l"
+{
+ return PROTRUSION;
+ }
+ YY_BREAK
+case 68:
+/* rule 68 can match eol */
+YY_RULE_SETUP
+#line 382 "gabc/gabc-score-determination.l"
+{
+ BEGIN(protrusion_value);
+ return PROTRUSION;
+ }
+ YY_BREAK
+case 69:
+YY_RULE_SETUP
+#line 386 "gabc/gabc-score-determination.l"
+{
+ BEGIN(protrusion_end);
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return PROTRUSION_VALUE;
+ }
+ YY_BREAK
+case 70:
+/* rule 70 can match eol */
+YY_RULE_SETUP
+#line 392 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return PROTRUSION_END;
+ }
+ YY_BREAK
+case 71:
+YY_RULE_SETUP
+#line 396 "gabc/gabc-score-determination.l"
+{
+ BEGIN(notes);
+ return OPENING_BRACKET;
+ }
+ YY_BREAK
+case 72:
+/* rule 72 can match eol */
+YY_RULE_SETUP
+#line 400 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return NOTES;
+ }
+ YY_BREAK
+case 73:
+YY_RULE_SETUP
+#line 405 "gabc/gabc-score-determination.l"
+{
+ return NABC_CUT;
+ }
+ YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 408 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return CLOSING_BRACKET;
+ }
+ YY_BREAK
+case 75:
+/* rule 75 can match eol */
+YY_RULE_SETUP
+#line 412 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return CLOSING_BRACKET_WITH_SPACE;
+ }
+ YY_BREAK
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(attribute):
+case YY_STATE_EOF(score):
+case YY_STATE_EOF(notes):
+case YY_STATE_EOF(sp):
+case YY_STATE_EOF(verb):
+case YY_STATE_EOF(comments):
+case YY_STATE_EOF(inicomments):
+case YY_STATE_EOF(alt):
+case YY_STATE_EOF(protrusion_value):
+case YY_STATE_EOF(protrusion_end):
+#line 416 "gabc/gabc-score-determination.l"
+{
+ if (!eof_found) {
+ eof_found = true;
+ return END_OF_FILE;
+ } else {
+ yyterminate();
+ }
+ }
+ YY_BREAK
+case 76:
+/* rule 76 can match eol */
+YY_RULE_SETUP
+#line 424 "gabc/gabc-score-determination.l"
+{
+ gregorio_messagef("gabc_score_determination_lex", VERBOSITY_ERROR, 0,
+ _("unrecognized character: \"%c\""),
+ gabc_score_determination_text[0]);
+ }
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 429 "gabc/gabc-score-determination.l"
+ECHO;
+ YY_BREAK
+#line 2007 "gabc/gabc-score-determination-l.c"
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between YY_CURRENT_BUFFER and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = (yy_c_buf_p);
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( yywrap( ) )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of user's declarations */
+} /* end of yylex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
+ int ret_val;
+
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+ else
+ {
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+
+ int yy_c_buf_p_offset =
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = NULL;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ if ( (yy_n_chars) == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
+ }
+
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+ static yy_state_type yy_get_previous_state (void)
+{
+ yy_state_type yy_current_state;
+ char *yy_cp;
+
+ yy_current_state = (yy_start);
+ yy_current_state += YY_AT_BOL();
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ {
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 309 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ }
+
+ return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
+
+ YY_CHAR yy_c = 1;
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 309 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_is_jam = (yy_current_state == 308);
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+#ifndef YY_NO_UNPUT
+
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+ static int yyinput (void)
+#else
+ static int input (void)
+#endif
+
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
+
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ /* This was really a NUL. */
+ *(yy_c_buf_p) = '\0';
+
+ else
+ { /* need more input */
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+ ++(yy_c_buf_p);
+
+ switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap( ) )
+ return 0;
+
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ (yy_hold_char) = *++(yy_c_buf_p);
+
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
+
+ return c;
+}
+#endif /* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void yyrestart (FILE * input_file )
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
+ return;
+
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ yy_load_buffer_state( );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void yy_load_buffer_state (void)
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
+ if ( ! b )
+ return;
+
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yyfree( (void *) b->yy_ch_buf );
+
+ yyfree( (void *) b );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+
+{
+ int oerrno = errno;
+
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+ void yy_flush_buffer (YY_BUFFER_STATE b )
+{
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == YY_CURRENT_BUFFER )
+ yy_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+ if (new_buffer == NULL)
+ return;
+
+ yyensure_buffer_stack();
+
+ /* This block is copied from yy_switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+void yypop_buffer_state (void)
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+ }
+}
+
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+ yy_size_t num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
+
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+{
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return NULL;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = NULL;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
+{
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
+{
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
+
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yynoreturn yy_fatal_error (const char* msg )
+{
+ fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
+
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
+
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
+
+/** Get the length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
+
+/** Get the current token.
+ *
+ */
+
+char *yyget_text (void)
+{
+ return yytext;
+}
+
+/** Set the current line number.
+ * @param _line_number line number
+ *
+ */
+void yyset_lineno (int _line_number )
+{
+
+ yylineno = _line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param _in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE * _in_str )
+{
+ yyin = _in_str ;
+}
+
+void yyset_out (FILE * _out_str )
+{
+ yyout = _out_str ;
+}
+
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
+
+void yyset_debug (int _bdebug )
+{
+ yy_flex_debug = _bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ (yy_buffer_stack) = NULL;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = NULL;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+ (yy_start_stack_ptr) = 0;
+ (yy_start_stack_depth) = 0;
+ (yy_start_stack) = NULL;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
+#else
+ yyin = NULL;
+ yyout = NULL;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ yy_delete_buffer( YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ yypop_buffer_state();
+ }
+
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+
+ /* Destroy the start condition stack. */
+ yyfree( (yy_start_stack) );
+ (yy_start_stack) = NULL;
+
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+
+ return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
+{
+
+ int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (const char * s )
+{
+ int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *yyalloc (yy_size_t size )
+{
+ return malloc(size);
+}
+
+void *yyrealloc (void * ptr, yy_size_t size )
+{
+
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return realloc(ptr, size);
+}
+
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 429 "gabc/gabc-score-determination.l"
+
+
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.h b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.h
new file mode 100644
index 00000000000..7e311979a47
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.h
@@ -0,0 +1,721 @@
+#ifndef gabc_score_determination_HEADER_H
+#define gabc_score_determination_HEADER_H 1
+#define gabc_score_determination_IN_HEADER 1
+
+#line 5 "gabc/gabc-score-determination-l.h"
+
+#line 7 "gabc/gabc-score-determination-l.h"
+
+#define YY_INT_ALIGNED long int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+#ifdef yy_create_buffer
+#define gabc_score_determination__create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer gabc_score_determination__create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define gabc_score_determination__delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer gabc_score_determination__delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define gabc_score_determination__scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer gabc_score_determination__scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define gabc_score_determination__scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string gabc_score_determination__scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define gabc_score_determination__scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes gabc_score_determination__scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define gabc_score_determination__init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer gabc_score_determination__init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define gabc_score_determination__flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer gabc_score_determination__flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define gabc_score_determination__load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state gabc_score_determination__load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define gabc_score_determination__switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer gabc_score_determination__switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define gabc_score_determination_push_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state gabc_score_determination_push_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define gabc_score_determination_pop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state gabc_score_determination_pop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define gabc_score_determination_ensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack gabc_score_determination_ensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define gabc_score_determination_lex_ALREADY_DEFINED
+#else
+#define yylex gabc_score_determination_lex
+#endif
+
+#ifdef yyrestart
+#define gabc_score_determination_restart_ALREADY_DEFINED
+#else
+#define yyrestart gabc_score_determination_restart
+#endif
+
+#ifdef yylex_init
+#define gabc_score_determination_lex_init_ALREADY_DEFINED
+#else
+#define yylex_init gabc_score_determination_lex_init
+#endif
+
+#ifdef yylex_init_extra
+#define gabc_score_determination_lex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra gabc_score_determination_lex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define gabc_score_determination_lex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy gabc_score_determination_lex_destroy
+#endif
+
+#ifdef yyget_debug
+#define gabc_score_determination_get_debug_ALREADY_DEFINED
+#else
+#define yyget_debug gabc_score_determination_get_debug
+#endif
+
+#ifdef yyset_debug
+#define gabc_score_determination_set_debug_ALREADY_DEFINED
+#else
+#define yyset_debug gabc_score_determination_set_debug
+#endif
+
+#ifdef yyget_extra
+#define gabc_score_determination_get_extra_ALREADY_DEFINED
+#else
+#define yyget_extra gabc_score_determination_get_extra
+#endif
+
+#ifdef yyset_extra
+#define gabc_score_determination_set_extra_ALREADY_DEFINED
+#else
+#define yyset_extra gabc_score_determination_set_extra
+#endif
+
+#ifdef yyget_in
+#define gabc_score_determination_get_in_ALREADY_DEFINED
+#else
+#define yyget_in gabc_score_determination_get_in
+#endif
+
+#ifdef yyset_in
+#define gabc_score_determination_set_in_ALREADY_DEFINED
+#else
+#define yyset_in gabc_score_determination_set_in
+#endif
+
+#ifdef yyget_out
+#define gabc_score_determination_get_out_ALREADY_DEFINED
+#else
+#define yyget_out gabc_score_determination_get_out
+#endif
+
+#ifdef yyset_out
+#define gabc_score_determination_set_out_ALREADY_DEFINED
+#else
+#define yyset_out gabc_score_determination_set_out
+#endif
+
+#ifdef yyget_leng
+#define gabc_score_determination_get_leng_ALREADY_DEFINED
+#else
+#define yyget_leng gabc_score_determination_get_leng
+#endif
+
+#ifdef yyget_text
+#define gabc_score_determination_get_text_ALREADY_DEFINED
+#else
+#define yyget_text gabc_score_determination_get_text
+#endif
+
+#ifdef yyget_lineno
+#define gabc_score_determination_get_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno gabc_score_determination_get_lineno
+#endif
+
+#ifdef yyset_lineno
+#define gabc_score_determination_set_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno gabc_score_determination_set_lineno
+#endif
+
+#ifdef yywrap
+#define gabc_score_determination_wrap_ALREADY_DEFINED
+#else
+#define yywrap gabc_score_determination_wrap
+#endif
+
+#ifdef yyalloc
+#define gabc_score_determination_alloc_ALREADY_DEFINED
+#else
+#define yyalloc gabc_score_determination_alloc
+#endif
+
+#ifdef yyrealloc
+#define gabc_score_determination_realloc_ALREADY_DEFINED
+#else
+#define yyrealloc gabc_score_determination_realloc
+#endif
+
+#ifdef yyfree
+#define gabc_score_determination_free_ALREADY_DEFINED
+#else
+#define yyfree gabc_score_determination_free
+#endif
+
+#ifdef yytext
+#define gabc_score_determination_text_ALREADY_DEFINED
+#else
+#define yytext gabc_score_determination_text
+#endif
+
+#ifdef yyleng
+#define gabc_score_determination_leng_ALREADY_DEFINED
+#else
+#define yyleng gabc_score_determination_leng
+#endif
+
+#ifdef yyin
+#define gabc_score_determination_in_ALREADY_DEFINED
+#else
+#define yyin gabc_score_determination_in
+#endif
+
+#ifdef yyout
+#define gabc_score_determination_out_ALREADY_DEFINED
+#else
+#define yyout gabc_score_determination_out
+#endif
+
+#ifdef yy_flex_debug
+#define gabc_score_determination__flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug gabc_score_determination__flex_debug
+#endif
+
+#ifdef yylineno
+#define gabc_score_determination_lineno_ALREADY_DEFINED
+#else
+#define yylineno gabc_score_determination_lineno
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* begin standard C++ headers. */
+
+/* TODO: this is always defined, so inline it */
+#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
+#else
+#define yynoreturn
+#endif
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern int yyleng;
+
+extern FILE *yyin, *yyout;
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ int yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
+
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+
+/* Begin user sect3 */
+
+#define gabc_score_determination_wrap() (/*CONSTCOND*/1)
+#define YY_SKIP_YYWRAP
+
+extern int yylineno;
+
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
+
+#ifdef YY_HEADER_EXPORT_START_CONDITIONS
+#define INITIAL 0
+#define attribute 1
+#define score 2
+#define notes 3
+#define sp 4
+#define verb 5
+#define comments 6
+#define inicomments 7
+#define alt 8
+#define protrusion_value 9
+#define protrusion_end 10
+
+#endif
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy ( void );
+
+int yyget_debug ( void );
+
+void yyset_debug ( int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra ( void );
+
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in ( void );
+
+void yyset_in ( FILE * _in_str );
+
+FILE *yyget_out ( void );
+
+void yyset_out ( FILE * _out_str );
+
+ int yyget_leng ( void );
+
+char *yyget_text ( void );
+
+int yyget_lineno ( void );
+
+void yyset_lineno ( int _line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap ( void );
+#else
+extern int yywrap ( void );
+#endif
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy ( char *, const char *, int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen ( const char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+#undef YY_NEW_FILE
+#undef YY_FLUSH_BUFFER
+#undef yy_set_bol
+#undef yy_new_buffer
+#undef yy_set_interactive
+#undef YY_DO_BEFORE_ACTION
+
+#ifdef YY_DECL_IS_OURS
+#undef YY_DECL_IS_OURS
+#undef YY_DECL
+#endif
+
+#ifndef gabc_score_determination__create_buffer_ALREADY_DEFINED
+#undef yy_create_buffer
+#endif
+#ifndef gabc_score_determination__delete_buffer_ALREADY_DEFINED
+#undef yy_delete_buffer
+#endif
+#ifndef gabc_score_determination__scan_buffer_ALREADY_DEFINED
+#undef yy_scan_buffer
+#endif
+#ifndef gabc_score_determination__scan_string_ALREADY_DEFINED
+#undef yy_scan_string
+#endif
+#ifndef gabc_score_determination__scan_bytes_ALREADY_DEFINED
+#undef yy_scan_bytes
+#endif
+#ifndef gabc_score_determination__init_buffer_ALREADY_DEFINED
+#undef yy_init_buffer
+#endif
+#ifndef gabc_score_determination__flush_buffer_ALREADY_DEFINED
+#undef yy_flush_buffer
+#endif
+#ifndef gabc_score_determination__load_buffer_state_ALREADY_DEFINED
+#undef yy_load_buffer_state
+#endif
+#ifndef gabc_score_determination__switch_to_buffer_ALREADY_DEFINED
+#undef yy_switch_to_buffer
+#endif
+#ifndef gabc_score_determination_push_buffer_state_ALREADY_DEFINED
+#undef yypush_buffer_state
+#endif
+#ifndef gabc_score_determination_pop_buffer_state_ALREADY_DEFINED
+#undef yypop_buffer_state
+#endif
+#ifndef gabc_score_determination_ensure_buffer_stack_ALREADY_DEFINED
+#undef yyensure_buffer_stack
+#endif
+#ifndef gabc_score_determination_lex_ALREADY_DEFINED
+#undef yylex
+#endif
+#ifndef gabc_score_determination_restart_ALREADY_DEFINED
+#undef yyrestart
+#endif
+#ifndef gabc_score_determination_lex_init_ALREADY_DEFINED
+#undef yylex_init
+#endif
+#ifndef gabc_score_determination_lex_init_extra_ALREADY_DEFINED
+#undef yylex_init_extra
+#endif
+#ifndef gabc_score_determination_lex_destroy_ALREADY_DEFINED
+#undef yylex_destroy
+#endif
+#ifndef gabc_score_determination_get_debug_ALREADY_DEFINED
+#undef yyget_debug
+#endif
+#ifndef gabc_score_determination_set_debug_ALREADY_DEFINED
+#undef yyset_debug
+#endif
+#ifndef gabc_score_determination_get_extra_ALREADY_DEFINED
+#undef yyget_extra
+#endif
+#ifndef gabc_score_determination_set_extra_ALREADY_DEFINED
+#undef yyset_extra
+#endif
+#ifndef gabc_score_determination_get_in_ALREADY_DEFINED
+#undef yyget_in
+#endif
+#ifndef gabc_score_determination_set_in_ALREADY_DEFINED
+#undef yyset_in
+#endif
+#ifndef gabc_score_determination_get_out_ALREADY_DEFINED
+#undef yyget_out
+#endif
+#ifndef gabc_score_determination_set_out_ALREADY_DEFINED
+#undef yyset_out
+#endif
+#ifndef gabc_score_determination_get_leng_ALREADY_DEFINED
+#undef yyget_leng
+#endif
+#ifndef gabc_score_determination_get_text_ALREADY_DEFINED
+#undef yyget_text
+#endif
+#ifndef gabc_score_determination_get_lineno_ALREADY_DEFINED
+#undef yyget_lineno
+#endif
+#ifndef gabc_score_determination_set_lineno_ALREADY_DEFINED
+#undef yyset_lineno
+#endif
+#ifndef gabc_score_determination_get_column_ALREADY_DEFINED
+#undef yyget_column
+#endif
+#ifndef gabc_score_determination_set_column_ALREADY_DEFINED
+#undef yyset_column
+#endif
+#ifndef gabc_score_determination_wrap_ALREADY_DEFINED
+#undef yywrap
+#endif
+#ifndef gabc_score_determination_get_lval_ALREADY_DEFINED
+#undef yyget_lval
+#endif
+#ifndef gabc_score_determination_set_lval_ALREADY_DEFINED
+#undef yyset_lval
+#endif
+#ifndef gabc_score_determination_get_lloc_ALREADY_DEFINED
+#undef yyget_lloc
+#endif
+#ifndef gabc_score_determination_set_lloc_ALREADY_DEFINED
+#undef yyset_lloc
+#endif
+#ifndef gabc_score_determination_alloc_ALREADY_DEFINED
+#undef yyalloc
+#endif
+#ifndef gabc_score_determination_realloc_ALREADY_DEFINED
+#undef yyrealloc
+#endif
+#ifndef gabc_score_determination_free_ALREADY_DEFINED
+#undef yyfree
+#endif
+#ifndef gabc_score_determination_text_ALREADY_DEFINED
+#undef yytext
+#endif
+#ifndef gabc_score_determination_leng_ALREADY_DEFINED
+#undef yyleng
+#endif
+#ifndef gabc_score_determination_in_ALREADY_DEFINED
+#undef yyin
+#endif
+#ifndef gabc_score_determination_out_ALREADY_DEFINED
+#undef yyout
+#endif
+#ifndef gabc_score_determination__flex_debug_ALREADY_DEFINED
+#undef yy_flex_debug
+#endif
+#ifndef gabc_score_determination_lineno_ALREADY_DEFINED
+#undef yylineno
+#endif
+#ifndef gabc_score_determination_tables_fload_ALREADY_DEFINED
+#undef yytables_fload
+#endif
+#ifndef gabc_score_determination_tables_destroy_ALREADY_DEFINED
+#undef yytables_destroy
+#endif
+#ifndef gabc_score_determination_TABLES_NAME_ALREADY_DEFINED
+#undef yyTABLES_NAME
+#endif
+
+#line 429 "gabc/gabc-score-determination.l"
+
+
+#line 719 "gabc/gabc-score-determination-l.h"
+#undef gabc_score_determination_IN_HEADER
+#endif /* gabc_score_determination_HEADER_H */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.c
new file mode 100644
index 00000000000..9f4ddd2119c
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.c
@@ -0,0 +1,3178 @@
+/* A Bison parser, made by GNU Bison 3.3.2. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Undocumented macros, especially those whose name start with YY_,
+ are private implementation details. Do not rely on them. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "3.3.2"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+/* Substitute the variable and function names. */
+#define yyparse gabc_score_determination_parse
+#define yylex gabc_score_determination_lex
+#define yyerror gabc_score_determination_error
+#define yydebug gabc_score_determination_debug
+#define yynerrs gabc_score_determination_nerrs
+
+#define yylval gabc_score_determination_lval
+#define yychar gabc_score_determination_char
+#define yylloc gabc_score_determination_lloc
+
+/* First part of user prologue. */
+#line 1 "gabc/gabc-score-determination.y" /* yacc.c:337 */
+
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the score parser.
+ *
+ * Gregorio score determination from gabc.
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ *
+ * This file is certainly not the most easy to understand, it is a bison file.
+ * See the bison manual on gnu.org for further details.
+ *
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "characters.h"
+#include "support.h"
+#include "sha1.h"
+#include "plugins.h"
+#include "gabc.h"
+
+#define YYLLOC_DEFAULT(Current, Rhs, N) \
+ if (N) { \
+ (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).first_offset = YYRHSLOC (Rhs, 1).first_offset; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ (Current).last_offset = YYRHSLOC (Rhs, N).last_offset; \
+ (Current).generate_point_and_click = YYRHSLOC (Rhs, 1).generate_point_and_click; \
+ } else { \
+ (Current).first_line = (Current).last_line = YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = YYRHSLOC (Rhs, 0).last_column; \
+ (Current).first_offset = (Current).last_offset = YYRHSLOC (Rhs, 0).last_offset; \
+ (Current).first_offset = (Current).last_offset = YYRHSLOC (Rhs, 0).last_offset; \
+ (Current).generate_point_and_click = YYRHSLOC (Rhs, 0).generate_point_and_click; \
+ }
+
+#include "gabc-score-determination.h"
+#include "gabc-score-determination-l.h"
+
+/* workaround for bison issue passing pointer to a "local" variable */
+#define STYLE_BITS &styles
+
+/* forward declaration of the flex/bison process function */
+static int gabc_score_determination_parse(void);
+
+/* uncomment it if you want to have an interactive shell to understand the
+ * details on how bison works for a certain input */
+/* int gabc_score_determination_debug=1; */
+
+/*
+ *
+ * We will need some variables and functions through the entire file, we
+ * declare them there:
+ *
+ */
+
+/* the score that we will determine and return */
+static gregorio_score *score;
+/* an array of elements that we will use for each syllable */
+static gregorio_element **elements;
+gregorio_element *current_element;
+/* a table containing the macros to use in gabc file */
+static char *macros[10];
+/* other variables that we will have to use */
+static gregorio_character *current_character;
+static gregorio_character *suspended_character;
+static gregorio_character *first_text_character;
+static gregorio_character *first_translation_character;
+static gregorio_tr_centering translation_type;
+static gregorio_nlba no_linebreak_area;
+static gregorio_euouae euouae;
+static gregorio_voice_info *current_voice_info;
+static int number_of_voices;
+static int voice;
+/* see comments on text to understand this */
+static gregorio_center_determination center_is_determined;
+/* current_key is... the current key... updated by each notes determination
+ * (for key changes) */
+static int current_key;
+static bool got_language;
+static bool got_staff_lines;
+static bool started_first_word;
+static struct sha1_ctx digester;
+static gabc_style_bits styles;
+static bool generate_point_and_click;
+static bool clear_syllable_text;
+static bool has_protrusion;
+
+/* punctum_inclinatum_orientation maintains the running punctum inclinatum
+ * orientation in order to decide if the glyph needs to be cut when a punctum
+ * inclinatum with forced orientation is encountered. This should be set to
+ * the shape of a non-liquescent punctum inclinatum with forced orientation
+ * when one is encountered, be left alone when a non-liquescent punctum
+ * inclinatum with undetermined orientation is encountered, or be reset to
+ * S_PUNCTUM_INCLINATUM_UNDETERMINED otherwise (because such ends any previous
+ * run of punctum inclinatum notes). Based on the assumption that a punctum
+ * inclinatum with forced orientation changes all the punctum inclinatum shapes
+ * with undetermined orientation in the same run of notes before and after it
+ * unless influenced by an earlier punctum inclinatum with forced orientation,
+ * the value of punctum_inclinatum_orientation can be used to determine if a
+ * punctum inclinatum with a forced orientation will have a different
+ * orientation than the punctum inclinatum immediately before it, which would
+ * require a cut of the glyph. */
+static gregorio_shape punctum_inclinatum_orientation;
+
+static __inline void check_multiple(const char *name, bool exists) {
+ if (exists) {
+ gregorio_messagef("det_score", VERBOSITY_WARNING, 0,
+ _("several %s definitions found, only the last will be taken "
+ "into consideration"), name);
+ }
+}
+
+static void gabc_score_determination_error(const char *error_str)
+{
+ gregorio_message(error_str, (const char *) "gabc_score_determination_parse",
+ VERBOSITY_ERROR, 0);
+}
+
+/*
+ * The function that will initialize the variables.
+ */
+
+static void initialize_variables(bool point_and_click)
+{
+ int i;
+ /* build a brand new empty score */
+ score = gregorio_new_score();
+ /* initialization of the first voice info to an empty voice info */
+ current_voice_info = NULL;
+ gregorio_add_voice_info(&current_voice_info);
+ score->first_voice_info = current_voice_info;
+ /* other initializations */
+ number_of_voices = 1;
+ voice = 0; /* first (and only) voice */
+ current_character = NULL;
+ suspended_character = NULL;
+ first_translation_character = NULL;
+ first_text_character = NULL;
+ translation_type = TR_NORMAL;
+ no_linebreak_area = NLBA_NORMAL;
+ euouae = EUOUAE_NORMAL;
+ center_is_determined = CENTER_NOT_DETERMINED;
+ current_key = gregorio_calculate_new_key(gregorio_default_clef);
+ for (i = 0; i < 10; i++) {
+ macros[i] = NULL;
+ }
+ got_language = false;
+ got_staff_lines = false;
+ started_first_word = false;
+ styles = 0;
+ punctum_inclinatum_orientation = S_PUNCTUM_INCLINATUM_UNDETERMINED;
+ generate_point_and_click = point_and_click;
+ clear_syllable_text = false;
+ has_protrusion = false;
+}
+
+/*
+ * function that frees the variables that need it, for when we have finished to
+ * determine the score
+ */
+
+static void free_variables(void)
+{
+ int i;
+ free(elements);
+ for (i = 0; i < 10; i++) {
+ free(macros[i]);
+ }
+}
+
+/*
+ * Function called when we have reached the end of the definitions, it tries to
+ * make the voice_infos coherent.
+ */
+static void end_definitions(void)
+{
+ int i;
+
+ gregorio_assert_only(gabc_check_infos_integrity(score), end_definitions,
+ "can't determine valid infos on the score");
+
+ elements = (gregorio_element **) gregorio_malloc(number_of_voices *
+ sizeof(gregorio_element *));
+ for (i = 0; i < number_of_voices; i++) {
+ elements[i] = NULL;
+ }
+
+ if (!got_language) {
+ static char latin[] = "Latin";
+ gregorio_set_centering_language(latin);
+ }
+}
+
+/*
+ * Here starts the code for the determinations of the notes. The notes are not
+ * precisely determined here, we separate the text describing the notes of each
+ * voice, and we call determine_elements_from_string to really determine them.
+ */
+static char position = WORD_BEGINNING;
+static gregorio_syllable *current_syllable = NULL;
+static char *abovelinestext = NULL;
+
+/*
+ * Function called each time we find a space, it updates the current position.
+ */
+static void update_position_with_space(void)
+{
+ if (position == WORD_MIDDLE) {
+ position = WORD_END;
+ }
+ if (position == WORD_BEGINNING) {
+ position = WORD_ONE_SYLLABLE;
+ }
+}
+
+/*
+ * When we encounter a translation center ending, we call this function that
+ * sets translation_type = TR_WITH_CENTER_BEGINNING on previous syllable with
+ * translation
+ */
+static void gregorio_set_translation_center_beginning(
+ gregorio_syllable *current_syllable)
+{
+ gregorio_syllable *syllable = current_syllable->previous_syllable;
+ while (syllable) {
+ if (syllable->translation_type == TR_WITH_CENTER_END) {
+ gregorio_message("encountering translation centering end but "
+ "cannot find translation centering beginning...",
+ "set_translation_center_beginning", VERBOSITY_ERROR, 0);
+ current_syllable->translation_type = TR_NORMAL;
+ return;
+ }
+ if (syllable->translation) {
+ syllable->translation_type = TR_WITH_CENTER_BEGINNING;
+ return;
+ }
+ syllable = syllable->previous_syllable;
+ }
+ /* we didn't find any beginning... */
+ gregorio_message("encountering translation centering end but cannot find "
+ "translation centering beginning...",
+ "set_translation_center_beginning", VERBOSITY_ERROR, 0);
+ current_syllable->translation_type = TR_NORMAL;
+}
+
+static void ready_characters(void)
+{
+ if (current_character) {
+ gregorio_go_to_first_character_c(&current_character);
+ if (!score->first_syllable || (current_syllable
+ && !current_syllable->previous_syllable
+ && !current_syllable->text)) {
+ started_first_word = true;
+ }
+ }
+}
+
+static void rebuild_score_characters(void)
+{
+ if (score->first_syllable) {
+ gregorio_syllable *syllable;
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ const gregorio_character *t;
+
+ /* find out if there is a forced center */
+ gregorio_center_determination center = CENTER_NOT_DETERMINED;
+ for (t = syllable->text; t; t = t->next_character) {
+ if (!t->is_character && t->cos.s.style == ST_FORCED_CENTER) {
+ syllable->forced_center = true;
+ center = CENTER_FULLY_DETERMINED;
+ break;
+ }
+ }
+
+ if (syllable == score->first_syllable) {
+ /* leave the first syllable text untouched at this time */
+ continue;
+ }
+
+ gregorio_rebuild_characters(&(syllable->text), center, false);
+
+ if (syllable->first_word) {
+ gregorio_set_first_word(&(syllable->text));
+ }
+ }
+ }
+}
+
+/*
+ *
+ * The two functions called when lex returns a style, we simply add it. All the
+ * complex things will be done by the function after...
+ *
+ */
+
+static void add_style(unsigned char style)
+{
+ gregorio_begin_style(&current_character, style);
+}
+
+static void end_style(unsigned char style)
+{
+ gregorio_end_style(&current_character, style);
+}
+
+static __inline void save_text(void)
+{
+ if (has_protrusion) {
+ end_style(ST_PROTRUSION);
+ }
+ ready_characters();
+ first_text_character = current_character;
+}
+
+/* a function called when we see a [, basically, all characters are added to
+ * the translation pointer instead of the text pointer */
+static void start_translation(unsigned char asked_translation_type)
+{
+ suspended_character = current_character;
+ /* the middle letters of the translation have no sense */
+ /*center_is_determined = CENTER_FULLY_DETERMINED;*/
+ current_character = NULL;
+ translation_type = asked_translation_type;
+}
+
+static void end_translation(void)
+{
+ ready_characters();
+ first_translation_character = current_character;
+ current_character = suspended_character;
+}
+
+/*
+ * add_text is the function called when lex returns a char *. In
+ * this function we convert it into grewchar, and then we add the corresponding
+ * gregorio_characters in the list of gregorio_characters.
+ */
+
+static void add_text(char *mbcharacters)
+{
+ if (!current_character) {
+ /* insert open styles, leaving out ELISION on purpose */
+ if (styles & SB_I) {
+ add_style(ST_ITALIC);
+ }
+ if (styles & SB_B) {
+ add_style(ST_BOLD);
+ }
+ if (styles & SB_TT) {
+ add_style(ST_TT);
+ }
+ if (styles & SB_SC) {
+ add_style(ST_SMALL_CAPS);
+ }
+ if (styles & SB_UL) {
+ add_style(ST_UNDERLINED);
+ }
+ if (styles & SB_C) {
+ add_style(ST_COLORED);
+ }
+ }
+ if (current_character) {
+ current_character->next_character = gregorio_build_char_list_from_buf(
+ mbcharacters);
+ current_character->next_character->previous_character =
+ current_character;
+ } else {
+ current_character = gregorio_build_char_list_from_buf(mbcharacters);
+ }
+ while (current_character && current_character->next_character) {
+ current_character = current_character->next_character;
+ }
+ free(mbcharacters);
+}
+
+static void add_protrusion(char *factor)
+{
+ if (has_protrusion) {
+ gregorio_message("syllable already has protrusion; pr tag ignored",
+ "det_score", VERBOSITY_WARNING, 0);
+ free(factor);
+ } else {
+ if (center_is_determined == CENTER_HALF_DETERMINED) {
+ gregorio_message("closing open syllable center before protrusion",
+ "det_score", VERBOSITY_WARNING, 0);
+ end_style(ST_FORCED_CENTER);
+ center_is_determined = CENTER_FULLY_DETERMINED;
+ }
+
+ add_style(ST_PROTRUSION_FACTOR);
+ add_text(factor);
+ end_style(ST_PROTRUSION_FACTOR);
+ add_style(ST_PROTRUSION);
+ has_protrusion = true;
+ }
+}
+
+static void add_auto_protrusion(char *protrusion)
+{
+ if (has_protrusion) {
+ add_text(protrusion);
+ } else {
+ add_style(ST_PROTRUSION_FACTOR);
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreProtrusionFactor{"));
+
+ switch (*protrusion) {
+ case ',':
+ add_text(gregorio_strdup("comma"));
+ break;
+ case ';':
+ add_text(gregorio_strdup("semicolon"));
+ break;
+ case ':':
+ add_text(gregorio_strdup("colon"));
+ break;
+ case '.':
+ add_text(gregorio_strdup("period"));
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(add_auto_protrusion,
+ "unsupported protruding punctuation: %c", *protrusion);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+
+ add_text(gregorio_strdup("}"));
+ end_style(ST_VERBATIM);
+ end_style(ST_PROTRUSION_FACTOR);
+
+ add_style(ST_PROTRUSION);
+ add_text(protrusion);
+ end_style(ST_PROTRUSION);
+
+ has_protrusion = true;
+ }
+}
+
+/*
+ * Function to close a syllable and update the position.
+ */
+
+static void close_syllable(YYLTYPE *loc)
+{
+ int i = 0;
+ gregorio_character *ch;
+
+ /* make sure any elisions that are opened are closed within the syllable */
+ for (ch = first_text_character; ch; ch = ch->next_character) {
+ if (!ch->is_character) {
+ switch (ch->cos.s.style) {
+ case ST_ELISION:
+ switch (ch->cos.s.type) {
+ case ST_T_BEGIN:
+ ++i;
+ /* the parser precludes this from falling here */
+ gregorio_assert_only(i <= 1, close_syllable,
+ "elisions may not be nested");
+ break;
+
+ case ST_T_END:
+ --i;
+ /* the parser precludes this from failing here */
+ gregorio_assert_only(i >= 0, close_syllable,
+ "encountered elision end with no beginning");
+ break;
+
+ case ST_T_NOTHING:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(close_syllable, "encountered ST_T_NOTHING");
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+
+ case ST_FORCED_CENTER:
+ if (i > 0) {
+ gregorio_message(
+ _("forced center may not be within an elision"),
+ "close_syllable", VERBOSITY_ERROR, 0);
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+ /* the parser precludes this from failing here */
+ gregorio_assert_only(i == 0, close_syllable,
+ "encountered elision beginning with no end");
+
+ gregorio_add_syllable(&current_syllable, number_of_voices, elements,
+ first_text_character, first_translation_character, position,
+ abovelinestext, translation_type, no_linebreak_area, euouae, loc,
+ started_first_word, clear_syllable_text);
+ if (!score->first_syllable) {
+ /* we rebuild the first syllable if we have to */
+ score->first_syllable = current_syllable;
+ }
+ if (translation_type == TR_WITH_CENTER_END) {
+ gregorio_set_translation_center_beginning(current_syllable);
+ }
+ /* we update the position */
+ if (position == WORD_BEGINNING) {
+ position = WORD_MIDDLE;
+ }
+ if (position == WORD_ONE_SYLLABLE || position == WORD_END) {
+ position = WORD_BEGINNING;
+
+ if (started_first_word) {
+ started_first_word = false;
+ }
+ }
+ center_is_determined = CENTER_NOT_DETERMINED;
+ current_character = NULL;
+ suspended_character = NULL;
+ first_text_character = NULL;
+ first_translation_character = NULL;
+ translation_type = TR_NORMAL;
+ no_linebreak_area = NLBA_NORMAL;
+ euouae = EUOUAE_NORMAL;
+ abovelinestext = NULL;
+ for (i = 0; i < number_of_voices; i++) {
+ elements[i] = NULL;
+ }
+ current_element = NULL;
+ clear_syllable_text = false;
+ has_protrusion = false;
+}
+
+void gabc_digest(const void *const buf, const size_t size)
+{
+ sha1_process_bytes(buf, size, &digester);
+}
+
+/*
+ * The "main" function. It is the function that is called when we have to read
+ * a gabc file. It takes a file descriptor, that is to say a file that is
+ * aleady open. It returns a valid gregorio_score
+ */
+
+gregorio_score *gabc_read_score(FILE *f_in, bool point_and_click)
+{
+ /* compute the SHA-1 digest while parsing, for I/O efficiency */
+ sha1_init_ctx(&digester);
+ /* digest GREGORIO_VERSION to get a different value when the version
+ changes */
+ sha1_process_bytes(GREGORIO_VERSION, strlen(GREGORIO_VERSION), &digester);
+ /* the input file that flex will parse */
+ gabc_score_determination_in = f_in;
+ gregorio_assert(f_in, gabc_read_score, "can't read stream from NULL",
+ return NULL);
+ initialize_variables(point_and_click);
+ /* the flex/bison main call, it will build the score (that we have
+ * initialized) */
+ gabc_score_determination_parse();
+ if (!score->legacy_oriscus_orientation) {
+ gabc_determine_oriscus_orientation(score);
+ }
+ gabc_determine_punctum_inclinatum_orientation(score);
+ gabc_determine_ledger_lines(score);
+ gregorio_fix_initial_keys(score, gregorio_default_clef);
+ rebuild_score_characters();
+ gabc_suppress_extra_custos_at_linebreak(score);
+ gabc_fix_custos_pitches(score);
+ gabc_det_notes_finish();
+ free_variables();
+ /* then we check the validity and integrity of the score we have built. */
+ if (!gabc_check_score_integrity(score)) {
+ gregorio_message(_("unable to determine a valid score from file"),
+ "gabc_read_score", VERBOSITY_ERROR, 0);
+ }
+ sha1_finish_ctx(&digester, score->digest);
+ return score;
+}
+
+unsigned char nabc_state = 0;
+size_t nabc_lines = 0;
+
+static void gabc_y_add_notes(char *notes, YYLTYPE loc) {
+ if (nabc_state == 0) {
+ if (!elements[voice]) {
+ elements[voice] = gabc_det_elements_from_string(notes, &current_key,
+ macros, &loc, &punctum_inclinatum_orientation, score);
+ current_element = elements[voice];
+ } else {
+ gregorio_element *new_elements = gabc_det_elements_from_string(
+ notes, &current_key, macros, &loc,
+ &punctum_inclinatum_orientation, score);
+ gregorio_element *last_element = elements[voice];
+ while (last_element->next) {
+ last_element = last_element->next;
+ }
+ last_element->next = new_elements;
+ new_elements->previous = last_element;
+ current_element = new_elements;
+ }
+ } else {
+ if (!elements[voice]) {
+ gregorio_add_element(&elements[voice], NULL);
+ current_element = elements[voice];
+ }
+ gregorio_assert(current_element, gabc_y_add_notes,
+ "current_element is null, this shouldn't happen!",
+ return);
+ if (!current_element->nabc) {
+ current_element->nabc = (char **) gregorio_calloc (nabc_lines,
+ sizeof (char *));
+ }
+ current_element->nabc[nabc_state-1] = gregorio_strdup(notes);
+ current_element->nabc_lines = nabc_state;
+ }
+}
+
+static char *concatenate(char *first, char *const second) {
+ first = (char *)gregorio_realloc(first, strlen(first) + strlen(second) + 1);
+ strcat(first, second);
+ free(second);
+ return first;
+}
+
+#line 733 "gabc/gabc-score-determination-y.c" /* yacc.c:337 */
+# ifndef YY_NULLPTR
+# if defined __cplusplus
+# if 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# else
+# define YY_NULLPTR ((void*)0)
+# endif
+# endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* In a future release of Bison, this section will be replaced
+ by #include "gabc-score-determination-y.h". */
+#ifndef YY_GABC_SCORE_DETERMINATION_GABC_GABC_SCORE_DETERMINATION_Y_H_INCLUDED
+# define YY_GABC_SCORE_DETERMINATION_GABC_GABC_SCORE_DETERMINATION_Y_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int gabc_score_determination_debug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ NAME = 258,
+ AUTHOR = 259,
+ GABC_COPYRIGHT = 260,
+ SCORE_COPYRIGHT = 261,
+ LANGUAGE = 262,
+ STAFF_LINES = 263,
+ ORISCUS_ORIENTATION = 264,
+ DEF_MACRO = 265,
+ OTHER_HEADER = 266,
+ ANNOTATION = 267,
+ MODE = 268,
+ MODE_MODIFIER = 269,
+ MODE_DIFFERENTIA = 270,
+ END_OF_DEFINITIONS = 271,
+ END_OF_FILE = 272,
+ COLON = 273,
+ SEMICOLON = 274,
+ CHARACTERS = 275,
+ NOTES = 276,
+ HYPHEN = 277,
+ ATTRIBUTE = 278,
+ OPENING_BRACKET = 279,
+ CLOSING_BRACKET = 280,
+ CLOSING_BRACKET_WITH_SPACE = 281,
+ I_BEGIN = 282,
+ I_END = 283,
+ TT_BEGIN = 284,
+ TT_END = 285,
+ UL_BEGIN = 286,
+ UL_END = 287,
+ C_BEGIN = 288,
+ C_END = 289,
+ B_BEGIN = 290,
+ B_END = 291,
+ SC_BEGIN = 292,
+ SC_END = 293,
+ SP_BEGIN = 294,
+ SP_END = 295,
+ VERB_BEGIN = 296,
+ VERB_END = 297,
+ CENTER_BEGIN = 298,
+ CENTER_END = 299,
+ ELISION_BEGIN = 300,
+ ELISION_END = 301,
+ TRANSLATION_BEGIN = 302,
+ TRANSLATION_END = 303,
+ TRANSLATION_CENTER_END = 304,
+ ALT_BEGIN = 305,
+ ALT_END = 306,
+ NLBA_B = 307,
+ NLBA_E = 308,
+ EUOUAE_B = 309,
+ EUOUAE_E = 310,
+ NABC_CUT = 311,
+ NABC_LINES = 312,
+ CLEAR = 313,
+ PROTRUSION = 314,
+ PROTRUSION_VALUE = 315,
+ PROTRUSION_END = 316,
+ PROTRUDING_PUNCTUATION = 317
+ };
+#endif
+/* Tokens. */
+#define NAME 258
+#define AUTHOR 259
+#define GABC_COPYRIGHT 260
+#define SCORE_COPYRIGHT 261
+#define LANGUAGE 262
+#define STAFF_LINES 263
+#define ORISCUS_ORIENTATION 264
+#define DEF_MACRO 265
+#define OTHER_HEADER 266
+#define ANNOTATION 267
+#define MODE 268
+#define MODE_MODIFIER 269
+#define MODE_DIFFERENTIA 270
+#define END_OF_DEFINITIONS 271
+#define END_OF_FILE 272
+#define COLON 273
+#define SEMICOLON 274
+#define CHARACTERS 275
+#define NOTES 276
+#define HYPHEN 277
+#define ATTRIBUTE 278
+#define OPENING_BRACKET 279
+#define CLOSING_BRACKET 280
+#define CLOSING_BRACKET_WITH_SPACE 281
+#define I_BEGIN 282
+#define I_END 283
+#define TT_BEGIN 284
+#define TT_END 285
+#define UL_BEGIN 286
+#define UL_END 287
+#define C_BEGIN 288
+#define C_END 289
+#define B_BEGIN 290
+#define B_END 291
+#define SC_BEGIN 292
+#define SC_END 293
+#define SP_BEGIN 294
+#define SP_END 295
+#define VERB_BEGIN 296
+#define VERB_END 297
+#define CENTER_BEGIN 298
+#define CENTER_END 299
+#define ELISION_BEGIN 300
+#define ELISION_END 301
+#define TRANSLATION_BEGIN 302
+#define TRANSLATION_END 303
+#define TRANSLATION_CENTER_END 304
+#define ALT_BEGIN 305
+#define ALT_END 306
+#define NLBA_B 307
+#define NLBA_E 308
+#define EUOUAE_B 309
+#define EUOUAE_E 310
+#define NABC_CUT 311
+#define NABC_LINES 312
+#define CLEAR 313
+#define PROTRUSION 314
+#define PROTRUSION_VALUE 315
+#define PROTRUSION_END 316
+#define PROTRUDING_PUNCTUATION 317
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+/* Location type. */
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE YYLTYPE;
+struct YYLTYPE
+{
+ int first_line;
+ int first_column;
+ int last_line;
+ int last_column;
+};
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif
+
+
+extern YYSTYPE gabc_score_determination_lval;
+extern YYLTYPE gabc_score_determination_lloc;
+int gabc_score_determination_parse (void);
+
+#endif /* !YY_GABC_SCORE_DETERMINATION_GABC_GABC_SCORE_DETERMINATION_Y_H_INCLUDED */
+
+
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ + 2 * YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 4
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 247
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 63
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 28
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 101
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 145
+
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 317
+
+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, with out-of-bounds checking. */
+#define YYTRANSLATE(YYX) \
+ ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62
+};
+
+#if YYDEBUG
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 700, 700, 704, 709, 710, 714, 717, 723, 726,
+ 732, 737, 746, 752, 757, 762, 767, 772, 777, 785,
+ 793, 802, 807, 811, 816, 817, 821, 826, 832, 843,
+ 847, 855, 856, 857, 861, 864, 867, 870, 873, 876,
+ 879, 882, 888, 891, 894, 897, 900, 903, 906, 909,
+ 915, 918, 935, 938, 951, 954, 960, 963, 969, 972,
+ 978, 979, 982, 983, 984, 985, 986, 987, 988, 991,
+ 992, 995, 1001, 1002, 1006, 1009, 1010, 1011, 1014, 1020,
+ 1021, 1025, 1031, 1034, 1037, 1044, 1050, 1054, 1061, 1068,
+ 1073, 1078, 1082, 1089, 1096, 1101, 1109, 1112, 1118, 1119,
+ 1122, 1123
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || 0
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "NAME", "AUTHOR", "GABC_COPYRIGHT",
+ "SCORE_COPYRIGHT", "LANGUAGE", "STAFF_LINES", "ORISCUS_ORIENTATION",
+ "DEF_MACRO", "OTHER_HEADER", "ANNOTATION", "MODE", "MODE_MODIFIER",
+ "MODE_DIFFERENTIA", "END_OF_DEFINITIONS", "END_OF_FILE", "COLON",
+ "SEMICOLON", "CHARACTERS", "NOTES", "HYPHEN", "ATTRIBUTE",
+ "OPENING_BRACKET", "CLOSING_BRACKET", "CLOSING_BRACKET_WITH_SPACE",
+ "I_BEGIN", "I_END", "TT_BEGIN", "TT_END", "UL_BEGIN", "UL_END",
+ "C_BEGIN", "C_END", "B_BEGIN", "B_END", "SC_BEGIN", "SC_END", "SP_BEGIN",
+ "SP_END", "VERB_BEGIN", "VERB_END", "CENTER_BEGIN", "CENTER_END",
+ "ELISION_BEGIN", "ELISION_END", "TRANSLATION_BEGIN", "TRANSLATION_END",
+ "TRANSLATION_CENTER_END", "ALT_BEGIN", "ALT_END", "NLBA_B", "NLBA_E",
+ "EUOUAE_B", "EUOUAE_E", "NABC_CUT", "NABC_LINES", "CLEAR", "PROTRUSION",
+ "PROTRUSION_VALUE", "PROTRUSION_END", "PROTRUDING_PUNCTUATION",
+ "$accept", "score", "all_definitions", "definitions", "attribute_value",
+ "attribute", "definition", "notes", "note", "closing_bracket_with_space",
+ "style_beginning", "style_end", "special_style_beginning",
+ "special_style_end", "euouae", "linebreak_area", "protrusion",
+ "character", "text", "translation_character", "translation_text",
+ "translation_beginning", "translation", "above_line_text",
+ "syllable_with_notes", "notes_without_word", "syllable", "syllables", YY_NULLPTR
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317
+};
+# endif
+
+#define YYPACT_NINF -85
+
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-85)))
+
+#define YYTABLE_NINF -1
+
+#define yytable_value_is_error(Yytable_value) \
+ 0
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int16 yypact[] =
+{
+ -85, 11, -85, 69, -85, 66, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, -85,
+ 0, -85, -85, -20, -85, -85, -85, -85, -85, -85,
+ -85, -85, -85, -85, -85, -85, -85, -85, -85, -85,
+ -85, -85, -85, -85, -85, -85, -85, 4, -85, -85,
+ -85, -85, -85, -41, -19, -85, -85, -85, -85, -85,
+ -85, -85, -85, 107, 148, -4, -85, -85, -85, -85,
+ -7, -85, -85, -85, -85, -85, -85, -85, -85, -85,
+ -85, -85, -85, -85, -85, -85, 1, -11, -17, -29,
+ -85, 9, -2, -85, -1, -85, 13, -85, -85, -85,
+ -85, -85, -85, -85, 184, -85, -85, -85, -6, -11,
+ -85, -18, 27, 32, -85, -85, -85, -85, -11, -85,
+ -85, 26, -11, -85, 28, -85, -85, -85, -11, -85,
+ -85, -11, 27, -85, -85, -85, -85, -11, -11, -85,
+ -11, -85, -11, -11, -11
+};
+
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 4, 0, 100, 0, 1, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
+ 0, 5, 61, 70, 24, 34, 42, 35, 43, 36,
+ 44, 37, 45, 38, 46, 39, 47, 41, 49, 40,
+ 48, 51, 53, 50, 52, 81, 84, 0, 56, 57,
+ 54, 55, 68, 59, 71, 62, 63, 64, 65, 67,
+ 66, 69, 72, 0, 0, 0, 60, 98, 99, 101,
+ 0, 11, 21, 13, 14, 12, 18, 22, 10, 23,
+ 20, 15, 16, 17, 19, 24, 0, 96, 0, 0,
+ 24, 0, 70, 24, 71, 73, 0, 74, 77, 82,
+ 78, 75, 76, 79, 0, 24, 9, 6, 0, 87,
+ 24, 0, 29, 31, 25, 30, 85, 58, 89, 24,
+ 24, 0, 86, 24, 0, 24, 83, 80, 97, 8,
+ 7, 92, 26, 28, 27, 33, 32, 94, 88, 24,
+ 90, 24, 91, 93, 95
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -85, -85, -85, -85, -85, 227, -85, -84, -85, -60,
+ -62, -61, -85, -85, -85, -85, -85, -10, -85, -50,
+ -85, -85, -23, -85, -85, -85, -85, -85
+};
+
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 1, 2, 3, 108, 71, 21, 87, 114, 115,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 103,
+ 104, 64, 65, 66, 67, 68, 69, 5
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_uint8 yytable[] =
+{
+ 86, 109, 101, 102, 85, 90, 118, 132, 113, 122,
+ 111, 4, 106, 129, 112, 113, 107, 130, 70, 89,
+ 105, 128, 120, 123, 88, 110, 131, 45, 45, 46,
+ 46, 91, 117, 119, 116, 137, 138, 125, 133, 140,
+ 96, 142, 101, 102, 135, 45, 45, 46, 46, 136,
+ 139, 134, 141, 95, 127, 143, 0, 144, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 121,
+ 0, 124, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 22, 0, 23, 0,
+ 24, 0, 0, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 0, 46, 47, 0, 48, 49,
+ 50, 51, 0, 0, 52, 53, 20, 22, 54, 92,
+ 0, 93, 0, 0, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 0, 46, 47, 0, 48,
+ 49, 50, 51, 0, 0, 52, 53, 0, 97, 94,
+ 98, 0, 0, 0, 0, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 0, 0, 0, 0, 0, 99, 0, 0, 0,
+ 0, 0, 0, 0, 97, 0, 98, 0, 0, 0,
+ 100, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 0, 0, 0,
+ 0, 0, 126, 0, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 82, 83, 100, 84
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 23, 85, 64, 64, 24, 24, 90, 25, 26, 93,
+ 21, 0, 19, 19, 25, 26, 23, 23, 18, 60,
+ 24, 105, 24, 24, 20, 24, 110, 47, 47, 49,
+ 49, 54, 61, 24, 51, 119, 120, 24, 56, 123,
+ 63, 125, 104, 104, 17, 47, 47, 49, 49, 17,
+ 24, 111, 24, 63, 104, 139, -1, 141, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 92,
+ -1, 94, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 20, -1, 22, -1,
+ 24, -1, -1, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, -1, 49, 50, -1, 52, 53,
+ 54, 55, -1, -1, 58, 59, 57, 20, 62, 22,
+ -1, 24, -1, -1, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, -1, 49, 50, -1, 52,
+ 53, 54, 55, -1, -1, 58, 59, -1, 20, 62,
+ 22, -1, -1, -1, -1, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, -1, -1, -1, -1, -1, 48, -1, -1, -1,
+ -1, -1, -1, -1, 20, -1, 22, -1, -1, -1,
+ 62, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, -1, -1, -1,
+ -1, -1, 48, -1, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 62, 20
+};
+
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 64, 65, 66, 0, 90, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 57, 69, 20, 22, 24, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 49, 50, 52, 53,
+ 54, 55, 58, 59, 62, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 84, 85, 86, 87, 88, 89,
+ 18, 68, 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 24, 85, 70, 20, 60,
+ 24, 85, 22, 24, 62, 80, 85, 20, 22, 48,
+ 62, 73, 74, 82, 83, 24, 19, 23, 67, 70,
+ 24, 21, 25, 26, 71, 72, 51, 61, 70, 24,
+ 24, 85, 70, 24, 85, 24, 48, 82, 70, 19,
+ 23, 70, 25, 56, 72, 17, 17, 70, 70, 24,
+ 70, 24, 70, 70, 70
+};
+
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 63, 64, 65, 66, 66, 67, 67, 68, 68,
+ 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
+ 69, 69, 69, 69, 70, 70, 71, 71, 71, 71,
+ 71, 72, 72, 72, 73, 73, 73, 73, 73, 73,
+ 73, 73, 74, 74, 74, 74, 74, 74, 74, 74,
+ 75, 75, 76, 76, 77, 77, 78, 78, 79, 79,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 80, 80, 81, 81, 82, 82, 82, 82, 82, 83,
+ 83, 84, 85, 85, 85, 86, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 88, 88, 89, 89,
+ 90, 90
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 2, 2, 0, 2, 1, 2, 3, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 0, 2, 2, 2, 2, 1,
+ 1, 1, 2, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 1, 1, 1, 1, 1, 1,
+ 2, 1, 2, 3, 1, 3, 3, 3, 4, 3,
+ 4, 4, 4, 5, 4, 5, 2, 3, 1, 1,
+ 0, 2
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+ do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+ while (0)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
+#endif
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+
+/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
+
+YY_ATTRIBUTE_UNUSED
+static int
+yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
+{
+ int res = 0;
+ int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
+ if (0 <= yylocp->first_line)
+ {
+ res += YYFPRINTF (yyo, "%d", yylocp->first_line);
+ if (0 <= yylocp->first_column)
+ res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
+ }
+ if (0 <= yylocp->last_line)
+ {
+ if (yylocp->first_line < yylocp->last_line)
+ {
+ res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
+ if (0 <= end_col)
+ res += YYFPRINTF (yyo, ".%d", end_col);
+ }
+ else if (0 <= end_col && yylocp->first_column < end_col)
+ res += YYFPRINTF (yyo, "-%d", end_col);
+ }
+ return res;
+ }
+
+# define YY_LOCATION_PRINT(File, Loc) \
+ yy_location_print_ (File, &(Loc))
+
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, Location); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*-----------------------------------.
+| Print this symbol's value on YYO. |
+`-----------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
+{
+ FILE *yyoutput = yyo;
+ YYUSE (yyoutput);
+ YYUSE (yylocationp);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
+# endif
+ YYUSE (yytype);
+}
+
+
+/*---------------------------.
+| Print this symbol on YYO. |
+`---------------------------*/
+
+static void
+yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
+{
+ YYFPRINTF (yyo, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+ YY_LOCATION_PRINT (yyo, *yylocationp);
+ YYFPRINTF (yyo, ": ");
+ yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp);
+ YYFPRINTF (yyo, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
+{
+ unsigned long yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &yyvsp[(yyi + 1) - (yynrhs)]
+ , &(yylsp[(yyi + 1) - (yynrhs)]) );
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ else
+ goto append;
+
+ append:
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+ yysize = yysize1;
+ else
+ return 2;
+ }
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ default: /* Avoid compiler warnings. */
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+ yysize = yysize1;
+ else
+ return 2;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
+{
+ YYUSE (yyvaluep);
+ YYUSE (yylocationp);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+/* Location data for the lookahead symbol. */
+YYLTYPE yylloc
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+ = { 1, 1, 1, 1 }
+# endif
+;
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (void)
+{
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+ 'yyls': related to locations.
+
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
+
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[3];
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+ YYLTYPE yyloc;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yylsp = yyls = yylsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+/* User initialization code. */
+#line 655 "gabc/gabc-score-determination.y" /* yacc.c:1431 */
+{
+ yylloc.first_line = 1;
+ yylloc.first_column = 0;
+ yylloc.first_offset = 0;
+ yylloc.last_line = 1;
+ yylloc.last_column = 0;
+ yylloc.last_offset = 0;
+ yylloc.generate_point_and_click = generate_point_and_click;
+}
+
+#line 2058 "gabc/gabc-score-determination-y.c" /* yacc.c:1431 */
+ yylsp[0] = yylloc;
+ goto yysetstate;
+
+
+/*------------------------------------------------------------.
+| yynewstate -- push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+
+/*--------------------------------------------------------------------.
+| yynewstate -- set current state (the top of the stack) to yystate. |
+`--------------------------------------------------------------------*/
+yysetstate:
+ *yyssp = (yytype_int16) yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+#if !defined yyoverflow && !defined YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+#else
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
+
+# if defined yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+ YYLTYPE *yyls1 = yyls;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yyls1, yysize * sizeof (*yylsp),
+ &yystacksize);
+ yyss = yyss1;
+ yyvs = yyvs1;
+ yyls = yyls1;
+ }
+# else /* defined YYSTACK_RELOCATE */
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+ yylsp = yyls + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex (STYLE_BITS);
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+ *++yylsp = yylloc;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+ /* Default location. */
+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
+ yyerror_range[1] = yyloc;
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 3:
+#line 704 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_definitions();
+ }
+#line 2254 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 6:
+#line 714 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ yyval.text = yyvsp[0].text;
+ }
+#line 2262 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 7:
+#line 717 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ yyval.text = concatenate(yyvsp[-1].text, yyvsp[0].text);
+ }
+#line 2270 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 8:
+#line 723 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ yyval.text = yyvsp[-1].text;
+ }
+#line 2278 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 9:
+#line 726 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ yyval.text = NULL;
+ }
+#line 2286 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 10:
+#line 732 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ /* these definitions are not passed through */
+ free(macros[yyvsp[-1].character - '0']);
+ macros[yyvsp[-1].character - '0'] = yyvsp[0].text;
+ }
+#line 2296 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 11:
+#line 737 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ if (yyvsp[0].text == NULL) {
+ gregorio_message("name can't be empty","det_score",
+ VERBOSITY_WARNING, 0);
+ }
+ check_multiple("name", score->name != NULL);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->name = yyvsp[0].text;
+ }
+#line 2310 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 12:
+#line 746 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("language", got_language);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ gregorio_set_centering_language(yyvsp[0].text);
+ got_language = true;
+ }
+#line 2321 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 13:
+#line 752 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("gabc-copyright", score->gabc_copyright != NULL);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->gabc_copyright = yyvsp[0].text;
+ }
+#line 2331 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 14:
+#line 757 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("score_copyright", score->score_copyright != NULL);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->score_copyright = yyvsp[0].text;
+ }
+#line 2341 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 15:
+#line 762 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("mode", score->mode != 0);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->mode = yyvsp[0].text;
+ }
+#line 2351 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 16:
+#line 767 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("mode-modifier", score->mode_modifier != NULL);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->mode_modifier = yyvsp[0].text;
+ }
+#line 2361 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 17:
+#line 772 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("mode-differentia", score->mode_differentia != NULL);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->mode_differentia = yyvsp[0].text;
+ }
+#line 2371 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 18:
+#line 777 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("staff-lines", got_staff_lines);
+ if (yyvsp[0].text) {
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ gregorio_set_score_staff_lines(score, atoi(yyvsp[0].text));
+ got_staff_lines = true;
+ }
+ }
+#line 2384 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 19:
+#line 785 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("nabc lines", score->nabc_lines != 0);
+ if (yyvsp[0].text) {
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ nabc_lines=atoi(yyvsp[0].text);
+ score->nabc_lines=nabc_lines;
+ }
+ }
+#line 2397 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 20:
+#line 793 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ if (score->annotation [MAX_ANNOTATIONS - 1]) {
+ gregorio_messagef("det_score", VERBOSITY_WARNING, 0,
+ _("too many definitions of annotation found, only the "
+ "first %d will be taken"), MAX_ANNOTATIONS);
+ }
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ gregorio_set_score_annotation(score, yyvsp[0].text);
+ }
+#line 2411 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 21:
+#line 802 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("author", score->author != NULL);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->author = yyvsp[0].text;
+ }
+#line 2421 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 22:
+#line 807 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->legacy_oriscus_orientation = (strcmp(yyvsp[0].text, "legacy") == 0);
+ }
+#line 2430 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 23:
+#line 811 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ }
+#line 2438 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 26:
+#line 821 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ gabc_y_add_notes(yyvsp[-1].text, (yylsp[-1]));
+ free(yyvsp[-1].text);
+ nabc_state=0;
+ }
+#line 2448 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 27:
+#line 826 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ gabc_y_add_notes(yyvsp[-1].text, (yylsp[-1]));
+ free(yyvsp[-1].text);
+ nabc_state=0;
+ update_position_with_space();
+ }
+#line 2459 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 28:
+#line 832 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ if (!nabc_lines) {
+ gregorio_message(_("You used character \"|\" in gabc without "
+ "setting \"nabc-lines\" parameter. Please "
+ "set it in your gabc header."),
+ "det_score", VERBOSITY_FATAL, 0);
+ }
+ gabc_y_add_notes(yyvsp[-1].text, (yylsp[-1]));
+ free(yyvsp[-1].text);
+ nabc_state = (nabc_state + 1) % (nabc_lines+1);
+ }
+#line 2475 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 29:
+#line 843 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ elements[voice]=NULL;
+ nabc_state=0;
+ }
+#line 2484 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 30:
+#line 847 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ elements[voice]=NULL;
+ nabc_state=0;
+ update_position_with_space();
+ }
+#line 2494 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 34:
+#line 861 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_ITALIC);
+ }
+#line 2502 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 35:
+#line 864 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_TT);
+ }
+#line 2510 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 36:
+#line 867 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_UNDERLINED);
+ }
+#line 2518 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 37:
+#line 870 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_COLORED);
+ }
+#line 2526 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 38:
+#line 873 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_BOLD);
+ }
+#line 2534 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 39:
+#line 876 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_SMALL_CAPS);
+ }
+#line 2542 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 40:
+#line 879 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_VERBATIM);
+ }
+#line 2550 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 41:
+#line 882 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_SPECIAL_CHAR);
+ }
+#line 2558 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 42:
+#line 888 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_ITALIC);
+ }
+#line 2566 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 43:
+#line 891 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_TT);
+ }
+#line 2574 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 44:
+#line 894 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_UNDERLINED);
+ }
+#line 2582 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 45:
+#line 897 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_COLORED);
+ }
+#line 2590 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 46:
+#line 900 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_BOLD);
+ }
+#line 2598 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 47:
+#line 903 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_SMALL_CAPS);
+ }
+#line 2606 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 48:
+#line 906 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_VERBATIM);
+ }
+#line 2614 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 49:
+#line 909 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_SPECIAL_CHAR);
+ }
+#line 2622 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 50:
+#line 915 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_ELISION);
+ }
+#line 2630 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 51:
+#line 918 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ if (center_is_determined) {
+ gregorio_message(
+ "syllable already has center; ignoring additional center",
+ "det_score", VERBOSITY_WARNING, 0);
+ } else if (has_protrusion) {
+ gregorio_message(
+ "center not allowed after protrusion; ignored",
+ "det_score", VERBOSITY_WARNING, 0);
+ } else {
+ add_style(ST_FORCED_CENTER);
+ center_is_determined = CENTER_HALF_DETERMINED;
+ }
+ }
+#line 2649 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 52:
+#line 935 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_ELISION);
+ }
+#line 2657 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 53:
+#line 938 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ if (center_is_determined == CENTER_HALF_DETERMINED) {
+ end_style(ST_FORCED_CENTER);
+ center_is_determined = CENTER_FULLY_DETERMINED;
+ } else {
+ gregorio_message(
+ "not within a syllable center",
+ "det_score", VERBOSITY_WARNING, 0);
+ }
+ }
+#line 2672 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 54:
+#line 951 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ euouae = EUOUAE_BEGINNING;
+ }
+#line 2680 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 55:
+#line 954 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ euouae = EUOUAE_END;
+ }
+#line 2688 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 56:
+#line 960 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ no_linebreak_area = NLBA_BEGINNING;
+ }
+#line 2696 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 57:
+#line 963 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ no_linebreak_area = NLBA_END;
+ }
+#line 2704 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 58:
+#line 969 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_protrusion(yyvsp[-1].text);
+ }
+#line 2712 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 59:
+#line 972 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_protrusion(gregorio_strdup("d")); /* d = default */
+ }
+#line 2720 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 61:
+#line 979 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_text(yyvsp[0].text);
+ }
+#line 2728 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 68:
+#line 988 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ clear_syllable_text = true;
+ }
+#line 2736 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 70:
+#line 992 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_text(gregorio_strdup("-"));
+ }
+#line 2744 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 71:
+#line 995 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_text(yyvsp[0].text);
+ }
+#line 2752 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 74:
+#line 1006 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_text(yyvsp[0].text);
+ }
+#line 2760 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 77:
+#line 1011 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_text(gregorio_strdup("-"));
+ }
+#line 2768 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 78:
+#line 1014 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_text(yyvsp[0].text);
+ }
+#line 2776 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 81:
+#line 1025 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ start_translation(TR_NORMAL);
+ }
+#line 2784 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 82:
+#line 1031 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_translation();
+ }
+#line 2792 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 83:
+#line 1034 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_translation();
+ }
+#line 2800 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 84:
+#line 1037 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ start_translation(TR_WITH_CENTER_END);
+ end_translation();
+ }
+#line 2809 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 85:
+#line 1044 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ abovelinestext = yyvsp[-1].text;
+ }
+#line 2817 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 86:
+#line 1050 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ save_text();
+ close_syllable(&(yylsp[-2]));
+ }
+#line 2826 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 87:
+#line 1054 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&(yylsp[-2]));
+ }
+#line 2838 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 88:
+#line 1061 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&(yylsp[-3]));
+ }
+#line 2850 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 89:
+#line 1068 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_auto_protrusion(yyvsp[-2].text);
+ save_text();
+ close_syllable(&(yylsp[-2]));
+ }
+#line 2860 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 90:
+#line 1073 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_auto_protrusion(yyvsp[-2].text);
+ save_text();
+ close_syllable(&(yylsp[-3]));
+ }
+#line 2870 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 91:
+#line 1078 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ save_text();
+ close_syllable(&(yylsp[-3]));
+ }
+#line 2879 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 92:
+#line 1082 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&(yylsp[-3]));
+ }
+#line 2891 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 93:
+#line 1089 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&(yylsp[-4]));
+ }
+#line 2903 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 94:
+#line 1096 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_auto_protrusion(yyvsp[-3].text);
+ save_text();
+ close_syllable(&(yylsp[-3]));
+ }
+#line 2913 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 95:
+#line 1101 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_auto_protrusion(yyvsp[-3].text);
+ save_text();
+ close_syllable(&(yylsp[-4]));
+ }
+#line 2923 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 96:
+#line 1109 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ close_syllable(NULL);
+ }
+#line 2931 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 97:
+#line 1112 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ close_syllable(NULL);
+ }
+#line 2939 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+
+#line 2943 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+ *++yylsp = yyloc;
+
+ /* Now 'shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+ {
+ const int yylhs = yyr1[yyn] - YYNTOKENS;
+ const int yyi = yypgoto[yylhs] + *yyssp;
+ yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
+ ? yytable[yyi]
+ : yydefgoto[yylhs]);
+ }
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+ yyerror_range[1] = yylloc;
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, &yylloc);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers when the user code never invokes YYERROR and the
+ label yyerrorlab therefore never appears in user code. */
+ if (0)
+ YYERROR;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+ yyerror_range[1] = *yylsp;
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp, yylsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ yyerror_range[2] = yylloc;
+ /* Using YYLLOC is tempting, but would change the location of
+ the lookahead. YYLOC is available though. */
+ YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
+ *++yylsp = yyloc;
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+
+/*-----------------------------------------------------.
+| yyreturn -- parsing is finished, return the result. |
+`-----------------------------------------------------*/
+yyreturn:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, &yylloc);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp, yylsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ return yyresult;
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.h b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.h
new file mode 100644
index 00000000000..df928d20667
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.h
@@ -0,0 +1,202 @@
+/* A Bison parser, made by GNU Bison 3.3.2. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* Undocumented macros, especially those whose name start with YY_,
+ are private implementation details. Do not rely on them. */
+
+#ifndef YY_GABC_SCORE_DETERMINATION_GABC_GABC_SCORE_DETERMINATION_Y_H_INCLUDED
+# define YY_GABC_SCORE_DETERMINATION_GABC_GABC_SCORE_DETERMINATION_Y_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int gabc_score_determination_debug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ NAME = 258,
+ AUTHOR = 259,
+ GABC_COPYRIGHT = 260,
+ SCORE_COPYRIGHT = 261,
+ LANGUAGE = 262,
+ STAFF_LINES = 263,
+ ORISCUS_ORIENTATION = 264,
+ DEF_MACRO = 265,
+ OTHER_HEADER = 266,
+ ANNOTATION = 267,
+ MODE = 268,
+ MODE_MODIFIER = 269,
+ MODE_DIFFERENTIA = 270,
+ END_OF_DEFINITIONS = 271,
+ END_OF_FILE = 272,
+ COLON = 273,
+ SEMICOLON = 274,
+ CHARACTERS = 275,
+ NOTES = 276,
+ HYPHEN = 277,
+ ATTRIBUTE = 278,
+ OPENING_BRACKET = 279,
+ CLOSING_BRACKET = 280,
+ CLOSING_BRACKET_WITH_SPACE = 281,
+ I_BEGIN = 282,
+ I_END = 283,
+ TT_BEGIN = 284,
+ TT_END = 285,
+ UL_BEGIN = 286,
+ UL_END = 287,
+ C_BEGIN = 288,
+ C_END = 289,
+ B_BEGIN = 290,
+ B_END = 291,
+ SC_BEGIN = 292,
+ SC_END = 293,
+ SP_BEGIN = 294,
+ SP_END = 295,
+ VERB_BEGIN = 296,
+ VERB_END = 297,
+ CENTER_BEGIN = 298,
+ CENTER_END = 299,
+ ELISION_BEGIN = 300,
+ ELISION_END = 301,
+ TRANSLATION_BEGIN = 302,
+ TRANSLATION_END = 303,
+ TRANSLATION_CENTER_END = 304,
+ ALT_BEGIN = 305,
+ ALT_END = 306,
+ NLBA_B = 307,
+ NLBA_E = 308,
+ EUOUAE_B = 309,
+ EUOUAE_E = 310,
+ NABC_CUT = 311,
+ NABC_LINES = 312,
+ CLEAR = 313,
+ PROTRUSION = 314,
+ PROTRUSION_VALUE = 315,
+ PROTRUSION_END = 316,
+ PROTRUDING_PUNCTUATION = 317
+ };
+#endif
+/* Tokens. */
+#define NAME 258
+#define AUTHOR 259
+#define GABC_COPYRIGHT 260
+#define SCORE_COPYRIGHT 261
+#define LANGUAGE 262
+#define STAFF_LINES 263
+#define ORISCUS_ORIENTATION 264
+#define DEF_MACRO 265
+#define OTHER_HEADER 266
+#define ANNOTATION 267
+#define MODE 268
+#define MODE_MODIFIER 269
+#define MODE_DIFFERENTIA 270
+#define END_OF_DEFINITIONS 271
+#define END_OF_FILE 272
+#define COLON 273
+#define SEMICOLON 274
+#define CHARACTERS 275
+#define NOTES 276
+#define HYPHEN 277
+#define ATTRIBUTE 278
+#define OPENING_BRACKET 279
+#define CLOSING_BRACKET 280
+#define CLOSING_BRACKET_WITH_SPACE 281
+#define I_BEGIN 282
+#define I_END 283
+#define TT_BEGIN 284
+#define TT_END 285
+#define UL_BEGIN 286
+#define UL_END 287
+#define C_BEGIN 288
+#define C_END 289
+#define B_BEGIN 290
+#define B_END 291
+#define SC_BEGIN 292
+#define SC_END 293
+#define SP_BEGIN 294
+#define SP_END 295
+#define VERB_BEGIN 296
+#define VERB_END 297
+#define CENTER_BEGIN 298
+#define CENTER_END 299
+#define ELISION_BEGIN 300
+#define ELISION_END 301
+#define TRANSLATION_BEGIN 302
+#define TRANSLATION_END 303
+#define TRANSLATION_CENTER_END 304
+#define ALT_BEGIN 305
+#define ALT_END 306
+#define NLBA_B 307
+#define NLBA_E 308
+#define EUOUAE_B 309
+#define EUOUAE_E 310
+#define NABC_CUT 311
+#define NABC_LINES 312
+#define CLEAR 313
+#define PROTRUSION 314
+#define PROTRUSION_VALUE 315
+#define PROTRUSION_END 316
+#define PROTRUDING_PUNCTUATION 317
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+/* Location type. */
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE YYLTYPE;
+struct YYLTYPE
+{
+ int first_line;
+ int first_column;
+ int last_line;
+ int last_column;
+};
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif
+
+
+extern YYSTYPE gabc_score_determination_lval;
+extern YYLTYPE gabc_score_determination_lloc;
+int gabc_score_determination_parse (void);
+
+#endif /* !YY_GABC_SCORE_DETERMINATION_GABC_GABC_SCORE_DETERMINATION_Y_H_INCLUDED */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.c
new file mode 100644
index 00000000000..38b88ad4799
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.c
@@ -0,0 +1,659 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the score parser.
+ *
+ * Gregorio score determination from gabc utilities.
+ * Copyright (C) 2016-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "struct_iter.h"
+#include "gabc.h"
+#include "gabc-score-determination.h"
+#include "messages.h"
+#include "support.h"
+
+void gabc_suppress_extra_custos_at_linebreak(gregorio_score *score)
+{
+ gregorio_syllable *syllable;
+ gregorio_element **custos = NULL;
+
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ gregorio_element **element;
+ for (element = syllable->elements; element && *element;
+ element = &((*element)->next)) {
+ switch ((*element)->type) {
+ case GRE_CUSTOS:
+ if (!((*element)->u.misc.pitched.force_pitch)) {
+ /* save the encountered non-forced custos */
+ custos = element;
+ } else {
+ /* forget the (previous) custos */
+ custos = NULL;
+ }
+ break;
+ case GRE_CLEF:
+ case GRE_BAR:
+ /* remember the custos if only these appear before linebreak */
+ break;
+ case GRE_END_OF_LINE:
+ if (custos) {
+ /* suppress the custos when linebreak follows */
+ gregorio_free_one_element(custos);
+ }
+ /* fall through */
+ default:
+ /* forget the custos */
+ custos = NULL;
+ break;
+ }
+ }
+ }
+}
+
+void gabc_fix_custos_pitches(gregorio_score *score_to_check)
+{
+ gregorio_syllable *current_syllable;
+ gregorio_element *current_element;
+ gregorio_element *custos_element;
+ int newkey;
+ int current_key;
+
+ if (!score_to_check || !score_to_check->first_syllable
+ || !score_to_check->first_voice_info) {
+ return;
+ }
+
+ current_key = gregorio_calculate_new_key(
+ score_to_check->first_voice_info->initial_clef);
+ for (current_syllable = score_to_check->first_syllable; current_syllable;
+ current_syllable = current_syllable->next_syllable) {
+ for (current_element = (current_syllable->elements)[0]; current_element;
+ current_element = current_element->next) {
+ if (current_element->type == GRE_CLEF) {
+ newkey = gregorio_calculate_new_key(
+ current_element->u.misc.clef);
+ current_element->u.misc.clef.pitch_difference =
+ (signed char) newkey - (signed char) current_key;
+ current_key = newkey;
+ }
+ }
+ }
+
+ custos_element = NULL;
+ for (current_syllable = score_to_check->first_syllable; current_syllable;
+ current_syllable = current_syllable->next_syllable) {
+ for (current_element = (current_syllable->elements)[0]; current_element;
+ current_element = current_element->next) {
+ switch (current_element->type) {
+ case GRE_CUSTOS:
+ if (current_element->u.misc.pitched.force_pitch) {
+ /* forget about the preceding custos if a forced one is
+ * encountered */
+ custos_element = NULL;
+ } else {
+ /* the pitch is not forced, so it may need to be adjusted */
+ custos_element = current_element;
+ custos_element->u.misc.pitched.pitch =
+ gregorio_determine_next_pitch(current_syllable,
+ current_element, NULL, NULL);
+ }
+ break;
+
+ case GRE_ELEMENT:
+ /* if it's an element, forget any preceding custos */
+ custos_element = NULL;
+ break;
+
+ case GRE_CLEF:
+ if (custos_element) {
+ /* adjust the preceding custos for the clef */
+ custos_element->u.misc.pitched.pitch =
+ gregorio_adjust_pitch_into_staff(score_to_check,
+ custos_element->u.misc.pitched.pitch
+ - current_element->u.misc.clef.pitch_difference);
+ }
+ break;
+
+ default:
+ /* to prevent the warning */
+ break;
+ }
+ }
+ }
+}
+
+/*
+ * A function that checks the score integrity.
+ */
+
+bool gabc_check_score_integrity(gregorio_score *score_to_check)
+{
+ bool good = true;
+
+ gregorio_assert(score_to_check, check_score_integrity, "score is NULL",
+ return false);
+
+ if (score_to_check->first_syllable
+ && score_to_check->first_syllable->elements
+ && *(score_to_check->first_syllable->elements)) {
+ gregorio_character *ch;
+ if ((score_to_check->first_syllable->elements)[0]->type
+ == GRE_END_OF_LINE) {
+ gregorio_message(
+ "line break is not supported on the first syllable",
+ "check_score_integrity", VERBOSITY_ERROR, 0);
+ good = false;
+ }
+ if (gregorio_get_clef_change(score_to_check->first_syllable)) {
+ gregorio_message(
+ "clef change is not supported on the first syllable",
+ "check_score_integrity", VERBOSITY_ERROR, 0);
+ good = false;
+ }
+ /* check first syllable for elision at the beginning */
+ for (ch = score_to_check->first_syllable->text; ch;
+ ch = ch->next_character) {
+ if (ch->is_character) {
+ break;
+ } else if (ch->cos.s.style == ST_VERBATIM
+ || ch->cos.s.style == ST_SPECIAL_CHAR) {
+ break;
+ } else if (ch->cos.s.style == ST_ELISION) {
+ gregorio_message(
+ _("score initial may not be in an elision"),
+ "check_score_integrity", VERBOSITY_ERROR, 0);
+ break;
+ }
+ }
+ }
+
+ return good;
+}
+
+/*
+ * Another function to be improved: this one checks the validity of the voice_infos.
+ */
+
+bool gabc_check_infos_integrity(gregorio_score *score_to_check)
+{
+ if (!score_to_check->name) {
+ gregorio_message(_("no name specified, put `name:...;' at the "
+ "beginning of the file, can be dangerous with some output "
+ "formats"), "det_score", VERBOSITY_WARNING, 0);
+ }
+ return true;
+}
+
+static void set_oriscus_descending(const gregorio_note_iter_position *const p,
+ void *const ignored __attribute__((unused)))
+{
+ switch(p->note->u.note.shape) {
+ case S_ORISCUS_UNDETERMINED:
+ p->note->u.note.shape = S_ORISCUS_DESCENDENS;
+ break;
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ p->note->u.note.shape = S_ORISCUS_SCAPUS_DESCENDENS;
+ gregorio_assert_only(p->glyph->u.notes.glyph_type
+ != G_PES_DESCENDENS_ORISCUS, set_oriscus_descending,
+ "glyph type should not be G_PES_DESCENDENS_ORISCUS");
+ if (p->glyph->u.notes.glyph_type == G_PES_ASCENDENS_ORISCUS) {
+ p->glyph->u.notes.glyph_type = G_PES_DESCENDENS_ORISCUS;
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+static void set_oriscus_ascending(const gregorio_note_iter_position *const p,
+ void *const ignored __attribute__((unused)))
+{
+ switch(p->note->u.note.shape) {
+ case S_ORISCUS_UNDETERMINED:
+ p->note->u.note.shape = S_ORISCUS_ASCENDENS;
+ break;
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ p->note->u.note.shape = S_ORISCUS_SCAPUS_ASCENDENS;
+ gregorio_assert_only(p->glyph->u.notes.glyph_type
+ != G_PES_DESCENDENS_ORISCUS, set_oriscus_ascending,
+ "glyph type should not be G_PES_DESCENDENS_ORISCUS");
+ break;
+ default:
+ break;
+ }
+}
+
+/* data must be (gregorio_note_iter_position *) */
+static void oriscus_orientation_visit(
+ const gregorio_note_iter_position *const p, void *const data)
+{
+ gregorio_note *const note = p->note;
+ gregorio_note_iter_position *const oriscus =
+ (gregorio_note_iter_position *const)data;
+
+ if (oriscus->note && note->u.note.pitch != oriscus->note->u.note.pitch) {
+ if (note->u.note.pitch <= oriscus->note->u.note.pitch) {
+ /* descending (or undetermined oriscus in unison) */
+ gregorio_from_note_to_note(oriscus, p, false,
+ set_oriscus_descending, NULL, GRESTRUCT_NONE, NULL);
+ } else {
+ /* ascending */
+ gregorio_from_note_to_note(oriscus, p, false,
+ set_oriscus_ascending, NULL, GRESTRUCT_NONE, NULL);
+ }
+ oriscus->syllable = NULL,
+ oriscus->element = NULL,
+ oriscus->note = NULL;
+ oriscus->glyph = NULL;
+ }
+
+ if (!oriscus->note) {
+ switch (note->u.note.shape) {
+ case S_ORISCUS_UNDETERMINED:
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ *oriscus = *p;
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
+void gabc_determine_oriscus_orientation(const gregorio_score *const score)
+{
+ gregorio_note_iter_position oriscus = {
+ /* .syllable = */ NULL,
+ /* .element = */ NULL,
+ /* .glyph = */ NULL,
+ /* .note = */ NULL
+ };
+
+ gregorio_for_each_note(score, oriscus_orientation_visit, NULL,
+ GRESTRUCT_NONE, &oriscus);
+
+ if (oriscus.note) {
+ gregorio_from_note_to_note(&oriscus, NULL, true,
+ set_oriscus_descending, NULL, GRESTRUCT_NONE, NULL);
+ }
+}
+
+typedef struct {
+ gregorio_note_iter_position first, previous;
+ gregorio_shape orientation;
+ int running;
+ int count;
+ bool unison;
+} punctum_inclinatum_vars;
+
+/* data must be (gregorio_shape *) */
+static void set_shape(const gregorio_note_iter_position *const p,
+ void *const data)
+{
+ p->note->u.note.shape = *((gregorio_shape *)data);
+}
+
+static __inline void set_punctum_inclinatum_orientation(
+ punctum_inclinatum_vars *const v)
+{
+ if (v->orientation == S_UNDETERMINED) {
+ if (v->unison && (v->count > 1 || (v->count == 1 && v->running == 0))) {
+ v->orientation = S_PUNCTUM_INCLINATUM_STANS;
+ } else if (v->running > 0) {
+ v->orientation = S_PUNCTUM_INCLINATUM_ASCENDENS;
+ } else {
+ v->orientation = S_PUNCTUM_INCLINATUM_DESCENDENS;
+ }
+ }
+}
+
+static __inline void finalize_punctum_inclinatum_orientation(
+ punctum_inclinatum_vars *const v)
+{
+ if (v->first.note) {
+ set_punctum_inclinatum_orientation(v);
+ gregorio_assert_only(v->orientation != S_UNDETERMINED,
+ punctum_inclinatum_orientation_end_item,
+ "orientation should not be S_UNDETERMINED");
+ gregorio_from_note_to_note(&v->first, &v->previous, true, set_shape,
+ NULL, GRESTRUCT_NONE, &v->orientation);
+ }
+
+ v->first.syllable = NULL;
+ v->first.element = NULL;
+ v->first.glyph = NULL;
+ v->first.note = NULL;
+ v->unison = true;
+}
+
+/* data must be (punctum_inclinatum_vars *) */
+static void punctum_inclinatum_orientation_visit(
+ const gregorio_note_iter_position *const p, void *const data)
+{
+ const gregorio_shape shape = p->note->u.note.shape;
+ punctum_inclinatum_vars *const v = (punctum_inclinatum_vars *)data;
+ if (shape == S_PUNCTUM_INCLINATUM_UNDETERMINED) {
+ if (v->orientation) {
+ p->note->u.note.shape = v->orientation;
+ } else {
+ /* any cases not covered here will not change running */
+ if (v->previous.note
+ && (v->first.note || v->previous.syllable == p->syllable)) {
+ if (v->previous.note->u.note.pitch
+ < p->note->u.note.pitch) {
+ ++ v->running;
+ if (v->count > 0) {
+ v->unison = false;
+ }
+ } else if (v->previous.note->u.note.pitch
+ > p->note->u.note.pitch) {
+ -- v->running;
+ if (v->count > 0) {
+ v->unison = false;
+ }
+ }
+ }
+ if (!v->first.note) {
+ v->first = *p;
+ }
+ }
+ ++ v->count;
+ } else { /* non-inclinatum or determined inclinatum */
+ bool is_punctum_inclinatum;
+
+ /* shape can't be S_PUNCTUM_INCLINATUM_UNDETERMINED here */
+ switch (shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ v->orientation = S_PUNCTUM_INCLINATUM_ASCENDENS;
+ is_punctum_inclinatum = true;
+ break;
+ case S_PUNCTUM_INCLINATUM_STANS:
+ v->orientation = S_PUNCTUM_INCLINATUM_STANS;
+ is_punctum_inclinatum = true;
+ break;
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ case S_PUNCTUM_INCLINATUM_AUCTUS:
+ v->unison = false;
+ /* fall through */
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ v->orientation = S_PUNCTUM_INCLINATUM_DESCENDENS;
+ is_punctum_inclinatum = true;
+ break;
+ default:
+ is_punctum_inclinatum = false;
+ break;
+ }
+
+ if (v->first.note) {
+ if (!is_punctum_inclinatum) {
+ /* if v->first.note is not null,
+ * then v->previous.note is not null */
+ if (v->previous.note->u.note.pitch
+ < p->note->u.note.pitch
+ && v->previous.syllable == p->syllable) {
+ ++ v->running;
+ } else if (v->previous.note->u.note.pitch
+ > p->note->u.note.pitch) {
+ -- v->running;
+ }
+ }
+ finalize_punctum_inclinatum_orientation(v);
+ }
+
+ if (is_punctum_inclinatum) {
+ ++ v->count;
+ /* and leave orientation alone */
+ } else {
+ v->running = 0;
+ v->count = 0;
+ v->orientation = S_UNDETERMINED;
+ }
+ }
+
+ v->previous = *p;
+}
+
+/* data must be (punctum_inclinatum_vars *) */
+static void punctum_inclinatum_orientation_end_item(
+ const gregorio_note_iter_position *const p __attribute__((__unused__)),
+ const gregorio_note_iter_item_type item_type,
+ void *const data)
+{
+ punctum_inclinatum_vars *const v = (punctum_inclinatum_vars *)data;
+
+ gregorio_assert_only(item_type == GRESTRUCT_SYLLABLE,
+ punctum_inclinatum_orientation_end_item,
+ "item type should be GRESTRUCT_SYLLABLE");
+
+ finalize_punctum_inclinatum_orientation(v);
+ v->count = 0;
+}
+
+void gabc_determine_punctum_inclinatum_orientation(
+ const gregorio_score *const score)
+{
+ punctum_inclinatum_vars v = {
+ /* .first = */ {
+ /* .syllable = */ NULL,
+ /* .element = */ NULL,
+ /* .glyph = */ NULL,
+ /* .note = */ NULL
+ },
+ /* .previous = */ {
+ /* .syllable = */ NULL,
+ /* .element = */ NULL,
+ /* .glyph = */ NULL,
+ /* .note = */ NULL
+ },
+ /* .orientation = */ S_UNDETERMINED, /* because it's 0 */
+ /* .running = */ 0,
+ /* .count = */ 0,
+ /* .unison = */ true,
+ };
+
+ gregorio_for_each_note(score, punctum_inclinatum_orientation_visit,
+ punctum_inclinatum_orientation_end_item, GRESTRUCT_SYLLABLE, &v);
+
+ if (v.first.note) {
+ set_punctum_inclinatum_orientation(&v);
+ gregorio_from_note_to_note(&v.first, &v.previous, true, set_shape, NULL,
+ GRESTRUCT_NONE, &v.orientation);
+ }
+}
+
+typedef struct note_stack {
+ gregorio_note *note;
+ struct note_stack *prev;
+} note_stack;
+
+static void note_stack_push(note_stack **const stack, gregorio_note *note) {
+ note_stack *item = gregorio_malloc(sizeof(note_stack));
+ item->note = note;
+ item->prev = *stack;
+ *stack = item;
+}
+
+static gregorio_note *note_stack_pop(note_stack **const stack) {
+ note_stack *item = *stack;
+ if (item) {
+ gregorio_note *note = item->note;
+ note_stack *prev = item->prev;
+ free(item);
+ *stack = prev;
+ return note;
+ }
+ return NULL;
+}
+
+static void note_stack_clear(note_stack **const stack) {
+ note_stack *item = *stack;
+ while (item) {
+ note_stack *prev = item->prev;
+ free(item);
+ item = prev;
+ }
+ *stack = NULL;
+}
+
+typedef struct {
+ note_stack *high, *low;
+ gregorio_note *prev_note;
+ signed char high_ledger_line_pitch;
+ bool running_high, running_low;
+} ledger_line_vars;
+
+static __inline void clear_ledger_line_vars(ledger_line_vars *const v) {
+ note_stack_clear(&v->high);
+ note_stack_clear(&v->low);
+ v->prev_note = NULL;
+ v->running_high = false;
+ v->running_low = false;
+}
+
+static __inline void adjust_ledger(const gregorio_note_iter_position *const p,
+ const gregorio_ledger_specificity specificity, bool ledger_line,
+ note_stack **const stack, bool *const running, gregorio_note *prev_note,
+ const signed char high_ledger_line_pitch,
+ bool (*extend_ledger)(gregorio_note *, const gregorio_note *,
+ const gregorio_note *, signed char))
+{
+ if (specificity & LEDGER_DRAWN) {
+ if (ledger_line) {
+ gregorio_note *after = p->note;
+ gregorio_note *note;
+ /* process from this ledger backwards */
+ while ((note = note_stack_pop(stack))) {
+ if (!extend_ledger(note, NULL, after, high_ledger_line_pitch)) {
+ /* ledger has ended */
+ break;
+ }
+ after = note;
+ }
+ *running = true;
+ } else {
+ *running = false;
+ }
+ note_stack_clear(stack);
+ } else {
+ if (*running) {
+ if (!extend_ledger(p->note, prev_note, NULL,
+ high_ledger_line_pitch)) {
+ /* ledger has ended */
+ note_stack_push(stack, p->note);
+ *running = false;
+ }
+ /* else stack should be empty, keep it that way */
+ } else {
+ note_stack_push(stack, p->note);
+ }
+ }
+}
+
+static bool extend_high_ledger(gregorio_note *const note,
+ const gregorio_note *const note_before,
+ const gregorio_note *const note_after,
+ const signed char high_ledger_line_pitch)
+{
+ bool extend = false;
+
+ if (note_before) {
+ extend = note_before->u.note.pitch < note->u.note.pitch
+ || (note_before->u.note.pitch > high_ledger_line_pitch
+ && note->u.note.pitch < high_ledger_line_pitch);
+ } else if (note_after) {
+ extend = note_after->u.note.pitch < note->u.note.pitch
+ || (note_after->u.note.pitch > high_ledger_line_pitch
+ && note->u.note.pitch < high_ledger_line_pitch);
+ }
+
+ if (extend) {
+ note->high_ledger_line = true;
+ note->high_ledger_specificity = LEDGER_DRAWN;
+ }
+ return extend;
+}
+
+static bool extend_low_ledger(gregorio_note *const note,
+ const gregorio_note *const note_before,
+ const gregorio_note *const note_after,
+ const signed char high_ledger_line_pitch __attribute__((__unused__)))
+{
+ bool extend = false;
+
+ if (note_before) {
+ extend = note_before->u.note.pitch < note->u.note.pitch
+ || (note_before->u.note.pitch > LOW_LEDGER_LINE_PITCH
+ && note->u.note.pitch < LOW_LEDGER_LINE_PITCH);
+ } else if (note_after) {
+ extend = note_after->u.note.pitch < note->u.note.pitch
+ || (note_after->u.note.pitch > LOW_LEDGER_LINE_PITCH
+ && note->u.note.pitch < LOW_LEDGER_LINE_PITCH);
+ }
+
+ if (extend) {
+ note->low_ledger_line = true;
+ note->low_ledger_specificity = LEDGER_DRAWN;
+ }
+ return extend;
+}
+
+/* data must be (ledger_line_vars *) */
+static void ledger_line_visit(const gregorio_note_iter_position *const p,
+ void *const data)
+{
+ ledger_line_vars *const v = (ledger_line_vars *)data;
+
+ adjust_ledger(p, p->note->high_ledger_specificity, p->note->high_ledger_line,
+ &v->high, &v->running_high, v->prev_note, v->high_ledger_line_pitch,
+ &extend_high_ledger);
+ adjust_ledger(p, p->note->low_ledger_specificity, p->note->low_ledger_line,
+ &v->low, &v->running_low, v->prev_note, v->high_ledger_line_pitch,
+ &extend_low_ledger);
+
+ v->prev_note = p->note;
+}
+
+/* data must be (ledger_line_vars *) */
+static void ledger_line_end_item(
+ const gregorio_note_iter_position *const p __attribute__((__unused__)),
+ const gregorio_note_iter_item_type item_type, void *const data)
+{
+ if (item_type == GRESTRUCT_ELEMENT) {
+ clear_ledger_line_vars((ledger_line_vars *)data);
+ }
+}
+
+void gabc_determine_ledger_lines(const gregorio_score *const score)
+{
+ ledger_line_vars v;
+ memset(&v, 0, sizeof v);
+ v.high_ledger_line_pitch = score->high_ledger_line_pitch;
+
+ gregorio_for_each_note(score, ledger_line_visit, ledger_line_end_item,
+ GRESTRUCT_ELEMENT, &v);
+
+ /* stacks should be cleared by ledger_line_end_item */
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.h b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.h
new file mode 100644
index 00000000000..4474973c4d3
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.h
@@ -0,0 +1,64 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header shares definitions between the score parser and lexer.
+ *
+ * Gregorio score determination from gabc.
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GABC_SCORE_DETERMINATION_H
+#define GABC_SCORE_DETERMINATION_H
+
+#include "bool.h"
+#include "struct.h"
+#include "gabc.h"
+
+/* The bits in this enum are named to correspond with the _BEGIN/_END tokens */
+typedef enum {
+ SB_I = 0x01,
+ SB_B = 0x02,
+ SB_TT = 0x04,
+ SB_SC = 0x08,
+ SB_UL = 0x10,
+ SB_C = 0x20,
+ SB_ELISION = 0x40
+} gabc_style_bits;
+
+typedef union gabc_score_determination_lval_t {
+ char *text;
+ char character;
+} gabc_score_determination_lval_t;
+
+#define YYSTYPE gabc_score_determination_lval_t
+#define YYSTYPE_IS_DECLARED 1
+
+#define YY_DECL \
+ int gabc_score_determination_lex(gabc_style_bits *const styles)
+YY_DECL;
+
+#define YYLTYPE gregorio_scanner_location
+
+void gabc_suppress_extra_custos_at_linebreak(gregorio_score *score);
+void gabc_fix_custos_pitches(gregorio_score *score_to_check);
+bool gabc_check_score_integrity(gregorio_score *score_to_check);
+bool gabc_check_infos_integrity(gregorio_score *score_to_check);
+void gabc_determine_oriscus_orientation(const gregorio_score *score);
+void gabc_determine_punctum_inclinatum_orientation(const gregorio_score *score);
+void gabc_determine_ledger_lines(const gregorio_score *const score);
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l
new file mode 100644
index 00000000000..c0d68c1148f
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l
@@ -0,0 +1,430 @@
+%{
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the score lexer.
+ *
+ * Gregorio score determination in gabc input.
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "struct.h"
+#include "messages.h"
+#include "bool.h"
+#include "support.h"
+
+#include "gabc.h"
+#include "gabc-score-determination.h"
+#include "gabc-score-determination-y.h"
+
+static bool eof_found = false;
+
+#define START_STYLE(STYLE) \
+ if (*styles & SB_ ## STYLE) { \
+ gregorio_messagef("gabc_score_determination_lex", VERBOSITY_ERROR, 0, \
+ _("style already started: %s"), gabc_score_determination_text); \
+ } else { \
+ *styles ^= SB_ ## STYLE; \
+ return STYLE ## _BEGIN; \
+ }
+
+#define END_STYLE(STYLE) \
+ if (*styles & SB_ ## STYLE) { \
+ *styles ^= SB_ ## STYLE; \
+ return STYLE ## _END; \
+ } else { \
+ gregorio_messagef("gabc_score_determination_lex", VERBOSITY_ERROR, 0, \
+ _("style not started: %s"), gabc_score_determination_text); \
+ }
+
+#define RETURN_CHARACTERS \
+ gabc_score_determination_lval.text = \
+ gregorio_strdup(gabc_score_determination_text); \
+ return CHARACTERS
+
+#define RETURN_SPACE \
+ gabc_score_determination_lval.text = gregorio_strdup(" "); \
+ return CHARACTERS
+
+#define YY_NO_INPUT
+
+#define YY_INPUT(buf,result,max_size) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) { \
+ int c = '*'; \
+ int n; \
+ for (n = 0; n < max_size \
+ && (c = getc(gabc_score_determination_in)) != EOF \
+ && c != '\n'; ++n ) { \
+ buf[n] = (char) c; \
+ } \
+ if (c == '\n') { \
+ buf[n++] = (char) c; \
+ } \
+ if (c == EOF && ferror(gabc_score_determination_in)) { \
+ YY_FATAL_ERROR("input in flex scanner failed"); \
+ } \
+ result = n; \
+ } else { \
+ errno=0; \
+ while ((result = fread(buf, 1, max_size, gabc_score_determination_in)) \
+ == 0 && ferror(gabc_score_determination_in)) { \
+ if (errno != EINTR) { \
+ YY_FATAL_ERROR("input in flex scanner failed"); \
+ break; \
+ } \
+ errno = 0; \
+ clearerr(gabc_score_determination_in); \
+ } \
+ } \
+ gabc_digest(buf, result)
+
+#define YY_USER_ACTION gabc_update_location(&gabc_score_determination_lloc, \
+ gabc_score_determination_text, gabc_score_determination_leng);
+
+%}
+
+%x attribute
+%x score
+%x notes
+%x sp
+%x verb
+%x comments
+%x inicomments
+%x alt
+%x protrusion_value
+%x protrusion_end
+
+%option stack
+%option pointer
+%option nounput
+%option noyy_push_state
+%option noyy_pop_state
+%option noyy_top_state
+%option align
+%option noread
+%option nomain
+%option noalways-interactive
+%option nonever-interactive
+%option prefix="gabc_score_determination_"
+%option noyywrap
+%option 8bit
+
+
+/* The expression for attribute below is rather messy because we allow
+for (a) single-line values, ending with a semicolon at end of line or a
+double semicolon, (b) multi-line values, which end at a double
+semicolon. */
+
+%%
+<INITIAL>^(\xBB|\xEF|\xBF)+ {
+ /* BOM written by a lot of windows softwares when they write UTF-8 */
+ }
+<INITIAL>^[\n\r]+ {
+ /* ignoring empty lines */
+ }
+<INITIAL>^[\%#] {
+ BEGIN(inicomments);
+ }
+<inicomments>(\n|\r)+ {
+ BEGIN(INITIAL);
+ }
+<inicomments>[^\n\r]+ {
+ /* ignored */
+ }
+<INITIAL>:(\ )? {
+ BEGIN(attribute);
+ return COLON;
+ }
+<attribute>;;?[\n\r \t]*[\n\r] {
+ BEGIN(INITIAL);
+ return SEMICOLON;
+ }
+<attribute>[^;]+ {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ATTRIBUTE;
+ }
+<attribute>; {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ATTRIBUTE;
+}
+<INITIAL>def-m[0-9] {
+ gabc_score_determination_lval.character = gabc_score_determination_text[5];
+ return DEF_MACRO;
+ }
+<INITIAL>name {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return NAME;
+ }
+<INITIAL>score-copyright {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return SCORE_COPYRIGHT;
+ }
+<INITIAL>gabc-copyright {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return GABC_COPYRIGHT;
+ }
+<INITIAL>mode {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return MODE;
+ }
+<INITIAL>mode-modifier {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return MODE_MODIFIER;
+ }
+<INITIAL>mode-differentia {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return MODE_DIFFERENTIA;
+ }
+<INITIAL>annotation {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ANNOTATION;
+ }
+<INITIAL>author {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return AUTHOR;
+ }
+<INITIAL>language {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return LANGUAGE;
+ }
+<INITIAL>staff-lines {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return STAFF_LINES;
+ }
+<INITIAL>nabc-lines {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return NABC_LINES;
+ }
+<INITIAL>oriscus-orientation {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ORISCUS_ORIENTATION;
+ }
+<INITIAL>[A-Za-z0-9_]+(-[A-Za-z0-9_]+)* {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return OTHER_HEADER;
+ }
+<INITIAL>%%+(\n|\r)+ {
+ BEGIN(score);
+ return END_OF_DEFINITIONS;
+ }
+<INITIAL>. {
+ gregorio_messagef("det_score", VERBOSITY_ERROR, 0,
+ _("unrecognized character: \"%c\" in definition part"),
+ gabc_score_determination_text[0]);
+ }
+<score>[\n\r][\n\r \t]* {
+ RETURN_SPACE;
+ }
+<score>[^-,;:.\{\}\(\[\]<%\n\r]+ {
+ RETURN_CHARACTERS;
+ }
+<score>- {
+ return HYPHEN;
+ }
+<score>[,;:.] {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return PROTRUDING_PUNCTUATION;
+ }
+<score><nlba> {
+ return NLBA_B;
+ }
+<score><\/nlba> {
+ return NLBA_E;
+ }
+<score><i> {
+ START_STYLE(I);
+ }
+<score><\/i> {
+ END_STYLE(I);
+ }
+<score><tt> {
+ START_STYLE(TT);
+ }
+<score><\/tt> {
+ END_STYLE(TT);
+ }
+<score><ul> {
+ START_STYLE(UL);
+ }
+<score><\/ul> {
+ END_STYLE(UL);
+ }
+<score><c> {
+ START_STYLE(C);
+ }
+<score><\/c> {
+ END_STYLE(C);
+ }
+<score><b> {
+ START_STYLE(B);
+ }
+<score><\/b> {
+ END_STYLE(B);
+ }
+<score><sc> {
+ START_STYLE(SC);
+ }
+<score><\/sc> {
+ END_STYLE(SC);
+ }
+<score><e> {
+ START_STYLE(ELISION);
+ }
+<score><\/e> {
+ END_STYLE(ELISION);
+ }
+<score><sp> {
+ BEGIN(sp);
+ return SP_BEGIN;
+ }
+<sp><\/sp> {
+ BEGIN(score);
+ return SP_END;
+ }
+<sp>[\n\r][\n\r \t]* {
+ RETURN_SPACE;
+ }
+<sp>[^<\{\}\n\r]+ {
+ RETURN_CHARACTERS;
+ }
+<score>\% {
+ BEGIN(comments);
+ }
+<comments>(\n|\r)+ {
+ BEGIN(score);
+ }
+<comments>[^\n\r]+ {
+ /* ignored */
+ }
+<score><v> {
+ BEGIN(verb);
+ return VERB_BEGIN;
+ }
+<verb><\/v> {
+ BEGIN(score);
+ return VERB_END;
+ }
+<verb,alt>[^<]+ {
+ RETURN_CHARACTERS;
+ }
+<verb,score,alt>< {
+ RETURN_CHARACTERS;
+ }
+<score>\{ {
+ return CENTER_BEGIN;
+ }
+<score>\} {
+ return CENTER_END;
+ }
+<score><alt> {
+ BEGIN(alt);
+ return ALT_BEGIN;
+ }
+<alt><\/alt> {
+ BEGIN(score);
+ return ALT_END;
+ }
+<score><eu> {
+ return EUOUAE_B;
+ }
+<score><\/eu> {
+ return EUOUAE_E;
+ }
+<score>\[\/] {
+ return TRANSLATION_CENTER_END;
+ }
+<score>\[ {
+ return TRANSLATION_BEGIN;
+ }
+<score>\] {
+ return TRANSLATION_END;
+ }
+<score><[\n\r \t]*clear[\n\r \t]*\/?[\n\r \t]*> {
+ return CLEAR;
+ }
+<score><[\n\r \t]*pr[\n\r \t]*\/?[\n\r \t]*> {
+ return PROTRUSION;
+ }
+<score><[\n\r \t]*pr[\n\r \t]*:[\n\r \t]* {
+ BEGIN(protrusion_value);
+ return PROTRUSION;
+ }
+<protrusion_value>([0-9]*\.?[0-9]+|[0-9]+\.) {
+ BEGIN(protrusion_end);
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return PROTRUSION_VALUE;
+ }
+<protrusion_end>[\n\r \t]*\/?[\n\r \t]*> {
+ BEGIN(score);
+ return PROTRUSION_END;
+ }
+<score>\( {
+ BEGIN(notes);
+ return OPENING_BRACKET;
+ }
+<notes>[^|\)]+ {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return NOTES;
+ }
+<notes>\| {
+ return NABC_CUT;
+ }
+<notes>\) {
+ BEGIN(score);
+ return CLOSING_BRACKET;
+ }
+<notes>\)(\ |\t|\n|\r)+ {
+ BEGIN(score);
+ return CLOSING_BRACKET_WITH_SPACE;
+ }
+<<EOF>> {
+ if (!eof_found) {
+ eof_found = true;
+ return END_OF_FILE;
+ } else {
+ yyterminate();
+ }
+ }
+.|\n {
+ gregorio_messagef("gabc_score_determination_lex", VERBOSITY_ERROR, 0,
+ _("unrecognized character: \"%c\""),
+ gabc_score_determination_text[0]);
+ }
+%%
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.y b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.y
new file mode 100644
index 00000000000..e12c057ef68
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.y
@@ -0,0 +1,1124 @@
+%{
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the score parser.
+ *
+ * Gregorio score determination from gabc.
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ *
+ * This file is certainly not the most easy to understand, it is a bison file.
+ * See the bison manual on gnu.org for further details.
+ *
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "characters.h"
+#include "support.h"
+#include "sha1.h"
+#include "plugins.h"
+#include "gabc.h"
+
+#define YYLLOC_DEFAULT(Current, Rhs, N) \
+ if (N) { \
+ (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).first_offset = YYRHSLOC (Rhs, 1).first_offset; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ (Current).last_offset = YYRHSLOC (Rhs, N).last_offset; \
+ (Current).generate_point_and_click = YYRHSLOC (Rhs, 1).generate_point_and_click; \
+ } else { \
+ (Current).first_line = (Current).last_line = YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = YYRHSLOC (Rhs, 0).last_column; \
+ (Current).first_offset = (Current).last_offset = YYRHSLOC (Rhs, 0).last_offset; \
+ (Current).first_offset = (Current).last_offset = YYRHSLOC (Rhs, 0).last_offset; \
+ (Current).generate_point_and_click = YYRHSLOC (Rhs, 0).generate_point_and_click; \
+ }
+
+#include "gabc-score-determination.h"
+#include "gabc-score-determination-l.h"
+
+/* workaround for bison issue passing pointer to a "local" variable */
+#define STYLE_BITS &styles
+
+/* forward declaration of the flex/bison process function */
+static int gabc_score_determination_parse(void);
+
+/* uncomment it if you want to have an interactive shell to understand the
+ * details on how bison works for a certain input */
+/* int gabc_score_determination_debug=1; */
+
+/*
+ *
+ * We will need some variables and functions through the entire file, we
+ * declare them there:
+ *
+ */
+
+/* the score that we will determine and return */
+static gregorio_score *score;
+/* an array of elements that we will use for each syllable */
+static gregorio_element **elements;
+gregorio_element *current_element;
+/* a table containing the macros to use in gabc file */
+static char *macros[10];
+/* other variables that we will have to use */
+static gregorio_character *current_character;
+static gregorio_character *suspended_character;
+static gregorio_character *first_text_character;
+static gregorio_character *first_translation_character;
+static gregorio_tr_centering translation_type;
+static gregorio_nlba no_linebreak_area;
+static gregorio_euouae euouae;
+static gregorio_voice_info *current_voice_info;
+static int number_of_voices;
+static int voice;
+/* see comments on text to understand this */
+static gregorio_center_determination center_is_determined;
+/* current_key is... the current key... updated by each notes determination
+ * (for key changes) */
+static int current_key;
+static bool got_language;
+static bool got_staff_lines;
+static bool started_first_word;
+static struct sha1_ctx digester;
+static gabc_style_bits styles;
+static bool generate_point_and_click;
+static bool clear_syllable_text;
+static bool has_protrusion;
+
+/* punctum_inclinatum_orientation maintains the running punctum inclinatum
+ * orientation in order to decide if the glyph needs to be cut when a punctum
+ * inclinatum with forced orientation is encountered. This should be set to
+ * the shape of a non-liquescent punctum inclinatum with forced orientation
+ * when one is encountered, be left alone when a non-liquescent punctum
+ * inclinatum with undetermined orientation is encountered, or be reset to
+ * S_PUNCTUM_INCLINATUM_UNDETERMINED otherwise (because such ends any previous
+ * run of punctum inclinatum notes). Based on the assumption that a punctum
+ * inclinatum with forced orientation changes all the punctum inclinatum shapes
+ * with undetermined orientation in the same run of notes before and after it
+ * unless influenced by an earlier punctum inclinatum with forced orientation,
+ * the value of punctum_inclinatum_orientation can be used to determine if a
+ * punctum inclinatum with a forced orientation will have a different
+ * orientation than the punctum inclinatum immediately before it, which would
+ * require a cut of the glyph. */
+static gregorio_shape punctum_inclinatum_orientation;
+
+static __inline void check_multiple(const char *name, bool exists) {
+ if (exists) {
+ gregorio_messagef("det_score", VERBOSITY_WARNING, 0,
+ _("several %s definitions found, only the last will be taken "
+ "into consideration"), name);
+ }
+}
+
+static void gabc_score_determination_error(const char *error_str)
+{
+ gregorio_message(error_str, (const char *) "gabc_score_determination_parse",
+ VERBOSITY_ERROR, 0);
+}
+
+/*
+ * The function that will initialize the variables.
+ */
+
+static void initialize_variables(bool point_and_click)
+{
+ int i;
+ /* build a brand new empty score */
+ score = gregorio_new_score();
+ /* initialization of the first voice info to an empty voice info */
+ current_voice_info = NULL;
+ gregorio_add_voice_info(&current_voice_info);
+ score->first_voice_info = current_voice_info;
+ /* other initializations */
+ number_of_voices = 1;
+ voice = 0; /* first (and only) voice */
+ current_character = NULL;
+ suspended_character = NULL;
+ first_translation_character = NULL;
+ first_text_character = NULL;
+ translation_type = TR_NORMAL;
+ no_linebreak_area = NLBA_NORMAL;
+ euouae = EUOUAE_NORMAL;
+ center_is_determined = CENTER_NOT_DETERMINED;
+ current_key = gregorio_calculate_new_key(gregorio_default_clef);
+ for (i = 0; i < 10; i++) {
+ macros[i] = NULL;
+ }
+ got_language = false;
+ got_staff_lines = false;
+ started_first_word = false;
+ styles = 0;
+ punctum_inclinatum_orientation = S_PUNCTUM_INCLINATUM_UNDETERMINED;
+ generate_point_and_click = point_and_click;
+ clear_syllable_text = false;
+ has_protrusion = false;
+}
+
+/*
+ * function that frees the variables that need it, for when we have finished to
+ * determine the score
+ */
+
+static void free_variables(void)
+{
+ int i;
+ free(elements);
+ for (i = 0; i < 10; i++) {
+ free(macros[i]);
+ }
+}
+
+/*
+ * Function called when we have reached the end of the definitions, it tries to
+ * make the voice_infos coherent.
+ */
+static void end_definitions(void)
+{
+ int i;
+
+ gregorio_assert_only(gabc_check_infos_integrity(score), end_definitions,
+ "can't determine valid infos on the score");
+
+ elements = (gregorio_element **) gregorio_malloc(number_of_voices *
+ sizeof(gregorio_element *));
+ for (i = 0; i < number_of_voices; i++) {
+ elements[i] = NULL;
+ }
+
+ if (!got_language) {
+ static char latin[] = "Latin";
+ gregorio_set_centering_language(latin);
+ }
+}
+
+/*
+ * Here starts the code for the determinations of the notes. The notes are not
+ * precisely determined here, we separate the text describing the notes of each
+ * voice, and we call determine_elements_from_string to really determine them.
+ */
+static char position = WORD_BEGINNING;
+static gregorio_syllable *current_syllable = NULL;
+static char *abovelinestext = NULL;
+
+/*
+ * Function called each time we find a space, it updates the current position.
+ */
+static void update_position_with_space(void)
+{
+ if (position == WORD_MIDDLE) {
+ position = WORD_END;
+ }
+ if (position == WORD_BEGINNING) {
+ position = WORD_ONE_SYLLABLE;
+ }
+}
+
+/*
+ * When we encounter a translation center ending, we call this function that
+ * sets translation_type = TR_WITH_CENTER_BEGINNING on previous syllable with
+ * translation
+ */
+static void gregorio_set_translation_center_beginning(
+ gregorio_syllable *current_syllable)
+{
+ gregorio_syllable *syllable = current_syllable->previous_syllable;
+ while (syllable) {
+ if (syllable->translation_type == TR_WITH_CENTER_END) {
+ gregorio_message("encountering translation centering end but "
+ "cannot find translation centering beginning...",
+ "set_translation_center_beginning", VERBOSITY_ERROR, 0);
+ current_syllable->translation_type = TR_NORMAL;
+ return;
+ }
+ if (syllable->translation) {
+ syllable->translation_type = TR_WITH_CENTER_BEGINNING;
+ return;
+ }
+ syllable = syllable->previous_syllable;
+ }
+ /* we didn't find any beginning... */
+ gregorio_message("encountering translation centering end but cannot find "
+ "translation centering beginning...",
+ "set_translation_center_beginning", VERBOSITY_ERROR, 0);
+ current_syllable->translation_type = TR_NORMAL;
+}
+
+static void ready_characters(void)
+{
+ if (current_character) {
+ gregorio_go_to_first_character_c(&current_character);
+ if (!score->first_syllable || (current_syllable
+ && !current_syllable->previous_syllable
+ && !current_syllable->text)) {
+ started_first_word = true;
+ }
+ }
+}
+
+static void rebuild_score_characters(void)
+{
+ if (score->first_syllable) {
+ gregorio_syllable *syllable;
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ const gregorio_character *t;
+
+ /* find out if there is a forced center */
+ gregorio_center_determination center = CENTER_NOT_DETERMINED;
+ for (t = syllable->text; t; t = t->next_character) {
+ if (!t->is_character && t->cos.s.style == ST_FORCED_CENTER) {
+ syllable->forced_center = true;
+ center = CENTER_FULLY_DETERMINED;
+ break;
+ }
+ }
+
+ if (syllable == score->first_syllable) {
+ /* leave the first syllable text untouched at this time */
+ continue;
+ }
+
+ gregorio_rebuild_characters(&(syllable->text), center, false);
+
+ if (syllable->first_word) {
+ gregorio_set_first_word(&(syllable->text));
+ }
+ }
+ }
+}
+
+/*
+ *
+ * The two functions called when lex returns a style, we simply add it. All the
+ * complex things will be done by the function after...
+ *
+ */
+
+static void add_style(unsigned char style)
+{
+ gregorio_begin_style(&current_character, style);
+}
+
+static void end_style(unsigned char style)
+{
+ gregorio_end_style(&current_character, style);
+}
+
+static __inline void save_text(void)
+{
+ if (has_protrusion) {
+ end_style(ST_PROTRUSION);
+ }
+ ready_characters();
+ first_text_character = current_character;
+}
+
+/* a function called when we see a [, basically, all characters are added to
+ * the translation pointer instead of the text pointer */
+static void start_translation(unsigned char asked_translation_type)
+{
+ suspended_character = current_character;
+ /* the middle letters of the translation have no sense */
+ /*center_is_determined = CENTER_FULLY_DETERMINED;*/
+ current_character = NULL;
+ translation_type = asked_translation_type;
+}
+
+static void end_translation(void)
+{
+ ready_characters();
+ first_translation_character = current_character;
+ current_character = suspended_character;
+}
+
+/*
+ * add_text is the function called when lex returns a char *. In
+ * this function we convert it into grewchar, and then we add the corresponding
+ * gregorio_characters in the list of gregorio_characters.
+ */
+
+static void add_text(char *mbcharacters)
+{
+ if (!current_character) {
+ /* insert open styles, leaving out ELISION on purpose */
+ if (styles & SB_I) {
+ add_style(ST_ITALIC);
+ }
+ if (styles & SB_B) {
+ add_style(ST_BOLD);
+ }
+ if (styles & SB_TT) {
+ add_style(ST_TT);
+ }
+ if (styles & SB_SC) {
+ add_style(ST_SMALL_CAPS);
+ }
+ if (styles & SB_UL) {
+ add_style(ST_UNDERLINED);
+ }
+ if (styles & SB_C) {
+ add_style(ST_COLORED);
+ }
+ }
+ if (current_character) {
+ current_character->next_character = gregorio_build_char_list_from_buf(
+ mbcharacters);
+ current_character->next_character->previous_character =
+ current_character;
+ } else {
+ current_character = gregorio_build_char_list_from_buf(mbcharacters);
+ }
+ while (current_character && current_character->next_character) {
+ current_character = current_character->next_character;
+ }
+ free(mbcharacters);
+}
+
+static void add_protrusion(char *factor)
+{
+ if (has_protrusion) {
+ gregorio_message("syllable already has protrusion; pr tag ignored",
+ "det_score", VERBOSITY_WARNING, 0);
+ free(factor);
+ } else {
+ if (center_is_determined == CENTER_HALF_DETERMINED) {
+ gregorio_message("closing open syllable center before protrusion",
+ "det_score", VERBOSITY_WARNING, 0);
+ end_style(ST_FORCED_CENTER);
+ center_is_determined = CENTER_FULLY_DETERMINED;
+ }
+
+ add_style(ST_PROTRUSION_FACTOR);
+ add_text(factor);
+ end_style(ST_PROTRUSION_FACTOR);
+ add_style(ST_PROTRUSION);
+ has_protrusion = true;
+ }
+}
+
+static void add_auto_protrusion(char *protrusion)
+{
+ if (has_protrusion) {
+ add_text(protrusion);
+ } else {
+ add_style(ST_PROTRUSION_FACTOR);
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreProtrusionFactor{"));
+
+ switch (*protrusion) {
+ case ',':
+ add_text(gregorio_strdup("comma"));
+ break;
+ case ';':
+ add_text(gregorio_strdup("semicolon"));
+ break;
+ case ':':
+ add_text(gregorio_strdup("colon"));
+ break;
+ case '.':
+ add_text(gregorio_strdup("period"));
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(add_auto_protrusion,
+ "unsupported protruding punctuation: %c", *protrusion);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+
+ add_text(gregorio_strdup("}"));
+ end_style(ST_VERBATIM);
+ end_style(ST_PROTRUSION_FACTOR);
+
+ add_style(ST_PROTRUSION);
+ add_text(protrusion);
+ end_style(ST_PROTRUSION);
+
+ has_protrusion = true;
+ }
+}
+
+/*
+ * Function to close a syllable and update the position.
+ */
+
+static void close_syllable(YYLTYPE *loc)
+{
+ int i = 0;
+ gregorio_character *ch;
+
+ /* make sure any elisions that are opened are closed within the syllable */
+ for (ch = first_text_character; ch; ch = ch->next_character) {
+ if (!ch->is_character) {
+ switch (ch->cos.s.style) {
+ case ST_ELISION:
+ switch (ch->cos.s.type) {
+ case ST_T_BEGIN:
+ ++i;
+ /* the parser precludes this from falling here */
+ gregorio_assert_only(i <= 1, close_syllable,
+ "elisions may not be nested");
+ break;
+
+ case ST_T_END:
+ --i;
+ /* the parser precludes this from failing here */
+ gregorio_assert_only(i >= 0, close_syllable,
+ "encountered elision end with no beginning");
+ break;
+
+ case ST_T_NOTHING:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(close_syllable, "encountered ST_T_NOTHING");
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+
+ case ST_FORCED_CENTER:
+ if (i > 0) {
+ gregorio_message(
+ _("forced center may not be within an elision"),
+ "close_syllable", VERBOSITY_ERROR, 0);
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+ /* the parser precludes this from failing here */
+ gregorio_assert_only(i == 0, close_syllable,
+ "encountered elision beginning with no end");
+
+ gregorio_add_syllable(&current_syllable, number_of_voices, elements,
+ first_text_character, first_translation_character, position,
+ abovelinestext, translation_type, no_linebreak_area, euouae, loc,
+ started_first_word, clear_syllable_text);
+ if (!score->first_syllable) {
+ /* we rebuild the first syllable if we have to */
+ score->first_syllable = current_syllable;
+ }
+ if (translation_type == TR_WITH_CENTER_END) {
+ gregorio_set_translation_center_beginning(current_syllable);
+ }
+ /* we update the position */
+ if (position == WORD_BEGINNING) {
+ position = WORD_MIDDLE;
+ }
+ if (position == WORD_ONE_SYLLABLE || position == WORD_END) {
+ position = WORD_BEGINNING;
+
+ if (started_first_word) {
+ started_first_word = false;
+ }
+ }
+ center_is_determined = CENTER_NOT_DETERMINED;
+ current_character = NULL;
+ suspended_character = NULL;
+ first_text_character = NULL;
+ first_translation_character = NULL;
+ translation_type = TR_NORMAL;
+ no_linebreak_area = NLBA_NORMAL;
+ euouae = EUOUAE_NORMAL;
+ abovelinestext = NULL;
+ for (i = 0; i < number_of_voices; i++) {
+ elements[i] = NULL;
+ }
+ current_element = NULL;
+ clear_syllable_text = false;
+ has_protrusion = false;
+}
+
+void gabc_digest(const void *const buf, const size_t size)
+{
+ sha1_process_bytes(buf, size, &digester);
+}
+
+/*
+ * The "main" function. It is the function that is called when we have to read
+ * a gabc file. It takes a file descriptor, that is to say a file that is
+ * aleady open. It returns a valid gregorio_score
+ */
+
+gregorio_score *gabc_read_score(FILE *f_in, bool point_and_click)
+{
+ /* compute the SHA-1 digest while parsing, for I/O efficiency */
+ sha1_init_ctx(&digester);
+ /* digest GREGORIO_VERSION to get a different value when the version
+ changes */
+ sha1_process_bytes(GREGORIO_VERSION, strlen(GREGORIO_VERSION), &digester);
+ /* the input file that flex will parse */
+ gabc_score_determination_in = f_in;
+ gregorio_assert(f_in, gabc_read_score, "can't read stream from NULL",
+ return NULL);
+ initialize_variables(point_and_click);
+ /* the flex/bison main call, it will build the score (that we have
+ * initialized) */
+ gabc_score_determination_parse();
+ if (!score->legacy_oriscus_orientation) {
+ gabc_determine_oriscus_orientation(score);
+ }
+ gabc_determine_punctum_inclinatum_orientation(score);
+ gabc_determine_ledger_lines(score);
+ gregorio_fix_initial_keys(score, gregorio_default_clef);
+ rebuild_score_characters();
+ gabc_suppress_extra_custos_at_linebreak(score);
+ gabc_fix_custos_pitches(score);
+ gabc_det_notes_finish();
+ free_variables();
+ /* then we check the validity and integrity of the score we have built. */
+ if (!gabc_check_score_integrity(score)) {
+ gregorio_message(_("unable to determine a valid score from file"),
+ "gabc_read_score", VERBOSITY_ERROR, 0);
+ }
+ sha1_finish_ctx(&digester, score->digest);
+ return score;
+}
+
+unsigned char nabc_state = 0;
+size_t nabc_lines = 0;
+
+static void gabc_y_add_notes(char *notes, YYLTYPE loc) {
+ if (nabc_state == 0) {
+ if (!elements[voice]) {
+ elements[voice] = gabc_det_elements_from_string(notes, &current_key,
+ macros, &loc, &punctum_inclinatum_orientation, score);
+ current_element = elements[voice];
+ } else {
+ gregorio_element *new_elements = gabc_det_elements_from_string(
+ notes, &current_key, macros, &loc,
+ &punctum_inclinatum_orientation, score);
+ gregorio_element *last_element = elements[voice];
+ while (last_element->next) {
+ last_element = last_element->next;
+ }
+ last_element->next = new_elements;
+ new_elements->previous = last_element;
+ current_element = new_elements;
+ }
+ } else {
+ if (!elements[voice]) {
+ gregorio_add_element(&elements[voice], NULL);
+ current_element = elements[voice];
+ }
+ gregorio_assert(current_element, gabc_y_add_notes,
+ "current_element is null, this shouldn't happen!",
+ return);
+ if (!current_element->nabc) {
+ current_element->nabc = (char **) gregorio_calloc (nabc_lines,
+ sizeof (char *));
+ }
+ current_element->nabc[nabc_state-1] = gregorio_strdup(notes);
+ current_element->nabc_lines = nabc_state;
+ }
+}
+
+static char *concatenate(char *first, char *const second) {
+ first = (char *)gregorio_realloc(first, strlen(first) + strlen(second) + 1);
+ strcat(first, second);
+ free(second);
+ return first;
+}
+%}
+
+%initial-action {
+ @$.first_line = 1;
+ @$.first_column = 0;
+ @$.first_offset = 0;
+ @$.last_line = 1;
+ @$.last_column = 0;
+ @$.last_offset = 0;
+ @$.generate_point_and_click = generate_point_and_click;
+}
+
+%lex-param { gabc_style_bits *STYLE_BITS }
+
+%token NAME AUTHOR GABC_COPYRIGHT SCORE_COPYRIGHT
+%token LANGUAGE STAFF_LINES ORISCUS_ORIENTATION
+%token DEF_MACRO OTHER_HEADER
+%token ANNOTATION MODE MODE_MODIFIER MODE_DIFFERENTIA
+%token END_OF_DEFINITIONS END_OF_FILE
+%token COLON SEMICOLON CHARACTERS NOTES HYPHEN ATTRIBUTE
+%token OPENING_BRACKET CLOSING_BRACKET CLOSING_BRACKET_WITH_SPACE
+%token I_BEGIN I_END
+%token TT_BEGIN TT_END
+%token UL_BEGIN UL_END
+%token C_BEGIN C_END
+%token B_BEGIN B_END
+%token SC_BEGIN SC_END
+%token SP_BEGIN SP_END
+%token VERB_BEGIN VERB_END
+%token CENTER_BEGIN CENTER_END
+%token ELISION_BEGIN ELISION_END
+%token TRANSLATION_BEGIN TRANSLATION_END TRANSLATION_CENTER_END
+%token ALT_BEGIN ALT_END
+%token NLBA_B NLBA_E
+%token EUOUAE_B EUOUAE_E
+%token NABC_CUT NABC_LINES
+%token CLEAR
+%token PROTRUSION PROTRUSION_VALUE PROTRUSION_END PROTRUDING_PUNCTUATION
+
+%precedence HYPHEN PROTRUDING_PUNCTUATION
+%precedence TRANSLATION_BEGIN TRANSLATION_CENTER_END
+%precedence TRANSLATION_END
+%precedence OPENING_BRACKET
+
+%%
+
+score:
+ all_definitions syllables
+ ;
+
+all_definitions:
+ definitions END_OF_DEFINITIONS {
+ end_definitions();
+ }
+ ;
+
+definitions:
+ | definitions definition
+ ;
+
+attribute_value:
+ ATTRIBUTE {
+ $$.text = $1.text;
+ }
+ | attribute_value ATTRIBUTE {
+ $$.text = concatenate($1.text, $2.text);
+ }
+ ;
+
+attribute:
+ COLON attribute_value SEMICOLON {
+ $$.text = $2.text;
+ }
+ | COLON SEMICOLON {
+ $$.text = NULL;
+ }
+ ;
+
+definition:
+ DEF_MACRO attribute {
+ /* these definitions are not passed through */
+ free(macros[$1.character - '0']);
+ macros[$1.character - '0'] = $2.text;
+ }
+ | NAME attribute {
+ if ($2.text == NULL) {
+ gregorio_message("name can't be empty","det_score",
+ VERBOSITY_WARNING, 0);
+ }
+ check_multiple("name", score->name != NULL);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->name = $2.text;
+ }
+ | LANGUAGE attribute {
+ check_multiple("language", got_language);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ gregorio_set_centering_language($2.text);
+ got_language = true;
+ }
+ | GABC_COPYRIGHT attribute {
+ check_multiple("gabc-copyright", score->gabc_copyright != NULL);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->gabc_copyright = $2.text;
+ }
+ | SCORE_COPYRIGHT attribute {
+ check_multiple("score_copyright", score->score_copyright != NULL);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->score_copyright = $2.text;
+ }
+ | MODE attribute {
+ check_multiple("mode", score->mode != 0);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->mode = $2.text;
+ }
+ | MODE_MODIFIER attribute {
+ check_multiple("mode-modifier", score->mode_modifier != NULL);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->mode_modifier = $2.text;
+ }
+ | MODE_DIFFERENTIA attribute {
+ check_multiple("mode-differentia", score->mode_differentia != NULL);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->mode_differentia = $2.text;
+ }
+ | STAFF_LINES attribute {
+ check_multiple("staff-lines", got_staff_lines);
+ if ($2.text) {
+ gregorio_add_score_header(score, $1.text, $2.text);
+ gregorio_set_score_staff_lines(score, atoi($2.text));
+ got_staff_lines = true;
+ }
+ }
+ | NABC_LINES attribute {
+ check_multiple("nabc lines", score->nabc_lines != 0);
+ if ($2.text) {
+ gregorio_add_score_header(score, $1.text, $2.text);
+ nabc_lines=atoi($2.text);
+ score->nabc_lines=nabc_lines;
+ }
+ }
+ | ANNOTATION attribute {
+ if (score->annotation [MAX_ANNOTATIONS - 1]) {
+ gregorio_messagef("det_score", VERBOSITY_WARNING, 0,
+ _("too many definitions of annotation found, only the "
+ "first %d will be taken"), MAX_ANNOTATIONS);
+ }
+ gregorio_add_score_header(score, $1.text, $2.text);
+ gregorio_set_score_annotation(score, $2.text);
+ }
+ | AUTHOR attribute {
+ check_multiple("author", score->author != NULL);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->author = $2.text;
+ }
+ | ORISCUS_ORIENTATION attribute {
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->legacy_oriscus_orientation = (strcmp($2.text, "legacy") == 0);
+ }
+ | OTHER_HEADER attribute {
+ gregorio_add_score_header(score, $1.text, $2.text);
+ }
+ ;
+
+notes:
+ | notes note
+ ;
+
+note:
+ NOTES CLOSING_BRACKET {
+ gabc_y_add_notes($1.text, @1);
+ free($1.text);
+ nabc_state=0;
+ }
+ | NOTES closing_bracket_with_space {
+ gabc_y_add_notes($1.text, @1);
+ free($1.text);
+ nabc_state=0;
+ update_position_with_space();
+ }
+ | NOTES NABC_CUT {
+ if (!nabc_lines) {
+ gregorio_message(_("You used character \"|\" in gabc without "
+ "setting \"nabc-lines\" parameter. Please "
+ "set it in your gabc header."),
+ "det_score", VERBOSITY_FATAL, 0);
+ }
+ gabc_y_add_notes($1.text, @1);
+ free($1.text);
+ nabc_state = (nabc_state + 1) % (nabc_lines+1);
+ }
+ | CLOSING_BRACKET {
+ elements[voice]=NULL;
+ nabc_state=0;
+ }
+ | closing_bracket_with_space {
+ elements[voice]=NULL;
+ nabc_state=0;
+ update_position_with_space();
+ }
+ ;
+
+closing_bracket_with_space:
+ CLOSING_BRACKET_WITH_SPACE
+ | CLOSING_BRACKET_WITH_SPACE END_OF_FILE
+ | CLOSING_BRACKET END_OF_FILE
+ ;
+
+style_beginning:
+ I_BEGIN {
+ add_style(ST_ITALIC);
+ }
+ | TT_BEGIN {
+ add_style(ST_TT);
+ }
+ | UL_BEGIN {
+ add_style(ST_UNDERLINED);
+ }
+ | C_BEGIN {
+ add_style(ST_COLORED);
+ }
+ | B_BEGIN {
+ add_style(ST_BOLD);
+ }
+ | SC_BEGIN {
+ add_style(ST_SMALL_CAPS);
+ }
+ | VERB_BEGIN {
+ add_style(ST_VERBATIM);
+ }
+ | SP_BEGIN {
+ add_style(ST_SPECIAL_CHAR);
+ }
+ ;
+
+style_end:
+ I_END {
+ end_style(ST_ITALIC);
+ }
+ | TT_END {
+ end_style(ST_TT);
+ }
+ | UL_END {
+ end_style(ST_UNDERLINED);
+ }
+ | C_END {
+ end_style(ST_COLORED);
+ }
+ | B_END {
+ end_style(ST_BOLD);
+ }
+ | SC_END {
+ end_style(ST_SMALL_CAPS);
+ }
+ | VERB_END {
+ end_style(ST_VERBATIM);
+ }
+ | SP_END {
+ end_style(ST_SPECIAL_CHAR);
+ }
+ ;
+
+special_style_beginning:
+ ELISION_BEGIN {
+ add_style(ST_ELISION);
+ }
+ | CENTER_BEGIN {
+ if (center_is_determined) {
+ gregorio_message(
+ "syllable already has center; ignoring additional center",
+ "det_score", VERBOSITY_WARNING, 0);
+ } else if (has_protrusion) {
+ gregorio_message(
+ "center not allowed after protrusion; ignored",
+ "det_score", VERBOSITY_WARNING, 0);
+ } else {
+ add_style(ST_FORCED_CENTER);
+ center_is_determined = CENTER_HALF_DETERMINED;
+ }
+ }
+ ;
+
+special_style_end:
+ ELISION_END {
+ end_style(ST_ELISION);
+ }
+ | CENTER_END {
+ if (center_is_determined == CENTER_HALF_DETERMINED) {
+ end_style(ST_FORCED_CENTER);
+ center_is_determined = CENTER_FULLY_DETERMINED;
+ } else {
+ gregorio_message(
+ "not within a syllable center",
+ "det_score", VERBOSITY_WARNING, 0);
+ }
+ }
+ ;
+
+euouae:
+ EUOUAE_B {
+ euouae = EUOUAE_BEGINNING;
+ }
+ | EUOUAE_E {
+ euouae = EUOUAE_END;
+ }
+ ;
+
+linebreak_area:
+ NLBA_B {
+ no_linebreak_area = NLBA_BEGINNING;
+ }
+ | NLBA_E {
+ no_linebreak_area = NLBA_END;
+ }
+ ;
+
+protrusion:
+ PROTRUSION PROTRUSION_VALUE PROTRUSION_END {
+ add_protrusion($2.text);
+ }
+ | PROTRUSION {
+ add_protrusion(gregorio_strdup("d")); /* d = default */
+ }
+ ;
+
+character:
+ above_line_text
+ | CHARACTERS {
+ add_text($1.text);
+ }
+ | style_beginning
+ | style_end
+ | special_style_beginning
+ | special_style_end
+ | linebreak_area
+ | euouae
+ | CLEAR {
+ clear_syllable_text = true;
+ }
+ | protrusion
+ | HYPHEN {
+ add_text(gregorio_strdup("-"));
+ }
+ | PROTRUDING_PUNCTUATION {
+ add_text($1.text);
+ }
+ ;
+
+text:
+ character
+ | text character
+ ;
+
+translation_character:
+ CHARACTERS {
+ add_text($1.text);
+ }
+ | style_beginning
+ | style_end
+ | HYPHEN {
+ add_text(gregorio_strdup("-"));
+ }
+ | PROTRUDING_PUNCTUATION {
+ add_text($1.text);
+ }
+ ;
+
+translation_text:
+ translation_character
+ | translation_text translation_character
+ ;
+
+translation_beginning:
+ TRANSLATION_BEGIN {
+ start_translation(TR_NORMAL);
+ }
+ ;
+
+translation:
+ translation_beginning TRANSLATION_END {
+ end_translation();
+ }
+ | translation_beginning translation_text TRANSLATION_END {
+ end_translation();
+ }
+ | TRANSLATION_CENTER_END {
+ start_translation(TR_WITH_CENTER_END);
+ end_translation();
+ }
+ ;
+
+above_line_text:
+ ALT_BEGIN CHARACTERS ALT_END {
+ abovelinestext = $2.text;
+ }
+ ;
+
+syllable_with_notes:
+ text OPENING_BRACKET notes {
+ save_text();
+ close_syllable(&@1);
+ }
+ | HYPHEN OPENING_BRACKET notes {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&@1);
+ }
+ | text HYPHEN OPENING_BRACKET notes {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&@1);
+ }
+ | PROTRUDING_PUNCTUATION OPENING_BRACKET notes {
+ add_auto_protrusion($1.text);
+ save_text();
+ close_syllable(&@1);
+ }
+ | text PROTRUDING_PUNCTUATION OPENING_BRACKET notes {
+ add_auto_protrusion($2.text);
+ save_text();
+ close_syllable(&@1);
+ }
+ | text translation OPENING_BRACKET notes {
+ save_text();
+ close_syllable(&@1);
+ }
+ | HYPHEN translation OPENING_BRACKET notes {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&@1);
+ }
+ | text HYPHEN translation OPENING_BRACKET notes {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&@1);
+ }
+ | PROTRUDING_PUNCTUATION translation OPENING_BRACKET notes {
+ add_auto_protrusion($1.text);
+ save_text();
+ close_syllable(&@1);
+ }
+ | text PROTRUDING_PUNCTUATION translation OPENING_BRACKET notes {
+ add_auto_protrusion($2.text);
+ save_text();
+ close_syllable(&@1);
+ }
+ ;
+
+notes_without_word:
+ OPENING_BRACKET notes {
+ close_syllable(NULL);
+ }
+ | translation OPENING_BRACKET notes {
+ close_syllable(NULL);
+ }
+ ;
+
+syllable:
+ syllable_with_notes
+ | notes_without_word
+ ;
+
+syllables:
+ | syllables syllable
+ ;
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-write.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-write.c
new file mode 100644
index 00000000000..a6be28bad4a
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-write.c
@@ -0,0 +1,1171 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file provides functions for writing gabc from Gregorio structures.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This is a simple and easyly understandable output module. If you want to
+ * write a module, you can consider it as a model.
+ */
+
+#include "config.h"
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h> /* for strchr */
+#include "bool.h"
+#include "characters.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "plugins.h"
+
+#include "gabc.h"
+
+typedef enum {
+ GABC_NORMAL,
+ GABC_AT_PROTRUSION_FACTOR,
+ GABC_IN_PROTRUSION_FACTOR
+} gabc_write_state;
+
+static gabc_write_state write_state;
+
+static __inline char pitch_letter(const char height) {
+ char result = height + 'a' - LOWEST_PITCH;
+ if (result == 'o') {
+ return 'p';
+ }
+ return result;
+}
+
+/* not reachable unless there's a programming error */
+/* LCOV_EXCL_START */
+static __inline void unsupported(const char *fn, const int line,
+ const char *type, const char *value)
+{
+ gregorio_messagef(fn, VERBOSITY_ASSERTION, line, _("unsupported %s %s"),
+ type, value);
+}
+/* LCOV_EXCL_STOP */
+
+/*
+ * Output one attribute, allowing for multi-line values
+ */
+static void gabc_write_str_attribute(FILE *f, const char *name,
+ const char *attr)
+{
+ if (attr) {
+ fprintf(f, "%s: %s%s;\n", name, attr, strchr(attr, '\n') ? ";" : "");
+ }
+}
+
+/*
+ *
+ * Then we start the functions made to write the text of the syllable. See
+ * comments on struct.h and struct-utils.c to understand more deeply.
+ *
+ * This first function will be called each time we will encounter a
+ * gregorio_character which is the beginning of a style.
+ *
+ */
+
+static void gabc_write_begin(FILE *f, grestyle_style style)
+{
+ switch (style) {
+ case ST_ITALIC:
+ fprintf(f, "<i>");
+ break;
+ case ST_COLORED:
+ fprintf(f, "<c>");
+ break;
+ case ST_SMALL_CAPS:
+ fprintf(f, "<sc>");
+ break;
+ case ST_BOLD:
+ fprintf(f, "<b>");
+ break;
+ case ST_FORCED_CENTER:
+ fprintf(f, "{");
+ break;
+ case ST_TT:
+ fprintf(f, "<tt>");
+ break;
+ case ST_UNDERLINED:
+ fprintf(f, "<ul>");
+ break;
+ case ST_ELISION:
+ fprintf(f, "<e>");
+ break;
+ case ST_PROTRUSION_FACTOR:
+ write_state = GABC_AT_PROTRUSION_FACTOR;
+ break;
+ case ST_INITIAL:
+ case ST_CENTER:
+ case ST_FIRST_WORD:
+ case ST_FIRST_SYLLABLE:
+ case ST_FIRST_SYLLABLE_INITIAL:
+ case ST_PROTRUSION:
+ /* nothing should be emitted for these */
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_begin", __LINE__, "style",
+ grestyle_style_to_string(style));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/*
+ *
+ * This function is about the same but for ends of styles.
+ *
+ */
+
+static void gabc_write_end(FILE *f, grestyle_style style)
+{
+ switch (style) {
+ case ST_ITALIC:
+ fprintf(f, "</i>");
+ break;
+ case ST_COLORED:
+ fprintf(f, "</c>");
+ break;
+ case ST_SMALL_CAPS:
+ fprintf(f, "</sc>");
+ break;
+ case ST_BOLD:
+ fprintf(f, "</b>");
+ break;
+ case ST_FORCED_CENTER:
+ fprintf(f, "}");
+ break;
+ case ST_TT:
+ fprintf(f, "</tt>");
+ break;
+ case ST_UNDERLINED:
+ fprintf(f, "</ul>");
+ break;
+ case ST_ELISION:
+ fprintf(f, "</e>");
+ break;
+ case ST_PROTRUSION_FACTOR:
+ if (write_state == GABC_IN_PROTRUSION_FACTOR) {
+ fprintf(f, ">");
+ }
+ break;
+ case ST_INITIAL:
+ case ST_CENTER:
+ case ST_FIRST_WORD:
+ case ST_FIRST_SYLLABLE:
+ case ST_FIRST_SYLLABLE_INITIAL:
+ case ST_PROTRUSION:
+ /* nothing should be emitted for these */
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_end", __LINE__, "style",
+ grestyle_style_to_string(style));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/*
+ *
+ * This function writes the special chars. As the specials chars are
+ * represented simply in gabc, this function is very simple, but for TeX output
+ * modules, this may be.. a little more difficult.
+ *
+ */
+static void gabc_write_special_char(FILE *f, const grewchar *first_char)
+{
+ fprintf(f, "<sp>");
+ gregorio_print_unistring(f, first_char);
+ fprintf(f, "</sp>");
+}
+
+/*
+ *
+ * This functions writes verbatim output... but as the previous one it is very
+ * simple.
+ *
+ */
+static void gabc_write_verb(FILE *f, const grewchar *first_char)
+{
+ if (write_state == GABC_AT_PROTRUSION_FACTOR) {
+ /* this is an auto protrusion, so ignore it */
+ write_state = GABC_NORMAL;
+ } else {
+ fprintf(f, "<v>");
+ gregorio_print_unistring(f, first_char);
+ fprintf(f, "</v>");
+ }
+}
+
+/*
+ *
+ * The function called when we will encounter a character. There may be other
+ * representations of the character (for example for Omega), so it is necessary
+ * to have such a function defined in each module.
+ *
+ */
+
+static void gabc_print_char(FILE *f, const grewchar to_print)
+{
+ if (write_state == GABC_AT_PROTRUSION_FACTOR) {
+ write_state = GABC_IN_PROTRUSION_FACTOR;
+ if (to_print == 'd') {
+ fprintf(f, "<pr");
+ } else {
+ fprintf(f, "<pr:");
+ gregorio_print_unichar(f, to_print);
+ }
+ } else {
+ gregorio_print_unichar(f, to_print);
+ }
+}
+
+/*
+ *
+ * Quite important: the function that writes the liquescentia. It is called at
+ * the end of the function that writes one glyph.
+ *
+ */
+
+static void gabc_write_end_liquescentia(FILE *f, char liquescentia)
+{
+ switch (liquescentia & TAIL_LIQUESCENTIA_MASK) {
+ case L_DEMINUTUS:
+ fprintf(f, "~");
+ break;
+ case L_AUCTUS_ASCENDENS:
+ fprintf(f, "<");
+ break;
+ case L_AUCTUS_DESCENDENS:
+ fprintf(f, ">");
+ break;
+ }
+}
+
+/*
+ *
+ * The function that writes a key change... quite simple.
+ *
+ */
+
+static void gabc_write_clef(FILE *f, gregorio_clef_info clef)
+{
+ fprintf(f, "%c%s%d", clef.clef == CLEF_C? 'c' : 'f', clef.flatted? "b" : "",
+ clef.line);
+ if (clef.secondary_line) {
+ fprintf(f, "@%c%s%d", clef.secondary_clef == CLEF_C? 'c' : 'f',
+ clef.secondary_flatted? "b" : "", clef.secondary_line);
+ }
+}
+
+/*
+ *
+ * The function that writes spaces, called when we encounter one.
+ *
+ */
+
+static void gabc_write_space(FILE *f, gregorio_space type, char *factor,
+ bool next_is_space)
+{
+ switch (type) {
+ case SP_NEUMATIC_CUT:
+ if (next_is_space) {
+ /* if the following is not a space, we omit this because the
+ * code always puts a "/" between elements unless there is some
+ * other space there */
+ fprintf (f, "/");
+ }
+ break;
+ case SP_LARGER_SPACE:
+ fprintf(f, "//");
+ break;
+ case SP_GLYPH_SPACE:
+ fprintf(f, " ");
+ break;
+ case SP_AD_HOC_SPACE:
+ fprintf(f, "/[%s]", factor);
+ break;
+ case SP_NEUMATIC_CUT_NB:
+ fprintf(f, "!/");
+ break;
+ case SP_LARGER_SPACE_NB:
+ fprintf(f, "!//");
+ break;
+ case SP_GLYPH_SPACE_NB:
+ fprintf(f, "! ");
+ break;
+ case SP_AD_HOC_SPACE_NB:
+ fprintf(f, "!/[%s]", factor);
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_space", __LINE__, "space type",
+ gregorio_space_to_string(type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/*
+ *
+ * A function to write a bar.
+ *
+ */
+
+static void gabc_write_bar(FILE *f, gregorio_bar type)
+{
+ switch (type) {
+ case B_VIRGULA:
+ fprintf(f, "`");
+ break;
+ case B_DIVISIO_MINIMA:
+ fprintf(f, ",");
+ break;
+ case B_DIVISIO_MINOR:
+ fprintf(f, ";");
+ break;
+ case B_DIVISIO_MAIOR:
+ fprintf(f, ":");
+ break;
+ case B_DIVISIO_FINALIS:
+ fprintf(f, "::");
+ break;
+ case B_DIVISIO_MINOR_D1:
+ fprintf(f, ";1");
+ break;
+ case B_DIVISIO_MINOR_D2:
+ fprintf(f, ";2");
+ break;
+ case B_DIVISIO_MINOR_D3:
+ fprintf(f, ";3");
+ break;
+ case B_DIVISIO_MINOR_D4:
+ fprintf(f, ";4");
+ break;
+ case B_DIVISIO_MINOR_D5:
+ fprintf(f, ";5");
+ break;
+ case B_DIVISIO_MINOR_D6:
+ fprintf(f, ";6");
+ break;
+ case B_DIVISIO_MINOR_D7:
+ fprintf(f, ";7");
+ break;
+ case B_DIVISIO_MINOR_D8:
+ fprintf(f, ";8");
+ break;
+ case B_VIRGULA_HIGH:
+ fprintf(f, "`0");
+ break;
+ case B_DIVISIO_MINIMA_HIGH:
+ fprintf(f, ",0");
+ break;
+ case B_DIVISIO_MAIOR_DOTTED:
+ fprintf(f, ":?");
+ break;
+ case B_DIVISIO_MINIMIS:
+ fprintf(f, "^");
+ break;
+ case B_DIVISIO_MINIMIS_HIGH:
+ fprintf(f, "^0");
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_bar", __LINE__, "bar type",
+ gregorio_bar_to_string(type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/* writing the signs of a bar */
+
+static void gabc_write_bar_signs(FILE *f, gregorio_sign type)
+{
+ switch (type) {
+ case _V_EPISEMA:
+ fprintf(f, "'");
+ break;
+ case _V_EPISEMA_BAR_H_EPISEMA:
+ fprintf(f, "'_");
+ break;
+ case _BAR_H_EPISEMA:
+ fprintf(f, "_");
+ break;
+ case _NO_SIGN:
+ /* if there's no sign, don't emit anything */
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_bar_signs", __LINE__, "bar signs",
+ gregorio_sign_to_string(type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static void gabc_hepisema(FILE *f, const char *prefix, bool connect,
+ grehepisema_size size)
+{
+ fprintf(f, "_%s", prefix);
+ if (!connect) {
+ fprintf(f, "2");
+ }
+ switch (size) {
+ case H_SMALL_LEFT:
+ fprintf(f, "3");
+ break;
+ case H_SMALL_CENTRE:
+ fprintf(f, "4");
+ break;
+ case H_SMALL_RIGHT:
+ fprintf(f, "5");
+ break;
+ case H_NORMAL:
+ /* nothing to print */
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_hepisema", __LINE__, "hepisema size",
+ grehepisema_size_to_string(size));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static const char *vepisema_position(gregorio_note *note)
+{
+ if (!note->v_episema_height) {
+ return "";
+ }
+ if (note->v_episema_height < note->u.note.pitch) {
+ return "0";
+ }
+ return "1";
+}
+
+static const char *mora_vposition(gregorio_note *note)
+{
+ switch (note->mora_vposition) {
+ case VPOS_AUTO:
+ return "";
+ case VPOS_ABOVE:
+ return "1";
+ case VPOS_BELOW:
+ return "0";
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("mora_vposition", __LINE__, "vposition",
+ gregorio_vposition_to_string(note->mora_vposition));
+ return "";
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static void write_note_heuristics(FILE *f, gregorio_note *note) {
+ switch (note->high_ledger_specificity) {
+ case LEDGER_EXPLICIT:
+ fprintf(f, "[hl:%c]", note->high_ledger_line? '1' : '0');
+ break;
+ case LEDGER_EXPLICITLY_DRAWN:
+ fprintf(f, "[oll:%c]", note->high_ledger_line? '1' : '0');
+ break;
+ default:
+ break;
+ }
+ switch (note->low_ledger_specificity) {
+ case LEDGER_EXPLICIT:
+ fprintf(f, "[ll:%c]", note->low_ledger_line? '1' : '0');
+ break;
+ case LEDGER_EXPLICITLY_DRAWN:
+ fprintf(f, "[ull:%c]", note->low_ledger_line? '1' : '0');
+ break;
+ default:
+ break;
+ }
+}
+
+typedef struct glyph_context {
+ gregorio_syllable *syllable;
+ gregorio_element *element;
+ unsigned short he_adjustment_index[2];
+} glyph_context;
+
+/*
+ *
+ * The function that writes one gregorio_note.
+ *
+ */
+
+static void gabc_write_gregorio_note(FILE *f, gregorio_note *note,
+ const bool is_quadratum)
+{
+ char shape;
+ gregorio_assert(note, gabc_write_gregorio_note, "call with NULL argument",
+ return);
+ gregorio_assert(note->type == GRE_NOTE, gabc_write_gregorio_note,
+ "call with argument which type is not GRE_NOTE", return);
+ shape = note->u.note.shape;
+ switch (shape) {
+ /* first we write the letters that determine the shapes */
+ case S_PUNCTUM:
+ if (is_quadratum) {
+ fprintf(f, "%cq", pitch_letter(note->u.note.pitch));
+ } else {
+ fprintf(f, "%c", pitch_letter(note->u.note.pitch));
+ }
+ break;
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ fprintf(f, "%c1", toupper((unsigned char)pitch_letter(note->u.note.pitch)));
+ break;
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ fprintf(f, "%c0", toupper((unsigned char)pitch_letter(note->u.note.pitch)));
+ break;
+ case S_PUNCTUM_INCLINATUM_STANS:
+ fprintf(f, "%c2", toupper((unsigned char)pitch_letter(note->u.note.pitch)));
+ break;
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ if (note->next) {
+ fprintf(f, "%c~", toupper((unsigned char)pitch_letter(note->u.note.pitch)));
+ } else {
+ fprintf(f, "%c", toupper((unsigned char)pitch_letter(note->u.note.pitch)));
+ }
+ break;
+ case S_PUNCTUM_INCLINATUM_AUCTUS:
+ fprintf(f, "%c", toupper((unsigned char)pitch_letter(note->u.note.pitch)));
+ break;
+ case S_FLAT:
+ fprintf(f, "%cx", pitch_letter(note->u.note.pitch));
+ break;
+ case S_NATURAL:
+ fprintf(f, "%cy", pitch_letter(note->u.note.pitch));
+ break;
+ case S_SHARP:
+ fprintf(f, "%c#", pitch_letter(note->u.note.pitch));
+ break;
+ case S_VIRGA:
+ fprintf(f, "%cv", pitch_letter(note->u.note.pitch));
+ break;
+ case S_VIRGA_REVERSA:
+ fprintf(f, "%cV", pitch_letter(note->u.note.pitch));
+ break;
+ case S_ORISCUS_ASCENDENS:
+ fprintf(f, "%co1", pitch_letter(note->u.note.pitch));
+ break;
+ case S_ORISCUS_DESCENDENS:
+ fprintf(f, "%co0", pitch_letter(note->u.note.pitch));
+ break;
+ case S_ORISCUS_DEMINUTUS:
+ fprintf(f, "%co", pitch_letter(note->u.note.pitch));
+ /* Note: the DEMINUTUS is also in the liquescentia */
+ break;
+ case S_QUILISMA:
+ if (is_quadratum) {
+ fprintf(f, "%cW", pitch_letter(note->u.note.pitch));
+ } else {
+ fprintf(f, "%cw", pitch_letter(note->u.note.pitch));
+ }
+ break;
+ case S_LINEA:
+ fprintf(f, "%c=", pitch_letter(note->u.note.pitch));
+ break;
+ case S_LINEA_PUNCTUM:
+ fprintf(f, "%cR", pitch_letter(note->u.note.pitch));
+ break;
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ fprintf(f, "%cO1", pitch_letter(note->u.note.pitch));
+ break;
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ fprintf(f, "%cO0", pitch_letter(note->u.note.pitch));
+ break;
+ case S_STROPHA:
+ case S_STROPHA_AUCTA:
+ fprintf(f, "%cs", pitch_letter(note->u.note.pitch));
+ break;
+ default:
+ /* includes S_BIVIRGA, S_TRIVIRGA, S_DISTROPHA, and S_TRISTROPHA */
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_note", __LINE__, "shape",
+ gregorio_shape_to_string(shape));
+ fprintf(f, "%c", pitch_letter(note->u.note.pitch));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ if (note->u.note.is_cavum) {
+ fprintf(f, "r");
+ }
+ switch (note->signs) {
+ case _PUNCTUM_MORA:
+ fprintf(f, ".%s", mora_vposition(note));
+ break;
+ case _AUCTUM_DUPLEX:
+ fprintf(f, "..");
+ break;
+ case _V_EPISEMA:
+ fprintf(f, "'%s", vepisema_position(note));
+ break;
+ case _V_EPISEMA_PUNCTUM_MORA:
+ fprintf(f, "'%s.%s", vepisema_position(note), mora_vposition(note));
+ break;
+ case _V_EPISEMA_AUCTUM_DUPLEX:
+ fprintf(f, "'%s..", vepisema_position(note));
+ break;
+ case _NO_SIGN:
+ /* if there's no sign, don't emit anything */
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_note", __LINE__, "shape signs",
+ gregorio_sign_to_string(note->signs));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ switch (note->special_sign) {
+ case _ACCENTUS:
+ fprintf(f, "r1");
+ break;
+ case _ACCENTUS_REVERSUS:
+ fprintf(f, "r2");
+ break;
+ case _CIRCULUS:
+ fprintf(f, "r3");
+ break;
+ case _SEMI_CIRCULUS:
+ fprintf(f, "r4");
+ break;
+ case _SEMI_CIRCULUS_REVERSUS:
+ fprintf(f, "r5");
+ break;
+ case _MUSICA_FICTA_FLAT:
+ fprintf(f, "r6");
+ break;
+ case _MUSICA_FICTA_NATURAL:
+ fprintf(f, "r7");
+ break;
+ case _MUSICA_FICTA_SHARP:
+ fprintf(f, "r8");
+ break;
+ case _NO_SIGN:
+ /* if there's no sign, don't emit anything */
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_note", __LINE__, "special sign",
+ gregorio_sign_to_string(note->special_sign));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ if (note->h_episema_above == HEPISEMA_AUTO
+ && note->h_episema_below == HEPISEMA_AUTO) {
+ gabc_hepisema(f, "", note->h_episema_above_connect,
+ note->h_episema_above_size);
+ } else {
+ if (note->h_episema_below == HEPISEMA_FORCED) {
+ gabc_hepisema(f, "0", note->h_episema_below_connect,
+ note->h_episema_below_size);
+ }
+ if (note->h_episema_above == HEPISEMA_FORCED) {
+ gabc_hepisema(f, "1", note->h_episema_above_connect,
+ note->h_episema_above_size);
+ }
+ }
+ write_note_heuristics(f, note);
+ if (note->texverb) {
+ fprintf(f, "[nv:%s]", gregorio_texverb(note->texverb));
+ }
+}
+
+static void get_next_hepisema_adjustments(unsigned short *adjustment_index,
+ const gregorio_syllable *syllable, const gregorio_element *element,
+ const gregorio_glyph *glyph, const gregorio_note *note)
+{
+ while (note) {
+ note = note->next;
+ if (!note) {
+ while (glyph) {
+ glyph = glyph->next;
+ if (!glyph) {
+ while (element) {
+ element = element->next;
+ if (!element) {
+ syllable = syllable->next_syllable;
+ if (syllable) {
+ element = syllable->elements[0];
+ }
+ }
+ if (element && element->type == GRE_ELEMENT) {
+ glyph = element->u.first_glyph;
+ break;
+ }
+ }
+ }
+ if (glyph && glyph->type == GRE_GLYPH) {
+ note = glyph->u.notes.first_note;
+ break;
+ }
+ }
+ }
+ if (note && note->type == GRE_NOTE) {
+ break;
+ }
+ }
+
+ if (note) {
+ adjustment_index[SO_OVER] = note->he_adjustment_index[SO_OVER];
+ adjustment_index[SO_UNDER] = note->he_adjustment_index[SO_UNDER];
+ } else {
+ adjustment_index[SO_OVER] = 0;
+ adjustment_index[SO_UNDER] = 0;
+ }
+}
+
+static __inline void emit_hepisema_adjustment(FILE *const f,
+ const gregorio_note *const note, const gregorio_sign_orientation index,
+ const char which, const bool open_brace)
+{
+ gregorio_hepisema_adjustment *adj = gregorio_get_hepisema_adjustment(
+ note->he_adjustment_index[index]);
+
+ fprintf(f, "[%ch", which);
+ if (adj->vbasepos || adj->nudge) {
+ fputc(':', f);
+ switch (adj->vbasepos) {
+ case HVB_AUTO:
+ break;
+ case HVB_MIDDLE:
+ fputc('m', f);
+ break;
+ case HVB_O_LOW:
+ if (index == SO_OVER) {
+ fputc('l', f);
+ } else {
+ fprintf(f, "ol");
+ }
+ break;
+ case HVB_O_HIGH:
+ if (index == SO_OVER) {
+ fputc('h', f);
+ } else {
+ fprintf(f, "oh");
+ }
+ break;
+ case HVB_U_LOW:
+ if (index == SO_UNDER) {
+ fputc('l', f);
+ } else {
+ fprintf(f, "ul");
+ }
+ break;
+ case HVB_U_HIGH:
+ if (index == SO_UNDER) {
+ fputc('h', f);
+ } else {
+ fprintf(f, "uh");
+ }
+ break;
+ }
+ if (adj->nudge) {
+ fprintf(f, "%s", adj->nudge);
+ }
+ }
+ if (open_brace) {
+ fputc('{', f);
+ }
+ fputc(']', f);
+}
+
+static __inline void open_hepisema_adjustment(FILE *const f,
+ const gregorio_note *const note,
+ const unsigned short *const prev_adjustment_index,
+ const unsigned short *const next_adjustment_index,
+ const gregorio_sign_orientation index, const char which)
+{
+ const unsigned short adjustment_index =
+ note->he_adjustment_index[index];
+
+ if (adjustment_index
+ && adjustment_index != prev_adjustment_index[index]
+ && adjustment_index == next_adjustment_index[index]) {
+ emit_hepisema_adjustment(f, note, index, which, true);
+ }
+}
+
+static __inline void close_hepisema_adjustment(FILE *const f,
+ const gregorio_note *const note,
+ const unsigned short *const prev_adjustment_index,
+ const unsigned short *const next_adjustment_index,
+ const gregorio_sign_orientation index, const char which)
+{
+ const unsigned short adjustment_index =
+ note->he_adjustment_index[index];
+
+ if (adjustment_index) {
+ if (adjustment_index != next_adjustment_index[index]) {
+ if (adjustment_index == prev_adjustment_index[index]) {
+ fprintf(f, "[%ch}]", which);
+ } else {
+ emit_hepisema_adjustment(f, note, index, which, false);
+ }
+ }
+ }
+}
+
+/*
+ *
+ * The function that writes one glyph. If it is really a glyph (meaning not a
+ * space or an alteration), we just do like always, a loop on the notes and a
+ * call to the function that writes one note on each of them.
+ *
+ */
+
+static void gabc_write_gregorio_glyph(FILE *f, gregorio_glyph *glyph,
+ glyph_context *context)
+{
+ unsigned short next_adjustment_index[2] = { 0, 0 };
+ gregorio_note *current_note;
+
+ gregorio_assert(glyph, gabc_write_gregorio_glyph, "call with NULL argument",
+ return);
+ switch (glyph->type) {
+ case GRE_TEXVERB_GLYPH:
+ if (glyph->texverb) {
+ fprintf(f, "[gv:%s]", gregorio_texverb(glyph->texverb));
+ }
+ break;
+ case GRE_SPACE:
+ if (glyph->next) {
+ switch (glyph->u.misc.unpitched.info.space) {
+ case SP_ZERO_WIDTH:
+ fprintf(f, "!");
+ break;
+ case SP_HALF_SPACE:
+ fprintf(f, "/0");
+ break;
+ case SP_INTERGLYPH_SPACE:
+ fprintf(f, "/!");
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_glyph", __LINE__, "space type",
+ gregorio_space_to_string(
+ glyph->u.misc.unpitched.info.space));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ } else {
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gabc_write_gregorio_glyph, "bad space");
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+ case GRE_GLYPH:
+ if (is_initio_debilis(glyph->u.notes.liquescentia)) {
+ fprintf(f, "-");
+ } else if (is_fused(glyph->u.notes.liquescentia)) {
+ fprintf(f, "@");
+ }
+
+ current_note = glyph->u.notes.first_note;
+ while (current_note) {
+ get_next_hepisema_adjustments(next_adjustment_index,
+ context->syllable, context->element, glyph, current_note);
+
+ open_hepisema_adjustment(f, current_note,
+ context->he_adjustment_index, next_adjustment_index,
+ SO_OVER, 'o');
+ open_hepisema_adjustment(f, current_note,
+ context->he_adjustment_index, next_adjustment_index,
+ SO_UNDER, 'u');
+
+ /* third argument necessary for the special shape pes quadratum */
+ gabc_write_gregorio_note(f, current_note,
+ glyph->u.notes.glyph_type == G_PES_QUADRATUM
+ && current_note == glyph->u.notes.first_note);
+
+ close_hepisema_adjustment(f, current_note,
+ context->he_adjustment_index, next_adjustment_index,
+ SO_OVER, 'o');
+ close_hepisema_adjustment(f, current_note,
+ context->he_adjustment_index, next_adjustment_index,
+ SO_UNDER, 'u');
+
+ context->he_adjustment_index[SO_OVER] =
+ current_note->he_adjustment_index[SO_OVER];
+ context->he_adjustment_index[SO_UNDER] =
+ current_note->he_adjustment_index[SO_UNDER];
+
+ current_note = current_note->next;
+ }
+ gabc_write_end_liquescentia(f, glyph->u.notes.liquescentia);
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_glyph", __LINE__, "glyph type",
+ gregorio_type_to_string(glyph->type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/*
+ *
+ * To write an element, first we check the type of the element (if it is a bar,
+ * etc.), and if it is really an element, we make a loop on the list of glyphs
+ * inside the neume, and for each of them we call the function that will write
+ * one glyph.
+ *
+ */
+
+static void gabc_write_gregorio_element(FILE *f, gregorio_element *element,
+ glyph_context *context)
+{
+ gregorio_glyph *current_glyph;
+ gregorio_assert(element, gabc_write_gregorio_element,
+ "call with NULL argument", return);
+ current_glyph = element->u.first_glyph;
+ switch (element->type) {
+ case GRE_ELEMENT:
+ while (current_glyph) {
+ gabc_write_gregorio_glyph(f, current_glyph, context);
+ current_glyph = current_glyph->next;
+ }
+ break;
+ case GRE_TEXVERB_ELEMENT:
+ if (element->texverb) {
+ fprintf(f, "[ev:%s]", gregorio_texverb(element->texverb));
+ }
+ break;
+ case GRE_ALT:
+ if (element->texverb) {
+ fprintf(f, "[alt:%s]", gregorio_texverb(element->texverb));
+ }
+ break;
+ case GRE_SPACE:
+ gabc_write_space(f, element->u.misc.unpitched.info.space,
+ element->u.misc.unpitched.info.ad_hoc_space_factor,
+ element->next && element->next->type == GRE_SPACE);
+ break;
+ case GRE_BAR:
+ gabc_write_bar(f, element->u.misc.unpitched.info.bar);
+ gabc_write_bar_signs(f, element->u.misc.unpitched.special_sign);
+ break;
+ case GRE_CLEF:
+ gabc_write_clef(f, element->u.misc.clef);
+ break;
+ case GRE_END_OF_LINE:
+ if (element->u.misc.unpitched.info.eol_ragged) {
+ fprintf(f, "Z");
+ } else {
+ fprintf(f, "z");
+ }
+ if (element->u.misc.unpitched.info.eol_forces_custos) {
+ fprintf(f, element->u.misc.unpitched.info.eol_forces_custos_on? "+"
+ : "-");
+ }
+ break;
+ case GRE_CUSTOS:
+ if (element->u.misc.pitched.force_pitch) {
+ fprintf(f, "%c+", pitch_letter(element->u.misc.pitched.pitch));
+ } else {
+ fprintf(f, "z0");
+ }
+ break;
+ case GRE_SUPPRESS_CUSTOS:
+ fprintf(f, "[nocustos]");
+ break;
+ case GRE_NLBA:
+ switch (element->u.misc.unpitched.info.nlba) {
+ case NLBA_BEGINNING:
+ fprintf(f, "<nlba>");
+ break;
+ case NLBA_END:
+ fprintf(f, "</nlba>");
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_element", __LINE__, "nlba type",
+ gregorio_nlba_to_string(element->u.misc.unpitched.info.nlba));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_element", __LINE__, "element type",
+ gregorio_type_to_string(element->type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/*
+ *
+ * Here is defined the function that will write the list of gregorio_elements.
+ * It is very simple: it makes a loop in which it calls a function that writes
+ * one element.
+ *
+ */
+
+static bool gabc_write_gregorio_elements(FILE *f, gregorio_element *element,
+ glyph_context *context)
+{
+ bool linebreak_or_bar_in_element = false;
+ while (element) {
+ context->element = element;
+ gabc_write_gregorio_element(f, element, context);
+ /* we don't want a bar after an end of line */
+ if (element->type != GRE_END_OF_LINE
+ && (element->type != GRE_SPACE
+ || element->u.misc.unpitched.info.space == SP_NEUMATIC_CUT)
+ && element->next && element->next->type == GRE_ELEMENT) {
+ fprintf(f, "/");
+ }
+ if (element->type == GRE_END_OF_LINE || element->type == GRE_BAR)
+ {
+ linebreak_or_bar_in_element = true;
+ }
+ element = element->next;
+ }
+ return linebreak_or_bar_in_element;
+}
+
+/*
+ *
+ * Here it goes, we are writing a gregorio_syllable.
+ *
+ */
+
+static void gabc_write_gregorio_syllable(FILE *f, gregorio_syllable *syllable,
+ glyph_context *context)
+{
+ bool linebreak_or_bar_in_element;
+ gregorio_assert(syllable, gabc_write_gregorio_syllable,
+ "call with NULL argument", return);
+ write_state = GABC_NORMAL;
+ if (syllable->no_linebreak_area == NLBA_BEGINNING) {
+ fprintf(f, "<nlba>");
+ }
+ if (syllable->euouae == EUOUAE_BEGINNING) {
+ fprintf(f, "<eu>");
+ }
+ if (syllable->clear) {
+ fprintf(f, "<clear>");
+ }
+ if (syllable->text) {
+ /* we call the magic function (defined in struct_utils.c), that will
+ * write our text. */
+ gregorio_write_text(WTP_NORMAL, syllable->text, f, &gabc_write_verb,
+ &gabc_print_char, &gabc_write_begin, &gabc_write_end,
+ &gabc_write_special_char);
+ }
+ if (syllable->translation) {
+ fprintf(f, "[");
+ gregorio_write_text(WTP_NORMAL, syllable->translation, f,
+ &gabc_write_verb, &gabc_print_char, &gabc_write_begin,
+ &gabc_write_end, &gabc_write_special_char);
+ fprintf(f, "]");
+ } else if (syllable->translation_type == TR_WITH_CENTER_END) {
+ fprintf(f, "[/]");
+ }
+ if (syllable->euouae == EUOUAE_END) {
+ fprintf(f, "</eu>");
+ }
+ if (syllable->no_linebreak_area == NLBA_END) {
+ fprintf(f, "</nlba>");
+ }
+ fprintf(f, "(");
+ /* we write all the elements of the syllable. */
+ linebreak_or_bar_in_element = gabc_write_gregorio_elements(f, syllable->elements[0], context);
+ if (linebreak_or_bar_in_element)
+ {
+ fprintf(f, ")\n");
+ } else {
+ if (syllable->position == WORD_END
+ || syllable->position == WORD_ONE_SYLLABLE
+ || gregorio_is_only_special(syllable->elements[0]))
+ {
+ fprintf(f, ") ");
+ } else {
+ fprintf(f, ")");
+ }
+ }
+}
+
+/*
+ *
+ * This is the top function, the one called when we want to write a
+ * gregorio_score in gabc.
+ *
+ */
+
+void gabc_write_score(FILE *f, gregorio_score *score)
+{
+ glyph_context context;
+ gregorio_syllable *syllable;
+ gregorio_header *header;
+
+ gregorio_assert(f, gabc_write_score, "call with NULL file", return);
+
+ context.he_adjustment_index[0] = 0;
+ context.he_adjustment_index[1] = 0;
+
+ for (header = score->headers; header; header = header->next) {
+ gabc_write_str_attribute(f, header->name, header->value);
+ }
+ /* And since the gabc is generated by this program, note this. */
+ fprintf(f, "generated-by: %s %s;\n", "gregorio", GREGORIO_VERSION);
+ gregorio_assert(score->number_of_voices == 1, gabc_write_score,
+ "gregorio_score seems to be empty", return);
+ fprintf(f, "%%%%\n");
+ /* at present we only allow for one clef at the start of the gabc */
+ if (score->first_voice_info) {
+ fprintf(f, "(");
+ gabc_write_clef(f, score->first_voice_info->initial_clef);
+ fprintf(f, ")");
+ }
+ syllable = score->first_syllable;
+ /* the we write every syllable */
+ while (syllable) {
+ context.syllable = syllable;
+ gabc_write_gregorio_syllable(f, syllable, &context);
+ syllable = syllable->next_syllable;
+ }
+ fprintf(f, "\n");
+}
+
+/* And that's it... not really hard isn't it? */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc.h b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc.h
new file mode 100644
index 00000000000..34c50e682e1
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc.h
@@ -0,0 +1,86 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes gabc-format handling data structures and entry points.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GABC_H
+#define GABC_H
+
+#include "struct.h"
+
+/* functions to read gabc */
+gregorio_note *gabc_det_notes_from_string(char *str, char *macros[10],
+ gregorio_scanner_location *loc, const gregorio_score *score);
+void gabc_det_notes_finish(void);
+gregorio_element *gabc_det_elements_from_string(char *str, int *current_key,
+ char *macros[10], gregorio_scanner_location *loc,
+ gregorio_shape *punctum_inclinatum_orientation,
+ const gregorio_score *const score);
+gregorio_glyph *gabc_det_glyphs_from_notes(gregorio_note *current_note,
+ int *current_key, gregorio_shape *punctum_inclinatum_orientation,
+ const gregorio_score *score);
+void gabc_digest(const void *buf, size_t size);
+int gabc_score_determination_lex_destroy(void);
+int gabc_notes_determination_lex_destroy(void);
+
+/* see comments on gregorio_add_note_to_a_glyph for meaning of these
+ * variables */
+typedef enum gabc_determination {
+ DET_NO_END,
+ DET_END_OF_CURRENT,
+ DET_END_OF_PREVIOUS,
+ DET_END_OF_BOTH
+} gabc_determination;
+
+static __inline void gabc_update_location(gregorio_scanner_location *const loc,
+ const char *const bytes, const size_t length)
+{
+ size_t i;
+
+ /* to be compatible with LilyPond, this algorithm is based on Lilypond's
+ * Source_file::get_counts */
+
+ /* possible future enhancement: make the tabstop size configurable */
+
+ loc->first_line = loc->last_line;
+ loc->first_column = loc->last_column;
+ loc->first_offset = loc->last_offset;
+
+ for (i = 0; i < length; ++i) {
+ if (bytes[i] == '\n') {
+ ++loc->last_line;
+ loc->last_column = 0;
+ loc->last_offset = 0;
+ } else if (((unsigned char)bytes[i] & 0xc0u) != 0x80u) {
+ /* if two highest bits are 1 and 0, it's a continuation byte,
+ * so count everything else, which is either a single-byte
+ * character or the first byte of a multi-byte sequence */
+
+ if (bytes[i] == '\t') {
+ loc->last_column = (loc->last_column / 8 + 1) * 8;
+ } else {
+ ++loc->last_column;
+ }
+ ++loc->last_offset;
+ }
+ }
+}
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c b/Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c
new file mode 100644
index 00000000000..7d3aa1e00bd
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c
@@ -0,0 +1,721 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the command line interface of Gregorio.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+static const char *copyright =
+"Copyright (C) 2006-2019 Gregorio Project authors (see CONTRIBUTORS.md)";
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#ifdef USE_KPSE
+#include <kpathsea/kpathsea.h>
+#else
+#include <getopt.h>
+#endif
+#include <string.h> /* for strcmp */
+#include <locale.h>
+#include <limits.h>
+#include <errno.h>
+#include <assert.h>
+#include "struct.h"
+#include "plugins.h"
+#include "messages.h"
+#include "characters.h"
+#include "support.h"
+#include "gabc/gabc.h"
+#include "vowel/vowel.h"
+
+#ifndef MODULE_PATH_ENV
+#define MODULE_PATH_ENV "MODULE_PATH"
+#endif
+
+typedef enum gregorio_file_format {
+ FORMAT_UNSET = 0,
+ GABC,
+ GTEX,
+ DUMP
+} gregorio_file_format;
+
+#define GABC_STR "gabc"
+#define GTEX_STR "gtex"
+#define DUMP_STR "dump"
+
+#define DEFAULT_INPUT_FORMAT GABC
+#define DEFAULT_OUTPUT_FORMAT GTEX
+
+/* realpath is not in mingw32 */
+#ifdef _WIN32
+/* _MAX_PATH is being passed for the maxLength (third) argument of _fullpath,
+ * but we are always passing NULL for the absPath (first) argument, so it will
+ * be ignored per the MSDN documentation */
+#define gregorio_realpath(path,resolved_path) _fullpath(resolved_path,path,_MAX_PATH)
+#else
+#ifdef FUNC_REALPATH_WORKS
+#define gregorio_realpath(path,resolved_path) realpath(path,resolved_path)
+#else
+/* When realpath doesn't work (on an older system), we are forced to use
+ * PATH_MAX to allocate a buffer */
+#define gregorio_realpath(path,resolved_path) realpath(path,gregorio_malloc(PATH_MAX))
+#endif /* FUNC_REALPATH_WORKS */
+#endif /* _WIN32 */
+
+/* define_path attempts to canonicalize the pathname of a given string */
+static char *define_path(char *current_directory, char *string)
+{
+ int length;
+ char *file_name;
+ char *temp_name;
+ char *base_name;
+#ifdef _WIN32
+ char *last_backslash;
+#endif
+
+ temp_name = gregorio_strdup(string);
+ base_name = strrchr(temp_name, '/');
+#ifdef _WIN32
+ last_backslash = strrchr(temp_name, '\\');
+ if (last_backslash > base_name) {
+ base_name = last_backslash;
+ }
+#endif
+ if (base_name) {
+ /* some path was supplied */
+
+ *base_name = '\0';
+ base_name++;
+
+ /* try to resolve it */
+ file_name = gregorio_realpath(temp_name, NULL);
+ if (!file_name) {
+ /* it's not reasonable to cover this failure in testing */
+ /* LCOV_EXCL_START */
+ fprintf(stderr, "the directory %s for %s does not exist\n",
+ temp_name, base_name);
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+ } else {
+ /* no path was supplied */
+ base_name = string;
+ file_name = gregorio_malloc(
+ strlen(current_directory) + strlen(base_name) + 2);
+ strcpy(file_name, current_directory);
+ }
+
+ /* build the file name */
+ length = strlen(file_name);
+ file_name = gregorio_realloc(file_name, length + strlen(base_name) + 2);
+ file_name[length] = '/';
+ strcpy(file_name + length + 1, base_name);
+
+ free(temp_name);
+ return file_name;
+}
+
+/* function that returns the filename without the extension */
+static char *get_base_filename(char *fbasename)
+{
+ char *p;
+ int l;
+ char *ret;
+ p = strrchr(fbasename, '.');
+ if (!p || strchr(p, '/') || strchr(p, '\\')) {
+ return gregorio_strdup(fbasename);
+ }
+ l = strlen(fbasename) - strlen(p);
+ ret = (char *) gregorio_malloc(l + 1);
+ gregorio_snprintf(ret, l + 1, "%s", fbasename);
+ ret[l] = '\0';
+ return ret;
+}
+
+/* function that adds the good extension to a basename (without extension) */
+static char *get_output_filename(char *fbasename, const char *extension)
+{
+ char *output_filename = NULL;
+ output_filename =
+ (char *) gregorio_malloc((strlen(extension) + strlen(fbasename) + 2));
+ output_filename = strcpy(output_filename, fbasename);
+ output_filename = strcat(output_filename, ".");
+ output_filename = strcat(output_filename, extension);
+ return output_filename;
+}
+
+static void print_licence(void)
+{
+ printf("Gregorio: Gregorian chant score engraving.\n\
+%s\n\
+\n\
+This program is free software: you can redistribute it and/or modify\n\
+it under the terms of the GNU General Public License as published by\n\
+the Free Software Foundation, either version 3 of the License, or\n\
+(at your option) any later version.\n\
+\n", copyright);
+ printf("This program is distributed in the hope that it will be useful,\n\
+but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
+GNU General Public License for more details.\n\
+\n\
+You should have received a copy of the GNU General Public License\n\
+along with this program. If not, see <http://www.gnu.org/licenses/>.\n\
+");
+}
+
+static void print_usage(char *name)
+{
+ printf(_("Usage: %s [OPTION]... [-s | INPUT_FILE]\n\
+\nEngrave Gregorian chant scores, convert a gabc file to GregorioTeX.\n\n\
+Options:\n\
+ -o, --output-file FILE write output to FILE,\n\
+ default is basename(INPUT_FILE).FORMAT\n\
+ -S, --stdout write output to stdout\n\
+ -s, --stdin read input from stdin\n\
+ -l, --messages-file FILE output messages to FILE (default: stderr)\n\
+ -F, --output-format FORMAT\n\
+ specify output format (default: gtex)\n"), name);
+printf(_(" -f, --input-format FORMAT\n\
+ specify input format (default: gabc)\n\
+ -p, --point-and-click generate Lilypond point and click information\n\
+ -h, --help print this help message\n\
+ -V, --version print version and exit\n"));
+ printf(_("\
+ -L, --license print licence\n\
+ -v, --verbose verbose mode\n\
+ -W, --all-warnings output warnings\n\
+ -D, --deprecation-errors treat deprecation warnings as errors\n\
+ -d, --debug output debug information\n\
+\n\
+Formats:\n\
+ gabc gabc\n\
+ gtex GregorioTeX\n\
+ dump plain text dump (for debugging purpose)\n\
+\n\
+See <" PACKAGE_URL "> for general documentation,\n\
+GregorioRef.pdf and GregorioNabcRef.pdf for full documentation.\
+\n"));
+}
+
+static void print_short_usage(char *name)
+{
+ fprintf(stderr, "Usage: %s [OPTION]... [-s | INPUT_FILE]\n\
+Try '%s --help' for more information.\n", name, name);
+}
+
+static void check_input_clobber(char *input_file_name, char *output_file_name)
+{
+ if (input_file_name && output_file_name) {
+ char *absolute_input_file_name;
+ char *absolute_output_file_name;
+ char *current_directory;
+ int file_cmp;
+ size_t bufsize = 128;
+ char *buf = gregorio_malloc(bufsize);
+ while ((current_directory = getcwd(buf, bufsize)) == NULL
+ && errno == ERANGE && bufsize < MAX_BUF_GROWTH) {
+ free(buf);
+ bufsize <<= 1;
+ buf = gregorio_malloc(bufsize);
+ }
+ if (current_directory == NULL) {
+ fprintf(stderr, _("can't determine current directory"));
+ free(buf);
+ gregorio_exit(1);
+ }
+ absolute_input_file_name = define_path(current_directory, input_file_name);
+ absolute_output_file_name = define_path(current_directory, output_file_name);
+ file_cmp = strcmp(absolute_input_file_name, absolute_output_file_name);
+ if (file_cmp == 0) {
+ fprintf(stderr, "error: refusing to overwrite the input file\n");
+ }
+ free(buf);
+ free(absolute_input_file_name);
+ free(absolute_output_file_name);
+ if (file_cmp == 0) {
+ gregorio_exit(1);
+ }
+ }
+}
+
+static char *encode_point_and_click_filename(char *input_file_name)
+{
+ /* percent-encoding favors capital hex digits */
+ static const char *const hex = "0123456789ABCDEF";
+ char *filename, *result = NULL, *r = NULL, *p;
+
+ filename = gregorio_realpath(input_file_name, NULL);
+ if (!filename) {
+ /* it's not reasonable to generate the system error that would cause
+ * this to fail */
+ /* LCOV_EXCL_START */
+ fprintf(stderr, "error: unable to resolve %s\n", input_file_name);
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+
+ /* 2 extra characters for a possible leading slash and final NUL */
+ r = result = gregorio_malloc(strlen(filename) * 4 + 2);
+
+#ifdef _WIN32
+ *(r++) = '/';
+#endif
+
+ for (p = filename; *p; ++p) {
+#ifdef _WIN32
+ if (*p == '\\') {
+ *p = '/';
+ }
+#endif
+
+ /* note that -, _ and ~ are conspicuously missing from this list
+ * because they cause trouble in TeX; we will percent-encode them */
+ if ((*p >= 'A' && *p <= 'Z') || (*p >= 'a' && *p < 'z')
+ || (*p >= '0' && *p <= '9') || *p == '.' || *p == '/'
+#ifdef _WIN32
+ || *p == ':'
+#endif
+ ) {
+ *(r++) = *p;
+ }
+ else {
+ /* percent-encode anything else */
+ *(r++) = '\\'; /* must escape it because it's TeX */
+ *(r++) = '%';
+ *(r++) = hex[(*p >> 4) & 0x0FU];
+ *(r++) = hex[*p & 0x0FU];
+ }
+ }
+
+ *r = '\0';
+
+ free(filename);
+ return result;
+}
+
+int main(int argc, char **argv)
+{
+ int c;
+
+ char *input_file_name = NULL;
+ char *output_file_name = NULL;
+ char *output_basename = NULL;
+ char *error_file_name = NULL;
+ FILE *input_file = NULL;
+ FILE *output_file = NULL;
+ FILE *error_file = NULL;
+ gregorio_file_format input_format = FORMAT_UNSET;
+ gregorio_file_format output_format = FORMAT_UNSET;
+ gregorio_verbosity verb_mode = 0;
+ bool deprecation_errors = false;
+ bool point_and_click = false;
+ char *point_and_click_filename = NULL;
+ bool debug = false;
+ bool must_print_short_usage = false;
+ int option_index = 0;
+ static struct option long_options[] = {
+ {"output-file", 1, 0, 'o'},
+ {"stdout", 0, 0, 'S'},
+ {"output-format", 1, 0, 'F'},
+ {"messages-file", 1, 0, 'l'},
+ {"input-format", 1, 0, 'f'},
+ {"stdin", 0, 0, 's'},
+ {"help", 0, 0, 'h'},
+ {"version", 0, 0, 'V'},
+ {"licence", 0, 0, 'L'},
+ {"verbose", 0, 0, 'v'},
+ {"all-warnings", 0, 0, 'W'},
+ {"deprecation-errors", 0, 0, 'D'},
+ {"point-and-click", 0, 0, 'p'},
+ {"debug", 0, 0, 'd'},
+ };
+ gregorio_score *score = NULL;
+
+ gregorio_support_init("gregorio", argv[0]);
+
+ if (argc == 1) {
+ fprintf(stderr, "%s: missing file operand.\n", argv[0]);
+ print_short_usage(argv[0]);
+ gregorio_exit(0);
+ }
+ setlocale(LC_CTYPE, "C");
+
+ while (1) {
+ c = getopt_long(argc, argv, "o:SF:l:f:shOLVvWDpd",
+ long_options, &option_index);
+ if (c == -1)
+ break;
+ switch (c) {
+ case 'o':
+ if (output_file_name) {
+ fprintf(stderr,
+ "warning: several output files declared, %s taken\n",
+ output_file_name);
+ must_print_short_usage = true;
+ break;
+ }
+ if (output_file) { /* means that stdout is defined */
+ fprintf(stderr,
+ "warning: can't write to file and stdout, writing on stdout\n");
+ must_print_short_usage = true;
+ break;
+ }
+ output_file_name = optarg;
+ break;
+ case 'S':
+ if (output_file_name) {
+ fprintf(stderr,
+ "warning: can't write to file and stdout, writing on %s\n",
+ output_file_name);
+ must_print_short_usage = true;
+ break;
+ }
+ if (output_file) { /* means that stdout is defined */
+ fprintf(stderr, "warning: option used several times: %c\n", c);
+ must_print_short_usage = true;
+ break;
+ }
+ output_file = stdout;
+ break;
+ case 'F':
+ if (output_format) {
+ fprintf(stderr,
+ "warning: several output formats declared, first taken\n");
+ must_print_short_usage = true;
+ break;
+ }
+ if (!strcmp(optarg, GABC_STR)) {
+ output_format = GABC;
+ break;
+ }
+ if (!strcmp(optarg, GTEX_STR)) {
+ output_format = GTEX;
+ break;
+ }
+ if (!strcmp(optarg, DUMP_STR)) {
+ output_format = DUMP;
+ break;
+ } else {
+ fprintf(stderr, "error: unknown output format: %s\n", optarg);
+ print_short_usage(argv[0]);
+ gregorio_exit(1);
+ }
+ break;
+ case 'l':
+ if (error_file_name) {
+ fprintf(stderr,
+ "warning: several error files declared, %s taken\n",
+ error_file_name);
+ must_print_short_usage = true;
+ break;
+ }
+ error_file_name = optarg;
+ break;
+ case 'f':
+ if (input_format) {
+ gregorio_set_error_out(error_file);
+ fprintf(stderr,
+ "warning: several output formats declared, first taken\n");
+ must_print_short_usage = true;
+ break;
+ }
+ if (!strcmp(optarg, GABC_STR)) {
+ input_format = GABC;
+ break;
+ } else {
+ fprintf(stderr, "error: unknown input format: %s\n", optarg);
+ print_short_usage(argv[0]);
+ gregorio_exit(1);
+ }
+ break;
+ case 's':
+ /* input_file_name will be null here because of the way
+ * we use getopt_long */
+ assert(!input_file_name);
+ if (input_file) { /* means that stdin is defined */
+ fprintf(stderr, "warning: option used several times: %c\n", c);
+ must_print_short_usage = true;
+ break;
+ }
+ input_file = stdin;
+ break;
+ case 'h':
+ print_usage(argv[0]);
+ gregorio_exit(0);
+ break;
+ case 'V':
+ gregorio_print_version(copyright);
+ gregorio_exit(0);
+ break;
+ case 'v':
+ if (verb_mode && verb_mode != VERBOSITY_WARNING) {
+ fprintf(stderr, "warning: verbose option passed several times\n");
+ must_print_short_usage = true;
+ break;
+ }
+ verb_mode = VERBOSITY_INFO;
+ break;
+ case 'W':
+ if (verb_mode == VERBOSITY_WARNING) {
+ fprintf(stderr,
+ "warning: all-warnings option passed several times\n");
+ must_print_short_usage = true;
+ break;
+ }
+ if (verb_mode != VERBOSITY_INFO) {
+ verb_mode = VERBOSITY_WARNING;
+ }
+ break;
+ case 'D':
+ if (deprecation_errors) {
+ fprintf(stderr, "warning: deprecation-errors option passed "
+ "several times\n");
+ must_print_short_usage = true;
+ break;
+ }
+ deprecation_errors = true;
+ break;
+ case 'L':
+ print_licence();
+ gregorio_exit(0);
+ break;
+ case 'p':
+ if (point_and_click) {
+ fprintf(stderr,
+ "warning: point-and-click option passed several times\n");
+ must_print_short_usage = true;
+ break;
+ }
+ point_and_click = true;
+ break;
+ case 'd':
+ if (debug) {
+ fprintf(stderr,
+ "warning: debug option passed several times\n");
+ must_print_short_usage = true;
+ break;
+ }
+ debug = true;
+ break;
+ case '?':
+ must_print_short_usage = true;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(main, "unknown option: %c", c);
+ print_short_usage(argv[0]);
+ gregorio_exit(1);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ } /* end of while */
+ if (optind == argc) {
+ if (!input_file) { /* input not undefined (could be stdin) */
+ fprintf(stderr, "%s: missing file operand.\n", argv[0]);
+ print_short_usage(argv[0]);
+ gregorio_exit(1);
+ }
+ } else {
+ input_file_name = argv[optind++];
+ output_basename = get_base_filename(input_file_name);
+ if (input_file) {
+ fprintf(stderr,
+ "warning: can't read from both stdin and a file, reading from %s\n",
+ input_file_name);
+ input_file = NULL;
+ must_print_short_usage = true;
+ }
+ }
+ if (optind < argc) {
+ must_print_short_usage = true;
+ fprintf(stderr, "ignored arguments:");
+ for (; optind < argc; ++optind) {
+ fprintf(stderr, " %s", argv[optind]);
+ }
+ fprintf(stderr, "\n");
+ }
+
+ if (must_print_short_usage) {
+ print_short_usage(argv[0]);
+ fprintf(stderr, "Proceeding anyway...\n");
+ }
+
+ gregorio_set_debug_messages(debug);
+ gregorio_set_deprecation_errors(deprecation_errors);
+
+ if (!input_format) {
+ input_format = DEFAULT_INPUT_FORMAT;
+ }
+
+ if (!output_format) {
+ output_format = DEFAULT_OUTPUT_FORMAT;
+ }
+
+ /* then we act... */
+
+ if (!output_file_name && !output_file) {
+ if (!output_basename) {
+ output_file = stdout;
+ } else {
+ switch (output_format) {
+ case GABC:
+ output_file_name =
+ get_output_filename(output_basename, "gabc");
+ break;
+ case GTEX:
+ output_file_name =
+ get_output_filename(output_basename, "gtex");
+ break;
+ case DUMP:
+ output_file_name =
+ get_output_filename(output_basename, "dump");
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(stderr, "error: unsupported format");
+ print_short_usage(argv[0]);
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+ }
+ }
+
+ if (output_basename) {
+ free(output_basename);
+ }
+
+ if (!output_file) {
+ if (!input_file) {
+ check_input_clobber(input_file_name, output_file_name);
+ }
+ gregorio_check_file_access(write, output_file_name, ERROR,
+ gregorio_exit(1));
+ output_file = fopen(output_file_name, "wb");
+ if (!output_file) {
+ fprintf(stderr, "error: can't write in file %s", output_file_name);
+ gregorio_exit(1);
+ }
+ }
+
+ /* we always have input_file or input_file_name */
+ if (input_file) {
+ if (point_and_click) {
+ fprintf(stderr,
+ "warning: disabling point-and-click since reading from stdin\n");
+ }
+ } else {
+ gregorio_check_file_access(read, input_file_name, ERROR,
+ gregorio_exit(1));
+ input_file = fopen(input_file_name, "r");
+ if (!input_file) {
+ fprintf(stderr, "error: can't open file %s for reading\n",
+ input_file_name);
+ gregorio_exit(1);
+ }
+ if (point_and_click) {
+ point_and_click_filename = encode_point_and_click_filename(
+ input_file_name);
+ }
+ }
+
+ if (!error_file_name) {
+ error_file = stderr;
+ gregorio_set_error_out(error_file);
+ } else {
+ gregorio_check_file_access(write, error_file_name, ERROR,
+ gregorio_exit(1));
+ error_file = fopen(error_file_name, "wb");
+ if (!error_file) {
+ fprintf(stderr, "error: can't open file %s for writing\n",
+ error_file_name);
+ gregorio_exit(1);
+ }
+ gregorio_set_error_out(error_file);
+ }
+
+ if (!verb_mode) {
+ verb_mode = VERBOSITY_DEPRECATION;
+ }
+
+ gregorio_set_verbosity_mode(verb_mode);
+
+ switch (input_format) {
+ case GABC:
+ score = gabc_read_score(input_file, point_and_click);
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(stderr, "error : invalid input format\n");
+ fclose(input_file);
+ fclose(output_file);
+ gregorio_exit(1);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+
+ fclose(input_file);
+ if (score == NULL) {
+ /* score should never be NULL on return from gabc_read_score */
+ /* LCOV_EXCL_START */
+ fclose(output_file);
+ fprintf(stderr, "error in file parsing\n");
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+
+ switch (output_format) {
+ case GABC:
+ gabc_write_score(output_file, score);
+ break;
+ case GTEX:
+ gregoriotex_write_score(output_file, score, point_and_click_filename);
+ break;
+ case DUMP:
+ dump_write_score(output_file, score);
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(stderr, "error : invalid output format\n");
+ gregorio_free_score(score);
+ fclose(output_file);
+ gregorio_exit(1);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ fclose(output_file);
+ if (point_and_click_filename) {
+ free(point_and_click_filename);
+ }
+ gregorio_free_score(score);
+ gregorio_vowel_tables_free();
+ gabc_score_determination_lex_destroy();
+ gabc_notes_determination_lex_destroy();
+ gregorio_vowel_rulefile_lex_destroy();
+ if (error_file_name) {
+ fclose(error_file);
+ }
+
+ gregorio_exit(gregorio_get_return_value());
+} /* due to exit on prior line, this will never be reached; LCOV_EXCL_LINE */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c
new file mode 100644
index 00000000000..dd88699392b
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c
@@ -0,0 +1,1750 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file contains the logic for positioning signs on neumes.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include "config.h"
+#include <stdlib.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+
+#include "gregoriotex.h"
+
+/* (loose) naming convention, employing camel case to be TeX-csname-compliant:
+ * {specific-glyph-shape}{note-position}{note-shape}{first-ambitus}{second-ambitus}
+ */
+OFFSET_CASE(FinalPunctum);
+OFFSET_CASE(FinalDeminutus);
+OFFSET_CASE(PenultBeforePunctumWide);
+OFFSET_CASE(PenultBeforeDeminutus);
+OFFSET_CASE(AntepenultBeforePunctum);
+OFFSET_CASE(AntepenultBeforeDeminutus);
+OFFSET_CASE(InitialPunctum);
+OFFSET_CASE(InitioDebilis);
+OFFSET_CASE(PorrNonAuctusInitialWide);
+OFFSET_CASE(PorrNonAuctusInitialOne);
+OFFSET_CASE(PorrAuctusInitialAny);
+OFFSET_CASE(FinalInclinatum);
+OFFSET_CASE(FinalInclinatumDeminutus);
+OFFSET_CASE(FinalStropha);
+OFFSET_CASE(FinalQuilisma);
+OFFSET_CASE(FinalOriscus);
+OFFSET_CASE(PenultBeforePunctumOne);
+OFFSET_CASE(FinalUpperPunctum);
+OFFSET_CASE(InitialOriscus);
+OFFSET_CASE(InitialQuilisma);
+OFFSET_CASE(TorcResNonAuctusSecondWideWide);
+OFFSET_CASE(TorcResNonAuctusSecondOneWide);
+OFFSET_CASE(TorcResDebilisNonAuctusSecondAnyWide);
+OFFSET_CASE(FinalLineaPunctum);
+OFFSET_CASE(TorcResQuilismaNonAuctusSecondWideWide);
+OFFSET_CASE(TorcResOriscusNonAuctusSecondWideWide);
+OFFSET_CASE(TorcResQuilismaNonAuctusSecondOneWide);
+OFFSET_CASE(TorcResOriscusNonAuctusSecondOneWide);
+OFFSET_CASE(TorcResNonAuctusSecondWideOne);
+OFFSET_CASE(TorcResDebilisNonAuctusSecondAnyOne);
+OFFSET_CASE(TorcResQuilismaNonAuctusSecondWideOne);
+OFFSET_CASE(TorcResOriscusNonAuctusSecondWideOne);
+OFFSET_CASE(TorcResNonAuctusSecondOneOne);
+OFFSET_CASE(TorcResQuilismaNonAuctusSecondOneOne);
+OFFSET_CASE(TorcResOriscusNonAuctusSecondOneOne);
+OFFSET_CASE(TorcResAuctusSecondWideAny);
+OFFSET_CASE(TorcResDebilisAuctusSecondAnyAny);
+OFFSET_CASE(TorcResQuilismaAuctusSecondWideAny);
+OFFSET_CASE(TorcResOriscusAuctusSecondWideAny);
+OFFSET_CASE(TorcResAuctusSecondOneAny);
+OFFSET_CASE(TorcResQuilismaAuctusSecondOneAny);
+OFFSET_CASE(TorcResOriscusAuctusSecondOneAny);
+OFFSET_CASE(ConnectedPenultBeforePunctumWide);
+OFFSET_CASE(ConnectedPenultBeforePunctumOne);
+OFFSET_CASE(InitialConnectedPunctum);
+OFFSET_CASE(InitialConnectedVirga);
+OFFSET_CASE(InitialConnectedQuilisma);
+OFFSET_CASE(InitialConnectedOriscus);
+OFFSET_CASE(FinalConnectedPunctum);
+OFFSET_CASE(FinalConnectedAuctus);
+OFFSET_CASE(FinalVirgaAuctus);
+OFFSET_CASE(FinalConnectedVirga);
+OFFSET_CASE(InitialVirga);
+OFFSET_CASE(SalicusOriscusWide);
+OFFSET_CASE(SalicusOriscusOne);
+OFFSET_CASE(LeadingPunctum);
+OFFSET_CASE(LeadingQuilisma);
+OFFSET_CASE(LeadingOriscus);
+OFFSET_CASE(Flat);
+OFFSET_CASE(Sharp);
+OFFSET_CASE(Natural);
+
+static __inline const char *note_before_last_note_case_ignoring_deminutus(
+ const gregorio_note *const current_note)
+{
+ assert(current_note->next);
+ if ((current_note->u.note.pitch - current_note->next->u.note.pitch) == 1
+ || (current_note->u.note.pitch -
+ current_note->next->u.note.pitch) == -1) {
+ if (!current_note->previous || current_note->u.note.pitch -
+ current_note->previous->u.note.pitch > 1) {
+ return ConnectedPenultBeforePunctumOne;
+ } else {
+ return PenultBeforePunctumOne;
+ }
+ } else {
+ if (!current_note->previous || current_note->u.note.pitch -
+ current_note->previous->u.note.pitch > 1) {
+ return ConnectedPenultBeforePunctumWide;
+ } else {
+ return PenultBeforePunctumWide;
+ }
+ }
+}
+
+static __inline const char *note_before_last_note_case(
+ const gregorio_glyph *const current_glyph,
+ const gregorio_note *const current_note)
+{
+ if ((current_glyph->u.notes.liquescentia & L_DEMINUTUS)
+ && current_note->next) {
+ return PenultBeforeDeminutus;
+ } else {
+ return note_before_last_note_case_ignoring_deminutus(current_note);
+ }
+}
+
+/* num can be FinalPunctum or FinalUpperPunctum according if the last note is a
+ * standard punctum or a smaller punctum (for pes, porrectus and torculus
+ * resupinus */
+static __inline const char *last_note_case(
+ const gregorio_glyph *const current_glyph, const char* offset_pos,
+ gregorio_note *current_note, bool no_ambitus_one)
+{
+ if (current_glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ /*
+ * may seem strange, but it is unlogical to typeset a small horizontal
+ * episema at the end of a flexus deminutus
+ */
+ return FinalDeminutus;
+ }
+ if (!current_note->previous
+ || (!no_ambitus_one && (offset_pos == FinalUpperPunctum
+ || current_note->previous->u.note.pitch -
+ current_note->u.note.pitch == 1 ||
+ current_note->u.note.pitch - current_note->previous->u.note.pitch
+ == 1))) {
+ return offset_pos;
+ }
+ if (current_note->previous->u.note.pitch < current_note->u.note.pitch) {
+ if (current_glyph->u.notes.liquescentia &
+ (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ return FinalConnectedAuctus;
+ } else {
+ return FinalConnectedVirga;
+ }
+ } else {
+ return FinalConnectedPunctum;
+ }
+}
+
+static __inline const char *first_note_case(
+ const gregorio_note *const current_note,
+ const gregorio_glyph *const current_glyph)
+{
+ bool ambitus_one = true;
+ if (current_glyph->u.notes.liquescentia >= L_INITIO_DEBILIS) {
+ return InitioDebilis;
+ } else {
+ if (current_note->next && current_note->next->u.note.pitch -
+ current_note->u.note.pitch != 1 &&
+ current_note->u.note.pitch - current_note->next->u.note.pitch
+ != 1) {
+ ambitus_one = false;
+ }
+ switch (current_note->u.note.shape) {
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ return ambitus_one ? InitialOriscus : InitialConnectedOriscus;
+
+ case S_QUILISMA:
+ return ambitus_one ? InitialQuilisma : InitialConnectedQuilisma;
+
+ default:
+ if (ambitus_one) {
+ return InitialPunctum;
+ }
+ if (current_note->u.note.pitch > current_note->next->u.note.pitch) {
+ return InitialConnectedVirga;
+ } else {
+ return InitialConnectedPunctum;
+ }
+ }
+ }
+}
+
+static __inline const char *fused_single_note_case(
+ const gregorio_glyph *const glyph, const char *const unfused_case,
+ const char *const fused_case) {
+ int fuse_to_next_glyph = glyph->u.notes.fuse_to_next_glyph;
+ if (fuse_to_next_glyph < -1 || fuse_to_next_glyph > 1) {
+ return fused_case;
+ }
+ return unfused_case;
+}
+
+static __inline gregorio_vposition below_if_auctus(
+ const gregorio_glyph *const glyph)
+{
+ if (glyph->u.notes.liquescentia &
+ (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ return VPOS_BELOW;
+ }
+ return VPOS_ABOVE;
+}
+
+static __inline gregorio_vposition above_if_h_episema(
+ const gregorio_note *const note)
+{
+ if (note && note->h_episema_above) {
+ return VPOS_ABOVE;
+ }
+ return VPOS_BELOW;
+}
+
+static __inline gregorio_vposition above_if_fused_next_h_episema(
+ const gregorio_glyph *glyph)
+{
+ const gregorio_glyph *next = gregorio_next_non_texverb_glyph(glyph);
+ gregorio_assert(next && next->type == GRE_GLYPH
+ && is_fused(next->u.notes.liquescentia),
+ above_if_fused_next_h_episema,
+ "expected this glyph to be fused to the next one",
+ return VPOS_BELOW);
+ return above_if_h_episema(next->u.notes.first_note);
+}
+
+static __inline gregorio_vposition above_if_either_h_episema(
+ const gregorio_note *const note)
+{
+ if ((note->previous && note->previous->h_episema_above)
+ || (note->next && note->next->h_episema_above)) {
+ return VPOS_ABOVE;
+ }
+ return VPOS_BELOW;
+}
+
+static __inline gregorio_vposition below_if_next_ambitus_allows(
+ const gregorio_note *const note)
+{
+ assert(note->next);
+
+ if (!note->next || note->u.note.pitch - note->next->u.note.pitch > 2) {
+ return VPOS_BELOW;
+ }
+ return VPOS_ABOVE;
+}
+
+static __inline void low_high_set_lower(const gregorio_glyph *const glyph,
+ gregorio_note *const note)
+{
+ if ((glyph->u.notes.liquescentia & L_DEMINUTUS) ||
+ !(glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS))) {
+ note->is_lower_note = true;
+ }
+}
+
+static __inline void low_high_set_upper(const gregorio_glyph *const glyph,
+ gregorio_note *const note)
+{
+ if ((glyph->u.notes.liquescentia & L_DEMINUTUS) ||
+ !(glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS))) {
+ note->is_upper_note = true;
+ }
+}
+
+static __inline void high_low_set_upper(const gregorio_glyph *const glyph,
+ gregorio_note *const note)
+{
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ note->is_upper_note = true;
+ }
+}
+
+static __inline void high_low_set_lower(const gregorio_glyph *const glyph,
+ gregorio_note *const note)
+{
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ note->is_lower_note = true;
+ }
+}
+
+/* a function that finds the good sign (additional line, vepisema or
+ * hepisema) number, according to the gregoriotex convention (described in
+ * gregoriotex.tex)
+ * this function is REALLY a pain in the ass, but it is sadly necessary */
+/*
+ *
+ * For the first note of a porrectus (flexus), this table summarizes the sign
+ * number (amb2 is the ambitus after the diagonal stroke):
+ *
+ * Porrectus | Porrectus | Porrectus | Porrectus
+ * non-auctus | non-auctus | auctus | Flexus
+ * amb2=1 | amb2>1 | |
+ * =================|=================|==============|==============
+ * PorrNonAuctus | PorrNonAuctus | PorrAuctus | PorrAuctus
+ * ~InitialOne | ~InitialWide | ~InitialAny | ~InitialAny
+ *
+ * For the second note of a torculus resupinus (flexus), this table summarizes
+ * the number (amb1 is the ambitus before the diagonal stroke and amb2 is the
+ * ambitus after the diagonal stroke):
+ *
+ * | | Torculus | Torculus | Torculus | Torculus
+ * | | Resupinus | Resupinus | Resupinus | Resupinus
+ * | Initial | non-auctus | non-auctus | auctus | Flexus
+ * amb1 | Note | amb2=1 | amb2>1 | |
+ * ======|============|=============|=============|============|============
+ * 1 | Punctum | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~OneOne | ~OneWide | ~OneAny | ~OneAny
+ * ------+------------+-------------+-------------+------------+------------
+ * 1 | I. Debilis | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~Debilis | ~Debilis | ~Debilis | ~Debilis
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~AnyOne | ~AnyWide | ~AnyAny | ~AnyAny
+ * ------+------------+-------------+-------------+------------+------------
+ * 1 | Quilisma | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~Quilisma | ~Quilisma | ~Quilisma | ~Quilisma
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~OneOne | ~OneWide | ~OneAny | ~OneAny
+ * ------+------------+-------------+-------------+------------+------------
+ * 1 | Oriscus | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~Oriscus | ~Oriscus | ~Oriscus | ~Oriscus
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~OneOne | ~OneWide | ~OneAny | ~OneAny
+ * ======|============|=============|=============|============|============
+ * >1 | Punctum | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~WideOne | ~WideWide | ~WideAny | ~WideAny
+ * ------+------------+-------------+-------------+------------+------------
+ * >1 | I. Debilis | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~Debilis | ~Debilis | ~Debilis | ~Debilis
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~AnyOne | ~AnyWide | ~AnyAny | ~AnyAny
+ * ------+------------+-------------+-------------+------------+------------
+ * >1 | Quilisma | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~Quilisma | ~Quilisma | ~Quilisma | ~Quilisma
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~WideOne | ~WideWide | ~WideAny | ~WideAny
+ * ------+------------+-------------+-------------+------------+------------
+ * >1 | Oriscus | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~Oriscus | ~Oriscus | ~Oriscus | ~Oriscus
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~WideOne | ~WideWide | ~WideAny | ~WideAny
+ *
+ */
+static gregorio_vposition advise_positioning(const gregorio_glyph *const glyph,
+ gregorio_note *const note, int i, const gtex_type type)
+{
+ gregorio_vposition h_episema = VPOS_AUTO, v_episema = VPOS_AUTO;
+ bool v_episema_below_is_lower = false, done;
+ const gregorio_glyph *previous;
+
+ /* no need to clear is_lower_note/is_upper_note because we used calloc */
+
+ switch (type) {
+ case T_PES:
+ case T_QUILISMA_PES:
+ /*
+ * in the case of a pes, we put the episema just under the bottom note
+ */
+ if (i == 1) {
+ if (glyph->u.notes.liquescentia & L_INITIO_DEBILIS) {
+ note->gtex_offset_case = InitioDebilis;
+ h_episema = above_if_h_episema(note->next);
+ } else {
+ note->is_lower_note = true;
+ if (note->u.note.shape == S_QUILISMA) {
+ note->gtex_offset_case = FinalQuilisma;
+ } else {
+ note->gtex_offset_case = FinalPunctum;
+ }
+ h_episema = VPOS_BELOW;
+ }
+ v_episema = VPOS_BELOW;
+ } else { /* i=2 */
+ if (!(glyph->u.notes.liquescentia & L_INITIO_DEBILIS)) {
+ note->is_upper_note = true;
+ }
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ note->gtex_offset_case = FinalDeminutus;
+ } else {
+ note->gtex_offset_case = FinalUpperPunctum;
+ }
+ h_episema = VPOS_ABOVE;
+ v_episema = below_if_auctus(glyph);
+ }
+ break;
+ case T_PES_QUADRATUM:
+ case T_PES_QUASSUS:
+ case T_QUILISMA_PES_QUADRATUM:
+ if (i == 1) {
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = above_if_h_episema(note->next);
+ v_episema = VPOS_BELOW;
+ } else { /* i=2 */
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ note->gtex_offset_case = InitioDebilis;
+ } else {
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum,
+ note, true);
+ }
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ }
+ break;
+ case T_FLEXUS:
+ case T_FLEXUS_ORISCUS:
+ if (i == 1) {
+ high_low_set_upper(glyph, note);
+ if (type == T_FLEXUS_ORISCUS) {
+ note->gtex_offset_case = InitialConnectedOriscus;
+ } else {
+ if (note->next && note->u.note.pitch -
+ note->next->u.note.pitch == 1) {
+ note->gtex_offset_case = InitialVirga;
+ } else {
+ note->gtex_offset_case = InitialConnectedVirga;
+ }
+ }
+ h_episema = VPOS_ABOVE;
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ v_episema = below_if_next_ambitus_allows(note);
+ } else {
+ v_episema = VPOS_BELOW;
+ }
+ } else { /* i=2 */
+ high_low_set_lower(glyph, note);
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ false);
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ h_episema = VPOS_BELOW;
+ } else {
+ h_episema = above_if_h_episema(note->previous);
+ }
+ v_episema = VPOS_BELOW;
+ }
+ break;
+ case T_TORCULUS_RESUPINUS_FLEXUS:
+ done = true;
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = above_if_h_episema(note->next);
+ v_episema = VPOS_BELOW;
+ break;
+ case HEPISEMA_FIRST_TWO:
+ case 2:
+ if (glyph->u.notes.liquescentia & L_INITIO_DEBILIS) {
+ note->gtex_offset_case = TorcResDebilisAuctusSecondAnyAny;
+ } else {
+ if (note->u.note.pitch - note->previous->u.note.pitch == 1) {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaAuctusSecondOneAny;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusAuctusSecondOneAny;
+ break;
+ default:
+ note->gtex_offset_case = TorcResAuctusSecondOneAny;
+ break;
+ }
+ } else {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaAuctusSecondWideAny;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusAuctusSecondWideAny;
+ break;
+ default:
+ note->gtex_offset_case = TorcResAuctusSecondWideAny;
+ break;
+ }
+ }
+ }
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ v_episema_below_is_lower = true;
+ break;
+ default:
+ --i;
+ done = false;
+ break;
+ }
+
+ if (done) {
+ break;
+ }
+ /* else fallthrough to the next case! */
+ case T_PORRECTUS_FLEXUS:
+ switch (i) {
+ case HEPISEMA_FIRST_TWO:
+ case 1:
+ note->gtex_offset_case = PorrAuctusInitialAny;
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ v_episema_below_is_lower = true;
+ break;
+ case 2:
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ note->gtex_offset_case = AntepenultBeforeDeminutus;
+ } else {
+ note->gtex_offset_case = AntepenultBeforePunctum;
+ }
+ h_episema = above_if_either_h_episema(note);
+ v_episema = VPOS_BELOW;
+ break;
+ case 3:
+ high_low_set_upper(glyph, note);
+ h_episema = VPOS_ABOVE;
+ if ((glyph->u.notes.liquescentia & L_DEMINUTUS) && note->next) {
+ v_episema = below_if_next_ambitus_allows(note);
+ note->gtex_offset_case = PenultBeforeDeminutus;
+ } else {
+ v_episema = VPOS_BELOW;
+ note->gtex_offset_case = note_before_last_note_case(glyph,
+ note);
+ }
+ break;
+ default:
+ high_low_set_lower(glyph, note);
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ false);
+ h_episema = above_if_h_episema(note->previous);
+ v_episema = VPOS_BELOW;
+ break;
+ }
+ break;
+ case T_TORCULUS_RESUPINUS:
+ done = true;
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = above_if_h_episema(note->next);
+ v_episema = VPOS_BELOW;
+ break;
+ case HEPISEMA_FIRST_TWO:
+ case 2:
+ if (glyph->u.notes.liquescentia &
+ (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ /* auctus */
+ if (glyph->u.notes.liquescentia & L_INITIO_DEBILIS) {
+ note->gtex_offset_case = TorcResDebilisAuctusSecondAnyAny;
+ } else {
+ if (note->u.note.pitch -
+ note->previous->u.note.pitch == 1) {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaAuctusSecondOneAny;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusAuctusSecondOneAny;
+ break;
+ default:
+ note->gtex_offset_case = TorcResAuctusSecondOneAny;
+ break;
+ }
+ } else {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaAuctusSecondWideAny;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusAuctusSecondWideAny;
+ break;
+ default:
+ note->gtex_offset_case = TorcResAuctusSecondWideAny;
+ break;
+ }
+ }
+ }
+ } else if (note->next->next->u.note.pitch -
+ note->next->u.note.pitch == 1) {
+ /* non-auctus with a second ambitus of 1 */
+ if (glyph->u.notes.liquescentia & L_INITIO_DEBILIS) {
+ note->gtex_offset_case =
+ TorcResDebilisNonAuctusSecondAnyOne;
+ } else {
+ if (note->u.note.pitch -
+ note->previous->u.note.pitch == 1) {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaNonAuctusSecondOneOne;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusNonAuctusSecondOneOne;
+ break;
+ default:
+ note->gtex_offset_case =
+ TorcResNonAuctusSecondOneOne;
+ break;
+ }
+ } else {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaNonAuctusSecondWideOne;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusNonAuctusSecondWideOne;
+ break;
+ default:
+ note->gtex_offset_case =
+ TorcResNonAuctusSecondWideOne;
+ break;
+ }
+ }
+ }
+ } else {
+ /* non-auctus with a second ambitus of at least 2 */
+ if (glyph->u.notes.liquescentia & L_INITIO_DEBILIS) {
+ note->gtex_offset_case =
+ TorcResDebilisNonAuctusSecondAnyWide;
+ } else {
+ if (note->u.note.pitch -
+ note->previous->u.note.pitch == 1) {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaNonAuctusSecondOneWide;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusNonAuctusSecondOneWide;
+ break;
+ default:
+ note->gtex_offset_case =
+ TorcResNonAuctusSecondOneWide;
+ break;
+ }
+ } else {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaNonAuctusSecondWideWide;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusNonAuctusSecondWideWide;
+ break;
+ default:
+ note->gtex_offset_case =
+ TorcResNonAuctusSecondWideWide;
+ break;
+ }
+ }
+ }
+ }
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ v_episema_below_is_lower = true;
+ break;
+ default:
+ --i;
+ done = false;
+ break;
+ }
+
+ if (done) {
+ break;
+ }
+ /* else fallthrough to the next case! */
+ case T_PORRECTUS: /* or porrectus-like flexus */
+ switch (i) {
+ case HEPISEMA_FIRST_TWO:
+ case 1:
+ if (glyph->u.notes.fuse_to_next_glyph ||
+ (glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS))) {
+ /* auctus */
+ note->gtex_offset_case = PorrAuctusInitialAny;
+ } else if (note->next->next->u.note.pitch
+ - note->next->u.note.pitch == 1) {
+ /* non-auctus with a second ambitus of 1 */
+ note->gtex_offset_case = PorrNonAuctusInitialOne;
+ } else {
+ /* non-auctus with a second ambitus of at least 2 */
+ note->gtex_offset_case = PorrNonAuctusInitialWide;
+ }
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ v_episema_below_is_lower = true;
+ break;
+ case 2:
+ low_high_set_lower(glyph, note);
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ note->gtex_offset_case = PenultBeforeDeminutus;
+ } else if (glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ note->gtex_offset_case = PenultBeforePunctumWide;
+ } else {
+ note->gtex_offset_case = FinalPunctum;
+ }
+ h_episema = above_if_h_episema(note->previous);
+ if (h_episema == VPOS_BELOW && !note->next) {
+ /* handle porrectus-like flexus */
+ h_episema = above_if_fused_next_h_episema(glyph);
+ }
+ v_episema = VPOS_BELOW;
+ break;
+ default: /* case 3 */
+ low_high_set_upper(glyph, note);
+ note->gtex_offset_case = last_note_case(glyph, FinalUpperPunctum,
+ note, true);
+ h_episema = VPOS_ABOVE;
+ v_episema = below_if_auctus(glyph);
+ break;
+ }
+ break;
+ case T_SCANDICUS:
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = VPOS_BELOW;
+ v_episema = VPOS_BELOW;
+ break;
+ case 2:
+ low_high_set_lower(glyph, note);
+ if (note->u.note.pitch - note->previous->u.note.pitch == 1) {
+ note->gtex_offset_case = FinalPunctum;
+ } else {
+ note->gtex_offset_case = FinalConnectedPunctum;
+ }
+ h_episema = VPOS_BELOW;
+ v_episema = VPOS_BELOW;
+ break;
+ default:
+ low_high_set_upper(glyph, note);
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ true);
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ break;
+ }
+ break;
+ case T_SALICUS_FLEXUS:
+ done = true;
+ v_episema = VPOS_BELOW;
+ switch (i) {
+ case 3:
+ note->gtex_offset_case = note_before_last_note_case(glyph, note);
+ h_episema = VPOS_ABOVE;
+ break;
+ case 4:
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ false);
+ h_episema = VPOS_BELOW;
+ break;
+ default:
+ done = false;
+ break;
+ }
+ if (done) {
+ break;
+ }
+ /* else fallthrough to the next case! */
+ case T_SALICUS:
+ v_episema = VPOS_BELOW;
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = InitialConnectedPunctum;
+ h_episema = above_if_h_episema(note->next);
+ break;
+ case 2:
+ if (note->next->u.note.pitch - note->u.note.pitch == 1) {
+ note->gtex_offset_case = SalicusOriscusOne;
+ } else {
+ note->gtex_offset_case = SalicusOriscusWide;
+ }
+ h_episema = VPOS_ABOVE;
+ break;
+ default:
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ false);
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ v_episema = VPOS_ABOVE;
+ }
+ h_episema = VPOS_ABOVE;
+ break;
+ }
+ break;
+ case T_TORCULUS_LIQUESCENS:
+ done = true;
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = above_if_h_episema(note->next);
+ v_episema = VPOS_BELOW;
+ break;
+ case 2:
+ note->gtex_offset_case =
+ note_before_last_note_case_ignoring_deminutus(note);
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ break;
+ default:
+ --i;
+ done = false;
+ break;
+ }
+
+ if (done) {
+ break;
+ }
+ /* else fallthrough to the next case! */
+ case T_ANCUS:
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = above_if_h_episema(note->next);
+ v_episema = VPOS_BELOW;
+ break;
+ case 2:
+ note->is_upper_note = true;
+ note->gtex_offset_case = note_before_last_note_case(glyph, note);
+ h_episema = VPOS_ABOVE;
+ v_episema = below_if_next_ambitus_allows(note);
+ break;
+ default:
+ note->is_lower_note = true;
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ false);
+ h_episema = VPOS_BELOW;
+ v_episema = VPOS_BELOW;
+ break;
+ }
+ break;
+ case T_TORCULUS:
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = above_if_h_episema(note->next);
+ v_episema = VPOS_BELOW;
+ break;
+ case 2:
+ high_low_set_upper(glyph, note);
+ note->gtex_offset_case = note_before_last_note_case(glyph, note);
+ h_episema = VPOS_ABOVE;
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ v_episema = below_if_next_ambitus_allows(note);
+ } else {
+ v_episema = VPOS_BELOW;
+ }
+ break;
+ default:
+ high_low_set_lower(glyph, note);
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ false);
+ h_episema = above_if_h_episema(note->previous);
+ v_episema = VPOS_BELOW;
+ break;
+ }
+ break;
+ default: /* case T_ONE_NOTE */
+ previous = gregorio_previous_non_texverb_glyph(glyph);
+ if ((!previous || previous->type != GRE_GLYPH
+ || previous->u.notes.fuse_to_next_glyph < 0)
+ && (glyph->u.notes.fuse_to_next_glyph > 0)) {
+ h_episema = above_if_fused_next_h_episema(glyph);
+ } else {
+ h_episema = VPOS_ABOVE;
+ }
+ v_episema = VPOS_BELOW;
+ switch (note->u.note.shape) {
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ note->gtex_offset_case = FinalInclinatumDeminutus;
+ break;
+ case S_PUNCTUM_INCLINATUM_AUCTUS:
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ note->gtex_offset_case = FinalInclinatum;
+ break;
+ case S_STROPHA:
+ note->gtex_offset_case = FinalStropha;
+ break;
+ case S_QUILISMA:
+ note->gtex_offset_case = fused_single_note_case(glyph,
+ FinalQuilisma, LeadingQuilisma);
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_DEMINUTUS:
+ note->gtex_offset_case = fused_single_note_case(glyph, FinalOriscus,
+ LeadingOriscus);
+ break;
+ case S_VIRGA:
+ note->gtex_offset_case = InitialVirga;
+ break;
+ case S_VIRGA_REVERSA:
+ if (glyph->u.notes.liquescentia == L_AUCTUS_DESCENDENS) {
+ note->gtex_offset_case = FinalVirgaAuctus;
+ } else {
+ note->gtex_offset_case = InitialVirga;
+ }
+ break;
+ case S_LINEA_PUNCTUM:
+ note->gtex_offset_case = FinalLineaPunctum;
+ break;
+ case S_LINEA:
+ note->gtex_offset_case = FinalPunctum;
+ break;
+ case S_FLAT:
+ note->gtex_offset_case = Flat;
+ break;
+ case S_SHARP:
+ note->gtex_offset_case = Sharp;
+ break;
+ case S_NATURAL:
+ note->gtex_offset_case = Natural;
+ break;
+ default:
+ note->gtex_offset_case = last_note_case(glyph,
+ fused_single_note_case(glyph, FinalPunctum, LeadingPunctum),
+ note, true);
+ break;
+ }
+ break;
+ }
+
+ if (note->signs & _V_EPISEMA) {
+ if (note->v_episema_height) {
+ if (note->v_episema_height > note->u.note.pitch) {
+ /* above is always higher because of GregorioTeX's design */
+ note->v_episema_height += (int)VPOS_ABOVE;
+ }
+ }
+ else {
+ note->v_episema_height = note->u.note.pitch + (int)v_episema;
+ if ((v_episema == VPOS_BELOW && v_episema_below_is_lower)
+ || v_episema == VPOS_ABOVE) {
+ /* above is always higher because of GregorioTeX's design */
+ note->v_episema_height += (int)v_episema;
+ }
+ }
+ }
+
+ return h_episema;
+}
+
+static __inline char compute_h_episema_height(
+ const gregorio_glyph *const glyph, const gregorio_note *const note,
+ const gregorio_vposition vpos)
+{
+ char height = note->u.note.pitch;
+
+ if (note->signs & _V_EPISEMA) {
+ if ((vpos == VPOS_ABOVE && note->v_episema_height >= height)
+ || (vpos == VPOS_BELOW && note->v_episema_height <= height)) {
+ height = note->v_episema_height;
+ }
+ }
+
+ if (vpos == VPOS_ABOVE && note->choral_sign
+ && !choral_sign_here_is_low(glyph, note, NULL)) {
+ ++height;
+ if (!is_on_a_line(note->u.note.pitch)) {
+ ++height;
+ }
+ }
+
+ return height + (int)vpos;
+}
+
+static bool is_bridgeable_space(const gregorio_element *const element)
+{
+ if (element->type == GRE_SPACE) {
+ switch (element->u.misc.unpitched.info.space) {
+ case SP_NEUMATIC_CUT:
+ case SP_LARGER_SPACE:
+ case SP_NEUMATIC_CUT_NB:
+ case SP_LARGER_SPACE_NB:
+ return true;
+ default:
+ /* do nothing */
+ break;
+ }
+ }
+
+ return false;
+}
+
+typedef struct height_computation {
+ const gregorio_vposition vpos;
+ const gregorio_sign_orientation orientation;
+ bool (*const is_applicable)(const gregorio_note *);
+ bool (*const is_shown)(const gregorio_note *);
+ bool (*const is_connected)(const gregorio_note *);
+ grehepisema_size (*const get_size)(const gregorio_note *);
+ bool (*const is_better_height)(signed char, signed char);
+ void (*const position)(gregorio_note *, signed char, bool);
+
+ bool active;
+ char height;
+ bool connected;
+ const gregorio_element *start_element;
+ const gregorio_glyph *start_glyph;
+ gregorio_note *start_note;
+ const gregorio_element *last_connected_element;
+ const gregorio_glyph *last_connected_glyph;
+ gregorio_note *last_connected_note;
+ unsigned short adjustment_index;
+} height_computation;
+
+static bool is_h_episema_above_applicable(const gregorio_note *const note)
+{
+ return note->h_episema_above || !note->is_lower_note;
+}
+
+static bool is_h_episema_below_applicable(const gregorio_note *const note)
+{
+ return note->h_episema_below || !note->is_upper_note;
+}
+
+bool gtex_is_h_episema_above_shown(const gregorio_note *const note)
+{
+ return note->h_episema_above;
+}
+
+bool gtex_is_h_episema_below_shown(const gregorio_note *const note)
+{
+ return note->h_episema_below;
+}
+
+static bool is_h_episema_above_connected(const gregorio_note *const note)
+{
+ return note->h_episema_above_connect;
+}
+
+static bool is_h_episema_below_connected(const gregorio_note *const note)
+{
+ return note->h_episema_below_connect;
+}
+
+static grehepisema_size get_h_episema_above_size(
+ const gregorio_note *const note)
+{
+ return note->h_episema_above_size;
+}
+
+static grehepisema_size get_h_episema_below_size(
+ const gregorio_note *const note)
+{
+ return note->h_episema_below_size;
+}
+
+static bool is_h_episema_above_better_height(const signed char new_height,
+ const signed char old_height)
+{
+ return new_height > old_height;
+}
+
+static bool is_h_episema_below_better_height(const signed char new_height,
+ const signed char old_height)
+{
+ return new_height < old_height;
+}
+
+static void adjust_h_episema_above_if_better(gregorio_note *const note,
+ signed char potential_height)
+{
+ if (is_h_episema_above_better_height(potential_height,
+ note->h_episema_above)) {
+ note->h_episema_above = potential_height;
+ }
+}
+
+static void adjust_h_episema_below_if_better(gregorio_note *const note,
+ signed char potential_height)
+{
+ if (is_h_episema_below_better_height(potential_height,
+ note->h_episema_below)) {
+ note->h_episema_below = potential_height;
+ }
+}
+
+static __inline bool has_high_ledger_line(const signed char height,
+ bool is_sign, const gregorio_score *const score)
+{
+ if (is_sign) {
+ return height > score->high_ledger_line_pitch;
+ }
+ return height >= score->high_ledger_line_pitch;
+}
+
+static __inline bool has_low_ledger_line(const signed char height, bool is_sign)
+{
+ if (is_sign) {
+ return height < LOW_LEDGER_LINE_PITCH;
+ }
+ return height <= LOW_LEDGER_LINE_PITCH;
+}
+
+static __inline void start_h_episema(height_computation *const h,
+ const gregorio_element *const element,
+ const gregorio_glyph *const glyph, gregorio_note *const note)
+{
+ h->start_element = element;
+ h->start_glyph = glyph;
+ h->start_note = note;
+ h->active = true;
+ h->height = compute_h_episema_height(glyph, note, h->vpos);
+}
+
+static __inline void position_h_episema(gregorio_note *const note,
+ const height_computation *const h, const bool connect,
+ const bool high_ledger_line, const bool low_ledger_line)
+{
+ const unsigned short adjustment_index =
+ note->he_adjustment_index[h->orientation];
+
+ h->position(note, h->height, connect);
+ if (adjustment_index) {
+ gregorio_hepisema_adjustment *adj = gregorio_get_hepisema_adjustment(
+ adjustment_index);
+ if (adj->pitch_extremum == NO_PITCH
+ || h->is_better_height(h->height, adj->pitch_extremum)) {
+ adj->pitch_extremum = h->height;
+ }
+ }
+ if (!note->high_ledger_specificity && !note->high_ledger_line) {
+ note->high_ledger_line = high_ledger_line;
+ }
+ if (!note->low_ledger_specificity && !note->low_ledger_line) {
+ note->low_ledger_line = low_ledger_line;
+ }
+}
+
+static __inline void next_has_ledger_line(
+ const height_computation *const h, bool *high_ledger_line,
+ bool *low_ledger_line)
+{
+ const gregorio_element *element = h->last_connected_element;
+ const gregorio_glyph *glyph = h->last_connected_glyph;
+ gregorio_note *note = h->last_connected_note;
+ bool eat_upper_note = note->is_lower_note, keep_going = false;
+
+ if (!*high_ledger_line || !*low_ledger_line) {
+ /* going forwards, we must iterate through any lower notes */
+ do {
+ note = note->next;
+ if (!note) {
+ do {
+ glyph = glyph->next;
+ if (!glyph) {
+ do {
+ element = element->next;
+ if (!element) {
+ return;
+ }
+ } while (element->type != GRE_ELEMENT);
+ glyph = element->u.first_glyph;
+ }
+ } while (glyph->type != GRE_GLYPH);
+ note = glyph->u.notes.first_note;
+ }
+
+ *high_ledger_line = *high_ledger_line || note->high_ledger_line;
+ *low_ledger_line = *low_ledger_line || note->low_ledger_line;
+
+ if (keep_going) {
+ keep_going = false;
+ }
+ if (eat_upper_note && note->is_upper_note) {
+ eat_upper_note = false;
+ keep_going = true;
+ }
+ } while ((!*high_ledger_line || !*low_ledger_line)
+ && (note->is_lower_note || keep_going));
+ }
+}
+
+static __inline void previous_has_ledger_line(
+ const height_computation *const h, bool *high_ledger_line,
+ bool *low_ledger_line)
+{
+ const gregorio_element *element = h->start_element;
+ const gregorio_glyph *glyph = h->start_glyph;
+ gregorio_note *note = h->start_note;
+ bool eat_lower_note = note->is_upper_note, keep_going = false;
+
+ if (!*high_ledger_line || !*low_ledger_line) {
+ /* going backwards, we must iterate through any upper notes */
+ do {
+ note = note->previous;
+ if (!note) {
+ do {
+ glyph = glyph->previous;
+ if (!glyph) {
+ do {
+ element = element->previous;
+ if (!element) {
+ return;
+ }
+ } while (element->type != GRE_ELEMENT);
+ for (glyph = element->u.first_glyph; glyph->next;
+ glyph = glyph->next) {
+ /* just iterate to find the last glyph */
+ }
+ }
+ } while (glyph->type != GRE_GLYPH);
+ note = gregorio_glyph_last_note(glyph);
+ }
+ *high_ledger_line = *high_ledger_line || note->high_ledger_line;
+ *low_ledger_line = *low_ledger_line || note->low_ledger_line;
+
+ if (keep_going) {
+ keep_going = false;
+ }
+ if (eat_lower_note && note->is_lower_note) {
+ eat_lower_note = false;
+ keep_going = true;
+ }
+ } while ((!*high_ledger_line || !*low_ledger_line)
+ && (note->is_upper_note || keep_going));
+ }
+}
+
+static __inline void set_h_episema_height(const height_computation *const h,
+ gregorio_note *const end, const gregorio_score *const score)
+{
+ gregorio_note *last_note = NULL;
+
+ const gregorio_element *element = h->start_element;
+ const gregorio_glyph *glyph = h->start_glyph;
+ gregorio_note *note = h->start_note;
+
+ bool high_ledger_line = has_high_ledger_line(h->height, true, score)
+ || has_high_ledger_line(h->height - h->vpos, false, score);
+ bool low_ledger_line = has_low_ledger_line(h->height, true)
+ || has_low_ledger_line(h->height - h->vpos, false);
+
+ next_has_ledger_line(h, &high_ledger_line, &low_ledger_line);
+ previous_has_ledger_line(h, &high_ledger_line, &low_ledger_line);
+
+ for ( ; element; element = element->next) {
+ if (element->type == GRE_ELEMENT) {
+ for (glyph = glyph? glyph : element->u.first_glyph; glyph;
+ glyph = glyph->next) {
+ if (glyph && glyph->type == GRE_GLYPH) {
+ for (note = note? note : glyph->u.notes.first_note; note;
+ note = note->next) {
+ if (end && note == end) {
+ if (last_note) {
+ position_h_episema(last_note, h, false,
+ high_ledger_line, low_ledger_line);
+ }
+ return;
+ }
+ if (h->is_applicable(note)) {
+ position_h_episema(note, h, true, high_ledger_line,
+ low_ledger_line);
+ last_note = note;
+ }
+ }
+ }
+ }
+ } else if (!is_bridgeable_space(element)) {
+ break;
+ }
+ }
+
+ if (last_note) {
+ position_h_episema(last_note, h, false, high_ledger_line,
+ low_ledger_line);
+ }
+}
+
+static __inline bool is_connected_left(const grehepisema_size size) {
+ return size == H_NORMAL || size == H_SMALL_LEFT;
+}
+
+static __inline bool is_connected_right(const grehepisema_size size) {
+ return size == H_NORMAL || size == H_SMALL_RIGHT;
+}
+
+static __inline bool is_connectable_interglyph_ambitus(const signed char first,
+ const signed char second)
+{
+ return abs(first - second) < 3;
+}
+
+static __inline bool is_connectable_interglyph_notes(
+ const gregorio_note *const first, const gregorio_note *const second)
+{
+ return first && second && is_connectable_interglyph_ambitus(
+ first->u.note.pitch, second->u.note.pitch);
+}
+
+static __inline bool has_space_to_left(const gregorio_note *const note) {
+ switch (note->u.note.shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ case S_PUNCTUM_INCLINATUM_AUCTUS:
+ return !is_connectable_interglyph_notes(note->previous, note);
+
+ default:
+ return !note->previous;
+ }
+}
+
+static __inline void end_h_episema(height_computation *const h,
+ gregorio_note *const end, const gregorio_score *const score)
+{
+ signed char proposed_height;
+
+ if (h->active) {
+ /* don't let the episema clash with the note before or after */
+ if (is_connected_left(h->get_size(h->start_note))) {
+ if (h->start_note->previous) {
+ if (!has_space_to_left(h->start_note)
+ && h->start_note->previous->type == GRE_NOTE
+ && is_connected_right(h->get_size(
+ h->start_note->previous))) {
+ proposed_height = h->start_note->previous->u.note.pitch + h->vpos;
+ if (h->is_better_height(proposed_height, h->height)) {
+ h->height = proposed_height;
+ }
+ }
+ } else {
+ const gregorio_glyph *previous =
+ gregorio_previous_non_texverb_glyph(h->start_glyph);
+ if (previous && previous->type == GRE_GLYPH
+ && is_fused(h->start_glyph->u.notes.liquescentia)) {
+ gregorio_note *note = gregorio_glyph_last_note(
+ h->start_glyph->previous);
+ if (note->type == GRE_NOTE
+ && is_connected_right(h->get_size(note))) {
+ proposed_height = note->u.note.pitch + h->vpos;
+ if (h->is_better_height(proposed_height, h->height)) {
+ h->height = proposed_height;
+ }
+ }
+ }
+ }
+ }
+ if (end && end->type == GRE_NOTE && is_connected_left(h->get_size(end))
+ && !(end->u.note.liquescentia & L_DEMINUTUS)
+ && h->last_connected_note
+ && is_connected_right(h->get_size(h->last_connected_note))) {
+ if (h->last_connected_note->next) {
+ if (h->last_connected_note->next->type == GRE_NOTE
+ && !has_space_to_left(h->last_connected_note->next)) {
+ gregorio_note *note;
+ /* this loop checks that it's within the same glyph */
+ for (note = end->previous; note; note = note->previous) {
+ if (note == h->start_note) {
+ proposed_height = end->u.note.pitch + h->vpos;
+ if (h->is_better_height(proposed_height,
+ h->height)) {
+ h->height = proposed_height;
+ }
+ break;
+ }
+ }
+ }
+ } else if (is_fused(end->u.note.liquescentia) && !end->previous) {
+ proposed_height = end->u.note.pitch + h->vpos;
+ if (h->is_better_height(proposed_height, h->height)) {
+ h->height = proposed_height;
+ }
+ }
+ }
+
+ set_h_episema_height(h, end, score);
+
+ h->active = false;
+ h->height = 0;
+ h->connected = false;
+ h->start_element = NULL;
+ h->start_glyph = NULL;
+ h->start_note = NULL;
+ h->last_connected_element = NULL;
+ h->last_connected_glyph = NULL;
+ h->last_connected_note = NULL;
+ }
+}
+
+static __inline void compute_h_episema(height_computation *const h,
+ const gregorio_element *const element,
+ const gregorio_glyph *const glyph, gregorio_note *const note,
+ const int i, const gtex_type type, const gregorio_score *const score)
+{
+ grehepisema_size size;
+
+ if (h->is_applicable(note)) {
+ if (h->is_shown(note)) {
+ size = h->get_size(note);
+
+ if (h->active) {
+ const signed char next_height = compute_h_episema_height(
+ glyph, note, h->vpos);
+ if (h->connected && is_connected_left(size)
+ && (i != 1 || is_connectable_interglyph_ambitus(
+ next_height, h->height))) {
+ if (h->is_better_height(next_height, h->height)) {
+ h->height = next_height;
+ }
+ }
+ else {
+ end_h_episema(h, note, score);
+ start_h_episema(h, element, glyph, note);
+ }
+ } else {
+ start_h_episema(h, element, glyph, note);
+ }
+
+ h->connected = h->is_connected(note) && is_connected_right(size);
+ h->last_connected_element = element;
+ h->last_connected_glyph = glyph;
+ h->last_connected_note = note;
+ } else {
+ end_h_episema(h, note, score);
+ }
+ } else if (!h->is_shown(note)) {
+ /* special handling for porrectus shapes because of their shape:
+ * the lower note of the porrectus stroke is normally not applicable,
+ * but we have to end the episema on the upper note if the episema
+ * on the lower note is not shown. */
+ switch(type) {
+ case T_PORRECTUS:
+ case T_PORRECTUS_FLEXUS:
+ if (i == 2) {
+ end_h_episema(h, note, score);
+ }
+ break;
+
+ case T_TORCULUS_RESUPINUS:
+ case T_TORCULUS_RESUPINUS_FLEXUS:
+ if (i == 3) {
+ end_h_episema(h, note, score);
+ }
+ break;
+
+ default:
+ /* do nothing */
+ break;
+ }
+ }
+}
+
+static __inline void compute_note_positioning(height_computation *const above,
+ height_computation *const below, const gregorio_element *const element,
+ const gregorio_glyph *const glyph, gregorio_note *const note,
+ const int i, const gtex_type type, const gregorio_score *const score)
+{
+ gregorio_vposition default_vpos = advise_positioning(glyph, note, i, type);
+
+ if (note->h_episema_above == HEPISEMA_AUTO
+ && note->h_episema_below == HEPISEMA_AUTO) {
+ if (default_vpos == VPOS_BELOW) {
+ note->h_episema_above = HEPISEMA_NONE;
+ }
+ else { /* default_vpos == VPOS_ABOVE */
+ note->h_episema_below = HEPISEMA_NONE;
+ }
+ }
+
+ compute_h_episema(above, element, glyph, note, i, type, score);
+ compute_h_episema(below, element, glyph, note, i, type, score);
+}
+
+static __inline int compute_fused_shift(const gregorio_glyph *glyph)
+{
+ int shift;
+ gregorio_note *first_note, *prev_note;
+ const gregorio_glyph *next, *previous;
+ bool next_is_fused;
+
+ if (!glyph || !is_fused(glyph->u.notes.liquescentia)
+ || glyph->type != GRE_GLYPH
+ || !(first_note = glyph->u.notes.first_note)
+ || first_note->type != GRE_NOTE
+ || !(previous = gregorio_previous_non_texverb_glyph(glyph))
+ || previous->type != GRE_GLYPH
+ || previous->u.notes.liquescentia & TAIL_LIQUESCENTIA_MASK
+ || !previous->u.notes.first_note) {
+ /* base conditions prevent fusion */
+ return 0;
+ }
+
+ next = gregorio_next_non_texverb_glyph(glyph);
+ next_is_fused = next && next->type == GRE_GLYPH
+ && is_fused(next->u.notes.liquescentia);
+
+ switch (glyph->u.notes.glyph_type) {
+ case G_PORRECTUS:
+ case G_PODATUS:
+ if (next_is_fused) {
+ return 0;
+ }
+ /* else it may be fused to the previous note */
+ break;
+
+ case G_PUNCTUM:
+ case G_FLEXA:
+ /* these may be fused to the previous note */
+ break;
+
+ default:
+ /* anything else may not be fused to the previous note */
+ return 0;
+ }
+
+ switch (first_note->u.note.shape) {
+ case S_QUILISMA:
+ case S_QUILISMA_QUADRATUM:
+ case S_FLAT:
+ case S_SHARP:
+ case S_NATURAL:
+ /* if this glyph starts with one of these, it's not fusible */
+ return 0;
+
+ default:
+ /* anything else is potentially fusible */
+ break;
+ }
+
+ switch (previous->u.notes.glyph_type) {
+ case G_PUNCTUM:
+ case G_FLEXA:
+ case G_VIRGA_REVERSA:
+ /* these are potentially fusible to this note */
+ break;
+
+ default:
+ /* everything else is not fusible */
+ return 0;
+ }
+
+ prev_note = gregorio_glyph_last_note(previous);
+
+ gregorio_assert(prev_note->type == GRE_NOTE, compute_fused_shift,
+ "previous note wasn't a note", return 0);
+
+ shift = first_note->u.note.pitch - prev_note->u.note.pitch;
+ gregorio_assert(shift >= -MAX_AMBITUS && shift <= MAX_AMBITUS,
+ compute_fused_shift, "ambitus too large to fuse", return 0);
+
+ if (shift > 0 && previous->u.notes.glyph_type == G_VIRGA_REVERSA) {
+ /* virga reversa cannot fuse upwards */
+ return 0;
+ }
+
+ if (shift < 0) {
+ if (glyph->u.notes.glyph_type == G_PODATUS) {
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ /* podatus deminutus may be fused from above */
+ return shift;
+ }
+ switch (first_note->u.note.shape) {
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ return shift;
+ default:
+ /* otherwise, podatus may not be fused from above */
+ return 0;
+ }
+ }
+
+ /* the FLEXA check below checks for a porrectus-like flexus, which is
+ * not fusible from above */
+ if ((next_is_fused && glyph->u.notes.glyph_type == G_FLEXA)
+ || glyph->u.notes.glyph_type == G_PORRECTUS
+ || (previous->u.notes.glyph_type == G_PUNCTUM
+ && is_initio_debilis(previous->u.notes.liquescentia))) {
+ /* may not be fused from above */
+ return 0;
+ }
+ }
+
+ return shift;
+}
+
+void gregoriotex_compute_positioning(
+ const gregorio_element *const param_element,
+ const gregorio_score *const score)
+{
+ height_computation above = {
+ /*.vpos =*/ VPOS_ABOVE,
+ /*.orientation =*/ SO_OVER,
+ /*.is_applicable =*/ &is_h_episema_above_applicable,
+ /*.is_shown =*/ &gtex_is_h_episema_above_shown,
+ /*.is_connected =*/ &is_h_episema_above_connected,
+ /*.get_size =*/ &get_h_episema_above_size,
+ /*.is_better_height =*/ &is_h_episema_above_better_height,
+ /*.position =*/ &gregorio_position_h_episema_above,
+
+ /*.active =*/ false,
+ /*.height =*/ 0,
+ /*.connected =*/ false,
+ /*.start_element =*/ NULL,
+ /*.start_glyph =*/ NULL,
+ /*.start_note =*/ NULL,
+ /*.last_connected_element =*/ NULL,
+ /*.last_connected_glyph =*/ NULL,
+ /*.last_connected_note =*/ NULL,
+ /*.adjustment_index =*/ 0,
+ };
+ height_computation below = {
+ /*.vpos =*/ VPOS_BELOW,
+ /*.orientation =*/ SO_UNDER,
+ /*.is_applicable =*/ &is_h_episema_below_applicable,
+ /*.is_shown =*/ &gtex_is_h_episema_below_shown,
+ /*.is_connected =*/ &is_h_episema_below_connected,
+ /*.get_size =*/ &get_h_episema_below_size,
+ /*.is_better_height =*/ &is_h_episema_below_better_height,
+ /*.position =*/ &gregorio_position_h_episema_below,
+
+ /*.active =*/ false,
+ /*.height =*/ 0,
+ /*.connected =*/ false,
+ /*.start_element =*/ NULL,
+ /*.start_glyph =*/ NULL,
+ /*.start_note =*/ NULL,
+ /*.last_connected_element =*/ NULL,
+ /*.last_connected_glyph =*/ NULL,
+ /*.last_connected_note =*/ NULL,
+ /*.adjustment_index =*/ 0,
+ };
+ int i;
+ gtex_alignment ignored;
+ gtex_type type;
+ const gregorio_element *element;
+
+ for (element = param_element; element; element = element->next) {
+ if (element->type == GRE_ELEMENT) {
+ gregorio_glyph *glyph;
+ for (glyph = element->u.first_glyph; glyph;
+ glyph = glyph->next) {
+ if (glyph->type == GRE_GLYPH) {
+ gregorio_note *note;
+ glyph->u.notes.fuse_to_next_glyph = compute_fused_shift(
+ gregorio_next_non_texverb_glyph(glyph));
+ i = 0;
+ gregoriotex_determine_glyph_name(glyph, &ignored, &type);
+ for (note = glyph->u.notes.first_note; note;
+ note = note->next) {
+ if (note->type == GRE_NOTE) {
+ compute_note_positioning(&above, &below, element,
+ glyph, note, ++i, type, score);
+ }
+ }
+ }
+ }
+ } else if (!is_bridgeable_space(element)) {
+ end_h_episema(&above, NULL, score);
+ end_h_episema(&below, NULL, score);
+ }
+ }
+ end_h_episema(&above, NULL, score);
+ end_h_episema(&below, NULL, score);
+}
+
+static __inline void adjust_hepisema(gregorio_note *const note,
+ const gregorio_sign_orientation orientation,
+ bool (*const is_shown)(const gregorio_note *),
+ void (*const adjust_if_better)(gregorio_note *, signed char))
+{
+ const unsigned short adjustment_index =
+ note->he_adjustment_index[orientation];
+
+ if (adjustment_index && is_shown(note)) {
+ gregorio_hepisema_adjustment *adj = gregorio_get_hepisema_adjustment(
+ adjustment_index);
+
+ adjust_if_better(note, adj->pitch_extremum);
+ }
+}
+
+void gregoriotex_compute_cross_syllable_positioning(
+ const gregorio_score *const score)
+{
+ gregorio_syllable *syllable;
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ int voice;
+ for (voice = 0; voice < score->number_of_voices; ++voice) {
+ gregorio_element *element;
+ for (element = syllable->elements[voice]; element;
+ element = element->next) {
+ if (element->type == GRE_ELEMENT) {
+ gregorio_glyph *glyph;
+ for (glyph = element->u.first_glyph; glyph;
+ glyph = glyph->next) {
+ if (glyph->type == GRE_GLYPH) {
+ gregorio_note *note;
+ for (note = glyph->u.notes.first_note; note;
+ note = note->next) {
+ if (note->type == GRE_NOTE) {
+ adjust_hepisema(note, SO_OVER,
+ gtex_is_h_episema_above_shown,
+ adjust_h_episema_above_if_better);
+ adjust_hepisema(note, SO_UNDER,
+ gtex_is_h_episema_below_shown,
+ adjust_h_episema_below_if_better);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-write.c b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-write.c
new file mode 100644
index 00000000000..1f9b915a7e4
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-write.c
@@ -0,0 +1,4539 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file contains functions for writing GregorioTeX from Gregorio structures.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/**
+ * @file
+ * @brief The plugin which writes a GregorioTeX score.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <time.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "characters.h"
+#include "plugins.h"
+#include "support.h"
+#include "utf8strings.h"
+
+#include "gregoriotex.h"
+
+#define BUFSIZE 128
+
+/* a structure containing the status */
+typedef struct gregoriotex_status {
+ bool point_and_click;
+
+ /* true if the current_glyph will have an additional line under or not
+ * (useful to determine the length of the bar in case of a flexa starting
+ * at d */
+ bool bottom_line;
+
+ signed char top_height;
+ signed char bottom_height;
+
+ /* indicates if there is a translation on the line */
+ bool translation;
+
+ /* indicates if there is "above lines text" on the line */
+ bool abovelinestext;
+
+ bool suppressed_custos;
+} gregoriotex_status;
+
+#define UNDETERMINED_HEIGHT -127
+
+#define MAX_AMBITUS 5
+static const char *tex_ambitus[] = {
+ "", "One", "Two", "Three", "Four", "Five"
+};
+
+#define SHAPE(NAME) static const char *const SHAPE_##NAME = #NAME
+SHAPE(Ancus);
+SHAPE(AncusLongqueue);
+SHAPE(AscendensOriscus);
+SHAPE(AscendensOriscusLineBL);
+SHAPE(AscendensOriscusLineTL);
+SHAPE(AscendensOriscusScapus);
+SHAPE(AscendensOriscusScapusLongqueue);
+SHAPE(AscendensOriscusScapusOpenqueue);
+SHAPE(AscendensPunctumInclinatum);
+SHAPE(DescendensOriscus);
+SHAPE(DescendensOriscusLineBL);
+SHAPE(DescendensOriscusLineTL);
+SHAPE(DescendensOriscusScapus);
+SHAPE(DescendensOriscusScapusLongqueue);
+SHAPE(DescendensOriscusScapusOpenqueue);
+SHAPE(DescendensPunctumInclinatum);
+SHAPE(Flat);
+SHAPE(Flexus);
+SHAPE(FlexusLongqueue);
+SHAPE(FlexusNobar);
+SHAPE(FlexusOpenqueue);
+SHAPE(FlexusOriscus);
+SHAPE(FlexusOriscusInusitatus);
+SHAPE(FlexusOriscusScapus);
+SHAPE(FlexusOriscusScapusInusitatus);
+SHAPE(FlexusOriscusScapusInusitatusLongqueue);
+SHAPE(FlexusOriscusScapusInusitatusOpenqueue);
+SHAPE(FlexusOriscusScapusLongqueue);
+SHAPE(FlexusOriscusScapusOpenqueue);
+SHAPE(Linea);
+SHAPE(LineaPunctum);
+SHAPE(Natural);
+SHAPE(OriscusDeminutus);
+SHAPE(Pes);
+SHAPE(PesAscendensOriscus);
+SHAPE(PesDescendensOriscus);
+SHAPE(PesQuadratum);
+SHAPE(PesQuadratumLongqueue);
+SHAPE(PesQuadratumOpenqueue);
+SHAPE(PesQuassus);
+SHAPE(PesQuassusInusitatus);
+SHAPE(PesQuassusInusitatusLongqueue);
+SHAPE(PesQuassusInusitatusOpenqueue);
+SHAPE(PesQuassusLongqueue);
+SHAPE(PesQuassusOpenqueue);
+SHAPE(Porrectus);
+SHAPE(PorrectusFlexus);
+SHAPE(PorrectusFlexusLongqueue);
+SHAPE(PorrectusFlexusNobar);
+SHAPE(PorrectusLongqueue);
+SHAPE(PorrectusNobar);
+SHAPE(Punctum);
+SHAPE(PunctumAscendens);
+SHAPE(PunctumDeminutus);
+SHAPE(PunctumDescendens);
+SHAPE(PunctumInclinatumAuctus);
+SHAPE(PunctumInclinatumDeminutus);
+SHAPE(PunctumLineBL);
+SHAPE(PunctumLineTL);
+SHAPE(Quilisma);
+SHAPE(QuilismaPes);
+SHAPE(QuilismaPesQuadratum);
+SHAPE(QuilismaPesQuadratumLongqueue);
+SHAPE(QuilismaPesQuadratumOpenqueue);
+SHAPE(StansPunctumInclinatum);
+SHAPE(Salicus);
+SHAPE(SalicusFlexus);
+SHAPE(SalicusLongqueue);
+SHAPE(Scandicus);
+SHAPE(Sharp);
+SHAPE(Stropha);
+SHAPE(StrophaAucta);
+SHAPE(StrophaAuctaLongtail);
+SHAPE(Torculus);
+SHAPE(TorculusLiquescens);
+SHAPE(TorculusLiquescensQuilisma);
+SHAPE(TorculusQuilisma);
+SHAPE(TorculusResupinus);
+SHAPE(TorculusResupinusQuilisma);
+SHAPE(Virga);
+SHAPE(VirgaLongqueue);
+SHAPE(VirgaOpenqueue);
+SHAPE(VirgaReversa);
+SHAPE(VirgaReversaAscendens);
+SHAPE(VirgaReversaDescendens);
+SHAPE(VirgaReversaLongqueue);
+SHAPE(VirgaReversaLongqueueAscendens);
+SHAPE(VirgaReversaLongqueueDescendens);
+SHAPE(VirgaReversaOpenqueue);
+SHAPE(VirgaReversaOpenqueueAscendens);
+SHAPE(VirgaReversaOpenqueueDescendens);
+
+#define LIQ(NAME) static const char *const LIQ_##NAME = #NAME
+LIQ(Deminutus);
+LIQ(Ascendens);
+LIQ(Descendens);
+LIQ(InitioDebilis);
+LIQ(InitioDebilisDeminutus);
+LIQ(InitioDebilisAscendens);
+LIQ(InitioDebilisDescendens);
+LIQ(Nothing);
+
+#define FUSE(NAME) static const char *const FUSE_##NAME = #NAME
+FUSE(Lower);
+FUSE(LowerOblatus);
+FUSE(Upper);
+FUSE(UpperOblatus);
+FUSE(Down);
+FUSE(Up);
+
+/* the value indicating to GregorioTeX that there is no flat */
+#define NO_KEY_FLAT LOWEST_PITCH
+
+static __inline signed char pitch_value(const signed char height) {
+ /* right now height == pitch, but this function allows us to change
+ * the offset easily */
+ return height;
+}
+
+static __inline int bool_to_int(bool value) {
+ return value? 1 : 0;
+}
+
+typedef enum queuetype {
+ Q_ON_SPACE_BELOW_BOTTOM_LINE,
+ Q_ON_SPACE_ABOVE_BOTTOM_LINE,
+ Q_ON_BOTTOM_LINE,
+ Q_ON_LINE_ABOVE_BOTTOM_LINE
+} queuetype;
+
+static queuetype adjusted_queuetype_of(const gregorio_note *const note,
+ const gregorio_note *const queue_note, const signed char adjustment)
+{
+ switch (note->u.note.pitch + adjustment - LOWEST_PITCH) {
+ case 0:
+ return Q_ON_SPACE_BELOW_BOTTOM_LINE;
+ case 1:
+ return Q_ON_BOTTOM_LINE;
+ case 2:
+ return queue_note->low_ledger_line?
+ Q_ON_SPACE_ABOVE_BOTTOM_LINE : Q_ON_SPACE_BELOW_BOTTOM_LINE;
+ case 3:
+ return queue_note->low_ledger_line?
+ Q_ON_LINE_ABOVE_BOTTOM_LINE : Q_ON_BOTTOM_LINE;
+ case 5:
+ case 7:
+ case 9:
+ case 11:
+ case 13:
+ return Q_ON_LINE_ABOVE_BOTTOM_LINE;
+ default:
+ return Q_ON_SPACE_ABOVE_BOTTOM_LINE;
+ }
+}
+
+static queuetype queuetype_of(const gregorio_note *const note) {
+ return adjusted_queuetype_of(note, note, 0);
+}
+
+static grestyle_style gregoriotex_ignore_style = ST_NO_STYLE;
+static grestyle_style gregoriotex_next_ignore_style = ST_NO_STYLE;
+
+/*
+ * The different liquescentiae are:
+ * 'Nothing'
+ * 'InitioDebilis'
+ * 'Deminutus
+ * 'Ascendens'
+ * 'Descendens'
+ * 'InitioDebilisDeminutus'
+ * 'InitioDebilisAscendens'
+ * 'InitioDebilisDescendens'
+ *
+ * They also are and must be the same as in squarize.py.
+ */
+
+static const char *gregoriotex_determine_liquescentia(
+ gtex_glyph_liquescentia type, const gregorio_glyph *const glyph)
+{
+ gregorio_liquescentia liquescentia = glyph->u.notes.liquescentia;
+
+ switch (type) {
+ case LG_ALL:
+ break;
+ case LG_NO_INITIO:
+ liquescentia &= ~L_INITIO_DEBILIS;
+ break;
+ case LG_ONLY_DEMINUTUS:
+ liquescentia &= L_INITIO_DEBILIS | L_DEMINUTUS;
+ break;
+ case LG_FUSIBLE_INITIO:
+ if (glyph->u.notes.fuse_to_next_glyph) {
+ liquescentia &= L_INITIO_DEBILIS;
+ break;
+ }
+ /* else fall through to next case */
+ case LG_NONE:
+ liquescentia = L_NO_LIQUESCENTIA;
+ break;
+ }
+
+ /* now we convert liquescentia into the good GregorioTeX liquescentia
+ * numbers */
+
+ switch (liquescentia & ~L_FUSED) {
+ case L_DEMINUTUS:
+ return LIQ_Deminutus;
+ case L_AUCTUS_ASCENDENS:
+ return LIQ_Ascendens;
+ case L_AUCTUS_DESCENDENS:
+ return LIQ_Descendens;
+ case L_INITIO_DEBILIS:
+ return LIQ_InitioDebilis;
+ case L_DEMINUTUS_INITIO_DEBILIS:
+ return LIQ_InitioDebilisDeminutus;
+ case L_AUCTUS_ASCENDENS_INITIO_DEBILIS:
+ return LIQ_InitioDebilisAscendens;
+ case L_AUCTUS_DESCENDENS_INITIO_DEBILIS:
+ return LIQ_InitioDebilisDescendens;
+ case L_NO_LIQUESCENTIA:
+ /* break out and return "Nothing" */
+ break;
+ }
+
+ return LIQ_Nothing;
+}
+
+static __inline int compute_ambitus(const gregorio_note *const current_note)
+{
+ int first = current_note->u.note.pitch;
+ int second = current_note->next->u.note.pitch;
+ int ambitus;
+ if (first < second) {
+ ambitus = second - first;
+ } else {
+ ambitus = first - second;
+ }
+ gregorio_assert2(ambitus >= 1 && ambitus <= MAX_AMBITUS, compute_ambitus,
+ "unsupported ambitus: %d", ambitus, return 0);
+ return ambitus;
+}
+
+static const char *compute_glyph_name(const gregorio_glyph *const glyph,
+ const char *shape, const gtex_glyph_liquescentia ltype,
+ bool is_single_note)
+{
+ static char buf[BUFSIZE];
+
+ const char *liquescentia = gregoriotex_determine_liquescentia(ltype, glyph);
+ const gregorio_note *current_note;
+ int ambitus1, ambitus2, ambitus3, fuse_ambitus = 0;
+ const char *fuse_head = "", *fuse_tail = "";
+ const gregorio_glyph *previous = gregorio_previous_non_texverb_glyph(glyph);
+ int fuse_to_next_note, fuse_from_previous_note =
+ (previous && previous->type == GRE_GLYPH)
+ ? previous->u.notes.fuse_to_next_glyph : 0;
+
+ /* then we start making our formula */
+ gregorio_assert(glyph, compute_glyph_name, "called with NULL pointer",
+ return "");
+ gregorio_assert(glyph->u.notes.first_note, compute_glyph_name,
+ "called with a glyph that have no note", return "");
+
+ fuse_to_next_note = glyph->u.notes.fuse_to_next_glyph;
+
+ switch (glyph->u.notes.glyph_type) {
+ case G_PODATUS:
+ case G_PUNCTUM:
+ case G_FLEXA:
+ /* directionally head-fusible */
+ if (fuse_from_previous_note < 0) {
+ if (glyph->u.notes.first_note->u.note.shape != S_QUILISMA
+ && glyph->u.notes.first_note->u.note.shape
+ != S_QUILISMA_QUADRATUM) {
+ if (fuse_from_previous_note < -1) {
+ fuse_head = FUSE_Lower;
+ } else if (glyph->u.notes.first_note->u.note.shape
+ == S_ORISCUS_DESCENDENS
+ || glyph->u.notes.first_note->u.note.shape
+ == S_ORISCUS_SCAPUS_DESCENDENS) {
+ /* fuse_from_previous_note will be -1 here */
+ fuse_head = FUSE_LowerOblatus;
+ }
+ }
+ } else if (fuse_from_previous_note > 0) {
+ if (fuse_from_previous_note > 1) {
+ fuse_head = FUSE_Upper;
+ } else if (glyph->u.notes.first_note->u.note.shape
+ == S_ORISCUS_ASCENDENS
+ || glyph->u.notes.first_note->u.note.shape
+ == S_ORISCUS_SCAPUS_ASCENDENS) {
+ /* fuse_from_previous_note will be 1 here */
+ fuse_head = FUSE_UpperOblatus;
+ }
+ }
+ break;
+
+ default:
+ /* not directionally head-fusible */
+ break;
+ }
+
+ switch (glyph->u.notes.glyph_type) {
+ case G_FLEXA:
+ if (fuse_to_next_note <= 0) {
+ /* a flexa is only fusible up */
+ break;
+ }
+ /* else fall through */
+ case G_VIRGA_REVERSA:
+ case G_PUNCTUM:
+ /* tail-fusible */
+ if (fuse_to_next_note < 0) {
+ fuse_tail = FUSE_Down;
+ fuse_ambitus = -fuse_to_next_note;
+ } else if (fuse_to_next_note > 0) {
+ fuse_tail = FUSE_Up;
+ fuse_ambitus = fuse_to_next_note;
+ }
+
+ if (*fuse_tail && liquescentia == LIQ_Nothing) {
+ liquescentia = "";
+ }
+ break;
+
+ default:
+ /* not tail-fusible */
+ break;
+ }
+
+ if (is_fused(glyph->u.notes.liquescentia)) {
+ if (shape == SHAPE_AscendensOriscusScapus
+ || shape == SHAPE_AscendensOriscusScapusLongqueue
+ || shape == SHAPE_AscendensOriscusScapusOpenqueue) {
+ shape = SHAPE_AscendensOriscus;
+ } else if (shape == SHAPE_DescendensOriscusScapus
+ || shape == SHAPE_DescendensOriscusScapusLongqueue
+ || shape == SHAPE_DescendensOriscusScapusOpenqueue) {
+ shape = SHAPE_DescendensOriscus;
+ } else if (shape == SHAPE_FlexusOriscusScapus
+ || shape == SHAPE_FlexusOriscusScapusLongqueue
+ || shape == SHAPE_FlexusOriscusScapusOpenqueue) {
+ shape = SHAPE_FlexusOriscus;
+ } else if (shape == SHAPE_FlexusOriscusScapusInusitatus
+ || shape == SHAPE_FlexusOriscusScapusInusitatusLongqueue
+ || shape == SHAPE_FlexusOriscusScapusInusitatusOpenqueue) {
+ shape = SHAPE_FlexusOriscusInusitatus;
+ }
+ }
+
+ current_note = glyph->u.notes.first_note;
+ if (is_single_note) {
+ if (liquescentia == LIQ_Nothing) {
+ liquescentia = "";
+ }
+ if (!(*fuse_tail) && fuse_head != FUSE_UpperOblatus
+ && fuse_head != FUSE_LowerOblatus) {
+ /* single note fused shapes have weird names */
+ if (fuse_head == FUSE_Upper) {
+ if (shape == SHAPE_Punctum) {
+ shape = SHAPE_PunctumLineBL;
+ } else if (shape == SHAPE_AscendensOriscus) {
+ shape = SHAPE_AscendensOriscusLineBL;
+ } else if (shape == SHAPE_DescendensOriscus) {
+ shape = SHAPE_DescendensOriscusLineBL;
+ }
+ } else if (fuse_head == FUSE_Lower) {
+ if (shape == SHAPE_Punctum) {
+ shape = SHAPE_PunctumLineTL;
+ } else if (shape == SHAPE_AscendensOriscus) {
+ shape = SHAPE_AscendensOriscusLineTL;
+ } else if (shape == SHAPE_DescendensOriscus) {
+ shape = SHAPE_DescendensOriscusLineTL;
+ }
+ }
+ fuse_head = "";
+ }
+ gregorio_snprintf(buf, BUFSIZE, "%s%s%s%s%s", fuse_head, shape,
+ tex_ambitus[fuse_ambitus], liquescentia, fuse_tail);
+ return buf;
+ }
+ gregorio_assert(current_note->next, compute_glyph_name,
+ "called with a multi-note glyph that has only one note", return "");
+ gregorio_assert((ambitus1 = compute_ambitus(current_note)),
+ compute_glyph_name, "unexpected unison on multi-note glyph",
+ return "");
+ if (is_fused(glyph->u.notes.liquescentia)) {
+ if (shape == SHAPE_Flexus || shape == SHAPE_FlexusLongqueue
+ || shape == SHAPE_FlexusOpenqueue) {
+ if (fuse_to_next_note) {
+ fuse_head = "";
+ }
+ if (*fuse_head) {
+ shape = SHAPE_Flexus;
+ } else {
+ shape = SHAPE_FlexusNobar;
+ }
+ } else if (shape == SHAPE_Porrectus
+ || shape == SHAPE_PorrectusLongqueue) {
+ shape = SHAPE_PorrectusNobar;
+ }
+ } else {
+ if (fuse_to_next_note && (shape == SHAPE_FlexusLongqueue
+ || shape == SHAPE_FlexusOpenqueue)) {
+ /* a porrectus-like flexus has no longqueue variant */
+ shape = SHAPE_Flexus;
+ }
+ }
+ if (shape == SHAPE_SalicusLongqueue && liquescentia != LIQ_Nothing) {
+ /* the salicus queue is at the end of the glyph, and it doesn't exist
+ * for the liquescent forms */
+ shape = SHAPE_Salicus;
+ }
+ current_note = current_note->next;
+ if (!current_note->next) {
+ gregorio_snprintf(buf, BUFSIZE, "%s%s%s%s%s%s", fuse_head, shape,
+ tex_ambitus[ambitus1], tex_ambitus[fuse_ambitus],
+ liquescentia, fuse_tail);
+ return buf;
+ }
+ gregorio_assert((ambitus2 = compute_ambitus(current_note)),
+ compute_glyph_name, "unexpected unison on multi-note glyph",
+ return "");
+ current_note = current_note->next;
+ if (!current_note->next) {
+ gregorio_snprintf(buf, BUFSIZE, "%s%s%s%s%s%s%s", fuse_head, shape,
+ tex_ambitus[ambitus1], tex_ambitus[ambitus2],
+ tex_ambitus[fuse_ambitus], liquescentia, fuse_tail);
+ return buf;
+ }
+ gregorio_assert((ambitus3 = compute_ambitus(current_note)),
+ compute_glyph_name, "unexpected unison on multi-note glyph",
+ return "");
+ gregorio_snprintf(buf, BUFSIZE, "%s%s%s%s%s%s%s%s", fuse_head, shape,
+ tex_ambitus[ambitus1], tex_ambitus[ambitus2], tex_ambitus[ambitus3],
+ tex_ambitus[fuse_ambitus], liquescentia, fuse_tail);
+ return buf;
+}
+
+static const char *fusible_queued_shape(const gregorio_note *const note,
+ const gregorio_glyph *const glyph,
+ const char *const base_shape, const char *const longqueue_shape,
+ const char *const openqueue_shape)
+{
+ const char *name = NULL;
+ if (glyph->u.notes.fuse_to_next_glyph < 0) {
+ /* queue size depends on the following note if fused down */
+ bool ambitus_one = (glyph->u.notes.fuse_to_next_glyph == -1);
+ switch (adjusted_queuetype_of(note, note,
+ glyph->u.notes.fuse_to_next_glyph)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ if (ambitus_one) {
+ name = openqueue_shape;
+ break;
+ }
+ /* else fall through */
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ /* at ambitus one, long and short are swapped becuase the queue where
+ * the second note is on a space is longer than on a line */
+ name = ambitus_one? longqueue_shape : base_shape;
+ break;
+ case Q_ON_BOTTOM_LINE:
+ if (ambitus_one) {
+ name = openqueue_shape;
+ break;
+ }
+ /* else fall through */
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ /* at ambitus one, long and short are swapped becuase the queue where
+ * the second note is on a line is shorter than on a space */
+ name = ambitus_one? base_shape : longqueue_shape;
+ break;
+ }
+ } else if (glyph->u.notes.fuse_to_next_glyph) {
+ /* TODO (5.0?) handle queue size on upwards fusion */
+ switch (queuetype_of(note)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ case Q_ON_BOTTOM_LINE:
+ name = base_shape;
+ break;
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ name = longqueue_shape;
+ break;
+ }
+ } else {
+ switch (queuetype_of(note)) {
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ name = base_shape;
+ break;
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_BOTTOM_LINE:
+ name = openqueue_shape;
+ break;
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ name = longqueue_shape;
+ break;
+ }
+ }
+ gregorio_not_null(name, fusible_queued_shape, return base_shape);
+ return compute_glyph_name(glyph, name, LG_NONE, true);
+}
+
+static __inline char *code_point(const char *const shape, const bool is_cavum,
+ char *const buf, const size_t bufsize)
+{
+ if (is_cavum) {
+ gregorio_snprintf(buf, bufsize, "\\GreCavum{%s}", shape);
+ } else {
+ gregorio_snprintf(buf, bufsize, "\\GreCP%s", shape);
+ }
+ return buf;
+}
+
+static const char *determine_note_glyph_name(const gregorio_note *const note,
+ const gregorio_glyph *glyph, gtex_alignment *type)
+{
+ static char buf[128], cpbuf[96];
+ const char *name = "";
+
+ gregorio_assert(note, determine_note_glyph_name, "called with NULL pointer",
+ return "");
+
+ *type = AT_ONE_NOTE;
+ switch (note->u.note.shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ *type = AT_PUNCTUM_INCLINATUM;
+ return SHAPE_AscendensPunctumInclinatum;
+ case S_PUNCTUM_INCLINATUM_STANS:
+ *type = AT_PUNCTUM_INCLINATUM;
+ return SHAPE_StansPunctumInclinatum;
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ *type = AT_PUNCTUM_INCLINATUM;
+ return SHAPE_DescendensPunctumInclinatum;
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ return SHAPE_PunctumInclinatumDeminutus;
+ case S_PUNCTUM_INCLINATUM_AUCTUS:
+ return SHAPE_PunctumInclinatumAuctus;
+ case S_PUNCTUM:
+ return compute_glyph_name(glyph, SHAPE_Punctum, LG_FUSIBLE_INITIO, true);
+ case S_PUNCTUM_AUCTUS_ASCENDENS:
+ return SHAPE_PunctumAscendens;
+ case S_PUNCTUM_AUCTUS_DESCENDENS:
+ return SHAPE_PunctumDescendens;
+ case S_PUNCTUM_DEMINUTUS:
+ return SHAPE_PunctumDeminutus;
+ case S_LINEA:
+ return SHAPE_Linea;
+ case S_LINEA_PUNCTUM:
+ return SHAPE_LineaPunctum;
+ case S_VIRGA:
+ switch (queuetype_of(note)) {
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ return SHAPE_Virga;
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_BOTTOM_LINE:
+ return SHAPE_VirgaOpenqueue;
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ return SHAPE_VirgaLongqueue;
+ } /* all cases return, so this line is not hit; LCOV_EXCL_LINE */
+ case S_VIRGA_REVERSA:
+ switch (note->u.note.liquescentia) {
+ case L_AUCTUS_ASCENDENS:
+ switch (queuetype_of(note)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ name = SHAPE_VirgaReversaAscendens;
+ break;
+ case Q_ON_BOTTOM_LINE:
+ name = SHAPE_VirgaReversaOpenqueueAscendens;
+ break;
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ name = SHAPE_VirgaReversaLongqueueAscendens;
+ break;
+ }
+ if (note->u.note.pitch - LOWEST_PITCH == 3) {
+ /* if we're on the 'd' line, the queue could be long or short */
+ gregorio_snprintf(buf, sizeof buf,
+ "VirgaReversaAscendensOnDLine{%s}", code_point(name,
+ glyph->u.notes.is_cavum, cpbuf, sizeof cpbuf));
+ return buf;
+ }
+ return name;
+ case L_AUCTUS_DESCENDENS:
+ switch (queuetype_of(note)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ return SHAPE_VirgaReversaDescendens;
+ case Q_ON_BOTTOM_LINE:
+ return SHAPE_VirgaReversaOpenqueueDescendens;
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ return SHAPE_VirgaReversaLongqueueDescendens;
+ } /* all cases return, so this line is not hit; LCOV_EXCL_LINE */
+ default:
+ return fusible_queued_shape(note, glyph, SHAPE_VirgaReversa,
+ SHAPE_VirgaReversaLongqueue, SHAPE_VirgaReversaOpenqueue);
+ }
+ case S_ORISCUS_ASCENDENS:
+ *type = AT_ORISCUS;
+ return compute_glyph_name(glyph, SHAPE_AscendensOriscus, LG_NONE, true);
+ case S_ORISCUS_DESCENDENS:
+ *type = AT_ORISCUS;
+ return compute_glyph_name(glyph, SHAPE_DescendensOriscus, LG_NONE, true);
+ case S_ORISCUS_DEMINUTUS:
+ *type = AT_ORISCUS;
+ return SHAPE_OriscusDeminutus;
+ case S_QUILISMA:
+ *type = AT_QUILISMA;
+ return compute_glyph_name(glyph, SHAPE_Quilisma, LG_NONE, true);
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ return fusible_queued_shape(note, glyph, SHAPE_AscendensOriscusScapus,
+ SHAPE_AscendensOriscusScapusLongqueue,
+ SHAPE_AscendensOriscusScapusOpenqueue);
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ return fusible_queued_shape(note, glyph, SHAPE_DescendensOriscusScapus,
+ SHAPE_DescendensOriscusScapusLongqueue,
+ SHAPE_DescendensOriscusScapusOpenqueue);
+ case S_STROPHA:
+ *type = AT_STROPHA;
+ if (!(note->u.note.liquescentia &
+ (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS))) {
+ return SHAPE_Stropha;
+ }
+ /* else fall through to next case */
+ case S_STROPHA_AUCTA:
+ *type = AT_STROPHA;
+ switch (queuetype_of(note)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ return SHAPE_StrophaAucta;
+ case Q_ON_BOTTOM_LINE:
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ return SHAPE_StrophaAuctaLongtail;
+ } /* all cases return, so this line is not hit; LCOV_EXCL_LINE */
+ case S_FLAT:
+ return SHAPE_Flat;
+ case S_SHARP:
+ return SHAPE_Sharp;
+ case S_NATURAL:
+ return SHAPE_Natural;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(determine_note_glyph_name,
+ "called with unknown shape: %s",
+ gregorio_shape_to_string(note->u.note.shape));
+ return "";
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static __inline gregorio_note *first_note_of(
+ const gregorio_glyph *const glyph) {
+ assert(glyph->type == GRE_GLYPH);
+ assert(glyph->u.notes.first_note);
+ assert(glyph->u.notes.first_note->type == GRE_NOTE);
+ return glyph->u.notes.first_note;
+}
+
+static __inline signed char first_pitch_of(const gregorio_glyph *const glyph) {
+ return first_note_of(glyph)->u.note.pitch;
+}
+
+static __inline gregorio_note *second_note_of(
+ const gregorio_glyph *const glyph) {
+ assert(glyph->type == GRE_GLYPH);
+ assert(glyph->u.notes.first_note);
+ assert(glyph->u.notes.first_note->type == GRE_NOTE);
+ assert(glyph->u.notes.first_note->next);
+ assert(glyph->u.notes.first_note->next->type == GRE_NOTE);
+ return glyph->u.notes.first_note->next;
+}
+
+static __inline signed char second_pitch_of(const gregorio_glyph *const glyph) {
+ return second_note_of(glyph)->u.note.pitch;
+}
+
+static __inline gregorio_note *third_note_of(
+ const gregorio_glyph *const glyph) {
+ assert(glyph->type == GRE_GLYPH);
+ assert(glyph->u.notes.first_note);
+ assert(glyph->u.notes.first_note->type == GRE_NOTE);
+ assert(glyph->u.notes.first_note->next);
+ assert(glyph->u.notes.first_note->next->type == GRE_NOTE);
+ assert(glyph->u.notes.first_note->next->next);
+ assert(glyph->u.notes.first_note->next->next->type == GRE_NOTE);
+ return glyph->u.notes.first_note->next->next;
+}
+
+static __inline signed char third_pitch_of(const gregorio_glyph *const glyph) {
+ return third_note_of(glyph)->u.note.pitch;
+}
+
+static __inline const char *porrectus_shape(const gregorio_glyph *const glyph,
+ const char *base_shape, const char *longqueue_shape) {
+ const gregorio_note *const first_note = first_note_of(glyph);
+ if ((glyph->u.notes.glyph_type == G_PORRECTUS
+ && (glyph->u.notes.liquescentia & L_DEMINUTUS))
+ || first_note->u.note.pitch - second_pitch_of(glyph) == 1) {
+ switch (queuetype_of(first_note)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ case Q_ON_BOTTOM_LINE:
+ return base_shape;
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ return longqueue_shape;
+ }
+ } /* must be optimized out; LCOV_EXCL_LINE */
+ return base_shape;
+}
+
+static __inline const char *flexus_shape(const gregorio_glyph *const glyph,
+ const signed char ambitus, const char *base_shape,
+ const char *longqueue_shape, const char *openqueue_shape) {
+ const bool ambitus_one = (ambitus == 1);
+ switch (adjusted_queuetype_of(second_note_of(glyph), first_note_of(glyph),
+ 0)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ if (ambitus_one) {
+ return openqueue_shape;
+ }
+ /* else fall through */
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ /* at ambitus one, long and short are swapped becuase the queue where
+ * the second note is on a space is longer than on a line */
+ return ambitus_one? longqueue_shape : base_shape;
+ case Q_ON_BOTTOM_LINE:
+ if (ambitus_one) {
+ return openqueue_shape;
+ }
+ /* else fall through */
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ /* at ambitus one, long and short are swapped becuase the queue where
+ * the second note is on a line is shorter than on a space */
+ return ambitus_one? base_shape : longqueue_shape;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(flexus_shape, "unexpected queue length");
+ return base_shape;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline const char *quadratum_shape(const gregorio_glyph *const glyph,
+ const char *base_shape, const char *longqueue_shape,
+ const char *openqueue_shape) {
+ const bool ambitus_one =
+ (second_pitch_of(glyph) - first_pitch_of(glyph) == 1);
+ if (!is_tail_liquescentia(glyph->u.notes.liquescentia)) {
+ switch (adjusted_queuetype_of(first_note_of(glyph),
+ second_note_of(glyph), 0)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ if (ambitus_one) {
+ return openqueue_shape;
+ }
+ /* else fall through */
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ /* at ambitus one, long and short are swapped becuase the queue
+ * where the first note is on a space is longer than on a line */
+ return ambitus_one? longqueue_shape : base_shape;
+ case Q_ON_BOTTOM_LINE:
+ if (ambitus_one) {
+ return openqueue_shape;
+ }
+ /* else fall through */
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ /* at ambitus one, long and short are swapped becuase the queue
+ * where the first note is on a line is shorter than on a space */
+ return ambitus_one? base_shape : longqueue_shape;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(quadratum_shape, "unexpected queue length");
+ /* fall out of the conditional */
+ }
+ /* LCOV_EXCL_STOP */
+ return base_shape;
+}
+
+/* the function that calculates the number of the glyph. It also
+ * calculates the type, used for determining the position of signs. Type is
+ * very basic, it is only the global dimensions : torculus, one_note, etc. */
+
+const char *gregoriotex_determine_glyph_name(const gregorio_glyph *const glyph,
+ gtex_alignment *const type, gtex_type *const gtype)
+{
+ const char *shape = NULL;
+ gtex_glyph_liquescentia ltype;
+ signed char ambitus;
+ const gregorio_note *second_note;
+ gregorio_assert(glyph, gregoriotex_determine_glyph_name,
+ "called with NULL pointer", return "");
+ gregorio_assert(glyph->u.notes.first_note, gregoriotex_determine_glyph_name,
+ "called with a glyph that has no note", return "");
+ *gtype = T_ONE_NOTE;
+ switch (glyph->u.notes.glyph_type) {
+ case G_PODATUS:
+ switch (glyph->u.notes.first_note->u.note.shape) {
+ case S_QUILISMA:
+ *type = AT_QUILISMA;
+ /* the next if is because we made the choice that AUCTUS shapes
+ * look like pes quadratum. */
+ if (glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ *gtype = T_QUILISMA_PES_QUADRATUM;
+ shape = SHAPE_QuilismaPesQuadratum;
+ } else {
+ *gtype = T_QUILISMA_PES;
+ shape = SHAPE_QuilismaPes;
+ }
+ ltype = LG_NO_INITIO;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ *type = AT_ORISCUS;
+ *gtype = T_PES_QUASSUS;
+ shape = quadratum_shape(glyph, SHAPE_PesQuassus,
+ SHAPE_PesQuassusLongqueue, SHAPE_PesQuassusOpenqueue);
+ ltype = LG_NO_INITIO;
+ break;
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ *type = AT_ORISCUS;
+ *gtype = T_PES_QUASSUS;
+ shape = quadratum_shape(glyph, SHAPE_PesQuassusInusitatus,
+ SHAPE_PesQuassusInusitatusLongqueue,
+ SHAPE_PesQuassusInusitatusOpenqueue);
+ ltype = LG_NO_INITIO;
+ break;
+ default:
+ *type = AT_ONE_NOTE;
+ if (glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ *gtype = T_PES_QUADRATUM;
+ shape = SHAPE_PesQuadratum;
+ } else {
+ *gtype = T_PES;
+ shape = SHAPE_Pes;
+ }
+ ltype = LG_ALL;
+ break;
+ }
+ break;
+ case G_PES_QUADRATUM:
+ switch (glyph->u.notes.first_note->u.note.shape) {
+ case S_QUILISMA:
+ *type = AT_QUILISMA;
+ *gtype = T_QUILISMA_PES_QUADRATUM;
+ shape = quadratum_shape(glyph, SHAPE_QuilismaPesQuadratum,
+ SHAPE_QuilismaPesQuadratumLongqueue,
+ SHAPE_QuilismaPesQuadratumOpenqueue);
+ ltype = LG_NO_INITIO;
+ break;
+ default:
+ *type = AT_ONE_NOTE;
+ *gtype = T_PES_QUADRATUM;
+ shape = quadratum_shape(glyph, SHAPE_PesQuadratum,
+ SHAPE_PesQuadratumLongqueue, SHAPE_PesQuadratumOpenqueue);
+ ltype = LG_ALL;
+ break;
+ }
+ break;
+ case G_PES_ASCENDENS_ORISCUS:
+ *type = AT_ONE_NOTE;
+ *gtype = T_PES_ORISCUS;
+ shape = SHAPE_PesAscendensOriscus;
+ ltype = LG_ALL;
+ break;
+ case G_PES_DESCENDENS_ORISCUS:
+ *type = AT_ONE_NOTE;
+ *gtype = T_PES_ORISCUS;
+ shape = SHAPE_PesDescendensOriscus;
+ ltype = LG_ALL;
+ break;
+ case G_FLEXA:
+ ambitus = first_pitch_of(glyph) - second_pitch_of(glyph);
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ *type = AT_FLEXUS_DEMINUTUS;
+ } else {
+ if (ambitus == 1) {
+ *type = AT_FLEXUS_1;
+ } else {
+ *type = AT_FLEXUS;
+ }
+ }
+ switch (glyph->u.notes.first_note->u.note.shape) {
+ case S_ORISCUS_ASCENDENS:
+ *gtype = T_FLEXUS_ORISCUS;
+ shape = SHAPE_FlexusOriscusInusitatus;
+ ltype = LG_NO_INITIO;
+ break;
+
+ case S_ORISCUS_DESCENDENS:
+ *gtype = T_FLEXUS_ORISCUS;
+ shape = SHAPE_FlexusOriscus;
+ ltype = LG_NO_INITIO;
+ break;
+
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ *gtype = T_FLEXUS_ORISCUS_SCAPUS;
+ shape = flexus_shape(glyph, ambitus,
+ SHAPE_FlexusOriscusScapusInusitatus,
+ SHAPE_FlexusOriscusScapusInusitatusLongqueue,
+ SHAPE_FlexusOriscusScapusInusitatusOpenqueue);
+ ltype = LG_NO_INITIO;
+ break;
+
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ *gtype = T_FLEXUS_ORISCUS_SCAPUS;
+ shape = flexus_shape(glyph, ambitus, SHAPE_FlexusOriscusScapus,
+ SHAPE_FlexusOriscusScapusLongqueue,
+ SHAPE_FlexusOriscusScapusOpenqueue);
+ ltype = LG_NO_INITIO;
+ break;
+
+ default:
+ *gtype = glyph->u.notes.fuse_to_next_glyph? T_PORRECTUS : T_FLEXUS;
+ shape = flexus_shape(glyph, ambitus, SHAPE_Flexus,
+ SHAPE_FlexusLongqueue, SHAPE_FlexusOpenqueue);
+ ltype = LG_NO_INITIO;
+ break;
+ }
+ break;
+ case G_TORCULUS:
+ *gtype = T_TORCULUS;
+ if (glyph->u.notes.first_note->u.note.shape == S_QUILISMA) {
+ *type = AT_QUILISMA;
+ shape = SHAPE_TorculusQuilisma;
+ ltype = LG_NO_INITIO;
+ } else {
+ *type = AT_ONE_NOTE;
+ shape = SHAPE_Torculus;
+ ltype = LG_ALL;
+ }
+ break;
+ case G_TORCULUS_LIQUESCENS:
+ *gtype = T_TORCULUS_LIQUESCENS;
+ if (glyph->u.notes.first_note->u.note.shape == S_QUILISMA) {
+ *type = AT_QUILISMA;
+ shape = SHAPE_TorculusLiquescensQuilisma;
+ } else {
+ *type = AT_ONE_NOTE;
+ shape = SHAPE_TorculusLiquescens;
+ }
+ ltype = LG_ONLY_DEMINUTUS;
+ break;
+ case G_TORCULUS_RESUPINUS_FLEXUS:
+ *type = AT_ONE_NOTE;
+ *gtype = T_TORCULUS_RESUPINUS_FLEXUS;
+ break;
+ case G_PORRECTUS:
+ *type = AT_PORRECTUS;
+ *gtype = T_PORRECTUS;
+ shape = porrectus_shape(glyph, SHAPE_Porrectus,
+ SHAPE_PorrectusLongqueue);
+ ltype = LG_NO_INITIO;
+ break;
+ case G_TORCULUS_RESUPINUS:
+ *gtype = T_TORCULUS_RESUPINUS;
+ if (glyph->u.notes.first_note->u.note.shape == S_QUILISMA) {
+ *type = AT_QUILISMA;
+ shape = SHAPE_TorculusResupinusQuilisma;
+ } else {
+ *type = AT_ONE_NOTE;
+ shape = SHAPE_TorculusResupinus;
+ }
+ ltype = LG_ALL;
+ break;
+ case G_PORRECTUS_FLEXUS:
+ *type = AT_PORRECTUS;
+ *gtype = T_PORRECTUS_FLEXUS;
+ shape = porrectus_shape(glyph, SHAPE_PorrectusFlexus,
+ SHAPE_PorrectusFlexusLongqueue);
+ ltype = LG_NO_INITIO;
+ break;
+ case G_PORRECTUS_NO_BAR:
+ *type = AT_PORRECTUS;
+ *gtype = T_TORCULUS_RESUPINUS;
+ shape = SHAPE_PorrectusNobar;
+ ltype = LG_NO_INITIO;
+ break;
+ case G_PORRECTUS_FLEXUS_NO_BAR:
+ *type = AT_PORRECTUS;
+ *gtype = T_TORCULUS_RESUPINUS_FLEXUS;
+ shape = SHAPE_PorrectusFlexusNobar;
+ ltype = LG_NO_INITIO;
+ break;
+ case G_ANCUS:
+ *type = AT_ONE_NOTE;
+ gregorio_assert(glyph->u.notes.liquescentia & L_DEMINUTUS,
+ gregoriotex_determine_glyph_name,
+ "encountered non-deminutus ancus", break);
+ second_note = second_note_of(glyph);
+ if (first_pitch_of(glyph) - second_note->u.note.pitch == 1) {
+ *type = AT_FLEXUS_1;
+ } else {
+ *type = AT_FLEXUS;
+ }
+ *gtype = T_ANCUS;
+ ambitus = first_pitch_of(glyph) - second_pitch_of(glyph);
+ shape = flexus_shape(glyph, ambitus, SHAPE_Ancus,
+ SHAPE_AncusLongqueue, SHAPE_Ancus);
+ ltype = LG_ONLY_DEMINUTUS;
+ break;
+ case G_SCANDICUS:
+ *type = AT_ONE_NOTE;
+ *gtype = T_SCANDICUS;
+ shape = SHAPE_Scandicus;
+ ltype = LG_NO_INITIO;
+ break;
+ case G_SALICUS:
+ *type = AT_ONE_NOTE;
+ *gtype = T_SALICUS;
+ ambitus = third_pitch_of(glyph) - second_pitch_of(glyph);
+ shape = flexus_shape(glyph, ambitus, SHAPE_Salicus,
+ SHAPE_SalicusLongqueue, SHAPE_Salicus);
+ ltype = LG_NO_INITIO;
+ break;
+ case G_SALICUS_FLEXUS:
+ *type = AT_ONE_NOTE;
+ *gtype = T_SALICUS_FLEXUS;
+ shape = SHAPE_SalicusFlexus;
+ ltype = LG_NO_INITIO;
+ break;
+ case G_PUNCTUM_INCLINATUM:
+ case G_PUNCTA_INCLINATA:
+ case G_2_PUNCTA_INCLINATA_DESCENDENS:
+ case G_3_PUNCTA_INCLINATA_DESCENDENS:
+ case G_4_PUNCTA_INCLINATA_DESCENDENS:
+ case G_5_PUNCTA_INCLINATA_DESCENDENS:
+ case G_2_PUNCTA_INCLINATA_ASCENDENS:
+ case G_3_PUNCTA_INCLINATA_ASCENDENS:
+ case G_4_PUNCTA_INCLINATA_ASCENDENS:
+ case G_5_PUNCTA_INCLINATA_ASCENDENS:
+ case G_PUNCTUM:
+ case G_STROPHA:
+ case G_VIRGA:
+ case G_VIRGA_REVERSA:
+ case G_STROPHA_AUCTA:
+ case G_DISTROPHA:
+ case G_DISTROPHA_AUCTA:
+ case G_TRISTROPHA:
+ case G_TRISTROPHA_AUCTA:
+ case G_BIVIRGA:
+ case G_TRIVIRGA:
+ case G_ALTERATION:
+ *type = AT_ONE_NOTE;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(gregoriotex_determine_glyph_name,
+ "called with unknown glyph: %s",
+ gregorio_glyph_type_to_string(glyph->u.notes.glyph_type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ if (shape) {
+ shape = compute_glyph_name(glyph, shape, ltype, false);
+ }
+ /* we fix *type with initio_debilis */
+ if (*type == AT_ONE_NOTE) {
+ if (is_initio_debilis(glyph->u.notes.liquescentia)) {
+ *type = AT_INITIO_DEBILIS;
+ }
+ }
+
+ return shape;
+}
+
+/**
+ * This now does nothing useful, but we keep it here in case it may
+ * be needed in future.
+ */
+static void gregoriotex_write_voice_info(FILE *f, gregorio_voice_info *voice_info)
+{
+ gregorio_assert(f && voice_info, gregoriotex_write_voice_info,
+ "file or voice_info passed as NULL", return);
+}
+
+/* this function indicates if the syllable is the last of the line or score. */
+static bool is_last_of_line(gregorio_syllable *syllable)
+{
+ gregorio_element *current_element = NULL;
+ if (!(syllable->next_syllable) || ((syllable->next_syllable->elements)[0]
+ && (syllable->next_syllable->elements)[0]->type
+ == GRE_END_OF_LINE)) {
+ /* the next syllable start by an end of line */
+ return true;
+ }
+ if (syllable->elements) {
+ current_element = (syllable->elements)[0];
+ while (current_element) {
+ if (current_element->type == GRE_END_OF_LINE) {
+ /* we return true only if the end of line is the last element */
+ if (!(current_element->next)) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ current_element = current_element->next;
+ }
+ }
+ }
+ return false;
+}
+
+/*
+ * ! @brief Prints the beginning of each text style
+ */
+static void gtex_write_begin(FILE *f, grestyle_style style)
+{
+ if (style == gregoriotex_ignore_style) {
+ return;
+ }
+ switch (style) {
+ case ST_ITALIC:
+ fprintf(f, "\\GreItalic{");
+ break;
+ case ST_SMALL_CAPS:
+ fprintf(f, "\\GreSmallCaps{");
+ break;
+ case ST_BOLD:
+ fprintf(f, "\\GreBold{");
+ break;
+ case ST_FORCED_CENTER:
+ case ST_CENTER:
+ fprintf(f, "}{");
+ break;
+ case ST_TT:
+ fprintf(f, "\\GreTypewriter{");
+ break;
+ case ST_UNDERLINED:
+ fprintf(f, "\\GreUnderline{");
+ break;
+ case ST_COLORED:
+ fprintf(f, "\\GreColored{");
+ break;
+ case ST_ELISION:
+ fprintf(f, "\\GreElision{");
+ break;
+ case ST_FIRST_WORD:
+ fprintf(f, "\\GreFirstWord{");
+ break;
+ case ST_FIRST_SYLLABLE:
+ fprintf(f, "\\GreFirstSyllable{");
+ break;
+ case ST_FIRST_SYLLABLE_INITIAL:
+ fprintf(f, "\\GreFirstSyllableInitial{");
+ break;
+ case ST_PROTRUSION_FACTOR:
+ fprintf(f, "\\GreProtrusion{");
+ break;
+ case ST_PROTRUSION:
+ fprintf(f, "{");
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @brief Ends each text style
+ */
+static void gtex_write_end(FILE *f, grestyle_style style)
+{
+ if (style == gregoriotex_ignore_style) {
+ return;
+ }
+ switch (style) {
+ case ST_FORCED_CENTER:
+ case ST_CENTER:
+ case ST_SYLLABLE_INITIAL:
+ fprintf(f, "}{");
+ break;
+ case ST_INITIAL:
+ break;
+ default:
+ fprintf(f, "}");
+ break;
+ }
+}
+
+static __inline void tex_escape_text(FILE *const f, const char *text)
+{
+ /* We escape these characters into \string\ddd (where ddd is the decimal
+ * ASCII value of the character) for most escapes, and into \string\n for
+ * newlines. We do it this way to get the "raw" string values through TeX
+ * and into Lua, where the sequences become \ddd and \n respectively and
+ * are translated into their byte values. Lua can then decide whether the
+ * full strings should be evaluated by TeX as TeX or as strings */
+ for (; *text; ++text) {
+ switch (*text) {
+ case '\\':
+ case '{':
+ case '}':
+ case '~':
+ case '%': /* currently, we'll never get %, but handle it anyway */
+ case '#':
+ case '"':
+ /* these characters have special meaning to TeX */
+ fprintf(f, "\\string\\%03d", *text);
+ break;
+ case '\n':
+ fprintf(f, "\\string\\n");
+ break;
+ case '\r':
+ /* ignore */
+ break;
+ default:
+ /* UTF-8 multibyte sequences will fall into here, which is fine */
+ fputc(*text, f);
+ break;
+ }
+ }
+}
+
+static __inline void tex_escape_wtext(FILE *const f, const grewchar *text)
+{
+ /* We escape these characters into \string\ddd (where ddd is the decimal
+ * ASCII value of the character) for most escapes, and into \string\n for
+ * newlines. We do it this way to get the "raw" string values through TeX
+ * and into Lua, where the sequences become \ddd and \n respectively and
+ * are translated into their byte values. Lua can then decide whether the
+ * full strings should be evaluated by TeX as TeX or as strings */
+ for (; *text; ++text) {
+ switch (*text) {
+ case L'\\':
+ case L'{':
+ case L'}':
+ case L'~':
+ case L'%': /* currently, we'll never get %, but handle it anyway */
+ case L'#':
+ case L'"':
+ /* these characters have special meaning to TeX */
+ fprintf(f, "\\string\\%03d", *text);
+ break;
+ /* There is currently no way to get a carriage return or a newline into
+ * an <sp>, but we'll leave this code here, but #if'd out, in case we
+ * need this function in a different context */
+#if 0
+ case L'\n':
+ fprintf(f, "\\string\\n");
+ break;
+ case L'\r':
+ / * ignore * /
+ break;
+#endif
+ default:
+ gregorio_print_unichar(f, *text);
+ break;
+ }
+ }
+}
+
+/*
+ * ! @brief Writes GregorioTeX special characters. This function takes the
+ * special characters as input (i.e. from gabc representation), and writes them
+ * * in GregorioTeX form.
+ */
+static void gtex_write_special_char(FILE *f, const grewchar *special_char)
+{
+ fprintf(f, "\\GreSpecial{");
+ tex_escape_wtext(f, special_char);
+ fprintf(f, "}");
+}
+
+static void gtex_write_verb(FILE *f, const grewchar *first_char)
+{
+ gregorio_print_unistring(f, first_char);
+}
+
+static void gtex_print_char(FILE *f, const grewchar to_print)
+{
+ switch (to_print) {
+ case L'*':
+ fprintf(f, "\\GreStar{}");
+ break;
+ case L'%':
+ /* there's currently no way to get a % into gabc, so this wont be hit,
+ * but we leave it here for safety and possible future use */
+ /* LCOV_EXCL_START */
+ fprintf(f, "\\%%{}");
+ break;
+ /* LCOV_EXCL_STOP */
+ case L'\\':
+ fprintf(f, "\\textbackslash{}");
+ break;
+ case L'&':
+ fprintf(f, "\\&{}");
+ break;
+ case L'#':
+ fprintf(f, "\\#{}");
+ break;
+ case L'+':
+ fprintf(f, "\\GreDagger{}");
+ break;
+ case L'_':
+ fprintf(f, "\\_{}");
+ break;
+ case L'-':
+ fprintf(f, "\\GreHyph{}");
+ break;
+ default:
+ gregorio_print_unichar(f, to_print);
+ break;
+ }
+ return;
+}
+
+/* a function to map the internal ST_* styles to gregoriotex styles as defined
+ * in gregoriotex-syllables.tex */
+static unsigned char gregoriotex_internal_style_to_gregoriotex(
+ const grestyle_style style)
+{
+ switch (style) {
+ case ST_ITALIC:
+ return 1;
+ case ST_BOLD:
+ return 2;
+ case ST_SMALL_CAPS:
+ return 3;
+ case ST_TT:
+ return 4;
+ case ST_UNDERLINED:
+ return 5;
+ case ST_COLORED:
+ return 6;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(gregoriotex_internal_style_to_gregoriotex,
+ "unrecognized style: %s", grestyle_style_to_string(style));
+ return 0;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/*
+ * A quite hacky function: when we have only one style (typically italic) and
+ * when this style is on all the parts, then we return this style.
+ *
+ */
+static grestyle_style gregoriotex_fix_style(
+ const gregorio_character *current_char)
+{
+ grestyle_style possible_fixed_style = ST_NO_STYLE;
+ grestyle_style in_fixed_style = ST_NO_STYLE;
+ while (current_char) {
+ if (!in_fixed_style) {
+ /* before the first style */
+ if (current_char->is_character) {
+ /* got some character, so no future style can apply to the
+ * entire syllable */
+ return ST_NO_STYLE;
+ }
+ if (current_char->cos.s.type == ST_T_BEGIN) {
+ switch (current_char->cos.s.style) {
+ case ST_VERBATIM:
+ case ST_SPECIAL_CHAR:
+ /* these are pseudo-characters, and if they appear
+ * before the first style, then the style does not
+ * apply to the entire syllable */
+ return ST_NO_STYLE;
+
+ case ST_ITALIC:
+ case ST_BOLD:
+ case ST_TT:
+ case ST_SMALL_CAPS:
+ case ST_UNDERLINED:
+ case ST_COLORED:
+ if (possible_fixed_style) {
+ if (current_char->cos.s.style != possible_fixed_style) {
+ /* found a differing style */
+ return ST_NO_STYLE;
+ } else {
+ /* same style which may apply to the entire
+ * syllable */
+ in_fixed_style = possible_fixed_style;
+ }
+ } else {
+ /* we found a candidate fixed style */
+ in_fixed_style = possible_fixed_style =
+ current_char->cos.s.style;
+ }
+ break;
+
+ default:
+ /* anything else is "transparent" before the first real
+ * or pseudo-character */
+ break;
+ }
+ }
+ /* else it's an end of a style, which we treat as "transparent"
+ * noise */
+ } else {
+ /* we have a possible style */
+ if (!current_char->is_character) {
+ if (current_char->cos.s.type == ST_T_BEGIN) {
+ switch (current_char->cos.s.style) {
+ case ST_ITALIC:
+ case ST_BOLD:
+ case ST_TT:
+ case ST_SMALL_CAPS:
+ case ST_UNDERLINED:
+ case ST_COLORED:
+ if (current_char->cos.s.style != possible_fixed_style) {
+ /* found a differing style */
+ return ST_NO_STYLE;
+ }
+ /* else it's a (nested) open of the same style, which
+ * doesn't change the style; however, nested styles
+ * (should) have been eliminated by now */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregoriotex_fix_style, "encountered a "
+ "nested style which should have been removed "
+ "by now");
+ break;
+ /* LCOV_EXCL_STOP */
+
+ default:
+ /* anything else is a pseudo-character or a
+ * "transparent" style, which don't affect the fixed
+ * style */
+ break;
+ }
+ } else if (current_char->cos.s.type == ST_T_END) {
+ if (current_char->cos.s.style == possible_fixed_style) {
+ /* we closed the possible fixed style; we don't return
+ * yet to give it the chance to re-open */
+ in_fixed_style = ST_NO_STYLE;
+ }
+ /* else it's a close of something we don't care about or a
+ * style that wasn't opened, so for the purposes of this
+ * function, these are "transparent" and don't affect the
+ * fixed style */
+ }
+ }
+ /* else it's a character, and that doesn't affect the fixed style */
+ }
+ current_char = current_char->next_character;
+ }
+ return possible_fixed_style;
+}
+
+/*
+ * @brief Writes the translation.
+ *
+ * There is no special handling of translation text; that is, we just print the
+ * entire string of text under the normal text line, without considering any
+ * special centering or linebreaks.
+ */
+static __inline void write_translation(FILE *f,
+ gregorio_character *translation)
+{
+ gregorio_not_null(translation, write_translation, return);
+ gregorio_write_text(WTP_NORMAL, translation, f, &gtex_write_verb,
+ &gtex_print_char, &gtex_write_begin, &gtex_write_end,
+ &gtex_write_special_char);
+}
+
+/* a function to compute the height of the flat of a key
+ * the flat is always on the line of the */
+
+static char clef_flat_height(gregorio_clef clef, signed char line, bool flatted)
+{
+ char offset = 6;
+
+ if (!flatted) {
+ return NO_KEY_FLAT;
+ }
+
+ switch (clef) {
+ case CLEF_C:
+ switch (line) {
+ case 1:
+ offset = 2;
+ break;
+ case 2:
+ offset = 4;
+ break;
+ case 3:
+ offset = 6;
+ break;
+ case 4:
+ offset = 8;
+ break;
+ case 5:
+ offset = 10;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(clef_flat_height, "unknown line number: %d", line);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+ case CLEF_F:
+ switch (line) {
+ case 1:
+ offset = 6;
+ break;
+ case 2:
+ offset = 8;
+ break;
+ case 3:
+ offset = 3;
+ break;
+ case 4:
+ offset = 5;
+ break;
+ case 5:
+ offset = 7;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(clef_flat_height, "unknown line number: %d", line);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(clef_flat_height, "unknown clef type: %d", clef);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+
+ return pitch_value(LOWEST_PITCH + offset);
+}
+
+static __inline bool is_manual_custos(const gregorio_element *const element)
+{
+ return element->type == GRE_CUSTOS && element->u.misc.pitched.force_pitch;
+}
+
+OFFSET_CASE(BarStandard);
+OFFSET_CASE(BarVirgula);
+OFFSET_CASE(BarDivisioFinalis);
+
+static void write_bar(FILE *f, const gregorio_score *const score,
+ const gregorio_syllable *const syllable,
+ const gregorio_element *const element,
+ const unsigned char first_of_disc)
+{
+ const gregorio_bar type = element->u.misc.unpitched.info.bar;
+ const gregorio_sign signs = element->u.misc.unpitched.special_sign;
+ const bool is_inside_bar = element->next && !is_manual_custos(element->next)
+ && element->next->type != GRE_END_OF_LINE;
+ const bool has_text = !element->previous && syllable->text;
+ /* the type number of function vepisemaorrare */
+ const char *offset_case = BarStandard;
+ signed char far_pitch_adjustment = 0;
+ /* don't use "In" version of bars in the first argument of a GreDiscretionary */
+ if (is_inside_bar && first_of_disc != 1) {
+ fprintf(f, "\\GreIn");
+ } else {
+ fprintf(f, "\\Gre");
+ }
+ switch (type) {
+ case B_VIRGULA:
+ fprintf(f, "Virgula");
+ offset_case = BarVirgula;
+ break;
+ case B_DIVISIO_MINIMA:
+ fprintf(f, "DivisioMinima");
+ break;
+ case B_DIVISIO_MINOR:
+ fprintf(f, "DivisioMinor");
+ break;
+ case B_DIVISIO_MAIOR:
+ fprintf(f, "DivisioMaior");
+ break;
+ case B_DIVISIO_FINALIS:
+ fprintf(f, "DivisioFinalis");
+ offset_case = BarDivisioFinalis;
+ break;
+ case B_DIVISIO_MINOR_D1:
+ fprintf(f, "Dominica{1}");
+ break;
+ case B_DIVISIO_MINOR_D2:
+ fprintf(f, "Dominica{2}");
+ break;
+ case B_DIVISIO_MINOR_D3:
+ fprintf(f, "Dominica{3}");
+ break;
+ case B_DIVISIO_MINOR_D4:
+ fprintf(f, "Dominica{4}");
+ break;
+ case B_DIVISIO_MINOR_D5:
+ fprintf(f, "Dominica{5}");
+ break;
+ case B_DIVISIO_MINOR_D6:
+ fprintf(f, "Dominica{6}");
+ break;
+ case B_DIVISIO_MINOR_D7:
+ fprintf(f, "Dominica{7}");
+ break;
+ case B_DIVISIO_MINOR_D8:
+ fprintf(f, "Dominica{8}");
+ break;
+ case B_VIRGULA_HIGH:
+ fprintf(f, "VirgulaHigh");
+ offset_case = BarVirgula;
+ break;
+ case B_DIVISIO_MINIMA_HIGH:
+ fprintf(f, "DivisioMinimaHigh");
+ break;
+ case B_DIVISIO_MAIOR_DOTTED:
+ fprintf(f, "DivisioMaiorDotted");
+ break;
+ case B_DIVISIO_MINIMIS:
+ fprintf(f, "DivisioMinimis");
+ break;
+ case B_DIVISIO_MINIMIS_HIGH:
+ fprintf(f, "DivisioMinimisHigh");
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(write_bar, "unknown bar type: %d", type);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ fprintf(f, "{%c}", has_text? '1' : '0');
+ switch (signs) {
+ case _V_EPISEMA:
+ fprintf(f, "{\\GreBarVEpisema{\\GreOCase%s}}", offset_case);
+ break;
+ case _BAR_H_EPISEMA:
+ fprintf(f, "{\\GreBarBrace{\\GreOCase%s}}", offset_case);
+ break;
+ case _V_EPISEMA_BAR_H_EPISEMA:
+ fprintf(f, "{\\GreBarBrace{\\GreOCase%s}"
+ "\\GreBarVEpisema{\\GreOCase%s}}",
+ offset_case, offset_case);
+ break;
+ default:
+ fprintf(f, "{}");
+ break;
+ }
+ switch (type) {
+ case B_DIVISIO_MINIMIS_HIGH:
+ ++ far_pitch_adjustment;
+ /* fall through */
+
+ case B_VIRGULA_HIGH:
+ case B_DIVISIO_MINIMA_HIGH:
+ ++ far_pitch_adjustment;
+ /* fall through */
+
+ case B_DIVISIO_MINIMIS:
+ ++ far_pitch_adjustment;
+ /* fall through */
+
+ case B_VIRGULA:
+ case B_DIVISIO_MINIMA:
+ {
+ char is_far = '0';
+ const gregorio_element *e;
+ const gregorio_syllable *s;
+ const gregorio_glyph *g;
+ const gregorio_note *n;
+ signed char pitch;
+
+ /* find the prior element */
+ e = element->previous;
+ if (!e) {
+ for (s = syllable->previous_syllable; s; s = s->previous_syllable) {
+ /* loop to find the previous syllable with elements */
+ if (s->elements && *s->elements) {
+ for (e = *s->elements; e->next; e = e->next) {
+ /* just loop to find the last element */
+ }
+ break;
+ }
+ }
+ }
+ if (e && e->type == GRE_ELEMENT) {
+ g = e->u.first_glyph;
+ if (g) {
+ while (g->next) {
+ /* loop to find the last glyph in the prior element */
+ g = g->next;
+ }
+ }
+ if (g && g->type == GRE_GLYPH && (n = g->u.notes.first_note)) {
+ while (n->next) {
+ /* loop to find the last note */
+ n = n->next;
+ }
+ pitch = n->u.note.pitch;
+ if (g->u.notes.liquescentia & L_DEMINUTUS && n->previous
+ && n->previous->u.note.pitch > pitch) {
+ pitch = n->previous->u.note.pitch;
+ }
+ if (pitch < score->virgula_far_pitch + far_pitch_adjustment) {
+ /* find next element */
+ e = element->next;
+ if (!e) {
+ for (s = syllable->next_syllable; s;
+ s = s->next_syllable) {
+ /* loop to find the next syllable with elements */
+ if (s->elements && *s->elements) {
+ e = *s->elements;
+ break;
+ }
+ }
+ }
+ if (e) {
+ if (e->type == GRE_END_OF_LINE) {
+ is_far = '1';
+ } else if (e->type == GRE_ELEMENT) {
+ g = e->u.first_glyph;
+ if (g && g->type == GRE_GLYPH) {
+ n = g->u.notes.first_note;
+ if (n) {
+ if (g->u.notes.glyph_type == G_PODATUS
+ && n->next) {
+ n = n->next;
+ }
+ if (n->u.note.pitch
+ < score->virgula_far_pitch
+ + far_pitch_adjustment) {
+ is_far = '1';
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ fprintf(f, "{%c}%%\n", is_far);
+ }
+ break;
+
+ default:
+ fprintf(f, "%%\n");
+ break;
+ }
+}
+
+static __inline char *suppose_high_ledger_line(const gregorio_note *const note)
+{
+ return note->high_ledger_line? "\\GreSupposeHighLedgerLine" : "";
+}
+
+static __inline char *suppose_low_ledger_line(const gregorio_note *const note)
+{
+ return note->low_ledger_line? "\\GreSupposeLowLedgerLine" : "";
+}
+
+/*
+ * ! @brief Writes augmentum duplexes (double dots) We suppose we are on the
+ * last note. \n The algorithm is the following: if there is a previous note,
+ * we consider that the two puncta of the augumentum duplex must correspond to
+ * the last note and the previous note. If we are adding to a single note
+ * glyph, which would be weird but sure why not, we just typeset two puncta
+ * spaced of 2.
+ */
+static void write_auctum_duplex(FILE *f,
+ const gregorio_note *const current_note)
+{
+ char pitch = current_note->u.note.pitch;
+ char previous_pitch = 0;
+ /* second_pitch is the second argument of the \augmentumduplex macro,
+ * that's what this function is all about. */
+ char second_pitch = 0;
+ /* this variable will be set to 1 if we are on the note before the last
+ * note of a podatus or a porrectus or a torculus resupinus */
+ unsigned char special_punctum = 0;
+ if (current_note->previous) {
+ if (current_note->previous->u.note.pitch - current_note->u.note.pitch ==
+ -1
+ || current_note->previous->u.note.pitch -
+ current_note->u.note.pitch == 1) {
+ special_punctum = 1;
+ }
+ second_pitch = current_note->previous->u.note.pitch;
+ previous_pitch = second_pitch;
+ }
+
+ if (!previous_pitch || previous_pitch == pitch) {
+ if (is_on_a_line(pitch)) {
+ second_pitch = pitch;
+ special_punctum = 1;
+ } else {
+ second_pitch = pitch + 1;
+ }
+ }
+ /* the first argument should always be the lowest one, that's what we do
+ * here: */
+ if (pitch > second_pitch) {
+ previous_pitch = pitch;
+ pitch = second_pitch;
+ second_pitch = previous_pitch;
+ }
+ /* maybe the third argument should be changed */
+ fprintf(f, "\\GreAugmentumDuplex{%d}{%d}{%d}%%\n", pitch_value(pitch),
+ pitch_value(second_pitch), special_punctum);
+}
+
+/**
+ * @brief Adds a dot.
+ *
+ * Writes \c \\GrePunctumMora in the gtex file, with the appropriate arguments. You might think this function
+ * more straightforward than it actually is...
+ */
+static void write_punctum_mora(FILE *f, const gregorio_glyph *glyph,
+ const gregorio_note *current_note, const int fuse_to_next_note)
+{
+ /* in this if we consider that the puncta are only on the last two notes
+ * (maybe it would be useful to consider it more entirely, but it would be
+ * really weird...) */
+ /* the variable that will be set to true if we have to shift the punctum
+ * inclinatum before the last note */
+ bool shift_before = false;
+ /* this variable will be set to 1 if we are on the note before the last
+ * note of a podatus or a porrectus or a torculus resupinus */
+ unsigned char special_punctum = 0;
+ /* 0 if space is normal, 1 if there should be no space after a punctum */
+ unsigned char no_space = 0;
+ /* the pitch where to set the punctum */
+ char pitch = current_note->u.note.pitch;
+ /* a variable to know if we are on a punctum inclinatum or not */
+ unsigned char punctum_inclinatum = 0;
+ /* a temp variable */
+ const gregorio_note *tmpnote;
+ /* we go into this switch only if it is the note before the last note */
+ if (current_note->next) {
+ switch (glyph->u.notes.glyph_type) {
+ case G_FLEXA:
+ case G_TORCULUS:
+ case G_TORCULUS_RESUPINUS_FLEXUS:
+ case G_PORRECTUS_FLEXUS:
+ if (!(glyph->u.notes.liquescentia & L_DEMINUTUS)) {
+ shift_before = true;
+ }
+ if (is_between_lines(pitch)
+ && pitch - current_note->next->u.note.pitch == 1) {
+ special_punctum = 2;
+ }
+ break;
+ case G_PODATUS:
+ if ((current_note->u.note.shape != S_PUNCTUM
+ && current_note->u.note.shape != S_QUILISMA)
+ || (glyph->u.notes.liquescentia
+ & (L_AUCTUS_DESCENDENS | L_AUCTUS_ASCENDENS))) {
+ shift_before = true;
+ /* fine tuning */
+ if (current_note->next->u.note.pitch -
+ current_note->u.note.pitch == 1) {
+ if (is_on_a_line(current_note->u.note.pitch)) {
+ special_punctum = 1;
+ } else {
+ pitch = current_note->u.note.pitch - 1;
+ }
+ }
+ } else {
+ /* case for f.g */
+ if (current_note->next->u.note.pitch -
+ current_note->u.note.pitch == 1) {
+ special_punctum = 1;
+ }
+ }
+ break;
+ case G_PES_QUADRATUM:
+ shift_before = true;
+ if (current_note->next->u.note.pitch - current_note->u.note.pitch ==
+ 1) {
+ if (is_on_a_line(current_note->u.note.pitch)) {
+ special_punctum = 1;
+ } else {
+ pitch = current_note->u.note.pitch - 1;
+ }
+ }
+ break;
+ case G_PORRECTUS:
+ case G_TORCULUS_RESUPINUS:
+ /* this case is only for the note before the previous note */
+ if ((current_note->next->u.note.pitch -
+ current_note->u.note.pitch == -1
+ || current_note->next->u.note.pitch -
+ current_note->u.note.pitch == 1)
+ && !(current_note->next->next))
+ special_punctum = 1;
+ break;
+ default:
+ break;
+ }
+ }
+ /* we enter here in any case */
+ switch (glyph->u.notes.glyph_type) {
+ case G_PUNCTA_INCLINATA:
+ case G_2_PUNCTA_INCLINATA_DESCENDENS:
+ case G_3_PUNCTA_INCLINATA_DESCENDENS:
+ case G_4_PUNCTA_INCLINATA_DESCENDENS:
+ case G_5_PUNCTA_INCLINATA_DESCENDENS:
+ case G_TORCULUS:
+ if (!current_note->next) {
+ special_punctum = 1;
+ }
+ break;
+ default:
+ break;
+ }
+ switch (current_note->u.note.shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_STANS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ punctum_inclinatum = 1;
+ break;
+ default:
+ break;
+ }
+ /* when the punctum mora is on a note on a line, and the prior note is on
+ * the space immediately above, the dot is placed on the space below the
+ * line instead */
+ if (current_note->previous
+ && (current_note->previous->u.note.pitch -
+ current_note->u.note.pitch == 1)
+ && is_on_a_line(current_note->u.note.pitch)
+ && (current_note->previous->signs == _PUNCTUM_MORA
+ || current_note->previous->signs == _V_EPISEMA_PUNCTUM_MORA
+ || current_note->previous->choral_sign)) {
+ special_punctum = 1;
+ }
+
+ if (current_note->mora_vposition) {
+ special_punctum = current_note->mora_vposition == VPOS_BELOW? 1 : 0;
+ }
+
+ if (shift_before) {
+ if (current_note->next->u.note.pitch - current_note->u.note.pitch == -1
+ || current_note->next->u.note.pitch -
+ current_note->u.note.pitch == 1) {
+ fprintf(f, "\\GrePunctumMora{%d}{3}{%d}{%d}%%\n",
+ pitch_value(pitch), special_punctum, punctum_inclinatum);
+ } else {
+ fprintf(f, "\\GrePunctumMora{%d}{2}{%d}{%d}%%\n",
+ pitch_value(pitch), special_punctum, punctum_inclinatum);
+ }
+ return;
+ }
+ /* There are two special cases. The first: if the next glyph is a
+ * ZERO_WIDTH_SPACE, and the current glyph is a PES, and the punctum mora
+ * is on the first note, and the first note of the next glyph is at least
+ * two (or three depending on something) pitches higher than the current
+ * note.
+ * You'll all have understood, this case is quite rare... but when it
+ * appears, we pass 1 as a second argument of \punctummora so that it
+ * removes the space introduced by the punctummora. */
+ if (glyph->u.notes.glyph_type == G_PODATUS && glyph->next
+ && glyph->next->type == GRE_SPACE
+ && glyph->next->u.misc.unpitched.info.space == SP_ZERO_WIDTH
+ && current_note->next && glyph->next->next
+ && glyph->next->next->type == GRE_GLYPH
+ && glyph->next->next->u.notes.first_note
+ && (glyph->next->next->u.notes.first_note->u.note.pitch -
+ current_note->u.note.pitch > 1)) {
+ fprintf(f, "\\GrePunctumMora{%d}{1}{%d}{%d}%%\n", pitch_value(pitch),
+ special_punctum, punctum_inclinatum);
+ return;
+ }
+ /* if there is a punctum or a auctum dumplex on a note after, we put a
+ * zero-width punctum */
+ tmpnote = current_note->next;
+ while (tmpnote) {
+ if (tmpnote->signs == _PUNCTUM_MORA || tmpnote->signs == _AUCTUM_DUPLEX
+ || tmpnote->signs == _V_EPISEMA_PUNCTUM_MORA
+ || tmpnote->signs == _V_EPISEMA_AUCTUM_DUPLEX
+ || tmpnote->choral_sign) {
+ no_space = 1;
+ break;
+ }
+ tmpnote = tmpnote->next;
+ }
+ /* use a special no-space punctum mora for ascending fusion */
+ if (fuse_to_next_note) {
+ no_space = 1;
+ if (fuse_to_next_note > 0) {
+ special_punctum = 1;
+ }
+ }
+
+ /* the normal operation */
+ fprintf(f, "\\GrePunctumMora{%d}{%d}{%d}{%d}%%\n", pitch_value(pitch),
+ no_space, special_punctum, punctum_inclinatum);
+}
+
+static __inline int get_punctum_inclinatum_space_case(
+ const gregorio_note *const note)
+{
+ char temp;
+
+ switch (note->u.note.shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ if (note->previous) {
+ /* means that it is not the first note of the puncta inclinata
+ * sequence */
+ temp = note->previous->u.note.pitch - note->u.note.pitch;
+ /* negative values = ascending ambitus */
+ /* not sure we ever need to consider a larger ambitus here */
+ switch (temp) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ return 25;
+ case -1:
+ default:
+ return 12;
+ case -2:
+ return 14;
+ case -3:
+ case -4:
+ return 15;
+ }
+ }
+ break;
+ case S_PUNCTUM_INCLINATUM_STANS:
+ if (note->previous) {
+ /* means that it is not the first note of the puncta inclinata
+ * sequence */
+ return 26;
+ }
+ break;
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ if (note->previous) {
+ /* means that it is not the first note of the puncta inclinata
+ * sequence */
+ temp = note->previous->u.note.pitch - note->u.note.pitch;
+ /* negative values = ascending ambitus */
+ /* not sure we ever need to consider a larger ambitus here */
+ switch (temp) {
+ case 1:
+ default:
+ return 3;
+ case 2:
+ return 10;
+ case 3:
+ case 4:
+ return 11;
+ case -1:
+ case -2:
+ case -3:
+ case -4:
+ return 24;
+ }
+ }
+ break;
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ if (note->previous) {
+ /* means that it is not the first note of the puncta inclinata
+ * sequence */
+ temp = note->previous->u.note.pitch - note->u.note.pitch;
+ if (temp < -2) {
+ return 15;
+ } else if (temp > 2) {
+ return 11;
+ } else {
+ if (note->previous
+ && note->previous->u.note.shape ==
+ S_PUNCTUM_INCLINATUM_DEMINUTUS) {
+ if (temp < -1) {
+ /* really if the ambitus = 3rd at this point */
+ return 14;
+ } else if (temp > 1) {
+ /* really if the ambitus = 3rd at this point */
+ return 10;
+ } else {
+ /* temp == 0, so there is no ascending case */
+ return 8;
+ }
+ } else {
+ if (temp < 0) {
+ /* puncta inclinatum followed by puncta inclinatum
+ * debilis */
+ return 13;
+ } else if (temp > 0) {
+ /* puncta inclinatum followed by puncta inclinatum
+ * debilis */
+ return 7;
+ }
+ }
+ }
+ } /* LCOV_EXCL_LINE */
+ break;
+ case S_PUNCTUM_INCLINATUM_AUCTUS:
+ if (note->previous) {
+ /* means that it is not the first note of the puncta inclinata
+ * sequence */
+ temp = note->previous->u.note.pitch - note->u.note.pitch;
+ if (temp < -1 || temp > 1) {
+ /* this is the normal interglyph space, so we'll use it for
+ * either direction */
+ return 1;
+ } else {
+ /* temp == 0, so there is no ascending case */
+ /* we approximate that it is the same space */
+ return 3;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ return -1;
+}
+
+static __inline int get_punctum_inclinatum_to_nobar_space_case(
+ const gregorio_glyph *const glyph)
+{
+ if (glyph->u.notes.glyph_type <= G_PUNCTA_INCLINATA) {
+ const gregorio_glyph *next = gregorio_next_non_texverb_glyph(glyph);
+ if (next && next->type == GRE_GLYPH
+ && (next->u.notes.glyph_type == G_PUNCTUM
+ || (next->u.notes.glyph_type == G_FLEXA
+ && !next->u.notes.fuse_to_next_glyph))) {
+ int descent;
+ const gregorio_note *note = gregorio_glyph_last_note(glyph);
+ descent = note->u.note.pitch -
+ glyph->next->u.notes.first_note->u.note.pitch;
+ /* a negative descent is an ascent */
+ switch(descent) {
+ case -1:
+ return 19;
+ case 1:
+ return 16;
+ case -2:
+ return 20;
+ case 2:
+ return 17;
+ case -3:
+ case -4:
+ return 21;
+ case 3:
+ case 4:
+ return 18;
+ }
+ }
+ }
+
+ return -1;
+}
+
+static __inline void write_single_hepisema(FILE *const f, int hepisema_case,
+ const gregorio_note *const note, gregorio_sign_orientation orientation,
+ bool connect, char height, const grehepisema_size size, const int i,
+ const gregorio_glyph *const glyph,
+ const int porrectus_long_episema_index,
+ bool (*const is_episema_shown)(const gregorio_note *))
+{
+ if (height) {
+ const gregorio_hepisema_adjustment *adj =
+ gregorio_get_hepisema_adjustment(
+ note->he_adjustment_index[orientation]);
+ char ambitus = 0;
+ char size_arg;
+
+ switch (size) {
+ case H_SMALL_LEFT:
+ size_arg = 'l';
+ connect = false;
+ break;
+ case H_SMALL_CENTRE:
+ size_arg = 'c';
+ connect = false;
+ break;
+ case H_SMALL_RIGHT:
+ size_arg = 'r';
+ break;
+ default:
+ size_arg = 'f';
+ break;
+ }
+
+ if (i == porrectus_long_episema_index && note->next
+ && is_episema_shown(note->next)) {
+ ambitus = compute_ambitus(note);
+ }
+
+ if (i - 1 != porrectus_long_episema_index || !note->previous
+ || !is_episema_shown(note->previous)) {
+ if (connect) {
+ const gregorio_glyph *next;
+ if (!note->next
+ && (!(next = gregorio_next_non_texverb_glyph(glyph))
+ || next->type != GRE_SPACE
+ || next->u.misc.unpitched.info.space
+ != SP_ZERO_WIDTH)) {
+ /* not followed by a zero-width space */
+ /* try to fuse from punctum inclinatum to nobar glyph */
+ fprintf(f,
+ "\\GreHEpisemaBridge{%d}{%d}{%d}{%s%s}{%s}{%d}%%\n",
+ pitch_value(height), hepisema_case,
+ get_punctum_inclinatum_to_nobar_space_case(glyph),
+ suppose_high_ledger_line(note),
+ suppose_low_ledger_line(note),
+ adj->nudge? adj->nudge : "", adj->vbasepos);
+ } else if (note->next
+ && (note->next->u.note.shape
+ == S_PUNCTUM_INCLINATUM_ASCENDENS
+ || note->next->u.note.shape
+ == S_PUNCTUM_INCLINATUM_DESCENDENS
+ || note->next->u.note.shape
+ == S_PUNCTUM_INCLINATUM_DEMINUTUS
+ || note->next->u.note.shape
+ == S_PUNCTUM_INCLINATUM_AUCTUS)) {
+ /* is a punctum inclinatum of some sort */
+ fprintf(f, "\\GreHEpisemaBridge{%d}{%d}{%d}{%s%s}{%s}{%d}%%\n",
+ pitch_value(height), hepisema_case,
+ get_punctum_inclinatum_space_case(note->next),
+ suppose_high_ledger_line(note),
+ suppose_low_ledger_line(note),
+ adj->nudge? adj->nudge : "", adj->vbasepos);
+ }
+ }
+ fprintf(f, "\\GreHEpisema{%d}{\\GreOCase%s}{%d}{%d}{%c}{%d}"
+ "{%s%s}{%s}{%d}%%\n", pitch_value(height),
+ note->gtex_offset_case, ambitus, hepisema_case, size_arg,
+ pitch_value(height), suppose_high_ledger_line(note),
+ suppose_low_ledger_line(note), adj->nudge? adj->nudge : "",
+ adj->vbasepos);
+ }
+ }
+}
+
+/**
+ * @brief A function that writes the good \c \\hepisema in GregorioTeX.
+ * @param i The position of the note in the glyph.
+ */
+static void gregoriotex_write_hepisema(FILE *const f,
+ const gregorio_note *const note, const int i, const gtex_type type,
+ const gregorio_glyph *const glyph)
+{
+ int porrectus_long_episema_index = -1;
+
+ gregorio_assert(note, gregoriotex_write_hepisema,
+ "called with NULL pointer", return);
+
+ switch (type) {
+ case T_PORRECTUS:
+ case T_PORRECTUS_FLEXUS:
+ porrectus_long_episema_index = 1;
+ break;
+ case T_TORCULUS_RESUPINUS:
+ case T_TORCULUS_RESUPINUS_FLEXUS:
+ porrectus_long_episema_index = 2;
+ break;
+ default:
+ /* do nothing */
+ break;
+ }
+
+ write_single_hepisema(f, 1, note, SO_UNDER, note->h_episema_below_connect,
+ note->h_episema_below, note->h_episema_below_size, i, glyph,
+ porrectus_long_episema_index, &gtex_is_h_episema_below_shown);
+ write_single_hepisema(f, 0, note, SO_OVER, note->h_episema_above_connect,
+ note->h_episema_above, note->h_episema_above_size, i, glyph,
+ porrectus_long_episema_index, &gtex_is_h_episema_above_shown);
+}
+
+/* a macro to write an additional line */
+
+static void write_additional_line(FILE *f, int i, gtex_type type, bool bottom,
+ const gregorio_note *current_note, const gregorio_score *const score)
+{
+ char ambitus = 0;
+ gregorio_assert(current_note, write_additional_line, "called with no note",
+ return);
+ /* patch to get a line under the full glyph in the case of dbc (for
+ * example) */
+ switch (type) {
+ case T_PORRECTUS:
+ case T_PORRECTUS_FLEXUS:
+ switch (i) {
+ case 1:
+ i = HEPISEMA_FIRST_TWO;
+ break;
+ case 2:
+ if (current_note->previous->u.note.pitch > LOW_LEDGER_LINE_PITCH
+ && current_note->previous->u.note.pitch
+ < score->high_ledger_line_pitch) {
+ i = HEPISEMA_FIRST_TWO;
+ /* HEPISEMA_FIRST_TWO works only for first note */
+ current_note = current_note->previous;
+ } else {
+ return;
+ }
+ break;
+ case 3:
+ if (bottom || current_note->previous->u.note.pitch
+ >= score->high_ledger_line_pitch) {
+ /* we don't need to add twice the same line */
+ return;
+ }
+ break;
+ }
+ break;
+ case T_TORCULUS_RESUPINUS:
+ case T_TORCULUS_RESUPINUS_FLEXUS:
+ switch (i) {
+ case 2:
+ i = HEPISEMA_FIRST_TWO;
+ break;
+ case 3:
+ if (current_note->previous->u.note.pitch > LOW_LEDGER_LINE_PITCH
+ && current_note->previous->u.note.pitch
+ < score->high_ledger_line_pitch) {
+ i = HEPISEMA_FIRST_TWO;
+ /* HEPISEMA_FIRST_TWO works only for first note */
+ current_note = current_note->previous;
+ } else {
+ return;
+ }
+ break;
+ case 4:
+ if (bottom || current_note->previous->u.note.pitch
+ >= score->high_ledger_line_pitch) {
+ /* we don't need to add twice the same line */
+ return;
+ }
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (i == HEPISEMA_FIRST_TWO) {
+ /* here we must compare the first note of the big bar with the second
+ * one, but it may be tricky sometimes, because of the previous patch */
+ gregorio_assert_only(!current_note->previous ||
+ current_note->u.note.pitch
+ > current_note->previous->u.note.pitch,
+ write_additional_line, "HEPISEMA_FIRST_TWO on the wrong note");
+ ambitus = current_note->u.note.pitch - current_note->next->u.note.pitch;
+ }
+ fprintf(f, "\\GreAdditionalLine{\\GreOCase%s}{%d}{%d}%%\n",
+ current_note->gtex_offset_case, ambitus, bottom ? 3 : 2);
+}
+
+/*
+ *
+ * a function that writes the good value of \vepisema in GregorioTeX. i is the
+ * position of the note in the glyph
+ *
+ */
+
+static void write_vepisema(FILE *f, const gregorio_note *const note)
+{
+ fprintf(f, "\\GreVEpisema{%d}{\\GreOCase%s}%%\n",
+ pitch_value(note->v_episema_height), note->gtex_offset_case);
+}
+
+/*
+ * a function that writes the rare signs in GregorioTeX. i is the position of
+ * the note in the glyph */
+
+static void write_rare_sign(FILE *f, const gregorio_note *const current_note,
+ const gregorio_sign rare)
+{
+ switch (rare) {
+ case _ACCENTUS:
+ fprintf(f, "\\GreAccentus{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _ACCENTUS_REVERSUS:
+ fprintf(f, "\\GreReversedAccentus{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _CIRCULUS:
+ fprintf(f, "\\GreCirculus{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _SEMI_CIRCULUS:
+ fprintf(f, "\\GreSemicirculus{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _SEMI_CIRCULUS_REVERSUS:
+ fprintf(f, "\\GreReversedSemicirculus{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _MUSICA_FICTA_FLAT:
+ fprintf(f, "\\GreMusicaFictaFlat{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _MUSICA_FICTA_NATURAL:
+ fprintf(f, "\\GreMusicaFictaNatural{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _MUSICA_FICTA_SHARP:
+ fprintf(f, "\\GreMusicaFictaSharp{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ /* the cases of the bar signs are dealt in another function
+ * (write_bar) */
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ assert(false);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static __inline const char *alteration_name(
+ const gregorio_shape next_note_alteration)
+{
+ switch (next_note_alteration) {
+ case S_FLAT:
+ return "Flat";
+ case S_SHARP:
+ return "Sharp";
+ case S_NATURAL:
+ return "Natural";
+ default:
+ return "";
+ }
+}
+
+static const char *next_custos(const signed char next_note_pitch,
+ const gregorio_shape next_note_alteration,
+ gregoriotex_status *const status)
+{
+ static char buf[50];
+
+ gregorio_snprintf(buf, sizeof buf, "%s\\GreNextCustos{%d}{%s}",
+ status->suppressed_custos? "\\GreResetEolCustos" : "",
+ pitch_value(next_note_pitch),
+ alteration_name(next_note_alteration));
+
+ status->suppressed_custos = false;
+
+ return buf;
+}
+
+/*
+ * function used when the glyph is only one note long
+ */
+
+static void write_note(FILE *f, gregorio_note *note,
+ const gregorio_glyph *glyph, const char next_note_pitch,
+ const gregorio_shape next_note_alteration,
+ gregoriotex_status *const status)
+{
+ unsigned int initial_shape = note->u.note.shape;
+ const char *shape;
+ int space_case;
+ static char cpbuf[96];
+ /* type in the sense of GregorioTeX alignment type */
+ gtex_alignment type = AT_ONE_NOTE;
+ gregorio_assert(note, write_note, "called with NULL pointer",
+ return);
+ if (note->u.note.shape == S_PUNCTUM) {
+ switch (note->u.note.liquescentia) {
+ case L_AUCTUS_ASCENDENS:
+ note->u.note.shape = S_PUNCTUM_AUCTUS_ASCENDENS;
+ break;
+ case L_AUCTUS_DESCENDENS:
+ note->u.note.shape = S_PUNCTUM_AUCTUS_DESCENDENS;
+ break;
+ case L_INITIO_DEBILIS:
+ if (glyph->u.notes.fuse_to_next_glyph > 0) {
+ break;
+ }
+ /* else fall through to next case */
+ case L_DEMINUTUS:
+ /* this is a currenly unused, but we keep it as a fallback case */
+ /* LCOV_EXCL_START */
+ note->u.note.shape = S_PUNCTUM_DEMINUTUS;
+ break;
+ /* LCOV_EXCL_STOP */
+ default:
+ break;
+ }
+ }
+ shape = determine_note_glyph_name(note, glyph, &type);
+ note->u.note.shape = initial_shape;
+ /* special things for puncta inclinata */
+ space_case = get_punctum_inclinatum_space_case(note);
+ if (space_case >= 0) {
+ fprintf(f, "\\GreEndOfGlyph{%d}%%\n", space_case);
+ }
+
+ switch (note->u.note.shape) {
+ case S_FLAT:
+ fprintf(f, "\\GreFlat{%d}{0}", pitch_value(note->u.note.pitch));
+ break;
+ case S_NATURAL:
+ fprintf(f, "\\GreNatural{%d}{0}", pitch_value(note->u.note.pitch));
+ break;
+ case S_SHARP:
+ fprintf(f, "\\GreSharp{%d}{0}", pitch_value(note->u.note.pitch));
+ break;
+ default:
+ fprintf(f, "\\GreGlyph{%s}{%d}{%s}{%d}",
+ code_point(shape, glyph->u.notes.is_cavum, cpbuf, sizeof cpbuf),
+ pitch_value(note->u.note.pitch),
+ next_custos(next_note_pitch, next_note_alteration, status),
+ type);
+ break;
+ }
+}
+
+static int gregoriotex_syllable_first_type(gregorio_syllable *syllable)
+{
+ int result = 0;
+ gtex_alignment type = AT_ONE_NOTE;
+ gtex_type gtype = T_ONE_NOTE;
+ /* alteration says if there is a flat or a natural first in the next
+ * syllable, see gregoriotex.tex for more details */
+ int alteration = 0;
+ gregorio_glyph *glyph;
+ gregorio_element *element;
+ gregorio_assert(syllable && syllable->elements,
+ gregoriotex_syllable_first_type, "called with a NULL argument",
+ return 0);
+ for (element = syllable->elements[0]; element; element = element->next) {
+ if (element->type == GRE_BAR) {
+ switch (element->u.misc.unpitched.info.bar) {
+ case B_NO_BAR:
+ case B_VIRGULA:
+ case B_VIRGULA_HIGH:
+ result = 10;
+ break;
+ case B_DIVISIO_MINIMIS:
+ case B_DIVISIO_MINIMIS_HIGH:
+ case B_DIVISIO_MINIMA:
+ case B_DIVISIO_MINIMA_HIGH:
+ result = 11;
+ break;
+ case B_DIVISIO_MINOR:
+ result = 12;
+ break;
+ case B_DIVISIO_MAIOR:
+ case B_DIVISIO_MAIOR_DOTTED:
+ result = 13;
+ break;
+ case B_DIVISIO_MINOR_D1:
+ case B_DIVISIO_MINOR_D2:
+ case B_DIVISIO_MINOR_D3:
+ case B_DIVISIO_MINOR_D4:
+ case B_DIVISIO_MINOR_D5:
+ case B_DIVISIO_MINOR_D6:
+ case B_DIVISIO_MINOR_D7:
+ case B_DIVISIO_MINOR_D8:
+ result = 14;
+ break;
+ case B_DIVISIO_FINALIS:
+ result = 15;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregoriotex_syllable_first_type, "invalid bar");
+ result = 0;
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ return result;
+ }
+ if (element->type == GRE_ELEMENT && element->u.first_glyph) {
+ for (glyph = element->u.first_glyph; glyph; glyph = glyph->next) {
+ if (glyph->type == GRE_GLYPH && glyph->u.notes.first_note) {
+ switch (glyph->u.notes.glyph_type) {
+ case G_ALTERATION:
+ if (alteration == 0) {
+ switch (glyph->u.notes.first_note->u.note.shape) {
+ case S_FLAT:
+ alteration = 20;
+ break;
+ case S_NATURAL:
+ alteration = 40;
+ break;
+ case S_SHARP:
+ alteration = 60;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregoriotex_syllable_first_type,
+ "invalid alteration");
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ }
+ continue;
+ case G_PUNCTA_INCLINATA:
+ case G_2_PUNCTA_INCLINATA_DESCENDENS:
+ case G_3_PUNCTA_INCLINATA_DESCENDENS:
+ case G_4_PUNCTA_INCLINATA_DESCENDENS:
+ case G_5_PUNCTA_INCLINATA_DESCENDENS:
+ case G_2_PUNCTA_INCLINATA_ASCENDENS:
+ case G_3_PUNCTA_INCLINATA_ASCENDENS:
+ case G_4_PUNCTA_INCLINATA_ASCENDENS:
+ case G_5_PUNCTA_INCLINATA_ASCENDENS:
+ case G_PUNCTUM:
+ case G_STROPHA:
+ case G_VIRGA:
+ case G_VIRGA_REVERSA:
+ case G_STROPHA_AUCTA:
+ case G_DISTROPHA:
+ case G_DISTROPHA_AUCTA:
+ case G_TRISTROPHA:
+ case G_TRISTROPHA_AUCTA:
+ case G_BIVIRGA:
+ case G_TRIVIRGA:
+ determine_note_glyph_name
+ (glyph->u.notes.first_note, glyph, &type);
+ break;
+ default:
+ gregoriotex_determine_glyph_name(glyph, &type, &gtype);
+ break;
+ }
+ return type + alteration;
+ }
+ }
+ }
+ }
+ if (syllable->elements[0]) {
+ /* if there is anything else in the next syllable */
+ return 0;
+ }
+ /* the only thing that should reach this point is an empty next syllable
+ * we treat that kind of syllable as a bar */
+ return 16;
+}
+
+static __inline void write_low_choral_sign(FILE *const f,
+ const gregorio_note *const note, int special)
+{
+ if (note->choral_sign_is_nabc) {
+ fprintf(f, "\\GreLowChoralSign{%d}{\\GreNABCChar{",
+ pitch_value(note->u.note.pitch));
+ tex_escape_text(f, note->choral_sign);
+ fprintf(f, "}}{%d}%%\n", special);
+ } else {
+ fprintf(f, "\\GreLowChoralSign{%d}{%s}{%d}%%\n",
+ pitch_value(note->u.note.pitch), note->choral_sign,
+ special);
+ }
+}
+
+static __inline void write_high_choral_sign(FILE *const f,
+ const gregorio_note *const note, int pitch_offset)
+{
+ if (note->choral_sign_is_nabc) {
+ fprintf(f, "\\GreHighChoralSign{%d}{\\GreNABCChar{",
+ pitch_value(note->u.note.pitch + pitch_offset));
+ tex_escape_text(f, note->choral_sign);
+ fprintf(f, "}}{\\GreOCase%s}%%\n", note->gtex_offset_case);
+ } else {
+ fprintf(f, "\\GreHighChoralSign{%d}{%s}{\\GreOCase%s}%%\n",
+ pitch_value(note->u.note.pitch + pitch_offset),
+ note->choral_sign, note->gtex_offset_case);
+ }
+}
+
+static void write_choral_sign(FILE *f, const gregorio_glyph *glyph,
+ const gregorio_note *current_note, bool low)
+{
+ bool kind_of_pes;
+ /* false in the normal case (sign above the note), true in the case of it's
+ * next to the note (same height as a punctum) */
+ bool low_sign = choral_sign_here_is_low(glyph, current_note, &kind_of_pes);
+
+ /* the low choral signs must be typeset after the punctum, whereas the high
+ * must be typeset before the h episema */
+ if ((low_sign && !low) || (!low_sign && low)) {
+ return;
+ }
+
+ if (low_sign) {
+ /* very approximative heuristic, some things may have to be adapted
+ * here... */
+ if (is_on_a_line(current_note->u.note.pitch)) {
+ if (kind_of_pes && current_note->u.note.pitch -
+ current_note->next->u.note.pitch == -1) {
+ write_low_choral_sign(f, current_note, 1);
+ return;
+ }
+ if (current_note->previous
+ && (current_note->previous->signs == _PUNCTUM_MORA
+ || current_note->previous->signs ==
+ _V_EPISEMA_PUNCTUM_MORA)) {
+ write_low_choral_sign(f, current_note, 1);
+ return;
+ }
+ }
+
+ write_low_choral_sign(f, current_note, 0);
+ } else {
+ /* let's cheat a little */
+ if (is_on_a_line(current_note->u.note.pitch)) {
+ write_high_choral_sign(f, current_note, 0);
+ } else {
+ write_high_choral_sign(f, current_note, 2);
+ }
+ }
+}
+
+/*
+ *
+ * A function that write the signs of a glyph, which has the type type (T_*,
+ * not G_*, which is in the glyph->glyph_type), and (important), we start only
+ * at the note current_note. It is due to the way we call it : if type is
+ * T_ONE_NOTE, we just do the signs on current_note, not all. This is the case
+ * for example for the first note of the torculus resupinus, or the
+ * G_*_PUNCTA_INCLINATA.
+ *
+ */
+
+/* small helper */
+static __inline bool _found(FILE *const f, const bool found)
+{
+ if (!found) {
+ fprintf (f, "%%\n");\
+ return true;
+ }
+ return found;
+}
+
+static void compute_height_extrema(const gregorio_glyph *const glyph,
+ const gregorio_note *note, signed char *const top_height,
+ signed char *const bottom_height)
+{
+ char height;
+ /* get the minima/maxima pitches */
+ for (; note; note = note->next) {
+ if (note->h_episema_above) {
+ height = note->h_episema_above;
+ } else {
+ if (note->v_episema_height && note->v_episema_height
+ > note->u.note.pitch) {
+ height = note->v_episema_height;
+ } else {
+ height = note->u.note.pitch;
+ }
+
+ if (note->choral_sign
+ && !choral_sign_here_is_low(glyph, note, NULL)) {
+ ++height;
+ }
+ }
+ if (*top_height == UNDETERMINED_HEIGHT || height > *top_height) {
+ *top_height = height;
+ }
+
+ if (note->h_episema_below) {
+ height = note->h_episema_below;
+ } else if (note->v_episema_height && note->v_episema_height
+ < note->u.note.pitch) {
+ height = note->v_episema_height;
+ } else {
+ height = note->u.note.pitch;
+
+ /* no vertical episema, so we need to check for a stem */
+ gregorio_assert(glyph->type == GRE_GLYPH, compute_height_extrema,
+ "glyph->type must be GRE_GLYPH here", return);
+ switch (glyph->u.notes.glyph_type) {
+ case G_BIVIRGA:
+ case G_TRIVIRGA:
+ case G_VIRGA:
+ case G_VIRGA_REVERSA:
+ --height;
+ break;
+
+ case G_PUNCTUM:
+ switch (note->u.note.shape) {
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ --height;
+ break;
+
+ default:
+ /* default to avoid the warning */
+ break;
+ }
+ break;
+
+ default:
+ /* default to avoid the warning */
+
+ /* other shapes like the porrectus have stems, but the height
+ * computation will cover other notes in the shape, negating
+ * the need to account for the stem on the shape */
+ break;
+ }
+ }
+
+ if (*bottom_height == UNDETERMINED_HEIGHT || height < *bottom_height) {
+ *bottom_height = height;
+ }
+ }
+}
+
+static void compute_element_height_extrema(
+ const gregorio_element *const element, signed char *const top_height,
+ signed char *const bottom_height)
+{
+ const gregorio_glyph *glyph;
+ gregorio_not_null(element, compute_element_height_extrema, return);
+ if (element->type != GRE_ELEMENT) {
+ return;
+ }
+ /* get the minima/maxima pitches */
+ for (glyph = element->u.first_glyph; glyph; glyph = glyph->next) {
+ if (glyph->type == GRE_GLYPH) {
+ compute_height_extrema(glyph, glyph->u.notes.first_note,
+ top_height, bottom_height);
+ }
+ }
+}
+
+static __inline void fixup_height_extrema(signed char *const top_height,
+ signed char *const bottom_height)
+{
+ if (*top_height == UNDETERMINED_HEIGHT) {
+ *top_height = 9; /* 'g' */
+ }
+ if (*bottom_height == UNDETERMINED_HEIGHT) {
+ *bottom_height = 9; /* 'g' */
+ }
+}
+
+static __inline bool is_ledger_drawn(const bool setting,
+ const gregorio_ledger_specificity specificity)
+{
+ return ((specificity & LEDGER_DRAWN) && setting);
+}
+
+static void write_signs(FILE *f, gtex_type type,
+ const gregorio_glyph *glyph, const gregorio_note *note,
+ int fuse_to_next_note, gregoriotex_status *const status,
+ const gregorio_score *const score)
+{
+ /* i is the number of the note for which we are typesetting the sign. */
+ int i;
+ const gregorio_note *current_note;
+ signed char high_pitch = UNDETERMINED_HEIGHT;
+ signed char low_pitch = UNDETERMINED_HEIGHT;
+ bool found = false;
+ compute_height_extrema(glyph, note, &high_pitch, &low_pitch);
+ fixup_height_extrema(&high_pitch, &low_pitch);
+ fprintf(f, "%%\n{%%\n\\GreGlyphHeights{%d}{%d}%%\n",
+ pitch_value(high_pitch), pitch_value(low_pitch));
+ for (current_note = note, i = 1; current_note;
+ current_note = current_note->next, ++i) {
+ /* we start by the additional lines */
+ if (is_ledger_drawn(current_note->low_ledger_line,
+ current_note->low_ledger_specificity)) {
+ write_additional_line(f, i, type, true, current_note, score);
+ status->bottom_line = 1;
+ }
+ if (is_ledger_drawn(current_note->high_ledger_line,
+ current_note->high_ledger_specificity)) {
+ write_additional_line(f, i, type, false, current_note, score);
+ }
+ if (current_note->texverb) {
+ fprintf(f, "%% verbatim text at note level:\n%s%%\n"
+ "%% end of verbatim text\n",
+ gregorio_texverb(current_note->texverb));
+ }
+ if (type == T_ONE_NOTE) {
+ break;
+ }
+ }
+ fprintf(f, "}{");
+ /* now a first loop for the choral signs, because high signs must be taken
+ * into account before any hepisema */
+ for (current_note = note, i = 1; current_note;
+ current_note = current_note->next, ++i) {
+ if (current_note->choral_sign) {
+ found = _found(f, found);
+ write_choral_sign(f, glyph, current_note, false);
+ }
+ if (type == T_ONE_NOTE) {
+ break;
+ }
+ }
+ /* a loop for rare signs, vertical episema, and horizontal episema */
+ for (current_note = note, i = 1; current_note;
+ current_note = current_note->next, ++i) {
+ /* we continue with the hepisema */
+ if (current_note->h_episema_above || current_note->h_episema_below) {
+ found = _found(f, found);
+ gregoriotex_write_hepisema(f, current_note, i, type, glyph);
+ }
+ /* write_rare_sign also writes the vepisema */
+ if (current_note->special_sign) {
+ found = _found(f, found);
+ write_rare_sign(f, current_note, current_note->special_sign);
+ }
+ if (current_note->signs != _NO_SIGN) {
+ found = _found(f, found);
+ }
+ switch (current_note->signs) {
+ case _V_EPISEMA:
+ case _V_EPISEMA_PUNCTUM_MORA:
+ case _V_EPISEMA_AUCTUM_DUPLEX:
+ write_vepisema(f, current_note);
+ break;
+ default:
+ /* do nothing */
+ break;
+ }
+ if (type == T_ONE_NOTE) {
+ break;
+ }
+ }
+ /* final loop for choral signs and punctum mora */
+ for (current_note = note, i = 1; current_note;
+ current_note = current_note->next, ++i) {
+ switch (current_note->signs) {
+ case _PUNCTUM_MORA:
+ case _V_EPISEMA_PUNCTUM_MORA:
+ write_punctum_mora(f, glyph, current_note, fuse_to_next_note);
+ break;
+ case _AUCTUM_DUPLEX:
+ case _V_EPISEMA_AUCTUM_DUPLEX:
+ write_auctum_duplex(f, current_note);
+ break;
+ default:
+ break;
+ }
+ if (current_note->choral_sign) {
+ found = _found(f, found);
+ write_choral_sign(f, glyph, current_note, true);
+ }
+ if (type == T_ONE_NOTE) {
+ break;
+ }
+ }
+ fprintf(f, "}{");
+ if (status->point_and_click) {
+ fprintf(f, "%u:%u:%u", note->src_line, note->src_offset,
+ note->src_column + 1);
+ }
+ fprintf(f, "}%%\n");
+}
+
+static char *determine_leading_shape(const gregorio_glyph *const glyph)
+{
+ static char buf[BUFSIZE];
+ int ambitus = compute_ambitus(glyph->u.notes.first_note);
+ const char *head, *head_liquescence;
+
+ switch (glyph->u.notes.first_note->u.note.shape) {
+ case S_QUILISMA:
+ head = "Quilisma";
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ head = "Oriscus";
+ break;
+ default:
+ head = "Punctum";
+ break;
+ }
+
+ if (glyph->u.notes.liquescentia & L_INITIO_DEBILIS) {
+ head_liquescence = "InitioDebilis";
+ } else {
+ head_liquescence = "";
+ }
+
+ gregorio_snprintf(buf, BUFSIZE, "Leading%s%s%s", head, tex_ambitus[ambitus],
+ head_liquescence);
+ return buf;
+}
+
+static __inline void write_composed_multinote_glyph(FILE *const f,
+ gregorio_note *current_note, const gregorio_glyph *glyph,
+ const signed char next_note_pitch,
+ const gregorio_shape next_note_alteration,
+ const int fuse_to_next_note, gregoriotex_status *const status,
+ const gregorio_score *const score, const char *glyph_end_between_notes)
+{
+ while (current_note) {
+ const bool has_next = current_note->next != NULL;
+ if (has_next) {
+ write_note(f, current_note, glyph, current_note->next->u.note.pitch,
+ S_UNDETERMINED, status);
+ } else {
+ write_note(f, current_note, glyph, next_note_pitch,
+ next_note_alteration, status);
+ }
+ write_signs(f, T_ONE_NOTE, glyph, current_note,
+ has_next ? 0 : fuse_to_next_note, status, score);
+ current_note = current_note->next;
+ if (current_note && glyph_end_between_notes) {
+ fputs(glyph_end_between_notes, f);
+ }
+ }
+}
+
+static void write_glyph(FILE *const f, const gregorio_syllable *const syllable,
+ const gregorio_element *const element,
+ gregorio_glyph *const glyph,
+ gregoriotex_status *const status, const gregorio_score *const score)
+{
+ static char cpbuf[96], cpbuf2[96];
+ /* type is the type of the glyph. Understand the type of the glyph for
+ * gregoriotex, for the alignement between text and notes. (AT_ONE_NOTE,
+ * etc.) */
+ gtex_alignment type = 0;
+ /* the type of the glyph, in the sense of the shape (T_PES, etc.) */
+ gtex_type gtype = 0;
+ signed char next_note_pitch = 0;
+ gregorio_note *current_note;
+ const char *leading_shape, *shape;
+ const gregorio_glyph *prev_glyph =
+ gregorio_previous_non_texverb_glyph(glyph);
+ int fuse_to_next_note, fuse_from_previous_note =
+ (prev_glyph && prev_glyph->type == GRE_GLYPH)
+ ? prev_glyph->u.notes.fuse_to_next_glyph : 0;
+ gregorio_shape next_note_alteration;
+ gregorio_assert(glyph, write_glyph, "called with NULL pointer", return);
+ gregorio_assert(glyph->type == GRE_GLYPH && glyph->u.notes.first_note,
+ write_glyph, "called with glyph without note", return);
+ fuse_to_next_note = glyph->u.notes.fuse_to_next_glyph;
+ if (fuse_from_previous_note) {
+ fprintf(f, "\\GreFuse");
+ }
+ next_note_pitch = gregorio_determine_next_pitch(syllable, element, glyph,
+ &next_note_alteration);
+ current_note = glyph->u.notes.first_note;
+ /* first we check if it is really a unique glyph in gregoriotex... the
+ * glyphs that are not a unique glyph are : trigonus and pucta inclinata
+ * in general, and torculus resupinus and torculus resupinus flexus, so
+ * we first divide the glyph into real gregoriotex glyphs */
+ switch (glyph->u.notes.glyph_type) {
+ case G_PUNCTA_INCLINATA:
+ case G_2_PUNCTA_INCLINATA_DESCENDENS:
+ case G_3_PUNCTA_INCLINATA_DESCENDENS:
+ case G_4_PUNCTA_INCLINATA_DESCENDENS:
+ case G_5_PUNCTA_INCLINATA_DESCENDENS:
+ case G_2_PUNCTA_INCLINATA_ASCENDENS:
+ case G_3_PUNCTA_INCLINATA_ASCENDENS:
+ case G_4_PUNCTA_INCLINATA_ASCENDENS:
+ case G_5_PUNCTA_INCLINATA_ASCENDENS:
+ write_composed_multinote_glyph(f, current_note, glyph,
+ next_note_pitch, next_note_alteration, fuse_to_next_note,
+ status, score, NULL);
+ break;
+ case G_SCANDICUS:
+ if ((glyph->u.notes.liquescentia & L_DEMINUTUS)
+ || glyph->u.notes.liquescentia == L_NO_LIQUESCENTIA
+ || glyph->u.notes.liquescentia == L_FUSED) {
+ shape = gregoriotex_determine_glyph_name(glyph, &type, &gtype);
+ fprintf(f, "\\GreGlyph{%s}{%d}{%s}{%d}", code_point(shape,
+ glyph->u.notes.is_cavum, cpbuf, sizeof cpbuf),
+ pitch_value(glyph->u.notes.first_note->u.note.pitch),
+ next_custos(next_note_pitch, next_note_alteration, status),
+ type);
+ write_signs(f, gtype, glyph, glyph->u.notes.first_note,
+ fuse_to_next_note, status, score);
+ } else {
+ write_composed_multinote_glyph(f, current_note, glyph,
+ next_note_pitch, next_note_alteration, fuse_to_next_note,
+ status, score, NULL);
+ }
+ break;
+ case G_ANCUS:
+ gregorio_assert(glyph->u.notes.liquescentia & L_DEMINUTUS,
+ write_glyph, "encountered a non-deminutus ancus", break);
+ shape = gregoriotex_determine_glyph_name(glyph, &type, &gtype);
+ fprintf(f, "\\GreGlyph{%s}{%d}{%s}{%d}", code_point(shape,
+ glyph->u.notes.is_cavum, cpbuf, sizeof cpbuf),
+ pitch_value(glyph->u.notes.first_note->u.note.pitch),
+ next_custos(next_note_pitch, next_note_alteration, status),
+ type);
+ write_signs(f, gtype, glyph, glyph->u.notes.first_note,
+ fuse_to_next_note, status, score);
+ break;
+ case G_TORCULUS_RESUPINUS_FLEXUS:
+ /* we retain this "old-style" fusion as it does look marginally better
+ * on screen */
+ leading_shape = determine_leading_shape(glyph);
+ /* trick to have the good position for these glyphs */
+ glyph->u.notes.glyph_type = G_PORRECTUS_FLEXUS_NO_BAR;
+ glyph->u.notes.first_note = current_note->next;
+ shape = gregoriotex_determine_glyph_name(glyph, &type, &gtype);
+ fprintf(f, "\\GreGlyph{\\GreFuseTwo{%s}{%s}}{%d}{%s}{%d}",
+ code_point(leading_shape, glyph->u.notes.is_cavum, cpbuf,
+ sizeof cpbuf),
+ code_point(shape, glyph->u.notes.is_cavum, cpbuf2,
+ sizeof cpbuf2),
+ pitch_value(glyph->u.notes.first_note->u.note.pitch),
+ next_custos(next_note_pitch, next_note_alteration, status),
+ type);
+ glyph->u.notes.first_note = current_note;
+ glyph->u.notes.glyph_type = G_TORCULUS_RESUPINUS_FLEXUS;
+ write_signs(f, gtype, glyph, glyph->u.notes.first_note,
+ fuse_to_next_note, status, score);
+ break;
+ case G_BIVIRGA:
+ case G_TRIVIRGA:
+ write_composed_multinote_glyph(f, current_note, glyph,
+ next_note_pitch, next_note_alteration, fuse_to_next_note,
+ status, score, "\\GreEndOfGlyph{4}%%\n");
+ break;
+ case G_TRISTROPHA:
+ case G_TRISTROPHA_AUCTA:
+ case G_DISTROPHA:
+ case G_DISTROPHA_AUCTA:
+ write_composed_multinote_glyph(f, current_note, glyph,
+ next_note_pitch, next_note_alteration, fuse_to_next_note,
+ status, score, "\\GreEndOfGlyph{5}%%\n");
+ break;
+
+ case G_PUNCTUM:
+ switch (glyph->u.notes.first_note->u.note.shape) {
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_DEMINUTUS:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ /* don't change the oriscus */
+ break;
+
+ default:
+ switch (glyph->u.notes.liquescentia) {
+ case L_AUCTUS_ASCENDENS:
+ glyph->u.notes.first_note->u.note.shape =
+ S_PUNCTUM_AUCTUS_ASCENDENS;
+ break;
+ case L_AUCTUS_DESCENDENS:
+ glyph->u.notes.first_note->u.note.shape =
+ S_PUNCTUM_AUCTUS_DESCENDENS;
+ break;
+ case L_INITIO_DEBILIS:
+ if (glyph->u.notes.fuse_to_next_glyph > 0) {
+ break;
+ }
+ /* else fall through to next case */
+ case L_DEMINUTUS:
+ glyph->u.notes.first_note->u.note.shape = S_PUNCTUM_DEMINUTUS;
+ default:
+ break;
+ }
+ break;
+ }
+
+ /* fall into the next case */
+ case G_PUNCTUM_INCLINATUM:
+ case G_VIRGA:
+ case G_VIRGA_REVERSA:
+ case G_STROPHA:
+ case G_STROPHA_AUCTA:
+ case G_ALTERATION:
+ write_note(f, glyph->u.notes.first_note, glyph, next_note_pitch,
+ next_note_alteration, status);
+ write_signs(f, T_ONE_NOTE, glyph, current_note, fuse_to_next_note,
+ status, score);
+ break;
+ default:
+ /* we retain this "old-style" fusion as it does look marginally better
+ * on screen */
+ /* special case of the torculus resupinus which first note is not a
+ * punctum */
+ if (glyph->u.notes.glyph_type == G_TORCULUS_RESUPINUS
+ && current_note->u.note.shape != S_PUNCTUM
+ && current_note->u.note.shape != S_QUILISMA) {
+ leading_shape = determine_leading_shape(glyph);
+ /* trick to have the good position for these glyphs */
+ glyph->u.notes.glyph_type = G_PORRECTUS_NO_BAR;
+ glyph->u.notes.first_note = current_note->next;
+ shape = gregoriotex_determine_glyph_name(glyph, &type, &gtype);
+ fprintf(f, "\\GreGlyph{\\GreFuseTwo{%s}{%s}}{%d}{%s}{%d}",
+ code_point(leading_shape, glyph->u.notes.is_cavum, cpbuf,
+ sizeof cpbuf),
+ code_point(shape, glyph->u.notes.is_cavum, cpbuf2,
+ sizeof cpbuf2),
+ pitch_value(glyph->u.notes.first_note->u.note.pitch),
+ next_custos(next_note_pitch, next_note_alteration, status),
+ type);
+ glyph->u.notes.first_note = current_note;
+ glyph->u.notes.glyph_type = G_TORCULUS_RESUPINUS;
+ write_signs(f, gtype, glyph, glyph->u.notes.first_note,
+ fuse_to_next_note, status, score);
+ break;
+ } else {
+ shape = gregoriotex_determine_glyph_name(glyph, &type, &gtype);
+ fprintf(f, "\\GreGlyph{%s}{%d}{%s}{%d}", code_point(shape,
+ glyph->u.notes.is_cavum, cpbuf, sizeof cpbuf),
+ pitch_value(glyph->u.notes.first_note->u.note.pitch),
+ next_custos(next_note_pitch, next_note_alteration, status),
+ type);
+ write_signs(f, gtype, glyph, glyph->u.notes.first_note,
+ fuse_to_next_note, status, score);
+ break;
+ }
+ }
+}
+
+static __inline unsigned int glyph_note_units(const gregorio_glyph *glyph)
+{
+ unsigned int count = 0;
+ const gregorio_note *note;
+ if (glyph->u.notes.glyph_type != G_ALTERATION) {
+ for (note = glyph->u.notes.first_note; note; note = note->next) {
+ ++count;
+ }
+ }
+ return count;
+}
+
+/* here we absolutely need to pass the syllable as an argument, because we
+ * will need the next note, that may be contained in the next syllable */
+
+static unsigned int write_element(FILE *const f,
+ const gregorio_syllable *const syllable,
+ const gregorio_element *const element,
+ gregoriotex_status *const status,
+ const gregorio_score *const score)
+{
+ unsigned int note_unit_count = 0;
+ if (element->type == GRE_ELEMENT) {
+ gregorio_glyph *glyph;
+ for (glyph = element->u.first_glyph; glyph; glyph = glyph->next) {
+ switch (glyph->type) {
+ case GRE_SPACE:
+ switch (glyph->u.misc.unpitched.info.space) {
+ case SP_ZERO_WIDTH:
+ fprintf(f, "\\GreEndOfGlyph{1}%%\n");
+ break;
+ case SP_HALF_SPACE:
+ fprintf(f, "\\GreEndOfGlyph{22}%%\n");
+ break;
+ case SP_INTERGLYPH_SPACE:
+ fprintf(f, "\\GreEndOfGlyph{0}%%\n");
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(write_element,
+ "encountered an unexpected glyph-level space");
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+
+ case GRE_TEXVERB_GLYPH:
+ if (glyph->texverb) {
+ fprintf(f, "%% verbatim text at glyph level:\n%s%%\n"
+ "%% end of verbatim text\n",
+ gregorio_texverb(glyph->texverb));
+ }
+ break;
+
+ default:
+ /* at this point glyph->type is GRE_GLYPH */
+ assert(glyph->type == GRE_GLYPH);
+ write_glyph(f, syllable, element, glyph, status, score);
+ note_unit_count += glyph_note_units(glyph);
+ if (glyph->next && glyph->next->type == GRE_GLYPH &&
+ glyph->next->u.notes.glyph_type != G_ALTERATION) {
+ if (is_fused(glyph->next->u.notes.liquescentia)) {
+ int space_case =
+ get_punctum_inclinatum_to_nobar_space_case(glyph);
+ if (space_case >= 0) {
+ /* fuse from punctum inclinatum to nobar glyph */
+ fprintf(f, "\\GreEndOfGlyph{%d}%%\n", space_case);
+ } else {
+ fprintf(f, "\\GreEndOfGlyph{1}%%\n");
+ }
+ } else if (is_puncta_inclinata(
+ glyph->next->u.notes.glyph_type)
+ || glyph->next->u.notes.glyph_type
+ == G_PUNCTA_INCLINATA) {
+ if ((is_puncta_inclinata(glyph->u.notes.glyph_type)
+ || glyph->u.notes.glyph_type
+ == G_PUNCTA_INCLINATA)
+ && glyph->next->u.notes.first_note->u.note.pitch
+ == gregorio_glyph_last_note(glyph)->u.note.pitch) {
+ /* special case for unison puncta inclinata */
+ fprintf(f, "\\GreEndOfGlyph{23}%%\n");
+ } else {
+ fprintf(f, "\\GreEndOfGlyph{9}%%\n");
+ }
+ } else if (glyph->u.notes.glyph_type != G_ALTERATION
+ || !glyph->next) {
+ fprintf(f, "\\GreEndOfGlyph{0}%%\n");
+ }
+ }
+ break;
+ }
+ }
+ }
+ return note_unit_count;
+}
+
+static void write_fixed_text_styles(FILE *f, gregorio_character *syllable_text,
+ gregorio_character *next_syllable_text)
+{
+ if (syllable_text) {
+ gregoriotex_ignore_style = gregoriotex_fix_style(syllable_text);
+ if (gregoriotex_ignore_style) {
+ fprintf(f, "\\GreSetFixedTextFormat{%d}",
+ gregoriotex_internal_style_to_gregoriotex
+ (gregoriotex_ignore_style));
+ }
+ }
+ if (next_syllable_text) {
+ gregoriotex_next_ignore_style = gregoriotex_fix_style(
+ next_syllable_text);
+ if (gregoriotex_next_ignore_style) {
+ fprintf(f, "\\GreSetFixedNextTextFormat{%d}",
+ gregoriotex_internal_style_to_gregoriotex
+ (gregoriotex_next_ignore_style));
+ }
+ }
+}
+
+static void write_text(FILE *const f, const gregorio_character *const text)
+{
+ if (text == NULL) {
+ fprintf(f, "{}{}{}{}{}");
+ return;
+ }
+ fprintf(f, "{");
+ gregorio_write_text(WTP_NORMAL, text, f, &gtex_write_verb,
+ &gtex_print_char, &gtex_write_begin, &gtex_write_end,
+ &gtex_write_special_char);
+ fprintf(f, "}{");
+ gregorio_write_first_letter_alignment_text(WTP_NORMAL, text,
+ f, &gtex_write_verb, &gtex_print_char, &gtex_write_begin,
+ &gtex_write_end, &gtex_write_special_char);
+ gregoriotex_ignore_style = gregoriotex_next_ignore_style;
+ gregoriotex_next_ignore_style = ST_NO_STYLE;
+ fprintf(f, "}");
+}
+
+/*
+ * Function printing the line clef change (only updating \localleftbox, not
+ * printing the key). Useful for \GreDiscretionary.
+ * TODO: I'm not sure about the third argument, but that's how it's called in
+ * \GreChangeClef.
+ */
+static void gregoriotex_print_change_line_clef(FILE *f,
+ const gregorio_element *const current_element)
+{
+ if (current_element->type == GRE_CLEF) {
+ /* the third argument is 0 or 1 according to the need for a space
+ * before the clef */
+ fprintf(f, "\\GreSetLinesClef{%c}{%d}{1}{%d}{%c}{%d}{%d}%%\n",
+ gregorio_clef_to_char(current_element->u.misc.clef.clef),
+ current_element->u.misc.clef.line,
+ clef_flat_height(current_element->u.misc.clef.clef,
+ current_element->u.misc.clef.line,
+ current_element->u.misc.clef.flatted),
+ gregorio_clef_to_char(
+ current_element->u.misc.clef.secondary_clef),
+ current_element->u.misc.clef.secondary_line,
+ clef_flat_height(current_element->u.misc.clef.secondary_clef,
+ current_element->u.misc.clef.secondary_line,
+ current_element->u.misc.clef.secondary_flatted));
+ }
+}
+
+static __inline bool next_is_bar(const gregorio_syllable *syllable,
+ const gregorio_element *element)
+{
+ bool got_custos = false;
+ if (element) {
+ element = element->next;
+ }
+
+ while (syllable) {
+ if (element) {
+ if (element->type == GRE_BAR) {
+ return true;
+ }
+ /* allow no more than one manual custos before a bar */
+ if (got_custos || !is_manual_custos(element)) {
+ return false;
+ }
+ got_custos = true;
+ if (element->next) {
+ /* look at the next element */
+ element = element->next;
+ continue;
+ }
+ }
+
+ syllable = syllable->next_syllable;
+ if (!syllable) {
+ return false;
+ }
+
+ element = syllable->elements[0];
+ }
+
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(next_is_bar, "unexpected end of syllables/elements");
+ return false;
+ /* LCOV_EXCL_STOP */
+}
+
+static void finish_syllable(FILE *f, gregorio_syllable *syllable) {
+ /* Very last, if the syllable is the end of a no-linebreak area: */
+ if (syllable->no_linebreak_area == NLBA_END) {
+ fprintf(f, "\\GreEndNLBArea{%d}{0}%%\n",
+ next_is_bar(syllable, NULL)? 3 : 1);
+ }
+ if (syllable->euouae == EUOUAE_END) {
+ fprintf(f, "\\GreEndEUOUAE{%d}%%\n",
+ next_is_bar(syllable, NULL)? 3 : 1);
+ }
+}
+
+static void handle_final_bar(FILE *f, const char *type, gregorio_syllable *syllable)
+{
+ gregorio_element *element;
+ fprintf(f, "\\GreFinal%s{%%\n", type);
+ /* first element will be the bar, which we just handled, so skip it */
+ for (element = (*syllable->elements)->next; element;
+ element = element->next) {
+ switch (element->type) {
+ case GRE_TEXVERB_ELEMENT:
+ if (element->texverb) {
+ fprintf(f, "%% verbatim text at element level:\n%s%%\n"
+ "%% end of verbatim text\n",
+ gregorio_texverb(element->texverb));
+ }
+ break;
+
+ case GRE_CUSTOS:
+ assert(element->u.misc.pitched.force_pitch);
+ fprintf(f, "\\GreFinalCustos{%d}{}%%\n",
+ pitch_value(element->u.misc.pitched.pitch));
+ break;
+
+ case GRE_END_OF_LINE:
+ fprintf(f, "\\GreFinalNewLine%%\n");
+ break;
+
+ default:
+ /* do nothing */
+ break;
+ }
+ }
+ fprintf(f, "}%%\n");
+ finish_syllable(f, syllable);
+}
+
+static __inline void write_syllable_point_and_click(FILE *const f,
+ const gregorio_syllable *const syllable,
+ const gregoriotex_status *const status)
+{
+ if (status->point_and_click && syllable->src_line) {
+ fprintf(f, "%u:%u:%u", syllable->src_line, syllable->src_offset,
+ syllable->src_column + 1);
+ }
+}
+
+static void write_syllable_text(FILE *f, const char *const syllable_type,
+ const gregorio_syllable *const syllable,
+ const bool ignored __attribute__((unused)))
+{
+ if (syllable_type != NULL) {
+ fprintf(f, "%s{%s%s\\GreSetThisSyllable", syllable_type,
+ syllable->clear? "\\GreClearSyllableText" : "",
+ syllable->forced_center? "\\GreGABCForceCenters" : "");
+ write_text(f, syllable->text);
+ fprintf(f, "}");
+ }
+}
+
+static void write_first_syllable_text(FILE *f, const char *const syllable_type,
+ const gregorio_syllable *const syllable,
+ const bool end_of_word)
+{
+ const gregorio_character *const text = syllable->text;
+ gregorio_not_null(syllable_type, write_first_syllable_text, return);
+ if (text == NULL) {
+ fprintf(f, "}{%s}{\\GreSetNoFirstSyllableText}", syllable_type);
+ } else {
+ gregorio_character *text_with_initial = gregorio_clone_characters(text),
+ *text_without_initial = gregorio_clone_characters(text);
+ const gregorio_character *t;
+
+ /* find out if there is a forced center -> has_forced_center */
+ gregorio_center_determination center = syllable->forced_center?
+ CENTER_FULLY_DETERMINED : CENTER_NOT_DETERMINED;
+
+ gregorio_rebuild_first_syllable(&text_with_initial, false);
+ gregorio_rebuild_characters(&text_with_initial, center, false);
+ gregorio_set_first_word(&text_with_initial);
+
+ gregorio_rebuild_first_syllable(&text_without_initial, true);
+ gregorio_rebuild_characters(&text_without_initial, center, true);
+ gregorio_set_first_word(&text_without_initial);
+
+ fprintf(f, "}{%s}{%s%s\\GreSetFirstSyllableText", syllable_type,
+ syllable->clear? "\\GreClearSyllableText" : "",
+ syllable->forced_center? "\\GreGABCForceCenters" : "");
+
+ fprintf(f, "{");
+ gregorio_write_first_letter_alignment_text(WTP_FIRST_SYLLABLE,
+ text_with_initial, f, &gtex_write_verb, &gtex_print_char,
+ &gtex_write_begin, &gtex_write_end, &gtex_write_special_char);
+ fprintf(f, "}{{");
+ gregorio_write_text(WTP_FIRST_SYLLABLE, text_without_initial, f,
+ &gtex_write_verb, &gtex_print_char, &gtex_write_begin,
+ &gtex_write_end, &gtex_write_special_char);
+ fprintf(f, "}}{{");
+ gregorio_write_text(WTP_NORMAL, text_with_initial, f, &gtex_write_verb,
+ &gtex_print_char, &gtex_write_begin, &gtex_write_end,
+ &gtex_write_special_char);
+ gregoriotex_ignore_style = gregoriotex_next_ignore_style;
+ gregoriotex_next_ignore_style = ST_NO_STYLE;
+ fprintf(f, "}}");
+
+ /* Check to see if we need to force a hyphen (empty first syllable) */
+ for (t = text_without_initial; t; t = t->next_character) {
+ if (t->is_character) {
+ break;
+ } else if (t->cos.s.type == ST_T_BEGIN) {
+ if (t->cos.s.style == ST_VERBATIM ||
+ t->cos.s.style == ST_SPECIAL_CHAR) {
+ break;
+ } else if (t->cos.s.style == ST_INITIAL) {
+ for (; t; t = t->next_character) {
+ if (!t->is_character && t->cos.s.type == ST_T_END
+ && t->cos.s.style == ST_INITIAL) {
+ break;
+ }
+ }
+ if (!t) break;
+ }
+ }
+ }
+ if (t || end_of_word) {
+ fprintf(f, "{}");
+ } else {
+ fprintf(f, "{\\GreEmptyFirstSyllableHyphen}");
+ }
+
+ fprintf(f, "}");
+
+ gregorio_free_characters(text_with_initial);
+ gregorio_free_characters(text_without_initial);
+ }
+}
+
+static __inline void scan_syllable_for_eol(
+ const gregorio_syllable *const syllable, char *const eol_forces_custos)
+{
+ const gregorio_element *element;
+ if (syllable->elements) {
+ for (element = *(syllable->elements); element; element = element->next) {
+ if (element->type == GRE_END_OF_LINE) {
+ if (element->u.misc.unpitched.info.eol_forces_custos) {
+ *eol_forces_custos = element->u.misc.unpitched.info
+ .eol_forces_custos_on? '1' : '0';
+ }
+ }
+ }
+ }
+}
+
+/*
+ * euouae_follows will be
+ * - '\0' if no euouae follows
+ * - '0' if euouae follows with no intervening linebreak
+ * - '1' if euouae follows with an intervening linebreak
+ *
+ * eol_forces_custos will be
+ * - '\0' if no linebreak follows or doesn't force a custos
+ * - '0' if a linebreak follows and forces custos off
+ * - '1' if a linebreak follows and forces custos on
+ */
+static __inline void anticipate_event(gregorio_syllable *syllable,
+ char *const euouae_follows, char *const eol_forces_custos,
+ unsigned short *const next_euouae_id)
+{
+ bool has_intervening_linebreak = false;
+
+ *euouae_follows = '\0';
+ *eol_forces_custos = '\0';
+ *next_euouae_id = 0;
+
+ if (syllable->next_syllable) {
+ for (syllable = syllable->next_syllable;
+ syllable && syllable->elements && *(syllable->elements)
+ && (*(syllable->elements))->type == GRE_END_OF_LINE;
+ syllable = syllable->next_syllable) {
+ has_intervening_linebreak = true;
+ /* we are at an end-of-line, so check if custos is forced */
+ scan_syllable_for_eol(syllable, eol_forces_custos);
+ }
+ if (syllable) {
+ scan_syllable_for_eol(syllable, eol_forces_custos);
+
+ if (syllable->euouae == EUOUAE_BEGINNING) {
+ *next_euouae_id = syllable->euouae_id = ++tex_position_id;
+ *euouae_follows = has_intervening_linebreak? '1' : '0';
+ }
+ }
+ }
+}
+
+static __inline void write_anticipated_event(FILE *f, const char euouae_follows,
+ const char eol_forces_custos, const short next_euouae_id)
+{
+ if (euouae_follows) {
+ fprintf(f, "%%\n\\GreNextSyllableBeginsEUOUAE{%hu}{%c}%%\n",
+ next_euouae_id, euouae_follows);
+ }
+ if (eol_forces_custos) {
+ fprintf(f, "%%\n\\GreUpcomingNewLineForcesCustos{%c}%%\n",
+ eol_forces_custos);
+ }
+}
+
+static __inline unsigned int count_note_units(const gregorio_element *element)
+{
+ unsigned int count = 0;
+ for (; element; element = element->next) {
+ if (element->type == GRE_ELEMENT) {
+ const gregorio_glyph *glyph;
+ for (glyph = element->u.first_glyph; glyph; glyph = glyph->next) {
+ if (glyph->type == GRE_GLYPH) {
+ count += glyph_note_units(glyph);
+ }
+ }
+ }
+ }
+ return count;
+}
+
+static __inline void handle_last_of_voice(FILE *const f,
+ const gregorio_syllable *syllable,
+ const gregorio_element *const element,
+ const gregorio_element *const last_of_voice)
+{
+ if (element == last_of_voice) {
+ if (syllable->next_syllable) {
+ /* check for no-element syllables that follow */
+ for (syllable = syllable->next_syllable;
+ syllable && (!syllable->elements || !*(syllable->elements));
+ syllable = syllable->next_syllable) {
+ /* just loop */
+ }
+ /* if syllable is NULL here, then all syllables that follow
+ * have no elements */
+ }
+ /* emit GreLastOfScore if we are either on the last syllable (and
+ * thus the loop above is not executed, leaving syllable at the
+ * current syllable) or if a syllable which follows the current
+ * syllable has an element of some sort (and thus the loop above
+ * stopped before running out of syllables); in any case, the check
+ * is that syllable, at this point, is not NULL */
+ if (syllable) {
+ fprintf(f, "\\GreLastOfScore");
+ }
+ }
+}
+
+static bool is_before_linebreak(const gregorio_syllable *syllable,
+ const gregorio_element *element)
+{
+ if (element) {
+ element = element->next;
+ }
+
+ while (syllable) {
+ if (element) {
+ if (element->type == GRE_END_OF_LINE) {
+ return true;
+ }
+ break;
+ }
+
+ syllable = syllable->next_syllable;
+ if (syllable) {
+ element = syllable->elements[0];
+ }
+ }
+
+ return false;
+}
+
+/*
+ * Arguments are relatively obvious. The most obscure is certainly first_of_disc
+ * which is 0 all the time, except in the case of a "clef change syllable". In
+ * this case we make a \GreDiscretionary with two arguments:
+ * 1.what should be printed if the syllable is the last of its line (which
+ * basically means everything but clefs and custos), and
+ * 2. what should be printed if it's in a middle of a line (which means
+ * everything)
+ * So the first_of_disc argument is:
+ * 0 if we don't know (general case)
+ * 1 in case of the first argument of a \GreDiscretionary
+ * 2 if we are in the second argument (necessary in order to avoid infinite loops)
+ */
+static void write_syllable(FILE *f, gregorio_syllable *syllable,
+ unsigned char first_of_disc, gregoriotex_status *const status,
+ const gregorio_score *const score,
+ const gregorio_element *const *const last_of_voice,
+ void (*const write_this_syllable_text)
+ (FILE *, const char *, const gregorio_syllable *, bool))
+{
+ const gregorio_element *clef_change_element = NULL, *element;
+ const char *syllable_type = NULL;
+ bool anticipated_event_written = false;
+ bool end_of_word;
+ bool end_of_line;
+ char euouae_follows;
+ char eol_forces_custos;
+ unsigned short next_euouae_id;
+ unsigned int note_unit_count;
+
+ gregorio_not_null(syllable, write_syllable, return);
+ end_of_word = syllable->position == WORD_END
+ || syllable->position == WORD_ONE_SYLLABLE || !syllable->text
+ || !syllable->next_syllable;
+ /* Very first: before anything, if the syllable is the beginning of a
+ * no-linebreak area: */
+ if (syllable->no_linebreak_area == NLBA_BEGINNING) {
+ fprintf(f, "\\GreBeginNLBArea{1}{0}%%\n");
+ }
+ if (syllable->euouae == EUOUAE_BEGINNING) {
+ fprintf(f, "\\GreBeginEUOUAE{%hu}%%\n", syllable->euouae_id);
+ }
+ if (syllable->elements && *(syllable->elements)) {
+ /*
+ * first we check if the syllable is only a end of line. If it is the
+ * case, we don't print anything but a comment (to be able to read it
+ * if we read GregorioTeX). The end of lines are treated separately in
+ * GregorioTeX, it is buit inside the TeX structure.
+ */
+ if ((syllable->elements)[0]->type == GRE_END_OF_LINE) {
+ gregorio_assert(syllable != score->first_syllable, write_syllable,
+ "line break is not supported on the first syllable",
+ return);
+ if ((syllable->elements)[0]->u.misc.unpitched.info.eol_ragged) {
+ fprintf(f, "%%\n%%\n\\GreNewParLine %%\n%%\n%%\n");
+ } else {
+ fprintf(f, "%%\n%%\n\\GreNewLine %%\n%%\n%%\n");
+ }
+ write_this_syllable_text(f, NULL, syllable, end_of_word);
+ return;
+ }
+ /*
+ * This case is not simple: if the syllable contains a clef change,
+ * whether it is (c4) or (::c4) or (z0::c4), we put it in a
+ * discretionary. Warning: only these three cases will have the expected
+ * effect. So first we detect it:
+ */
+ if (first_of_disc == 0) { /* to avoid infinite loops */
+ clef_change_element = gregorio_get_clef_change(syllable);
+ if (clef_change_element) {
+ gregorio_assert(syllable != score->first_syllable,
+ write_syllable,
+ "clef change is not supported on the first syllable",
+ return);
+ /*
+ * In this case, the first thing to do is to change the line clef
+ */
+ gregoriotex_print_change_line_clef(f, clef_change_element);
+ fprintf(f, "\\GreDiscretionary{0}{%%\n");
+ write_syllable(f, syllable, 1, status, score, last_of_voice,
+ write_syllable_text);
+ fprintf(f, "}{%%\n");
+ write_syllable(f, syllable, 2, status, score, last_of_voice,
+ write_syllable_text);
+ fprintf(f, "}%%\n");
+ write_this_syllable_text(f, NULL, syllable, end_of_word);
+ return;
+ }
+ }
+ write_fixed_text_styles(f, syllable->text,
+ syllable->next_syllable? syllable->next_syllable->text : NULL);
+ if ((syllable->elements)[0]->type == GRE_BAR) {
+ if (syllable != score->first_syllable) {
+ if (!syllable->next_syllable && !syllable->text
+ && (syllable->elements)[0]->u.misc.unpitched.info.bar
+ == B_DIVISIO_FINALIS) {
+ handle_final_bar(f, "DivisioFinalis", syllable);
+ write_this_syllable_text(f, NULL, syllable, end_of_word);
+ return;
+ }
+ if (!syllable->next_syllable && !syllable->text
+ && (syllable->elements)[0]->u.misc.unpitched.info.bar
+ == B_DIVISIO_MAIOR) {
+ handle_final_bar(f, "DivisioMaior", syllable);
+ write_this_syllable_text(f, NULL, syllable, end_of_word);
+ return;
+ }
+ }
+ /* the special case of first syllable will be treated as a normal
+ * bar syllable */
+ syllable_type = "\\GreBarSyllable";
+ } else {
+ if (first_of_disc != 0) {
+ syllable_type = "\\GreBarSyllable";
+ } else {
+ syllable_type = "\\GreSyllable";
+ }
+ }
+ } else {
+ write_fixed_text_styles(f, syllable->text,
+ syllable->next_syllable? syllable->next_syllable->text : NULL);
+ syllable_type = "\\GreNoNoteSyllable";
+ }
+ write_this_syllable_text(f, syllable_type, syllable, end_of_word);
+ fprintf(f, "{}{\\Gre%s}", syllable->first_word ? "FirstWord" : "Unstyled");
+ if (end_of_word) {
+ fprintf(f, "{1}");
+ } else {
+ fprintf(f, "{0}");
+ }
+ end_of_line = is_last_of_line(syllable);
+ anticipate_event(syllable, &euouae_follows, &eol_forces_custos,
+ &next_euouae_id);
+ if (syllable->next_syllable) {
+ fprintf(f, "{%s\\GreSetNextSyllable",
+ syllable->next_syllable->forced_center?
+ "\\GreGABCNextForceCenters" : "");
+ write_text(f, syllable->next_syllable->text);
+ if (end_of_line || first_of_disc == 1) {
+ fprintf(f, "\\GreLastOfLine");
+ } else if (euouae_follows) {
+ fprintf(f, "\\GreLastSyllableBeforeEUOUAE{%hu}{%c}",
+ next_euouae_id, euouae_follows);
+ }
+ fprintf(f, "}{");
+ write_syllable_point_and_click(f, syllable, status);
+ fprintf(f, "}{%d}{",
+ gregoriotex_syllable_first_type(syllable->next_syllable));
+ } else {
+ fprintf(f, "{\\GreSetNextSyllable{}{}{}{}{}");
+ if (end_of_line || first_of_disc == 1) {
+ fprintf(f, "\\GreLastOfLine");
+ }
+ fprintf(f, "}{");
+ write_syllable_point_and_click(f, syllable, status);
+ fprintf(f, "}{16}{");
+ }
+ if (syllable->translation) {
+ if (syllable->translation_type == TR_WITH_CENTER_BEGINNING) {
+ fprintf(f, "%%\n\\GreWriteTranslationWithCenterBeginning{");
+ } else {
+ fprintf(f, "%%\n\\GreWriteTranslation{");
+ }
+ write_translation(f, syllable->translation);
+ fprintf(f, "}%%\n");
+ }
+ if (syllable->translation_type) {
+ if (syllable->translation_type == TR_WITH_CENTER_END)
+ fprintf(f, "%%\n\\GreTranslationCenterEnd %%\n");
+ }
+ if (syllable->abovelinestext) {
+ fprintf(f, "%%\n\\GreSetTextAboveLines{%s}%%\n",
+ syllable->abovelinestext);
+ }
+ fprintf(f, "}{%%\n");
+
+ fprintf(f, "\\GreSyllableNoteCount{%u}%%\n", syllable->elements?
+ count_note_units(*syllable->elements) : 0);
+
+ note_unit_count = 0;
+ if (syllable->elements) {
+ for (element = *syllable->elements; element; element = element->next) {
+ if (element->nabc_lines && element->nabc) {
+ signed char high_pitch = UNDETERMINED_HEIGHT;
+ signed char low_pitch = UNDETERMINED_HEIGHT;
+ size_t i;
+ compute_element_height_extrema(element, &high_pitch,
+ &low_pitch);
+ fixup_height_extrema(&high_pitch, &low_pitch);
+ for (i = 0; i < element->nabc_lines; i++) {
+ if (element->nabc[i]) {
+ fprintf(f, "\\GreNABCNeumes{%d}{", (int)(i+1));
+ tex_escape_text(f, element->nabc[i]);
+ fprintf(f, "}{%d}{%d}%%\n", pitch_value(high_pitch),
+ pitch_value(low_pitch));
+ }
+ }
+ }
+ switch (element->type) {
+ case GRE_SPACE:
+ switch (element->u.misc.unpitched.info.space) {
+ case SP_LARGER_SPACE:
+ fprintf(f, "\\GreEndOfElement{1}{0}{%u}%%\n",
+ note_unit_count);
+ break;
+ case SP_GLYPH_SPACE:
+ fprintf(f, "\\GreEndOfElement{2}{0}{%u}%%\n",
+ note_unit_count);
+ break;
+ case SP_NEUMATIC_CUT:
+ fprintf(f, "\\GreEndOfElement{0}{0}{%u}%%\n",
+ note_unit_count);
+ break;
+ case SP_AD_HOC_SPACE:
+ fprintf(f, "\\GreAdHocSpaceEndOfElement{%s}{0}{%u}%%\n",
+ element->u.misc.unpitched.info.ad_hoc_space_factor,
+ note_unit_count);
+ break;
+ case SP_GLYPH_SPACE_NB:
+ fprintf(f, "\\GreEndOfElement{2}{1}{%u}%%\n",
+ note_unit_count);
+ break;
+ case SP_LARGER_SPACE_NB:
+ fprintf(f, "\\GreEndOfElement{1}{1}{%u}%%\n",
+ note_unit_count);
+ break;
+ case SP_NEUMATIC_CUT_NB:
+ fprintf(f, "\\GreEndOfElement{0}{1}{%u}%%\n",
+ note_unit_count);
+ break;
+ case SP_AD_HOC_SPACE_NB:
+ fprintf(f, "\\GreAdHocSpaceEndOfElement{%s}{1}{%u}%%\n",
+ element->u.misc.unpitched.info.ad_hoc_space_factor,
+ note_unit_count);
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(write_syllable,
+ "encountered an unexpected element-level space");
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+
+ case GRE_TEXVERB_ELEMENT:
+ if (element->texverb) {
+ fprintf(f, "%% verbatim text at element level:\n%s%%\n"
+ "%% end of verbatim text\n",
+ gregorio_texverb(element->texverb));
+ }
+ break;
+
+ case GRE_NLBA:
+ if (element->u.misc.unpitched.info.nlba == NLBA_BEGINNING) {
+ fprintf(f, "\\GreBeginNLBArea{0}{0}%%\n");
+ } else {
+ fprintf(f, "\\GreEndNLBArea{%d}{0}%%\n",
+ next_is_bar(syllable, element)? 3 : 0);
+ }
+ break;
+
+ case GRE_ALT:
+ if (element->texverb) {
+ fprintf(f, "\\GreSetTextAboveLines{%s}%%\n",
+ gregorio_texverb(element->texverb));
+ }
+ break;
+
+ case GRE_CLEF:
+ /* We don't print clef changes at the end of a line */
+ if (first_of_disc != 1) {
+ if (is_before_linebreak(syllable, element)) {
+ signed char next_note_pitch;
+ gregorio_shape next_note_alteration;
+
+ next_note_pitch = gregorio_adjust_pitch_into_staff(
+ score, gregorio_determine_next_pitch(
+ syllable, element, NULL, &next_note_alteration)
+ - element->u.misc.clef.pitch_difference);
+
+ fputs(next_custos(next_note_pitch, next_note_alteration,
+ status), f);
+ gregoriotex_print_change_line_clef(f, element);
+ } else {
+ /* the third argument is 0 or 1 according to the need
+ * for a space before the clef */
+ fprintf(f, "\\GreChangeClef{%c}{%d}{%c}{%d}{%c}{%d}{%d}%%\n",
+ gregorio_clef_to_char(element->u.misc.clef.clef),
+ element->u.misc.clef.line,
+ (!element->previous || element->previous->type
+ == GRE_BAR)? '0' : '1',
+ clef_flat_height(element->u.misc.clef.clef,
+ element->u.misc.clef.line,
+ element->u.misc.clef.flatted),
+ gregorio_clef_to_char(
+ element->u.misc.clef.secondary_clef),
+ element->u.misc.clef.secondary_line,
+ clef_flat_height(
+ element->u.misc.clef.secondary_clef,
+ element->u.misc.clef.secondary_line,
+ element->u.misc.clef.secondary_flatted));
+ }
+ }
+ break;
+
+ case GRE_CUSTOS:
+ if (first_of_disc != 1) {
+ signed char next_note_pitch;
+ gregorio_shape next_note_alteration;
+ const char *alteration = "";
+ /* We don't print custos before a bar at the end of a line.
+ * We also print an unbreakable larger space before the
+ * custos */
+ handle_last_of_voice(f, syllable, element, *last_of_voice);
+ next_note_pitch = gregorio_determine_next_pitch(syllable,
+ element, NULL, &next_note_alteration);
+ if (!element->u.misc.pitched.force_pitch) {
+ alteration = alteration_name(next_note_alteration);
+ }
+ fprintf(f, "\\GreCustos{%d}{%s}%s%%\n",
+ pitch_value(element->u.misc.pitched.pitch), alteration,
+ next_custos(next_note_pitch, next_note_alteration,
+ status));
+ ++note_unit_count;
+ }
+ break;
+
+ case GRE_SUPPRESS_CUSTOS:
+ handle_last_of_voice(f, syllable, element, *last_of_voice);
+ fprintf(f, "\\GreSuppressEolCustos %%\n");
+ status->suppressed_custos = true;
+ break;
+
+ case GRE_BAR:
+ handle_last_of_voice(f, syllable, element, *last_of_voice);
+ write_bar(f, score, syllable, element, first_of_disc);
+ break;
+
+ case GRE_END_OF_LINE:
+ if (!element->next) {
+ write_anticipated_event(f, euouae_follows,
+ eol_forces_custos, next_euouae_id);
+ anticipated_event_written = true;
+ }
+ /* here we suppose we don't have two linebreaks in the same
+ * syllable */
+ if (element->u.misc.unpitched.info.eol_ragged) {
+ fprintf(f, "%%\n%%\n\\GreNewParLine %%\n%%\n%%\n");
+ } else {
+ fprintf(f, "%%\n%%\n\\GreNewLine %%\n%%\n%%\n");
+ }
+ break;
+
+ default:
+ /* here current_element->type is GRE_ELEMENT */
+ assert(element->type == GRE_ELEMENT);
+ handle_last_of_voice(f, syllable, element, *last_of_voice);
+ note_unit_count += write_element(f, syllable, element, status,
+ score);
+ if (element->next && (element->next->type == GRE_ELEMENT
+ || (element->next->next
+ && element->next->type == GRE_ALT
+ && element->next->next->type ==
+ GRE_ELEMENT))) {
+ fprintf(f, "\\GreEndOfElement{0}{0}{%u}%%\n",
+ note_unit_count);
+ }
+ break;
+ }
+ }
+ }
+ if (!anticipated_event_written) {
+ write_anticipated_event(f, euouae_follows, eol_forces_custos,
+ next_euouae_id);
+ }
+ fprintf(f, "}%%\n");
+ if (syllable->position == WORD_END
+ || syllable->position == WORD_ONE_SYLLABLE || !syllable->text) {
+ fprintf(f, "%%\n");
+ }
+ finish_syllable(f, syllable);
+}
+
+static char *digest_to_hex(const unsigned char digest[SHA1_DIGEST_SIZE])
+{
+ static const char *const hex = "0123456789abcdef";
+ static char result[41];
+
+ char *p = result;
+ unsigned char byte;
+
+ int i;
+ for (i = 0; i < SHA1_DIGEST_SIZE; ++i) {
+ byte = digest[i];
+
+ *(p++) = hex[(byte >> 4) & 0x0FU];
+ *(p++) = hex[byte & 0x0FU];
+ }
+
+ *p = '\0';
+
+ return result;
+}
+
+static void initialize_score(gregoriotex_status *const status,
+ gregorio_score *score, const bool point_and_click,
+ const gregorio_element **const last_of_voice)
+{
+ gregorio_syllable *syllable;
+
+ status->bottom_line = false;
+ status->top_height = status->bottom_height = UNDETERMINED_HEIGHT;
+ status->abovelinestext = status->translation = false;
+ status->suppressed_custos = false;
+
+ /* first pass to compute positioning */
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ int voice;
+
+ for (voice = 0; voice < score->number_of_voices; ++voice) {
+ gregoriotex_compute_positioning(syllable->elements[voice], score);
+ }
+ }
+
+ gregoriotex_compute_cross_syllable_positioning(score);
+
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ int voice;
+
+ if (syllable->translation) {
+ status->translation = true;
+ }
+
+ if (syllable->abovelinestext) {
+ status->abovelinestext = true;
+ }
+
+ /* simultaneously compute height extrema and determine the last "real"
+ * element in each voice */
+ for (voice = 0; voice < score->number_of_voices; ++voice) {
+ gregorio_element *element;
+
+ for (element = syllable->elements[voice]; element;
+ element = element->next) {
+ gregorio_glyph *glyph;
+
+ switch (element->type) {
+ case GRE_ALT:
+ status->abovelinestext = true;
+ break;
+
+ case GRE_CUSTOS:
+ last_of_voice[voice] = element;
+ break;
+
+ case GRE_ELEMENT:
+ for (glyph = element->u.first_glyph; glyph;
+ glyph = glyph->next) {
+ if (glyph->type == GRE_GLYPH) {
+ last_of_voice[voice] = element;
+ compute_height_extrema(glyph,
+ glyph->u.notes.first_note,
+ &(status->top_height),
+ &(status->bottom_height));
+ }
+ }
+ break;
+
+ case GRE_BAR:
+ last_of_voice[voice] = element;
+ break;
+
+ default:
+ /* to eliminate the warning */
+ break;
+ }
+ }
+ }
+ }
+
+ fixup_height_extrema(&(status->top_height), &(status->bottom_height));
+
+ status->point_and_click = point_and_click;
+}
+
+static void write_header(FILE *const f, const char *const name,
+ const char *const value)
+{
+ if (value) {
+ fprintf(f, "\\GreHeader{");
+ tex_escape_text(f, name);
+ fprintf(f, "}{");
+ tex_escape_text(f, value);
+ fprintf(f, "}%%\n");
+ }
+}
+
+static void write_headers(FILE *const f, gregorio_score *const score)
+{
+ gregorio_header *header;
+
+ fprintf(f, "\\GreBeginHeaders %%\n");
+ for (header = score->headers; header; header = header->next) {
+ write_header(f, header->name, header->value);
+ }
+ fprintf(f, "\\GreEndHeaders %%\n");
+}
+
+static void suppress_expansion(FILE *const f, const char *text)
+{
+ if (!text) {
+ return;
+ }
+
+ for (; *text; ++text) {
+ if (*text == '\\') {
+ fprintf(f, "\\noexpand");
+ }
+ fputc(*text, f);
+ }
+}
+
+static int first_note_near_clef(const gregorio_score *const score) {
+ gregorio_clef_info clef = gregorio_default_clef;
+ if (score->first_voice_info) {
+ clef = score->first_voice_info->initial_clef;
+ if (!clef.secondary_line && !clef.flatted && score->first_syllable
+ && score->first_syllable->elements) {
+ const gregorio_element *element = score->first_syllable->elements[0];
+ if (element && element->type == GRE_ELEMENT) {
+ const gregorio_glyph *glyph = element->u.first_glyph;
+ if (glyph && glyph->type == GRE_GLYPH) {
+ const signed char clef_pitch = LOW_LINE_PITCH
+ + ((clef.line - 1) * 2);
+ const gregorio_note *low_note = glyph->u.notes.first_note;
+ const gregorio_note *high_note = low_note;
+ switch (glyph->u.notes.glyph_type) {
+ case G_PODATUS:
+ /* next note is above the previous */
+ if (low_note->next) {
+ high_note = low_note->next;
+ }
+ break;
+ case G_FLEXA:
+ case G_PORRECTUS:
+ case G_PORRECTUS_FLEXUS:
+ /* there is a stem the size of the ambitus */
+ if (high_note->next) {
+ low_note = high_note->next;
+ }
+ break;
+ default:
+ /* to prevent the enum warning */
+ break;
+ }
+ if (high_note->u.note.pitch < clef_pitch - 3
+ || low_note->u.note.pitch > clef_pitch + 3) {
+ return 0;
+ }
+ }
+ }
+ }
+ }
+ return 1;
+}
+
+static int clef_size(const gregorio_clef_info *const clef)
+{
+ /* this is a heuristic clef size approximation:
+ * C-clef = 1
+ * F-clef = 2
+ * flatted = +2
+ * unstacked double-clef = +1 (plus the clef size)
+ */
+ /* purposely making line signed */
+ int line_diff = clef->line - clef->secondary_line;
+ int size;
+ if (clef->clef == CLEF_F) {
+ size = 2;
+ } else {
+ size = 1;
+ }
+ if (clef->flatted) {
+ size += 2;
+ }
+ if (clef->secondary_line) {
+ if (line_diff < -1 || line_diff > 1) { /* stacked */
+ int secondary_size;
+ if (clef->secondary_clef == CLEF_F) {
+ secondary_size = 2;
+ } else {
+ secondary_size = 1;
+ }
+ if (clef->secondary_flatted) {
+ secondary_size += 2;
+ }
+ if (secondary_size > size) {
+ size = secondary_size;
+ }
+ } else { /* unstacked */
+ size += 1;
+ if (clef->secondary_clef == CLEF_F) {
+ size += 2;
+ } else {
+ size += 1;
+ }
+ if (clef->secondary_flatted) {
+ size += 2;
+ }
+ }
+ }
+ return size;
+}
+
+static void write_largest_clef(FILE *const f, gregorio_score *const score)
+{
+ const gregorio_syllable *syllable;
+ const gregorio_element *element;
+ gregorio_clef_info clef = gregorio_default_clef;
+ int size;
+
+ if (score->first_voice_info) {
+ clef = score->first_voice_info->initial_clef;
+ }
+ size = clef_size(&clef);
+
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ if (syllable->elements) {
+ for (element = *syllable->elements; element;
+ element = element->next) {
+ if (element->type == GRE_CLEF) {
+ const int this_size = clef_size(&element->u.misc.clef);
+ if (this_size > size) {
+ clef = element->u.misc.clef;
+ size = this_size;
+ }
+ }
+ }
+ }
+ }
+
+ fprintf(f, "\\GreSetLargestClef{%c}{%d}{%d}{%c}{%d}{%d}%%\n",
+ gregorio_clef_to_char(clef.clef), clef.line,
+ clef_flat_height(clef.clef, clef.line, clef.flatted),
+ gregorio_clef_to_char(clef.secondary_clef), clef.secondary_line,
+ clef_flat_height(clef.secondary_clef, clef.secondary_line,
+ clef.secondary_flatted));
+}
+
+void gregoriotex_write_score(FILE *const f, gregorio_score *const score,
+ const char *const point_and_click_filename)
+{
+ gregorio_clef_info clef = gregorio_default_clef;
+ gregorio_syllable *current_syllable;
+ int annotation_num;
+ gregoriotex_status status;
+ const gregorio_element *last_of_voice[MAX_NUMBER_OF_VOICES];
+
+ memset(last_of_voice, 0, sizeof last_of_voice);
+ initialize_score(&status, score, point_and_click_filename != NULL,
+ last_of_voice);
+
+ gregorio_assert(f, gregoriotex_write_score, "call with NULL file", return);
+
+ gregorio_assert_only(score->number_of_voices == 1, gregoriotex_write_score,
+ "gregoriotex only works in monophony (for the moment)");
+
+ fprintf(f, "%% File generated by gregorio %s\n", GREGORIO_VERSION);
+ fprintf(f, "\\GregorioTeXAPIVersion{%s}%%\n", VERSION);
+
+ if (score->name) {
+ fprintf(f, "%% Name: %s\n", score->name);
+ }
+ if (score->author) {
+ fprintf(f, "%% Author: %s\n", score->author);
+ }
+ if (score->gabc_copyright) {
+ fprintf(f, "%% The copyright of this gabc is: %s\n",
+ score->gabc_copyright);
+ }
+ if (score->score_copyright) {
+ fprintf(f, "%% The copyright of the score is: %s\n",
+ score->score_copyright);
+ }
+
+ write_headers(f, score);
+
+ if (score->first_voice_info) {
+ clef = score->first_voice_info->initial_clef;
+ }
+ fprintf(f, "\\GreBeginScore{%s}{%d}{%d}{%d}{%d}{%s}{%u}"
+ "{\\GreInitialClefPosition{%d}{%d}}%%\n",
+ digest_to_hex(score->digest), status.top_height,
+ status.bottom_height, bool_to_int(status.translation),
+ bool_to_int(status.abovelinestext),
+ point_and_click_filename? point_and_click_filename : "",
+ score->staff_lines, clef.line, clef.secondary_line);
+ if (score->nabc_lines) {
+ fprintf(f, "\\GreScoreNABCLines{%d}", (int)score->nabc_lines);
+ }
+ if (score->annotation[0]) {
+ fprintf(f, "\\GreAnnotationLines");
+ for (annotation_num = 0; annotation_num < MAX_ANNOTATIONS;
+ ++annotation_num) {
+ if (score->annotation[annotation_num]) {
+ fprintf(f, "{%s}",
+ score->annotation[annotation_num]);
+ }
+ else {
+ fprintf(f, "{}");
+ }
+ }
+ fprintf(f, "%%\n");
+ }
+ if (score->mode) {
+ fprintf(f, "\\GreMode{");
+ if (*(score->mode) >= '1' && *(score->mode) <= '8') {
+ fprintf(f, "\\GreModeNumber{%c}%s", *(score->mode), score->mode + 1);
+ } else {
+ fprintf(f, "%s", score->mode);
+ }
+ fprintf(f, "}{");
+ suppress_expansion(f, score->mode_modifier);
+ fprintf(f, "}{");
+ suppress_expansion(f, score->mode_differentia);
+ fprintf(f, "}%%\n");
+ }
+
+ write_largest_clef(f, score);
+ fprintf(f, "\\GreScoreOpening{%%\n"); /* GreScoreOpening#1 */
+ if (score->first_voice_info) {
+ gregoriotex_write_voice_info(f, score->first_voice_info);
+ }
+ fprintf(f, "}{%%\n"); /* GreScoreOpening#2 */
+ fprintf(f, "\\GreSetInitialClef{%c}{%d}{%d}{%c}{%d}{%d}{%d}%%\n",
+ gregorio_clef_to_char(clef.clef), clef.line,
+ clef_flat_height(clef.clef, clef.line, clef.flatted),
+ gregorio_clef_to_char(clef.secondary_clef), clef.secondary_line,
+ clef_flat_height(clef.secondary_clef, clef.secondary_line,
+ clef.secondary_flatted),
+ first_note_near_clef(score));
+ fprintf(f, "}{%%\n"); /* GreScoreOpening#3 */
+ current_syllable = score->first_syllable;
+ if (current_syllable) {
+ write_syllable(f, current_syllable, 0, &status, score, last_of_voice,
+ write_first_syllable_text);
+ current_syllable = current_syllable->next_syllable;
+ } else {
+ /* edge case: a score with no syllables */
+ fprintf(f, "}{}{\\GreSetNoFirstSyllableText}%%\n");
+ }
+ while (current_syllable) {
+ write_syllable(f, current_syllable, 0, &status, score, last_of_voice,
+ write_syllable_text);
+ current_syllable = current_syllable->next_syllable;
+ }
+ fprintf(f, "\\GreEndScore %%\n\\endinput %%\n");
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex.h b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex.h
new file mode 100644
index 00000000000..dc662b25ffe
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex.h
@@ -0,0 +1,151 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes GregorioTeX writing data structures and entry points.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GREGORIOTEX_H
+#define GREGORIOTEX_H
+
+#include "bool.h"
+
+#define OFFSET_CASE(name) static const char *const name = #name
+
+/*
+ * Here are the different types, they must be the same as in squarize.py
+ */
+
+typedef enum gtex_type {
+ T_ONE_NOTE = 1,
+ /* two note neumes */
+ T_PES,
+ T_PES_QUADRATUM,
+ T_QUILISMA_PES,
+ T_PES_QUASSUS,
+ T_QUILISMA_PES_QUADRATUM,
+ T_FLEXUS,
+ T_FLEXUS_ORISCUS,
+ T_FLEXUS_ORISCUS_SCAPUS,
+ T_PES_ORISCUS,
+ /* three note neumes */
+ T_PORRECTUS,
+ T_TORCULUS,
+ T_TORCULUS_QUILISMA,
+ T_SCANDICUS, /* only deminutus */
+ T_ANCUS, /* only deminutus */
+ T_SALICUS,
+ /* four note neumes */
+ T_SALICUS_FLEXUS,
+ T_PORRECTUS_FLEXUS,
+ T_TORCULUS_RESUPINUS,
+ T_TORCULUS_LIQUESCENS,
+ T_TORCULUS_RESUPINUS_FLEXUS
+} gtex_type;
+
+/* the different types for the alignment of the notes in GregorioTeX
+ * these values are numbers coded into GregorioTeX */
+typedef enum gtex_alignment {
+ AT_ONE_NOTE = 0,
+ AT_FLEXUS = 1,
+ AT_PORRECTUS = 2,
+ AT_INITIO_DEBILIS = 3,
+ AT_QUILISMA = 4,
+ AT_ORISCUS = 5,
+ AT_PUNCTUM_INCLINATUM = 6,
+ AT_STROPHA = 7,
+ AT_FLEXUS_1 = 8,
+ AT_FLEXUS_DEMINUTUS = 9
+} gtex_alignment;
+
+/* Here we define a function that will determine the number of the
+ * liquescentia that we will add to the glyph number. There are several types
+ * as all glyphs can't have all liquescentiae. Let's first define the
+ * different types: */
+
+typedef enum gtex_glyph_liquescentia {
+ LG_ALL = 0, /* for glyphs that accept all liquecentiae */
+ LG_NO_INITIO, /* for glyphs that don't accept initio debilis */
+ LG_NONE, /* for glyphs that don't accept liquescentia */
+ LG_ONLY_DEMINUTUS,
+ LG_FUSIBLE_INITIO
+} gtex_glyph_liquescentia;
+
+typedef enum gtex_sign_type {
+ ST_H_EPISEMA = 0,
+ ST_V_EPISEMA = 1
+} gtex_sign_type;
+
+#define HEPISEMA_FIRST_TWO 12
+
+static __inline bool choral_sign_here_is_low(const gregorio_glyph *const glyph,
+ const gregorio_note *const note, bool *const kind_of_pes)
+{
+ if (kind_of_pes) {
+ *kind_of_pes = false;
+ }
+
+ switch (glyph->u.notes.glyph_type) {
+ case G_FLEXA:
+ case G_TORCULUS:
+ case G_TORCULUS_LIQUESCENS:
+ case G_TORCULUS_RESUPINUS_FLEXUS:
+ case G_PORRECTUS_FLEXUS:
+ if (!note->next) {
+ return true;
+ }
+ break;
+
+ case G_PODATUS:
+ case G_PORRECTUS:
+ case G_TORCULUS_RESUPINUS:
+ if (!note->next || note->next->next) {
+ break;
+ }
+ if (kind_of_pes) {
+ *kind_of_pes = true;
+ }
+ return true;
+
+ default:
+ break;
+ }
+
+ return false;
+}
+
+static __inline bool is_on_a_line(const char pitch)
+{
+ return pitch % 2 == 0;
+}
+
+static __inline bool is_between_lines(const char pitch)
+{
+ return pitch % 2 == 1;
+}
+
+bool gtex_is_h_episema_above_shown(const gregorio_note *const note);
+bool gtex_is_h_episema_below_shown(const gregorio_note *const note);
+const char *gregoriotex_determine_glyph_name(const gregorio_glyph *const glyph,
+ gtex_alignment *const type, gtex_type *const gtype);
+void gregoriotex_compute_positioning(const gregorio_element *element,
+ const gregorio_score *score);
+void gregoriotex_compute_cross_syllable_positioning(
+ const gregorio_score *score);
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/messages.c b/Build/source/texk/gregorio/gregorio-src/src/messages.c
new file mode 100644
index 00000000000..d8b7cecab53
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/messages.c
@@ -0,0 +1,172 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file contains functions for logging messages, warnings, and errors.
+ *
+ * Copyright (C) 2009-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <assert.h>
+#include <stdarg.h>
+#include "bool.h"
+#include "messages.h"
+#include "support.h"
+
+static FILE *error_out;
+static gregorio_verbosity verbosity_mode = 0;
+static bool debug_messages = false;
+static bool deprecation_is_warning = true;
+static int return_value = 0;
+
+int gregorio_get_return_value(void)
+{
+ return return_value;
+}
+
+void gregorio_set_error_out(FILE *const f)
+{
+ error_out = f;
+}
+
+void gregorio_set_verbosity_mode(const gregorio_verbosity verbosity)
+{
+ verbosity_mode = verbosity;
+}
+
+void gregorio_set_debug_messages(bool debug)
+{
+ debug_messages = debug;
+}
+
+void gregorio_set_deprecation_errors(bool deprecation_errors)
+{
+ deprecation_is_warning = !deprecation_errors;
+}
+
+static const char *verbosity_to_str(const gregorio_verbosity verbosity)
+{
+ const char *str;
+ switch (verbosity) {
+ case VERBOSITY_WARNING:
+ str = _("warning:");
+ break;
+ case VERBOSITY_DEPRECATION:
+ /* if there is no deprecation, these lines will not be hit */
+ /* LCOV_EXCL_START */
+ str = _("deprecation:");
+ break;
+ /* LCOV_EXCL_STOP */
+ case VERBOSITY_ERROR:
+ str = _("error:");
+ break;
+ case VERBOSITY_ASSERTION:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ str = _("assertion:");
+ break;
+ /* LCOV_EXCL_STOP */
+ case VERBOSITY_FATAL:
+ /* all fatal errors should not be reasonably testable */
+ /* LCOV_EXCL_START */
+ str = _("fatal error:");
+ break;
+ /* LCOV_EXCL_STOP */
+ default:
+ /* INFO, for example */
+ str = " ";
+ break;
+ }
+ return str;
+}
+
+void gregorio_messagef(const char *function_name,
+ gregorio_verbosity verbosity, int line_number,
+ const char *format, ...)
+{
+ va_list args;
+ const char *verbosity_str;
+
+ if (!debug_messages && verbosity != VERBOSITY_ASSERTION) {
+ line_number = 0;
+ function_name = NULL;
+ }
+
+ /* if these assertions fail, the program is not using this code correctly */
+ assert(error_out);
+ assert(verbosity_mode);
+
+ if (verbosity < verbosity_mode) {
+ return;
+ }
+ if (verbosity == VERBOSITY_ASSERTION && return_value) {
+ /* if something has already caused the system to fail, demote any
+ * assertions coming after to warnings */
+ verbosity = VERBOSITY_WARNING;
+ }
+ verbosity_str = verbosity_to_str(verbosity);
+ if (line_number) {
+ /* if line number is specified, function_name must be specified */
+ assert(function_name);
+ if (function_name) {
+ fprintf(error_out, "%d: in function `%s': %s", line_number,
+ function_name, verbosity_str);
+ }
+ } else {
+ if (function_name) {
+ fprintf(error_out, "in function `%s': %s", function_name,
+ verbosity_str);
+ } else {
+ fprintf(error_out, "%s", verbosity_str);
+ }
+ }
+ va_start(args, format);
+ vfprintf(error_out, format, args);
+ va_end(args);
+ fprintf(error_out, "\n");
+
+ switch (verbosity) {
+ case VERBOSITY_DEPRECATION:
+ /* if there is no deprecation, these lines will not be hit */
+ /* LCOV_EXCL_START */
+ if (deprecation_is_warning) {
+ break;
+ }
+ /* LCOV_EXCL_STOP */
+ /* else fall through */
+ case VERBOSITY_ERROR:
+ case VERBOSITY_ASSERTION:
+ return_value = 1;
+ break;
+ case VERBOSITY_FATAL:
+ /* all fatal errors should not be reasonably testable */
+ /* LCOV_EXCL_START */
+ gregorio_exit(1);
+ break;
+ /* LCOV_EXCL_STOP */
+ default:
+ break;
+ }
+}
+
+void gregorio_message(const char *string, const char *function_name,
+ gregorio_verbosity verbosity, int line_number)
+{
+ gregorio_messagef(function_name, verbosity, line_number, "%s", string);
+}
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/messages.h b/Build/source/texk/gregorio/gregorio-src/src/messages.h
new file mode 100644
index 00000000000..c89bbbe5484
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/messages.h
@@ -0,0 +1,90 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes the message logging functions.
+ *
+ * Copyright (C) 2009-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MESSAGES_H
+#define MESSAGES_H
+
+#ifndef ENABLE_NLS
+#define ENABLE_NLS 0
+#endif
+#if ENABLE_NLS == 1
+#include "gettext.h"
+#define _(str) gettext(str)
+#define N_(str) (str)
+#define ngt_(str, strtwo, count) ngettext(str, strtwo, count)
+#else
+#define _(str) (str)
+#define N_(str) (str)
+#define ngt_(str, strtwo, count) (str)
+#endif
+
+typedef enum gregorio_verbosity {
+ VERBOSITY_INFO = 1,
+ VERBOSITY_WARNING,
+ VERBOSITY_DEPRECATION,
+ VERBOSITY_ERROR,
+ VERBOSITY_ASSERTION,
+ VERBOSITY_FATAL
+} gregorio_verbosity;
+
+void gregorio_message(const char *string, const char *function_name,
+ gregorio_verbosity verbosity, int line_number);
+void gregorio_messagef(const char *function_name,
+ gregorio_verbosity verbosity,
+ int line_number, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 4, 5)));
+void gregorio_set_verbosity_mode(gregorio_verbosity verbosity);
+void gregorio_set_debug_messages(bool debug);
+void gregorio_set_deprecation_errors(bool deprecation_errors);
+void gregorio_set_error_out(FILE *f);
+int gregorio_get_return_value(void);
+
+#define gregorio_assert_only(TEST,FUNCTION,MESSAGE) \
+ if (!(TEST)) { \
+ gregorio_message(_(MESSAGE), #FUNCTION, VERBOSITY_ASSERTION, __LINE__); \
+ }
+
+#define gregorio_assert(TEST,FUNCTION,MESSAGE,ON_FALSE) \
+ if (!(TEST)) { \
+ gregorio_message(_(MESSAGE), #FUNCTION, VERBOSITY_ASSERTION, __LINE__); \
+ ON_FALSE; \
+ }
+
+#define gregorio_assert2(TEST,FUNCTION,FORMAT,ARG,ON_FALSE) \
+ if (!(TEST)) { \
+ gregorio_messagef(#FUNCTION, VERBOSITY_ASSERTION, __LINE__, FORMAT, ARG); \
+ ON_FALSE; \
+ }
+
+#define gregorio_not_null(VARIABLE,FUNCTION,ON_FALSE) \
+ gregorio_assert(VARIABLE, FUNCTION, #VARIABLE " may not be null", ON_FALSE)
+
+#define gregorio_not_null_ptr(VARIABLE,FUNCTION,ON_FALSE) \
+ gregorio_assert(VARIABLE && *VARIABLE, FUNCTION, #VARIABLE " may not be null", ON_FALSE)
+
+#define gregorio_fail(FUNCTION,MESSAGE) \
+ gregorio_message(_(MESSAGE), #FUNCTION, VERBOSITY_ASSERTION, __LINE__)
+
+#define gregorio_fail2(FUNCTION,FORMAT,ARG) \
+ gregorio_messagef(#FUNCTION, VERBOSITY_ASSERTION, __LINE__, FORMAT, ARG)
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/plugins.h b/Build/source/texk/gregorio/gregorio-src/src/plugins.h
new file mode 100644
index 00000000000..7af3aa61c71
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/plugins.h
@@ -0,0 +1,40 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes the "main" entry points for reading and writing data.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PLUGINS_H
+#define PLUGINS_H
+
+#include "bool.h"
+
+void dump_write_score(FILE *f, gregorio_score *score);
+
+void dump_write_characters(FILE *const f,
+ const gregorio_character *current_character);
+
+gregorio_score *gabc_read_score(FILE *f_in, bool point_and_click);
+
+void gabc_write_score(FILE *f, gregorio_score *score);
+
+void gregoriotex_write_score(FILE *f, gregorio_score *score,
+ const char *point_and_click_filename);
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/sha1.c b/Build/source/texk/gregorio/gregorio-src/src/sha1.c
new file mode 100644
index 00000000000..4420bd35327
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/sha1.c
@@ -0,0 +1,346 @@
+/*
+ * sha1.c - Functions to compute SHA1 message digest of files or
+ * memory blocks according to the NIST specification FIPS-180-1.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ * Copyright (C) 2000-2001, 2003-2006, 2008-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of Gregorio.
+ * This file has been adapted from GNU coreutils to fit Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Written by Scott G. Miller
+ Credits:
+ Robert Klep <robert@ilse.nl> -- Expansion function fix
+*/
+
+#include "config.h"
+#include "sha1.h"
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef WORDS_BIGENDIAN
+#define SWAP(n) (n)
+#else
+#define SWAP(n) \
+ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
+#endif
+
+#define BLOCKSIZE 32768
+#if BLOCKSIZE % 64 != 0
+#error "invalid BLOCKSIZE"
+#endif
+
+/* This array contains the bytes used to pad the buffer to the next
+ 64-byte boundary. (RFC 1321, 3.1: Step 1) */
+static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
+
+/* Take a pointer to a 160 bit block of data (five 32 bit ints) and
+ initialize it to the start constants of the SHA1 algorithm. This
+ must be called before using hash in the call to sha1_hash. */
+void sha1_init_ctx(struct sha1_ctx *ctx)
+{
+ ctx->A = 0x67452301;
+ ctx->B = 0xefcdab89;
+ ctx->C = 0x98badcfe;
+ ctx->D = 0x10325476;
+ ctx->E = 0xc3d2e1f0;
+
+ ctx->total[0] = ctx->total[1] = 0;
+ ctx->buflen = 0;
+}
+
+/* Copy the 4 byte value from v into the memory location pointed to by *cp,
+ If your architecture allows unaligned access this is equivalent to
+ * (uint32_t *) cp = v */
+static void set_uint32(char *cp, uint32_t v)
+{
+ memcpy(cp, &v, sizeof v);
+}
+
+/* Put result from CTX in first 20 bytes following RESBUF. The result
+ must be in little endian byte order. */
+void *sha1_read_ctx(const struct sha1_ctx *ctx, void *resbuf)
+{
+ char *r = resbuf;
+ set_uint32(r + 0 * sizeof ctx->A, SWAP(ctx->A));
+ set_uint32(r + 1 * sizeof ctx->B, SWAP(ctx->B));
+ set_uint32(r + 2 * sizeof ctx->C, SWAP(ctx->C));
+ set_uint32(r + 3 * sizeof ctx->D, SWAP(ctx->D));
+ set_uint32(r + 4 * sizeof ctx->E, SWAP(ctx->E));
+
+ return resbuf;
+}
+
+/* Process the remaining bytes in the internal buffer and the usual
+ prolog according to the standard and write the result to RESBUF. */
+void *sha1_finish_ctx(struct sha1_ctx *ctx, void *resbuf)
+{
+ /*
+ * Take yet unprocessed bytes into account.
+ */
+ uint32_t bytes = ctx->buflen;
+ size_t size = (bytes < 56) ? 64 / 4 : 64 * 2 / 4;
+
+ /*
+ * Now count remaining bytes.
+ */
+ ctx->total[0] += bytes;
+ if (ctx->total[0] < bytes)
+ ++ctx->total[1]; /* data-sepcific; LCOV_EXCL_LINE */
+
+ /*
+ * Put the 64-bit file length in *bits* at the end of the buffer.
+ */
+ ctx->buffer[size - 2] = SWAP((ctx->total[1] << 3) | (ctx->total[0] >> 29));
+ ctx->buffer[size - 1] = SWAP(ctx->total[0] << 3);
+
+ memcpy(&((char *) ctx->buffer)[bytes], fillbuf, (size - 2) * 4 - bytes);
+
+ /*
+ * Process last bytes.
+ */
+ sha1_process_block(ctx->buffer, size * 4, ctx);
+
+ return sha1_read_ctx(ctx, resbuf);
+}
+
+void sha1_process_bytes(const void *buffer, size_t len, struct sha1_ctx *ctx)
+{
+ /*
+ * When we already have some bits in our internal buffer concatenate
+ * both inputs first.
+ */
+ if (ctx->buflen != 0) {
+ size_t left_over = ctx->buflen;
+ size_t add = 128 - left_over > len ? len : 128 - left_over;
+
+ memcpy(&((char *) ctx->buffer)[left_over], buffer, add);
+ ctx->buflen += add;
+
+ if (ctx->buflen > 64) {
+ sha1_process_block(ctx->buffer, ctx->buflen & ~63, ctx);
+
+ ctx->buflen &= 63;
+ /*
+ * The regions in the following copy operation cannot overlap.
+ */
+ memcpy(ctx->buffer,
+ &((char *) ctx->buffer)[(left_over + add) & ~63],
+ ctx->buflen);
+ }
+
+ buffer = (const char *) buffer + add;
+ len -= add;
+ }
+
+ /*
+ * Process available complete blocks.
+ */
+ if (len >= 64) {
+ /* architecture and data-specific; LCOV_EXCL_START */
+#if !_STRING_ARCH_unaligned
+#define UNALIGNED_P(p) ((uintptr_t) (p) % ALIGNOF_UINT32_T != 0)
+ if (UNALIGNED_P(buffer)) {
+ while (len > 64) {
+ sha1_process_block(memcpy(ctx->buffer, buffer, 64), 64, ctx);
+ buffer = (const char *) buffer + 64;
+ len -= 64;
+ }
+ } else
+#endif
+ {
+ sha1_process_block(buffer, len & ~63, ctx);
+ buffer = (const char *) buffer + (len & ~63);
+ len &= 63;
+ }
+ /* LCOV_EXCL_STOP */
+ }
+
+ /*
+ * Move remaining bytes in internal buffer.
+ */
+ if (len > 0) {
+ size_t left_over = ctx->buflen;
+
+ memcpy(&((char *) ctx->buffer)[left_over], buffer, len);
+ left_over += len;
+ if (left_over >= 64) {
+ /* data-specific; LCOV_EXCL_START */
+ sha1_process_block(ctx->buffer, 64, ctx);
+ left_over -= 64;
+ memcpy(ctx->buffer, &ctx->buffer[16], left_over);
+ }
+ /* LCOV_EXCL_STOP */
+ ctx->buflen = left_over;
+ }
+}
+
+/* --- Code below is the primary difference between md5.c and sha1.c --- */
+
+/* SHA1 round constants */
+#define K1 0x5a827999
+#define K2 0x6ed9eba1
+#define K3 0x8f1bbcdc
+#define K4 0xca62c1d6
+
+/* Round functions. Note that F2 is the same as F4. */
+#define F1(B,C,D) ( D ^ ( B & ( C ^ D ) ) )
+#define F2(B,C,D) (B ^ C ^ D)
+#define F3(B,C,D) ( ( B & C ) | ( D & ( B | C ) ) )
+#define F4(B,C,D) (B ^ C ^ D)
+
+/* Process LEN bytes of BUFFER, accumulating context into CTX.
+ It is assumed that LEN % 64 == 0.
+ Most of this code comes from GnuPG's cipher/sha1.c. */
+
+void sha1_process_block(const void *buffer, size_t len, struct sha1_ctx *ctx)
+{
+ const uint32_t *words = buffer;
+ size_t nwords = len / sizeof(uint32_t);
+ const uint32_t *endp = words + nwords;
+ uint32_t x[16];
+ uint32_t a = ctx->A;
+ uint32_t b = ctx->B;
+ uint32_t c = ctx->C;
+ uint32_t d = ctx->D;
+ uint32_t e = ctx->E;
+ uint32_t lolen = len;
+
+ /*
+ * First increment the byte count. RFC 1321 specifies the possible
+ * length of the file up to 2^64 bits. Here we only compute the
+ * number of bytes. Do a double word increment.
+ */
+ ctx->total[0] += lolen;
+ ctx->total[1] += (len >> 31 >> 1) + (ctx->total[0] < lolen);
+
+#define rol(x, n) (((x) << (n)) | ((uint32_t) (x) >> (32 - (n))))
+
+#define M(I) ( tm = x[I&0x0f] ^ x[(I-14)&0x0f] \
+ ^ x[(I-8)&0x0f] ^ x[(I-3)&0x0f] \
+ , (x[I&0x0f] = rol(tm, 1)) )
+
+#define R(A,B,C,D,E,F,K,M) do { E += rol( A, 5 ) \
+ + F( B, C, D ) \
+ + K \
+ + M; \
+ B = rol( B, 30 ); \
+ } while(0)
+
+ while (words < endp) {
+ uint32_t tm;
+ int t;
+ uint32_t v;
+ for (t = 0; t < 16; t++) {
+ memcpy(&v, words, sizeof(uint32_t));
+ x[t] = SWAP(v);
+ words++;
+ }
+
+ R(a, b, c, d, e, F1, K1, x[0]);
+ R(e, a, b, c, d, F1, K1, x[1]);
+ R(d, e, a, b, c, F1, K1, x[2]);
+ R(c, d, e, a, b, F1, K1, x[3]);
+ R(b, c, d, e, a, F1, K1, x[4]);
+ R(a, b, c, d, e, F1, K1, x[5]);
+ R(e, a, b, c, d, F1, K1, x[6]);
+ R(d, e, a, b, c, F1, K1, x[7]);
+ R(c, d, e, a, b, F1, K1, x[8]);
+ R(b, c, d, e, a, F1, K1, x[9]);
+ R(a, b, c, d, e, F1, K1, x[10]);
+ R(e, a, b, c, d, F1, K1, x[11]);
+ R(d, e, a, b, c, F1, K1, x[12]);
+ R(c, d, e, a, b, F1, K1, x[13]);
+ R(b, c, d, e, a, F1, K1, x[14]);
+ R(a, b, c, d, e, F1, K1, x[15]);
+ R(e, a, b, c, d, F1, K1, M(16));
+ R(d, e, a, b, c, F1, K1, M(17));
+ R(c, d, e, a, b, F1, K1, M(18));
+ R(b, c, d, e, a, F1, K1, M(19));
+ R(a, b, c, d, e, F2, K2, M(20));
+ R(e, a, b, c, d, F2, K2, M(21));
+ R(d, e, a, b, c, F2, K2, M(22));
+ R(c, d, e, a, b, F2, K2, M(23));
+ R(b, c, d, e, a, F2, K2, M(24));
+ R(a, b, c, d, e, F2, K2, M(25));
+ R(e, a, b, c, d, F2, K2, M(26));
+ R(d, e, a, b, c, F2, K2, M(27));
+ R(c, d, e, a, b, F2, K2, M(28));
+ R(b, c, d, e, a, F2, K2, M(29));
+ R(a, b, c, d, e, F2, K2, M(30));
+ R(e, a, b, c, d, F2, K2, M(31));
+ R(d, e, a, b, c, F2, K2, M(32));
+ R(c, d, e, a, b, F2, K2, M(33));
+ R(b, c, d, e, a, F2, K2, M(34));
+ R(a, b, c, d, e, F2, K2, M(35));
+ R(e, a, b, c, d, F2, K2, M(36));
+ R(d, e, a, b, c, F2, K2, M(37));
+ R(c, d, e, a, b, F2, K2, M(38));
+ R(b, c, d, e, a, F2, K2, M(39));
+ R(a, b, c, d, e, F3, K3, M(40));
+ R(e, a, b, c, d, F3, K3, M(41));
+ R(d, e, a, b, c, F3, K3, M(42));
+ R(c, d, e, a, b, F3, K3, M(43));
+ R(b, c, d, e, a, F3, K3, M(44));
+ R(a, b, c, d, e, F3, K3, M(45));
+ R(e, a, b, c, d, F3, K3, M(46));
+ R(d, e, a, b, c, F3, K3, M(47));
+ R(c, d, e, a, b, F3, K3, M(48));
+ R(b, c, d, e, a, F3, K3, M(49));
+ R(a, b, c, d, e, F3, K3, M(50));
+ R(e, a, b, c, d, F3, K3, M(51));
+ R(d, e, a, b, c, F3, K3, M(52));
+ R(c, d, e, a, b, F3, K3, M(53));
+ R(b, c, d, e, a, F3, K3, M(54));
+ R(a, b, c, d, e, F3, K3, M(55));
+ R(e, a, b, c, d, F3, K3, M(56));
+ R(d, e, a, b, c, F3, K3, M(57));
+ R(c, d, e, a, b, F3, K3, M(58));
+ R(b, c, d, e, a, F3, K3, M(59));
+ R(a, b, c, d, e, F4, K4, M(60));
+ R(e, a, b, c, d, F4, K4, M(61));
+ R(d, e, a, b, c, F4, K4, M(62));
+ R(c, d, e, a, b, F4, K4, M(63));
+ R(b, c, d, e, a, F4, K4, M(64));
+ R(a, b, c, d, e, F4, K4, M(65));
+ R(e, a, b, c, d, F4, K4, M(66));
+ R(d, e, a, b, c, F4, K4, M(67));
+ R(c, d, e, a, b, F4, K4, M(68));
+ R(b, c, d, e, a, F4, K4, M(69));
+ R(a, b, c, d, e, F4, K4, M(70));
+ R(e, a, b, c, d, F4, K4, M(71));
+ R(d, e, a, b, c, F4, K4, M(72));
+ R(c, d, e, a, b, F4, K4, M(73));
+ R(b, c, d, e, a, F4, K4, M(74));
+ R(a, b, c, d, e, F4, K4, M(75));
+ R(e, a, b, c, d, F4, K4, M(76));
+ R(d, e, a, b, c, F4, K4, M(77));
+ R(c, d, e, a, b, F4, K4, M(78));
+ R(b, c, d, e, a, F4, K4, M(79));
+
+ a = ctx->A += a;
+ b = ctx->B += b;
+ c = ctx->C += c;
+ d = ctx->D += d;
+ e = ctx->E += e;
+ }
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/sha1.h b/Build/source/texk/gregorio/gregorio-src/src/sha1.h
new file mode 100644
index 00000000000..078fd7a17ea
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/sha1.h
@@ -0,0 +1,85 @@
+/*
+ * Declarations of functions and data types used for SHA1 sum
+ * library functions.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ * Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2014 Free Software
+ * Foundation, Inc.
+ *
+ * This file is part of Gregorio.
+ * This file has been adapted from GNU coreutils to fit Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SHA1_H
+#define SHA1_H 1
+
+#include <stddef.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+
+#define SHA1_DIGEST_SIZE 20
+
+/* Structure to save state of computation between the single steps. */
+struct sha1_ctx {
+ uint32_t A;
+ uint32_t B;
+ uint32_t C;
+ uint32_t D;
+ uint32_t E;
+
+ uint32_t total[2];
+ uint32_t buflen;
+ uint32_t buffer[32];
+};
+
+/* Initialize structure containing state of computation. */
+extern void sha1_init_ctx(struct sha1_ctx *ctx);
+
+/* Starting with the result of former calls of this function (or the
+ initialization function update the context for the next LEN bytes
+ starting at BUFFER.
+ It is necessary that LEN is a multiple of 64!!! */
+extern void sha1_process_block(const void *buffer, size_t len,
+ struct sha1_ctx *ctx);
+
+/* Starting with the result of former calls of this function (or the
+ initialization function update the context for the next LEN bytes
+ starting at BUFFER.
+ It is NOT required that LEN is a multiple of 64. */
+extern void sha1_process_bytes(const void *buffer, size_t len,
+ struct sha1_ctx *ctx);
+
+/* Process the remaining bytes in the buffer and put result from CTX
+ in first 20 bytes following RESBUF. The result is always in little
+ endian byte order, so that a byte-wise output yields to the wanted
+ ASCII representation of the message digest. */
+extern void *sha1_finish_ctx(struct sha1_ctx *ctx, void *resbuf);
+
+/* Put result from CTX in first 20 bytes following RESBUF. The result is
+ always in little endian byte order, so that a byte-wise output yields
+ to the wanted ASCII representation of the message digest. */
+extern void *sha1_read_ctx(const struct sha1_ctx *ctx, void *resbuf);
+
+/* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The
+ result is always in little endian byte order, so that a byte-wise
+ output yields to the wanted ASCII representation of the message
+ digest. */
+extern void *sha1_buffer(const char *buffer, size_t len, void *resblock);
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/struct.c b/Build/source/texk/gregorio/gregorio-src/src/struct.c
new file mode 100644
index 00000000000..eabc5cb57ad
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/struct.c
@@ -0,0 +1,1609 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the Gregorio data structures.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file
+ * @brief This file contains a set of function to manipulate the gregorio
+ * structure.
+ *
+ * It starts by simple add/delete functions for almost all
+ * structs, and ends with more complex functions for manipulating
+ * horizontal episema, keys, etc.
+ *
+ * The first functions are not commented, but they always act like
+ * this : we give them a pointer to the pointer to the current element
+ * (by element I mean a struct which can be gregorio_note,
+ * gregorio_element, etc.), they add an element and the update the
+ * pointer to the element so that it points to the new element (may
+ * seem a bit strange).
+ *
+ * All the delete functions are recursive and free all memory.
+ *
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <assert.h>
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "support.h"
+#include "characters.h"
+#include "support.h"
+
+unsigned short tex_position_id = 0;
+
+gregorio_clef_info gregorio_default_clef = {
+ /*.line =*/ 3,
+ /*.secondary_line =*/ 0,
+ /*.pitch_difference =*/ 0,
+ /*.clef =*/ CLEF_C,
+ /*.flatted =*/ false,
+ /*.secondary_clef =*/ CLEF_C, /* not used since secondary_line is 0 */
+ /*.secondary_flatted =*/ false,
+};
+
+static size_t hepisema_adjustments_capacity = 0;
+static unsigned short hepisema_adjustments_last = 0;
+static gregorio_hepisema_adjustment *hepisema_adjustments = NULL;
+
+static size_t texverbs_capacity = 0;
+static unsigned short texverbs_last = 0;
+static char **texverbs = NULL;
+
+void gregorio_struct_init(void)
+{
+ hepisema_adjustments_capacity = 8;
+ hepisema_adjustments = gregorio_grow_buffer(NULL,
+ &hepisema_adjustments_capacity, gregorio_hepisema_adjustment);
+ hepisema_adjustments[0].vbasepos = HVB_AUTO;
+ hepisema_adjustments[0].nudge = NULL;
+
+ texverbs_capacity = 32;
+ texverbs = gregorio_grow_buffer(NULL, &texverbs_capacity, char *);
+ texverbs[0] = NULL;
+}
+
+void gregorio_struct_destroy(void)
+{
+ size_t i;
+ gregorio_hepisema_adjustment *adj;
+ char **texverb;
+
+ for (i = 0, adj = hepisema_adjustments; i <= hepisema_adjustments_last;
+ ++i, ++adj) {
+ if (adj->nudge) {
+ free(adj->nudge);
+ }
+ }
+ free(hepisema_adjustments);
+
+ for (i = 0, texverb = texverbs; i <= texverbs_last; ++i, ++texverb) {
+ if (*texverb) {
+ /* If the code falls here, this is a programming error. */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregorio_struct_destroy, "unfreed texverb");
+ free(*texverb);
+ }
+ /* LCOV_EXCL_STOP */
+ }
+ free(texverbs);
+}
+
+static unsigned short register_texverb(char *const texverb)
+{
+ if (texverbs_last == USHRT_MAX) {
+ /* It's not reasonable to trigger this condition while testing */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("too many texverbs"), "register_texverb",
+ VERBOSITY_ERROR, 0);
+ return 0;
+ /* LCOV_EXCL_STOP */
+ }
+ ++texverbs_last;
+ if (texverbs_last >= texverbs_capacity) {
+ texverbs = gregorio_grow_buffer(texverbs, &texverbs_capacity, char *);
+ }
+ texverbs[texverbs_last] = texverb;
+ return texverbs_last;
+}
+
+static void free_one_texverb(unsigned short index)
+{
+ if (index) {
+ gregorio_assert(index <= texverbs_last, gregorio_texverb,
+ "array index out of bounds", return);
+ free(texverbs[index]);
+ texverbs[index] = NULL;
+ }
+}
+
+static gregorio_note *create_and_link_note(gregorio_note **current_note,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *note = gregorio_calloc(1, sizeof(gregorio_note));
+ note->previous = *current_note;
+ note->next = NULL;
+ if (*current_note) {
+ (*current_note)->next = note;
+ }
+ *current_note = note;
+ note->src_line = loc->first_line;
+ note->src_column = loc->first_column;
+ note->src_offset = loc->first_offset;
+
+ return note;
+}
+
+void gregorio_position_h_episema_above(gregorio_note *note, signed char height,
+ bool connect)
+{
+ assert(note && (note->type == GRE_NOTE || note->type == GRE_BAR));
+ note->h_episema_above = height;
+ note->h_episema_above_connect = connect;
+}
+
+static void set_h_episema_above(gregorio_note *note, signed char height,
+ grehepisema_size size, bool connect)
+{
+ gregorio_position_h_episema_above(note, height, connect);
+ note->h_episema_above_size = size;
+}
+
+void gregorio_position_h_episema_below(gregorio_note *note, signed char height,
+ bool connect)
+{
+ assert(note && (note->type == GRE_NOTE || note->type == GRE_BAR));
+ note->h_episema_below = height;
+ note->h_episema_below_connect = connect;
+}
+
+static void set_h_episema_below(gregorio_note *note, signed char height,
+ grehepisema_size size, bool connect)
+{
+ gregorio_position_h_episema_below(note, height, connect);
+ note->h_episema_below_size = size;
+}
+
+void gregorio_add_note(gregorio_note **current_note, signed char pitch,
+ gregorio_shape shape, gregorio_sign signs,
+ gregorio_liquescentia liquescentia, gregorio_note *prototype,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_NOTE;
+ element->u.note.pitch = pitch;
+ element->u.note.shape = shape;
+ element->signs = signs;
+ element->special_sign = _NO_SIGN;
+ element->u.note.liquescentia = liquescentia;
+ if (prototype) {
+ set_h_episema_above(element, prototype->h_episema_above,
+ prototype->h_episema_above_size,
+ prototype->h_episema_above_connect);
+ set_h_episema_below(element, prototype->h_episema_below,
+ prototype->h_episema_below_size,
+ prototype->h_episema_below_connect);
+ element->he_adjustment_index[SO_OVER] =
+ prototype->he_adjustment_index[SO_OVER];
+ element->he_adjustment_index[SO_UNDER] =
+ prototype->he_adjustment_index[SO_UNDER];
+ element->high_ledger_line = prototype->high_ledger_line;
+ element->high_ledger_specificity = prototype->high_ledger_specificity;
+ element->low_ledger_line = prototype->low_ledger_line;
+ element->low_ledger_specificity = prototype->low_ledger_specificity;
+ }
+ element->texverb = 0;
+ element->choral_sign = NULL;
+}
+
+static void add_pitched_item_as_note(gregorio_note **current_note,
+ gregorio_type type, signed char pitch,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = type;
+ element->u.note.pitch = pitch;
+}
+
+void gregorio_add_end_of_line_as_note(gregorio_note **current_note,
+ bool eol_ragged, bool eol_forces_custos, bool eol_forces_custos_on,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_END_OF_LINE;
+ element->u.other.eol_ragged = eol_ragged;
+ element->u.other.eol_forces_custos = eol_forces_custos;
+ element->u.other.eol_forces_custos_on = eol_forces_custos_on;
+}
+
+void gregorio_add_custos_as_note(gregorio_note **current_note,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_CUSTOS;
+}
+
+void gregorio_add_manual_custos_as_note(gregorio_note **current_note,
+ signed char pitch, const gregorio_scanner_location *const loc)
+{
+ add_pitched_item_as_note(current_note, GRE_MANUAL_CUSTOS, pitch, loc);
+}
+
+void gregorio_add_suppress_custos_as_note(gregorio_note **current_note,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_SUPPRESS_CUSTOS;
+}
+
+void gregorio_add_clef_as_note(gregorio_note **current_note,
+ gregorio_clef clef, signed char clef_line, bool flatted,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_CLEF;
+ element->u.clef.clef = clef;
+ element->u.clef.line = clef_line;
+ element->u.clef.flatted = flatted;
+}
+
+void gregorio_add_secondary_clef_to_note(gregorio_note *current_note,
+ gregorio_clef clef, signed char clef_line, bool flatted)
+{
+ gregorio_not_null(current_note, gregorio_add_secondary_clef_to_note,
+ return);
+ if (current_note->type != GRE_CLEF) {
+ gregorio_message(_("trying to add a secondary clef to something that "
+ "is not a clef"), "gregorio_add_secondary_clef_to_note",
+ VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (current_note->u.clef.secondary_line) {
+ gregorio_message(_("secondary clef already exists"),
+ "gregorio_add_secondary_clef_to_note", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ current_note->u.clef.secondary_clef = clef;
+ current_note->u.clef.secondary_line = clef_line;
+ current_note->u.clef.secondary_flatted = flatted;
+}
+
+void gregorio_add_bar_as_note(gregorio_note **current_note, gregorio_bar bar,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_BAR;
+ element->u.other.bar = bar;
+}
+
+void gregorio_add_space_as_note(gregorio_note **current_note,
+ const gregorio_space space, char *factor,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_SPACE;
+ element->u.other.space = space;
+ element->u.other.ad_hoc_space_factor = factor;
+}
+
+unsigned short gregorio_add_texverb_as_note(gregorio_note **current_note,
+ char *str, gregorio_type type,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element;
+ /* gregorio_not_null(str, gregorio_add_texverb_as_note, return NULL); */
+ element = create_and_link_note(current_note, loc);
+ assert(type == GRE_TEXVERB_GLYPH || type == GRE_TEXVERB_ELEMENT
+ || type == GRE_ALT);
+ element->type = type;
+ element->texverb = register_texverb(str);
+ return element->texverb;
+}
+
+void gregorio_add_nlba_as_note(gregorio_note **current_note, gregorio_nlba type,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_NLBA;
+ element->u.other.nlba = type;
+}
+
+void gregorio_start_autofuse(gregorio_note **current_note,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_AUTOFUSE_START;
+}
+
+void gregorio_end_autofuse(gregorio_note **current_note,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_AUTOFUSE_END;
+}
+
+static __inline void change_note_texverb(gregorio_note *note, char *str)
+{
+ if (note->texverb) {
+ gregorio_change_texverb(note->texverb, str);
+ } else {
+ note->texverb = register_texverb(str);
+ }
+}
+
+void gregorio_add_texverb_to_note(gregorio_note *current_note, char *str)
+{
+ size_t len;
+ char *res;
+ gregorio_not_null(str, gregorio_add_texverb_as_note, return);
+ if (current_note) {
+ const char *texverb = gregorio_texverb(current_note->texverb);
+ if (texverb) {
+ len = strlen(texverb) + strlen(str) + 1;
+ res = gregorio_malloc(len);
+ strcpy(res, texverb);
+ strcat(res, str);
+ free(str);
+ change_note_texverb(current_note, res);
+ } else {
+ change_note_texverb(current_note, str);
+ }
+ }
+}
+
+void gregorio_add_cs_to_note(gregorio_note *const*const current_note,
+ char *const str, const bool nabc)
+{
+ if (*current_note) {
+ (*current_note)->choral_sign = str;
+ (*current_note)->choral_sign_is_nabc = nabc;
+ }
+}
+
+void gregorio_add_special_sign(gregorio_note *note, gregorio_sign sign)
+{
+ if (!note || note->type != GRE_NOTE) {
+ gregorio_message(_("trying to add a special sign to something that is "
+ "not a note"), "gregorio_add_special_sign", VERBOSITY_ERROR,
+ 0);
+ return;
+ }
+ note->special_sign = sign;
+}
+
+static void fix_oriscus_liquescentia(gregorio_note *const note,
+ const bool legacy_oriscus_orientation)
+{
+ if (legacy_oriscus_orientation) {
+ switch (note->u.note.liquescentia) {
+ case L_AUCTUS_ASCENDENS:
+ note->u.note.liquescentia =
+ (note->u.note.liquescentia & ~TAIL_LIQUESCENTIA_MASK)
+ | L_AUCTUS_DESCENDENS;
+ /* fall through */
+ case L_AUCTUS_DESCENDENS:
+ note->u.note.shape = S_ORISCUS_DESCENDENS;
+ break;
+ case L_DEMINUTUS:
+ note->u.note.shape = S_ORISCUS_DEMINUTUS;
+ break;
+ default:
+ note->u.note.shape = S_ORISCUS_ASCENDENS;
+ break;
+ }
+ } else {
+ note->u.note.liquescentia &= ((~TAIL_LIQUESCENTIA_MASK) | L_DEMINUTUS);
+ if (note->u.note.liquescentia & L_DEMINUTUS) {
+ note->u.note.shape = S_ORISCUS_DEMINUTUS;
+ }
+ }
+}
+
+static void fix_oriscus_scapus_liquescentia(gregorio_note *const note,
+ const bool legacy_oriscus_orientation)
+{
+ if (legacy_oriscus_orientation) {
+ switch (note->u.note.liquescentia) {
+ case L_AUCTUS_ASCENDENS:
+ note->u.note.liquescentia =
+ (note->u.note.liquescentia & ~TAIL_LIQUESCENTIA_MASK)
+ | L_AUCTUS_DESCENDENS;
+ /* fall through */
+ case L_AUCTUS_DESCENDENS:
+ note->u.note.shape = S_ORISCUS_SCAPUS_DESCENDENS;
+ break;
+ default:
+ note->u.note.shape = S_ORISCUS_SCAPUS_ASCENDENS;
+ break;
+ }
+ } else {
+ note->u.note.liquescentia &= ~TAIL_LIQUESCENTIA_MASK;
+ }
+}
+
+void gregorio_change_shape(gregorio_note *const note,
+ const gregorio_shape shape, const bool legacy_oriscus_orientation)
+{
+ if (!note || note->type != GRE_NOTE) {
+ gregorio_message(_("trying to change the shape of something that is "
+ "not a note"), "change_shape", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ note->u.note.shape = shape;
+ switch (shape) {
+ case S_STROPHA:
+ case S_DISTROPHA:
+ case S_TRISTROPHA:
+ note->u.note.liquescentia &= L_AUCTUS_ASCENDENS | L_INITIO_DEBILIS;
+ break;
+
+ case S_ORISCUS_UNDETERMINED:
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ fix_oriscus_liquescentia(note, legacy_oriscus_orientation);
+ break;
+
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ fix_oriscus_scapus_liquescentia(note, legacy_oriscus_orientation);
+ break;
+
+ default:
+ break;
+ }
+}
+
+void gregorio_add_cavum(gregorio_note *const note)
+{
+ if (!note || note->type != GRE_NOTE) {
+ gregorio_message(_("trying to add cavum to something that is "
+ "not a note"), "change_shape", VERBOSITY_ERROR, 0);
+ return;
+ }
+ note->u.note.is_cavum = true;
+}
+
+void gregorio_add_tail_liquescentia(gregorio_note *note,
+ gregorio_liquescentia liq, const bool legacy_oriscus_orientation)
+{
+ if (!note || note->type != GRE_NOTE) {
+ gregorio_message(_("trying to make a liquescence on something that "
+ "is not a note"), "add_liquescentia", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ note->u.note.liquescentia =
+ (note->u.note.liquescentia & ~TAIL_LIQUESCENTIA_MASK)
+ | (liq & TAIL_LIQUESCENTIA_MASK);
+
+ switch (note->u.note.shape) {
+ case S_STROPHA:
+ case S_DISTROPHA:
+ case S_TRISTROPHA:
+ if (note->u.note.liquescentia & L_AUCTUS_DESCENDENS) {
+ note->u.note.liquescentia =
+ (note->u.note.liquescentia & ~TAIL_LIQUESCENTIA_MASK)
+ | L_AUCTUS_ASCENDENS;
+ }
+ break;
+
+ case S_ORISCUS_UNDETERMINED:
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_DEMINUTUS:
+ fix_oriscus_liquescentia(note, legacy_oriscus_orientation);
+ break;
+
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ fix_oriscus_scapus_liquescentia(note, legacy_oriscus_orientation);
+ break;
+
+ default:
+ break;
+ }
+}
+
+static void apply_auto_h_episema(gregorio_note *const note,
+ const grehepisema_size size, const bool disable_bridge)
+{
+ if (note->h_episema_above == HEPISEMA_NONE
+ && note->h_episema_below == HEPISEMA_NONE) {
+ /* if both are unset, set both to auto */
+ set_h_episema_above(note, HEPISEMA_AUTO, size, !disable_bridge);
+ set_h_episema_below(note, HEPISEMA_AUTO, size, !disable_bridge);
+ } else if (note->h_episema_above == HEPISEMA_AUTO
+ && note->h_episema_below == HEPISEMA_AUTO) {
+ /* if both are auto, then force both */
+ /* the upper episema keeps its settings */
+ note->h_episema_above = HEPISEMA_FORCED;
+
+ set_h_episema_below(note, HEPISEMA_FORCED, size, !disable_bridge);
+ } else {
+ /* force whichever is not already forced */
+ if (note->h_episema_above != HEPISEMA_FORCED) {
+ set_h_episema_above(note, HEPISEMA_FORCED, size, !disable_bridge);
+ }
+ if (note->h_episema_below != HEPISEMA_FORCED) {
+ set_h_episema_below(note, HEPISEMA_FORCED, size, !disable_bridge);
+ }
+ }
+}
+
+/**********************************
+ *
+ * Activate_isolated_h_episema is used when we see an "isolated"
+ * horizontal episema: when we type ab__ lex see a then b then _ then _, so
+ * we must put the _ on the a (kind of backward process), and say the
+ * the episema on the b is a multi episema. Here n is the length of
+ * the isolated episema we found (can be up to 4).
+ *
+ *********************************/
+static void gregorio_activate_isolated_h_episema(gregorio_note *note,
+ const grehepisema_size size, const bool disable_bridge, int n)
+{
+ gregorio_not_null(note, gregorio_activate_isolated_h_episema, return);
+ if (note->type != GRE_NOTE) {
+ gregorio_message(ngt_("isolated horizontal episema after something "
+ "that is not a note, ignored",
+ "isolated horizontal episema after something that is not "
+ "a note, ignored", n), "activate_h_isolated_episema",
+ VERBOSITY_ERROR, 0);
+ return;
+ }
+ for (; n > 0; --n) {
+ note = note->previous;
+ if (!note || note->type != GRE_NOTE) {
+ gregorio_message(_("found more horizontal episema than notes "
+ "able to be under"), "activate_h_isolated_episema",
+ VERBOSITY_ERROR, 0);
+ return;
+ }
+ }
+ apply_auto_h_episema(note, size, disable_bridge);
+}
+
+void gregorio_add_h_episema(gregorio_note *note,
+ grehepisema_size size, gregorio_vposition vposition,
+ bool disable_bridge, unsigned int *nbof_isolated_episema)
+{
+ if (!note || (note->type != GRE_NOTE && note->type != GRE_BAR)) {
+ gregorio_message(_("trying to add a horizontal episema on something "
+ "that is not a note"), "add_h_episema",
+ VERBOSITY_ERROR, 0);
+ return;
+ }
+ gregorio_not_null(nbof_isolated_episema, gregorio_add_h_episema, return);
+ if (vposition && *nbof_isolated_episema) {
+ gregorio_message(_("trying to add a forced horizontal episema on a "
+ "note which already has an automatic horizontal "
+ "episema"), "add_h_episema", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (vposition || !*nbof_isolated_episema) {
+ switch (vposition) {
+ case VPOS_ABOVE:
+ set_h_episema_above(note, HEPISEMA_FORCED, size, !disable_bridge);
+ break;
+
+ case VPOS_BELOW:
+ set_h_episema_below(note, HEPISEMA_FORCED, size, !disable_bridge);
+ break;
+
+ default: /* VPOS_AUTO */
+ apply_auto_h_episema(note, size, disable_bridge);
+ *nbof_isolated_episema = 1;
+ break;
+ }
+ } else {
+ gregorio_activate_isolated_h_episema(note, size, disable_bridge,
+ (*nbof_isolated_episema)++);
+ }
+}
+
+void gregorio_add_sign(gregorio_note *note, gregorio_sign sign,
+ gregorio_vposition vposition)
+{
+ if (!note) {
+ gregorio_message(_("trying to add a sign to something that is "
+ "not a note"), "gregorio_add_sign", VERBOSITY_ERROR, 0);
+ return;
+ }
+ switch (sign) {
+ case _PUNCTUM_MORA:
+ switch (note->signs) {
+ case _NO_SIGN:
+ note->signs = _PUNCTUM_MORA;
+ break;
+ case _V_EPISEMA:
+ note->signs = _V_EPISEMA_PUNCTUM_MORA;
+ break;
+ case _PUNCTUM_MORA:
+ note->signs = _AUCTUM_DUPLEX;
+ break;
+ case _V_EPISEMA_PUNCTUM_MORA:
+ note->signs = _V_EPISEMA_AUCTUM_DUPLEX;
+ break;
+ default:
+ break;
+ }
+
+ note->mora_vposition = vposition;
+ break;
+
+ case _V_EPISEMA:
+ switch (note->signs) {
+ case _NO_SIGN:
+ note->signs = _V_EPISEMA;
+ break;
+ case _PUNCTUM_MORA:
+ note->signs = _V_EPISEMA_PUNCTUM_MORA;
+ break;
+ case _AUCTUM_DUPLEX:
+ note->signs = _V_EPISEMA_AUCTUM_DUPLEX;
+ break;
+ default:
+ break;
+ }
+
+ if (note->type == GRE_NOTE && vposition) {
+ note->v_episema_height = note->u.note.pitch + vposition;
+ }
+ break;
+
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(gregorio_add_sign, "unexpected sign to add: %s",
+ gregorio_sign_to_string(sign));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+void gregorio_go_to_first_note(gregorio_note **note)
+{
+ gregorio_note *tmp;
+ gregorio_not_null_ptr(note, gregorio_go_to_first_note, return);
+ tmp = *note;
+ while (tmp->previous) {
+ tmp = tmp->previous;
+ }
+ *note = tmp;
+}
+
+static __inline void free_one_note(gregorio_note *note)
+{
+ if (note->type == GRE_SPACE) {
+ free(note->u.other.ad_hoc_space_factor);
+ }
+ free_one_texverb(note->texverb);
+ free(note->choral_sign);
+ free(note);
+}
+
+void gregorio_free_one_note(gregorio_note **note)
+{
+ gregorio_note *next = NULL;
+ gregorio_not_null_ptr(note, gregorio_free_one_note, return);
+ if ((*note)->next) {
+ (*note)->next->previous = (*note)->previous;
+ next = (*note)->next;
+ }
+ if ((*note)->previous) {
+ (*note)->previous->next = (*note)->next;
+ }
+ free_one_note(*note);
+ *note = next;
+}
+
+static void gregorio_free_notes(gregorio_note **note)
+{
+ gregorio_note *tmp;
+ while (*note) {
+ tmp = (*note)->next;
+ free_one_note(*note);
+ *note = tmp;
+ }
+}
+
+static gregorio_glyph *create_and_link_glyph(gregorio_glyph **current_glyph)
+{
+ gregorio_glyph *glyph = gregorio_calloc(1, sizeof(gregorio_glyph));
+ glyph->previous = *current_glyph;
+ glyph->next = NULL;
+ if (*current_glyph) {
+ (*current_glyph)->next = glyph;
+ }
+ *current_glyph = glyph;
+
+ return glyph;
+}
+
+void gregorio_add_glyph(gregorio_glyph **current_glyph,
+ gregorio_glyph_type type, gregorio_note *first_note,
+ gregorio_liquescentia liquescentia, bool is_cavum)
+{
+ gregorio_glyph *next_glyph = create_and_link_glyph(current_glyph);
+ next_glyph->type = GRE_GLYPH;
+ next_glyph->u.notes.glyph_type = type;
+ next_glyph->u.notes.liquescentia = liquescentia;
+ next_glyph->u.notes.is_cavum = is_cavum;
+ next_glyph->u.notes.first_note = first_note;
+}
+
+void gregorio_add_clef_as_glyph(gregorio_glyph **current_glyph,
+ gregorio_clef_info clef, unsigned short texverb)
+{
+ gregorio_glyph *next_glyph = create_and_link_glyph(current_glyph);
+ next_glyph->type = GRE_CLEF;
+ next_glyph->u.misc.clef = clef;
+ next_glyph->texverb = texverb;
+}
+
+void gregorio_add_pitched_element_as_glyph(gregorio_glyph **current_glyph,
+ gregorio_type type, signed char pitch, bool force_pitch,
+ unsigned short texverb)
+{
+ gregorio_glyph *next_glyph = create_and_link_glyph(current_glyph);
+ assert(type == GRE_CUSTOS);
+ next_glyph->type = type;
+ next_glyph->u.misc.pitched.pitch = pitch;
+ next_glyph->u.misc.pitched.force_pitch = force_pitch;
+ next_glyph->texverb = texverb;
+}
+
+void gregorio_add_unpitched_element_as_glyph(gregorio_glyph **current_glyph,
+ gregorio_type type, gregorio_extra_info *info, gregorio_sign sign,
+ unsigned short texverb)
+{
+ gregorio_glyph *next_glyph = create_and_link_glyph(current_glyph);
+ assert(type != GRE_NOTE && type != GRE_GLYPH && type != GRE_ELEMENT
+ && type != GRE_CLEF && type != GRE_CUSTOS);
+ next_glyph->type = type;
+ next_glyph->u.misc.unpitched.info = *info;
+ next_glyph->u.misc.unpitched.special_sign = sign;
+ next_glyph->texverb = texverb;
+
+ /* this was copied into the glyph, so we need to clear it to avoid a
+ * double-free */
+ info->ad_hoc_space_factor = NULL;
+}
+
+void gregorio_go_to_first_glyph(gregorio_glyph **glyph)
+{
+ gregorio_glyph *tmp;
+ gregorio_not_null_ptr(glyph, gregorio_go_to_first_glyph, return);
+ tmp = *glyph;
+ while (tmp->previous) {
+ tmp = tmp->previous;
+ }
+ *glyph = tmp;
+}
+
+static __inline void free_one_glyph(gregorio_glyph *glyph)
+{
+ free_one_texverb(glyph->texverb);
+ switch (glyph->type) {
+ case GRE_GLYPH:
+ gregorio_free_notes(&glyph->u.notes.first_note);
+ break;
+ case GRE_SPACE:
+ free(glyph->u.misc.unpitched.info.ad_hoc_space_factor);
+ break;
+ default:
+ /* nothing to do */
+ break;
+ }
+ free(glyph);
+}
+
+void gregorio_free_one_glyph(gregorio_glyph **glyph)
+{
+ gregorio_glyph *next = NULL;
+ gregorio_not_null_ptr(glyph, gregorio_free_one_glyph, return);
+ if ((*glyph)->next) {
+ (*glyph)->next->previous = NULL;
+ next = (*glyph)->next;
+ }
+ if ((*glyph)->previous) {
+ (*glyph)->previous->next = NULL;
+ }
+ free_one_glyph(*glyph);
+ *glyph = next;
+}
+
+static void gregorio_free_glyphs(gregorio_glyph **glyph)
+{
+ gregorio_glyph *next_glyph;
+ gregorio_not_null(glyph, gregorio_free_glyphs, return);
+ while (*glyph) {
+ next_glyph = (*glyph)->next;
+ free_one_glyph(*glyph);
+ *glyph = next_glyph;
+ }
+}
+
+static gregorio_element *create_and_link_element(gregorio_element
+ **current_element)
+{
+ gregorio_element *element = gregorio_calloc(1, sizeof(gregorio_element));
+ element->previous = *current_element;
+ element->next = NULL;
+ if (*current_element) {
+ (*current_element)->next = element;
+ }
+ *current_element = element;
+
+ return element;
+}
+
+void gregorio_add_element(gregorio_element **current_element,
+ gregorio_glyph *first_glyph)
+{
+ gregorio_element *next = create_and_link_element(current_element);
+ next->type = GRE_ELEMENT;
+ next->u.first_glyph = first_glyph;
+}
+
+void gregorio_add_misc_element(gregorio_element **current_element,
+ gregorio_type type, gregorio_misc_element_info *info,
+ unsigned short texverb)
+{
+ gregorio_element *special = create_and_link_element(current_element);
+ special->type = type;
+ special->u.misc = *info;
+ special->texverb = texverb;
+
+ if (type == GRE_SPACE) {
+ /* this was copied into the glyph, so we need to clear it to avoid a
+ * double-free */
+ info->unpitched.info.ad_hoc_space_factor = NULL;
+ }
+}
+
+static __inline void free_one_element(gregorio_element *element)
+{
+ size_t i;
+ free_one_texverb(element->texverb);
+ for (i = 0; i < element->nabc_lines; i++) {
+ free(element->nabc[i]);
+ }
+ free(element->nabc);
+ switch (element->type) {
+ case GRE_ELEMENT:
+ gregorio_free_glyphs(&element->u.first_glyph);
+ break;
+ case GRE_SPACE:
+ free(element->u.misc.unpitched.info.ad_hoc_space_factor);
+ break;
+ default:
+ /* nothing to do */
+ break;
+ }
+ free(element);
+}
+
+void gregorio_free_one_element(gregorio_element **element)
+{
+ gregorio_element *next = NULL;
+ gregorio_element *to_free;
+ gregorio_not_null_ptr(element, gregorio_free_one_element, return);
+ to_free = *element;
+ if (to_free->next) {
+ to_free->next->previous = NULL;
+ next = to_free->next;
+ }
+ if (to_free->previous) {
+ to_free->previous->next = NULL;
+ }
+ /* The previous line is probably optimized out */
+ /* LCOV_EXCL_STOP */
+ free_one_element(to_free);
+ *element = next;
+}
+
+static void gregorio_free_elements(gregorio_element **element)
+{
+ gregorio_element *next;
+ if (!element || !*element) {
+ return;
+ }
+ while (*element) {
+ next = (*element)->next;
+ free_one_element(*element);
+ *element = next;
+ }
+}
+
+void gregorio_add_character(gregorio_character **current_character,
+ grewchar wcharacter)
+{
+ gregorio_character *element =
+ (gregorio_character *) gregorio_calloc(1, sizeof(gregorio_character));
+ element->is_character = 1;
+ element->cos.character = wcharacter;
+ element->next_character = NULL;
+ element->previous_character = *current_character;
+ if (*current_character) {
+ (*current_character)->next_character = element;
+ }
+ *current_character = element;
+}
+
+static void gregorio_free_one_character(gregorio_character *current_character)
+{
+ free(current_character);
+}
+
+void gregorio_free_characters(gregorio_character *current_character)
+{
+ gregorio_character *next_character;
+ gregorio_not_null(current_character, gregorio_free_characters, return);
+ while (current_character) {
+ next_character = current_character->next_character;
+ gregorio_free_one_character(current_character);
+ current_character = next_character;
+ }
+}
+
+void gregorio_go_to_first_character(const gregorio_character **character)
+{
+ const gregorio_character *tmp;
+ gregorio_not_null_ptr(character, gregorio_free_characters, return);
+ tmp = *character;
+ while (tmp->previous_character) {
+ tmp = tmp->previous_character;
+ }
+ *character = tmp;
+}
+
+void gregorio_begin_style(gregorio_character **current_character,
+ grestyle_style style)
+{
+ gregorio_character *element =
+ (gregorio_character *) gregorio_calloc(1, sizeof(gregorio_character));
+ element->is_character = 0;
+ element->cos.s.type = ST_T_BEGIN;
+ element->cos.s.style = style;
+ element->previous_character = *current_character;
+ element->next_character = NULL;
+ if (*current_character) {
+ (*current_character)->next_character = element;
+ }
+ *current_character = element;
+}
+
+void gregorio_end_style(gregorio_character **current_character,
+ grestyle_style style)
+{
+ gregorio_character *element =
+ (gregorio_character *) gregorio_calloc(1, sizeof(gregorio_character));
+ element->is_character = 0;
+ element->cos.s.type = ST_T_END;
+ element->cos.s.style = style;
+ element->next_character = NULL;
+ element->previous_character = *current_character;
+ if (*current_character) {
+ (*current_character)->next_character = element;
+ }
+ *current_character = element;
+}
+
+gregorio_character *gregorio_clone_characters(
+ const gregorio_character *source)
+{
+ gregorio_character *target = NULL, *current = NULL;
+
+ for (; source; source = source->next_character) {
+ gregorio_character *character = (gregorio_character *)
+ gregorio_calloc(1, sizeof(gregorio_character));
+ *character = *source;
+ character->next_character = NULL;
+
+ if (current) {
+ character->previous_character = current;
+ current = current->next_character = character;
+ } else {
+ character->previous_character = NULL;
+ target = current = character;
+ }
+ }
+
+ return target;
+}
+
+void gregorio_add_syllable(gregorio_syllable **current_syllable,
+ int number_of_voices, gregorio_element *elements[],
+ gregorio_character *first_character,
+ gregorio_character *first_translation_character,
+ gregorio_word_position position, char *abovelinestext,
+ gregorio_tr_centering translation_type, gregorio_nlba no_linebreak_area,
+ gregorio_euouae euouae, const gregorio_scanner_location *const loc,
+ const bool first_word, const bool clear)
+{
+ gregorio_syllable *next;
+ gregorio_element **tab;
+ int i;
+ gregorio_not_null(elements, gregorio_add_syllable, return);
+ gregorio_assert(number_of_voices == 1, gregorio_add_syllable,
+ "gregorio only supports one voice", return);
+ next = gregorio_calloc(1, sizeof(gregorio_syllable));
+ next->position = position;
+ next->no_linebreak_area = no_linebreak_area;
+ next->euouae = euouae;
+ next->text = first_character;
+ next->translation = first_translation_character;
+ next->translation_type = translation_type;
+ next->abovelinestext = abovelinestext;
+ next->first_word = first_word;
+ next->clear = clear;
+ if (loc) {
+ next->src_line = loc->first_line;
+ next->src_column = loc->first_column;
+ next->src_offset = loc->first_offset;
+ }
+ next->next_syllable = NULL;
+ next->previous_syllable = *current_syllable;
+ tab = (gregorio_element **) gregorio_malloc(number_of_voices *
+ sizeof(gregorio_element *));
+ for (i = 0; i < number_of_voices; i++) {
+ tab[i] = elements[i];
+ }
+ next->elements = tab;
+ if (*current_syllable) {
+ (*current_syllable)->next_syllable = next;
+ }
+ *current_syllable = next;
+}
+
+static void gregorio_free_one_syllable(gregorio_syllable **syllable,
+ int number_of_voices)
+{
+ int i;
+ gregorio_syllable *next;
+ gregorio_not_null_ptr(syllable, gregorio_free_one_syllable, return);
+ for (i = 0; i < number_of_voices; i++) {
+ gregorio_free_elements((struct gregorio_element **)
+ &((*syllable)->elements[i]));
+ }
+ if ((*syllable)->text) {
+ gregorio_free_characters((*syllable)->text);
+ }
+ if ((*syllable)->translation) {
+ gregorio_free_characters((*syllable)->translation);
+ }
+ free((*syllable)->abovelinestext);
+ next = (*syllable)->next_syllable;
+ if (next) {
+ next->previous_syllable = NULL;
+ }
+ free((*syllable)->elements);
+ free(*syllable);
+ *syllable = next;
+}
+
+static void gregorio_free_syllables(gregorio_syllable **syllable,
+ int number_of_voices)
+{
+ gregorio_not_null_ptr(syllable, gregorio_free_one_syllable, return);
+ while (*syllable) {
+ gregorio_free_one_syllable(syllable, number_of_voices);
+ }
+}
+
+gregorio_score *gregorio_new_score(void)
+{
+ gregorio_score *new_score = gregorio_calloc(1, sizeof(gregorio_score));
+ new_score->number_of_voices = 1;
+ gregorio_set_score_staff_lines(new_score, 4);
+ return new_score;
+}
+
+static void gregorio_free_score_infos(gregorio_score *score)
+{
+ gregorio_not_null(score, gregorio_free_score_infos, return);
+ /* don't free the strings coming from headers; they will be freed when the
+ * headers themselves are freed */
+ if (score->first_voice_info) {
+ gregorio_free_voice_infos(score->first_voice_info);
+ }
+}
+
+static void free_headers(gregorio_score *score) {
+ gregorio_header *header = score->headers;
+ while (header) {
+ gregorio_header *next = header->next;
+ free(header->name);
+ free(header->value);
+ free(header);
+ header = next;
+ }
+}
+
+void gregorio_free_score(gregorio_score *score)
+{
+ gregorio_not_null(score, gregorio_free_score, return);
+ if (score->first_syllable) {
+ gregorio_free_syllables(&(score->first_syllable),
+ score->number_of_voices);
+ }
+ gregorio_free_score_infos(score);
+ free_headers(score);
+ free(score);
+}
+
+void gregorio_add_voice_info(gregorio_voice_info **current_voice_info)
+{
+ gregorio_voice_info *next = gregorio_calloc(1, sizeof(gregorio_voice_info));
+ gregorio_assert(!*current_voice_info, gregorio_add_voice_info,
+ "since gregorio only supports once voice, this should only be "
+ "called once", (*current_voice_info)->next_voice_info = next);
+ *current_voice_info = next;
+}
+
+void gregorio_free_voice_infos(gregorio_voice_info *voice_info)
+{
+ gregorio_voice_info *next;
+ gregorio_not_null(voice_info, gregorio_free_voice_infos, return);
+ while (voice_info) {
+ next = voice_info->next_voice_info;
+ free(voice_info);
+ voice_info = next;
+ }
+}
+
+void gregorio_set_score_annotation(gregorio_score *score, char *annotation)
+{
+ int annotation_num;
+ gregorio_not_null(score, gregorio_set_score_annotation, return);
+ /* save the annotation in the first spare place. */
+ for (annotation_num = 0; annotation_num < MAX_ANNOTATIONS; ++annotation_num) {
+ if (score->annotation[annotation_num] == NULL) {
+ score->annotation[annotation_num] = annotation;
+ break;
+ }
+ }
+ if (annotation_num >= MAX_ANNOTATIONS) {
+ gregorio_message(_("too many annotations"),
+ "gregorio_set_annotation", VERBOSITY_WARNING, 0);
+ }
+}
+
+void gregorio_set_score_staff_lines(gregorio_score *const score,
+ const char staff_lines)
+{
+ gregorio_not_null(score, gregorio_set_score_staff_lines, return);
+ if (staff_lines < 2 || staff_lines > 5) {
+ gregorio_message(_("invalid number of staff lines"),
+ "gregorio_set_score_staff_lines", VERBOSITY_ERROR, 0);
+ return;
+ }
+ score->staff_lines = staff_lines;
+ score->highest_pitch = LOWEST_PITCH + 4 + (2 * staff_lines);
+ score->high_ledger_line_pitch = score->highest_pitch - 1;
+ score->virgula_far_pitch = score->highest_pitch - 6;
+
+ gregorio_assert(score->highest_pitch <= MAX_PITCH,
+ gregorio_set_score_staff_lines, "highest pitch exceeds MAX_PITCH",
+ return);
+}
+
+void gregorio_add_score_header(gregorio_score *score, char *name, char *value)
+{
+ gregorio_header *header;
+ gregorio_not_null(score, gregorio_add_score_header, return);
+ header = (gregorio_header *)gregorio_malloc(sizeof(gregorio_header));
+ header->name = name;
+ header->value = value;
+ header->next = NULL;
+ if (score->last_header) {
+ score->last_header->next = header;
+ } else {
+ score->headers = header;
+ }
+ score->last_header = header;
+}
+
+/**********************************
+ *
+ * A function to build an integer from a key, very useful to represent
+ * it in the structure.
+ *
+ *The representation is :
+ *
+ * * 1 for a C key on the first (bottom) line
+ * * 3 for a C key on the second line
+ * * 5 for a C key on the third line (default key)
+ * * 7 for a C key on the fourth line
+ * * 9 for a C key on the fifth line
+ *
+ * * -2 for a F key on the first line
+ * * 0 for a F key on the second line
+ * * 2 for a F key on the third line
+ * * 4 for a F key on the fourth line
+ * * 6 for a F key on the fifth line
+ *
+ *********************************/
+
+int gregorio_calculate_new_key(gregorio_clef_info clef)
+{
+ switch (clef.clef) {
+ case CLEF_C:
+ return (2 * clef.line) - 1;
+ break;
+ case CLEF_F:
+ return (2 * clef.line) - 4;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregorio_calculate_new_key, "can't calculate key");
+ return NO_KEY;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/* shape is an output parameter */
+static __inline signed char next_pitch_from_glyph(const gregorio_glyph *glyph,
+ gregorio_shape *const alterations, gregorio_shape *const shape)
+{
+ while (glyph) {
+ if (glyph->type == GRE_GLYPH) {
+ if (glyph->u.notes.glyph_type == G_ALTERATION) {
+ const gregorio_note *note;
+ for (note = glyph->u.notes.first_note; note;
+ note = note->next) {
+ switch (note->u.note.shape) {
+ case S_FLAT:
+ case S_SHARP:
+ case S_NATURAL:
+ if (note->u.note.pitch >= LOWEST_PITCH &&
+ note->u.note.pitch <= MAX_PITCH) {
+ alterations[note->u.note.pitch] =
+ note->u.note.shape;
+ }
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(next_pitch_from_glyph,
+ "unrecognized alteration shape: %s",
+ gregorio_shape_to_string(note->u.note.shape));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ }
+ } else if (glyph->u.notes.first_note) {
+ assert(glyph->u.notes.first_note->type == GRE_NOTE);
+ if (shape) {
+ *shape = alterations[
+ glyph->u.notes.first_note->u.note.pitch];
+ }
+ return glyph->u.notes.first_note->u.note.pitch;
+ }
+ }
+ glyph = glyph->next;
+ }
+ return 0;
+}
+
+/* shape is an output parameter */
+static signed char syllable_first_note(const gregorio_syllable *syllable,
+ gregorio_shape *const alterations, gregorio_shape *const shape)
+{
+ gregorio_element *element;
+ gregorio_glyph *glyph;
+ signed char pitch;
+ gregorio_not_null(syllable, syllable_first_note, return 0);
+ element = syllable->elements[0];
+ while (element) {
+ if (element->type == GRE_CUSTOS) {
+ return element->u.misc.pitched.pitch;
+ }
+ if (element->type == GRE_ELEMENT && element->u.first_glyph) {
+ glyph = element->u.first_glyph;
+ pitch = next_pitch_from_glyph(glyph, alterations, shape);
+ if (pitch) {
+ return pitch;
+ }
+ }
+ element = element->next;
+ }
+ return 0;
+}
+
+/* shape is an output parameter */
+signed char gregorio_determine_next_pitch(const gregorio_syllable *syllable,
+ const gregorio_element *element, const gregorio_glyph *glyph,
+ gregorio_shape *const shape)
+{
+ signed char pitch;
+ gregorio_shape alterations[MAX_PITCH + 1];
+
+ memset(alterations, 0, sizeof alterations);
+
+ if (shape) {
+ *shape = S_UNDETERMINED;
+ }
+ gregorio_not_null(element, gregorio_determine_next_pitch,
+ return DUMMY_PITCH);
+ gregorio_not_null(syllable, gregorio_determine_next_pitch,
+ return DUMMY_PITCH);
+ /* we first explore the next glyphs to find a note, if there is one */
+ if (glyph) {
+ glyph = glyph->next;
+ pitch = next_pitch_from_glyph(glyph, alterations, shape);
+ if (pitch) {
+ return pitch;
+ }
+ }
+ /* then we do the same with the elements */
+ element = element->next;
+ while (element) {
+ if (element->type == GRE_CUSTOS) {
+ return element->u.misc.pitched.pitch;
+ }
+ if (element->type == GRE_ELEMENT && element->u.first_glyph) {
+ glyph = element->u.first_glyph;
+ pitch = next_pitch_from_glyph(glyph, alterations, shape);
+ if (pitch) {
+ return pitch;
+ }
+ } /* I think this is optimized out; LCOV_EXCL_LINE */
+ element = element->next;
+ }
+
+ /* then we do the same with the syllables */
+ syllable = syllable->next_syllable;
+ while (syllable) {
+ /* we call another function that will return the pitch of the first
+ * note if syllable has a note, and 0 else */
+ pitch = syllable_first_note(syllable, alterations, shape);
+ if (pitch) {
+ return pitch;
+ }
+ syllable = syllable->next_syllable;
+ }
+ /* here it means that there is no next note, so we return a stupid value,
+ * but it won' t be used */
+ if (shape) {
+ *shape = S_UNDETERMINED;
+ }
+ return DUMMY_PITCH;
+}
+
+/**********************************
+ *
+ * A function called after the entire score is determined : we check
+ * if the first element is a key change, if it is the case we delete
+ * it and we update the score->voice-info->initial_key. Works in
+ * polyphony.
+ *
+ ******************************/
+
+void gregorio_fix_initial_keys(gregorio_score *score,
+ gregorio_clef_info default_clef)
+{
+ gregorio_element *element;
+ gregorio_voice_info *voice_info;
+ int i;
+ char to_delete = 1;
+
+ gregorio_not_null(score, gregorio_fix_initial_keys, return);
+ gregorio_not_null(score->first_voice_info, gregorio_fix_initial_keys,
+ return);
+ if (!score->first_syllable) {
+ /* valid but almost nonsense: a score with no syllables */
+ return;
+ }
+ voice_info = score->first_voice_info;
+ for (i = 0; i < score->number_of_voices; i++) {
+ element = score->first_syllable->elements[i];
+ if (element && element->type == GRE_CLEF) {
+ voice_info->initial_clef = element->u.misc.clef;
+ gregorio_free_one_element(&(score->first_syllable->elements[i]));
+ gregorio_messagef("gregorio_fix_initial_keys", VERBOSITY_INFO, 0,
+ _("in voice %d the first element is a key definition, "
+ "considered as initial key"), i + 1);
+ }
+ voice_info = voice_info->next_voice_info;
+ }
+
+ /* then we suppress syllables that contain nothing anymore : case of (c2)
+ * at beginning of files */
+
+ for (i = 0; i < score->number_of_voices; i++) {
+ if (score->first_syllable->elements[i]) {
+ to_delete = 0;
+ break;
+ }
+ }
+
+ if (to_delete) {
+ gregorio_free_one_syllable(&(score->first_syllable),
+ score->number_of_voices);
+ }
+ /* finally we initialize voice infos that have no initial key to default
+ * key */
+
+ voice_info = score->first_voice_info;
+
+ for (i = 0; i < score->number_of_voices; i++) {
+ if (!voice_info->initial_clef.line) {
+ voice_info->initial_clef = default_clef;
+ gregorio_messagef("gregorio_fix_initial_keys", VERBOSITY_INFO, 0,
+ _("no initial key definition in voice %d, default key "
+ "definition applied"), i + 1);
+ }
+ voice_info = voice_info->next_voice_info;
+ }
+}
+
+/**********************************
+ *
+ * A small function to determine if an element list contains only
+ * special elements (bar, key-change, etc.), useful because the
+ * representation (in xml for example) may vary according to it.
+ *
+ *********************************/
+
+bool gregorio_is_only_special(gregorio_element *element)
+{
+ gregorio_not_null(element, gregorio_is_only_special, return 0);
+ while (element) {
+ if (element->type == GRE_ELEMENT) {
+ return 0;
+ }
+ element = element->next;
+ }
+ return 1;
+}
+
+/* This should only be called when an unknown enum value is encountered; as
+ * such, this is a programming error */
+/* LCOV_EXCL_START */
+const char *gregorio_unknown(int value) {
+ static char buf[20];
+ gregorio_snprintf(buf, sizeof buf, "?%d", value);
+ return buf;
+}
+/* LCOV_EXCL_STOP */
+
+/*
+ * A small helper for the following function
+ */
+
+static __inline bool is_clef(gregorio_type x)
+{
+ return x == GRE_CLEF;
+}
+
+/*
+ * This function is used in write_syllable, it detects if the syllable is like
+ * (c4), (::c4), (z0c4) or (z0::c4). It returns the gregorio_element of the
+ * clef change.
+ */
+gregorio_element *gregorio_get_clef_change(gregorio_syllable *syllable)
+{
+ gregorio_element *element;
+ gregorio_assert(syllable && syllable->elements && syllable->elements[0],
+ gregoriotex_syllable_is_clef_change, "invalid syllable",
+ return NULL);
+ element = syllable->elements[0];
+ /* we just detect the foud cases */
+ if (element->type == GRE_CUSTOS && element->next
+ && (is_clef(element->next->type)) && !element->next->next) {
+ return element->next;
+ }
+ if (element->type == GRE_BAR && element->next
+ && (is_clef(element->next->type)) && !element->next->next) {
+ return element->next;
+ }
+ if ((is_clef(element->type)) && !element->next) {
+ return element;
+ }
+ if (element->type == GRE_CUSTOS && element->next
+ && element->next->type == GRE_BAR && element->next->next
+ && (is_clef(element->next->next->type))
+ && !element->next->next->next) {
+ return element->next->next;
+ }
+ return NULL;
+}
+
+unsigned short gregorio_add_hepisema_adjustment(
+ const gregorio_hepisema_vbasepos vbasepos, char *const nudge)
+{
+ if (hepisema_adjustments_last == USHRT_MAX) {
+ /* It's not reasonable to trigger this condition while testing */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("too many horizontal episema adjustments"),
+ "gregorio_add_hepisema_adjustment", VERBOSITY_ERROR, 0);
+ return 0;
+ /* LCOV_EXCL_STOP */
+ }
+ ++hepisema_adjustments_last;
+ if (hepisema_adjustments_last >= hepisema_adjustments_capacity) {
+ hepisema_adjustments = gregorio_grow_buffer(hepisema_adjustments,
+ &hepisema_adjustments_capacity, gregorio_hepisema_adjustment);
+ }
+ hepisema_adjustments[hepisema_adjustments_last].vbasepos = vbasepos;
+ hepisema_adjustments[hepisema_adjustments_last].nudge = nudge;
+ hepisema_adjustments[hepisema_adjustments_last].pitch_extremum = NO_PITCH;
+ return hepisema_adjustments_last;
+}
+
+gregorio_hepisema_adjustment *gregorio_get_hepisema_adjustment(
+ const unsigned short index)
+{
+ gregorio_assert(index <= hepisema_adjustments_last,
+ gregorio_get_hepisema_adjustment, "array index out of bounds",
+ return &hepisema_adjustments[0]);
+ return &hepisema_adjustments[index];
+}
+
+const char *gregorio_texverb(unsigned short index)
+{
+ gregorio_assert(index <= texverbs_last, gregorio_texverb,
+ "array index out of bounds", return NULL);
+ return texverbs[index];
+}
+
+void gregorio_change_texverb(unsigned short index, char *texverb)
+{
+ /* not allowed to change index 0 (== NULL) */
+ gregorio_assert(index != 0, gregorio_texverb,
+ "array index 0 may not be changed", return);
+ gregorio_assert(index <= texverbs_last, gregorio_texverb,
+ "array index out of bounds", return);
+ if (texverbs[index]) {
+ free(texverbs[index]);
+ }
+ texverbs[index] = texverb;
+}
+
+ENUM_TO_STRING(gregorio_type, GREGORIO_TYPE)
+ENUM_TO_STRING(gregorio_shape, GREGORIO_SHAPE)
+ENUM_TO_STRING(gregorio_bar, GREGORIO_BAR)
+ENUM_TO_STRING(gregorio_sign, GREGORIO_SIGN)
+ENUM_TO_STRING(gregorio_space, GREGORIO_SPACE)
+ENUM_TO_STRING(gregorio_liquescentia, GREGORIO_LIQUESCENTIA)
+ENUM_TO_STRING(grehepisema_size, GREHEPISEMA_SIZE)
+ENUM_TO_STRING(gregorio_vposition, GREGORIO_VPOSITION)
+ENUM_TO_STRING(gregorio_glyph_type, GREGORIO_GLYPH_TYPE)
+ENUM_TO_STRING(grestyle_style, GRESTYLE_STYLE)
+ENUM_TO_STRING(gregorio_tr_centering, GREGORIO_TR_CENTERING)
+ENUM_TO_STRING(gregorio_nlba, GREGORIO_NLBA)
+ENUM_TO_STRING(gregorio_euouae, GREGORIO_EUOUAE)
+ENUM_TO_STRING(gregorio_word_position, GREGORIO_WORD_POSITION)
+ENUM_TO_STRING(gregorio_hepisema_vbasepos, GREGORIO_HEPISEMA_VBASEPOS)
diff --git a/Build/source/texk/gregorio/gregorio-src/src/struct.h b/Build/source/texk/gregorio/gregorio-src/src/struct.h
new file mode 100644
index 00000000000..39fc7fbde29
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/struct.h
@@ -0,0 +1,984 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header defines the Gregorio data structures and functions.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file
+ * The file starts by the definition of all the structures used in
+ * gregorio. As it is certainly the most important file for
+ * understanding, read it carefully.
+ */
+
+#include "unicode.h"
+
+#ifndef STRUCT_H
+#define STRUCT_H
+
+#include <assert.h>
+#include "enum_generator.h"
+#include "bool.h"
+#include "sha1.h"
+#include "messages.h"
+
+#ifdef __cplusplus
+#define ENUM_BITFIELD(TYPE) enum TYPE
+#elif defined(__GNUC__) && __GNUC__ >= 2
+#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
+#else
+#define ENUM_BITFIELD(TYPE) unsigned int
+#endif
+
+/* Lilypond-compatible location counters */
+typedef struct gregorio_scanner_location {
+ /* - line is the 1-based line number
+ * - column is the 0-based* column number, tabs expanded to 8-column stops
+ * - offset is the 0-based number of characters from the start of the line
+ *
+ * * = column is calculated and stored as a 0-based number so the tabstop
+ * math is simpler; it should be printed 1-based */
+
+ unsigned short first_line;
+ unsigned short first_column;
+ unsigned short first_offset;
+ unsigned short last_line;
+ unsigned short last_column;
+ unsigned short last_offset;
+ bool generate_point_and_click:1;
+} gregorio_scanner_location;
+
+/* all the different types of things a gregorio_* can be */
+
+#define GREGORIO_TYPE(A,E,X,L) \
+ A(GRE_NOTE, 1) \
+ E(GRE_GLYPH) \
+ E(GRE_ELEMENT) \
+ E(GRE_CLEF) \
+ E(GRE_END_OF_LINE) \
+ E(GRE_SPACE) \
+ E(GRE_BAR) \
+ E(GRE_CUSTOS) \
+ E(GRE_MANUAL_CUSTOS) \
+ E(GRE_SUPPRESS_CUSTOS) \
+ /* I don't really know how I could use the a TEXVERB_NOTE in gregoriotex,
+ * as we don't write note by note... */ \
+ /* GRE_TEXVERB_NOTE, */ \
+ E(GRE_TEXVERB_GLYPH) \
+ E(GRE_TEXVERB_ELEMENT) \
+ /* above lines text, quite the same as GRE_TEXVERB_ELEMENT, but counted
+ * differently for the spaces above the lines */ \
+ E(GRE_ALT) \
+ E(GRE_NLBA) \
+ E(GRE_AUTOFUSE_START) \
+ L(GRE_AUTOFUSE_END)
+ENUM(gregorio_type, GREGORIO_TYPE);
+
+#define GREGORIO_CLEF(A,E,X,L) \
+ A(CLEF_C, 0) \
+ X(CLEF_F, 1)
+ENUM(gregorio_clef, GREGORIO_CLEF);
+
+/* the different shapes, only for notes */
+
+#define GREGORIO_SHAPE(A,E,X,L) \
+ A(S_UNDETERMINED, 0) \
+ E(S_PUNCTUM) \
+ E(S_PUNCTUM_END_OF_GLYPH) \
+ E(S_PUNCTUM_INCLINATUM_ASCENDENS) \
+ E(S_PUNCTUM_INCLINATUM_STANS) \
+ E(S_PUNCTUM_INCLINATUM_DESCENDENS) \
+ E(S_PUNCTUM_INCLINATUM_DEMINUTUS) \
+ E(S_PUNCTUM_INCLINATUM_AUCTUS) \
+ E(S_VIRGA) \
+ E(S_VIRGA_REVERSA) \
+ E(S_BIVIRGA) \
+ E(S_TRIVIRGA) \
+ E(S_ORISCUS_ASCENDENS) \
+ E(S_ORISCUS_DESCENDENS) \
+ E(S_ORISCUS_DEMINUTUS) \
+ E(S_ORISCUS_SCAPUS_ASCENDENS) \
+ E(S_ORISCUS_SCAPUS_DESCENDENS) \
+ E(S_QUILISMA) \
+ E(S_STROPHA) \
+ E(S_STROPHA_AUCTA) \
+ E(S_DISTROPHA) \
+ E(S_TRISTROPHA) \
+ E(S_LINEA_PUNCTUM) \
+ E(S_FLAT) \
+ E(S_SHARP) \
+ E(S_NATURAL) \
+ /* special shapes that must not appear in the final form of the score :
+ * quadratum is the shape of the first note of a punctum quadratum
+ * and quilisma quadratum is the shape of the first note of a pes
+ * quislisma quadratum */ \
+ E(S_ORISCUS_UNDETERMINED) \
+ E(S_ORISCUS_SCAPUS_UNDETERMINED) \
+ E(S_QUADRATUM) \
+ E(S_PUNCTUM_INCLINATUM_UNDETERMINED) \
+ /* those shapes are for now used only in gregoriotex */ \
+ E(S_QUILISMA_QUADRATUM) \
+ E(S_PUNCTUM_AUCTUS_ASCENDENS) \
+ E(S_PUNCTUM_AUCTUS_DESCENDENS) \
+ E(S_PUNCTUM_DEMINUTUS) \
+ L(S_LINEA)
+ENUM(gregorio_shape, GREGORIO_SHAPE);
+
+/* the different kind of bars */
+
+#define GREGORIO_BAR(A,E,X,L) \
+ A(B_NO_BAR, 0) \
+ E(B_VIRGULA) \
+ E(B_DIVISIO_MINIMA) \
+ E(B_DIVISIO_MINOR) \
+ E(B_DIVISIO_MAIOR) \
+ E(B_DIVISIO_FINALIS) \
+ E(B_DIVISIO_MINOR_D1) \
+ E(B_DIVISIO_MINOR_D2) \
+ E(B_DIVISIO_MINOR_D3) \
+ E(B_DIVISIO_MINOR_D4) \
+ E(B_DIVISIO_MINOR_D5) \
+ E(B_DIVISIO_MINOR_D6) \
+ E(B_DIVISIO_MINOR_D7) \
+ E(B_DIVISIO_MINOR_D8) \
+ E(B_VIRGULA_HIGH) \
+ E(B_DIVISIO_MINIMA_HIGH) \
+ E(B_DIVISIO_MAIOR_DOTTED) \
+ E(B_DIVISIO_MINIMIS) \
+ L(B_DIVISIO_MINIMIS_HIGH)
+ENUM(gregorio_bar, GREGORIO_BAR);
+
+/* definition of the signs. You can notice that the values are made so
+ * that if you wan to add a vertical episema to a note, you juste
+ * make note->signs+=_V_EPISEMA, so please don't change the value as
+ * this trick is used. */
+
+#define GREGORIO_SIGN(A,E,X,L) \
+ A(_NO_SIGN, 0x00) \
+ A(_PUNCTUM_MORA, 0x01) \
+ A(_AUCTUM_DUPLEX, 0x02) \
+ A(_V_EPISEMA, 0x10) \
+ A(_V_EPISEMA_PUNCTUM_MORA, 0x11) \
+ A(_V_EPISEMA_AUCTUM_DUPLEX, 0x12) \
+ /* more rare signs, for now they can't be used with the others */ \
+ A(_ACCENTUS, 0x03) \
+ A(_ACCENTUS_REVERSUS, 0x04) \
+ A(_CIRCULUS, 0x05) \
+ A(_SEMI_CIRCULUS, 0x06) \
+ A(_SEMI_CIRCULUS_REVERSUS, 0x07) \
+ /* signs of a bar */ \
+ A(_BAR_H_EPISEMA, 0x08) \
+ A(_V_EPISEMA_BAR_H_EPISEMA, 0x18) \
+ /* musica ficta */ \
+ A(_MUSICA_FICTA_FLAT, 0x09) \
+ A(_MUSICA_FICTA_NATURAL, 0x0a) \
+ X(_MUSICA_FICTA_SHARP, 0x0b)
+ENUM(gregorio_sign, GREGORIO_SIGN);
+
+/* the different spaces */
+
+#define GREGORIO_SPACE(A,E,X,L) \
+ A(SP_DEFAULT, 1) \
+ E(SP_NO_SPACE) \
+ E(SP_ZERO_WIDTH) \
+ E(SP_HALF_SPACE) \
+ E(SP_INTERGLYPH_SPACE) \
+ E(SP_NEUMATIC_CUT) \
+ E(SP_LARGER_SPACE) \
+ E(SP_GLYPH_SPACE) \
+ E(SP_AD_HOC_SPACE) \
+ E(SP_NEUMATIC_CUT_NB) \
+ E(SP_LARGER_SPACE_NB) \
+ E(SP_GLYPH_SPACE_NB) \
+ L(SP_AD_HOC_SPACE_NB)
+ENUM(gregorio_space, GREGORIO_SPACE);
+
+/* the different liquescences, like for the signs, have special
+ * values: to say that something is initio_debilis, just do
+ * glyph->liquescentia+=L_INITIO_DEBILIS. So don't change the value,
+ * the trick is much used */
+
+#define TAIL_LIQUESCENTIA_MASK 0x07
+
+#define GREGORIO_LIQUESCENTIA(A,E,X,L) \
+ A(L_NO_LIQUESCENTIA, 0x00) \
+ A(L_DEMINUTUS, 0x01) \
+ A(L_AUCTUS_ASCENDENS, 0x02) \
+ A(L_AUCTUS_DESCENDENS, 0x04) \
+ A(L_INITIO_DEBILIS, 0x10) \
+ A(L_DEMINUTUS_INITIO_DEBILIS, 0x11) \
+ A(L_AUCTUS_ASCENDENS_INITIO_DEBILIS, 0x12) \
+ A(L_AUCTUS_DESCENDENS_INITIO_DEBILIS, 0x14) \
+ A(L_FUSED, 0x20) \
+ A(L_FUSED_DEMINUTUS, 0x21) \
+ A(L_FUSED_AUCTUS_ASCENDENS, 0x22) \
+ X(L_FUSED_AUCTUS_DESCENDENS, 0x24)
+ENUM(gregorio_liquescentia, GREGORIO_LIQUESCENTIA);
+
+#define GREHEPISEMA_SIZE(A,E,X,L) \
+ A(H_NORMAL, 0) \
+ E(H_SMALL_LEFT) \
+ E(H_SMALL_CENTRE) \
+ L(H_SMALL_RIGHT)
+ENUM(grehepisema_size, GREHEPISEMA_SIZE);
+
+/* values are chosen so BELOW/ABOVE can be added to a pitch */
+#define GREGORIO_VPOSITION(A,E,X,L) \
+ A(VPOS_AUTO, 0) \
+ A(VPOS_BELOW, -1) \
+ X(VPOS_ABOVE, 1)
+ENUM(gregorio_vposition, GREGORIO_VPOSITION);
+
+/* The different types of glyph */
+
+#define GREGORIO_GLYPH_TYPE(A,E,X,L) \
+ A(G_PUNCTUM_INCLINATUM, 1) \
+ E(G_2_PUNCTA_INCLINATA_DESCENDENS) \
+ E(G_3_PUNCTA_INCLINATA_DESCENDENS) \
+ E(G_4_PUNCTA_INCLINATA_DESCENDENS) \
+ E(G_5_PUNCTA_INCLINATA_DESCENDENS) \
+ E(G_2_PUNCTA_INCLINATA_ASCENDENS) \
+ E(G_3_PUNCTA_INCLINATA_ASCENDENS) \
+ E(G_4_PUNCTA_INCLINATA_ASCENDENS) \
+ E(G_5_PUNCTA_INCLINATA_ASCENDENS) \
+ E(G_PUNCTA_INCLINATA) \
+ /* !!! DO NOT CHANGE THE ENUM ORDERING BEFORE THIS LINE !!! */ \
+ E(G_UNDETERMINED) \
+ E(G_VIRGA) \
+ E(G_STROPHA) \
+ E(G_STROPHA_AUCTA) \
+ E(G_PUNCTUM) \
+ E(G_ALTERATION) \
+ E(G_PODATUS) \
+ E(G_PES_QUADRATUM) \
+ E(G_FLEXA) \
+ E(G_TORCULUS) \
+ E(G_TORCULUS_RESUPINUS) \
+ E(G_TORCULUS_RESUPINUS_FLEXUS) \
+ E(G_PORRECTUS) \
+ E(G_PORRECTUS_FLEXUS) \
+ E(G_BIVIRGA) \
+ E(G_TRIVIRGA) \
+ E(G_DISTROPHA) \
+ E(G_DISTROPHA_AUCTA) \
+ E(G_TRISTROPHA) \
+ E(G_TRISTROPHA_AUCTA) \
+ E(G_PES_QUADRATUM_FIRST_PART) \
+ E(G_SCANDICUS) \
+ E(G_PES_QUILISMA_QUADRATUM_FIRST_PART) \
+ E(G_ANCUS) \
+ E(G_PUNCTA_ASCENDENS) \
+ E(G_PUNCTA_DESCENDENS) \
+ E(G_VIRGA_REVERSA) \
+ E(G_SALICUS) \
+ E(G_SALICUS_FLEXUS) \
+ E(G_PES_ASCENDENS_ORISCUS) \
+ E(G_PES_DESCENDENS_ORISCUS) \
+ E(G_TORCULUS_LIQUESCENS) \
+ /* additional glyph types, necessary for determination */ \
+ E(G_PORRECTUS_NO_BAR) \
+ E(G_PORRECTUS_FLEXUS_NO_BAR) \
+ L(G_FUSED)
+ENUM(gregorio_glyph_type, GREGORIO_GLYPH_TYPE);
+
+/*
+ *
+ * The we define the characters. First we define the different styles. You
+ * can notice that center is just a style like the others
+ *
+ */
+
+#define GRESTYLE_STYLE(A,E,X,L) \
+ A(ST_NO_STYLE, 0) \
+ E(ST_ITALIC) \
+ E(ST_CENTER) \
+ /* when the user types a {}, basically the same behaviour, except for
+ * the initial */ \
+ E(ST_FORCED_CENTER) \
+ E(ST_BOLD) \
+ E(ST_TT) \
+ E(ST_SMALL_CAPS) \
+ E(ST_SPECIAL_CHAR) \
+ E(ST_VERBATIM) \
+ E(ST_INITIAL) /* a style used to determine the initial */ \
+ E(ST_UNDERLINED) \
+ E(ST_COLORED) \
+ E(ST_ELISION) \
+ E(ST_FIRST_WORD) \
+ E(ST_FIRST_SYLLABLE) \
+ E(ST_FIRST_SYLLABLE_INITIAL) \
+ E(ST_SYLLABLE_INITIAL) \
+ /* protrusion is implemented a PROTRUSION_FACTOR followed by a PROTRUSION;
+ * an automatic protrusion will have a verbatim TeX macro as factor */ \
+ E(ST_PROTRUSION_FACTOR) \
+ E(ST_PROTRUSION) \
+ L(ST_SENTINEL) /* a temporary style to signify the end of a syllable */
+ENUM(grestyle_style, GRESTYLE_STYLE);
+
+/*
+ * Then the different types of styles. See the next comments for further
+ * readings.
+ */
+
+#define GRESTYLE_TYPE(A,E,X,L) \
+ A(ST_T_NOTHING, 0) \
+ E(ST_T_BEGIN) \
+ L(ST_T_END)
+ENUM(grestyle_type, GRESTYLE_TYPE);
+
+/*
+ * The different types of translation centerings
+ */
+
+#define GREGORIO_TR_CENTERING(A,E,X,L) \
+ A(TR_NORMAL, 0) \
+ E(TR_WITH_CENTER_BEGINNING) \
+ L(TR_WITH_CENTER_END)
+ENUM(gregorio_tr_centering, GREGORIO_TR_CENTERING);
+
+/*
+ * Nothing, beginning or end of area without linebreak
+ */
+
+#define GREGORIO_NLBA(A,E,X,L) \
+ A(NLBA_NORMAL, 0) \
+ E(NLBA_BEGINNING) \
+ L(NLBA_END)
+ENUM(gregorio_nlba, GREGORIO_NLBA);
+
+#define GREGORIO_EUOUAE(A,E,X,L) \
+ A(EUOUAE_NORMAL, 0) \
+ E(EUOUAE_BEGINNING) \
+ L(EUOUAE_END)
+ENUM(gregorio_euouae, GREGORIO_EUOUAE);
+
+#define GREGORIO_WORD_POSITION(A,E,X,L) \
+ A(WORD_BEGINNING, 1) \
+ E(WORD_MIDDLE) \
+ E(WORD_END) \
+ L(WORD_ONE_SYLLABLE)
+ENUM(gregorio_word_position, GREGORIO_WORD_POSITION);
+
+#define GREGORIO_SIGN_ORIENTATION(A,E,X,L) \
+ A(SO_OVER, 0) \
+ X(SO_UNDER, 1)
+ENUM(gregorio_sign_orientation, GREGORIO_SIGN_ORIENTATION);
+
+/* the numeric values will be directly passed to TeX */
+#define GREGORIO_HEPISEMA_VBASEPOS(A,E,X,L) \
+ A(HVB_AUTO, 0) \
+ A(HVB_MIDDLE, 1) \
+ A(HVB_O_LOW, 2) \
+ A(HVB_O_HIGH, 3) \
+ A(HVB_U_LOW, 4) \
+ X(HVB_U_HIGH, 5)
+ENUM(gregorio_hepisema_vbasepos, GREGORIO_HEPISEMA_VBASEPOS);
+
+/* these may be used as bit fields, with LEDGER_EXPLICIT and LEDGER_DRAWN being
+ * the bits */
+#define GREGORIO_LEDGER_SPECIFICITY(A,E,X,L) \
+ A(LEDGER_SUPPOSED, 0) \
+ A(LEDGER_EXPLICIT, 1) \
+ A(LEDGER_DRAWN, 2) \
+ X(LEDGER_EXPLICITLY_DRAWN, 3)
+ENUM(gregorio_ledger_specificity, GREGORIO_LEDGER_SPECIFICITY);
+
+typedef struct gregorio_extra_info {
+ char *ad_hoc_space_factor;
+ ENUM_BITFIELD(gregorio_bar) bar:5;
+ ENUM_BITFIELD(gregorio_space) space:4;
+ ENUM_BITFIELD(gregorio_nlba) nlba:2;
+ bool eol_ragged:1;
+ bool eol_forces_custos:1;
+ bool eol_forces_custos_on:1;
+} gregorio_extra_info;
+
+typedef struct gregorio_clef_info {
+ signed char line;
+ signed char secondary_line;
+ signed char pitch_difference;
+ ENUM_BITFIELD(gregorio_clef) clef:1;
+ bool flatted:1;
+ ENUM_BITFIELD(gregorio_clef) secondary_clef:1;
+ bool secondary_flatted:1;
+} gregorio_clef_info;
+
+typedef union gregorio_misc_element_info {
+ /* pitched is used for GRE_CUSTOS */
+ struct {
+ /* The pitch of the glyph. */
+ signed char pitch;
+ /* boolean indicating whether the pitch is forced */
+ bool force_pitch:1;
+ } pitched;
+ /* clef is used for GRE_CLEF */
+ struct gregorio_clef_info clef;
+ /* unpitched is used for everything else */
+ struct {
+ struct gregorio_extra_info info;
+ /* an element might carry a sign. */
+ ENUM_BITFIELD(gregorio_sign) special_sign:8;
+ } unpitched;
+} gregorio_misc_element_info;
+
+/*
+ * ! We start with the most precise structure, the note structure. The
+ * note is always a real note (we'll see that glyphs and elements can be
+ * other things).
+ */
+typedef struct gregorio_note {
+ /* then two pointer to other notes, to make a chained list. */
+ struct gregorio_note *previous;
+ struct gregorio_note *next;
+ /* choral sign is a letter that appears next to a note in some choral
+ * scores we put it as char* because sometimes two letters appear */
+ char *choral_sign;
+ union {
+ /* note is used for GRE_NOTE */
+ struct {
+ /* the pitch is the height of the note on the score, that is to
+ * say the letter it is represented by in gabc. If a clef
+ * change, pitch will be a number indicating the line of the
+ * clef. */
+ signed char pitch;
+ /* shape is the shape of the note... if you want to know the
+ * different possible shapes, see above. */
+ ENUM_BITFIELD(gregorio_shape) shape:8;
+ /* liquescentia is the liquescence on the note, it is not really
+ * used in the final score, but it is, like type, used in the
+ * determination of glyphs. */
+ ENUM_BITFIELD(gregorio_liquescentia) liquescentia:7;
+ bool is_cavum:1;
+ } note;
+ /* clef is used for GRE_CLEF */
+ struct gregorio_clef_info clef;
+ /* other is used for everything else */
+ struct gregorio_extra_info other;
+ } u;
+
+ /* these go to the end for structure alignment */
+ /* index to a string containing a possible TeX verbatim; necessary during
+ * structure generation. */
+ unsigned short texverb;
+ unsigned short src_line, src_column, src_offset;
+ unsigned short he_adjustment_index[2];
+
+ /* we have seen that notes are always real notes, that is to say
+ * GRE_NOTE. the type is always that in the final structure. But there
+ * is however this field in the structure because of the temporary
+ * states that can appear in the determination, where notes can be
+ * other things. This is the case for example in gabc reading. */
+ ENUM_BITFIELD(gregorio_type) type:8;
+ /* signs is the signs on the notes, see above for all possible values */
+ ENUM_BITFIELD(gregorio_sign) signs:8;
+ /* special_sign is the sign we sometimes encounter on punctum cavum, like
+ * accentus, semi-circulus, etc. */
+ ENUM_BITFIELD(gregorio_sign) special_sign:8;
+ /* h_episema_type is the type of horizontal episema, possible values
+ * are H_ALONE for an isolated horizontal episema, H_MULTI_BEGINNING
+ * if the note is the first note of an episema on several notes,
+ * H_MULTI_MIDDLE if it is inside an episema on several notes. I let
+ * you guess what could be the use of H_MULTI_END. Other values are
+ * temporary values used in determination, they must not appear in the
+ * final structure. */
+
+ const char *gtex_offset_case;
+ signed char v_episema_height;
+ signed char h_episema_above;
+ signed char h_episema_below;
+ ENUM_BITFIELD(grehepisema_size) h_episema_above_size:2;
+ ENUM_BITFIELD(grehepisema_size) h_episema_below_size:2;
+ bool h_episema_above_connect:1;
+ bool h_episema_below_connect:1;
+ /* the "specificity" field indicates how to interpret the line flag */
+ bool high_ledger_line:1;
+ ENUM_BITFIELD(gregorio_ledger_specificity) high_ledger_specificity:2;
+ bool low_ledger_line:1;
+ ENUM_BITFIELD(gregorio_ledger_specificity) low_ledger_specificity:2;
+ bool is_lower_note:1;
+ bool is_upper_note:1;
+ ENUM_BITFIELD(gregorio_vposition) mora_vposition:2;
+ bool choral_sign_is_nabc:1;
+} gregorio_note;
+
+/*
+ * ! @brief The gregorio glyph structure Unlike gregorio_note, gregorio_glyph
+ * can be other things besides GRE_GLYPH: it can also be GRE_SPACE
+ */
+typedef struct gregorio_glyph {
+ /* two pointer to make a chained list */
+ struct gregorio_glyph *previous;
+ struct gregorio_glyph *next;
+ union {
+ /* glyph is used for GRE_GLYPH */
+ struct {
+ /* a pointer to a (chained list of) gregorio_notes, the first of
+ * the glyph. */
+ struct gregorio_note *first_note;
+ signed char fuse_to_next_glyph;
+ /* The glyph type for a GRE_GLYPH (porrectus, pes, etc.). They
+ * are all listed above. */
+ ENUM_BITFIELD(gregorio_glyph_type) glyph_type:8;
+ /* liquescentia is really used, because that will determine the
+ * shape we will have to use. */
+ ENUM_BITFIELD(gregorio_liquescentia) liquescentia:7;
+ bool is_cavum:1;
+ } notes;
+ union gregorio_misc_element_info misc;
+ } u;
+
+ /* index to a string containing a possible TeX verbatim; necessary during
+ * structure generation. */
+ unsigned short texverb;
+
+ /* type can have the values explained in the comment just above. */
+ ENUM_BITFIELD(gregorio_type) type:8;
+
+ /* There is no additional parameter for GRE_SPACE in a gregorio_glyph
+ * because gregorio_space in this case can have only one value:
+ * SP_ZERO_WIDTH, as other spaces would break the glyphs into
+ * different elements. */
+} gregorio_glyph;
+
+typedef struct gregorio_element {
+ /* pointers to the next and previous elements. */
+ struct gregorio_element *previous;
+ struct gregorio_element *next;
+ /* The nabc string */
+ char **nabc;
+ /* we put it here to get the length of the array here too */
+ size_t nabc_lines;
+ union {
+ /* first_glyph is used for GRE_ELEMENT */
+ /* a pointer to the first glyph of the element. */
+ struct gregorio_glyph *first_glyph;
+ union gregorio_misc_element_info misc;
+ } u;
+
+ /* index to a string containing a possible TeX verbatim; necessary during
+ * structure generation. */
+ unsigned short texverb;
+ /* type can have the values GRE_ELEMENT, GRE_BAR, GRE_CLEF, GRE_CUSTOS,
+ * GRE_END_OF_LINE, GRE_SPACE, GRE_TEXVERB_ELEMENT or GRE_NLBA */
+ ENUM_BITFIELD(gregorio_type) type:8;
+} gregorio_element;
+
+/*
+ *
+ * gregorio_characters are a bit specials. As there can be styles in the
+ * text, I had to find a structure mode adapted that just grewchar *. So
+ * basically a gregorio_character is a double-chained list of things that
+ * can be grewchar or gregorio_styles. For example if you type (in gabc)
+ * p<i>o</i>t, the corresponding gregorio_character list will be
+ * P->style(type: beginning, style italic) -> o -> style(type:end, style:
+ * italic). But for this list to be coherent, it is mandatory that it is
+ * xml-compliant, that is to say that a<b>c<i>d</b>e</i> will be
+ * interpreted as a<b>c<i>d</i></b><i>e</i>. This MUST be done when reading
+ * a file, so that the structure in memory is coherent. It makes input
+ * modules more comple, but output modules muche more simpler. The last
+ * particularity is that center must also be determined in the input
+ * modules, so that it is already defined in memory. But it is a bit more
+ * complex, because for TeX-like output modules, we need to close all
+ * styles before the center style: if the user types <i>pot</i> it must be
+ * represented as <i>p</i>{<i>o</i>}<i>t</i>.
+ *
+ * Here is the declaration of the gregorio_style struct. It is simply two
+ * chars, one telling the type of style character it is (beginning for a
+ * character that marks the beginning of a style, and end for a character
+ * marking the end of a style). The other char simply is the style
+ * represented by the character (italic, etc.)
+ *
+ */
+
+typedef struct gregorio_style {
+ ENUM_BITFIELD(grestyle_style) style:6;
+ ENUM_BITFIELD(grestyle_type) type:2;
+} gregorio_style;
+
+/*
+ *
+ * This union is quite ugly... but necessary for a gregorio_character to be
+ * able to be a grewchar or gregorio_style.
+ *
+ */
+typedef union character_or_style {
+ grewchar character;
+ struct gregorio_style s;
+} character_or_style;
+
+/*
+ *
+ * Finally the gregorio_character structure in itself, It is first a char
+ * determining the type (character or gregorio_style). This char is 0 when
+ * it is a style and something else when it is a character. Then the two
+ * pointers to build the double chained list, and finally the union. So
+ * when you want to access to the style of a gregorio_character (when you
+ * know it is a character of style), you must access to
+ * mygregoriochar.cos.s.style, and for the character
+ * mygregoriochar.cos.character .
+ *
+ */
+
+typedef struct gregorio_character {
+ bool is_character;
+ struct gregorio_character *next_character;
+ struct gregorio_character *previous_character;
+ union character_or_style cos;
+} gregorio_character;
+
+typedef struct gregorio_syllable {
+ /* pointer to a gregorio_text structure corresponding to the text. */
+ struct gregorio_character *text;
+ /* pointer to a gregorio_text structure corresponding to the
+ * translation */
+ struct gregorio_character *translation;
+ /* a string representing the text above the lines (raw TeX) */
+ char *abovelinestext;
+ /* pointer to the next and previous syllable */
+ struct gregorio_syllable *next_syllable;
+ struct gregorio_syllable *previous_syllable;
+ /* and finally a pointer to the elements of the structure. Here we see
+ * that we point to an array of elements. In fact it is the array of
+ * the first elements of the different voices of the syllable, for the
+ * case of polyphonic score. In most scores (monophonic), the array
+ * has only one element. */
+ struct gregorio_element **elements;
+ unsigned short euouae_id;
+ unsigned short src_line, src_column, src_offset;
+ /* type of translation (with center beginning or only center end) */
+ ENUM_BITFIELD(gregorio_tr_centering) translation_type:2;
+ /* beginning or end of area without linebreak? */
+ ENUM_BITFIELD(gregorio_nlba) no_linebreak_area:2;
+ /* beginning or end of euouae area */
+ ENUM_BITFIELD(gregorio_euouae) euouae:2;
+ /* position is WORD_BEGINNING for the beginning of a multi-syllable
+ * word, WORD_ONE_SYLLABLE for syllable that are alone in their word,
+ * and i let you gess what are WORD_MIDDLE and WORD_END. */
+ ENUM_BITFIELD(gregorio_word_position) position:3;
+ bool first_word:1;
+ bool forced_center:1;
+ bool clear:1;
+} gregorio_syllable;
+
+/* Stores a header in a singly-linked list */
+typedef struct gregorio_header {
+ char *name;
+ char *value;
+ struct gregorio_header *next;
+} gregorio_header;
+
+/*
+ *
+ * Score is the top structure, the structure in which we will convert
+ * everything, and from which we will construct XML
+ *
+ */
+
+#define MAX_ANNOTATIONS 2
+
+typedef struct gregorio_score {
+ unsigned char digest[SHA1_DIGEST_SIZE];
+ /* the structure starts by a pointer to the first syllable of the
+ * score. */
+ struct gregorio_syllable *first_syllable;
+ /* the number of voices is very important. In monophony it is one. If
+ * there are more voices thant number_of_voices, the additional voices
+ * won't be taken into consideration. */
+ int number_of_voices;
+ /* then start some metadata: */
+ char *name;
+ char *gabc_copyright;
+ char *score_copyright;
+ char *mode;
+ char *mode_modifier;
+ char *mode_differentia;
+ char *author;
+ /* There is one annotation for each line above the initial letter */
+ char *annotation[MAX_ANNOTATIONS];
+ /* field giving informations on the initial (no initial, normal initial
+ * or two lines initial) */
+ size_t nabc_lines;
+ char *user_notes;
+ /* the determination method (maximal ambitus, etc.) */
+ unsigned char det_method;
+ /* then, as there are some metadata that are voice-specific, we add a
+ * pointer to the first voice_info. (see comments below) */
+ struct gregorio_voice_info *first_voice_info;
+ struct gregorio_header *headers;
+ struct gregorio_header *last_header;
+ unsigned char staff_lines;
+ signed char highest_pitch;
+ signed char high_ledger_line_pitch;
+ signed char virgula_far_pitch;
+ bool legacy_oriscus_orientation;
+} gregorio_score;
+
+/*
+ *
+ * gregorio_voice info contains everything that is voice_specific, for
+ * example the key, etc. that can be different from one voice to another.
+ * The order of the voice_info (it is a chained list) is the same as the
+ * order of the voices (from top to bottom in their representation on the
+ * score).
+ *
+ */
+
+typedef struct gregorio_voice_info {
+ gregorio_clef_info initial_clef;
+ struct gregorio_voice_info *next_voice_info;
+} gregorio_voice_info;
+
+typedef struct gregorio_hepisema_adjustment {
+ gregorio_hepisema_vbasepos vbasepos;
+ char *nudge;
+ signed char pitch_extremum;
+} gregorio_hepisema_adjustment;
+
+/* the maximum number of voices, more than this is total nonsense in
+ * gregorian chant. */
+#define MAX_NUMBER_OF_VOICES 10
+
+#define MAX_TEXT_LENGTH 200
+
+#define C_KEY 'c'
+#define F_KEY 'f'
+#define NO_KEY -5
+
+extern unsigned short tex_position_id;
+extern gregorio_clef_info gregorio_default_clef;
+
+#define MONOPHONY 0
+
+#define USELESS_VALUE 0
+
+static __inline bool is_puncta_inclinata(char glyph)
+{
+ return glyph <= G_5_PUNCTA_INCLINATA_ASCENDENS;
+}
+
+#define IS_INITIO_DEBILIS 5
+#define NO_INITIO_DEBILIS 0
+
+static __inline bool is_tail_liquescentia(char liquescentia)
+{
+ return liquescentia & TAIL_LIQUESCENTIA_MASK;
+}
+
+static __inline bool is_initio_debilis(char liquescentia)
+{
+ return liquescentia & L_INITIO_DEBILIS;
+}
+
+static __inline bool is_fused(char liquescentia)
+{
+ return liquescentia & L_FUSED;
+}
+
+#define HEPISEMA_NONE 0
+#define HEPISEMA_AUTO -1
+#define HEPISEMA_FORCED -2
+
+/* The first pitch MUST be an odd number */
+#define LOWEST_PITCH 3
+#define DUMMY_PITCH (LOWEST_PITCH + 6)
+#define LOW_LEDGER_LINE_PITCH (LOWEST_PITCH + 1)
+#define LOW_LINE_PITCH (LOWEST_PITCH + 3)
+#define MAX_PITCH (LOWEST_PITCH + 4 + (2 * 5))
+
+#define NO_PITCH -128
+
+/* defines the maximal interval between two notes of the same glyph */
+#define MAX_AMBITUS 5
+
+void gregorio_struct_init(void);
+void gregorio_struct_destroy(void);
+gregorio_score *gregorio_new_score(void);
+void gregorio_add_note(gregorio_note **current_note, signed char pitch,
+ gregorio_shape shape, gregorio_sign signs,
+ gregorio_liquescentia liquescentia, gregorio_note* prototype,
+ const gregorio_scanner_location *loc);
+void gregorio_add_glyph(gregorio_glyph **current_glyph,
+ gregorio_glyph_type type, gregorio_note *first_note,
+ gregorio_liquescentia liquescentia, bool is_cavum);
+void gregorio_add_element(gregorio_element **current_element,
+ gregorio_glyph *first_glyph);
+void gregorio_add_syllable(gregorio_syllable **current_syllable,
+ int number_of_voices, gregorio_element *elements[],
+ gregorio_character *first_character,
+ gregorio_character *first_translation_character,
+ gregorio_word_position position, char *abovelinestext,
+ gregorio_tr_centering translation_type, gregorio_nlba no_linebreak_area,
+ gregorio_euouae euouae, const gregorio_scanner_location *loc,
+ bool first_word, bool clear);
+void gregorio_add_special_sign(gregorio_note *current_note, gregorio_sign sign);
+void gregorio_change_shape(gregorio_note *note, gregorio_shape shape,
+ bool legacy_oriscus_orientation);
+void gregorio_add_cavum(gregorio_note *note);
+void gregorio_position_h_episema_above(gregorio_note *note, signed char height,
+ bool connect);
+void gregorio_position_h_episema_below(gregorio_note *note, signed char height,
+ bool connect);
+void gregorio_add_h_episema(gregorio_note *note, grehepisema_size size,
+ gregorio_vposition vposition, bool disable_bridge,
+ unsigned int *nbof_isolated_episema);
+void gregorio_add_sign(gregorio_note *note, gregorio_sign sign,
+ gregorio_vposition vposition);
+void gregorio_add_tail_liquescentia(gregorio_note *note,
+ gregorio_liquescentia liquescentia, bool legacy_oriscus_orientation);
+void gregorio_add_voice_info(gregorio_voice_info **current_voice_info);
+void gregorio_free_voice_infos(gregorio_voice_info *voice_info);
+void gregorio_free_one_note(gregorio_note **note);
+void gregorio_free_one_glyph(gregorio_glyph **glyph);
+void gregorio_free_one_element(gregorio_element **element);
+void gregorio_free_score(gregorio_score *score);
+void gregorio_free_characters(gregorio_character *current_character);
+void gregorio_go_to_first_character(const gregorio_character **character);
+void gregorio_add_clef_as_glyph(gregorio_glyph **current_glyph,
+ gregorio_clef_info clef, unsigned short texverb);
+void gregorio_add_pitched_element_as_glyph(gregorio_glyph **current_glyph,
+ gregorio_type type, signed char pitch, bool force_pitch,
+ unsigned short texverb);
+void gregorio_add_unpitched_element_as_glyph(gregorio_glyph **current_glyph,
+ gregorio_type type, gregorio_extra_info *info, gregorio_sign sign,
+ unsigned short texverb);
+void gregorio_add_end_of_line_as_note(gregorio_note **current_note,
+ bool eol_ragged, bool eol_forces_custos, bool eol_forces_custos_on,
+ const gregorio_scanner_location *loc);
+void gregorio_add_custos_as_note(gregorio_note **current_note,
+ const gregorio_scanner_location *loc);
+void gregorio_add_manual_custos_as_note(gregorio_note **current_note,
+ signed char pitch, const gregorio_scanner_location *loc);
+void gregorio_add_suppress_custos_as_note(gregorio_note **current_note,
+ const gregorio_scanner_location *loc);
+void gregorio_add_clef_as_note(gregorio_note **current_note,
+ gregorio_clef clef, signed char clef_line, bool flatted,
+ const gregorio_scanner_location *loc);
+void gregorio_add_secondary_clef_to_note(gregorio_note *current_note,
+ gregorio_clef clef, signed char clef_line, bool flatted);
+void gregorio_add_bar_as_note(gregorio_note **current_note, gregorio_bar bar,
+ const gregorio_scanner_location *loc);
+void gregorio_add_space_as_note(gregorio_note **current_note,
+ gregorio_space space, char *factor,
+ const gregorio_scanner_location *loc);
+unsigned short gregorio_add_texverb_as_note(gregorio_note **current_note,
+ char *str, gregorio_type type, const gregorio_scanner_location *loc);
+void gregorio_add_nlba_as_note(gregorio_note **current_note,
+ gregorio_nlba type, const gregorio_scanner_location *loc);
+void gregorio_start_autofuse(gregorio_note **current_note,
+ const gregorio_scanner_location *loc);
+void gregorio_end_autofuse(gregorio_note **current_note,
+ const gregorio_scanner_location *loc);
+void gregorio_add_texverb_to_note(gregorio_note *current_note, char *str);
+void gregorio_add_cs_to_note(gregorio_note *const*current_note, char *str,
+ bool nabc);
+void gregorio_add_misc_element(gregorio_element **current_element,
+ gregorio_type type, gregorio_misc_element_info *info,
+ unsigned short texverb);
+void gregorio_set_score_annotation(gregorio_score *score, char *annotation);
+void gregorio_set_score_staff_lines(gregorio_score *score, char staff_lines);
+void gregorio_add_score_header(gregorio_score *score, char *name,
+ char *value);
+void gregorio_fix_initial_keys(gregorio_score *score,
+ gregorio_clef_info default_clef);
+void gregorio_go_to_first_note(gregorio_note **note);
+void gregorio_go_to_first_glyph(gregorio_glyph **glyph);
+bool gregorio_is_only_special(gregorio_element *element);
+int gregorio_calculate_new_key(gregorio_clef_info clef);
+void gregorio_add_character(gregorio_character **current_character,
+ grewchar wcharacter);
+void gregorio_begin_style(gregorio_character **current_character,
+ grestyle_style style);
+void gregorio_end_style(gregorio_character **current_character,
+ grestyle_style style);
+gregorio_character *gregorio_clone_characters(const gregorio_character *source);
+signed char gregorio_determine_next_pitch(const gregorio_syllable *syllable,
+ const gregorio_element *element, const gregorio_glyph *glyph,
+ gregorio_shape *next_pitch_alteration);
+const char *gregorio_unknown(int value);
+gregorio_element *gregorio_get_clef_change(gregorio_syllable *syllable);
+unsigned short gregorio_add_hepisema_adjustment(
+ gregorio_hepisema_vbasepos vbasepos, char *nudge);
+gregorio_hepisema_adjustment *gregorio_get_hepisema_adjustment(
+ unsigned short index);
+const char *gregorio_texverb(unsigned short index);
+void gregorio_change_texverb(unsigned short index, char *texverb);
+
+static __inline void gregorio_go_to_first_character_c(gregorio_character **character)
+{
+ gregorio_go_to_first_character((const gregorio_character **)character);
+}
+
+static __inline gregorio_note *gregorio_glyph_last_note(
+ const gregorio_glyph *const glyph)
+{
+ gregorio_note *note;
+ gregorio_assert(glyph && glyph->type == GRE_GLYPH, gregorio_glyph_last_note,
+ "trying to find the last note of something that is not a glyph",
+ return NULL);
+ for (note = glyph->u.notes.first_note; note->next; note = note->next) {
+ /* iterate to find the last note */
+ }
+ return note;
+}
+
+static __inline const gregorio_glyph *gregorio_next_non_texverb_glyph(
+ const gregorio_glyph *glyph)
+{
+ if (glyph) {
+ for (glyph = glyph->next; glyph; glyph = glyph->next) {
+ if (glyph->type != GRE_TEXVERB_GLYPH) {
+ return glyph;
+ }
+ }
+ }
+ return NULL;
+}
+
+static __inline const gregorio_glyph *gregorio_previous_non_texverb_glyph(
+ const gregorio_glyph *glyph)
+{
+ if (glyph) {
+ for (glyph = glyph->previous; glyph; glyph = glyph->previous) {
+ if (glyph->type != GRE_TEXVERB_GLYPH) {
+ return glyph;
+ }
+ }
+ }
+ return NULL;
+}
+
+static __inline char gregorio_clef_to_char(gregorio_clef clef)
+{
+ return (clef == CLEF_C)? 'c' : 'f';
+}
+
+static __inline signed char gregorio_adjust_pitch_into_staff(
+ const gregorio_score *score, signed char pitch)
+{
+ while (pitch < LOWEST_PITCH) {
+ pitch += 7;
+ }
+ while (pitch > score->highest_pitch) {
+ pitch -= 7;
+ }
+ assert(pitch >= LOWEST_PITCH && pitch <= score->highest_pitch);
+ return pitch;
+}
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/struct_iter.h b/Build/source/texk/gregorio/gregorio-src/src/struct_iter.h
new file mode 100644
index 00000000000..f0b19040655
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/struct_iter.h
@@ -0,0 +1,191 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header defines the Gregorio data structures and functions.
+ *
+ * Copyright (C) 2016-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file
+ * The file starts by the definition of all the structures used in
+ * gregorio. As it is certainly the most important file for
+ * understanding, read it carefully.
+ */
+
+#ifndef STRUCT_ITER_H
+#define STRUCT_ITER_H
+
+#include "struct.h"
+
+/* This enum defines bitfields selecting the node types that should be passed
+ * to end_item in gregorio_from_note_to_note */
+typedef enum {
+ GRESTRUCT_NONE = 0,
+ GRESTRUCT_NOTE = 1 << 0,
+ GRESTRUCT_GLYPH = 1 << 1,
+ GRESTRUCT_ELEMENT = 1 << 2,
+ GRESTRUCT_SYLLABLE = 1 << 3
+} gregorio_note_iter_item_type;
+
+typedef struct {
+ gregorio_syllable *syllable;
+ gregorio_element *element;
+ gregorio_glyph *glyph;
+ gregorio_note *note;
+} gregorio_note_iter_position;
+
+static __inline void gregorio_from_note_to_note(
+ const gregorio_note_iter_position *const start,
+ const gregorio_note_iter_position *const end, bool include_end,
+ void (*const visit)(const gregorio_note_iter_position *, void *),
+ void (*const end_item)(const gregorio_note_iter_position *,
+ gregorio_note_iter_item_type, void *),
+ const gregorio_note_iter_item_type desired_end_items, void *data)
+{
+ /* Note: include_end is effectively ignored if end is NULL */
+
+ gregorio_note_iter_position p = *start;
+
+ while (p.syllable) {
+ if (!p.element) {
+ p.element = p.syllable->elements[0];
+ }
+ while (p.element) {
+ if (p.element->type == GRE_ELEMENT) {
+ if (!p.glyph) {
+ p.glyph = p.element->u.first_glyph;
+ }
+ while (p.glyph) {
+ if (p.glyph->type == GRE_GLYPH) {
+ if (!p.note) {
+ p.note = p.glyph->u.notes.first_note;
+ }
+ while (p.note) {
+ bool at_end = (end && p.note == end->note);
+
+ if (p.note->type == GRE_NOTE
+ && (!at_end || include_end)) {
+ visit(&p, data);
+ }
+
+ if (at_end) {
+ if (end_item) {
+ gregorio_fail(gregorio_from_note_to_note,
+ "unused code path");
+ if (desired_end_items & GRESTRUCT_NOTE) {
+ /* currently unused */
+ /* LCOV_EXCL_START */
+ /* to enable the real code, delete this
+ * assertion: */
+ gregorio_fail(gregorio_from_note_to_note,
+ "unused code path");
+ end_item(&p, GRESTRUCT_NOTE, data);
+ }
+ /* LCOV_EXCL_END */
+ if (desired_end_items & GRESTRUCT_GLYPH) {
+ /* currently unused */
+ /* LCOV_EXCL_START */
+ /* to enable the real code, delete this
+ * assertion: */
+ gregorio_fail(gregorio_from_note_to_note,
+ "unused code path");
+ end_item(&p, GRESTRUCT_GLYPH, data);
+ }
+ /* LCOV_EXCL_END */
+ if (desired_end_items
+ & GRESTRUCT_ELEMENT) {
+ /* currently unused */
+ /* LCOV_EXCL_START */
+ /* to enable the real code, delete this
+ * assertion: */
+ gregorio_fail(gregorio_from_note_to_note,
+ "unused code path");
+ end_item(&p, GRESTRUCT_ELEMENT, data);
+ }
+ /* LCOV_EXCL_END */
+ if (desired_end_items
+ & GRESTRUCT_SYLLABLE) {
+ end_item(&p, GRESTRUCT_SYLLABLE, data);
+ }
+ }
+ return;
+ }
+
+ if (end_item
+ && (desired_end_items & GRESTRUCT_NOTE)) {
+ /* in 4.2.0, this code is never hit, as the only
+ * usage that gets through to here does not
+ * include GRESTRUCT_NOTE in desired_end_items */
+ /* LCOV_EXCL_START */
+ /* to enable the real code, delete this
+ * assertion: */
+ gregorio_fail(gregorio_from_note_to_note,
+ "unused code path");
+ end_item(&p, GRESTRUCT_NOTE, data);
+
+ }
+ /* LCOV_EXCL_STOP */
+ p.note = p.note->next;
+ } /* note */
+ }
+ if (end_item && (desired_end_items & GRESTRUCT_GLYPH)) {
+ /* in 4.2.0, this code is never hit, as the only usage
+ * that gets through to here does not include
+ * GRESTRUCT_GLYPH in desired_end_items */
+ /* LCOV_EXCL_START */
+ /* to enable the real code, delete this assertion: */
+ gregorio_fail(gregorio_from_note_to_note,
+ "unused code path");
+ end_item(&p, GRESTRUCT_GLYPH, data);
+ }
+ /* LCOV_EXCL_STOP */
+ p.glyph = p.glyph->next;
+ } /* glyph */
+ }
+ if (end_item && (desired_end_items & GRESTRUCT_ELEMENT)) {
+ end_item(&p, GRESTRUCT_ELEMENT, data);
+ }
+ p.element = p.element->next;
+ } /* element */
+ if (end_item && (desired_end_items & GRESTRUCT_SYLLABLE)) {
+ end_item(&p, GRESTRUCT_SYLLABLE, data);
+ }
+ p.syllable = p.syllable->next_syllable;
+ } /* syllable */
+}
+
+static __inline void gregorio_for_each_note(const gregorio_score *score,
+ void (*const visit)(const gregorio_note_iter_position *, void *),
+ void (*const end_item)(const gregorio_note_iter_position *,
+ gregorio_note_iter_item_type, void *),
+ const gregorio_note_iter_item_type desired_end_items, void *data)
+{
+ gregorio_note_iter_position p = {
+ /* .syllable = */ NULL,
+ /* .element = */ NULL,
+ /* .glyph = */ NULL,
+ /* .note = */ NULL
+ };
+
+ p.syllable = score->first_syllable;
+
+ gregorio_from_note_to_note(&p, NULL, true, visit, end_item,
+ desired_end_items, data);
+}
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/support.c b/Build/source/texk/gregorio/gregorio-src/src/support.c
new file mode 100644
index 00000000000..a169cbaac9c
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/support.c
@@ -0,0 +1,282 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file contains miscellaneous support functions.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include "support.h"
+#include "struct.h"
+#include "messages.h"
+
+/* Our version of snprintf; this is NOT semantically the same as C99's
+ * snprintf; rather, it's a "lowest common denominator" implementation
+ * blending C99 and MS-C */
+void gregorio_snprintf(char *s, size_t size, const char *format, ...)
+{
+ va_list args;
+
+#ifdef _MSC_VER
+ memset(s, 0, size);
+#endif
+
+ va_start(args, format);
+#ifdef _MSC_VER
+ _vsnprintf_s(s, size, _TRUNCATE, format, args);
+#else
+ vsnprintf(s, size, format, args);
+#endif
+ va_end(args);
+}
+
+static __inline void *assert_successful_allocation(void *ptr, char *funcname) {
+ if (!ptr) {
+ /* it's not realistic to test this for coverage */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("error in memory allocation"),
+ funcname, VERBOSITY_FATAL, 0);
+ gregorio_exit(1);
+ }
+ /* LCOV_EXCL_STOP */
+ return ptr;
+}
+
+void *gregorio_malloc(size_t size)
+{
+ return assert_successful_allocation(malloc(size), "gregorio_malloc");
+}
+
+void *gregorio_calloc(size_t nmemb, size_t size)
+{
+ return assert_successful_allocation(calloc(nmemb, size), "gregorio_calloc");
+}
+
+void *gregorio_realloc(void *ptr, size_t size)
+{
+ return assert_successful_allocation(realloc(ptr, size), "gregorio_realloc");
+}
+
+char *gregorio_strdup(const char *s)
+{
+ return (char *)assert_successful_allocation(strdup(s), "gregorio_strdup");
+}
+
+void *_gregorio_grow_buffer(void *buffer, size_t *nmemb, size_t size)
+{
+ if (buffer == NULL) {
+ return gregorio_malloc(*nmemb * size);
+ }
+ if (*nmemb >= MAX_BUF_GROWTH) {
+ /* it's not realistic to test this case */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("buffer too large"), "gregorio_grow_buffer",
+ VERBOSITY_FATAL, 0);
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+ *nmemb <<= 1;
+ return gregorio_realloc(buffer, *nmemb * size);
+}
+
+#ifdef USE_KPSE
+static kpathsea kpse = NULL;
+#define USED_FOR_KPSE
+#else
+#define USED_FOR_KPSE __attribute__((unused))
+#endif
+
+void gregorio_support_init(const char *const program USED_FOR_KPSE,
+ const char *const argv0 USED_FOR_KPSE)
+{
+ gregorio_set_error_out(stderr);
+ gregorio_set_verbosity_mode(VERBOSITY_ERROR);
+ gregorio_struct_init();
+#ifdef USE_KPSE
+ kpse = kpathsea_new();
+ kpathsea_set_program_name(kpse, argv0, program);
+#endif
+}
+
+void gregorio_print_version(const char *copyright)
+{
+#ifdef USE_KPSE
+ printf("Gregorio %s (%s).\n%s\n", GREGORIO_VERSION,
+ kpathsea_version_string, copyright);
+#else
+ printf("Gregorio %s.\n%s\n", GREGORIO_VERSION,
+ copyright);
+#endif
+ printf("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
+This is free software: you are free to change and redistribute it.\n\
+There is NO WARRANTY, to the extent permitted by law.\n");
+}
+
+#ifdef USE_KPSE
+bool gregorio_read_ok(const char *const filename,
+ const gregorio_verbosity verbosity)
+{
+ if (kpathsea_in_name_ok_silent(kpse, filename)) {
+ return true;
+ }
+ gregorio_messagef("gregorio_in_name_ok", verbosity, __LINE__,
+ _("kpse prohibits read from file %s"), filename);
+ return false;
+}
+
+bool gregorio_write_ok(const char *const filename,
+ const gregorio_verbosity verbosity)
+{
+ if (kpathsea_out_name_ok_silent(kpse, filename)) {
+ return true;
+ }
+ gregorio_messagef("gregorio_out_name_ok", verbosity, __LINE__,
+ _("kpse prohibits write to file %s"), filename);
+ return false;
+}
+#endif
+
+#ifndef USE_KPSE
+static __inline void rtrim(char *buf)
+{
+ char *p;
+ for (p = buf + strlen(buf) - 1; p >= buf && isspace(*p); --p) {
+ *p = '\0';
+ }
+}
+
+static bool gregorio_readline(char **buf, size_t *bufsize, FILE *file)
+{
+ size_t oldsize;
+ if (*buf == NULL) {
+ *bufsize = 128;
+ *buf = gregorio_grow_buffer(NULL, bufsize, char);
+ } else {
+ if (*bufsize < 128) {
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("invalid buffer size"), "gregorio_getline",
+ VERBOSITY_FATAL, 0);
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+ }
+ (*buf)[0] = '\0';
+ oldsize = 1;
+ for (;;) {
+ (*buf)[*bufsize - 2] = '\0';
+
+ if (feof(file) || ferror(file)
+ || !fgets((*buf) + oldsize - 1, (int)(*bufsize - oldsize + 1),
+ file)
+ || (*buf)[*bufsize - 2] == '\0') {
+ if (ferror(file)) {
+ /* it's not realistic to simulate the system error required to
+ * cover this case */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("Error reading from the file"),
+ "gregorio_getline", VERBOSITY_FATAL, 0);
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+ return (*buf)[0] != '\0';
+ }
+
+ oldsize = *bufsize;
+ *buf = gregorio_grow_buffer(*buf, bufsize, char);
+ }
+}
+#endif
+
+
+char **gregorio_kpse_find(const char *filename)
+{
+ char **filenames;
+#ifdef USE_KPSE
+ filenames = kpathsea_find_file_generic(kpse, filename, kpse_tex_format,
+ true, true);
+ if (!filenames) {
+ /* It's not reasonable to break kpse in such a way that this would
+ * fail. */
+ /* LCOV_EXCL_START */
+ gregorio_messagef("gregorio_kpse_find", VERBOSITY_WARNING, 0,
+ _("kpathsea_find_file_generic returned NULL: %s"), filename);
+ return NULL;
+ /* LCOV_EXCL_STOP */
+ }
+#else
+ FILE *file;
+ size_t bufsize = 0;
+ char *buf = NULL;
+ size_t capacity = 16, size = 0;
+#define KPSE_COMMAND "kpsewhich -must-exist -all "
+ size_t command_size = sizeof(KPSE_COMMAND) + strlen(filename);
+ char *command = gregorio_malloc(command_size);
+
+ strcpy(command, KPSE_COMMAND);
+ strcpy(command + sizeof(KPSE_COMMAND) - 1, filename);
+ file = popen(command, "r");
+ free(command);
+ command = NULL; /* just to be sure */
+ if (!file) {
+ /* it's not reasonable to cause popen to fail */
+ /* LCOV_EXCL_START */
+ gregorio_messagef("gregorio_kpse_find", VERBOSITY_WARNING, 0,
+ _("unable to run kpsewhich %s: %s"), filename,
+ strerror(errno));
+ return NULL;
+ /* LCOV_EXCL_STOP */
+ }
+ filenames = gregorio_malloc(capacity * sizeof(char *));
+ while (gregorio_readline(&buf, &bufsize, file)) {
+ rtrim(buf);
+ if (strlen(buf) > 0) {
+ filenames[size++] = gregorio_strdup(buf);
+ if (size >= capacity) {
+ capacity <<= 1;
+ filenames = gregorio_realloc(filenames,
+ capacity * sizeof(char *));
+ }
+ } else {
+ gregorio_messagef("read_patterns", VERBOSITY_WARNING, 0,
+ _("kpsewhich returned bad value for %s"), filename);
+ }
+ }
+ free(buf);
+ filenames[size] = NULL;
+ pclose(file);
+#endif
+ return filenames;
+}
+
+void gregorio_exit(int status)
+{
+#ifdef USE_KPSE
+ if (kpse) {
+ kpathsea_finish(kpse);
+ }
+#endif
+ gregorio_struct_destroy();
+ exit(status);
+} /* the prior line exits; LCOV_EXCL_LINE */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/support.h b/Build/source/texk/gregorio/gregorio-src/src/support.h
new file mode 100644
index 00000000000..28b4e11bec1
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/support.h
@@ -0,0 +1,76 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes the miscellaneous support functions.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SUPPORT_H
+#define SUPPORT_H
+
+#include <stdlib.h>
+#include <limits.h>
+#ifdef USE_KPSE
+#include <kpathsea/kpathsea.h>
+#endif
+#include "bool.h"
+#include "config.h"
+#include "messages.h"
+
+#define GREGORIO_SZ_MAX (~((size_t)0))
+#define MAX_BUF_GROWTH \
+ ((size_t)((((INT_MAX < GREGORIO_SZ_MAX)? INT_MAX : GREGORIO_SZ_MAX) >> 1) + 1))
+
+void gregorio_snprintf(char *s, size_t size, const char *format, ...)
+ __attribute__((__format__ (__printf__, 3, 4)));
+void *gregorio_malloc(size_t size) __attribute__((malloc));
+void *gregorio_calloc(size_t nmemb, size_t size) __attribute__((malloc));
+void *gregorio_realloc(void *ptr, size_t size)
+ __attribute__((warn_unused_result));
+char *gregorio_strdup(const char *s) __attribute__((malloc));
+void *_gregorio_grow_buffer(void *buffer, size_t *nmemb, size_t size)
+ __attribute__((warn_unused_result));
+void gregorio_support_init(const char *program, const char *argv0);
+void gregorio_print_version(const char *copyright);
+char **gregorio_kpse_find(const char *filename);
+void gregorio_exit(int status) __attribute__((noreturn));
+
+#define gregorio_grow_buffer(BUFFER, NMEMB, TYPE) \
+ ((TYPE *)_gregorio_grow_buffer(BUFFER, NMEMB, sizeof(TYPE)))
+
+#ifdef USE_KPSE
+bool gregorio_read_ok(const char *filename, gregorio_verbosity verbosity);
+bool gregorio_write_ok(const char *filename, gregorio_verbosity verbosity);
+
+#define gregorio_check_file_access(DIR, FILENAME, LEVEL, ON_NOT_ALLOWED) \
+ if (!gregorio_ ## DIR ## _ok(FILENAME, VERBOSITY_ ## LEVEL)) { \
+ ON_NOT_ALLOWED; \
+ }
+#define gregorio_kpse_find_or_else(VAR, FILENAME, ON_FAIL) \
+ VAR = gregorio_kpse_find(FILENAME); \
+ if (!VAR) { \
+ ON_FAIL; \
+ }
+#else
+#define gregorio_check_file_access(DIRECTION, FILENAME, LEVEL, ON_NOT_ALLOWED)
+#define gregorio_kpse_find_or_else(VAR, FILENAME, ON_FAIL) \
+ VAR = gregorio_kpse_find(FILENAME); \
+ gregorio_not_null(VAR, gregorio_kpse_find, ON_FAIL)
+#endif
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/unicode.c b/Build/source/texk/gregorio/gregorio-src/src/unicode.c
new file mode 100644
index 00000000000..fa9e2a4ac87
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/unicode.c
@@ -0,0 +1,174 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file contains functions providing UTF-8 support.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h> /* for strlen */
+#include <stdlib.h>
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "support.h"
+
+/*
+ *
+ * This file contains some functions to handle UTF-8 correctly. We chose to
+ * embed them instead of relying on locale or glib, for simplification: with
+ * these functions we don't rely on anything locale-dependant (such as
+ * wchar_t). The reason is that Windows XP (...) is not UTF-8 and thus would
+ * need the glib in oder to run, which make dependencies much bigger.
+ *
+ */
+
+/* an utf8 version of mbstowcs */
+
+/* expects a buffer of size n + 1 */
+static bool gregorio_mbstowcs(grewchar *dest, const char *src, size_t n)
+{
+ bool success = true;
+ unsigned char bytes_to_come;
+ grewchar result = 0;
+ unsigned char c;
+ size_t res = 0; /* number of bytes we've done so far */
+ gregorio_not_null(src, gregorio_mbstowcs, return false);
+ gregorio_not_null(dest, gregorio_mbstowcs, return false);
+ while (success && *src && res < n) {
+ c = (unsigned char) (*src);
+ if (c < 128) { /* 0100xxxx */
+ /* one-byte symbol */
+ bytes_to_come = 0;
+ result = c;
+ } else if (c >= 240) { /* 1111xxxx */
+ /* start of a four-byte symbol */
+ /* printf("%d\n", c); */
+ bytes_to_come = 3;
+ result = (result << 3) | (c & 7);
+ } else if (c >= 224) { /* 1110xxxx */
+ /* start of a three-byte symbol */
+ /* printf("%d\n", c); */
+ bytes_to_come = 2;
+ result = (result << 4) | (c & 15);
+ } else if (c >= 192) { /* 1100xxxx */
+ /* start of a two-byte symbol */
+ /* printf("%d\n", c); */
+ bytes_to_come = 1;
+ result = (result << 5) | (c & 31);
+ } else {
+ /* printf("%s %d %d\n", src, res, c); */
+ gregorio_message(_("malformed UTF-8 sequence1"),
+ "gregorio_mbstowcs", VERBOSITY_ERROR, 0);
+ success = false;
+ break;
+ }
+ while (bytes_to_come > 0) {
+ bytes_to_come--;
+ src++;
+ c = (unsigned char) (*src);
+ if (c < 192 && c >= 128) /* 1000xxxx */
+ {
+ result = (result << 6) | (c & 63);
+ } else {
+ gregorio_message(_("malformed UTF-8 sequence2"),
+ "gregorio_mbstowcs", VERBOSITY_ERROR, 0);
+ success = false;
+ break;
+ }
+ }
+ dest[res] = result;
+
+ res++;
+ result = 0;
+ src++;
+ }
+ dest[res] = 0;
+ return success;
+}
+
+/* the value returned by this function must be freed! */
+grewchar *gregorio_build_grewchar_string_from_buf(const char *const buf)
+{
+ size_t len;
+ grewchar *gwstring;
+ /* this doesn't currently happen, but it's safer to keep this check */
+ if (buf == NULL) {
+ return NULL; /* LCOV_EXCL_LINE */
+ }
+ len = strlen(buf); /* to get the length of the syllable in ASCII */
+ gwstring = (grewchar *) gregorio_malloc((len + 1) * sizeof(grewchar));
+ gregorio_mbstowcs(gwstring, buf, len); /* converting into grewchar */
+ /* no need to check the return code; if it failed, the error state would
+ * already be in place */
+ return gwstring;
+}
+
+/* the function to build a gregorio_character list from a buffer. */
+
+gregorio_character *gregorio_build_char_list_from_buf(const char *const buf)
+{
+ int i = 0;
+ grewchar *gwstring;
+ gregorio_character *current_character = NULL;
+ /* this doesn't currently happen, but it's safer to keep this check */
+ if (buf == NULL) {
+ return NULL; /* LCOV_EXCL_LINE */
+ }
+ gwstring = gregorio_build_grewchar_string_from_buf(buf);
+ /* we add the corresponding characters in the list of gregorio_characters */
+ while (gwstring[i]) {
+ gregorio_add_character(&current_character, gwstring[i]);
+ i++;
+ }
+ free(gwstring);
+ gregorio_go_to_first_character_c(&current_character);
+ return current_character;
+}
+
+void gregorio_print_unichar(FILE *f, const grewchar to_print)
+{
+ if (to_print <= 0x7F) {
+ fprintf(f, "%c", (unsigned char) to_print);
+ return;
+ }
+ if (to_print >= 0x80 && to_print <= 0x7FF) {
+ fprintf(f, "%c%c", 0xC0 | (to_print >> 6), 0x80 | (to_print & 0x3F));
+ return;
+ }
+ if ((to_print >= 0x800 && to_print <= 0xD7FF) ||
+ (to_print >= 0xE000 && to_print <= 0xFFFF)) {
+ fprintf(f, "%c%c%c", 0xE0 | (to_print >> 12),
+ 0x80 | ((to_print >> 6) & 0x3F), 0x80 | (to_print & 0x3F));
+ return;
+ }
+ if (to_print >= 0x10000 && to_print <= 0x10FFFF) {
+ fprintf(f, "%c%c%c%c", 0xF0 | (to_print >> 18),
+ 0x80 | ((to_print >> 12) & 0x3F),
+ 0x80 | ((to_print >> 6) & 0x3F), 0x80 | (to_print & 0x3F));
+ }
+}
+
+void gregorio_print_unistring(FILE *f, const grewchar *first_char)
+{
+ while (*first_char != 0) {
+ gregorio_print_unichar(f, *first_char);
+ first_char++;
+ }
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/unicode.h b/Build/source/texk/gregorio/gregorio-src/src/unicode.h
new file mode 100644
index 00000000000..e2ae1505967
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/unicode.h
@@ -0,0 +1,69 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes the UTF-8 support functions.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef UNICODE_H_FIRST_PART
+#define UNICODE_H_FIRST_PART
+#define UNICODE_H
+
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+
+typedef uint32_t grewchar;
+
+void gregorio_print_unichar(FILE *f, grewchar to_print);
+void gregorio_print_unistring(FILE *f, const grewchar *first_char);
+grewchar *gregorio_build_grewchar_string_from_buf(const char *buf);
+
+static __inline size_t gregorio_wcstrlen(const grewchar *wstr)
+{
+ size_t length = 0;
+
+ while (*(wstr++)) {
+ ++length;
+ }
+
+ return length;
+}
+
+/* this macro is for portability under windows, where L'x' is only two-bytes
+ * long, and thus needs to be cast to a 4-bytes integer. */
+#define GL(wc) ((const grewchar) L'wc')
+
+#endif
+
+/* we enter the second part only if struct.h has already been included, because
+ * we need gregorio_character */
+
+#ifdef STRUCT_H
+
+#ifndef UNICODE_H_SECOND_PART
+#define UNICODE_H_SECOND_PART
+
+gregorio_character *gregorio_build_char_list_from_buf(const char *buf);
+
+#endif
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/utf8strings.h b/Build/source/texk/gregorio/gregorio-src/src/utf8strings.h
new file mode 100644
index 00000000000..e472a048eb6
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/utf8strings.h
@@ -0,0 +1,36 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header file contains UTF-8 encoded strings used by Gregorio
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef UTF8STRINGS_H
+#define UTF8STRINGS_H
+
+#define ACCENTED_AE "'\303\246"
+#define ACCENTED_OE "'\305\223"
+
+/* This is a superset of Latin vowels which includes some French, Vietnamese,
+ * Slavic, Hungarian, and Norwegian vowels which don't interfere with Latin
+ * itself. For something more accurate, the user should consider the use of
+ * custom centering rules. */
+#define DEFAULT_VOWELS "a\303\240\303\241\303\242\304\203\304\205\303\245A\303\200\303\201\303\202\304\202\304\204\303\205e\303\250\303\251\303\252\303\253\304\233\304\231E\303\210\303\211\303\212\303\213\304\232\304\230i\303\254\303\255\303\256I\303\214\303\215\303\216" \
+ "o\303\262\303\263\303\264\306\241\305\221\303\270O\303\222\303\223\303\224\306\240\305\220\303\230u\303\271\303\272\303\273\306\260\305\257\305\261U\303\231\303\232\303\233\306\257\305\256\305\260y\341\273\263\303\275Y\341\273\262\303\235\303\246\307\275\303\206\307\274\305\223\305\222"
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/utf8strings.h.in b/Build/source/texk/gregorio/gregorio-src/src/utf8strings.h.in
new file mode 100644
index 00000000000..acfed30159f
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/utf8strings.h.in
@@ -0,0 +1,36 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header file contains UTF-8 encoded strings used by Gregorio
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef UTF8STRINGS_H
+#define UTF8STRINGS_H
+
+#define ACCENTED_AE "'æ"
+#define ACCENTED_OE "'œ"
+
+/* This is a superset of Latin vowels which includes some French, Vietnamese,
+ * Slavic, Hungarian, and Norwegian vowels which don't interfere with Latin
+ * itself. For something more accurate, the user should consider the use of
+ * custom centering rules. */
+#define DEFAULT_VOWELS "aàáâăąåAÀÁÂĂĄÅeèéêëěęEÈÉÊËĚĘiìíîIÌÍÎ" \
+ "oòóôơőøOÒÓÔƠŐØuùúûưůűUÙÚÛƯŮŰyỳýYỲÝæǽÆǼœŒ"
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c
new file mode 100644
index 00000000000..4d1906b3a02
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c
@@ -0,0 +1,2166 @@
+#line 1 "vowel/vowel-rules-l.c"
+
+#line 3 "vowel/vowel-rules-l.c"
+
+#define YY_INT_ALIGNED long int
+
+/* A lexical scanner generated by flex */
+
+#define yy_create_buffer gregorio_vowel_rulefile__create_buffer
+#define yy_delete_buffer gregorio_vowel_rulefile__delete_buffer
+#define yy_scan_buffer gregorio_vowel_rulefile__scan_buffer
+#define yy_scan_string gregorio_vowel_rulefile__scan_string
+#define yy_scan_bytes gregorio_vowel_rulefile__scan_bytes
+#define yy_init_buffer gregorio_vowel_rulefile__init_buffer
+#define yy_flush_buffer gregorio_vowel_rulefile__flush_buffer
+#define yy_load_buffer_state gregorio_vowel_rulefile__load_buffer_state
+#define yy_switch_to_buffer gregorio_vowel_rulefile__switch_to_buffer
+#define yypush_buffer_state gregorio_vowel_rulefile_push_buffer_state
+#define yypop_buffer_state gregorio_vowel_rulefile_pop_buffer_state
+#define yyensure_buffer_stack gregorio_vowel_rulefile_ensure_buffer_stack
+#define yy_flex_debug gregorio_vowel_rulefile__flex_debug
+#define yyin gregorio_vowel_rulefile_in
+#define yyleng gregorio_vowel_rulefile_leng
+#define yylex gregorio_vowel_rulefile_lex
+#define yylineno gregorio_vowel_rulefile_lineno
+#define yyout gregorio_vowel_rulefile_out
+#define yyrestart gregorio_vowel_rulefile_restart
+#define yytext gregorio_vowel_rulefile_text
+#define yywrap gregorio_vowel_rulefile_wrap
+#define yyalloc gregorio_vowel_rulefile_alloc
+#define yyrealloc gregorio_vowel_rulefile_realloc
+#define yyfree gregorio_vowel_rulefile_free
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+#ifdef yy_create_buffer
+#define gregorio_vowel_rulefile__create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer gregorio_vowel_rulefile__create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define gregorio_vowel_rulefile__delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer gregorio_vowel_rulefile__delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define gregorio_vowel_rulefile__scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer gregorio_vowel_rulefile__scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define gregorio_vowel_rulefile__scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string gregorio_vowel_rulefile__scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define gregorio_vowel_rulefile__scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes gregorio_vowel_rulefile__scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define gregorio_vowel_rulefile__init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer gregorio_vowel_rulefile__init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define gregorio_vowel_rulefile__flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer gregorio_vowel_rulefile__flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define gregorio_vowel_rulefile__load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state gregorio_vowel_rulefile__load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define gregorio_vowel_rulefile__switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer gregorio_vowel_rulefile__switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define gregorio_vowel_rulefile_push_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state gregorio_vowel_rulefile_push_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define gregorio_vowel_rulefile_pop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state gregorio_vowel_rulefile_pop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define gregorio_vowel_rulefile_ensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack gregorio_vowel_rulefile_ensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define gregorio_vowel_rulefile_lex_ALREADY_DEFINED
+#else
+#define yylex gregorio_vowel_rulefile_lex
+#endif
+
+#ifdef yyrestart
+#define gregorio_vowel_rulefile_restart_ALREADY_DEFINED
+#else
+#define yyrestart gregorio_vowel_rulefile_restart
+#endif
+
+#ifdef yylex_init
+#define gregorio_vowel_rulefile_lex_init_ALREADY_DEFINED
+#else
+#define yylex_init gregorio_vowel_rulefile_lex_init
+#endif
+
+#ifdef yylex_init_extra
+#define gregorio_vowel_rulefile_lex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra gregorio_vowel_rulefile_lex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define gregorio_vowel_rulefile_lex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy gregorio_vowel_rulefile_lex_destroy
+#endif
+
+#ifdef yyget_debug
+#define gregorio_vowel_rulefile_get_debug_ALREADY_DEFINED
+#else
+#define yyget_debug gregorio_vowel_rulefile_get_debug
+#endif
+
+#ifdef yyset_debug
+#define gregorio_vowel_rulefile_set_debug_ALREADY_DEFINED
+#else
+#define yyset_debug gregorio_vowel_rulefile_set_debug
+#endif
+
+#ifdef yyget_extra
+#define gregorio_vowel_rulefile_get_extra_ALREADY_DEFINED
+#else
+#define yyget_extra gregorio_vowel_rulefile_get_extra
+#endif
+
+#ifdef yyset_extra
+#define gregorio_vowel_rulefile_set_extra_ALREADY_DEFINED
+#else
+#define yyset_extra gregorio_vowel_rulefile_set_extra
+#endif
+
+#ifdef yyget_in
+#define gregorio_vowel_rulefile_get_in_ALREADY_DEFINED
+#else
+#define yyget_in gregorio_vowel_rulefile_get_in
+#endif
+
+#ifdef yyset_in
+#define gregorio_vowel_rulefile_set_in_ALREADY_DEFINED
+#else
+#define yyset_in gregorio_vowel_rulefile_set_in
+#endif
+
+#ifdef yyget_out
+#define gregorio_vowel_rulefile_get_out_ALREADY_DEFINED
+#else
+#define yyget_out gregorio_vowel_rulefile_get_out
+#endif
+
+#ifdef yyset_out
+#define gregorio_vowel_rulefile_set_out_ALREADY_DEFINED
+#else
+#define yyset_out gregorio_vowel_rulefile_set_out
+#endif
+
+#ifdef yyget_leng
+#define gregorio_vowel_rulefile_get_leng_ALREADY_DEFINED
+#else
+#define yyget_leng gregorio_vowel_rulefile_get_leng
+#endif
+
+#ifdef yyget_text
+#define gregorio_vowel_rulefile_get_text_ALREADY_DEFINED
+#else
+#define yyget_text gregorio_vowel_rulefile_get_text
+#endif
+
+#ifdef yyget_lineno
+#define gregorio_vowel_rulefile_get_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno gregorio_vowel_rulefile_get_lineno
+#endif
+
+#ifdef yyset_lineno
+#define gregorio_vowel_rulefile_set_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno gregorio_vowel_rulefile_set_lineno
+#endif
+
+#ifdef yywrap
+#define gregorio_vowel_rulefile_wrap_ALREADY_DEFINED
+#else
+#define yywrap gregorio_vowel_rulefile_wrap
+#endif
+
+#ifdef yyalloc
+#define gregorio_vowel_rulefile_alloc_ALREADY_DEFINED
+#else
+#define yyalloc gregorio_vowel_rulefile_alloc
+#endif
+
+#ifdef yyrealloc
+#define gregorio_vowel_rulefile_realloc_ALREADY_DEFINED
+#else
+#define yyrealloc gregorio_vowel_rulefile_realloc
+#endif
+
+#ifdef yyfree
+#define gregorio_vowel_rulefile_free_ALREADY_DEFINED
+#else
+#define yyfree gregorio_vowel_rulefile_free
+#endif
+
+#ifdef yytext
+#define gregorio_vowel_rulefile_text_ALREADY_DEFINED
+#else
+#define yytext gregorio_vowel_rulefile_text
+#endif
+
+#ifdef yyleng
+#define gregorio_vowel_rulefile_leng_ALREADY_DEFINED
+#else
+#define yyleng gregorio_vowel_rulefile_leng
+#endif
+
+#ifdef yyin
+#define gregorio_vowel_rulefile_in_ALREADY_DEFINED
+#else
+#define yyin gregorio_vowel_rulefile_in
+#endif
+
+#ifdef yyout
+#define gregorio_vowel_rulefile_out_ALREADY_DEFINED
+#else
+#define yyout gregorio_vowel_rulefile_out
+#endif
+
+#ifdef yy_flex_debug
+#define gregorio_vowel_rulefile__flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug gregorio_vowel_rulefile__flex_debug
+#endif
+
+#ifdef yylineno
+#define gregorio_vowel_rulefile_lineno_ALREADY_DEFINED
+#else
+#define yylineno gregorio_vowel_rulefile_lineno
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* begin standard C++ headers. */
+
+/* TODO: this is always defined, so inline it */
+#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
+#else
+#define yynoreturn
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
+ */
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern int yyleng;
+
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ #define YY_LESS_LINENO(n)
+ #define YY_LINENO_REWIND_TO(ptr)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
+ YY_RESTORE_YY_MORE_OFFSET \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+#define unput(c) yyunput( c, (yytext_ptr) )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ int yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = NULL;
+static int yy_init = 0; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
+
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+
+#define yy_new_buffer yy_create_buffer
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ }
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){\
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ }
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+#define gregorio_vowel_rulefile_wrap() (/*CONSTCOND*/1)
+#define YY_SKIP_YYWRAP
+typedef flex_uint8_t YY_CHAR;
+
+FILE *yyin = NULL, *yyout = NULL;
+
+typedef int yy_state_type;
+
+extern int yylineno;
+int yylineno = 1;
+
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ (yytext_ptr) = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
+ *yy_cp = '\0'; \
+ (yy_c_buf_p) = yy_cp;
+#define YY_NUM_RULES 17
+#define YY_END_OF_BUFFER 18
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static const flex_int32_t yy_accept[71] =
+ { 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 18, 16,
+ 15, 15, 13, 7, 16, 16, 16, 16, 16, 16,
+ 12, 9, 16, 10, 10, 10, 10, 7, 11, 13,
+ 0, 0, 0, 0, 0, 0, 0, 12, 8, 10,
+ 10, 0, 0, 0, 0, 0, 0, 14, 0, 0,
+ 0, 0, 0, 0, 6, 0, 0, 0, 0, 2,
+ 0, 3, 0, 4, 0, 0, 1, 0, 5, 0
+ } ;
+
+static const YY_CHAR yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 1, 5, 1, 1, 1, 1, 1,
+ 1, 1, 1, 6, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 7, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 8, 1, 9, 1, 1, 1, 10, 1, 11, 12,
+
+ 13, 14, 15, 1, 16, 1, 1, 17, 1, 18,
+ 19, 20, 1, 21, 22, 23, 24, 25, 26, 27,
+ 28, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 29, 1, 1, 1,
+ 30, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 31, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static const YY_CHAR yy_meta[32] =
+ { 0,
+ 1, 2, 3, 3, 2, 2, 2, 1, 4, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1
+ } ;
+
+static const flex_int32_t yy_base[78] =
+ { 0,
+ 0, 30, 60, 66, 72, 0, 94, 102, 92, 139,
+ 139, 139, 0, 139, 74, 80, 68, 0, 69, 58,
+ 0, 139, 67, 0, 0, 0, 5, 0, 139, 0,
+ 69, 66, 70, 71, 67, 52, 30, 0, 139, 0,
+ 12, 49, 43, 43, 37, 40, 40, 139, 29, 25,
+ 32, 28, 29, 27, 139, 33, 15, 29, 12, 139,
+ 23, 139, 26, 139, 17, 8, 139, 0, 139, 139,
+ 111, 115, 119, 123, 127, 131, 134
+ } ;
+
+static const flex_int32_t yy_def[78] =
+ { 0,
+ 71, 71, 72, 72, 71, 5, 73, 73, 70, 70,
+ 70, 70, 74, 70, 70, 70, 70, 70, 70, 70,
+ 75, 70, 70, 76, 76, 76, 77, 76, 70, 74,
+ 70, 70, 70, 70, 70, 70, 70, 75, 70, 76,
+ 77, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 0,
+ 70, 70, 70, 70, 70, 70, 70
+ } ;
+
+static const flex_int32_t yy_nxt[171] =
+ { 0,
+ 70, 11, 12, 11, 13, 70, 14, 40, 40, 15,
+ 70, 70, 34, 30, 40, 40, 16, 70, 70, 17,
+ 30, 18, 70, 35, 19, 70, 70, 69, 68, 67,
+ 20, 11, 12, 11, 13, 66, 14, 65, 64, 15,
+ 63, 62, 61, 60, 59, 58, 16, 57, 56, 17,
+ 55, 18, 54, 53, 19, 52, 51, 50, 49, 48,
+ 20, 11, 12, 11, 13, 10, 14, 11, 12, 11,
+ 13, 10, 14, 11, 12, 11, 13, 47, 14, 22,
+ 46, 45, 44, 43, 42, 39, 37, 36, 33, 32,
+ 31, 70, 70, 70, 23, 25, 26, 25, 27, 70,
+
+ 28, 70, 29, 25, 26, 25, 27, 70, 28, 70,
+ 29, 10, 10, 10, 10, 21, 21, 21, 21, 24,
+ 24, 24, 24, 30, 30, 70, 30, 38, 70, 70,
+ 38, 40, 40, 40, 41, 41, 41, 41, 9, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70
+ } ;
+
+static const flex_int32_t yy_chk[171] =
+ { 0,
+ 0, 1, 1, 1, 1, 0, 1, 27, 27, 1,
+ 0, 0, 18, 27, 41, 41, 1, 0, 0, 1,
+ 41, 1, 0, 18, 1, 0, 0, 68, 66, 65,
+ 1, 2, 2, 2, 2, 63, 2, 61, 59, 2,
+ 58, 57, 56, 54, 53, 52, 2, 51, 50, 2,
+ 49, 2, 47, 46, 2, 45, 44, 43, 42, 37,
+ 2, 3, 3, 3, 3, 3, 3, 4, 4, 4,
+ 4, 4, 4, 5, 5, 5, 5, 36, 5, 5,
+ 35, 34, 33, 32, 31, 23, 20, 19, 17, 16,
+ 15, 9, 0, 0, 5, 7, 7, 7, 7, 0,
+
+ 7, 0, 7, 8, 8, 8, 8, 0, 8, 0,
+ 8, 71, 71, 71, 71, 72, 72, 72, 72, 73,
+ 73, 73, 73, 74, 74, 0, 74, 75, 0, 0,
+ 75, 76, 76, 76, 77, 77, 77, 77, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70
+ } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "vowel/vowel-rules.l"
+#line 2 "vowel/vowel-rules.l"
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the vowel rule lexer.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "struct.h"
+#include "messages.h"
+#include "support.h"
+
+#include "vowel.h"
+
+#include "vowel-rules.h"
+#include "vowel-rules-y.h"
+
+#define YY_NO_INPUT
+
+static __inline void save_lval(void)
+{
+ gregorio_vowel_rulefile_lval =
+ gregorio_malloc(gregorio_vowel_rulefile_leng + 1);
+ strncpy(gregorio_vowel_rulefile_lval, gregorio_vowel_rulefile_text,
+ gregorio_vowel_rulefile_leng);
+ gregorio_vowel_rulefile_lval[gregorio_vowel_rulefile_leng] = '\0';
+}
+
+static __inline void invalid(void)
+{
+ gregorio_messagef("gregorio_vowel_rulefile_lex", VERBOSITY_WARNING, 0,
+ _("invalid character in vowel file: %c"),
+ *gregorio_vowel_rulefile_text);
+}
+#line 813 "vowel/vowel-rules-l.c"
+
+#line 815 "vowel/vowel-rules-l.c"
+
+#define INITIAL 0
+#define chars 1
+#define lang 2
+#define langname 3
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals ( void );
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy ( void );
+
+int yyget_debug ( void );
+
+void yyset_debug ( int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra ( void );
+
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in ( void );
+
+void yyset_in ( FILE * _in_str );
+
+FILE *yyget_out ( void );
+
+void yyset_out ( FILE * _out_str );
+
+ int yyget_leng ( void );
+
+char *yyget_text ( void );
+
+int yyget_lineno ( void );
+
+void yyset_lineno ( int _line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap ( void );
+#else
+extern int yywrap ( void );
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy ( char *, const char *, int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen ( const char * );
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput ( void );
+#else
+static int input ( void );
+#endif
+
+#endif
+
+ static int yy_start_stack_ptr = 0;
+ static int yy_start_stack_depth = 0;
+ static int *yy_start_stack = NULL;
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ { \
+ int c = '*'; \
+ int n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else \
+ { \
+ errno=0; \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(yyin); \
+ } \
+ }\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK /*LINTED*/break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+
+ if ( !(yy_init) )
+ {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_load_buffer_state( );
+ }
+
+ {
+#line 75 "vowel/vowel-rules.l"
+
+
+#line 1040 "vowel/vowel-rules-l.c"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = (yy_c_buf_p);
+
+ /* Support of yytext. */
+ *yy_cp = (yy_hold_char);
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = (yy_start);
+yy_match:
+ do
+ {
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 71 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 139 );
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+ if ( yy_act == 0 )
+ { /* have to back up */
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ yy_act = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+do_action: /* This label is used only to access EOF actions. */
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = (yy_hold_char);
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 77 "vowel/vowel-rules.l"
+{ BEGIN(lang); return LANGUAGE; }
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 78 "vowel/vowel-rules.l"
+{ BEGIN(chars); return VOWEL; }
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 79 "vowel/vowel-rules.l"
+{ BEGIN(chars); return PREFIX; }
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 80 "vowel/vowel-rules.l"
+{ BEGIN(chars); return SUFFIX; }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 81 "vowel/vowel-rules.l"
+{ BEGIN(chars); return SECONDARY; }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 82 "vowel/vowel-rules.l"
+{ BEGIN(lang); return ALIAS; }
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 83 "vowel/vowel-rules.l"
+{ BEGIN(INITIAL); return SEMICOLON; }
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 84 "vowel/vowel-rules.l"
+{ return TO; }
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 85 "vowel/vowel-rules.l"
+{ BEGIN(langname); }
+ YY_BREAK
+case 10:
+/* rule 10 can match eol */
+YY_RULE_SETUP
+#line 86 "vowel/vowel-rules.l"
+{ save_lval(); return NAME; }
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 87 "vowel/vowel-rules.l"
+{ BEGIN(lang); }
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 88 "vowel/vowel-rules.l"
+{ save_lval(); return CHARACTERS; }
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 89 "vowel/vowel-rules.l"
+{ }
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 90 "vowel/vowel-rules.l"
+{ }
+ YY_BREAK
+case 15:
+/* rule 15 can match eol */
+YY_RULE_SETUP
+#line 91 "vowel/vowel-rules.l"
+{ }
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 92 "vowel/vowel-rules.l"
+{ invalid(); return INVALID; }
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 94 "vowel/vowel-rules.l"
+ECHO;
+ YY_BREAK
+#line 1184 "vowel/vowel-rules-l.c"
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(chars):
+case YY_STATE_EOF(lang):
+case YY_STATE_EOF(langname):
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between YY_CURRENT_BUFFER and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = (yy_c_buf_p);
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( yywrap( ) )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of user's declarations */
+} /* end of yylex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
+ int ret_val;
+
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+ else
+ {
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+
+ int yy_c_buf_p_offset =
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = NULL;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ if ( (yy_n_chars) == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
+ }
+
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+ static yy_state_type yy_get_previous_state (void)
+{
+ yy_state_type yy_current_state;
+ char *yy_cp;
+
+ yy_current_state = (yy_start);
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ {
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 71 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ }
+
+ return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
+
+ YY_CHAR yy_c = 1;
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 71 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_is_jam = (yy_current_state == 70);
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+#ifndef YY_NO_UNPUT
+
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+ static int yyinput (void)
+#else
+ static int input (void)
+#endif
+
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
+
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ /* This was really a NUL. */
+ *(yy_c_buf_p) = '\0';
+
+ else
+ { /* need more input */
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+ ++(yy_c_buf_p);
+
+ switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap( ) )
+ return 0;
+
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ (yy_hold_char) = *++(yy_c_buf_p);
+
+ return c;
+}
+#endif /* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void yyrestart (FILE * input_file )
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
+ return;
+
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ yy_load_buffer_state( );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void yy_load_buffer_state (void)
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
+ if ( ! b )
+ return;
+
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yyfree( (void *) b->yy_ch_buf );
+
+ yyfree( (void *) b );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+
+{
+ int oerrno = errno;
+
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+ void yy_flush_buffer (YY_BUFFER_STATE b )
+{
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == YY_CURRENT_BUFFER )
+ yy_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+ if (new_buffer == NULL)
+ return;
+
+ yyensure_buffer_stack();
+
+ /* This block is copied from yy_switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+void yypop_buffer_state (void)
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+ }
+}
+
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+ yy_size_t num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
+
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+{
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return NULL;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = NULL;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
+{
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
+{
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
+
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yynoreturn yy_fatal_error (const char* msg )
+{
+ fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
+
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
+
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
+
+/** Get the length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
+
+/** Get the current token.
+ *
+ */
+
+char *yyget_text (void)
+{
+ return yytext;
+}
+
+/** Set the current line number.
+ * @param _line_number line number
+ *
+ */
+void yyset_lineno (int _line_number )
+{
+
+ yylineno = _line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param _in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE * _in_str )
+{
+ yyin = _in_str ;
+}
+
+void yyset_out (FILE * _out_str )
+{
+ yyout = _out_str ;
+}
+
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
+
+void yyset_debug (int _bdebug )
+{
+ yy_flex_debug = _bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ (yy_buffer_stack) = NULL;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = NULL;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+ (yy_start_stack_ptr) = 0;
+ (yy_start_stack_depth) = 0;
+ (yy_start_stack) = NULL;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
+#else
+ yyin = NULL;
+ yyout = NULL;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ yy_delete_buffer( YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ yypop_buffer_state();
+ }
+
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+
+ /* Destroy the start condition stack. */
+ yyfree( (yy_start_stack) );
+ (yy_start_stack) = NULL;
+
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+
+ return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
+{
+
+ int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (const char * s )
+{
+ int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *yyalloc (yy_size_t size )
+{
+ return malloc(size);
+}
+
+void *yyrealloc (void * ptr, yy_size_t size )
+{
+
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return realloc(ptr, size);
+}
+
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 94 "vowel/vowel-rules.l"
+
+
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.h b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.h
new file mode 100644
index 00000000000..cecacf9603c
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.h
@@ -0,0 +1,714 @@
+#ifndef gregorio_vowel_rulefile_HEADER_H
+#define gregorio_vowel_rulefile_HEADER_H 1
+#define gregorio_vowel_rulefile_IN_HEADER 1
+
+#line 5 "vowel/vowel-rules-l.h"
+
+#line 7 "vowel/vowel-rules-l.h"
+
+#define YY_INT_ALIGNED long int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+#ifdef yy_create_buffer
+#define gregorio_vowel_rulefile__create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer gregorio_vowel_rulefile__create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define gregorio_vowel_rulefile__delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer gregorio_vowel_rulefile__delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define gregorio_vowel_rulefile__scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer gregorio_vowel_rulefile__scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define gregorio_vowel_rulefile__scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string gregorio_vowel_rulefile__scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define gregorio_vowel_rulefile__scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes gregorio_vowel_rulefile__scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define gregorio_vowel_rulefile__init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer gregorio_vowel_rulefile__init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define gregorio_vowel_rulefile__flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer gregorio_vowel_rulefile__flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define gregorio_vowel_rulefile__load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state gregorio_vowel_rulefile__load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define gregorio_vowel_rulefile__switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer gregorio_vowel_rulefile__switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define gregorio_vowel_rulefile_push_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state gregorio_vowel_rulefile_push_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define gregorio_vowel_rulefile_pop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state gregorio_vowel_rulefile_pop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define gregorio_vowel_rulefile_ensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack gregorio_vowel_rulefile_ensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define gregorio_vowel_rulefile_lex_ALREADY_DEFINED
+#else
+#define yylex gregorio_vowel_rulefile_lex
+#endif
+
+#ifdef yyrestart
+#define gregorio_vowel_rulefile_restart_ALREADY_DEFINED
+#else
+#define yyrestart gregorio_vowel_rulefile_restart
+#endif
+
+#ifdef yylex_init
+#define gregorio_vowel_rulefile_lex_init_ALREADY_DEFINED
+#else
+#define yylex_init gregorio_vowel_rulefile_lex_init
+#endif
+
+#ifdef yylex_init_extra
+#define gregorio_vowel_rulefile_lex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra gregorio_vowel_rulefile_lex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define gregorio_vowel_rulefile_lex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy gregorio_vowel_rulefile_lex_destroy
+#endif
+
+#ifdef yyget_debug
+#define gregorio_vowel_rulefile_get_debug_ALREADY_DEFINED
+#else
+#define yyget_debug gregorio_vowel_rulefile_get_debug
+#endif
+
+#ifdef yyset_debug
+#define gregorio_vowel_rulefile_set_debug_ALREADY_DEFINED
+#else
+#define yyset_debug gregorio_vowel_rulefile_set_debug
+#endif
+
+#ifdef yyget_extra
+#define gregorio_vowel_rulefile_get_extra_ALREADY_DEFINED
+#else
+#define yyget_extra gregorio_vowel_rulefile_get_extra
+#endif
+
+#ifdef yyset_extra
+#define gregorio_vowel_rulefile_set_extra_ALREADY_DEFINED
+#else
+#define yyset_extra gregorio_vowel_rulefile_set_extra
+#endif
+
+#ifdef yyget_in
+#define gregorio_vowel_rulefile_get_in_ALREADY_DEFINED
+#else
+#define yyget_in gregorio_vowel_rulefile_get_in
+#endif
+
+#ifdef yyset_in
+#define gregorio_vowel_rulefile_set_in_ALREADY_DEFINED
+#else
+#define yyset_in gregorio_vowel_rulefile_set_in
+#endif
+
+#ifdef yyget_out
+#define gregorio_vowel_rulefile_get_out_ALREADY_DEFINED
+#else
+#define yyget_out gregorio_vowel_rulefile_get_out
+#endif
+
+#ifdef yyset_out
+#define gregorio_vowel_rulefile_set_out_ALREADY_DEFINED
+#else
+#define yyset_out gregorio_vowel_rulefile_set_out
+#endif
+
+#ifdef yyget_leng
+#define gregorio_vowel_rulefile_get_leng_ALREADY_DEFINED
+#else
+#define yyget_leng gregorio_vowel_rulefile_get_leng
+#endif
+
+#ifdef yyget_text
+#define gregorio_vowel_rulefile_get_text_ALREADY_DEFINED
+#else
+#define yyget_text gregorio_vowel_rulefile_get_text
+#endif
+
+#ifdef yyget_lineno
+#define gregorio_vowel_rulefile_get_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno gregorio_vowel_rulefile_get_lineno
+#endif
+
+#ifdef yyset_lineno
+#define gregorio_vowel_rulefile_set_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno gregorio_vowel_rulefile_set_lineno
+#endif
+
+#ifdef yywrap
+#define gregorio_vowel_rulefile_wrap_ALREADY_DEFINED
+#else
+#define yywrap gregorio_vowel_rulefile_wrap
+#endif
+
+#ifdef yyalloc
+#define gregorio_vowel_rulefile_alloc_ALREADY_DEFINED
+#else
+#define yyalloc gregorio_vowel_rulefile_alloc
+#endif
+
+#ifdef yyrealloc
+#define gregorio_vowel_rulefile_realloc_ALREADY_DEFINED
+#else
+#define yyrealloc gregorio_vowel_rulefile_realloc
+#endif
+
+#ifdef yyfree
+#define gregorio_vowel_rulefile_free_ALREADY_DEFINED
+#else
+#define yyfree gregorio_vowel_rulefile_free
+#endif
+
+#ifdef yytext
+#define gregorio_vowel_rulefile_text_ALREADY_DEFINED
+#else
+#define yytext gregorio_vowel_rulefile_text
+#endif
+
+#ifdef yyleng
+#define gregorio_vowel_rulefile_leng_ALREADY_DEFINED
+#else
+#define yyleng gregorio_vowel_rulefile_leng
+#endif
+
+#ifdef yyin
+#define gregorio_vowel_rulefile_in_ALREADY_DEFINED
+#else
+#define yyin gregorio_vowel_rulefile_in
+#endif
+
+#ifdef yyout
+#define gregorio_vowel_rulefile_out_ALREADY_DEFINED
+#else
+#define yyout gregorio_vowel_rulefile_out
+#endif
+
+#ifdef yy_flex_debug
+#define gregorio_vowel_rulefile__flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug gregorio_vowel_rulefile__flex_debug
+#endif
+
+#ifdef yylineno
+#define gregorio_vowel_rulefile_lineno_ALREADY_DEFINED
+#else
+#define yylineno gregorio_vowel_rulefile_lineno
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* begin standard C++ headers. */
+
+/* TODO: this is always defined, so inline it */
+#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
+#else
+#define yynoreturn
+#endif
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern int yyleng;
+
+extern FILE *yyin, *yyout;
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ int yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
+
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+
+/* Begin user sect3 */
+
+#define gregorio_vowel_rulefile_wrap() (/*CONSTCOND*/1)
+#define YY_SKIP_YYWRAP
+
+extern int yylineno;
+
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
+
+#ifdef YY_HEADER_EXPORT_START_CONDITIONS
+#define INITIAL 0
+#define chars 1
+#define lang 2
+#define langname 3
+
+#endif
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy ( void );
+
+int yyget_debug ( void );
+
+void yyset_debug ( int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra ( void );
+
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in ( void );
+
+void yyset_in ( FILE * _in_str );
+
+FILE *yyget_out ( void );
+
+void yyset_out ( FILE * _out_str );
+
+ int yyget_leng ( void );
+
+char *yyget_text ( void );
+
+int yyget_lineno ( void );
+
+void yyset_lineno ( int _line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap ( void );
+#else
+extern int yywrap ( void );
+#endif
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy ( char *, const char *, int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen ( const char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+#undef YY_NEW_FILE
+#undef YY_FLUSH_BUFFER
+#undef yy_set_bol
+#undef yy_new_buffer
+#undef yy_set_interactive
+#undef YY_DO_BEFORE_ACTION
+
+#ifdef YY_DECL_IS_OURS
+#undef YY_DECL_IS_OURS
+#undef YY_DECL
+#endif
+
+#ifndef gregorio_vowel_rulefile__create_buffer_ALREADY_DEFINED
+#undef yy_create_buffer
+#endif
+#ifndef gregorio_vowel_rulefile__delete_buffer_ALREADY_DEFINED
+#undef yy_delete_buffer
+#endif
+#ifndef gregorio_vowel_rulefile__scan_buffer_ALREADY_DEFINED
+#undef yy_scan_buffer
+#endif
+#ifndef gregorio_vowel_rulefile__scan_string_ALREADY_DEFINED
+#undef yy_scan_string
+#endif
+#ifndef gregorio_vowel_rulefile__scan_bytes_ALREADY_DEFINED
+#undef yy_scan_bytes
+#endif
+#ifndef gregorio_vowel_rulefile__init_buffer_ALREADY_DEFINED
+#undef yy_init_buffer
+#endif
+#ifndef gregorio_vowel_rulefile__flush_buffer_ALREADY_DEFINED
+#undef yy_flush_buffer
+#endif
+#ifndef gregorio_vowel_rulefile__load_buffer_state_ALREADY_DEFINED
+#undef yy_load_buffer_state
+#endif
+#ifndef gregorio_vowel_rulefile__switch_to_buffer_ALREADY_DEFINED
+#undef yy_switch_to_buffer
+#endif
+#ifndef gregorio_vowel_rulefile_push_buffer_state_ALREADY_DEFINED
+#undef yypush_buffer_state
+#endif
+#ifndef gregorio_vowel_rulefile_pop_buffer_state_ALREADY_DEFINED
+#undef yypop_buffer_state
+#endif
+#ifndef gregorio_vowel_rulefile_ensure_buffer_stack_ALREADY_DEFINED
+#undef yyensure_buffer_stack
+#endif
+#ifndef gregorio_vowel_rulefile_lex_ALREADY_DEFINED
+#undef yylex
+#endif
+#ifndef gregorio_vowel_rulefile_restart_ALREADY_DEFINED
+#undef yyrestart
+#endif
+#ifndef gregorio_vowel_rulefile_lex_init_ALREADY_DEFINED
+#undef yylex_init
+#endif
+#ifndef gregorio_vowel_rulefile_lex_init_extra_ALREADY_DEFINED
+#undef yylex_init_extra
+#endif
+#ifndef gregorio_vowel_rulefile_lex_destroy_ALREADY_DEFINED
+#undef yylex_destroy
+#endif
+#ifndef gregorio_vowel_rulefile_get_debug_ALREADY_DEFINED
+#undef yyget_debug
+#endif
+#ifndef gregorio_vowel_rulefile_set_debug_ALREADY_DEFINED
+#undef yyset_debug
+#endif
+#ifndef gregorio_vowel_rulefile_get_extra_ALREADY_DEFINED
+#undef yyget_extra
+#endif
+#ifndef gregorio_vowel_rulefile_set_extra_ALREADY_DEFINED
+#undef yyset_extra
+#endif
+#ifndef gregorio_vowel_rulefile_get_in_ALREADY_DEFINED
+#undef yyget_in
+#endif
+#ifndef gregorio_vowel_rulefile_set_in_ALREADY_DEFINED
+#undef yyset_in
+#endif
+#ifndef gregorio_vowel_rulefile_get_out_ALREADY_DEFINED
+#undef yyget_out
+#endif
+#ifndef gregorio_vowel_rulefile_set_out_ALREADY_DEFINED
+#undef yyset_out
+#endif
+#ifndef gregorio_vowel_rulefile_get_leng_ALREADY_DEFINED
+#undef yyget_leng
+#endif
+#ifndef gregorio_vowel_rulefile_get_text_ALREADY_DEFINED
+#undef yyget_text
+#endif
+#ifndef gregorio_vowel_rulefile_get_lineno_ALREADY_DEFINED
+#undef yyget_lineno
+#endif
+#ifndef gregorio_vowel_rulefile_set_lineno_ALREADY_DEFINED
+#undef yyset_lineno
+#endif
+#ifndef gregorio_vowel_rulefile_get_column_ALREADY_DEFINED
+#undef yyget_column
+#endif
+#ifndef gregorio_vowel_rulefile_set_column_ALREADY_DEFINED
+#undef yyset_column
+#endif
+#ifndef gregorio_vowel_rulefile_wrap_ALREADY_DEFINED
+#undef yywrap
+#endif
+#ifndef gregorio_vowel_rulefile_get_lval_ALREADY_DEFINED
+#undef yyget_lval
+#endif
+#ifndef gregorio_vowel_rulefile_set_lval_ALREADY_DEFINED
+#undef yyset_lval
+#endif
+#ifndef gregorio_vowel_rulefile_get_lloc_ALREADY_DEFINED
+#undef yyget_lloc
+#endif
+#ifndef gregorio_vowel_rulefile_set_lloc_ALREADY_DEFINED
+#undef yyset_lloc
+#endif
+#ifndef gregorio_vowel_rulefile_alloc_ALREADY_DEFINED
+#undef yyalloc
+#endif
+#ifndef gregorio_vowel_rulefile_realloc_ALREADY_DEFINED
+#undef yyrealloc
+#endif
+#ifndef gregorio_vowel_rulefile_free_ALREADY_DEFINED
+#undef yyfree
+#endif
+#ifndef gregorio_vowel_rulefile_text_ALREADY_DEFINED
+#undef yytext
+#endif
+#ifndef gregorio_vowel_rulefile_leng_ALREADY_DEFINED
+#undef yyleng
+#endif
+#ifndef gregorio_vowel_rulefile_in_ALREADY_DEFINED
+#undef yyin
+#endif
+#ifndef gregorio_vowel_rulefile_out_ALREADY_DEFINED
+#undef yyout
+#endif
+#ifndef gregorio_vowel_rulefile__flex_debug_ALREADY_DEFINED
+#undef yy_flex_debug
+#endif
+#ifndef gregorio_vowel_rulefile_lineno_ALREADY_DEFINED
+#undef yylineno
+#endif
+#ifndef gregorio_vowel_rulefile_tables_fload_ALREADY_DEFINED
+#undef yytables_fload
+#endif
+#ifndef gregorio_vowel_rulefile_tables_destroy_ALREADY_DEFINED
+#undef yytables_destroy
+#endif
+#ifndef gregorio_vowel_rulefile_TABLES_NAME_ALREADY_DEFINED
+#undef yyTABLES_NAME
+#endif
+
+#line 94 "vowel/vowel-rules.l"
+
+
+#line 712 "vowel/vowel-rules-l.h"
+#undef gregorio_vowel_rulefile_IN_HEADER
+#endif /* gregorio_vowel_rulefile_HEADER_H */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.c b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.c
new file mode 100644
index 00000000000..d57e881735e
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.c
@@ -0,0 +1,1610 @@
+/* A Bison parser, made by GNU Bison 3.3.2. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Undocumented macros, especially those whose name start with YY_,
+ are private implementation details. Do not rely on them. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "3.3.2"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+/* Substitute the variable and function names. */
+#define yyparse gregorio_vowel_rulefile_parse
+#define yylex gregorio_vowel_rulefile_lex
+#define yyerror gregorio_vowel_rulefile_error
+#define yydebug gregorio_vowel_rulefile_debug
+#define yynerrs gregorio_vowel_rulefile_nerrs
+
+#define yylval gregorio_vowel_rulefile_lval
+#define yychar gregorio_vowel_rulefile_char
+
+/* First part of user prologue. */
+#line 1 "vowel/vowel-rules.y" /* yacc.c:337 */
+
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the vowel rule parser.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+
+#include "vowel.h"
+
+#include "vowel-rules.h"
+#include "vowel-rules-l.h"
+
+/* NOTE: This parser might allocate a new value for language; this value MUST
+ * BE FREED after the parser returns (if the value of the language pointer
+ * changes, then free the pointer). This parser DOES free the language
+ * pointer before changing it, if status points to RFPS_ALIASED. */
+
+/* uncomment it if you want to have an interactive shell to understand the
+ * details on how bison works for a certain input */
+/*int gregorio_vowel_rulefile_debug=1;*/
+
+static void gregorio_vowel_rulefile_error(const char *const filename,
+ char **const language __attribute__((__unused__)),
+ rulefile_parse_status *const status __attribute__((__unused__)),
+ const char *const error_str)
+{
+ gregorio_messagef("gregorio_vowel_rulefile_parse", VERBOSITY_ERROR, 0,
+ _("%s: %s"), filename, error_str);
+}
+
+/* this returns false until the language *after* the desired language */
+static __inline bool match_language(char **language,
+ rulefile_parse_status *status, char *const name)
+{
+ if (*status == RFPS_FOUND) {
+ free(name);
+ return true;
+ }
+
+ if (strcmp(*language, name) == 0) {
+ *status = RFPS_FOUND;
+ }
+
+ free(name);
+ return false;
+}
+
+static __inline void alias(char **const language,
+ rulefile_parse_status *const status, char *const name,
+ char *const target)
+{
+ if (strcmp(*language, name) == 0) {
+ gregorio_messagef("alias", VERBOSITY_INFO, 0, _("Aliasing %s to %s"),
+ name, target);
+ if (*status == RFPS_ALIASED) {
+ free(*language);
+ }
+ *language = target;
+ *status = RFPS_ALIASED;
+ } else {
+ free(target);
+ }
+ free(name);
+}
+
+static __inline void add(const rulefile_parse_status *const status,
+ void (*const fn)(const char *), char *const value)
+{
+ if (*status == RFPS_FOUND) {
+ fn(value);
+ }
+ free(value);
+}
+
+#define _MATCH(NAME) if (match_language(language, status, NAME)) YYACCEPT
+#define _ALIAS(NAME, TARGET) alias(language, status, NAME, TARGET)
+#define _ADD(TABLE, CHARS) add(status, gregorio_##TABLE##_table_add, CHARS)
+
+
+#line 181 "vowel/vowel-rules-y.c" /* yacc.c:337 */
+# ifndef YY_NULLPTR
+# if defined __cplusplus
+# if 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# else
+# define YY_NULLPTR ((void*)0)
+# endif
+# endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* In a future release of Bison, this section will be replaced
+ by #include "vowel-rules-y.h". */
+#ifndef YY_GREGORIO_VOWEL_RULEFILE_VOWEL_VOWEL_RULES_Y_H_INCLUDED
+# define YY_GREGORIO_VOWEL_RULEFILE_VOWEL_VOWEL_RULES_Y_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int gregorio_vowel_rulefile_debug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ LANGUAGE = 258,
+ VOWEL = 259,
+ PREFIX = 260,
+ SUFFIX = 261,
+ SECONDARY = 262,
+ ALIAS = 263,
+ SEMICOLON = 264,
+ TO = 265,
+ NAME = 266,
+ CHARACTERS = 267,
+ INVALID = 268
+ };
+#endif
+/* Tokens. */
+#define LANGUAGE 258
+#define VOWEL 259
+#define PREFIX 260
+#define SUFFIX 261
+#define SECONDARY 262
+#define ALIAS 263
+#define SEMICOLON 264
+#define TO 265
+#define NAME 266
+#define CHARACTERS 267
+#define INVALID 268
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern YYSTYPE gregorio_vowel_rulefile_lval;
+
+int gregorio_vowel_rulefile_parse (const char *const filename, char **language, rulefile_parse_status *const status);
+
+#endif /* !YY_GREGORIO_VOWEL_RULEFILE_VOWEL_VOWEL_RULES_Y_H_INCLUDED */
+
+
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 2
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 21
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 14
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 7
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 17
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 28
+
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 268
+
+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, with out-of-bounds checking. */
+#define YYTRANSLATE(YYX) \
+ ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13
+};
+
+#if YYDEBUG
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_uint8 yyrline[] =
+{
+ 0, 114, 114, 116, 120, 121, 122, 123, 124, 125,
+ 128, 130, 133, 135, 138, 140, 143, 145
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || 0
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "LANGUAGE", "VOWEL", "PREFIX", "SUFFIX",
+ "SECONDARY", "ALIAS", "SEMICOLON", "TO", "NAME", "CHARACTERS", "INVALID",
+ "$accept", "rules", "rule", "vowels", "prefixes", "suffixes",
+ "secondaries", YY_NULLPTR
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268
+};
+# endif
+
+#define YYPACT_NINF -11
+
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-11)))
+
+#define YYTABLE_NINF -1
+
+#define yytable_value_is_error(Yytable_value) \
+ 0
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int8 yypact[] =
+{
+ -11, 0, -11, -10, -11, -11, -11, -11, -9, -11,
+ 8, 1, 2, 3, 7, -1, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, 9, 12, -11
+};
+
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 2, 0, 1, 0, 10, 12, 14, 16, 0, 3,
+ 0, 0, 0, 0, 0, 0, 4, 6, 11, 7,
+ 13, 8, 15, 9, 17, 0, 0, 5
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int8 yypgoto[] =
+{
+ -11, -11, -11, -11, -11, -11, -11
+};
+
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 1, 9, 11, 12, 13, 14
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_uint8 yytable[] =
+{
+ 2, 10, 15, 3, 4, 5, 6, 7, 8, 25,
+ 17, 19, 21, 18, 20, 22, 23, 16, 0, 24,
+ 26, 27
+};
+
+static const yytype_int8 yycheck[] =
+{
+ 0, 11, 11, 3, 4, 5, 6, 7, 8, 10,
+ 9, 9, 9, 12, 12, 12, 9, 9, -1, 12,
+ 11, 9
+};
+
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 15, 0, 3, 4, 5, 6, 7, 8, 16,
+ 11, 17, 18, 19, 20, 11, 9, 9, 12, 9,
+ 12, 9, 12, 9, 12, 10, 11, 9
+};
+
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 14, 15, 15, 16, 16, 16, 16, 16, 16,
+ 17, 17, 18, 18, 19, 19, 20, 20
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 0, 2, 3, 5, 3, 3, 3, 3,
+ 0, 2, 0, 2, 0, 2, 0, 2
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+ do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (filename, language, status, YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+ while (0)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, filename, language, status); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*-----------------------------------.
+| Print this symbol's value on YYO. |
+`-----------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, const char *const filename, char **language, rulefile_parse_status *const status)
+{
+ FILE *yyoutput = yyo;
+ YYUSE (yyoutput);
+ YYUSE (filename);
+ YYUSE (language);
+ YYUSE (status);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
+# endif
+ YYUSE (yytype);
+}
+
+
+/*---------------------------.
+| Print this symbol on YYO. |
+`---------------------------*/
+
+static void
+yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, const char *const filename, char **language, rulefile_parse_status *const status)
+{
+ YYFPRINTF (yyo, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+ yy_symbol_value_print (yyo, yytype, yyvaluep, filename, language, status);
+ YYFPRINTF (yyo, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, const char *const filename, char **language, rulefile_parse_status *const status)
+{
+ unsigned long yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &yyvsp[(yyi + 1) - (yynrhs)]
+ , filename, language, status);
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule, filename, language, status); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ else
+ goto append;
+
+ append:
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+ yysize = yysize1;
+ else
+ return 2;
+ }
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ default: /* Avoid compiler warnings. */
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+ yysize = yysize1;
+ else
+ return 2;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, const char *const filename, char **language, rulefile_parse_status *const status)
+{
+ YYUSE (yyvaluep);
+ YYUSE (filename);
+ YYUSE (language);
+ YYUSE (status);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (const char *const filename, char **language, rulefile_parse_status *const status)
+{
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+ goto yysetstate;
+
+
+/*------------------------------------------------------------.
+| yynewstate -- push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+
+/*--------------------------------------------------------------------.
+| yynewstate -- set current state (the top of the stack) to yystate. |
+`--------------------------------------------------------------------*/
+yysetstate:
+ *yyssp = (yytype_int16) yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+#if !defined yyoverflow && !defined YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+#else
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
+
+# if defined yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+# else /* defined YYSTACK_RELOCATE */
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex ();
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 4:
+#line 120 "vowel/vowel-rules.y" /* yacc.c:1652 */
+ { _MATCH(yyvsp[-1]); }
+#line 1347 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ break;
+
+ case 5:
+#line 121 "vowel/vowel-rules.y" /* yacc.c:1652 */
+ { _ALIAS(yyvsp[-3], yyvsp[-1]); }
+#line 1353 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ break;
+
+ case 11:
+#line 130 "vowel/vowel-rules.y" /* yacc.c:1652 */
+ { _ADD(vowel, yyvsp[0]); }
+#line 1359 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ break;
+
+ case 13:
+#line 135 "vowel/vowel-rules.y" /* yacc.c:1652 */
+ { _ADD(prefix, yyvsp[0]); }
+#line 1365 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ break;
+
+ case 15:
+#line 140 "vowel/vowel-rules.y" /* yacc.c:1652 */
+ { _ADD(suffix, yyvsp[0]); }
+#line 1371 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ break;
+
+ case 17:
+#line 145 "vowel/vowel-rules.y" /* yacc.c:1652 */
+ { _ADD(secondary, yyvsp[0]); }
+#line 1377 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ break;
+
+
+#line 1381 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+ /* Now 'shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+ {
+ const int yylhs = yyr1[yyn] - YYNTOKENS;
+ const int yyi = yypgoto[yylhs] + *yyssp;
+ yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
+ ? yytable[yyi]
+ : yydefgoto[yylhs]);
+ }
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (filename, language, status, YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (filename, language, status, yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, filename, language, status);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers when the user code never invokes YYERROR and the
+ label yyerrorlab therefore never appears in user code. */
+ if (0)
+ YYERROR;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp, filename, language, status);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (filename, language, status, YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+
+/*-----------------------------------------------------.
+| yyreturn -- parsing is finished, return the result. |
+`-----------------------------------------------------*/
+yyreturn:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, filename, language, status);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp, filename, language, status);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ return yyresult;
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.h b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.h
new file mode 100644
index 00000000000..6d808829b3a
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.h
@@ -0,0 +1,90 @@
+/* A Bison parser, made by GNU Bison 3.3.2. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* Undocumented macros, especially those whose name start with YY_,
+ are private implementation details. Do not rely on them. */
+
+#ifndef YY_GREGORIO_VOWEL_RULEFILE_VOWEL_VOWEL_RULES_Y_H_INCLUDED
+# define YY_GREGORIO_VOWEL_RULEFILE_VOWEL_VOWEL_RULES_Y_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int gregorio_vowel_rulefile_debug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ LANGUAGE = 258,
+ VOWEL = 259,
+ PREFIX = 260,
+ SUFFIX = 261,
+ SECONDARY = 262,
+ ALIAS = 263,
+ SEMICOLON = 264,
+ TO = 265,
+ NAME = 266,
+ CHARACTERS = 267,
+ INVALID = 268
+ };
+#endif
+/* Tokens. */
+#define LANGUAGE 258
+#define VOWEL 259
+#define PREFIX 260
+#define SUFFIX 261
+#define SECONDARY 262
+#define ALIAS 263
+#define SEMICOLON 264
+#define TO 265
+#define NAME 266
+#define CHARACTERS 267
+#define INVALID 268
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern YYSTYPE gregorio_vowel_rulefile_lval;
+
+int gregorio_vowel_rulefile_parse (const char *const filename, char **language, rulefile_parse_status *const status);
+
+#endif /* !YY_GREGORIO_VOWEL_RULEFILE_VOWEL_VOWEL_RULES_Y_H_INCLUDED */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.h b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.h
new file mode 100644
index 00000000000..f53bb66d681
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.h
@@ -0,0 +1,28 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header shares definitions between the vowel parser and lexer.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define YYSTYPE char *
+#define YYSTYPE_IS_DECLARED 1
+
+int gregorio_vowel_rulefile_lex(void);
+#define YY_DECL int gregorio_vowel_rulefile_lex(void)
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l
new file mode 100644
index 00000000000..89215af0af8
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l
@@ -0,0 +1,95 @@
+%{
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the vowel rule lexer.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "struct.h"
+#include "messages.h"
+#include "support.h"
+
+#include "vowel.h"
+
+#include "vowel-rules.h"
+#include "vowel-rules-y.h"
+
+#define YY_NO_INPUT
+
+static __inline void save_lval(void)
+{
+ gregorio_vowel_rulefile_lval =
+ gregorio_malloc(gregorio_vowel_rulefile_leng + 1);
+ strncpy(gregorio_vowel_rulefile_lval, gregorio_vowel_rulefile_text,
+ gregorio_vowel_rulefile_leng);
+ gregorio_vowel_rulefile_lval[gregorio_vowel_rulefile_leng] = '\0';
+}
+
+static __inline void invalid(void)
+{
+ gregorio_messagef("gregorio_vowel_rulefile_lex", VERBOSITY_WARNING, 0,
+ _("invalid character in vowel file: %c"),
+ *gregorio_vowel_rulefile_text);
+}
+%}
+
+%x chars
+%x lang
+%x langname
+
+%option stack
+%option pointer
+%option nounput
+%option noyy_push_state
+%option noyy_pop_state
+%option noyy_top_state
+%option align
+%option noread
+%option nomain
+%option noalways-interactive
+%option nonever-interactive
+%option prefix="gregorio_vowel_rulefile_"
+%option noyywrap
+%option 8bit
+
+%%
+
+<INITIAL>language { BEGIN(lang); return LANGUAGE; }
+<INITIAL>vowel { BEGIN(chars); return VOWEL; }
+<INITIAL>prefix { BEGIN(chars); return PREFIX; }
+<INITIAL>suffix { BEGIN(chars); return SUFFIX; }
+<INITIAL>secondary { BEGIN(chars); return SECONDARY; }
+<INITIAL>alias { BEGIN(lang); return ALIAS; }
+<*>; { BEGIN(INITIAL); return SEMICOLON; }
+<lang>to { return TO; }
+<lang>"[" { BEGIN(langname); }
+<langname>[^\]]+ { save_lval(); return NAME; }
+<langname>"]" { BEGIN(lang); }
+<chars>[^;,# \t\n\r\v\f]+ { save_lval(); return CHARACTERS; }
+<*>#[^\n\r]* { }
+<INITIAL>\xEF\xBB\xBF { }
+<*>[\ \t\n\r\v\f] { }
+<*>. { invalid(); return INVALID; }
+
+%%
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.y b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.y
new file mode 100644
index 00000000000..bcdfb77c74a
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.y
@@ -0,0 +1,146 @@
+%{
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the vowel rule parser.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+
+#include "vowel.h"
+
+#include "vowel-rules.h"
+#include "vowel-rules-l.h"
+
+/* NOTE: This parser might allocate a new value for language; this value MUST
+ * BE FREED after the parser returns (if the value of the language pointer
+ * changes, then free the pointer). This parser DOES free the language
+ * pointer before changing it, if status points to RFPS_ALIASED. */
+
+/* uncomment it if you want to have an interactive shell to understand the
+ * details on how bison works for a certain input */
+/*int gregorio_vowel_rulefile_debug=1;*/
+
+static void gregorio_vowel_rulefile_error(const char *const filename,
+ char **const language __attribute__((__unused__)),
+ rulefile_parse_status *const status __attribute__((__unused__)),
+ const char *const error_str)
+{
+ gregorio_messagef("gregorio_vowel_rulefile_parse", VERBOSITY_ERROR, 0,
+ _("%s: %s"), filename, error_str);
+}
+
+/* this returns false until the language *after* the desired language */
+static __inline bool match_language(char **language,
+ rulefile_parse_status *status, char *const name)
+{
+ if (*status == RFPS_FOUND) {
+ free(name);
+ return true;
+ }
+
+ if (strcmp(*language, name) == 0) {
+ *status = RFPS_FOUND;
+ }
+
+ free(name);
+ return false;
+}
+
+static __inline void alias(char **const language,
+ rulefile_parse_status *const status, char *const name,
+ char *const target)
+{
+ if (strcmp(*language, name) == 0) {
+ gregorio_messagef("alias", VERBOSITY_INFO, 0, _("Aliasing %s to %s"),
+ name, target);
+ if (*status == RFPS_ALIASED) {
+ free(*language);
+ }
+ *language = target;
+ *status = RFPS_ALIASED;
+ } else {
+ free(target);
+ }
+ free(name);
+}
+
+static __inline void add(const rulefile_parse_status *const status,
+ void (*const fn)(const char *), char *const value)
+{
+ if (*status == RFPS_FOUND) {
+ fn(value);
+ }
+ free(value);
+}
+
+#define _MATCH(NAME) if (match_language(language, status, NAME)) YYACCEPT
+#define _ALIAS(NAME, TARGET) alias(language, status, NAME, TARGET)
+#define _ADD(TABLE, CHARS) add(status, gregorio_##TABLE##_table_add, CHARS)
+
+%}
+
+%name-prefix "gregorio_vowel_rulefile_"
+%parse-param { const char *const filename }
+%parse-param { char **language }
+%parse-param { rulefile_parse_status *const status }
+
+%token LANGUAGE VOWEL PREFIX SUFFIX SECONDARY ALIAS SEMICOLON TO
+%token NAME CHARACTERS INVALID
+
+%%
+
+rules
+ :
+ | rules rule
+ ;
+
+rule
+ : LANGUAGE NAME SEMICOLON { _MATCH($2); }
+ | ALIAS NAME TO NAME SEMICOLON { _ALIAS($2, $4); }
+ | VOWEL vowels SEMICOLON
+ | PREFIX prefixes SEMICOLON
+ | SUFFIX suffixes SEMICOLON
+ | SECONDARY secondaries SEMICOLON
+ ;
+
+vowels
+ :
+ | vowels CHARACTERS { _ADD(vowel, $2); }
+ ;
+
+prefixes
+ :
+ | prefixes CHARACTERS { _ADD(prefix, $2); }
+ ;
+
+suffixes
+ :
+ | suffixes CHARACTERS { _ADD(suffix, $2); }
+ ;
+
+secondaries
+ :
+ | secondaries CHARACTERS { _ADD(secondary, $2); }
+ ;
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.c b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.c
new file mode 100644
index 00000000000..a765ee77b1f
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.c
@@ -0,0 +1,447 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements vowel rule handling (aside from parsing).
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <errno.h>
+#include "bool.h"
+#include "vowel.h"
+#include "unicode.h"
+#include "messages.h"
+#include "support.h"
+
+typedef struct character_set {
+ grewchar *table;
+ struct character_set **next;
+ grewchar mask;
+ unsigned int bins;
+ unsigned int size;
+ bool is_final;
+} character_set;
+
+static character_set *character_set_new(const bool alloc_next)
+{
+ character_set *set =
+ (character_set *)gregorio_calloc(1, sizeof(character_set));
+ set->mask = 0x0f;
+ set->bins = 16;
+ set->size = 0;
+ set->table = (grewchar *)gregorio_calloc(set->bins, sizeof(grewchar));
+ if (alloc_next) {
+ set->next = (character_set **)gregorio_calloc(set->bins,
+ sizeof(character_set *));
+ }
+ return set;
+}
+
+static void character_set_free(character_set *const set);
+
+static __inline void character_set_next_elements_free(character_set *const set)
+{
+ unsigned int i;
+ assert(set && set->next);
+ for (i = 0; i < set->bins; ++i) {
+ if (set->next[i]) {
+ character_set_free(set->next[i]);
+ }
+ }
+}
+
+static void character_set_free(character_set *const set)
+{
+ if (set) {
+ if (set->next) {
+ character_set_next_elements_free(set);
+ free(set->next);
+ }
+ free(set->table);
+ free(set);
+ }
+}
+
+static bool character_set_contains(character_set *const set,
+ const grewchar character, character_set **const next)
+{
+ unsigned int index;
+ assert(set);
+
+ if (next) {
+ *next = NULL;
+ }
+ for (index = ((unsigned long)character) & set->mask; set->table[index];
+ index = (index + 1) & set->mask) {
+ if (set->table[index] == character) {
+ if (next && set->next) {
+ *next = set->next[index];
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+static __inline void character_set_put(character_set *const set,
+ const grewchar character, character_set *next)
+{
+ unsigned int index;
+
+ assert(set);
+
+ index = ((unsigned long)character) & set->mask;
+ while (set->table[index]) {
+ index = (index + 1) & set->mask;
+ }
+
+ set->table[index] = character;
+ if (set->next) {
+ set->next[index] = next;
+ }
+}
+
+static __inline void character_set_grow(character_set *const set) {
+ static grewchar *old_table;
+ static character_set **old_next;
+ unsigned int old_bins, i;
+
+ assert(set);
+
+ if (set->bins >= 0x4000L) {
+ /* this should not realistically be reached */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("character set too large"), "character_set_grow",
+ VERBOSITY_FATAL, 0);
+ return;
+ /* LCOV_EXCL_STOP */
+ }
+
+ old_table = set->table;
+ old_next = set->next;
+ old_bins = set->bins;
+
+ set->bins <<= 1;
+ set->mask = (set->mask << 1) | 0x01;
+ set->table = gregorio_calloc(set->bins, sizeof(grewchar));
+ if (old_next) {
+ set->next = gregorio_calloc(set->bins, sizeof(character_set *));
+ }
+ for (i = 0; i < old_bins; ++i) {
+ if (old_table[i]) {
+ character_set_put(set, old_table[i], old_next ? old_next[i] : NULL);
+ } else {
+ assert(!old_next || !old_next[i]);
+ }
+ }
+
+ free(old_table);
+ if (old_next) {
+ free(old_next);
+ }
+}
+
+static character_set *character_set_add(character_set *const set,
+ const grewchar character)
+{
+ character_set *next = NULL;
+
+ if (!character_set_contains(set, character, &next)) {
+ if (((++(set->size) * 10) / set->bins) >= 7) {
+ character_set_grow(set);
+ }
+
+ if (set->next) {
+ next = character_set_new(true);
+ }
+
+ character_set_put(set, character, next);
+ }
+
+ return next;
+}
+
+static __inline void character_set_clear(character_set *const set)
+{
+ if (set) {
+ memset(set->table, 0, set->bins * sizeof(grewchar));
+
+ if (set->next) {
+ character_set_next_elements_free(set);
+ memset(set->next, 0, set->bins * sizeof(character_set *));
+ }
+
+ set->size = 0;
+ }
+}
+
+static character_set *vowel_table = NULL;
+static character_set *prefix_table = NULL;
+static character_set *suffix_table = NULL;
+static character_set *secondary_table = NULL;
+static grewchar *prefix_buffer = NULL;
+static size_t prefix_buffer_size;
+static size_t prefix_buffer_mask;
+
+extern FILE *gregorio_vowel_rulefile_in;
+
+static void prefix_buffer_grow(size_t required_size)
+{
+ while (required_size > prefix_buffer_size) {
+ prefix_buffer_size <<= 1;
+ prefix_buffer_mask = (prefix_buffer_mask << 1) | 0x01;
+ }
+ prefix_buffer = gregorio_realloc(prefix_buffer,
+ prefix_buffer_size * sizeof(grewchar));
+}
+
+void gregorio_vowel_tables_init(void)
+{
+ if (vowel_table) {
+ character_set_clear(vowel_table);
+ character_set_clear(prefix_table);
+ character_set_clear(suffix_table);
+ character_set_clear(secondary_table);
+ } else {
+ vowel_table = character_set_new(false);
+ prefix_table = character_set_new(true);
+ suffix_table = character_set_new(true);
+ secondary_table = character_set_new(true);
+
+ prefix_buffer_size = 16;
+ prefix_buffer_mask = 0x0f;
+ prefix_buffer = (grewchar *)gregorio_malloc(
+ prefix_buffer_size * sizeof(grewchar));
+ }
+}
+
+void gregorio_vowel_tables_load(const char *const filename,
+ char **const language, rulefile_parse_status *status)
+{
+ gregorio_check_file_access(read, filename, WARNING, return);
+ gregorio_vowel_rulefile_in = fopen(filename, "r");
+ if (gregorio_vowel_rulefile_in) {
+ gregorio_vowel_rulefile_parse(filename, language, status);
+ fclose(gregorio_vowel_rulefile_in);
+ gregorio_vowel_rulefile_in = NULL;
+ } else {
+ /* tests cannot be expected to simulate the system error that would
+ * cause gregorio_vowel_rulefile_in to be NULL */
+ /* LCOV_EXCL_START */
+ gregorio_messagef("gregorio_vowel_tables_load", VERBOSITY_WARNING, 0,
+ _("unable to open %s: %s"), filename, strerror(errno));
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+void gregorio_vowel_tables_free(void)
+{
+ if (vowel_table) {
+ character_set_free(vowel_table);
+ }
+ if (prefix_table) {
+ character_set_free(prefix_table);
+ }
+ if (suffix_table) {
+ character_set_free(suffix_table);
+ }
+ if (secondary_table) {
+ character_set_free(secondary_table);
+ }
+ if (prefix_buffer) {
+ free(prefix_buffer);
+ }
+}
+
+void gregorio_vowel_table_add(const char *vowels)
+{
+ if (vowels) {
+ grewchar *str = gregorio_build_grewchar_string_from_buf(vowels), *p;
+ for (p = str; *p; ++p) {
+ character_set_add(vowel_table, *p);
+ }
+ free(str);
+ }
+}
+
+void gregorio_prefix_table_add(const char *prefix)
+{
+ character_set *set = prefix_table;
+ grewchar *str, *p;
+
+ /* store prefixes backwards */
+ if (prefix && *prefix) {
+ str = gregorio_build_grewchar_string_from_buf(prefix);
+ p = str;
+
+ while (*(++p)) ;
+
+ while (p > str) {
+ set = character_set_add(set, *(--p));
+ }
+
+ set->is_final = true;
+ prefix_buffer_grow(gregorio_wcstrlen(str));
+ free(str);
+ }
+}
+
+void gregorio_suffix_table_add(const char *suffix)
+{
+ character_set *set = suffix_table;
+ grewchar *str, *p;
+
+ if (suffix && *suffix) {
+ str = gregorio_build_grewchar_string_from_buf(suffix);
+ p = str;
+
+ while (*p) {
+ set = character_set_add(set, *(p++));
+ }
+
+ set->is_final = true;
+ free(str);
+ }
+}
+
+void gregorio_secondary_table_add(const char *secondary)
+{
+ character_set *set = secondary_table;
+ grewchar *str, *p;
+
+ if (secondary && *secondary) {
+ str = gregorio_build_grewchar_string_from_buf(secondary);
+ p = str;
+
+ while (*p) {
+ set = character_set_add(set, *(p++));
+ }
+
+ set->is_final = true;
+ free(str);
+ }
+}
+
+typedef enum {
+ VWL_BEFORE = 0,
+ VWL_WITHIN,
+ VWL_SUFFIX
+} vowel_group_state;
+
+static __inline bool is_in_prefix(size_t bufpos) {
+ character_set *previous = prefix_table, *prefix;
+
+ while (character_set_contains(previous, prefix_buffer[bufpos], &prefix)) {
+ bufpos = (bufpos + prefix_buffer_size - 1) & prefix_buffer_mask;
+ previous = prefix;
+ }
+
+ return previous->is_final;
+}
+
+bool gregorio_find_vowel_group(const grewchar *const string, int *const start,
+ int *const end)
+{
+ size_t bufpos = 0;
+ vowel_group_state state = VWL_BEFORE;
+ character_set *cset = NULL;
+ const grewchar *subject;
+ int i;
+
+ /* stick the 0 in here to avoid overruns from is_in_prefix */
+ prefix_buffer[0] = 0;
+
+ for (i = 0, subject = string; true; ++i, ++subject) {
+ switch (state) {
+ case VWL_BEFORE:
+ bufpos = (bufpos + 1) & prefix_buffer_mask;
+ prefix_buffer[bufpos] = *subject;
+ if (character_set_contains(vowel_table, *subject, NULL)) {
+ /* we found a vowel */
+ if ((!character_set_contains(vowel_table, *(subject + 1), NULL)
+ && *(subject + 1) != GREVOWEL_ELISION_MARK)
+ || !is_in_prefix(bufpos)) {
+ /* no vowel/elision after, or not in prefix, so this is the
+ * start */
+ *start = i;
+ state = VWL_WITHIN;
+ }
+ }
+ break;
+
+ case VWL_WITHIN:
+ if (!character_set_contains(vowel_table, *subject, NULL)) {
+ /* not a vowel; is it a suffix? */
+ *end = i;
+ if (character_set_contains(suffix_table, *subject, &cset)) {
+ /* it's the start of a suffix */
+ state = VWL_SUFFIX;
+ } else {
+ /* neither a vowel nor a suffix, so this is the end */
+ return true;
+ }
+ }
+ break;
+
+ case VWL_SUFFIX:
+ if (cset->is_final) {
+ /* remember the last final position */
+ *end = i;
+ }
+ if (!character_set_contains(cset, *subject, &cset)) {
+ /* no longer in valid suffix */
+ return true;
+ }
+ break;
+
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ assert(false);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+
+ if (!*subject) {
+ break;
+ }
+ }
+
+ /* no vowel found; look for a secondary */
+ *end = -1;
+ for (*start = 0; *(subject = string + *start); ++ *start) {
+ for (cset = secondary_table, i = *start;
+ character_set_contains(cset, *subject, &cset); ++i, ++subject) {
+ if (cset->is_final) {
+ /* remember the last final position */
+ *end = i + 1;
+ }
+ }
+ if (*end >= 0) {
+ return true;
+ }
+ }
+
+ /* no center found */
+ *start = -1;
+ return false;
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.h b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.h
new file mode 100644
index 00000000000..a149f4214d5
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.h
@@ -0,0 +1,52 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes the vowel handling data structures and entry points.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _VOWEL_H
+#define _VOWEL_H
+
+#include <stdio.h>
+#include "bool.h"
+#include "unicode.h"
+
+/* Use unicode 0xfffe, which is guaranteed not to be a character */
+#define GREVOWEL_ELISION_MARK ((grewchar)0xfffe)
+
+typedef enum rulefile_parse_status {
+ RFPS_NOT_FOUND = 0,
+ RFPS_FOUND,
+ RFPS_ALIASED
+} rulefile_parse_status;
+
+int gregorio_vowel_rulefile_parse(const char *filename, char **language,
+ rulefile_parse_status *status);
+int gregorio_vowel_rulefile_lex_destroy(void);
+void gregorio_vowel_tables_init(void);
+void gregorio_vowel_tables_load(const char *filename, char **language,
+ rulefile_parse_status *status);
+void gregorio_vowel_tables_free(void);
+void gregorio_vowel_table_add(const char *vowels);
+void gregorio_prefix_table_add(const char *prefix);
+void gregorio_suffix_table_add(const char *suffix);
+void gregorio_secondary_table_add(const char *secondary);
+bool gregorio_find_vowel_group(const grewchar *subject, int *start, int *end);
+
+#endif